/* Loot Search visual language. Opt in per page; retain existing layouts and states. */
@font-face {
    font-family: Rajdhani;
    src: url('../../assets/fonts/Rajdhani/Rajdhani-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
body.tl-search-theme {
    color-scheme: dark;
    --bg: #090b0f;
    --panel: #10151b;
    --panel2: #131b24;
    --line: #27303b;
    --border: #4e3827;
    --muted: #9aa7b6;
    --text: #edf2f6;
    --accent: #f39a3c;
    --accent2: #f2b578;
    --cyan: #86cde8;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 20% 0%, #24180e66, transparent 38%), var(--bg);
    color: var(--text);
    font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.tl-search-theme :is(.wrap, .analytics-shell, .admin-shell) {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 28px 48px;
}
.tl-search-theme .analytics-shell {
    --tl-bg: var(--bg);
    --tl-surface: var(--panel);
    --tl-surface-2: var(--panel2);
    --tl-surface-3: #1a2531;
    --tl-border: var(--line);
    --tl-border-strong: #3a4655;
    --tl-accent: var(--accent);
    --tl-accent-soft: #f39a3c13;
    --tl-cyan: var(--cyan);
    --tl-text: var(--text);
    --tl-muted: var(--muted);
    --tl-shadow: none;
}
.tl-search-theme a { text-decoration: none; }
.tl-search-theme :is(button, input, select, textarea) { font-family: inherit; }
.tl-search-theme :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}
.tl-search-theme [hidden] { display: none !important; }
.tl-search-theme :is(h1, h2, h3) { color: var(--text); letter-spacing: 0; }
.tl-search-theme :is(.loot-heading h1, .hero-panel h1, .hero-card h1) {
    font: 700 clamp(34px, 5vw, 48px)/1.08 Rajdhani, system-ui, sans-serif;
    letter-spacing: -.02em;
    margin: 8px 0 12px;
}
.tl-search-theme :is(.mission-overview h2, .tl-mission-overview h2, .admin-header h2, .panel-title h2, .section-headline h2, .tl-vendor-heading) {
    font: 700 28px/1.2 Rajdhani, system-ui, sans-serif;
}
.tl-search-theme :is(.loot-heading-label, .eyebrow, .section-kicker) {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    font: 700 11px/1.4 ui-monospace, Consolas, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}
/* Quiet navigation, with actions kept in their existing order. */
.tl-search-theme :is(.page-top, .top-nav, .admin-nav) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 28px;
    padding: 12px 0 20px;
    min-height: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.tl-search-theme :is(.top-nav, .admin-nav)::before { display: none; }
.tl-search-theme :is(.brand, .brand-lockup, .admin-brand strong) {
    color: var(--text);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: 0;
}
.tl-search-theme :is(.brand-mark, .brand-lockup img) {
    width: 32px;
    height: 32px;
    border: 1px solid #f39a3c55;
    border-radius: 5px;
    background: #f39a3c10;
    box-shadow: none;
}
.tl-search-theme :is(.admin-status, .admin-brand small) {
    color: var(--muted);
    font: 11px/1.5 ui-monospace, Consolas, monospace;
}
.tl-search-theme :is(.page-actions, .pt-actions) { gap: 6px; }
.tl-search-theme :is(.page-top, .top-nav, .admin-nav) :is(a, button):not(.brand) {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}
.tl-search-theme :is(.page-top, .top-nav, .admin-nav) :is(a, button):hover {
    color: var(--accent);
    background: #f39a3c13;
    border-color: #f39a3c30;
    transform: none;
}
.tl-search-theme .share-feedback:empty { display: none; }
.tl-search-theme :is(.loot-heading, .hero-card) {
    margin: 38px 0 26px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.tl-search-theme .hero-card::before { display: none; }
.tl-search-theme .hero-card p { max-width: 620px; font-size: 15px; }
.tl-search-theme .bot-add-link { font-size: 12px; font-weight: 600; }
.tl-search-theme .bot-add-link svg { width: 28px; height: 22px; }
/* Surfaces echo the search terminal and result cards. */
.tl-search-theme :is(.card, .panel, .statbox, .admin, .publish-queue, .health-dashboard, .section-card, .cadence-panel, .loot-table-wrap, .loot-share-dialog) {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(125deg, #ffffff03, transparent 45%), var(--panel);
    box-shadow: none;
}
.tl-search-theme :is(.card, .panel, .statbox):hover { transform: none; border-color: #3a4655; }
.tl-search-theme .card::before { display: none; }
.tl-search-theme :is(.analytics-shell, .admin-shell) :is(.top-nav, .admin-nav) {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.tl-search-theme .admin-shell .hero-card { border: 0; background: transparent; box-shadow: none; }
.tl-search-theme span.brand-mark {
    display: grid;
    place-items: center;
    padding: 0;
    flex: 0 0 32px;
    color: var(--accent);
    font: 700 19px Rajdhani, system-ui, sans-serif;
}
.tl-search-theme .admin-brand { display: flex; align-items: center; gap: 10px; }
.tl-search-theme :is(.panel-pad, .section-card) { padding: 22px 24px; }
.tl-search-theme :is(.loot-info-bar, .workspace-publishbar, .hero-kpi, .status-tile, .metric-card, .intel-card, .freshness-card, .summary-tile, .mission-editor, .cache-card, .admin-broadcast-panel, .activity-log-panel, .access-entry) {
    border-color: var(--line);
    border-radius: 8px;
    background: #0d1218;
    box-shadow: none;
}
.tl-search-theme .loot-info-bar { border: 1px solid var(--border); padding: 16px 20px; }
.tl-search-theme .loot-info-field > span { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .03em; }
.tl-search-theme .loot-info-field strong { font-size: 16px; font-weight: 600; }
.tl-search-theme .loot-reset strong { color: var(--cyan); font-family: ui-monospace, Consolas, monospace; }
.tl-search-theme :is(.metric-card > strong, .summary-tile > strong, .hero-kpi strong) {
    font: 700 32px/1.15 Rajdhani, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}
.tl-search-theme .hero-kpi:first-child strong { font-size: 23px; }
.tl-search-theme .hero-kpi strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.tl-search-theme .hero-kpi:first-child { grid-column: 1 / -1; }
.tl-search-theme .hero-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl-search-theme :is(.metric-label, .summary-tile span, .hero-kpi span) { color: var(--muted); font-size: 10px; font-weight: 500; }
/* Existing semantic status colours and priority markers remain recognisable. */
.tl-search-theme :is(.status-pill, .section-badge, .hud-pill, .workspace-role) { border-radius: 4px; font-size: 11px; font-weight: 600; }
.tl-search-theme :is(.table-wrap, .health-table-wrap) { border-color: var(--line); border-radius: 6px; }
.tl-search-theme :is(.server-table, .loot-table) th {
    background: #0d1218;
    color: var(--muted);
    border-color: var(--line);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .06em;
}
.tl-search-theme :is(.server-table, .loot-table) td { border-color: var(--line); font-size: 13px; }
.tl-search-theme .server-name { color: var(--text); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.tl-search-theme .mono { color: var(--cyan); font-size: 11px; overflow-wrap: anywhere; }
.tl-search-theme .publish-note { font-size: 11px; }
.tl-search-theme .loot-table tr:not(.priority-row):not(.region-section-row) td { background: var(--panel); }
.tl-search-theme .loot-table tr:not(.priority-row):not(.region-section-row):hover td { background: #1a2531; }
.tl-search-theme .tl-overview-table td { background: var(--panel); }
.tl-search-theme .tl-overview-table tbody tr:not(.priority-row):hover td { background: #1a2531; }
.tl-search-theme .tl-overview-table td:first-child { border-radius: 8px 0 0 8px; }
.tl-search-theme .tl-overview-table td:last-child { border-radius: 0 8px 8px 0; }
.tl-search-theme .tl-overview-table .priority-row td { background: #30281b; }
.tl-search-theme .tl-vendor-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.tl-search-theme :is(.tl-mission, .tl-loot) { font-size: 14px; }
.tl-search-theme .tl-vendor-card .tl-loot { font-size: 17px; }
.tl-search-theme .tl-history { border-color: var(--line); }
.tl-search-theme .tl-history span { color: var(--muted); font-size: 10px; }
.tl-search-theme .tl-history strong { font-size: 16px; }
.tl-search-theme .tl-history strong.tl-last-seen { color: var(--cyan); }
.tl-search-theme :is(.tl-history-note, .tl-cache-type) { color: var(--muted); font-size: 11px; }
/* Flat controls; do not alter visibility, form names or submit actions. */
.tl-search-theme :is(button, .admin-link, .pt-button) { border-radius: 4px; font-weight: 600; box-shadow: none; }
.tl-search-theme :is(.buttons button, .date-grid button, .dm-test-form button, .loot-share-image-actions button, .pt-button):where(:not(.secondary, .danger, .success)) {
    background: var(--accent);
    border-color: var(--accent);
    color: #19110a;
}
.tl-search-theme :is(button.secondary, .admin-link.secondary, .pt-button.secondary) {
    background: transparent;
    color: var(--accent2);
    border-color: #f39a3c4a;
    box-shadow: none;
}
.tl-search-theme :is(button, .admin-link, .pt-button):hover { transform: none; filter: none; }
.tl-search-theme :is(input, select, textarea, .loot-picker-trigger):where(:not([type=checkbox], [type=radio])) {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #131b24;
    color: var(--text);
    font-size: 13px;
    box-shadow: none;
}
.tl-search-theme :is(select option, select optgroup) { background: #131b24; color: var(--text); }
.tl-search-theme :is(input, select, textarea):focus { border-color: var(--accent); }
.tl-search-theme .loot-picker-menu { background: #10171f; border-color: var(--line); border-top: 2px solid var(--accent); border-radius: 0 0 6px 6px; }
.tl-search-theme .loot-picker-menu-heading { font: 11px ui-monospace, Consolas, monospace; color: var(--muted); }
.tl-search-theme .loot-picker-option { border-radius: 0; box-shadow: none; font-weight: 500; }
.tl-search-theme .loot-picker-option:hover { background: #1a2531; }
/* Admin workspace: terminal frame, compact sidebar, one editing pane at a time. */
.tl-search-theme .admin-console { margin-top: 32px; padding: 24px; border-color: var(--border); background: #0d1218; }
.tl-search-theme .admin-console .admin-header { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tl-search-theme .admin-console .admin-header h2 { font-size: 28px; }
.tl-search-theme .admin-console .workspace-label { font: 10px ui-monospace, Consolas, monospace; color: var(--muted); }
.tl-search-theme .admin-console .admin-workspace-nav a { border-radius: 5px; font-weight: 500; }
.tl-search-theme .admin-console .admin-workspace-nav a[aria-current=page] { color: var(--accent); background: #f39a3c13; border-color: #f39a3c30; }
.tl-search-theme .admin-console :is(.mission-editor, .cache-card, .admin-broadcast-panel, .activity-log-panel, .access-entry) { background: var(--panel); border-radius: 8px; border-color: var(--line); }
.tl-search-theme .admin-console .mission-editor:hover { background: var(--panel); border-color: #3a4655; }
.tl-search-theme .admin-console .workspace-publishbar { background: #131b24; border-color: var(--line); box-shadow: none; border-radius: 5px; }
.tl-search-theme .admin-console :is(.workspace-section-heading h3, .admin-collapsible summary) { font: 700 25px Rajdhani, system-ui, sans-serif; }
.tl-search-theme .admin-console .workspace-role { font-size: 10px; }
.tl-search-theme .admin-console .cache-title::before { background: var(--accent); }
/* Analytics retains its charts and exploration layout within the same shell. */
.tl-search-theme .hero-panel { padding: 10px 0 26px; margin-bottom: 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.tl-search-theme .hero-panel::before { display: none; }
.tl-search-theme .hero-panel p { color: var(--muted); font-size: 15px; font-weight: 400; }
.tl-search-theme .hero-status { gap: 10px; }
.tl-search-theme .section-tabs { background: #0d1218; border-color: var(--line); border-radius: 6px; box-shadow: none; }
.tl-search-theme .section-tabs a { font-size: 12px; font-weight: 500; border-radius: 4px; }
.tl-search-theme .section-tabs a:is(:hover, .is-active) { color: var(--accent); background: #f39a3c13; border-color: #f39a3c30; }
.tl-search-theme .section-tabs a::before { background: var(--accent); }
.tl-search-theme .section-tabs-label { color: var(--muted); font: 10px ui-monospace, Consolas, monospace; }
.tl-search-theme .current-rotation-panel { background: linear-gradient(120deg, #17202b66, transparent 60%), #0d1218; border-color: var(--border); }
.tl-search-theme .current-rotation-panel::before { display: none; }
.tl-search-theme :is(.category-chart-box, .category-percent-list) { min-width: 0; }
.tl-search-theme .category-chart-box canvas { max-width: 100%; }
.tl-search-theme .admin-shell .server-table { min-width: 1040px; }
.tl-search-theme .admin-shell .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tl-search-theme .dm-test-form label { font-size: 11px; font-weight: 500; }
.tl-search-theme .dm-test-form select { padding: 10px; min-height: 42px; }
.tl-search-theme .dm-test-meta { font-size: 12px; }
@container loot-overview (max-width: 820px) {
    .tl-search-theme .tl-overview-table tr { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
    .tl-search-theme .tl-overview-table .priority-row { background: #30281b; }
}
@media (max-width: 1200px) {
    .tl-search-theme .analytics-body { grid-template-columns: minmax(0, 1fr); }
    .tl-search-theme .section-tabs { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 8px; }
    .tl-search-theme .section-tabs-label { width: 100%; }
    .tl-search-theme .section-tabs a { min-height: 36px; padding: 8px 10px; }
}
@media (max-width: 1100px) {
    .tl-search-theme .frequency-stack .category-chart-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .tl-search-theme .admin-shell .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl-search-theme .admin-shell .server-table { min-width: 0; }
    .tl-search-theme .server-table td { display: block; overflow-wrap: anywhere; }
    .tl-search-theme .server-table td::before { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 500; }
}
@media (max-width: 760px) {
    .tl-search-theme :is(.wrap, .analytics-shell, .admin-shell) { padding: 15px 16px 32px; }
    .tl-search-theme :is(.page-top, .top-nav, .admin-nav) { align-items: flex-start; gap: 10px; margin-bottom: 22px; }
    .tl-search-theme :is(.page-top, .top-nav, .admin-nav) :is(a, button):not(.brand) { font-size: 11px; padding: 6px 8px; }
    .tl-search-theme .page-actions { justify-content: flex-start; }
    .tl-search-theme .admin-status { width: 100%; }
    .tl-search-theme :is(.loot-heading, .hero-card) { margin-top: 28px; }
    .tl-search-theme :is(.panel-pad, .section-card, .admin-console) { padding: 16px; }
    .tl-search-theme .hero-panel { padding: 0 0 22px; }
    .tl-search-theme .loot-info-bar { padding: 14px; }
    .tl-search-theme .loot-info-field strong { font-size: 14px; }
}
@media (max-width: 480px) {
    .tl-search-theme :is(.page-top, .top-nav, .admin-nav) { flex-direction: column; }
    .tl-search-theme .hero-kpi-grid { grid-template-columns: minmax(0, 1fr); }
    .tl-search-theme .hero-kpi:first-child { grid-column: auto; }
    .tl-search-theme .admin-header { flex-wrap: wrap; }
    .tl-search-theme .bot-add-link { font-size: 11px; }
    .tl-search-theme .bot-add-link svg { width: 22px; height: 18px; }
}
