.theme-control { position: relative; margin-right: auto; }
.quick-actions .theme-toggle { min-width: 148px; justify-content: center; color: #2363bc; font-weight: 700; }
.quick-actions .theme-toggle[aria-expanded="true"] { background: #edf5ff; border-color: #8db8ef; }
.theme-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(300px, calc(100vw - 36px)); padding: 16px; border: 1px solid #dbe6f2; border-radius: 16px; background: #fff; color: #26364a; box-shadow: 0 14px 32px #182f5030; font-size: 13px; }
.theme-panel[hidden] { display: none; }
.theme-panel-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.theme-panel label, .theme-panel-label { display: block; margin: 10px 0 7px; font-weight: 600; }
.theme-panel select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #cfddec; border-radius: 9px; background: #f8fbff; color: #26364a; }
.theme-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.theme-swatch { width: 32px; height: 32px; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; }
.theme-swatch:hover, .theme-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #1f5ab6; transform: scale(1.06); }
.theme-custom-label { display: flex !important; justify-content: space-between; align-items: center; }
.theme-custom-label input { width: 54px; height: 35px; border: 1px solid #cfddec; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.theme-reset { width: 100%; margin-top: 8px; padding: 9px; border: 1px solid #cfddec; border-radius: 9px; background: #fff; color: #355b88; cursor: pointer; }
.theme-reset:hover { background: #f1f7ff; }
body.lookup-page { background: var(--theme-page-bg, var(--bg)); }
.lookup-page .quick-actions { background: var(--theme-toolbar-bg, transparent); border-radius: 14px; padding: 5px; }
.lookup-page .query-card { background: var(--theme-query-bg, transparent); color: var(--theme-query-fg, inherit); }
.lookup-page .query-card .section-title { color: var(--theme-query-fg, inherit); }
.lookup-page .query-card .query-guide, .lookup-page .query-card .status { color: var(--theme-query-fg, inherit); }
.lookup-page #keyword, .lookup-page #suggestion { background: #fff !important; color: #111827 !important; }
.lookup-page #keyword { font-weight: 650; }
.lookup-page #keyword::placeholder { color: #64748b; opacity: 1; font-weight: 400; }
.lookup-page #suggestion .suggest-item { color: #111827 !important; }
.lookup-page #suggestion .suggest-item span { font-weight: 650; }
.lookup-page #suggestion .suggest-item small { color: #475569 !important; opacity: 1; }
.lookup-page #suggestion .suggest-item:hover, .lookup-page #suggestion .suggest-item.active { background: #eaf2ff !important; color: #111827 !important; }
.lookup-page .quote-card, .lookup-page .quote-paper { background: var(--theme-price-bg, #fff); color: var(--theme-price-fg, inherit); }
.lookup-page .quote-caption { color: var(--theme-price-fg, inherit); }
.lookup-page .result { color: var(--theme-price-fg, #213b5c); }
.lookup-page #btnSearch, .lookup-page .quote-actions .btn-primary { background: var(--theme-action-bg, var(--primary)); color: var(--theme-action-fg, #fff); }
.lookup-page #btnSearch:hover:not(:disabled), .lookup-page .quote-actions .btn-primary:hover:not(:disabled) { background: var(--theme-action-bg, #1c54d6); filter: brightness(.94); }
@media (max-width: 480px) { .theme-control { width: 100%; } .quick-actions .theme-toggle { width: 100%; } }
