/* ── Grok Register · Blue-White Aurora Control Plane ── */
/* Style source: astrbot telegram_forwarder web console */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
    color-scheme: light;

    --primary: #229ed9;
    --primary-strong: #1c87c0;
    --primary-soft: rgba(34, 158, 217, 0.1);
    --primary-tint: rgba(34, 158, 217, 0.2);

    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.1);
    --accent-dim: #1c87c0;
    --accent-glow: rgba(34, 158, 217, 0.18);
    --accent-text: #0b1220;

    --violet: #7c6cf0;
    --violet-soft: rgba(124, 108, 240, 0.12);

    --bg-base: #f4f8fc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #eef3fa;
    --bg-inset: #f1f5f9;
    --bg-inset-soft: #f8fafc;
    --overlay: rgba(255, 255, 255, 0.72);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;

    --success-soft: rgba(16, 185, 129, 0.12);
    --error-soft: rgba(239, 68, 68, 0.1);
    --warning-soft: rgba(245, 158, 11, 0.12);
    --info-soft: rgba(14, 165, 233, 0.12);

    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --border-focus: rgba(34, 158, 217, 0.45);
    --border-glow: rgba(34, 158, 217, 0.2);
    --border-glow-active: rgba(34, 158, 217, 0.45);

    --glass: rgba(255, 255, 255, 0.78);
    --glass-heavy: rgba(255, 255, 255, 0.92);

    --radius: 10px;
    --radius-sm: 8px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --sidebar-width: 264px;

    --shadow-sm: 0 4px 14px rgba(34, 158, 217, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(34, 158, 217, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(34, 158, 217, 0.08);
    --shadow-glow: 0 0 0 3px rgba(34, 158, 217, 0.22);
    --focus-ring: 0 0 0 3px rgba(34, 158, 217, 0.22);

    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.1, 0.64, 1);
    --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 140ms;
    --dur-base: 220ms;
    --dur-med: 320ms;
    --dur-slow: 420ms;

    --font-sans: "DM Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-display: "Space Grotesk", "DM Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Consolas", monospace;
}

.dark-theme {
    color-scheme: dark;

    --primary: #38bdf8;
    --primary-strong: #0ea5e9;
    --primary-soft: rgba(56, 189, 248, 0.14);
    --primary-tint: rgba(56, 189, 248, 0.22);

    --accent: #38bdf8;
    --accent-strong: #7dd3fc;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --accent-dim: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.22);
    --accent-text: #0b1220;

    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, 0.16);

    --bg-base: #0b1220;
    --bg-surface: #111827;
    --bg-card: #152033;
    --bg-elevated: #1a2740;
    --bg-input: #152033;
    --bg-hover: #1e2d48;
    --bg-inset: #0f172a;
    --bg-inset-soft: #132033;
    --overlay: rgba(15, 23, 42, 0.78);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --info: #38bdf8;

    --success-soft: rgba(52, 211, 153, 0.14);
    --error-soft: rgba(248, 113, 113, 0.14);
    --warning-soft: rgba(251, 191, 36, 0.14);
    --info-soft: rgba(56, 189, 248, 0.14);

    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.24);
    --border-focus: rgba(56, 189, 248, 0.5);
    --border-glow: rgba(56, 189, 248, 0.22);
    --border-glow-active: rgba(56, 189, 248, 0.45);

    --glass: rgba(17, 24, 39, 0.78);
    --glass-heavy: rgba(17, 24, 39, 0.92);

    --shadow-sm: 0 4px 14px rgba(2, 8, 23, 0.28), 0 1px 3px rgba(2, 8, 23, 0.2);
    --shadow-md: 0 12px 30px rgba(2, 8, 23, 0.34), 0 2px 8px rgba(2, 8, 23, 0.24);
    --shadow-lg: 0 20px 48px rgba(2, 8, 23, 0.42);
    --shadow-glow: 0 0 0 3px rgba(56, 189, 248, 0.22);
    --focus-ring: 0 0 0 3px rgba(56, 189, 248, 0.24);
}

html, body {
    min-height: 100%;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(900px 500px at 88% -8%, rgba(56, 189, 248, 0.18), transparent 62%),
        radial-gradient(720px 420px at 0% 8%, rgba(34, 158, 217, 0.12), transparent 58%),
        linear-gradient(180deg, #f6f9fc 0%, #eef3fa 100%);
    background-attachment: fixed;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

.dark-theme body,
html.dark-theme body {
    background:
        radial-gradient(900px 500px at 88% -8%, rgba(56, 189, 248, 0.12), transparent 62%),
        radial-gradient(720px 420px at 0% 8%, rgba(14, 165, 233, 0.1), transparent 58%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; background: none; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, .card-title, .stat-value, .mini-stat-val, .topbar h1 {
    font-family: var(--font-display);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ── Aurora background ── */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.bg-aurora i {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.5;
    will-change: transform;
}
.bg-aurora i:first-child {
    left: -14vw;
    top: -20vh;
    width: min(54vw, 680px);
    height: min(54vw, 680px);
    background: radial-gradient(circle at 32% 32%, rgba(56, 189, 248, 0.4), rgba(56, 189, 248, 0) 68%);
    animation: aurora-drift-a 26s ease-in-out infinite alternate;
}
.bg-aurora i:last-child {
    right: -12vw;
    bottom: -18vh;
    width: min(46vw, 580px);
    height: min(46vw, 580px);
    background: radial-gradient(circle at 60% 44%, rgba(34, 158, 217, 0.34), rgba(124, 108, 240, 0.16) 48%, rgba(34, 158, 217, 0) 72%);
    animation: aurora-drift-b 32s ease-in-out infinite alternate;
}
.dark-theme .bg-aurora i:first-child {
    background: radial-gradient(circle at 32% 32%, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0) 68%);
}
.dark-theme .bg-aurora i:last-child {
    background: radial-gradient(circle at 60% 44%, rgba(14, 165, 233, 0.18), rgba(124, 108, 240, 0.12) 48%, rgba(14, 165, 233, 0) 72%);
}
@keyframes aurora-drift-a {
    to { transform: translate3d(10vw, 8vh, 0) scale(1.14); }
}
@keyframes aurora-drift-b {
    to { transform: translate3d(-9vw, -7vh, 0) scale(1.1); }
}

/* ── App shell ── */
.app-shell {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.content-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 16px;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #f4f8fc);
    overflow-y: auto;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.dark-theme .sidebar {
    background: linear-gradient(180deg, #111827, #0f172a);
}
.sidebar-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 24px;
}
.sidebar-head strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}
.sidebar-head span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}
.brand-dot {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 0 1px rgba(34, 158, 217, 0.24), 0 12px 28px rgba(34, 158, 217, 0.28);
    animation: brand-breathe 4s ease-in-out infinite;
}
.brand-dot svg { width: 20px; height: 20px; }
@keyframes brand-breathe {
    0%, 100% { box-shadow: 0 0 0 1px rgba(34, 158, 217, 0.24), 0 10px 24px rgba(34, 158, 217, 0.26); }
    50% { box-shadow: 0 0 0 1px rgba(34, 158, 217, 0.32), 0 14px 34px rgba(34, 158, 217, 0.44); }
}

.nav-list { display: grid; gap: 6px; }
.nav-group-label {
    margin: 16px 8px 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    opacity: 0.72;
}
.nav-group-label:first-child { margin-top: 0; }

.nav-item {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 10px;
    color: var(--text-muted);
    background: transparent;
    text-align: left;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.nav-item:hover svg,
.nav-item.active svg { opacity: 1; }
.nav-item:hover {
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateX(2px);
}
.nav-item.active {
    color: var(--accent-text);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(34, 158, 217, 0.28);
}
.nav-item:active { transform: translateX(2px) scale(0.98); }

.sidebar-footer {
    margin-top: auto;
    padding: 8px 0 0;
}
.sidebar-status-card {
    padding: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sidebar-status-card .status-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 10.5px;
}
.sidebar-status-card .status-badge.success {
    background: var(--success-soft);
    color: var(--success);
}
.sidebar-status-card .status-text {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
}

/* ── Topbar ── */
.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 28px clamp(18px, 3vw, 34px) 0;
    flex-shrink: 0;
}
.topbar-copy { min-width: 0; }
.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.topbar h1 {
    margin: 3px 0 0;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-soft);
}
.topbar h1.is-swapping {
    opacity: 0;
    transform: translateY(6px);
}
.eyebrow {
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-soft), color 0.3s ease;
}
.eyebrow.is-swapping {
    opacity: 0;
    transform: translateY(4px);
}
.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.version,
.version-btn {
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-weight: 600;
}
.version-btn {
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.version-btn:hover,
.version-btn:focus-visible {
    color: var(--primary-strong);
    border-color: var(--border-glow-active);
    background: var(--primary-soft);
    outline: none;
}

/* ── Theme toggle ── */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-muted);
    background: var(--bg-surface);
    transition: all 0.25s var(--ease-out);
}
.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--border-glow-active);
    background: var(--primary-soft);
    transform: rotate(12deg) scale(1.05);
    box-shadow: var(--shadow-sm);
}
.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }
.dark-theme .theme-toggle-btn .sun-icon { display: block; }
.dark-theme .theme-toggle-btn .moon-icon { display: none; }

/* ── Mobile nav ── */
.mobile-menu,
.sidebar-scrim { display: none; }

/* ── Main content + page transition ── */
.main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 22px clamp(18px, 3vw, 34px) 56px;
    position: relative;
    z-index: 1;
    transform-origin: 50% 0;
}
/* Hold keeps opacity at 0 between exit→DOM swap→enter (prevents flash) */
.main-content.is-page-hold {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}
.main-content.is-page-exit {
    animation: page-exit var(--dur-base) var(--ease-in-out) forwards;
    pointer-events: none;
}
.main-content.is-page-enter {
    animation: page-enter var(--dur-med) var(--ease-soft) both;
}
@keyframes page-exit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}
@keyframes page-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes content-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cards / panels ── */
.card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}
.card:hover {
    border-color: var(--border-glow-active);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(34, 158, 217, 0.08);
}
.card-md { max-width: 780px; }
.card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-left: 13px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.card-title svg { flex-shrink: 0; color: var(--accent); }
.card-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 17px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: translateY(-50%);
}
.main-content > .card,
.main-content > div > .card {
    animation: panel-in 0.42s var(--ease-soft) both;
}
.main-content > .card:nth-child(1) { animation-delay: 40ms; }
.main-content > .card:nth-child(2) { animation-delay: 90ms; }
.main-content > .card:nth-child(3) { animation-delay: 140ms; }
.main-content > .card:nth-child(4) { animation-delay: 190ms; }
.main-content > .card:nth-child(5) { animation-delay: 240ms; }
@keyframes panel-in {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Staggered metric tiles */
.stats-grid > .stat-card,
.mini-stats-grid > .mini-stat-card {
    animation: tile-in 0.4s var(--ease-soft) both;
}
.stats-grid > .stat-card:nth-child(1),
.mini-stats-grid > .mini-stat-card:nth-child(1) { animation-delay: 60ms; }
.stats-grid > .stat-card:nth-child(2),
.mini-stats-grid > .mini-stat-card:nth-child(2) { animation-delay: 100ms; }
.stats-grid > .stat-card:nth-child(3),
.mini-stats-grid > .mini-stat-card:nth-child(3) { animation-delay: 140ms; }
.stats-grid > .stat-card:nth-child(4),
.mini-stats-grid > .mini-stat-card:nth-child(4) { animation-delay: 180ms; }
.stats-grid > .stat-card:nth-child(5),
.mini-stats-grid > .mini-stat-card:nth-child(5) { animation-delay: 220ms; }
.stats-grid > .stat-card:nth-child(6),
.mini-stats-grid > .mini-stat-card:nth-child(6) { animation-delay: 260ms; }
.stats-grid > .stat-card:nth-child(7),
.mini-stats-grid > .mini-stat-card:nth-child(7) { animation-delay: 300ms; }
.stats-grid > .stat-card:nth-child(8),
.mini-stats-grid > .mini-stat-card:nth-child(8) { animation-delay: 340ms; }
.stats-grid > .stat-card:nth-child(n+9),
.mini-stats-grid > .mini-stat-card:nth-child(n+9) { animation-delay: 360ms; }
@keyframes tile-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    background: var(--bg-card);
}
.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(100, 116, 139, 0.7);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
}
.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.dark-theme .form-select {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-row { display: flex; gap: 16px; align-items: flex-start; }
.form-row .form-group { flex: 1; }
.form-container-md { max-width: 680px; }
.radio-group { display: flex; gap: 18px; padding: 6px 0; flex-wrap: wrap; }
.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0;
}
.radio-group input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s var(--ease-out);
    cursor: pointer;
    background: var(--bg-card);
    flex-shrink: 0;
}
.radio-group input[type="radio"]:checked {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 3.5px var(--bg-card), 0 0 0 2px var(--primary-soft);
}

/* ── Buttons ── */
.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    flex-shrink: 0;
}
.btn-primary {
    color: var(--accent-text);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(34, 158, 217, 0.28);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-strong), var(--accent-strong));
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(34, 158, 217, 0.34);
}
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.24);
}
.btn-success:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}
.btn-danger:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.22);
}
.btn-warning:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.btn-secondary,
.btn-soft {
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    background: var(--bg-inset-soft);
    box-shadow: none;
}
.btn-secondary:hover,
.btn-soft:hover {
    color: var(--primary);
    border-color: var(--border-glow-active);
    background: var(--primary-soft);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none !important;
    filter: none !important;
}
.btn-sm {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
}
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Drop zone ── */
.drop-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    background: var(--bg-inset-soft);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.drop-zone.dragover {
    animation: drop-pulse 1.1s var(--ease-in-out) infinite;
}
@keyframes drop-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 158, 217, 0.18), var(--shadow-sm); }
    50% { box-shadow: 0 0 0 8px rgba(34, 158, 217, 0.0), var(--shadow-md); }
}
.drop-zone-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.25s var(--ease-out);
}
.drop-zone:hover .drop-zone-icon, .drop-zone.dragover .drop-zone-icon {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: var(--border-glow-active);
    transform: translateY(-2px);
}
.drop-zone-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.drop-zone-desc {
    font-size: 12px;
    color: var(--text-muted);
}
.file-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* ── Tables ── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-inset-soft);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-primary);
    transition: background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), color var(--dur-base) ease;
}
.data-table tbody tr {
    animation: row-in 0.34s var(--ease-soft) both;
    animation-delay: calc(min(var(--row-i, 0), 18) * 22ms);
}
.data-table tbody tr:hover td { background: var(--primary-soft); }
.data-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}
.data-table tbody tr:last-child td { border-bottom: none; }
@keyframes row-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.th-checkbox { width: 44px; text-align: center; }
.data-table input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--text-muted);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    position: relative;
    vertical-align: middle;
    background: var(--bg-card);
}
.data-table input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}
.data-table input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.table-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    background: var(--bg-inset-soft);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    transition: color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}
.badge.is-flash {
    animation: badge-flash 0.42s var(--ease-spring) both;
}
@keyframes badge-flash {
    0% { transform: scale(1); }
    40% { transform: scale(1.06); }
    100% { transform: scale(1); }
}
.badge-ready { background: var(--success-soft); color: var(--success); }
.badge-done { background: var(--primary-soft); color: var(--primary); }
.badge-disabled { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-failed { background: var(--error-soft); color: var(--error); }
.badge-running {
    background: var(--success-soft);
    color: var(--success);
}
.badge-running::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: dot-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
.badge-paused { background: var(--warning-soft); color: var(--warning); }
.badge-stopped { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }
@keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

/* ── Log panel ── */
.log-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #0b1220 !important;
    padding: 0 !important;
}
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(180deg, #152033, #111827);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.log-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}
.log-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: dot-pulse 2s ease-in-out infinite;
}
.log-actions { display: flex; gap: 6px; }
.log-body {
    height: 340px;
    overflow-y: auto;
    padding: 14px 18px;
    background: #0b1220;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.9;
    color: #d1d5db;
}
.log-line {
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 2px;
    border-left: 2px solid transparent;
    padding-left: 10px;
    border-radius: 0 3px 3px 0;
    transition: background var(--dur-fast) ease, border-color var(--dur-base) ease, color var(--dur-base) ease;
}
.log-line.is-new {
    animation: log-in 0.28s var(--ease-soft) both;
}
.log-line:hover { background: rgba(255, 255, 255, 0.03); }
@keyframes log-in {
    from { opacity: 0; transform: translateX(-8px); filter: blur(1px); }
    to { opacity: 1; transform: translateX(0); filter: blur(0); }
}
.log-info { color: #38bdf8; border-color: #38bdf8; }
.log-success { color: #34d399; border-color: #34d399; }
.log-error { color: #f87171; border-color: #f87171; }
.log-debug { color: #6b7280; }
.log-warn { color: #fbbf24; border-color: #fbbf24; }
.log-header .btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #c9d1d9 !important;
    box-shadow: none !important;
    font-size: 11px;
}
.log-header .btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: center;
    transition: all 0.25s var(--ease-out);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    min-height: 112px;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--card-accent, var(--primary)) 18%, transparent), transparent 70%);
    pointer-events: none;
    transition: transform 0.3s ease;
}
.stat-card:hover {
    border-color: var(--border-glow-active);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card:hover::after { transform: scale(1.18); }
.stat-value {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.18;
}
.stat-label {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 14px;
    width: 100%;
}
.mini-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.25s var(--ease-out);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.mini-stat-card:hover {
    border-color: var(--border-glow-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.mini-stat-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mini-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Toast ── */
.toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    max-width: min(420px, calc(100vw - 44px));
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-primary);
    border: 1px solid var(--border-glow-active);
    background: var(--overlay);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.96);
    pointer-events: none;
    transition:
        opacity var(--dur-base) var(--ease-out),
        transform var(--dur-med) var(--ease-spring),
        box-shadow var(--dur-base) ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
}
.toast-show {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}
.toast-hide {
    opacity: 0;
    transform: translate3d(12px, 8px, 0) scale(0.96);
}
.toast-success { border-color: rgba(16, 185, 129, 0.35); }
.toast-error { border-color: rgba(239, 68, 68, 0.35); }
.toast-warning { border-color: rgba(245, 158, 11, 0.35); }
.toast-info { border-color: var(--border-glow-active); }
.toast-icon { display: flex; align-items: center; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--primary); }

/* ── About modal ── */
#about-modal-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
}
#about-modal-root[hidden] {
    display: none !important;
}
.about-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.about-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 32px));
    max-height: min(86vh, 720px);
    overflow: auto;
    padding: 22px 22px 18px;
    border-radius: 18px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
}
.about-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.about-eyebrow {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.about-head h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.about-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.about-close:hover,
.about-close:focus-visible {
    color: var(--text-primary);
    border-color: var(--border-strong);
    outline: none;
}
.about-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}
.about-brand strong {
    font-size: 16px;
    color: var(--text-primary);
}
.about-brand span {
    font-size: 12px;
    color: var(--text-muted);
}
.about-body {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.about-points {
    margin: 0 0 14px;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}
.about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.about-meta a {
    color: var(--primary-strong);
    text-decoration: none;
    font-weight: 600;
}
.about-meta a:hover {
    text-decoration: underline;
}
.about-disclaimer {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* ── Foldable / collapsible panels ── */
.fold-card {
    padding-bottom: 14px;
}
.fold-card.is-open {
    padding-bottom: 22px;
}
.fold-card > .card-header {
    margin-bottom: 0;
    align-items: center;
}
.fold-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    padding: 2px 4px 2px 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--dur-fast) var(--ease-out);
}
.fold-toggle:hover {
    background: var(--primary-soft);
}
.fold-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.fold-toggle .card-title {
    margin-bottom: 0;
    pointer-events: none;
}
.fold-chevron {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--text-muted);
    background: var(--bg-inset-soft);
    border: 1px solid var(--border);
    transition:
        transform var(--dur-med) var(--ease-soft),
        color var(--dur-base) ease,
        background var(--dur-base) ease,
        border-color var(--dur-base) ease;
}
.fold-chevron svg {
    width: 14px;
    height: 14px;
    transition: transform var(--dur-med) var(--ease-soft);
}
.fold-card.is-open .fold-chevron {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: var(--border-glow-active);
}
.fold-card.is-open .fold-chevron svg {
    transform: rotate(90deg);
}
.fold-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: 2px;
}
.fold-count {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--border-glow);
    letter-spacing: 0.01em;
}
.fold-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.fold-card.is-open .fold-hint {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    pointer-events: none;
}
.fold-actions {
    flex: 0 0 auto;
}
.fold-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--dur-med) var(--ease-soft);
    margin-top: 0;
}
.fold-card.is-open .fold-body {
    grid-template-rows: 1fr;
    margin-top: 14px;
}
.fold-body-inner {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity var(--dur-base) var(--ease-out),
        transform var(--dur-med) var(--ease-soft);
}
.fold-card.is-open .fold-body-inner {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 40ms;
}
.fold-scroll {
    max-height: min(420px, 52vh);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-inset-soft);
}
.fold-scroll .data-table {
    background: var(--bg-card);
}
.fold-scroll .data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-inset-soft);
    box-shadow: 0 1px 0 var(--border);
}
.fold-scroll .table-empty {
    margin: 12px;
    border: 0;
    background: transparent;
}
.fold-card:not(.is-open) .fold-actions .btn {
    opacity: 0.88;
}
.fold-card:not(.is-open) .card-header {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .fold-scroll { max-height: min(360px, 48vh); }
    .fold-hint { display: none; }
    .fold-actions { width: 100%; }
    .fold-actions .btn-group { width: 100%; }
}

/* ── Count-up animation ── */
.stat-value,
.mini-stat-val,
.success-count {
    font-variant-numeric: tabular-nums;
}
.count-up,
.stat-value.is-counting,
.mini-stat-val.is-counting {
    will-change: contents;
}
.count-pop {
    animation: count-pop 0.28s var(--ease-spring) both;
}
@keyframes count-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.stat-value.count-pop,
.mini-stat-val.count-pop {
    transform-origin: center bottom;
}

/* ── Page utilities ── */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.card-header .card-title {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.card-title-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.card-title .icon-accent,
.card-title-text .icon-accent {
    color: var(--accent);
    flex-shrink: 0;
}
.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: -6px 0 16px;
    line-height: 1.6;
}
.card-header + .card-desc { margin-top: 0; }
.section-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}
.helper-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    background: var(--text-muted);
}
.status-dot.success { background: var(--success); }
.status-dot.error { background: var(--error); }
.status-dot.warning { background: var(--warning); }
.status-dot.info { background: var(--info); }

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.mono {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
}
.linkish {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.file-info-row {
    display: none;
    margin-top: 16px;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.file-info-row.is-visible { display: flex; }
.file-info-badge .file-size {
    color: var(--text-secondary);
    font-size: 11px;
}
.toolbar-select {
    width: 120px;
    padding: 6px 12px;
    font-size: 13px;
    height: 32px;
    min-height: 32px;
}
.dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.dashboard-head-title {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 600;
}
.mini-stat-card.span-2 { grid-column: span 2; }
.mini-stat-val.sm { font-size: 14px; word-break: break-all; }
.stat-icon {
    opacity: 0.85;
    display: inline-flex;
    line-height: 0;
}
.sso-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.preview-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}
.preview-table th {
    text-align: left;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
}
.preview-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}
.preview-table .row-invalid {
    color: var(--text-muted);
    font-style: italic;
}
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-7 { margin-top: 28px; }
.control-actions { margin: 4px 0 24px; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.form-group.mb-0 { margin-bottom: 0; }
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.actions-tight .btn-sm { height: 32px; }
.time-cell {
    color: var(--text-secondary);
    font-size: 12.5px;
}
.success-count {
    color: var(--success);
    font-weight: 700;
    font-size: 13.5px;
}

/* ── Misc ── */
.oauth-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-inset-soft);
    border-radius: 30px;
    border: 1px solid var(--border);
    margin-top: 14px;
    color: var(--text-primary);
}
.input-action-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}
.input-action-group .form-input { flex: 1; }
.input-action-group .btn { flex-shrink: 0; height: 42px; }

.import-preview {
    margin-top: 16px;
    background: var(--bg-inset-soft);
    border-radius: var(--radius);
    font-size: 13px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}
.import-preview-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px;
}
.import-preview-footer {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13.5px;
}
.import-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.import-column-left,
.import-column-right { min-width: 0; }

.sso-text {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    color: var(--text-muted);
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
code {
    background: var(--bg-inset-soft);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
    border: 1px solid var(--border);
    font-weight: 500;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
::selection {
    background: var(--primary-tint);
    color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 99px;
    background-color: rgba(34, 158, 217, 0.28);
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(34, 158, 217, 0.5); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .import-two-column { grid-template-columns: 1fr; }
    .import-preview { max-height: min(360px, calc(100vh - 180px)); }
    .import-preview-footer .btn { width: 100%; }
}

@media (max-width: 960px) {
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(84vw, 306px);
        transform: translateX(-102%);
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar {
        transition: background 0.3s ease, border-color 0.3s ease, transform 0.28s var(--ease-soft);
    }
    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
        background: rgba(15, 23, 42, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s var(--ease-out);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    body.sidebar-open .sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-menu {
        position: fixed;
        left: 14px;
        top: calc(14px + env(safe-area-inset-top));
        z-index: 70;
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        gap: 4px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        box-shadow: var(--shadow-md);
    }
    .mobile-menu span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 99px;
        background: #ffffff;
    }
    .content-shell {
        height: 100vh;
    }
    .topbar {
        padding: calc(76px + env(safe-area-inset-top)) 14px 0 70px;
        display: grid;
        gap: 12px;
    }
    .topbar h1 { font-size: 26px; }
    .main-content {
        width: 100%;
        padding: 18px 14px calc(48px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
    .main-content.is-page-exit,
    .main-content.is-page-enter,
    .main-content.is-page-hold,
    .bg-aurora i,
    .brand-dot,
    .drop-zone.dragover {
        animation: none !important;
        filter: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ── Extra micro-interactions ── */
.nav-item.active {
    transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.2s var(--ease-spring);
}
.copy-btn:active {
    transform: scale(0.94);
}
.btn.is-pressed {
    transform: translateY(0) scale(0.97) !important;
}
.table-empty {
    animation: content-in 0.36s var(--ease-soft) both;
}
.import-preview {
    transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}
.form-input:hover, .form-textarea:hover, .form-select:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong));
}
.stat-card, .mini-stat-card {
    will-change: transform;
}
@media (hover: hover) {
    .card:hover {
        transform: translateY(-1px);
    }
}

/* ── Settings page ── */
.settings-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 980px;
}
.settings-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(90% 120% at 100% 0%, rgba(34, 158, 217, 0.08), transparent 50%),
        var(--bg-card);
}
.settings-hero .card-title { margin-bottom: 8px; }
.settings-hero-desc { margin: 0; max-width: 52ch; }
.settings-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}
.settings-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.settings-pill.muted {
    border-color: var(--border);
    background: var(--bg-inset-soft);
    color: var(--text-muted);
}
.settings-section {
    padding: 18px 20px 20px;
}
.settings-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.settings-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: linear-gradient(145deg, rgba(34, 158, 217, 0.14), rgba(56, 189, 248, 0.08));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.dark-theme .settings-section-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.settings-section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.3;
}
.settings-section-desc {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 68ch;
}
.settings-section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.backend-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.backend-settings[hidden] {
    display: none !important;
}
.choice-group[aria-label="registration-backend"],
.choice-group[aria-label="turnstile-provider"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mail-provider-settings {
    margin-top: 2px;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.settings-grid-1 { grid-template-columns: 1fr; }
.settings-grid .form-group { margin-bottom: 0; }
.settings-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.settings-field-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.settings-field-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.solver-health-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg-inset-soft);
}
.solver-health-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
@media (max-width: 720px) {
    .solver-health-card {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .solver-health-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}
.solver-health-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 700;
}
.solver-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.1);
}
.solver-health-detail {
    min-width: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}
.solver-health-card[data-state="online"] {
    border-color: color-mix(in srgb, var(--success) 34%, var(--border-strong));
    background: color-mix(in srgb, var(--success) 6%, var(--bg-card));
}
.solver-health-card[data-state="online"] .solver-health-state { color: var(--success); }
.solver-health-card[data-state="online"] .solver-health-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}
.solver-health-card[data-state="offline"] {
    border-color: color-mix(in srgb, var(--error) 30%, var(--border-strong));
}
.solver-health-card[data-state="offline"] .solver-health-state { color: var(--error); }
.solver-health-card[data-state="offline"] .solver-health-dot {
    background: var(--error);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 12%, transparent);
}
.solver-health-card[data-state="checking"] .solver-health-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    animation: dot-pulse 1.2s ease-in-out infinite;
}
.choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.choice-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 12px 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-inset-soft);
    cursor: pointer;
    transition:
        border-color var(--dur-fast) var(--ease-out),
        background var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-spring);
    min-height: 68px;
}
.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.choice-indicator {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: var(--bg-card);
    flex-shrink: 0;
    transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.choice-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.choice-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}
.choice-desc {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    font-weight: 500;
}
.choice-badge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-strong, var(--primary));
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.choice-card:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border-strong));
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
    transform: translateY(-1px);
}
.choice-card.is-selected {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong));
    background:
        linear-gradient(145deg, rgba(34, 158, 217, 0.12), rgba(56, 189, 248, 0.05)),
        var(--bg-card);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent), 0 10px 24px rgba(34, 158, 217, 0.08);
}
.choice-card.is-selected .choice-indicator {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 3.5px var(--bg-card), 0 0 0 2px var(--primary-soft);
}
.choice-card:focus-within {
    outline: none;
    box-shadow: var(--focus-ring);
}
.settings-reveal {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows var(--dur-med) var(--ease-soft),
        opacity var(--dur-base) var(--ease-out);
}
.settings-reveal > * {
    overflow: hidden;
    min-height: 0;
}
.settings-reveal.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
}
.settings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    bottom: 10px;
    z-index: 5;
    padding: 14px 18px;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
    box-shadow: var(--shadow-md), 0 12px 40px rgba(15, 23, 42, 0.08);
}
.settings-actions-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}
.settings-actions-desc {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-secondary);
}
.settings-page > .card {
    animation: panel-in 0.42s var(--ease-soft) both;
}
.settings-page > .card:nth-child(1) { animation-delay: 40ms; }
.settings-page > .card:nth-child(2) { animation-delay: 80ms; }
.settings-page > .card:nth-child(3) { animation-delay: 120ms; }
.settings-page > .card:nth-child(4) { animation-delay: 160ms; }
.settings-page > .card:nth-child(5) { animation-delay: 200ms; }
.settings-page > .card:nth-child(6) { animation-delay: 240ms; }
.settings-page > .card:nth-child(7) { animation-delay: 280ms; }
.form-input.mono,
.form-input.mono::placeholder {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.01em;
}
.form-input[readonly] {
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--bg-inset-soft) 80%, var(--bg-input));
    cursor: default;
}
@media (max-width: 860px) {
    .settings-grid,
    .settings-two-col,
    .choice-group,
    .choice-group[aria-label="registration-backend"],
    .choice-group[aria-label="turnstile-provider"] {
        grid-template-columns: 1fr;
    }
    .settings-actions {
        position: static;
    }
    .solver-health-card {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .solver-health-card .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .settings-page > .card,
    .choice-card,
    .solver-health-dot {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    .settings-reveal {
        transition: none !important;
    }
}

/* ── Custom select (ui-select) ── */
.ui-select {
    position: relative;
    width: 100%;
}
.ui-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.ui-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px 10px 14px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 92%, #fff) 0%, var(--bg-input) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
    transition:
        border-color var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-base) var(--ease-out),
        background var(--dur-base) var(--ease-out),
        transform var(--dur-fast) var(--ease-out);
}
.ui-select-trigger:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border-strong));
    background:
        linear-gradient(180deg, var(--bg-card) 0%, color-mix(in srgb, var(--primary-soft) 35%, var(--bg-input)) 100%);
}
.ui-select-trigger:focus-visible {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}
.ui-select.is-open .ui-select-trigger {
    border-color: var(--primary);
    box-shadow: var(--focus-ring), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
    background:
        linear-gradient(180deg, var(--bg-card) 0%, color-mix(in srgb, var(--primary-soft) 45%, var(--bg-input)) 100%);
}
.ui-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}
.ui-select.is-mono .ui-select-value {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.01em;
}
.ui-select-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
    transition:
        transform var(--dur-base) var(--ease-spring),
        color var(--dur-fast) ease,
        background var(--dur-fast) ease;
}
.ui-select.is-open .ui-select-chevron {
    transform: rotate(180deg);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.ui-select-menu {
    position: fixed;
    z-index: 1200;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--bg-card) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border-strong));
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    transform-origin: top center;
    animation: ui-select-in var(--dur-base) var(--ease-spring) both;
}
.ui-select-menu.is-drop-up {
    transform-origin: bottom center;
    animation-name: ui-select-in-up;
}
.ui-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    transition:
        background var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-out);
}
.ui-select-menu.is-mono .ui-select-option-label {
    font-family: var(--font-mono);
    font-size: 12.5px;
}
.ui-select-option-label {
    flex: 1;
    min-width: 0;
}
.ui-select-check {
    flex-shrink: 0;
    opacity: 0;
    color: var(--primary);
    transform: scale(0.7);
    transition:
        opacity var(--dur-fast) var(--ease-out),
        transform var(--dur-base) var(--ease-spring);
}
.ui-select-option.is-selected {
    color: var(--primary-strong);
    background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent-soft) 70%, transparent));
    font-weight: 600;
}
.ui-select-option.is-selected .ui-select-check {
    opacity: 1;
    transform: scale(1);
}
.ui-select-option.is-active,
.ui-select-option:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-hover));
    color: var(--text-primary);
}
.ui-select-option.is-selected.is-active,
.ui-select-option.is-selected:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
    color: var(--primary-strong);
}
.dark-theme .ui-select-trigger {
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 88%, #1e293b) 0%, var(--bg-input) 100%);
    box-shadow: none;
}
.dark-theme .ui-select-menu {
    background: color-mix(in srgb, var(--bg-card) 92%, #0b1220);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.dark-theme .ui-select-option.is-selected {
    color: var(--accent);
}
@keyframes ui-select-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes ui-select-in-up {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@media (prefers-reduced-motion: reduce) {
    .ui-select-menu,
    .ui-select-chevron,
    .ui-select-trigger,
    .ui-select-option,
    .ui-select-check {
        animation: none !important;
        transition: none !important;
    }
    .ui-select.is-open .ui-select-chevron {
        transform: none;
    }
}
