table {
    border-collapse: collapse;
    width: 100%;
}

th {
    border: 1px solid #333333;
    padding: 8px;
    text-align: center;
}

td {
    padding-left: 4px;
    text-align: left;
}

thead {
    background-color: #80808080;
}

thead th {
    cursor: pointer;
}


html {
    scrollbar-gutter: stable;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 200ms ease-out;
}

/* Периодически опрашиваемые блоки (статус, прогресс): без затухания при каждой замене, иначе мерцают */
.hb-live.htmx-swapping {
    opacity: 1;
    transition: none;
}

.fade-me-out.htmx-swapping {
    opacity: 0;
    transition: opacity 200ms ease-out;
}

form.htmx-request .htmx-indicator.hidden {
    display: inline-block !important;
}

.htmx-indicator.hidden.htmx-request {
    display: inline-block !important;
}

.htmx-indicator {
    display: none !important;
}

#toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

#toast-container>div {
    pointer-events: auto;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 60s linear infinite; /* Очень медленно */
}

/* Определяем ключевые кадры анимации */
@keyframes pulse-slow {
  0%, 100% {
    transform: scale(1); /* Обычный размер */
    opacity: 1;           /* Полная прозрачность */
  }
  50% {
    transform: scale(1.15); /* Увеличение на 15% */
    opacity: 0.8;          /* Легкое полупрозрачность для мягкости */
  }
}

/* Создаем класс для использования в HTML */
.animate-pulse-slow {
  /* Название анимации, длительность (4с), тип сглаживания, бесконечно */
  animation: pulse-slow 4s ease-in-out infinite;
}

.tv-legend {
    position: absolute;
    padding: 8px;
    font-size: 14px;
    color: #d1d4dc;
    background: rgba(39, 39, 39, 0.65);
    border-radius: 6px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
    text-align: left;
    z-index: 1000;
    pointer-events: none;
}

.go-to-realtime-button {
    position: absolute;
    display: none;
    z-index: 10;
    border-radius: 4px;
    width: 27px;
    height: 27px;
    background: rgba(250, 250, 250, 0.6);
    border: none;
    cursor: pointer;
}

/* ── BotTable: modern data table ───────────────────────────── */

/* Stat pill in account header */
.bt-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    line-height: 1.1;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid oklch(var(--b3));
    background: oklch(var(--b2));
    gap: 1px;
    white-space: nowrap;
}
.bt-stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}
.bt-stat-value {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.72rem;
    font-weight: 600;
}
/* Стат с разбивкой (стоимость: лонг/шорт) — при наведении или по клику вместо суммы показываются части */
.bt-stat-split { cursor: pointer; }
.bt-stat-split .bt-split-parts { display: none; white-space: nowrap; }
.bt-stat-split:hover .bt-split-total,
.bt-stat-split.bt-stat-open .bt-split-total { display: none; }
.bt-stat-split:hover .bt-split-parts,
.bt-stat-split.bt-stat-open .bt-split-parts { display: inline; }
.bt-stat.badge-success { background: oklch(var(--su) / 0.15); border-color: oklch(var(--su) / 0.4); color: oklch(var(--su)); }
.bt-stat.badge-error   { background: oklch(var(--er) / 0.12); border-color: oklch(var(--er) / 0.35); color: oklch(var(--er)); }

/* Table base */
.bt-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.75rem;
}
.bt-table thead tr {
    border-bottom: 1px solid oklch(var(--b3));
}
.bt-table thead th {
    padding: 6px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
    white-space: nowrap;
    border: none;
    background: oklch(var(--b2) / 0.6);
}

/* Rows */
.bt-row {
    border-bottom: 1px solid oklch(var(--b3) / 0.5);
    transition: background 0.12s;
}
.bt-row:last-child { border-bottom: none; }
.bt-row:hover { background: oklch(var(--b2) / 0.7); }
.bt-row td {
    padding: 5px 8px;
    border: none;
    vertical-align: middle;
}

/* Cell variants */
.bt-cell-icon { padding: 4px 6px !important; width: 28px; }
.bt-muted     { opacity: 0.65; white-space: nowrap; }
.bt-num       { font-family: ui-monospace, 'Cascadia Code', monospace; text-align: right; white-space: nowrap; }

/* TF label inside symbol cell */
.bt-tf {
    font-size: 0.62rem;
    opacity: 0.75;
    white-space: nowrap;
    font-family: ui-monospace, monospace;
}

/* Pause/play mini button inside symbol cell */
.bt-pause-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid oklch(var(--b3));
    background: oklch(var(--b2));
    cursor: pointer;
    opacity: 0.85;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: opacity 0.12s, background 0.12s;
    color: inherit;
}
.bt-pause-btn:hover { opacity: 1; background: oklch(var(--b3)); }

.bt-pause-btn.running { opacity: 0.9; }

/* Symbol button — minimal, looks like a link */
.bt-symbol-btn {
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}
.bt-symbol-btn:hover { text-decoration-color: currentColor; }

/* Icon button — gear / pause */
.bt-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    background: oklch(var(--b2));
    border: 1px solid oklch(var(--b3));
    border-radius: 5px;
    padding: 2px 6px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}
.bt-icon-btn:hover { background: oklch(var(--b3)); }

/* Side badge */
.bt-side {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}
.bt-side.badge-success { background: oklch(var(--su) / 0.18); color: oklch(var(--su)); }
.bt-side.badge-error   { background: oklch(var(--er) / 0.15); color: oklch(var(--er)); }
.bt-side.badge-ghost   { background: oklch(var(--b3)); color: oklch(var(--bc)); opacity: 0.75; }

/* P&L / Change coloring */
.bt-num.text-success { color: oklch(var(--su)); }
.bt-num.text-error   { color: oklch(var(--er)); }

/* Sort indicators on sortable th */
.bt-table thead th[data-sort-type] {
    cursor: pointer;
    user-select: none;
}
.bt-table thead th[data-sort-type]:hover { opacity: 0.75; }
.bt-table thead th[data-sort-type]::after {
    content: ' ⇅';
    opacity: 0.25;
    font-size: 0.6rem;
    vertical-align: middle;
}
.bt-table thead th[data-sort-dir="asc"]::after  { content: ' ↑'; opacity: 0.9; }
.bt-table thead th[data-sort-dir="desc"]::after { content: ' ↓'; opacity: 0.9; }

/* ── end BotTable ───────────────────────────────────────────── */

/*
  Custom DaisyUI theme based on "halloween".
  All color values below use the OKLCH format that DaisyUI expects.
  You can safely tweak these numbers later to tune the palette.
*/
[data-theme="hamster-bot"],
:root:has(input.theme-controller[value="hamster-bot"]:checked) {
    color-scheme: dark;

    /* Primary brand color: main buttons, active tabs, highlighted actions */
    --p: 87% 0.11 80.01;
    /* Text/icon color shown on top of primary surfaces */
    --pc: 0% 0 0;
    
    /* Secondary color: alternate accent buttons and badges */
    --s: 0.53 0.09 194.77;
    /* Text/icon color shown on top of secondary surfaces */
    --sc: 1 0 0;

    /* Accent color: extra emphasis for links, toggles, special UI details */
    --a: 64.8% 0.223 136.073479;
    /* Text/icon color shown on top of accent surfaces */
    --ac: 0% 0 0;

    /* Neutral panel color: nav, dropdowns, less prominent containers */
    --n: 24.371% 0.046608 65.681484;
    /* Text/icon color shown on top of neutral surfaces */
    --nc: 84.8742% 0.009322 65.681484;

    /* Base background: main page background */
    --b1: 27% 0 1;
    /* Base background level 2: cards and raised panels */
    --b2: 24% 0 1;
    /* Base background level 3: deeper sections, borders, nested areas */
    --b3: 0.15 0 1;
    /* Default text color on base backgrounds */
    --bc: 0.88 0 0;

    /* Info state background color */
    --in: 54.615% 0.215208 262.880917;
    /* Text color shown on top of info alerts/badges */
    --inc: 90.923% 0.043042 262.880917;

    /* Success state background color */
    --su: 62.7052% 0.169912 149.213788;
    /* Text color shown on top of success alerts/badges */
    --suc: 12.541% 0.033982 149.213788;

    /* Warning state background color */
    --wa: 66.584% 0.157422 58.31834;
    /* Text color shown on top of warning alerts/badges */
    --wac: 13.3168% 0.031484 58.31834;

    /* Error state background color */
    --er: 65.72% 0.199 27.33;
    /* Text color shown on top of error alerts/badges */
    --erc: 13.144% 0.0398 27.33;

    /* Shape and animation settings used by DaisyUI controls */
    --rounded-box: 1rem;
    --rounded-btn: 0.5rem;
    --rounded-badge: 1.9rem;
    --animation-btn: 0.25s;
    --animation-input: 0.2s;
    --btn-focus-scale: 0.95;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.5rem;
}

/*
  Custom DaisyUI theme: "Liquid Glass".
  A light, frosted-glass aesthetic with icy blue-violet tones and
  translucent, blurred surfaces that simulate glass.
*/
[data-theme="liquid-glass"],
:root:has(input.theme-controller[value="liquid-glass"]:checked) {
    color-scheme: light;

    /* Primary: crystalline blue */
    --p: 62% 0.19 240;
    --pc: 100% 0 0;

    /* Secondary: soft lavender */
    --s: 68% 0.14 285;
    --sc: 100% 0 0;

    /* Accent: icy cyan */
    --a: 78% 0.12 195;
    --ac: 20% 0.05 200;

    /* Neutral: light blue-grey */
    --n: 88% 0.018 230;
    --nc: 28% 0.04 240;

    /* Base surfaces: near-white icy tones */
    --b1: 98% 0.005 225;
    --b2: 95% 0.010 225;
    --b3: 91% 0.015 225;
    --bc: 28% 0.025 240;

    /* Semantic state colors */
    --in: 62% 0.18 240;
    --inc: 100% 0 0;
    --su: 64% 0.17 145;
    --suc: 100% 0 0;
    --wa: 73% 0.17 75;
    --wac: 20% 0.05 60;
    --er: 62% 0.22 25;
    --erc: 100% 0 0;

    /* Rounded, soft shapes */
    --rounded-box: 1.2rem;
    --rounded-btn: 0.8rem;
    --rounded-badge: 1.9rem;
    --animation-btn: 0.25s;
    --animation-input: 0.2s;
    --btn-focus-scale: 0.95;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.8rem;
}

/* Gradient background canvas */
[data-theme="liquid-glass"],
[data-theme="liquid-glass"] body {
    background: linear-gradient(
        135deg,
        oklch(83% 0.07 240) 0%,
        oklch(88% 0.05 195) 35%,
        oklch(86% 0.06 270) 70%,
        oklch(90% 0.04 210) 100%
    ) !important;
    background-attachment: fixed !important;
}

/* Glass surface: cards.
   backdrop-filter is moved to ::before so the card itself does NOT create
   a stacking context — this lets dropdown menus (z-index) escape above
   sibling cards without being clipped. */
[data-theme="liquid-glass"] .card {
    position: relative;
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow:
        0 8px 32px rgba(80, 120, 220, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    overflow: visible !important;
}

[data-theme="liquid-glass"] .card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    /* Top-bright → bottom-dimmer gradient: canonical glass behaviour under light */
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.58) 0%,
        rgba(235, 244, 255, 0.30) 100%
    );
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    z-index: -1;
    pointer-events: none;
}

/* Glass surface: theme dropdown list */
[data-theme="liquid-glass"] .dropdown-content.bg-base-300 {
    background-color: rgba(220, 235, 255, 0.55) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Glass surface: modal dialog */
[data-theme="liquid-glass"] .modal-box {
    /* Градиент: верх светлее (блик) → низ прозрачнее — эффект настоящего стекла */
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(220, 240, 255, 0.18) 100%
    ) !important;
    backdrop-filter: blur(36px) saturate(200%) brightness(1.05);
    -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.60);
    /* Верхний блик + глубокая тень */
    box-shadow:
        0 20px 60px rgba(60, 100, 200, 0.18),
        0  4px 16px rgba(60, 100, 200, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -1px 0 rgba(180, 210, 255, 0.20);
}

/* Glass surface: boxed tabs bar */
[data-theme="liquid-glass"] .tabs.tabs-boxed {
    background-color: rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.50);
}

/* Active tab — iOS pill style */
[data-theme="liquid-glass"] .tabs.tabs-boxed .tab-active,
[data-theme="liquid-glass"] .tabs.tabs-boxed [aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.72) !important;
    color: oklch(28% 0.06 240) !important;
    border-radius: var(--tab-radius, 0.8rem) !important;
    box-shadow:
        0 2px 10px rgba(80, 120, 220, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.80) !important;
}

/* Non-active tabs — subtle ghost */
[data-theme="liquid-glass"] .tabs.tabs-boxed .tab:not(.tab-active) {
    color: oklch(35% 0.04 240) !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
[data-theme="liquid-glass"] .tabs.tabs-boxed .tab:not(.tab-active):hover {
    background-color: rgba(255, 255, 255, 0.30) !important;
    border-radius: var(--tab-radius, 0.8rem) !important;
}

/* ── iOS-style buttons ───────────────────────────── */
[data-theme="liquid-glass"] .btn {
    background-color: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow:
        0 2px 8px rgba(80, 120, 220, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    color: oklch(var(--bc)) !important;
    transition: background-color 0.18s, box-shadow 0.18s, transform 0.1s;
}
[data-theme="liquid-glass"] .btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.62) !important;
    box-shadow:
        0 4px 16px rgba(80, 120, 220, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
[data-theme="liquid-glass"] .btn:active:not(:disabled) {
    transform: scale(0.97);
    background-color: rgba(255, 255, 255, 0.35) !important;
}
[data-theme="liquid-glass"] .btn-primary {
    background-color: oklch(62% 0.19 240 / 0.75) !important;
    border-color: oklch(70% 0.15 240 / 0.60) !important;
    color: #fff !important;
    box-shadow:
        0 2px 12px oklch(62% 0.19 240 / 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.40);
}
[data-theme="liquid-glass"] .btn-primary:hover:not(:disabled) {
    background-color: oklch(62% 0.19 240 / 0.88) !important;
}
[data-theme="liquid-glass"] .btn-success {
    background-color: oklch(64% 0.17 145 / 0.72) !important;
    border-color: oklch(70% 0.14 145 / 0.55) !important;
    color: #fff !important;
}
[data-theme="liquid-glass"] .btn-error {
    background-color: oklch(62% 0.22 25 / 0.70) !important;
    border-color: oklch(68% 0.18 25 / 0.55) !important;
    color: #fff !important;
}
[data-theme="liquid-glass"] .btn-ghost {
    background-color: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);    color: oklch(28% 0.025 240) !important;}
[data-theme="liquid-glass"] .btn-ghost:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.35) !important;
}

/* ── bt-stat pills in liquid-glass ──────────────── */
[data-theme="liquid-glass"] .bt-stat {
    background: rgba(255, 255, 255, 0.40);
    border-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 4px rgba(80, 120, 220, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}
[data-theme="liquid-glass"] .bt-pause-btn,
[data-theme="liquid-glass"] .bt-icon-btn {
    background: rgba(255, 255, 255, 0.42) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(80,120,220,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}
[data-theme="liquid-glass"] .bt-pause-btn:hover,
[data-theme="liquid-glass"] .bt-icon-btn:hover {
    background: rgba(255, 255, 255, 0.65) !important;
}
[data-theme="liquid-glass"] .bt-account {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 4px 20px rgba(80, 120, 220, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ── Inputs & selects in liquid-glass ────────────── */
[data-theme="liquid-glass"] .input,
[data-theme="liquid-glass"] .select,
[data-theme="liquid-glass"] .textarea,
[data-theme="liquid-glass"] input[type="text"],
[data-theme="liquid-glass"] input[type="number"],
[data-theme="liquid-glass"] input[type="password"],
[data-theme="liquid-glass"] input[type="search"],
[data-theme="liquid-glass"] textarea,
[data-theme="liquid-glass"] select {
    background-color: rgba(255, 255, 255, 0.52) !important;
    border-color: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 3px rgba(80, 120, 220, 0.08), 0 1px 0 rgba(255,255,255,0.7);
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass"] .input:focus,
[data-theme="liquid-glass"] .select:focus,
[data-theme="liquid-glass"] .textarea:focus,
[data-theme="liquid-glass"] input:focus,
[data-theme="liquid-glass"] textarea:focus,
[data-theme="liquid-glass"] select:focus {
    background-color: rgba(255, 255, 255, 0.70) !important;
    border-color: oklch(62% 0.19 240 / 0.55) !important;
    outline: 2px solid oklch(62% 0.19 240 / 0.20) !important;
    outline-offset: 2px;
}

/* ── JSON editor panels in liquid-glass ─────────── */
[data-theme="liquid-glass"] .hb-json-editor {
    background: transparent;
}
[data-theme="liquid-glass"] .hb-json-editor [data-schematype="object"],
[data-theme="liquid-glass"] .hb-json-editor [data-schematype="array"] {
    background-color: rgba(255, 255, 255, 0.30) !important;
    border-color: rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 2px 8px rgba(80,120,220,0.06);
}
[data-theme="liquid-glass"] .hb-json-editor input[type="text"],
[data-theme="liquid-glass"] .hb-json-editor input[type="number"],
[data-theme="liquid-glass"] .hb-json-editor input[type="password"],
[data-theme="liquid-glass"] .hb-json-editor textarea,
[data-theme="liquid-glass"] .hb-json-editor select {
    background-color: rgba(255, 255, 255, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: oklch(28% 0.025 240) !important;
}
[data-theme="liquid-glass"] .hb-json-editor button,
[data-theme="liquid-glass"] .hb-json-editor .btn {
    background-color: rgba(255, 255, 255, 0.42) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(80,120,220,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    color: oklch(28% 0.025 240) !important;
}
[data-theme="liquid-glass"] .hb-json-editor button:hover:not(:disabled),
[data-theme="liquid-glass"] .hb-json-editor .btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.65) !important;
}
[data-theme="liquid-glass"] .hb-hint-popover {
    background: rgba(240, 248, 255, 0.75) !important;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 8px 24px rgba(60, 100, 200, 0.14);
}

/* ── Dropdown menus in liquid-glass ──────────────── */
[data-theme="liquid-glass"] .dropdown-content {
    background-color: rgba(230, 242, 255, 0.70) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 8px 32px rgba(60, 100, 200, 0.14);
}

/* ── Alert / badge surfaces ──────────────────────── */
[data-theme="liquid-glass"] .alert {
    background-color: rgba(255, 255, 255, 0.42) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: oklch(28% 0.025 240) !important;
}
[data-theme="liquid-glass"] .alert * {
    color: oklch(28% 0.025 240) !important;
}
[data-theme="liquid-glass"] .alert-info {
    background-color: oklch(62% 0.18 240 / 0.15) !important;
    border-color: oklch(62% 0.18 240 / 0.35) !important;
}
[data-theme="liquid-glass"] .alert-success {
    background-color: oklch(64% 0.17 145 / 0.15) !important;
    border-color: oklch(64% 0.17 145 / 0.35) !important;
}
[data-theme="liquid-glass"] .alert-warning {
    background-color: oklch(73% 0.17 75 / 0.18) !important;
    border-color: oklch(73% 0.17 75 / 0.40) !important;
}
[data-theme="liquid-glass"] .alert-error {
    background-color: oklch(62% 0.22 25 / 0.15) !important;
    border-color: oklch(62% 0.22 25 / 0.35) !important;
}

/* ── Glass scrollbar ─────────────────────────────── */
[data-theme="liquid-glass"] * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.55) rgba(180, 210, 255, 0.12);
}
[data-theme="liquid-glass"] ::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
[data-theme="liquid-glass"] ::-webkit-scrollbar-track {
    background: rgba(180, 210, 255, 0.10);
    border-radius: 8px;
}
[data-theme="liquid-glass"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.52);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80);
}
[data-theme="liquid-glass"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.72);
}

/* ── Frosted BotTable header ─────────────────────── */
[data-theme="liquid-glass"] .bt-table thead th {
    background: rgba(255, 255, 255, 0.32) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        inset 0  1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -1px 0 rgba(180, 210, 255, 0.20);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45) !important;
}

/* ── bt-row hover glass shimmer ─────────────────── */
[data-theme="liquid-glass"] .bt-row:hover {
    background: rgba(255, 255, 255, 0.38) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* ── Table row separators & zebra striping ───────── */
[data-theme="liquid-glass"] .bt-table tbody .bt-row {
    border-bottom: 1px solid rgba(180, 210, 255, 0.28) !important;
}
[data-theme="liquid-glass"] .bt-table tbody .bt-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.14) !important;
}
[data-theme="liquid-glass"] .bt-table tbody .bt-row:nth-child(odd) {
    background: rgba(180, 210, 255, 0.10) !important;
}
[data-theme="liquid-glass"] .bt-table tbody .bt-row:hover {
    background: rgba(255, 255, 255, 0.38) !important;
    border-bottom-color: rgba(180, 210, 255, 0.45) !important;
}
/* Generic tables (table, .table) */
[data-theme="liquid-glass"] table tbody tr,
[data-theme="liquid-glass"] .table tbody tr {
    border-bottom: 1px solid rgba(180, 210, 255, 0.28) !important;
}
[data-theme="liquid-glass"] table tbody tr:nth-child(even),
[data-theme="liquid-glass"] .table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.14) !important;
}
[data-theme="liquid-glass"] table tbody tr:nth-child(odd),
[data-theme="liquid-glass"] .table tbody tr:nth-child(odd) {
    background: rgba(180, 210, 255, 0.10) !important;
}
[data-theme="liquid-glass"] table tbody tr:hover,
[data-theme="liquid-glass"] .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.36) !important;
}

/* ── DaisyUI badge glass ─────────────────────────── */
[data-theme="liquid-glass"] .badge {
    background-color: rgba(255, 255, 255, 0.40) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70);
    color: oklch(28% 0.025 240) !important;
}
/* Restore semantic coloring for bt-stat pills (higher specificity wins) */
[data-theme="liquid-glass"] .bt-stat.badge-success {
    background: oklch(var(--su) / 0.18) !important;
    border-color: oklch(var(--su) / 0.40) !important;
    color: oklch(var(--su)) !important;
}
[data-theme="liquid-glass"] .bt-stat.badge-error {
    background: oklch(var(--er) / 0.14) !important;
    border-color: oklch(var(--er) / 0.35) !important;
    color: oklch(var(--er)) !important;
}

/* ── DaisyUI menu item glass hover ──────────────── */
[data-theme="liquid-glass"] .menu li > *:not(ul):not(.menu-title):hover {
    background-color: rgba(255, 255, 255, 0.42) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── DaisyUI divider glass ───────────────────────── */
[data-theme="liquid-glass"] .divider::before,
[data-theme="liquid-glass"] .divider::after {
    background-color: rgba(255, 255, 255, 0.45) !important;
}

/* ── Headings ─────────────────────────────────────── */
[data-theme="liquid-glass"] h2 {
    color: oklch(22% 0.08 240) !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}
[data-theme="liquid-glass"] h3 {
    color: oklch(24% 0.07 240) !important;
    font-weight: 600;
    letter-spacing: 0.01em;
}
[data-theme="liquid-glass"] h4 {
    color: oklch(28% 0.06 240) !important;
    font-weight: 600;
}

/* ── Links: darker, more readable ───────────────── */
[data-theme="liquid-glass"] a,
[data-theme="liquid-glass"] .link {
    color: oklch(38% 0.22 240) !important;
}
[data-theme="liquid-glass"] a:hover,
[data-theme="liquid-glass"] .link:hover {
    color: oklch(28% 0.20 240) !important;
}
[data-theme="liquid-glass"] .link-primary {
    color: oklch(38% 0.22 240) !important;
}
[data-theme="liquid-glass"] .link-primary:hover {
    color: oklch(28% 0.20 240) !important;
}

/*
  Custom DaisyUI theme: "Liquid Glass Dark".
  Dark variant of Liquid Glass — restrained, low-saturation reading of the
  same crystalline blue accent: a near-neutral charcoal-slate base (not a
  tinted navy/violet gradient), muted semantic colors, and plain black
  shadows instead of colored glows, for a calmer, more disciplined look.
*/
[data-theme="liquid-glass-dark"],
:root:has(input.theme-controller[value="liquid-glass-dark"]:checked) {
    color-scheme: dark;

    /* Primary: crystalline blue, toned down for dark surfaces */
    --p: 60% 0.13 240;
    --pc: 100% 0 0;

    /* Secondary: soft lavender, muted */
    --s: 64% 0.08 285;
    --sc: 100% 0 0;

    /* Accent: icy cyan, muted */
    --a: 72% 0.06 195;
    --ac: 16% 0.02 200;

    /* Neutral: near-desaturated charcoal-grey */
    --n: 24% 0.008 240;
    --nc: 88% 0.006 235;

    /* Base surfaces: flat charcoal-slate, minimal tint */
    --b1: 14% 0.007 245;
    --b2: 18% 0.008 245;
    --b3: 22% 0.009 245;
    --bc: 88% 0.006 235;

    /* Semantic state colors, muted to match */
    --in: 60% 0.12 240;
    --inc: 100% 0 0;
    --su: 58% 0.10 145;
    --suc: 100% 0 0;
    --wa: 70% 0.11 75;
    --wac: 16% 0.03 60;
    --er: 58% 0.15 25;
    --erc: 100% 0 0;

    /* Rounded, soft shapes */
    --rounded-box: 1.2rem;
    --rounded-btn: 0.8rem;
    --rounded-badge: 1.9rem;
    --animation-btn: 0.25s;
    --animation-input: 0.2s;
    --btn-focus-scale: 0.95;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.8rem;
}

/* Gradient background canvas — narrow hue band, low chroma: flat slate,
   not a rainbow. */
[data-theme="liquid-glass-dark"],
[data-theme="liquid-glass-dark"] body {
    background: linear-gradient(
        160deg,
        oklch(14% 0.009 245) 0%,
        oklch(11% 0.007 240) 50%,
        oklch(15% 0.010 250) 100%
    ) !important;
    background-attachment: fixed !important;
}

/* Glass surface: cards */
[data-theme="liquid-glass-dark"] .card {
    position: relative;
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    overflow: visible !important;
}

[data-theme="liquid-glass-dark"] .card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    /* Plain white sheen fading to transparent — no colored tint, so the
       dark blurred backdrop shows through neutrally. */
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.015) 100%
    );
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    z-index: -1;
    pointer-events: none;
}

/* Glass surface: theme dropdown list */
[data-theme="liquid-glass-dark"] .dropdown-content.bg-base-300 {
    background-color: rgba(17, 18, 21, 0.72) !important;
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Glass surface: modal dialog */
[data-theme="liquid-glass-dark"] .modal-box {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(17, 18, 21, 0.40) 100%
    ) !important;
    backdrop-filter: blur(36px) saturate(130%);
    -webkit-backdrop-filter: blur(36px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0  4px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

/* Glass surface: boxed tabs bar */
[data-theme="liquid-glass-dark"] .tabs.tabs-boxed {
    background-color: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Active tab — plain neutral pill, no color cast */
[data-theme="liquid-glass-dark"] .tabs.tabs-boxed .tab-active,
[data-theme="liquid-glass-dark"] .tabs.tabs-boxed [aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.14) !important;
    color: oklch(var(--bc)) !important;
    border-radius: var(--tab-radius, 0.8rem) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

/* Non-active tabs — subtle ghost */
[data-theme="liquid-glass-dark"] .tabs.tabs-boxed .tab:not(.tab-active) {
    color: oklch(var(--bc) / 0.62) !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
[data-theme="liquid-glass-dark"] .tabs.tabs-boxed .tab:not(.tab-active):hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border-radius: var(--tab-radius, 0.8rem) !important;
}

/* ── Buttons: neutral glass, plain black shadows ─── */
[data-theme="liquid-glass-dark"] .btn {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    color: oklch(var(--bc)) !important;
    transition: background-color 0.18s, box-shadow 0.18s, transform 0.1s;
}
[data-theme="liquid-glass-dark"] .btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}
[data-theme="liquid-glass-dark"] .btn:active:not(:disabled) {
    transform: scale(0.97);
    background-color: rgba(255, 255, 255, 0.04) !important;
}
[data-theme="liquid-glass-dark"] .btn-primary {
    background-color: oklch(var(--p) / 0.82) !important;
    border-color: oklch(var(--p) / 0.55) !important;
    color: #fff !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
[data-theme="liquid-glass-dark"] .btn-primary:hover:not(:disabled) {
    background-color: oklch(var(--p) / 0.95) !important;
}
[data-theme="liquid-glass-dark"] .btn-success {
    background-color: oklch(var(--su) / 0.78) !important;
    border-color: oklch(var(--su) / 0.50) !important;
    color: #fff !important;
}
[data-theme="liquid-glass-dark"] .btn-error {
    background-color: oklch(var(--er) / 0.78) !important;
    border-color: oklch(var(--er) / 0.50) !important;
    color: #fff !important;
}
[data-theme="liquid-glass-dark"] .btn-ghost {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);    color: oklch(var(--bc)) !important;}
[data-theme="liquid-glass-dark"] .btn-ghost:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── bt-stat pills in liquid-glass-dark ──────────── */
[data-theme="liquid-glass-dark"] .bt-stat {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255,255,255,0.07);
}
[data-theme="liquid-glass-dark"] .bt-pause-btn,
[data-theme="liquid-glass-dark"] .bt-icon-btn {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.07);
}
[data-theme="liquid-glass-dark"] .bt-pause-btn:hover,
[data-theme="liquid-glass-dark"] .bt-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}
[data-theme="liquid-glass-dark"] .bt-account {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── Inputs & selects in liquid-glass-dark ───────── */
[data-theme="liquid-glass-dark"] .input,
[data-theme="liquid-glass-dark"] .select,
[data-theme="liquid-glass-dark"] .textarea,
[data-theme="liquid-glass-dark"] input[type="text"],
[data-theme="liquid-glass-dark"] input[type="number"],
[data-theme="liquid-glass-dark"] input[type="password"],
[data-theme="liquid-glass-dark"] input[type="search"],
[data-theme="liquid-glass-dark"] textarea,
[data-theme="liquid-glass-dark"] select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255,255,255,0.05);
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass-dark"] .input:focus,
[data-theme="liquid-glass-dark"] .select:focus,
[data-theme="liquid-glass-dark"] .textarea:focus,
[data-theme="liquid-glass-dark"] input:focus,
[data-theme="liquid-glass-dark"] textarea:focus,
[data-theme="liquid-glass-dark"] select:focus {
    background-color: rgba(255, 255, 255, 0.10) !important;
    border-color: oklch(var(--p) / 0.60) !important;
    outline: 2px solid oklch(var(--p) / 0.28) !important;
    outline-offset: 2px;
}

/* ── JSON editor panels in liquid-glass-dark ─────── */
[data-theme="liquid-glass-dark"] .hb-json-editor {
    background: transparent;
}
[data-theme="liquid-glass-dark"] .hb-json-editor [data-schematype="object"],
[data-theme="liquid-glass-dark"] .hb-json-editor [data-schematype="array"] {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 8px rgba(0,0,0,0.30);
}
[data-theme="liquid-glass-dark"] .hb-json-editor input[type="text"],
[data-theme="liquid-glass-dark"] .hb-json-editor input[type="number"],
[data-theme="liquid-glass-dark"] .hb-json-editor input[type="password"],
[data-theme="liquid-glass-dark"] .hb-json-editor textarea,
[data-theme="liquid-glass-dark"] .hb-json-editor select {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass-dark"] .hb-json-editor button,
[data-theme="liquid-glass-dark"] .hb-json-editor .btn {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.07);
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass-dark"] .hb-json-editor button:hover:not(:disabled),
[data-theme="liquid-glass-dark"] .hb-json-editor .btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.14) !important;
}
[data-theme="liquid-glass-dark"] .hb-hint-popover {
    background: rgba(17, 18, 21, 0.88) !important;
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.50);
}

/* ── Dropdown menus in liquid-glass-dark ─────────── */
[data-theme="liquid-glass-dark"] .dropdown-content {
    background-color: rgba(17, 18, 21, 0.80) !important;
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.50);
}

/* ── Alert / badge surfaces ──────────────────────── */
[data-theme="liquid-glass-dark"] .alert {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass-dark"] .alert * {
    color: oklch(var(--bc)) !important;
}
[data-theme="liquid-glass-dark"] .alert-info {
    background-color: oklch(var(--in) / 0.16) !important;
    border-color: oklch(var(--in) / 0.40) !important;
}
[data-theme="liquid-glass-dark"] .alert-success {
    background-color: oklch(var(--su) / 0.16) !important;
    border-color: oklch(var(--su) / 0.40) !important;
}
[data-theme="liquid-glass-dark"] .alert-warning {
    background-color: oklch(var(--wa) / 0.18) !important;
    border-color: oklch(var(--wa) / 0.45) !important;
}
[data-theme="liquid-glass-dark"] .alert-error {
    background-color: oklch(var(--er) / 0.16) !important;
    border-color: oklch(var(--er) / 0.40) !important;
}

/* ── Glass scrollbar ─────────────────────────────── */
[data-theme="liquid-glass-dark"] * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) rgba(0, 0, 0, 0.25);
}
[data-theme="liquid-glass-dark"] ::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
[data-theme="liquid-glass-dark"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}
[data-theme="liquid-glass-dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
[data-theme="liquid-glass-dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.36);
}

/* ── Frosted BotTable header ─────────────────────── */
[data-theme="liquid-glass-dark"] .bt-table thead th {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        inset 0  1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* ── bt-row hover glass shimmer ─────────────────── */
[data-theme="liquid-glass-dark"] .bt-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Table row separators & zebra striping ───────── */
[data-theme="liquid-glass-dark"] .bt-table tbody .bt-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}
[data-theme="liquid-glass-dark"] .bt-table tbody .bt-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.015) !important;
}
[data-theme="liquid-glass-dark"] .bt-table tbody .bt-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.035) !important;
}
[data-theme="liquid-glass-dark"] .bt-table tbody .bt-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-bottom-color: rgba(255, 255, 255, 0.14) !important;
}
/* Generic tables (table, .table) */
[data-theme="liquid-glass-dark"] table tbody tr,
[data-theme="liquid-glass-dark"] .table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}
[data-theme="liquid-glass-dark"] table tbody tr:nth-child(even),
[data-theme="liquid-glass-dark"] .table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015) !important;
}
[data-theme="liquid-glass-dark"] table tbody tr:nth-child(odd),
[data-theme="liquid-glass-dark"] .table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.035) !important;
}
[data-theme="liquid-glass-dark"] table tbody tr:hover,
[data-theme="liquid-glass-dark"] .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ── DaisyUI badge glass ─────────────────────────── */
[data-theme="liquid-glass-dark"] .badge {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: oklch(var(--bc)) !important;
}
/* Restore semantic coloring for bt-stat pills (higher specificity wins) */
[data-theme="liquid-glass-dark"] .bt-stat.badge-success {
    background: oklch(var(--su) / 0.18) !important;
    border-color: oklch(var(--su) / 0.40) !important;
    color: oklch(var(--su)) !important;
}
[data-theme="liquid-glass-dark"] .bt-stat.badge-error {
    background: oklch(var(--er) / 0.14) !important;
    border-color: oklch(var(--er) / 0.35) !important;
    color: oklch(var(--er)) !important;
}

/* ── DaisyUI menu item glass hover ──────────────── */
[data-theme="liquid-glass-dark"] .menu li > *:not(ul):not(.menu-title):hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── DaisyUI divider glass ───────────────────────── */
[data-theme="liquid-glass-dark"] .divider::before,
[data-theme="liquid-glass-dark"] .divider::after {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* ── Headings: same neutral text color as body, just heavier ── */
[data-theme="liquid-glass-dark"] h2 {
    color: oklch(var(--bc)) !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}
[data-theme="liquid-glass-dark"] h3 {
    color: oklch(var(--bc)) !important;
    font-weight: 600;
    letter-spacing: 0.01em;
}
[data-theme="liquid-glass-dark"] h4 {
    color: oklch(var(--bc)) !important;
    font-weight: 600;
}

/* ── Links: readable, restrained blue — not neon ─── */
[data-theme="liquid-glass-dark"] a,
[data-theme="liquid-glass-dark"] .link {
    color: oklch(72% 0.11 240) !important;
}
[data-theme="liquid-glass-dark"] a:hover,
[data-theme="liquid-glass-dark"] .link:hover {
    color: oklch(80% 0.10 240) !important;
}
[data-theme="liquid-glass-dark"] .link-primary {
    color: oklch(72% 0.11 240) !important;
}
[data-theme="liquid-glass-dark"] .link-primary:hover {
    color: oklch(80% 0.10 240) !important;
}

/* ── Fix text-success contrast for muted/light themes ── */

/* lofi: near-white bg → deep forest green */
[data-theme="lofi"] .text-success,
[data-theme="lofi"] .bt-num.text-success,
[data-theme="lofi"] .bt-stat.badge-success { color: oklch(36% 0.17 145) !important; }

/* lemonade: light yellow-green bg → deeper green */
[data-theme="lemonade"] .text-success,
[data-theme="lemonade"] .bt-num.text-success,
[data-theme="lemonade"] .bt-stat.badge-success { color: oklch(36% 0.17 145) !important; }

/* winter: light icy-blue bg → saturated green */
[data-theme="winter"] .text-success,
[data-theme="winter"] .bt-num.text-success,
[data-theme="winter"] .bt-stat.badge-success { color: oklch(38% 0.17 145) !important; }

/* nord: dark blue-grey bg → bright mint */
[data-theme="nord"] .text-success,
[data-theme="nord"] .bt-num.text-success,
[data-theme="nord"] .bt-stat.badge-success { color: oklch(70% 0.21 155) !important; }

/* acid: neon/dark bg → vivid lime */
[data-theme="acid"] .text-success,
[data-theme="acid"] .bt-num.text-success,
[data-theme="acid"] .bt-stat.badge-success { color: oklch(80% 0.27 128) !important; }

/* luna-eleven: light blue-green bg → deeper green */
[data-theme="luna-eleven"] .text-success,
[data-theme="luna-eleven"] .bt-num.text-success { color: oklch(40% 0.18 142) !important; }

/*
  Custom DaisyUI theme: "luna-eleven"
  Windows XP Luna color palette reimagined with Windows 11 Fluent Design:
  Mica/Acrylic translucent surfaces, rounded corners, XP iconic blue-green.
*/
[data-theme="luna-eleven"],
:root:has(input.theme-controller[value="luna-eleven"]:checked) {
    color-scheme: light;

    /* Primary: XP Luna title-bar blue */
    --p: 44% 0.23 263;
    --pc: 100% 0 0;

    /* Secondary: XP Start-button green */
    --s: 55% 0.20 142;
    --sc: 100% 0 0;

    /* Accent: XP taskbar highlight cyan */
    --a: 62% 0.17 205;
    --ac: 100% 0 0;

    /* Neutral: XP silver chrome */
    --n: 76% 0.018 255;
    --nc: 24% 0.06 258;

    /* Base: icy silver with faint XP-blue tint */
    --b1: 97% 0.007 242;
    --b2: 93% 0.013 242;
    --b3: 87% 0.020 248;
    --bc: 20% 0.07 260;

    /* Semantic */
    --in: 52% 0.22 260;
    --inc: 100% 0 0;
    --su: 55% 0.20 142;
    --suc: 100% 0 0;
    --wa: 68% 0.18 65;
    --wac: 14% 0.05 55;
    --er: 57% 0.24 27;
    --erc: 100% 0 0;

    /* Win11-style rounded corners */
    --rounded-box: 0.75rem;
    --rounded-btn: 0.4rem;
    --rounded-badge: 1.2rem;
    --animation-btn: 0.2s;
    --animation-input: 0.18s;
    --btn-focus-scale: 0.97;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.5rem;
}

/* ── Bliss reimagined: vivid sky + lush hills ──────── */
[data-theme="luna-eleven"],
[data-theme="luna-eleven"] body {
    background: linear-gradient(
        170deg,
        oklch(58% 0.20 235) 0%,
        oklch(68% 0.17 225) 28%,
        oklch(75% 0.14 175) 52%,
        oklch(58% 0.24 142) 72%,
        oklch(48% 0.22 142) 100%
    ) !important;
    background-attachment: fixed !important;
}

/* ── Mica surface: cards ─────────────────────────── */
/* Win11 Mica: mostly opaque, very subtle wallpaper tint, low blur */
[data-theme="luna-eleven"] .card {
    position: relative;
    background-color: transparent !important;
    /* XP chrome: strong top highlight, subtle blue border */
    border: 1px solid rgba(160, 200, 240, 0.80) !important;
    border-top-color: rgba(220, 240, 255, 0.95) !important;
    box-shadow:
        0 4px 18px rgba(0, 40, 140, 0.18),
        0 1px  4px rgba(0, 40, 140, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    overflow: visible !important;
}
[data-theme="luna-eleven"] .card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    /* Mica: high opacity silver-white, very little blur — NOT glass */
    background: linear-gradient(
        180deg,
        rgba(230, 242, 255, 0.94) 0%,
        rgba(210, 232, 250, 0.88) 100%
    );
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    z-index: -1;
    pointer-events: none;
}

/* XP Luna accent stripe on card titles — the signature gradient bar */
[data-theme="luna-eleven"] .card-title {
    padding-bottom: 7px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(
        90deg,
        oklch(44% 0.23 263) 0%,
        oklch(60% 0.20 240) 55%,
        transparent 100%
    ) 1;
}

/* ── Modal: XP dialog with Win11 Acrylic touch ─────── */
/* Opaque Luna-silver body + XP-blue title bar stripe on top */
[data-theme="luna-eleven"] .modal-box {
    background: linear-gradient(
        180deg,
        rgba(228, 242, 255, 0.97) 0%,
        rgba(210, 232, 252, 0.95) 100%
    ) !important;
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid rgba(160, 200, 240, 0.80);
    /* XP Luna signature: blue gradient title bar as top border */
    border-top: 3px solid transparent;
    border-image: linear-gradient(
        90deg,
        oklch(56% 0.22 258) 0%,
        oklch(42% 0.23 263) 50%,
        oklch(56% 0.22 258) 100%
    ) 1;
    box-shadow:
        0 20px 60px rgba(0, 40, 140, 0.22),
        0  4px 16px rgba(0, 40, 140, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(150, 200, 255, 0.22);
}

/* ── Dropdown menus ──────────────────────────────── */
[data-theme="luna-eleven"] .dropdown-content {
    background-color: rgba(228, 242, 255, 0.97) !important;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(160, 200, 240, 0.80) !important;
    box-shadow:
        0 8px 28px rgba(0, 40, 140, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="luna-eleven"] .dropdown-content.bg-base-300 {
    background-color: rgba(215, 236, 252, 0.97) !important;
}

/* ── Boxed tabs bar ──────────────────────────────── */
[data-theme="luna-eleven"] .tabs.tabs-boxed {
    background: linear-gradient(180deg, rgba(220, 238, 255, 0.97) 0%, rgba(200, 225, 250, 0.96) 100%) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(150, 195, 238, 0.80);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 1px 4px rgba(0,40,140,0.10);
}
/* Active tab: XP blue pill */
[data-theme="luna-eleven"] .tabs.tabs-boxed .tab-active,
[data-theme="luna-eleven"] .tabs.tabs-boxed [aria-selected="true"] {
    background: linear-gradient(
        180deg,
        oklch(54% 0.22 260) 0%,
        oklch(42% 0.23 263) 100%
    ) !important;
    color: #fff !important;
    border-radius: var(--tab-radius, 0.5rem) !important;
    box-shadow:
        0 2px 10px oklch(44% 0.23 263 / 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
    border: 1px solid oklch(40% 0.22 263 / 0.55) !important;
}
[data-theme="luna-eleven"] .tabs.tabs-boxed .tab:not(.tab-active) {
    color: oklch(30% 0.09 260) !important;
    background-color: transparent !important;
    border: none !important;
}
[data-theme="luna-eleven"] .tabs.tabs-boxed .tab:not(.tab-active):hover {
    background-color: rgba(170, 210, 255, 0.35) !important;
    border-radius: var(--tab-radius, 0.5rem) !important;
}

/* ── Buttons: XP Luna 3D-raised style ───────────── */
[data-theme="luna-eleven"] .btn {
    /* XP silver chrome gradient — raised 3D pill */
    background: linear-gradient(
        180deg,
        rgba(245, 251, 255, 0.99) 0%,
        rgba(210, 232, 252, 0.97) 55%,
        rgba(185, 218, 248, 0.97) 100%
    ) !important;
    border: 1px solid rgba(130, 180, 230, 0.85) !important;
    border-top-color: rgba(220, 240, 255, 0.99) !important;
    box-shadow:
        0 2px 5px rgba(0, 40, 140, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.99),
        inset 0 -1px 0 rgba(140, 190, 235, 0.45);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: oklch(18% 0.08 260) !important;
    transition: background 0.12s, box-shadow 0.12s, transform 0.08s;
}
[data-theme="luna-eleven"] .btn:hover:not(:disabled) {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1.0) 0%,
        rgba(220, 240, 255, 0.99) 55%,
        rgba(195, 225, 252, 0.99) 100%
    ) !important;
    box-shadow:
        0 3px 8px rgba(0, 40, 140, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 1.0),
        inset 0 -1px 0 rgba(140, 190, 235, 0.50);
}
[data-theme="luna-eleven"] .btn:active:not(:disabled) {
    transform: scale(0.97);
    background: linear-gradient(
        180deg,
        rgba(195, 225, 252, 0.99) 0%,
        rgba(220, 240, 255, 0.99) 100%
    ) !important;
    box-shadow:
        0 1px 2px rgba(0, 40, 140, 0.12),
        inset 0 2px 4px rgba(0, 40, 140, 0.10);
}
/* XP blue primary — Luna title-bar gradient */
[data-theme="luna-eleven"] .btn-primary {
    background: linear-gradient(
        180deg,
        oklch(56% 0.22 258) 0%,
        oklch(40% 0.23 263) 100%
    ) !important;
    border-color: oklch(38% 0.22 265) !important;
    color: #fff !important;
    box-shadow:
        0 2px 10px oklch(44% 0.23 263 / 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
[data-theme="luna-eleven"] .btn-primary:hover:not(:disabled) {
    background: linear-gradient(
        180deg,
        oklch(60% 0.22 258) 0%,
        oklch(46% 0.23 263) 100%
    ) !important;
}
/* XP Start-button green */
[data-theme="luna-eleven"] .btn-success {
    background: linear-gradient(
        180deg,
        oklch(62% 0.20 142) 0%,
        oklch(46% 0.20 142) 100%
    ) !important;
    border-color: oklch(42% 0.18 142) !important;
    color: #fff !important;
    box-shadow:
        0 2px 8px oklch(55% 0.20 142 / 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
[data-theme="luna-eleven"] .btn-error {
    background: linear-gradient(
        180deg,
        oklch(64% 0.24 27) 0%,
        oklch(50% 0.24 27) 100%
    ) !important;
    border-color: oklch(46% 0.22 27) !important;
    color: #fff !important;
}
[data-theme="luna-eleven"] .btn-ghost {
    background-color: rgba(195, 225, 255, 0.28) !important;
    border-color: rgba(180, 215, 255, 0.45) !important;
    color: oklch(28% 0.09 260) !important;
}
[data-theme="luna-eleven"] .btn-ghost:hover:not(:disabled) {
    background-color: rgba(195, 225, 255, 0.55) !important;
}

/* ── Inputs & selects ────────────────────────────── */
[data-theme="luna-eleven"] .input,
[data-theme="luna-eleven"] .select,
[data-theme="luna-eleven"] .textarea,
[data-theme="luna-eleven"] input[type="text"],
[data-theme="luna-eleven"] input[type="number"],
[data-theme="luna-eleven"] input[type="password"],
[data-theme="luna-eleven"] input[type="search"],
[data-theme="luna-eleven"] textarea,
[data-theme="luna-eleven"] select {
    /* XP sunken field — white bg, inset shadow */
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(130, 180, 230, 0.90) !important;
    box-shadow:
        inset 0 1px 3px rgba(0, 40, 140, 0.12),
        inset 1px 0 3px rgba(0, 40, 140, 0.06);
    color: oklch(var(--bc)) !important;
}
[data-theme="luna-eleven"] .input:focus,
[data-theme="luna-eleven"] .select:focus,
[data-theme="luna-eleven"] .textarea:focus,
[data-theme="luna-eleven"] input:focus,
[data-theme="luna-eleven"] textarea:focus,
[data-theme="luna-eleven"] select:focus {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: oklch(44% 0.23 263 / 0.65) !important;
    outline: 2px solid oklch(44% 0.23 263 / 0.22) !important;
    outline-offset: 2px;
}

/* ── bt-stat pills ───────────────────────────────── */
[data-theme="luna-eleven"] .bt-stat {
    background: linear-gradient(180deg, rgba(245, 251, 255, 0.97) 0%, rgba(215, 236, 252, 0.95) 100%);
    border-color: rgba(140, 185, 230, 0.80);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.99), 0 1px 3px rgba(0,40,140,0.10);
}
[data-theme="luna-eleven"] .bt-pause-btn,
[data-theme="luna-eleven"] .bt-icon-btn {
    background: linear-gradient(180deg, rgba(245, 251, 255, 0.97) 0%, rgba(215, 236, 252, 0.95) 100%) !important;
    border-color: rgba(140, 185, 230, 0.80) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.99), 0 1px 3px rgba(0,40,140,0.10);
}
[data-theme="luna-eleven"] .bt-pause-btn:hover,
[data-theme="luna-eleven"] .bt-icon-btn:hover {
    background: linear-gradient(180deg, #fff 0%, rgba(205, 230, 255, 0.99) 100%) !important;
}

/* ── bt-account row ─────────────────────────────── */
[data-theme="luna-eleven"] .bt-account {
    background: linear-gradient(180deg, rgba(228, 243, 255, 0.97) 0%, rgba(208, 230, 250, 0.94) 100%) !important;
    border-color: rgba(150, 195, 238, 0.85) !important;
    backdrop-filter: blur(6px) saturate(115%);
    -webkit-backdrop-filter: blur(6px) saturate(115%);
    box-shadow: 0 2px 10px rgba(0, 40, 140, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

/* ── BotTable header: XP-blue tinted frosted strip ── */
[data-theme="luna-eleven"] .bt-table thead th {
    background: linear-gradient(
        180deg,
        oklch(44% 0.23 263 / 0.18) 0%,
        oklch(44% 0.23 263 / 0.08) 100%
    ) !important;
    border-bottom: 1px solid oklch(44% 0.23 263 / 0.28) !important;
    color: oklch(26% 0.10 260) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ── bt-row hover ────────────────────────────────── */
[data-theme="luna-eleven"] .bt-row:hover {
    background: oklch(44% 0.23 263 / 0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

/* ── Alert / badge ───────────────────────────────── */
[data-theme="luna-eleven"] .alert {
    background-color: rgba(232, 244, 255, 0.97) !important;
    border: 1px solid rgba(150, 195, 238, 0.85) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 1px 4px rgba(0,40,140,0.10);
    color: oklch(20% 0.07 260) !important;
}
[data-theme="luna-eleven"] .alert * { color: oklch(20% 0.07 260) !important; }

/* ── Menu item hover ─────────────────────────────── */
[data-theme="luna-eleven"] .menu li > *:not(ul):not(.menu-title):hover {
    background-color: oklch(44% 0.23 263 / 0.13) !important;
    color: oklch(20% 0.10 260) !important;
}

/* ── Dividers: XP-blue tint ─────────────────────── */
[data-theme="luna-eleven"] .divider::before,
[data-theme="luna-eleven"] .divider::after {
    background-color: oklch(44% 0.23 263 / 0.22) !important;
}

/* ── Scrollbar: XP blue gradient thumb ──────────── */
[data-theme="luna-eleven"] * {
    scrollbar-width: thin;
    scrollbar-color: oklch(44% 0.23 263 / 0.45) oklch(85% 0.04 242 / 0.28);
}
[data-theme="luna-eleven"] ::-webkit-scrollbar { width: 7px; height: 7px; }
[data-theme="luna-eleven"] ::-webkit-scrollbar-track {
    background: oklch(85% 0.04 242 / 0.22);
    border-radius: 6px;
}
[data-theme="luna-eleven"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        oklch(56% 0.22 258 / 0.65) 0%,
        oklch(40% 0.23 263 / 0.75) 100%
    );
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
[data-theme="luna-eleven"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        oklch(60% 0.22 258 / 0.85) 0%,
        oklch(44% 0.23 263 / 0.90) 100%
    );
}

/* ── JSON editor panels ──────────────────────────── */
[data-theme="luna-eleven"] .hb-json-editor [data-schematype="object"],
[data-theme="luna-eleven"] .hb-json-editor [data-schematype="array"] {
    background-color: rgba(225, 241, 255, 0.58) !important;
    border-color: rgba(180, 215, 255, 0.55) !important;
}

/* ── end luna-eleven ─────────────────────────────── */

/*
  Custom DaisyUI theme: "win95-modern"
  Windows 95 classic silver-gray palette with modern design nuances:
  iconic raised 3D surfaces, navy title accents, teal selection —
  softened by subtle transitions, modest border-radius, and clean typography.
*/
[data-theme="win95-modern"],
:root:has(input.theme-controller[value="win95-modern"]:checked) {
    color-scheme: light;

    /* Primary: W95 title-bar navy */
    --p: 28% 0.18 262;
    --pc: 100% 0 0;

    /* Secondary: W95 teal selection */
    --s: 42% 0.14 195;
    --sc: 100% 0 0;

    /* Accent: W95 highlight blue */
    --a: 50% 0.19 245;
    --ac: 100% 0 0;

    /* Neutral: classic silver */
    --n: 72% 0.005 240;
    --nc: 14% 0.01 240;

    /* Base: W95 system gray (#C0C0C0 ≈ oklch 76%) */
    --b1: 76% 0.004 240;
    --b2: 71% 0.005 240;
    --b3: 64% 0.006 240;
    --bc: 10% 0.005 240;

    /* Semantic */
    --in: 48% 0.19 245;
    --inc: 100% 0 0;
    --su: 44% 0.17 142;
    --suc: 100% 0 0;
    --wa: 62% 0.18 65;
    --wac: 14% 0.05 55;
    --er: 52% 0.24 27;
    --erc: 100% 0 0;

    /* W95-ish corners, slightly softened */
    --rounded-box: 0.25rem;
    --rounded-btn: 0.18rem;
    --rounded-badge: 0.25rem;
    --animation-btn: 0.12s;
    --animation-input: 0.12s;
    --btn-focus-scale: 0.98;
    --border-btn: 2px;
    --tab-border: 1px;
    --tab-radius: 0.18rem;
}

/* ── Desktop background: W95 teal ────────────────── */
[data-theme="win95-modern"],
[data-theme="win95-modern"] body {
    background: radial-gradient(
        ellipse at 40% 55%,
        oklch(42% 0.13 195) 0%,
        oklch(36% 0.14 195) 50%,
        oklch(30% 0.12 200) 100%
    ) !important;
    background-attachment: fixed !important;
}

/* ── Cards: raised W95 window ────────────────────── */
[data-theme="win95-modern"] .card {
    background-color: oklch(76% 0.004 240) !important;
    border: none !important;
    border-radius: 0.25rem !important;
    box-shadow:
         1px  1px 0 0 #fff,
        -1px -1px 0 0 oklch(40% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240),
        0 4px 12px rgba(0, 0, 0, 0.22);
    overflow: visible !important;
}

/* W95 navy gradient title bar */
[data-theme="win95-modern"] .card-title {
    background: linear-gradient(
        90deg,
        oklch(28% 0.18 262) 0%,
        oklch(40% 0.16 248) 100%
    );
    color: #fff !important;
    margin: -1.25rem -1.25rem 0.75rem -1.25rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.20rem 0.20rem 0 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* ── Modal: W95 dialog ───────────────────────────── */
[data-theme="win95-modern"] .modal-box {
    background-color: oklch(76% 0.004 240) !important;
    border: none !important;
    border-radius: 0.25rem !important;
    box-shadow:
         1px  1px 0 0 #fff,
        -1px -1px 0 0 oklch(40% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240),
        0 8px 32px rgba(0, 0, 0, 0.36);
    /* Navy title bar as top border */
    border-top: 26px solid oklch(28% 0.18 262) !important;
    padding-top: 1.25rem;
}

/* ── Buttons: W95 raised 3D ──────────────────────── */
[data-theme="win95-modern"] .btn {
    background-color: oklch(76% 0.004 240) !important;
    border: none !important;
    border-radius: 0.18rem !important;
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(42% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(58% 0.005 240);
    color: oklch(10% 0.005 240) !important;
    font-weight: 700;
    transition: box-shadow 0.10s, transform 0.08s;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
[data-theme="win95-modern"] .btn:hover:not(:disabled) {
    background-color: oklch(79% 0.004 240) !important;
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(38% 0.005 240),
        inset  1px  1px 0 oklch(90% 0.002 240),
        inset -1px -1px 0 oklch(56% 0.005 240),
        0 2px 6px rgba(0, 0, 0, 0.14);
}
/* Pressed: invert 3D border */
[data-theme="win95-modern"] .btn:active:not(:disabled) {
    transform: none;
    box-shadow:
        inset  1px  1px 0 oklch(42% 0.005 240),
        inset -1px -1px 0 oklch(88% 0.003 240),
        -1px -1px 0 #fff,
         1px  1px 0 oklch(42% 0.005 240);
}
/* Navy primary */
[data-theme="win95-modern"] .btn-primary {
    background: linear-gradient(
        180deg, oklch(36% 0.18 262) 0%, oklch(26% 0.18 264) 100%
    ) !important;
    border: none !important;
    color: #fff !important;
    box-shadow:
         1px  1px 0 oklch(55% 0.12 255),
        -1px -1px 0 oklch(16% 0.12 264),
        inset  1px  1px 0 oklch(48% 0.16 258),
        inset -1px -1px 0 oklch(20% 0.16 264);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
[data-theme="win95-modern"] .btn-primary:hover:not(:disabled) {
    background: linear-gradient(
        180deg, oklch(40% 0.18 262) 0%, oklch(30% 0.18 264) 100%
    ) !important;
}
/* Teal success */
[data-theme="win95-modern"] .btn-success {
    background: linear-gradient(
        180deg, oklch(50% 0.15 195) 0%, oklch(38% 0.14 195) 100%
    ) !important;
    border: none !important;
    color: #fff !important;
    box-shadow:
         1px  1px 0 oklch(60% 0.10 195),
        -1px -1px 0 oklch(24% 0.12 195);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
[data-theme="win95-modern"] .btn-error {
    background: linear-gradient(
        180deg, oklch(58% 0.24 27) 0%, oklch(44% 0.24 27) 100%
    ) !important;
    border: none !important;
    color: #fff !important;
    box-shadow:
         1px  1px 0 oklch(68% 0.18 27),
        -1px -1px 0 oklch(28% 0.20 27);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
[data-theme="win95-modern"] .btn-ghost {
    background-color: transparent !important;
    box-shadow: none !important;
    border: 1px dashed oklch(55% 0.005 240) !important;
    color: oklch(14% 0.01 240) !important;
}
[data-theme="win95-modern"] .btn-ghost:hover:not(:disabled) {
    background-color: oklch(70% 0.005 240) !important;
    box-shadow: none !important;
}

/* ── Inputs: W95 sunken field ────────────────────── */
[data-theme="win95-modern"] .input,
[data-theme="win95-modern"] .select,
[data-theme="win95-modern"] .textarea,
[data-theme="win95-modern"] input[type="text"],
[data-theme="win95-modern"] input[type="number"],
[data-theme="win95-modern"] input[type="password"],
[data-theme="win95-modern"] input[type="search"],
[data-theme="win95-modern"] textarea,
[data-theme="win95-modern"] select {
    background-color: #fff !important;
    border: none !important;
    border-radius: 0.10rem !important;
    box-shadow:
        inset  1px  1px 0 oklch(42% 0.005 240),
        inset -1px -1px 0 oklch(88% 0.003 240),
        inset  2px  2px 0 oklch(55% 0.005 240),
        inset -2px -2px 0 #fff;
    color: oklch(10% 0.005 240) !important;
}
[data-theme="win95-modern"] .input:focus,
[data-theme="win95-modern"] .select:focus,
[data-theme="win95-modern"] .textarea:focus,
[data-theme="win95-modern"] input:focus,
[data-theme="win95-modern"] textarea:focus,
[data-theme="win95-modern"] select:focus {
    outline: 2px solid oklch(50% 0.19 245 / 0.55) !important;
    outline-offset: 1px;
}

/* ── Boxed tabs ──────────────────────────────────── */
[data-theme="win95-modern"] .tabs.tabs-boxed {
    background-color: oklch(72% 0.005 240) !important;
    border: none;
    border-radius: 0.25rem !important;
    box-shadow:
        inset  1px  1px 0 oklch(44% 0.005 240),
        inset -1px -1px 0 oklch(88% 0.003 240);
}
[data-theme="win95-modern"] .tabs.tabs-boxed .tab-active,
[data-theme="win95-modern"] .tabs.tabs-boxed [aria-selected="true"] {
    background-color: oklch(76% 0.004 240) !important;
    color: oklch(10% 0.005 240) !important;
    border-radius: 0.15rem !important;
    font-weight: 700;
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(44% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(60% 0.005 240);
    border: none !important;
}
[data-theme="win95-modern"] .tabs.tabs-boxed .tab:not(.tab-active) {
    color: oklch(18% 0.005 240) !important;
    background-color: transparent !important;
    border: none !important;
}
[data-theme="win95-modern"] .tabs.tabs-boxed .tab:not(.tab-active):hover {
    background-color: oklch(73% 0.004 240) !important;
    border-radius: 0.15rem !important;
}

/* ── Dropdown menus ──────────────────────────────── */
[data-theme="win95-modern"] .dropdown-content {
    background-color: oklch(76% 0.004 240) !important;
    border: none !important;
    border-radius: 0.18rem !important;
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(40% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240),
        0 4px 16px rgba(0, 0, 0, 0.28);
}
[data-theme="win95-modern"] .dropdown-content.bg-base-300 {
    background-color: oklch(74% 0.005 240) !important;
}

/* ── bt-stat pills ───────────────────────────────── */
[data-theme="win95-modern"] .bt-stat {
    background: oklch(76% 0.004 240);
    border-color: oklch(50% 0.005 240);
    box-shadow:
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240);
}
[data-theme="win95-modern"] .bt-pause-btn,
[data-theme="win95-modern"] .bt-icon-btn {
    background: oklch(76% 0.004 240) !important;
    border-color: oklch(50% 0.005 240) !important;
    border-radius: 0.18rem !important;
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(42% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(58% 0.005 240);
}
[data-theme="win95-modern"] .bt-pause-btn:hover,
[data-theme="win95-modern"] .bt-icon-btn:hover {
    background: oklch(79% 0.004 240) !important;
}

/* ── bt-account header ───────────────────────────── */
[data-theme="win95-modern"] .bt-account {
    background: oklch(74% 0.005 240) !important;
    border-color: oklch(50% 0.005 240) !important;
    box-shadow:
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240),
        0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ── BotTable header: navy title-bar strip ───────── */
[data-theme="win95-modern"] .bt-table thead th {
    background: linear-gradient(
        90deg,
        oklch(28% 0.18 262) 0%,
        oklch(38% 0.16 255) 100%
    ) !important;
    color: #fff !important;
    border-bottom: 2px solid oklch(20% 0.14 264) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    opacity: 1 !important;
}

/* ── bt-row hover: W95 selection highlight ───────── */
[data-theme="win95-modern"] .bt-row:hover {
    background: oklch(42% 0.14 195 / 0.18) !important;
    outline: 1px solid oklch(42% 0.14 195 / 0.40);
    outline-offset: -1px;
    box-shadow: none;
}

/* ── Alert ───────────────────────────────────────── */
[data-theme="win95-modern"] .alert {
    background-color: oklch(76% 0.004 240) !important;
    border: none !important;
    border-radius: 0.20rem !important;
    box-shadow:
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240),
        0 2px 6px rgba(0, 0, 0, 0.14);
    color: oklch(10% 0.005 240) !important;
}
[data-theme="win95-modern"] .alert * { color: oklch(10% 0.005 240) !important; }

/* ── Menu item hover: W95 selection block ────────── */
[data-theme="win95-modern"] .menu li > *:not(ul):not(.menu-title):hover {
    background: linear-gradient(
        90deg,
        oklch(28% 0.18 262) 0%,
        oklch(38% 0.16 255) 100%
    ) !important;
    color: #fff !important;
}

/* ── Dividers ────────────────────────────────────── */
[data-theme="win95-modern"] .divider::before {
    background-color: oklch(48% 0.005 240) !important;
}
[data-theme="win95-modern"] .divider::after {
    background-color: oklch(88% 0.003 240) !important;
}

/* ── Scrollbar: W95 style ────────────────────────── */
[data-theme="win95-modern"] * {
    scrollbar-width: thin;
    scrollbar-color: oklch(68% 0.005 240) oklch(72% 0.005 240);
}
[data-theme="win95-modern"] ::-webkit-scrollbar { width: 14px; height: 14px; }
[data-theme="win95-modern"] ::-webkit-scrollbar-track {
    background: oklch(72% 0.005 240);
    background-image: repeating-linear-gradient(
        -45deg,
        oklch(68% 0.005 240) 0px, oklch(68% 0.005 240) 1px,
        transparent 1px, transparent 4px
    );
}
[data-theme="win95-modern"] ::-webkit-scrollbar-thumb {
    background: oklch(72% 0.005 240);
    border: none;
    box-shadow:
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(44% 0.005 240);
}
[data-theme="win95-modern"] ::-webkit-scrollbar-thumb:hover {
    background: oklch(68% 0.005 240);
}
[data-theme="win95-modern"] ::-webkit-scrollbar-button {
    background: oklch(74% 0.005 240);
    box-shadow:
         1px  1px 0 #fff,
        -1px -1px 0 oklch(44% 0.005 240),
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(56% 0.005 240);
    display: block;
}

/* ── JSON editor panels ──────────────────────────── */
[data-theme="win95-modern"] .hb-json-editor [data-schematype="object"],
[data-theme="win95-modern"] .hb-json-editor [data-schematype="array"] {
    background-color: oklch(74% 0.005 240) !important;
    border-color: oklch(50% 0.005 240) !important;
    box-shadow:
        inset  1px  1px 0 oklch(88% 0.003 240),
        inset -1px -1px 0 oklch(55% 0.005 240);
}

/* ── text-success fix ────────────────────────────── */
[data-theme="win95-modern"] .text-success,
[data-theme="win95-modern"] .bt-num.text-success { color: oklch(34% 0.17 142) !important; }

/* ── end win95-modern ────────────────────────────── */

/*
  Custom DaisyUI theme: "winamp-classic" (v2 — closer to the real deal)
  Modeled on the actual default WinAMP 2.x skin:
  - brushed gunmetal chrome (not blue-purple — a desaturated steel gray)
  - near-black LCD window with bright phosphor-green digits and a soft CRT glow
  - hard, chunky pixel bevels (no soft blur, no rounded corners)
  - diagonal brushed-metal stripe texture on title bars & headers, just like
    the real player's window chrome
  - amber/orange used sparingly for warnings, mirroring the EQ's peak LEDs
*/
[data-theme="winamp-classic"],
:root:has(input.theme-controller[value="winamp-classic"]:checked) {
    color-scheme: dark;

    /* Primary: steel chrome, read via buttons/tabs, not a saturated blue */
    --p: 58% 0.02 240;
    --pc: 8% 0.01 240;

    /* Secondary: gunmetal steel-blue, the body-panel color */
    --s: 46% 0.03 250;
    --sc: 95% 0.01 145;

    /* Accent: the LCD phosphor green — the signature WinAMP color */
    --a: 82% 0.26 142;
    --ac: 6% 0.02 142;

    --n: 30% 0.02 250;
    --nc: 92% 0.01 240;

    /* Base: dark brushed gunmetal, desaturated (real WinAMP is gray, not navy) */
    --b1: 24% 0.012 250;
    --b2: 20% 0.012 250;
    --b3: 15% 0.012 250;
    --bc: 88% 0.01 145;

    --in: 60% 0.10 235;
    --inc: 100% 0 0;
    /* Success = LCD green, the real accent color of the whole skin */
    --su: 82% 0.26 142;
    --suc: 8% 0.03 142;
    /* Warning = EQ peak amber */
    --wa: 74% 0.19 62;
    --wac: 14% 0.04 60;
    --er: 62% 0.22 27;
    --erc: 100% 0 0;

    /* Chunky, square, pixel-era shapes — no soft rounding */
    --rounded-box: 0.15rem;
    --rounded-btn: 0.1rem;
    --rounded-badge: 0.15rem;
    --animation-btn: 0.05s;
    --animation-input: 0.05s;
    --btn-focus-scale: 0.99;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.1rem;
}

/* Desktop backdrop: dark brushed steel, not a colorful gradient */
[data-theme="winamp-classic"],
[data-theme="winamp-classic"] body {
    background:
        repeating-linear-gradient(
            127deg,
            rgba(255, 255, 255, 0.035) 0px,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px,
            transparent 3px
        ),
        radial-gradient(circle at 20% 15%, oklch(30% 0.015 250) 0%, transparent 45%),
        linear-gradient(180deg, oklch(21% 0.012 250) 0%, oklch(13% 0.010 250) 100%) !important;
    background-attachment: fixed !important;
    font-family: Tahoma, Verdana, Segoe UI, sans-serif;
}

/* Reusable brushed-metal diagonal stripe texture, used on title bars */
[data-theme="winamp-classic"] .card,
[data-theme="winamp-classic"] .modal-box,
[data-theme="winamp-classic"] .dropdown-content,
[data-theme="winamp-classic"] .tabs.tabs-boxed {
    background:
        repeating-linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, rgba(94, 100, 110, 0.95) 0%, rgba(58, 62, 70, 0.97) 100%) !important;
    border: 1px solid rgba(20, 22, 26, 0.9) !important;
    border-radius: var(--rounded-box) !important;
    /* Hard beveled edge: light top-left, dark bottom-right, no blur */
    box-shadow:
        inset 1px 1px 0 rgba(220, 224, 230, 0.55),
        inset -1px -1px 0 rgba(8, 9, 11, 0.85),
        0 4px 14px rgba(0, 0, 0, 0.5);
}

/* Card title styled like the WinAMP window titlebar: darker stripe strip */
[data-theme="winamp-classic"] .card-title {
    background:
        repeating-linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, #3a4048 0%, #23272c 100%);
    color: #cdd3da !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin: -1.25rem -1.25rem 0.75rem -1.25rem;
    padding: 0.35rem 0.7rem;
    border-bottom: 1px solid rgba(10, 11, 13, 0.9);
}

/* Buttons: hard beveled steel pill, no gradients-as-glass, just metal */
[data-theme="winamp-classic"] .btn {
    background: linear-gradient(180deg, #a9adb3 0%, #6c7076 55%, #565a60 100%) !important;
    border: 1px solid #202226 !important;
    border-radius: var(--rounded-btn) !important;
    color: #14171a !important;
    font-weight: 700;
    box-shadow:
        inset 1px 1px 0 rgba(240, 242, 244, 0.75),
        inset -1px -1px 0 rgba(20, 22, 24, 0.7),
        0 1px 0 rgba(0, 0, 0, 0.4);
    transition: none;
}
[data-theme="winamp-classic"] .btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #b7bbc0 0%, #787c82 55%, #606468 100%) !important;
}
[data-theme="winamp-classic"] .btn:active:not(:disabled) {
    transform: none;
    box-shadow:
        inset -1px -1px 0 rgba(240, 242, 244, 0.5),
        inset 1px 1px 0 rgba(15, 16, 18, 0.9);
}
[data-theme="winamp-classic"] .btn-primary {
    background: linear-gradient(180deg, #7c8288 0%, #4a4e53 100%) !important;
    color: #eef1f4 !important;
}
/* Success button glows like the LCD green power light */
[data-theme="winamp-classic"] .btn-success {
    background: linear-gradient(180deg, #6fe86a 0%, #2f9e2c 100%) !important;
    border-color: #143012 !important;
    color: #04220a !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="winamp-classic"] .btn-error {
    background: linear-gradient(180deg, oklch(66% 0.22 27) 0%, oklch(48% 0.20 27) 100%) !important;
    border-color: #2a0d08 !important;
    color: #fff !important;
}
[data-theme="winamp-classic"] .btn-ghost {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
    color: #d3d8dd !important;
}

/* Inputs: the LCD readout — near-black glass with glowing green text */
[data-theme="winamp-classic"] .input,
[data-theme="winamp-classic"] .select,
[data-theme="winamp-classic"] .textarea,
[data-theme="winamp-classic"] input[type="text"],
[data-theme="winamp-classic"] input[type="number"],
[data-theme="winamp-classic"] input[type="password"],
[data-theme="winamp-classic"] input[type="search"],
[data-theme="winamp-classic"] textarea,
[data-theme="winamp-classic"] select {
    background: linear-gradient(180deg, #0a1208 0%, #060b05 100%) !important;
    border: 1px solid #1c1f22 !important;
    border-radius: 0.05rem !important;
    color: #58ff5e !important;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    text-shadow: 0 0 4px rgba(88, 255, 94, 0.65);
    box-shadow:
        inset 1px 1px 2px rgba(0, 0, 0, 0.9),
        inset -1px -1px 0 rgba(90, 100, 90, 0.25);
}
[data-theme="winamp-classic"] .input:focus,
[data-theme="winamp-classic"] .select:focus,
[data-theme="winamp-classic"] .textarea:focus,
[data-theme="winamp-classic"] input:focus,
[data-theme="winamp-classic"] textarea:focus,
[data-theme="winamp-classic"] select:focus {
    outline: 1px solid rgba(88, 255, 94, 0.55) !important;
    outline-offset: 1px;
}

/* Tabs: LCD-lit active tab, dim steel inactive tab */
[data-theme="winamp-classic"] .tabs.tabs-boxed {
    border-radius: var(--tab-radius) !important;
}
[data-theme="winamp-classic"] .tabs.tabs-boxed .tab-active,
[data-theme="winamp-classic"] .tabs.tabs-boxed [aria-selected="true"] {
    background: linear-gradient(180deg, #b8bcc1 0%, #7d8288 100%) !important;
    color: #14171a !important;
    border-radius: var(--tab-radius) !important;
    box-shadow: inset 1px 1px 0 rgba(245, 247, 249, 0.85), inset -1px -1px 0 rgba(20, 22, 24, 0.8);
}
[data-theme="winamp-classic"] .tabs.tabs-boxed .tab:not(.tab-active) {
    color: #9aa0a6 !important;
}

/* Row hover: dim LCD-green wash, like the visualizer glow reflecting on the list */
[data-theme="winamp-classic"] .menu li > *:not(ul):not(.menu-title):hover,
[data-theme="winamp-classic"] .bt-row:hover,
[data-theme="winamp-classic"] table tbody tr:hover,
[data-theme="winamp-classic"] .table tbody tr:hover {
    background: linear-gradient(90deg, rgba(88, 255, 94, 0.14) 0%, rgba(88, 255, 94, 0.06) 100%) !important;
    color: #eef4ee !important;
}

/* BotTable header: the striped chrome titlebar strip */
[data-theme="winamp-classic"] .bt-table thead th {
    background:
        repeating-linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, #5c6167 0%, #34383d 100%) !important;
    color: #d7dce1 !important;
    opacity: 1;
    border-bottom: 1px solid #17191c !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Numeric readouts default to LCD green — the WinAMP counter look */
[data-theme="winamp-classic"] .bt-num {
    color: #58ff5e;
    text-shadow: 0 0 3px rgba(88, 255, 94, 0.5);
}

[data-theme="winamp-classic"] .bt-stat,
[data-theme="winamp-classic"] .bt-pause-btn,
[data-theme="winamp-classic"] .bt-icon-btn,
[data-theme="winamp-classic"] .badge {
    background: linear-gradient(180deg, #9ba0a6 0%, #6a6e74 100%) !important;
    border-color: #202226 !important;
    border-radius: 0.1rem !important;
    color: #14171a !important;
    box-shadow: inset 1px 1px 0 rgba(240, 242, 244, 0.7), inset -1px -1px 0 rgba(20, 22, 24, 0.75);
}

[data-theme="winamp-classic"] .alert {
    background: linear-gradient(180deg, #4c5157 0%, #34383d 100%) !important;
    border: 1px solid #17191c !important;
    border-radius: 0.15rem !important;
    color: #e2e6ea !important;
}
[data-theme="winamp-classic"] .alert * {
    color: inherit !important;
}

/* Success/error text: LCD green vs. amber peak-warning, the two WinAMP accents */
[data-theme="winamp-classic"] .text-success,
[data-theme="winamp-classic"] .bt-num.text-success,
[data-theme="winamp-classic"] .bt-stat.badge-success {
    color: #58ff5e !important;
    text-shadow: 0 0 4px rgba(88, 255, 94, 0.55);
}
[data-theme="winamp-classic"] .text-error,
[data-theme="winamp-classic"] .bt-num.text-error,
[data-theme="winamp-classic"] .bt-stat.badge-error {
    color: #ffb545 !important;
    text-shadow: 0 0 3px rgba(255, 181, 69, 0.4);
}

[data-theme="winamp-classic"] .divider::before,
[data-theme="winamp-classic"] .divider::after {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Scrollbar: gunmetal chrome track/thumb, hard bevel, no soft glass look */
[data-theme="winamp-classic"] * {
    scrollbar-width: thin;
    scrollbar-color: #82868c #101214;
}
[data-theme="winamp-classic"] ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
[data-theme="winamp-classic"] ::-webkit-scrollbar-track {
    background: #101214;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="winamp-classic"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a9adb3 0%, #6c7076 100%);
    border: 1px solid #202226;
    box-shadow: inset 1px 1px 0 rgba(240, 242, 244, 0.7), inset -1px -1px 0 rgba(20, 22, 24, 0.8);
}
[data-theme="winamp-classic"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b7bbc0 0%, #787c82 100%);
}

/* Headings: match the muted chrome titlebar text color */
[data-theme="winamp-classic"] h2,
[data-theme="winamp-classic"] h3 {
    color: #d7dce1 !important;
    letter-spacing: 0.02em;
}

/* ── end winamp-classic ──────────────────────────── */

/* ===== Y2K / GeoCities style promo widget ===== */
#y2k-widget {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 99999;
    font-family: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
  }

  #y2k-widget * { box-sizing: border-box; }

  #y2k-icon {
    position: relative;
    width: 34px;
    height: 28px;
    padding: 0;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #dfdfdf;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
  }
  #y2k-icon:active {
    border-color: #808080 #fff #fff #808080;
    box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #dfdfdf;
  }

  #y2k-icon-text {
    font-size: 16px;
    line-height: 1;
    color: #000080;
  }

  @keyframes y2k-spin-glow {
    0%   { box-shadow: 0 0 8px #ff00cc; }
    25%  { box-shadow: 0 0 12px #00ffff; }
    50%  { box-shadow: 0 0 8px #ffff00; }
    75%  { box-shadow: 0 0 12px #00ff66; }
    100% { box-shadow: 0 0 8px #ff00cc; }
  }
  @keyframes y2k-bounce {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-5px) rotate(4deg); }
  }

  #y2k-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 50%;
    background: #ff0000;
    color: #fff;
    font-family: Tahoma, Arial, sans-serif;
    font-weight: bold;
    font-size: 9px;
    line-height: 14px;
    text-align: center;
    border: 1px solid #800000;
  }
  @keyframes y2k-badge-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
  }

  #y2k-panel {
    display: none;
    margin-top: 6px;
    width: 260px;
    padding: 3px;
    background: repeating-linear-gradient(45deg, #ff00cc, #ff00cc 6px, #00ffff 6px, #00ffff 12px);
    border-radius: 8px;
    animation: y2k-border-flash 1.2s linear infinite;
  }
  #y2k-widget.open #y2k-panel { display: block; }

  @keyframes y2k-border-flash {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
  }

  #y2k-inner {
    background:
      radial-gradient(#ffffff33 1px, transparent 1px) 0 0/14px 14px,
      linear-gradient(180deg, #1a0033, #330066 60%, #000033);
    border-radius: 6px;
    padding: 8px;
    color: #fff;
    position: relative;
  }

  #y2k-inner .marquee-wrap {
    overflow: hidden;
    white-space: nowrap;
    background: #000;
    border: 1px solid #ff00cc;
    padding: 3px 0;
    margin-bottom: 6px;
  }
  #y2k-inner .marquee-text {
    display: inline-block;
    padding-left: 100%;
    font-weight: bold;
    font-size: 12px;
    background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #33ff00, #0099ff, #cc00ff, #ff0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: y2k-marquee 8s linear infinite, y2k-rainbow 2s linear infinite;
  }
  @keyframes y2k-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
  @keyframes y2k-rainbow { from { background-position: 0 0; } to { background-position: 200% 0; } }

  #y2k-close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff0000;
    color: #fff;
    border: 2px outset #ff8888;
    font-weight: bold;
    font-size: 10px;
    width: 16px;
    height: 16px;
    line-height: 12px;
    cursor: pointer;
    padding: 0;
  }

  #y2k-inner p {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.45;
    text-shadow: 1px 1px 0 #000;
  }
  #y2k-inner .blink { animation: y2k-blink 1s step-start infinite; color: #ffff00; font-weight: bold; }
  @keyframes y2k-blink { 50% { opacity: 0; } }

  #y2k-inner .stars { color: #ffff66; letter-spacing: 2px; }

  #y2k-cta {
    display: block;
    text-align: center;
    text-decoration: none;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 13px;
    letter-spacing: .5px;
    color: #000;
    background: linear-gradient(180deg, #ffff66 0%, #ffcc00 50%, #ff9900 100%);
    border: 3px outset #ffe680;
    border-radius: 4px;
    padding: 6px 4px;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #fff;
    animation: y2k-pulse 1s ease-in-out infinite;
  }
  #y2k-cta:active { border-style: inset; }
  @keyframes y2k-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

  #y2k-counter {
    background: #000;
    border: 1px inset #666;
    color: #00ff00;
    font-family: "Courier New", monospace;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
    letter-spacing: 2px;
  }

  @media (max-width: 480px) {
    #y2k-panel { width: 200px; }
    #y2k-icon { width: 42px; height: 42px; }
  }

/* ═══════════════════════════════════════════════════════════
   Compact density mode — orthogonal to color theme.
   Toggled via [data-density="compact"] on <html> (see toggleCompactDensity()
   in htmx_4.js), independent from the theme-dropdown radio group so it can
   be combined with any theme.
   Shrinking the root font-size cascades through every rem-based Tailwind /
   DaisyUI spacing, sizing and radius value app-wide; the rules below add
   extra targeted tightening on top of that for the bulkiest components.
   ═══════════════════════════════════════════════════════════ */
html[data-density="compact"] {
    font-size: 80%;
}

/* max-w-* utilities are rem-based, so they'd shrink along with the root
   font-size above. Pin them back to their normal (100%-font-size) pixel
   values so the page's overall content width stays unchanged — only
   spacing/typography inside it gets tighter. */
[data-density="compact"] .max-w-md { max-width: 448px !important; }
[data-density="compact"] .max-w-5xl { max-width: 1024px !important; }
[data-density="compact"] .max-w-6xl { max-width: 1152px !important; }

[data-density="compact"] .card-body {
    padding: 0.6rem !important;
    gap: 0.4rem !important;
}

[data-density="compact"] .btn {
    min-height: 1.7rem !important;
    height: 1.7rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}
[data-density="compact"] .btn-sm {
    min-height: 1.5rem !important;
    height: 1.5rem !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}
[data-density="compact"] .btn-xs {
    min-height: 1.2rem !important;
    height: 1.2rem !important;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
}

/* Icon-only circular buttons (Help/About/modal Expand+Close) size to their
   icon, so shrinking just the button and not its (fixed-size) icon/img
   leaves the icon overflowing the circle. Force both down together. */
[data-density="compact"] .btn-circle {
    width: 1.6rem !important;
    height: 1.6rem !important;
    min-height: 1.6rem !important;
    padding: 0 !important;
}
[data-density="compact"] .btn-circle.btn-sm {
    width: 1.4rem !important;
    height: 1.4rem !important;
    min-height: 1.4rem !important;
}
[data-density="compact"] .btn-circle img,
[data-density="compact"] .btn-circle svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
    max-width: 0.9rem !important;
    max-height: 0.9rem !important;
}
[data-density="compact"] .btn-circle .text-2xl {
    font-size: 0.9rem !important;
    line-height: 1 !important;
}

[data-density="compact"] .input,
[data-density="compact"] .select,
[data-density="compact"] .textarea,
[data-density="compact"] input[type="text"],
[data-density="compact"] input[type="number"],
[data-density="compact"] input[type="password"],
[data-density="compact"] input[type="search"],
[data-density="compact"] select {
    min-height: 1.6rem !important;
    height: 1.6rem !important;
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}

[data-density="compact"] th,
[data-density="compact"] td {
    padding: 2px 4px !important;
}
[data-density="compact"] .bt-table thead th {
    padding: 3px 4px !important;
}

[data-density="compact"] .badge {
    height: 1rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    font-size: 0.65rem !important;
}
[data-density="compact"] .bt-stat {
    padding: 1px 6px !important;
    gap: 2px !important;
}

[data-density="compact"] .modal-box {
    padding: 0.75rem !important;
}

[data-density="compact"] .tabs.tabs-boxed {
    padding: 2px !important;
}
[data-density="compact"] .tab {
    min-height: 1.5rem !important;
    height: 1.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

[data-density="compact"] .dropdown-content {
    padding: 0.25rem !important;
}

/* Base spacing scale used by Tailwind utility classes across templates —
   collapsed to a single tight step each, regardless of the original size. */
[data-density="compact"] .p-1, [data-density="compact"] .p-2, [data-density="compact"] .p-3,
[data-density="compact"] .p-4, [data-density="compact"] .p-6 {
    padding: 0.35rem !important;
}
[data-density="compact"] .px-1, [data-density="compact"] .px-2, [data-density="compact"] .px-3,
[data-density="compact"] .px-4, [data-density="compact"] .px-6 {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}
[data-density="compact"] .py-1, [data-density="compact"] .py-2, [data-density="compact"] .py-3,
[data-density="compact"] .py-4 {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
}
[data-density="compact"] .gap-1, [data-density="compact"] .gap-2,
[data-density="compact"] .gap-3, [data-density="compact"] .gap-4 {
    gap: 0.25rem !important;
}
[data-density="compact"] .space-y-1 > * + *, [data-density="compact"] .space-y-2 > * + *,
[data-density="compact"] .space-y-3 > * + *, [data-density="compact"] .space-y-4 > * + *,
[data-density="compact"] .space-y-6 > * + * {
    margin-top: 0.35rem !important;
}
[data-density="compact"] .mb-1, [data-density="compact"] .mb-2,
[data-density="compact"] .mb-3, [data-density="compact"] .mb-4 {
    margin-bottom: 0.3rem !important;
}
[data-density="compact"] .mt-1, [data-density="compact"] .mt-2,
[data-density="compact"] .mt-3, [data-density="compact"] .mt-4 {
    margin-top: 0.3rem !important;
}
/* ===== End Y2K / GeoCities style promo widget ===== */
