/* EasyPrinter fnOS optional glass theme.
   Presentation only: the classic theme remains supported and all behavior
   continues to use the existing semantic classes and DOM structure. */
:root {
    --glass-blue: #2563eb;
    --glass-blue-deep: #1d4ed8;
    --glass-ink: #16243d;
    --glass-muted: #5d6e88;
    --glass-surface: rgba(255, 255, 255, .56);
    --glass-surface-strong: rgba(255, 255, 255, .78);
    --glass-border: rgba(255, 255, 255, .82);
    --glass-line: rgba(80, 105, 145, .22);
    --glass-highlight: rgba(255, 255, 255, .9);
    --glass-shadow: 0 20px 48px rgba(38, 65, 108, .14), 0 2px 10px rgba(38, 65, 108, .07);
    --glass-blur: 14px;
    --glass-radius: 20px;
}

body.theme-glass {
    overflow-x: clip;
    --glass-ink: #142946;
    --glass-muted: #405a7d;
    --glass-secondary: #405a7d;
    --glass-line: rgba(64, 92, 130, .28);
    --glass-selected-bg: linear-gradient(135deg, rgba(255,255,255,.84), rgba(213,231,255,.66));
    --glass-selected-text: #1e4f9a;
    --glass-selected-icon: #2563c7;
    --glass-selected-border: rgba(255,255,255,.86);
    --glass-selected-shadow: inset 0 1px 0 rgba(255,255,255,.94), 0 8px 20px rgba(77,111,164,.16);
    --glass-button-primary-bg: linear-gradient(135deg, #3479e9, #6b9ff5);
    --glass-button-primary-hover: linear-gradient(135deg, #245fc7, #4f86e9);
    --glass-button-secondary-bg: linear-gradient(135deg, rgba(255,255,255,.72), rgba(221,235,255,.48));
    --glass-button-secondary-hover: linear-gradient(135deg, rgba(255,255,255,.88), rgba(210,229,255,.68));
    --glass-button-quiet-bg: rgba(255,255,255,.28);
    --glass-button-danger-bg: linear-gradient(135deg, #d94d68, #ef7187);
    --glass-button-success-bg: linear-gradient(135deg, #159f79, #4ac59f);
    --glass-control-radius: 12px;
    --glass-control-radius-sm: 9px;
    background:
        radial-gradient(circle at 4% 2%, rgba(106, 176, 255, .38), transparent 27%),
        radial-gradient(circle at 96% 9%, rgba(182, 156, 255, .32), transparent 25%),
        radial-gradient(circle at 70% 95%, rgba(114, 217, 207, .18), transparent 28%),
        linear-gradient(135deg, #e9f3ff 0%, #f7f9fd 47%, #e9eefb 100%);
    color: var(--glass-ink);
    background-attachment: fixed;
}

body.theme-glass .layout {
    max-width: 100vw;
    overflow-x: clip;
}

body.theme-glass .sidebar {
    isolation: isolate;
    overflow-x: hidden;
    color-scheme: light;
    background:
        linear-gradient(180deg, rgba(245, 249, 255, .92), rgba(224, 235, 249, .78)),
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 34%);
    border-right: 1px solid rgba(255, 255, 255, .82);
    box-shadow: inset -1px 0 rgba(96,125,166,.14), 18px 0 45px rgba(48, 77, 119, .12);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
}
body.theme-glass .sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.98), transparent);
    pointer-events: none;
}
body.theme-glass .sidebar::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 320px;
    top: 12%;
    right: -115px;
    background: linear-gradient(180deg, rgba(255,255,255,.3), transparent 65%);
    transform: rotate(18deg);
    pointer-events: none;
    opacity: .7;
}

body.theme-glass .login-container {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(119, 183, 255, .42), transparent 34%),
        radial-gradient(circle at 85% 18%, rgba(187, 164, 255, .34), transparent 31%),
        linear-gradient(135deg, #e8f2ff 0%, #f7f9ff 52%, #e9edfb 100%);
}
body.theme-glass .first-password-overlay {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
body.theme-glass .login-container::before,
body.theme-glass .first-password-overlay::before {
    content: "";
    position: absolute;
    inset: 8% 12%;
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 46% 54% 58% 42% / 48% 44% 56% 52%;
    transform: rotate(-8deg);
    pointer-events: none;
    opacity: .62;
}
body.theme-glass .glass-orbit {
    position: absolute;
    width: min(42vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.62);
    background: linear-gradient(135deg, rgba(255,255,255,.25), rgba(255,255,255,.03) 52%, rgba(117,160,255,.12));
    box-shadow: inset 16px 18px 34px rgba(255,255,255,.28), inset -18px -22px 42px rgba(74,104,177,.12), 0 22px 70px rgba(57,92,160,.12);
    pointer-events: none;
    z-index: 0;
}
body.theme-glass .glass-orbit-a { top: -18%; left: -9%; transform: rotate(22deg); }
body.theme-glass .glass-orbit-b { right: -14%; bottom: -22%; width: min(34vw, 430px); transform: rotate(-30deg); opacity: .72; }
body.theme-glass .glass-shard {
    position: absolute;
    width: 190px;
    height: 190px;
    right: 18%;
    top: 15%;
    border-radius: 38% 62% 54% 46%;
    background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(111,164,255,.08));
    border: 1px solid rgba(255,255,255,.48);
    transform: rotate(18deg) skewX(-8deg);
    box-shadow: 12px 16px 34px rgba(67,101,173,.10);
    pointer-events: none;
    z-index: 0;
}
body.theme-glass .login-box,
body.theme-glass .first-password-dialog {
    background: rgba(255, 255, 255, .74);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
body.theme-glass .login-box::before,
body.theme-glass .first-password-dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.98) 22%, rgba(255,255,255,.55) 78%, transparent);
    pointer-events: none;
}
body.theme-glass .login-box::after,
body.theme-glass .first-password-dialog::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -110px;
    right: -75px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    filter: blur(2px);
    pointer-events: none;
}
body.theme-glass .login-material-label,
body.theme-glass .first-password-material-label {
    color: #405a7d;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 15px;
}

body.theme-glass .sidebar-logo,
body.theme-glass .sidebar-footer { border-color: rgba(106, 131, 168, .22); }
body.theme-glass .sidebar-logo .logo-icon {
    background: linear-gradient(145deg, #70a9ff, #3e73d5);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 8px 18px rgba(54,96,170,.2);
}
body.theme-glass .sidebar-logo .logo-text { color: #243653; }
body.theme-glass .sidebar-logo .logo-sub { color: #70809a; }
body.theme-glass .nav-group-title {
    color: #405a7d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
}
body.theme-glass .nav-item {
    color: #42536e;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.theme-glass .nav-item .nav-icon { color: #6c7e99; }
body.theme-glass .nav-item:hover {
    background: rgba(255, 255, 255, .48);
    color: #1d3558;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
body.theme-glass .nav-item:hover .nav-icon { color: #3f6fae; }
body.theme-glass .nav-item.active {
    background: linear-gradient(100deg, rgba(255,255,255,.86), rgba(215,231,255,.68));
    color: #1e4f9a;
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 7px 18px rgba(77,111,164,.14);
    transform: translateX(2px);
}
body.theme-glass .nav-item.active .nav-icon { color: #2563c7; }
body.theme-glass .sidebar-version { color: #405a7d; font-size: 12px; }
body.theme-glass .sidebar::-webkit-scrollbar { width: 8px; }
body.theme-glass .sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,.2); }
body.theme-glass .sidebar::-webkit-scrollbar-thumb { background: rgba(104,128,163,.28); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
body.theme-glass .sidebar { scrollbar-color: rgba(104,128,163,.42) transparent; scrollbar-width: thin; }

body.theme-glass .topbar {
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.48));
    border-color: var(--glass-line);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.76), 0 8px 26px rgba(43, 66, 105, .08);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
}
body.theme-glass .ep-theme-menu { background: var(--glass-surface-strong); border-color: var(--glass-border); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); }
body.theme-glass .ep-theme-menu button[data-theme-choice]:hover,
body.theme-glass .ep-theme-menu button[data-theme-choice][aria-checked="true"],
body.theme-glass .ep-theme-menu button[data-appearance-choice][aria-checked="true"] { background: rgba(224, 237, 255, .68); }
body.theme-glass .ep-theme-menu button[data-theme-choice]:hover:not([aria-checked="true"]),
body.theme-glass .ep-theme-menu button[data-appearance-choice]:hover:not([aria-checked="true"]) { background: rgba(224, 237, 255, .42); }

body.theme-glass .content-area { position: relative; }
body.theme-glass .card,
body.theme-glass .stat-card,
body.theme-glass .printer-card,
body.theme-glass .supply-printer-panel,
body.theme-glass .download-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(12px) saturate(135%);
    backdrop-filter: blur(12px) saturate(135%);
    position: relative;
    overflow: hidden;
}
body.theme-glass .card::before,
body.theme-glass .stat-card::before,
body.theme-glass .printer-card::before,
body.theme-glass .download-card::before {
    content: "";
    position: absolute;
    inset: 0 8% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
    opacity: .72;
    pointer-events: none;
}
body.theme-glass .stat-card::after {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -30px;
    bottom: -46px;
    border-radius: 50%;
    background: rgba(255,255,255,.19);
    border: 1px solid rgba(255,255,255,.35);
    pointer-events: none;
}
body.theme-glass .ep-dashboard-grid > .card:first-child { background: linear-gradient(145deg, rgba(255,255,255,.67), rgba(236,246,255,.43)); }
body.theme-glass .ep-dashboard-grid > .card:last-child { background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(241,239,255,.45)); }
body.theme-glass .ep-theme-card { border-color: rgba(91,141,229,.32); background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(231,241,255,.48)); }
body.theme-glass .ep-theme-card .card-header { align-items: center; }
body.theme-glass .ep-theme-card .form-select { min-width: 260px; border-radius: 14px; background: rgba(255,255,255,.78); }

body.theme-glass .card-header { border-color: var(--glass-line); }
body.theme-glass .card-title,
body.theme-glass .page-title,
body.theme-glass .ep-page-lead h1,
body.theme-glass .ep-page-lead h2 { color: var(--glass-ink); }
body.theme-glass .page-subtitle,
body.theme-glass .ep-page-lead p,
body.theme-glass .stat-card .stat-label { color: var(--glass-muted); }

/* Text hierarchy: keep the atmospheric material, but give every text-bearing
   surface a readable ink layer. These rules are scoped to Glass only. */
body.theme-glass .page-title,
body.theme-glass .topbar-title { font-size: 20px; line-height: 1.3; font-weight: 750; color: #142946; }
body.theme-glass .card-title,
body.theme-glass .ep-primary-copy,
body.theme-glass .ep-printer-status-name,
body.theme-glass .vc-section-title { font-size: 16px; line-height: 1.4; font-weight: 700; color: #142946; }
body.theme-glass .page-subtitle,
body.theme-glass .ep-secondary-copy,
body.theme-glass .printer-meta,
body.theme-glass .field-hint,
body.theme-glass .upload-subtext,
body.theme-glass .ep-table-meta,
body.theme-glass .ep-queue-count,
body.theme-glass .scanner-card-subtitle,
body.theme-glass .scanner-field-hint,
body.theme-glass .scanner-meta-label,
body.theme-glass .feedback-subtitle,
body.theme-glass .ep-support-subtitle,
body.theme-glass .vc-muted,
body.theme-glass .nav-group-title,
body.theme-glass .sidebar-version { font-size: 13px; line-height: 1.55; color: var(--glass-secondary); }
body.theme-glass .empty-state,
body.theme-glass .empty-state p,
body.theme-glass .ep-diagnostic-step,
body.theme-glass .form-help { font-size: 13px; line-height: 1.55; color: var(--glass-secondary); }
body.theme-glass .form-label { color: #274362; font-weight: 650; }

body.theme-glass .btn-primary {
    background: linear-gradient(135deg, var(--glass-blue), #4f8df7);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
    border-color: rgba(255,255,255,.52);
    border-radius: 12px;
}
body.theme-glass .btn-primary:hover { background: linear-gradient(135deg, var(--glass-blue-deep), var(--glass-blue)); }
body.theme-glass .btn-default {
    background: rgba(255, 255, 255, .62);
    border-color: var(--glass-line);
    border-radius: 12px;
}
body.theme-glass .btn:hover { transform: translateY(-1px); }
body.theme-glass .btn:active { transform: translateY(0); }
body.theme-glass .btn:focus-visible,
body.theme-glass .ep-theme-menu button[data-theme-choice]:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), inset 0 0 0 1px var(--glass-highlight);
}
body.theme-glass .form-input,
body.theme-glass .form-select,
body.theme-glass .form-textarea,
body.theme-glass input,
body.theme-glass select,
body.theme-glass textarea {
    background: rgba(255, 255, 255, .72);
    border-color: var(--glass-line);
}
body.theme-glass .form-input:focus,
body.theme-glass .form-select:focus,
body.theme-glass .form-textarea:focus,
body.theme-glass input:focus,
body.theme-glass select:focus,
body.theme-glass textarea:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
body.theme-glass .form-help { color: var(--glass-muted); }

/* Keep dense data readable: tables and scan previews get a stronger surface. */
body.theme-glass .table-container,
body.theme-glass .scanner-preview-card,
body.theme-glass .preview-card,
body.theme-glass .runtime-log {
    background: var(--glass-surface-strong);
}
body.theme-glass table thead th { background: rgba(242, 247, 255, .84); }
body.theme-glass th,
body.theme-glass td { border-color: var(--glass-line); }
body.theme-glass tr:hover td { background: rgba(224, 237, 255, .58); }
body.theme-glass .device-item,
body.theme-glass .file-info,
body.theme-glass .selected-file,
body.theme-glass .ep-subtle-panel { background: rgba(244, 248, 255, .64); }
body.theme-glass .modal-backdrop { background: rgba(19, 34, 62, .38); }
body.theme-glass .modal-card,
body.theme-glass .modal-content,
body.theme-glass .vc-join-dialog { background: var(--glass-surface-strong); border-color: var(--glass-border); box-shadow: 0 24px 70px rgba(20, 38, 72, .25); }
body.theme-glass .status-badge.online,
body.theme-glass .pill-success { background: rgba(220, 252, 231, .78); }
body.theme-glass .flash,
body.theme-glass .alert,
body.theme-glass .toast { border-radius: 14px; box-shadow: 0 8px 24px rgba(38,65,108,.09); }
body.theme-glass .empty-state { background: rgba(255,255,255,.34); border: 1px dashed rgba(80,105,145,.28); border-radius: 16px; }
body.theme-glass .progress-track { background: rgba(126,151,190,.18); }
body.theme-glass .progress-bar { box-shadow: 0 0 16px rgba(37,99,235,.22); }

body.theme-glass :focus-visible { outline: 3px solid rgba(37, 99, 235, .42); outline-offset: 2px; }

@supports not ((backdrop-filter: blur(1px))) {
    body.theme-glass .sidebar { background: linear-gradient(180deg, #f4f8ff, #e4edf9); }
    body.theme-glass .topbar,
    body.theme-glass .card,
    body.theme-glass .stat-card,
    body.theme-glass .printer-card,
    body.theme-glass .supply-printer-panel,
    body.theme-glass .download-card { background: #f8fbff; }
}

@media (max-width: 768px) and (prefers-color-scheme: dark) {
    body.theme-glass.page-dashboard .ep-dashboard-page .card,
    body.theme-glass.page-dashboard .ep-dashboard-page .stat-card,
    body.theme-glass.page-dashboard .ep-dashboard-page .table-container,
    body.theme-glass.page-dashboard .ep-dashboard-page .empty-state,
    body.theme-glass.page-dashboard .ep-dashboard-page .ep-printer-status-row {
        -webkit-backdrop-filter: blur(5px) saturate(115%) !important;
        backdrop-filter: blur(5px) saturate(115%) !important;
    }
    body.theme-glass.page-printers .content-area > .card,
    body.theme-glass.page-printers .content-area > .printer-card,
    body.theme-glass.page-printers .printer-card,
    body.theme-glass.page-printers .empty-state,
    body.theme-glass.page-printers .ep-subtle-panel {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}

/* Manual appearance modes use the same browser-local preference as the
   header menu and settings page.  These selectors mirror the audited dark
   surfaces without changing the server-side theme or business behavior. */
html[data-ep-appearance="dark"] body.theme-glass {
    color-scheme: dark;
    --glass-ink: #f1f6ff;
    --glass-muted: #c4d3e8;
    --glass-secondary: #c4d3e8;
    --glass-surface: rgba(16, 20, 29, .62);
    --glass-surface-strong: rgba(12, 16, 24, .74);
    --glass-border: rgba(166, 190, 226, .3);
    --glass-line: rgba(166, 190, 226, .24);
    --glass-selected-bg: linear-gradient(135deg, rgba(48, 101, 190, .76), rgba(83, 139, 224, .58));
    --glass-selected-text: #f4f8ff;
    --glass-selected-icon: #d8e9ff;
    --glass-selected-border: rgba(183, 218, 255, .56);
    --glass-selected-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 8px 20px rgba(11,32,72,.42);
    background:
        radial-gradient(ellipse 54% 42% at 96% 8%, rgba(92,66,166,.24), transparent 70%),
        radial-gradient(ellipse 48% 38% at 70% 100%, rgba(29,118,126,.16), transparent 70%),
        linear-gradient(135deg, #070a12 0%, #0b1220 46%, #111328 100%) !important;
    color: var(--glass-ink) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .main-content,
html[data-ep-appearance="dark"] body.theme-glass .content-area,
html[data-ep-appearance="dark"] body.theme-glass .local-print-body { background: transparent !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass .sidebar {
    background: linear-gradient(180deg, rgba(12,18,30,.78), rgba(5,9,16,.66)), radial-gradient(circle at 18% 0%, rgba(116,157,230,.14), transparent 40%) !important;
    border-right-color: rgba(166,190,226,.24) !important;
    color: var(--glass-ink) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .topbar,
html[data-ep-appearance="dark"] body.theme-glass .local-print-topbar { background: linear-gradient(180deg, rgba(15,22,36,.72), rgba(7,11,19,.56)) !important; border-color: rgba(166,190,226,.24) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass .card,
html[data-ep-appearance="dark"] body.theme-glass .stat-card,
html[data-ep-appearance="dark"] body.theme-glass .printer-card,
html[data-ep-appearance="dark"] body.theme-glass .supply-card,
html[data-ep-appearance="dark"] body.theme-glass .supply-printer-panel,
html[data-ep-appearance="dark"] body.theme-glass .download-card,
html[data-ep-appearance="dark"] body.theme-glass .modal-card,
html[data-ep-appearance="dark"] body.theme-glass .modal-content,
html[data-ep-appearance="dark"] body.theme-glass .feedback-dialog,
html[data-ep-appearance="dark"] body.theme-glass .vc-join-dialog,
html[data-ep-appearance="dark"] body.theme-glass .ep-support-dialog { background: linear-gradient(145deg, rgba(14,18,28,.72), rgba(7,10,17,.58) 58%, rgba(24,28,43,.64)) !important; color: var(--glass-ink) !important; border-color: var(--glass-border) !important; box-shadow: var(--glass-shadow) !important; }
html[data-ep-appearance="dark"] body.theme-glass .page-title,
html[data-ep-appearance="dark"] body.theme-glass .topbar-title,
html[data-ep-appearance="dark"] body.theme-glass .card-title,
html[data-ep-appearance="dark"] body.theme-glass label,
html[data-ep-appearance="dark"] body.theme-glass .form-label { color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass .page-subtitle,
html[data-ep-appearance="dark"] body.theme-glass .form-help,
html[data-ep-appearance="dark"] body.theme-glass .field-hint,
html[data-ep-appearance="dark"] body.theme-glass .printer-meta { color: var(--glass-secondary) !important; }
html[data-ep-appearance="dark"] body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html[data-ep-appearance="dark"] body.theme-glass select,
html[data-ep-appearance="dark"] body.theme-glass textarea { background: rgba(9,13,21,.68) !important; color: var(--glass-ink) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="dark"] body.theme-glass .table-container,
html[data-ep-appearance="dark"] body.theme-glass .scanner-preview-card,
html[data-ep-appearance="dark"] body.theme-glass .preview-card,
html[data-ep-appearance="dark"] body.theme-glass .runtime-log { background: rgba(12,16,24,.74) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass table thead th { background: rgba(24,30,44,.86) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass th,
html[data-ep-appearance="dark"] body.theme-glass td { border-color: var(--glass-line) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="dark"] body.theme-glass .empty-state,
html[data-ep-appearance="dark"] body.theme-glass .ep-subtle-panel,
html[data-ep-appearance="dark"] body.theme-glass .info-banner,
html[data-ep-appearance="dark"] body.theme-glass .notice,
html[data-ep-appearance="dark"] body.theme-glass .update-box { background: rgba(16,20,29,.62) !important; color: var(--glass-secondary) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="dark"] body.theme-glass .nav-item { color: #d7e5f8 !important; }
html[data-ep-appearance="dark"] body.theme-glass .nav-item:hover:not(.active) { background: rgba(125,167,231,.18) !important; color: #fff !important; }
html[data-ep-appearance="dark"] body.theme-glass .nav-item.active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; }
html[data-ep-appearance="dark"] body.theme-glass .nav-item.active .nav-icon { color: var(--glass-selected-icon) !important; }
html[data-ep-appearance="dark"] body.theme-glass .btn-default,
html[data-ep-appearance="dark"] body.theme-glass .ep-theme-menu { background: rgba(16,20,29,.72) !important; color: var(--glass-ink) !important; border-color: var(--glass-border) !important; }

@media (prefers-color-scheme: dark) {
    /* Explicit Light must win over style.css' legacy dark !important rules. */
    html[data-ep-appearance="light"] body.theme-glass {
        color-scheme: light;
        --glass-ink: #142946;
        --glass-muted: #405a7d;
        --glass-secondary: #405a7d;
        background: radial-gradient(circle at 4% 2%, rgba(106,176,255,.38), transparent 27%), radial-gradient(circle at 96% 9%, rgba(182,156,255,.32), transparent 25%), radial-gradient(circle at 70% 95%, rgba(114,217,207,.18), transparent 28%), linear-gradient(135deg, #e9f3ff 0%, #f7f9fd 47%, #e9eefb 100%) !important;
        color: var(--glass-ink) !important;
    }
    html[data-ep-appearance="light"] body.theme-glass .main-content,
    html[data-ep-appearance="light"] body.theme-glass .content-area,
    html[data-ep-appearance="light"] body.theme-glass .local-print-body { background: transparent !important; color: var(--glass-ink) !important; }
    html[data-ep-appearance="light"] body.theme-glass .sidebar { background: linear-gradient(180deg, rgba(245,249,255,.92), rgba(224,235,249,.78)), radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 34%) !important; color-scheme: light !important; border-right-color: rgba(255,255,255,.82) !important; }
    html[data-ep-appearance="light"] body.theme-glass .topbar,
    html[data-ep-appearance="light"] body.theme-glass .local-print-topbar { background: linear-gradient(180deg, rgba(246,250,255,.72), rgba(222,234,252,.32)) !important; border-color: rgba(255,255,255,.64) !important; color: var(--glass-ink) !important; }
    html[data-ep-appearance="light"] body.theme-glass .card,
    html[data-ep-appearance="light"] body.theme-glass .stat-card,
    html[data-ep-appearance="light"] body.theme-glass .printer-card,
    html[data-ep-appearance="light"] body.theme-glass .modal-card,
    html[data-ep-appearance="light"] body.theme-glass .modal-content,
    html[data-ep-appearance="light"] body.theme-glass .feedback-dialog,
    html[data-ep-appearance="light"] body.theme-glass .vc-join-dialog { background: rgba(255,255,255,.72) !important; color: var(--glass-ink) !important; border-color: rgba(255,255,255,.82) !important; }
    html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .card,
    html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .stat-card,
    html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .table-container,
    html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .empty-state,
    html[data-ep-appearance="light"] body.theme-glass.page-printers .content-area > .card,
    html[data-ep-appearance="light"] body.theme-glass.page-printers .content-area > .printer-card,
    html[data-ep-appearance="light"] body.theme-glass.page-printers .printer-card,
    html[data-ep-appearance="light"] body.theme-glass.page-printers .empty-state {
        background: rgba(255,255,255,.72) !important;
        border-color: rgba(255,255,255,.82) !important;
        color: var(--glass-ink) !important;
        -webkit-backdrop-filter: blur(8px) saturate(135%) !important;
        backdrop-filter: blur(8px) saturate(135%) !important;
    }
    html[data-ep-appearance="light"] body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
    html[data-ep-appearance="light"] body.theme-glass select,
    html[data-ep-appearance="light"] body.theme-glass textarea { background: rgba(255,255,255,.78) !important; color: var(--glass-ink) !important; border-color: rgba(116,145,190,.3) !important; }
    html[data-ep-appearance="light"] body.theme-glass .nav-item { color: #324d73 !important; }
    html[data-ep-appearance="light"] body.theme-glass .nav-item.active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; }
}

/* Light Glass fallback declarations shared with the existing appearance
   media block.  The final precedence guard at EOF is authoritative when the
   host OS is dark and legacy style.css contributes !important rules. */
html[data-ep-appearance="light"] body.theme-glass {
    color-scheme: light !important;
    --glass-ink: #142946;
    --glass-muted: #5d6e88;
    --glass-secondary: #405a7d;
    --glass-surface: rgba(255,255,255,.56);
    --glass-surface-strong: rgba(255,255,255,.78);
    --glass-border: rgba(255,255,255,.82);
    --glass-line: rgba(80,105,145,.22);
    --glass-button-quiet-bg: rgba(255,255,255,.28);
    background: radial-gradient(circle at 4% 2%, rgba(106,176,255,.38), transparent 27%), radial-gradient(circle at 96% 9%, rgba(182,156,255,.32), transparent 25%), radial-gradient(circle at 70% 95%, rgba(114,217,207,.18), transparent 28%), linear-gradient(135deg, #e9f3ff 0%, #f7f9fd 47%, #e9eefb 100%) !important;
    color: var(--glass-ink) !important;
}
html[data-ep-appearance="light"] body.theme-glass .main-content,
html[data-ep-appearance="light"] body.theme-glass .content-area,
html[data-ep-appearance="light"] body.theme-glass .local-print-body { background: transparent !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar { background: linear-gradient(180deg, rgba(245,249,255,.92), rgba(224,235,249,.78)), radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 34%) !important; color: var(--glass-ink) !important; border-right-color: rgba(255,255,255,.82) !important; }
html[data-ep-appearance="light"] body.theme-glass .topbar,
html[data-ep-appearance="light"] body.theme-glass .local-print-topbar { background: linear-gradient(180deg, rgba(246,250,255,.72), rgba(222,234,252,.32)) !important; color: var(--glass-ink) !important; border-color: rgba(255,255,255,.64) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar-logo .logo-text,
html[data-ep-appearance="light"] body.theme-glass .topbar-title,
html[data-ep-appearance="light"] body.theme-glass .page-title,
html[data-ep-appearance="light"] body.theme-glass .card-title { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar-logo .logo-sub,
html[data-ep-appearance="light"] body.theme-glass .sidebar-version,
html[data-ep-appearance="light"] body.theme-glass .nav-group-title { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item { color: #42536e !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item:hover:not(.active) { background: rgba(255,255,255,.48) !important; color: #1d3558 !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item.active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; }

html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu {
    background: var(--glass-surface-strong) !important;
    color: var(--glass-ink) !important;
    border-color: var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
}
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu-heading { color: var(--glass-muted) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice],
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice] { background: transparent !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice]:hover:not([aria-checked="true"]),
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice]:hover:not([aria-checked="true"]) { background: rgba(224,237,255,.42) !important; color: #1e4f9a !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice][aria-checked="true"],
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice][aria-checked="true"] { background: rgba(224,237,255,.68) !important; color: #1e4f9a !important; }

html[data-ep-appearance="light"] body.theme-glass .card,
html[data-ep-appearance="light"] body.theme-glass .stat-card,
html[data-ep-appearance="light"] body.theme-glass .printer-card,
html[data-ep-appearance="light"] body.theme-glass .supply-card,
html[data-ep-appearance="light"] body.theme-glass .supply-printer-panel,
html[data-ep-appearance="light"] body.theme-glass .download-card,
html[data-ep-appearance="light"] body.theme-glass .modal-card,
html[data-ep-appearance="light"] body.theme-glass .modal-content,
html[data-ep-appearance="light"] body.theme-glass .feedback-dialog,
html[data-ep-appearance="light"] body.theme-glass .vc-card,
html[data-ep-appearance="light"] body.theme-glass .vc-join-dialog,
html[data-ep-appearance="light"] body.theme-glass .ep-support-dialog,
html[data-ep-appearance="light"] body.theme-glass .ep-device-dialog { background: rgba(255,255,255,.72) !important; color: var(--glass-ink) !important; border-color: rgba(255,255,255,.82) !important; }
html[data-ep-appearance="light"] body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html[data-ep-appearance="light"] body.theme-glass select,
html[data-ep-appearance="light"] body.theme-glass textarea,
html[data-ep-appearance="light"] body.theme-glass .form-input,
html[data-ep-appearance="light"] body.theme-glass .form-select,
html[data-ep-appearance="light"] body.theme-glass .form-textarea { background: rgba(255,255,255,.78) !important; color: var(--glass-ink) !important; border-color: rgba(116,145,190,.3) !important; }

html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tabs,
html[data-ep-appearance="light"] body.theme-glass .scanner-empty,
html[data-ep-appearance="light"] body.theme-glass .scanner-device-summary,
html[data-ep-appearance="light"] body.theme-glass .scanner-job-details,
html[data-ep-appearance="light"] body.theme-glass .scanner-duplex-note,
html[data-ep-appearance="light"] body.theme-glass .scanner-output-row,
html[data-ep-appearance="light"] body.theme-glass .scanner-message,
html[data-ep-appearance="light"] body.theme-glass .scanner-result-tools,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-create,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-status,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-metrics > div,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-pending,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-batch-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-ocr-text-panel,
html[data-ep-appearance="light"] body.theme-glass .scanner-preview-frame {
    background: rgba(255,255,255,.58) !important;
    border-color: var(--glass-line) !important;
    color: var(--glass-secondary) !important;
}
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab:hover:not(.is-active):not([aria-selected="true"]),
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item:hover:not(.is-active) { background: rgba(224,237,255,.42) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab.is-active,
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab[aria-selected="true"],
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item.is-active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; border-color: var(--glass-selected-border) !important; box-shadow: var(--glass-selected-shadow) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-empty strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-output-row strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-detail-header strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item-title,
html[data-ep-appearance="light"] body.theme-glass .scanner-ocr-text-panel pre,
html[data-ep-appearance="light"] body.theme-glass .scanner-meta-label,
html[data-ep-appearance="light"] body.theme-glass .scanner-meta-row { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-empty-icon,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-column-title,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item-meta,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-storage,
html[data-ep-appearance="light"] body.theme-glass .scanner-edit-summary,
html[data-ep-appearance="light"] body.theme-glass .scanner-progress-labels { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-preview-stage { background: rgba(232,240,252,.72) !important; }

/* Cloud print, virtual-client and maintenance sub-panels inherit classic
   fallback colors in their feature templates; restore the Light Glass
   material without touching QR/document paper-white exceptions. */
html[data-ep-appearance="light"] body.theme-glass .ep-subtle-panel,
html[data-ep-appearance="light"] body.theme-glass .ep-technical-details > summary,
html[data-ep-appearance="light"] body.theme-glass .ep-account-extras > summary,
html[data-ep-appearance="light"] body.theme-glass .ep-device-item,
html[data-ep-appearance="light"] body.theme-glass .ep-device-body,
html[data-ep-appearance="light"] body.theme-glass .vc-note,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-block,
html[data-ep-appearance="light"] body.theme-glass .cloud-account-card,
html[data-ep-appearance="light"] body.theme-glass .cloud-device-card,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid > a,
html[data-ep-appearance="light"] body.theme-glass .info-banner,
html[data-ep-appearance="light"] body.theme-glass .update-box,
html[data-ep-appearance="light"] body.theme-glass .notice,
html[data-ep-appearance="light"] body.theme-glass .uri,
html[data-ep-appearance="light"] body.theme-glass .empty-state { background: rgba(255,255,255,.58) !important; color: var(--glass-secondary) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-device-name,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid strong,
html[data-ep-appearance="light"] body.theme-glass .update-box strong,
html[data-ep-appearance="light"] body.theme-glass .empty-state strong,
html[data-ep-appearance="light"] body.theme-glass .empty-state p,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-title,
html[data-ep-appearance="light"] body.theme-glass .miniapp-copy strong { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-device-meta,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid small,
html[data-ep-appearance="light"] body.theme-glass .small-note,
html[data-ep-appearance="light"] body.theme-glass .steps li,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-hint,
html[data-ep-appearance="light"] body.theme-glass .miniapp-copy span { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass input[type="file"] { background: rgba(255,255,255,.78) !important; color: var(--glass-secondary) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass input[type="file"]::file-selector-button { background: rgba(224,237,255,.7) !important; color: var(--glass-ink) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass .miniapp-qr { background: #fff !important; }

@media (prefers-reduced-motion: reduce) {
    body.theme-glass *, body.theme-glass *::before, body.theme-glass *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 768px) {
    body.theme-glass .sidebar { box-shadow: 18px 0 42px rgba(48, 77, 119, .2); }
    body.theme-glass .card,
    body.theme-glass .stat-card,
    body.theme-glass .printer-card,
    body.theme-glass .supply-printer-panel {
        -webkit-backdrop-filter: blur(8px) saturate(125%);
        backdrop-filter: blur(8px) saturate(125%);
        border-radius: 16px;
    }
    body.theme-glass .glass-orbit { width: 300px; }
    body.theme-glass .glass-orbit-a { top: -9%; left: -30%; }
    body.theme-glass .glass-orbit-b { right: -38%; bottom: -11%; }
    body.theme-glass .glass-shard { right: -8%; top: 12%; width: 120px; height: 120px; }
    body.theme-glass .login-material-label,
    body.theme-glass .first-password-material-label { font-size: 11px; letter-spacing: .1em; }
}

/* Liquid Glass V3 dashboard specimen: a deeper atmosphere with lighter,
   translucent surfaces. The classic theme is intentionally untouched. */
body.theme-glass {
    background:
        radial-gradient(ellipse 58% 46% at 12% 4%, rgba(93, 169, 255, .48), transparent 68%),
        radial-gradient(ellipse 52% 42% at 94% 12%, rgba(157, 126, 255, .44), transparent 70%),
        radial-gradient(ellipse 58% 46% at 74% 100%, rgba(91, 204, 196, .26), transparent 68%),
        linear-gradient(135deg, #d9eaff 0%, #edf3ff 42%, #e7e5fb 100%);
}
body.theme-glass::before {
    content: "";
    position: fixed;
    inset: -18%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.34), transparent 18%),
        radial-gradient(circle at 76% 32%, rgba(255,255,255,.22), transparent 16%),
        radial-gradient(circle at 48% 86%, rgba(104,146,234,.14), transparent 24%);
}
body.theme-glass::after {
    content: "";
    position: fixed;
    width: min(62vw, 860px);
    height: min(62vw, 860px);
    right: -18vw;
    top: 9vh;
    z-index: 0;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    box-shadow: inset 24px 20px 70px rgba(255,255,255,.16), 0 0 100px rgba(132,104,224,.12);
    transform: rotate(18deg);
}
body.theme-glass .layout { position: relative; z-index: 1; }
body.theme-glass .main-content { background: transparent; }
body.theme-glass .sidebar {
    background:
        linear-gradient(180deg, rgba(244, 249, 255, .72), rgba(211, 226, 247, .58)),
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.66), transparent 38%);
    border-right-color: rgba(255,255,255,.64);
    box-shadow: inset -1px 0 rgba(96,125,166,.12), 20px 0 50px rgba(48,77,119,.16);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
}
body.theme-glass .topbar {
    background: linear-gradient(180deg, rgba(246,250,255,.46), rgba(222,234,252,.18));
    border-bottom-color: rgba(255,255,255,.46);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.5), 0 12px 32px rgba(51,76,125,.11);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
}
body.theme-glass .content-area { background: transparent; }
body.theme-glass .content-area::before {
    content: "";
    position: absolute;
    width: min(72vw, 900px);
    height: min(40vw, 520px);
    top: -170px;
    right: -220px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    box-shadow: inset 18px 16px 50px rgba(255,255,255,.14);
    pointer-events: none;
}
body.theme-glass .ep-dashboard-page .card,
body.theme-glass .ep-dashboard-page .stat-card {
    background:
        linear-gradient(135deg, rgba(255,255,255,.42), rgba(229,240,255,.22) 52%, rgba(224,219,255,.2));
    border-color: rgba(255,255,255,.62);
    box-shadow: 0 24px 62px rgba(43,68,118,.14), inset 0 1px 0 rgba(255,255,255,.74);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
}
body.theme-glass .ep-dashboard-page .card::after,
body.theme-glass .ep-dashboard-page .stat-card::after {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.28), rgba(174,204,255,.08) 56%, transparent 72%);
    border-color: rgba(255,255,255,.3);
}
body.theme-glass .ep-dashboard-grid > .card:first-child,
body.theme-glass .ep-dashboard-grid > .card:last-child {
    background: linear-gradient(135deg, rgba(255,255,255,.38), rgba(220,237,255,.17) 54%, rgba(205,210,255,.2));
}
body.theme-glass .ep-dashboard-page .stat-card.success { background: linear-gradient(135deg, rgba(225,255,241,.45), rgba(196,236,224,.2)); }
body.theme-glass .ep-dashboard-page .stat-card.warning { background: linear-gradient(135deg, rgba(255,244,211,.46), rgba(255,222,172,.16)); }
body.theme-glass .ep-dashboard-page .ep-printer-status-row,
body.theme-glass .ep-dashboard-page .empty-state {
    background: rgba(238,247,255,.25);
    border-color: rgba(255,255,255,.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.48);
}
body.theme-glass .ep-dashboard-page .ep-dashboard-notice {
    background: linear-gradient(105deg, rgba(255,246,211,.34), rgba(255,255,255,.2));
    border-color: rgba(255,255,255,.54);
    box-shadow: 0 12px 32px rgba(86,77,54,.1), inset 0 1px 0 rgba(255,255,255,.62);
}
body.theme-glass .ep-dashboard-page .ep-primary-action,
body.theme-glass .ep-dashboard-page .ep-secondary-action {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.56);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.58), 0 12px 25px rgba(54,81,133,.1);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    backdrop-filter: blur(14px) saturate(145%);
}
body.theme-glass .ep-dashboard-page .ep-primary-action {
    background: linear-gradient(135deg, rgba(46,113,234,.9), rgba(108,153,250,.68));
}
body.theme-glass .ep-dashboard-page .ep-primary-action:hover { background: linear-gradient(135deg, rgba(35,91,202,.94), rgba(82,132,234,.8)); }
body.theme-glass .ep-dashboard-page .ep-secondary-action { background: rgba(239,247,255,.28); color: var(--glass-ink); }
body.theme-glass .ep-dashboard-page .ep-secondary-action:hover { background: rgba(255,255,255,.44); border-color: rgba(255,255,255,.76); }
body.theme-glass .modal-card,
body.theme-glass .modal-content,
body.theme-glass .vc-join-dialog {
    background: linear-gradient(135deg, rgba(249,252,255,.68), rgba(218,233,255,.46));
    border-color: rgba(255,255,255,.72);
    box-shadow: 0 30px 90px rgba(24,45,88,.28), inset 0 1px 0 rgba(255,255,255,.84);
}
@media (max-width: 768px) {
    body.theme-glass::after { width: 520px; height: 520px; right: -290px; top: 16vh; }
    body.theme-glass .ep-dashboard-page .card,
    body.theme-glass .ep-dashboard-page .stat-card { -webkit-backdrop-filter: blur(10px) saturate(135%); backdrop-filter: blur(10px) saturate(135%); }
}

/* V3 performance boundary: dense pages use static translucent surfaces. Only
   the Dashboard specimen receives a small, bounded blur budget. */
body.theme-glass .card,
body.theme-glass .stat-card,
body.theme-glass .printer-card,
body.theme-glass .supply-printer-panel,
body.theme-glass .download-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
body.theme-glass .ep-dashboard-page .card,
body.theme-glass .ep-dashboard-page .stat-card {
    -webkit-backdrop-filter: blur(8px) saturate(135%);
    backdrop-filter: blur(8px) saturate(135%);
}
body.theme-glass .sidebar,
body.theme-glass .topbar {
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
}
body.theme-glass .ep-primary-action,
body.theme-glass .ep-secondary-action {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* First-use and notification dialogs are part of the same material system,
   while their text remains on a high-contrast content surface. */
body.theme-glass .ep-modal-mask {
    background: rgba(23, 40, 76, .34);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
body.theme-glass .ep-modal-mask .ep-modal {
    background:
        linear-gradient(135deg, rgba(250,253,255,.78), rgba(221,237,255,.62) 58%, rgba(232,225,255,.62)),
        radial-gradient(circle at 8% 0%, rgba(255,255,255,.72), transparent 42%);
    border: 1px solid rgba(255,255,255,.84);
    box-shadow: 0 30px 90px rgba(24,45,88,.30), inset 0 1px 0 rgba(255,255,255,.92);
    color: var(--glass-ink);
    position: relative;
    overflow: hidden;
}
body.theme-glass .ep-modal-mask .ep-modal::before {
    content: "";
    position: absolute;
    inset: 0 10% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.98), transparent);
    pointer-events: none;
}
body.theme-glass .ep-modal-mask .ep-modal-head,
body.theme-glass .ep-modal-mask .ep-modal-actions { position: relative; z-index: 1; }
body.theme-glass .ep-modal-mask .ep-modal-actions { border-top: 1px solid rgba(91,121,169,.16); padding-top: 14px; }

@media (max-width: 768px) {
    body.theme-glass .ep-dashboard-page .card,
    body.theme-glass .ep-dashboard-page .stat-card {
        -webkit-backdrop-filter: blur(5px) saturate(125%);
        backdrop-filter: blur(5px) saturate(125%);
    }
}

/* V3 controls and selected states: one static material language for controls
   across feature pages. These rules intentionally avoid per-control blur so
   dense scanner, driver and queue pages stay within the existing performance
   budget. */
body.theme-glass .nav-item.active,
body.theme-glass .scanner-mode-tab.is-active,
body.theme-glass .scanner-mode-tab[aria-selected="true"],
body.theme-glass .scanner-toggle-button.is-active,
body.theme-glass .scanner-toggle-button[aria-pressed="true"],
body.theme-glass .scanner-project-list-item.is-active,
body.theme-glass .feedback-tab.active,
body.theme-glass .fnos-settings-tabs button.active,
body.theme-glass .ep-theme-menu button[data-theme-choice][aria-checked="true"] {
    background: var(--glass-selected-bg);
    color: var(--glass-selected-text);
    border-color: var(--glass-selected-border);
    box-shadow: var(--glass-selected-shadow);
}
body.theme-glass .nav-item.active .nav-icon { color: var(--glass-selected-icon); }
body.theme-glass .scanner-mode-tab,
body.theme-glass .scanner-toggle-button,
body.theme-glass .feedback-tab,
body.theme-glass .fnos-settings-tabs button,
body.theme-glass .ep-theme-menu button[data-theme-choice] {
    border: 1px solid transparent;
    transition: background-color .18s ease, background-image .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.theme-glass .scanner-mode-tab:hover:not(.is-active):not([aria-selected="true"]),
body.theme-glass .scanner-toggle-button:hover:not(:disabled):not(.is-active):not([aria-pressed="true"]),
body.theme-glass .feedback-tab:hover:not(.active),
body.theme-glass .fnos-settings-tabs button:hover:not(.active),
body.theme-glass .ep-theme-menu button[data-theme-choice]:hover:not([aria-checked="true"]) {
    background: var(--glass-button-quiet-bg);
    color: var(--glass-selected-text);
    border-color: rgba(255,255,255,.58);
}
body.theme-glass .scanner-mode-tab:focus-visible,
body.theme-glass .scanner-toggle-button:focus-visible,
body.theme-glass .scanner-project-list-item:focus-visible,
body.theme-glass .feedback-tab:focus-visible,
body.theme-glass .fnos-settings-tabs button:focus-visible,
body.theme-glass .ep-theme-menu button[data-theme-choice]:focus-visible {
    outline: 2px solid rgba(37,99,235,.72);
    outline-offset: 2px;
}
body.theme-glass .scanner-mode-tab:active,
body.theme-glass .scanner-toggle-button:active:not(:disabled):not([aria-busy="true"]),
body.theme-glass .feedback-tab:active:not([aria-busy="true"]),
body.theme-glass .fnos-settings-tabs button:active:not([aria-busy="true"]) {
    transform: translateY(1px);
    box-shadow: inset 0 1px 3px rgba(47,76,127,.16);
}
body.theme-glass .scanner-toggle-button:disabled,
body.theme-glass .scanner-mode-tab:disabled,
body.theme-glass .feedback-tab:disabled,
body.theme-glass .fnos-settings-tabs button:disabled {
    opacity: .52;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

body.theme-glass .btn-primary,
body.theme-glass .ep-primary-action {
    background: var(--glass-button-primary-bg);
    border: 1px solid rgba(255,255,255,.58);
    border-radius: var(--glass-control-radius);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px rgba(37,99,235,.2);
    color: #fff;
}
body.theme-glass .btn-primary:hover:not(:disabled):not([aria-busy="true"]),
body.theme-glass .ep-primary-action:hover:not(:disabled):not([aria-busy="true"]) {
    background: var(--glass-button-primary-hover);
    transform: translateY(-1px);
}
body.theme-glass .btn-default,
body.theme-glass .ep-secondary-action,
body.theme-glass .preview-nav-btn {
    background: var(--glass-button-secondary-bg);
    border: 1px solid rgba(116,145,190,.28);
    border-radius: var(--glass-control-radius);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 5px 14px rgba(58,86,132,.08);
    color: var(--glass-ink);
}
body.theme-glass .btn-default:hover:not(:disabled):not([aria-busy="true"]),
body.theme-glass .ep-secondary-action:hover:not(:disabled):not([aria-busy="true"]),
body.theme-glass .preview-nav-btn:hover:not(:disabled):not([aria-busy="true"]) {
    background: var(--glass-button-secondary-hover);
    border-color: rgba(85,127,190,.44);
    color: var(--glass-selected-text);
    transform: translateY(-1px);
}
body.theme-glass .btn-success { background: var(--glass-button-success-bg); color: #fff; border-color: rgba(255,255,255,.5); }
body.theme-glass .btn-danger { background: var(--glass-button-danger-bg); color: #fff; border-color: rgba(255,255,255,.5); }
body.theme-glass .btn-success:hover:not(:disabled):not([aria-busy="true"]),
body.theme-glass .btn-danger:hover:not(:disabled):not([aria-busy="true"]) { transform: translateY(-1px); }
body.theme-glass .btn:focus-visible {
    outline: 2px solid rgba(37,99,235,.72);
    outline-offset: 2px;
}
body.theme-glass .btn:active:not(:disabled):not([aria-busy="true"]) {
    transform: translateY(1px);
    box-shadow: inset 0 1px 3px rgba(47,76,127,.18);
}
body.theme-glass .btn:disabled,
body.theme-glass .btn[aria-busy="true"] {
    opacity: .54;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
body.theme-glass .btn-sm { border-radius: var(--glass-control-radius-sm); min-height: 30px; }
body.theme-glass .btn-lg { border-radius: 14px; min-height: 44px; }
body.theme-glass .scanner-project-list-item {
    border-color: rgba(116,145,190,.28);
    background: rgba(255,255,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.38);
}
body.theme-glass .scanner-project-list-item:hover:not(.is-active) {
    border-color: rgba(85,127,190,.44);
    background: rgba(255,255,255,.42);
}
body.theme-glass .scanner-project-list-item:focus-visible { outline: 2px solid rgba(37,99,235,.72); outline-offset: 2px; }
body.theme-glass .ep-theme-menu button[data-theme-choice] { border: 1px solid transparent; }
body.theme-glass .ep-theme-menu button[data-theme-choice][aria-checked="true"] { border-color: var(--glass-selected-border); }
body.theme-glass .feedback-tab.active { border: 1px solid var(--glass-selected-border); }

/* Loading is a visual lock, even when a caller has not yet added the native
   disabled attribute. Keep it from looking hoverable or pressable. */
body.theme-glass .btn[aria-busy="true"]:hover,
body.theme-glass .btn[aria-busy="true"]:active,
body.theme-glass .ep-primary-action[aria-busy="true"]:hover,
body.theme-glass .ep-primary-action[aria-busy="true"]:active,
body.theme-glass .ep-secondary-action[aria-busy="true"]:hover,
body.theme-glass .ep-secondary-action[aria-busy="true"]:active,
body.theme-glass .preview-nav-btn[aria-busy="true"]:hover,
body.theme-glass .preview-nav-btn[aria-busy="true"]:active {
    transform: none;
    box-shadow: none;
}
body.theme-glass .btn[aria-busy="true"],
body.theme-glass .ep-primary-action[aria-busy="true"],
body.theme-glass .ep-secondary-action[aria-busy="true"],
body.theme-glass .preview-nav-btn[aria-busy="true"] {
    transition: none;
}

/* Secondary surfaces: keep feedback, support, virtual-client and local-print
   flows in the same material language without adding another blur layer. */
body.theme-glass .feedback-overlay,
body.theme-glass .ep-support-overlay,
body.theme-glass .ep-legal-overlay,
body.theme-glass .ep-device-overlay,
body.theme-glass .fnos-retention-modal,
body.theme-glass .local-consumable-qr-backdrop {
    background: rgba(23, 40, 76, .34);
}
body.theme-glass .feedback-dialog,
body.theme-glass .ep-support-dialog,
body.theme-glass .ep-legal-dialog,
body.theme-glass .ep-device-dialog,
body.theme-glass .fnos-retention-dialog,
body.theme-glass .local-consumable-qr-card {
    background: linear-gradient(135deg, rgba(249,252,255,.76), rgba(218,233,255,.5));
    border: 1px solid rgba(255,255,255,.76);
    color: var(--glass-ink);
    box-shadow: 0 28px 82px rgba(24,45,88,.26), inset 0 1px 0 rgba(255,255,255,.86);
}
body.theme-glass .feedback-tabs,
body.theme-glass .feedback-history-item,
body.theme-glass .feedback-file,
body.theme-glass .feedback-privacy,
body.theme-glass .feedback-log-option,
body.theme-glass .feedback-history-reply,
body.theme-glass .ep-support-state,
body.theme-glass .ep-support-messages,
body.theme-glass .ep-support-composer,
body.theme-glass .ep-support-consent,
body.theme-glass .ep-support-message.agent,
body.theme-glass .ep-legal-entry,
body.theme-glass .ep-legal-section,
body.theme-glass .ep-device-item,
body.theme-glass .ep-device-body,
body.theme-glass .vc-note,
body.theme-glass .ep-settings-disclosure-body {
    background: rgba(244,248,255,.48);
    border-color: rgba(116,145,190,.24);
}
body.theme-glass .feedback-dialog {
    overflow-y: auto;
    overflow-x: hidden;
}
body.theme-glass .ep-support-dialog {
    max-height: min(760px, calc(100vh - 32px));
    overflow-y: auto;
    overflow-x: hidden;
}
body.theme-glass .feedback-head,
body.theme-glass .ep-support-head,
body.theme-glass .ep-support-composer {
    border-color: rgba(116,145,190,.2);
}
body.theme-glass .feedback-title,
body.theme-glass .ep-support-title,
body.theme-glass .ep-legal-title,
body.theme-glass .ep-device-title,
body.theme-glass .vc-section-title {
    color: var(--glass-ink);
}
body.theme-glass .feedback-subtitle,
body.theme-glass .feedback-history-meta,
body.theme-glass .feedback-history-time,
body.theme-glass .feedback-history-wait,
body.theme-glass .ep-support-subtitle,
body.theme-glass .ep-support-state,
body.theme-glass .ep-support-empty,
body.theme-glass .ep-support-messagebox,
body.theme-glass .ep-legal-subtitle,
body.theme-glass .ep-device-subtitle,
body.theme-glass .vc-muted,
body.theme-glass .vc-status-grid .label,
body.theme-glass .vc-field label {
    color: var(--glass-muted);
}
body.theme-glass .ep-support-message.system { color: var(--glass-muted); }
body.theme-glass .ep-support-log-request {
    background: rgba(255, 247, 220, .64);
    border-color: rgba(245, 178, 66, .48);
}
body.theme-glass .feedback-reply-toast {
    background: linear-gradient(135deg, rgba(249,252,255,.78), rgba(218,233,255,.54));
    border-color: rgba(255,255,255,.76);
    color: var(--glass-ink);
    box-shadow: 0 18px 50px rgba(24,45,88,.22), inset 0 1px 0 rgba(255,255,255,.82);
}
body.theme-glass .feedback-reply-toast strong { color: var(--glass-selected-text); }
body.theme-glass .feedback-reply-toast span { color: var(--glass-muted); }
body.theme-glass .ep-support-attachment,
body.theme-glass .local-consumable-qr-card img { background: rgba(255,255,255,.72); }

body.theme-glass .vc-card {
    background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(224,237,255,.36));
    border-color: rgba(255,255,255,.72);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,.68);
    color: var(--glass-ink);
}
body.theme-glass .vc-field select,
body.theme-glass .vc-field input[type="text"] {
    background: rgba(255,255,255,.68);
    border-color: var(--glass-line);
    color: var(--glass-ink);
}
body.theme-glass .vc-table th,
body.theme-glass .vc-table td { border-color: var(--glass-line); }
body.theme-glass .vc-table th { background: rgba(242,247,255,.62); }

body.theme-glass .local-print-topbar {
    background: linear-gradient(180deg, rgba(246,250,255,.72), rgba(222,234,252,.32));
    border-bottom: 1px solid rgba(255,255,255,.64);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.58), 0 10px 28px rgba(51,76,125,.1);
}
body.theme-glass .local-qr-mini {
    background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(224,237,255,.36));
    border-color: rgba(255,255,255,.72);
    box-shadow: 0 8px 20px rgba(38,65,108,.1), inset 0 1px 0 rgba(255,255,255,.72);
    color: var(--glass-muted);
}
body.theme-glass .local-consumable-recommend {
    background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(224,237,255,.34));
    border-color: rgba(255,255,255,.7);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,.66);
    color: var(--glass-ink);
}
body.theme-glass .local-consumable-image,
body.theme-glass .local-consumable-qr-card { border-color: rgba(116,145,190,.26); }

/* style.css owns the classic theme's automatic dark mode. Dark Liquid Glass
   follows the operating system without adding a third selectable theme. */
@media (prefers-color-scheme: dark) {
    body.theme-glass {
        overflow-x: clip !important;
        color-scheme: dark;
        --glass-ink: #eff6ff;
        --glass-muted: #c4d3e8;
        --glass-secondary: #c4d3e8;
        --glass-surface: rgba(24, 43, 75, .78);
        --glass-surface-strong: rgba(29, 51, 88, .9);
        --glass-border: rgba(153, 188, 239, .38);
        --glass-line: rgba(154, 184, 223, .3);
        --glass-highlight: rgba(255, 255, 255, .24);
        --glass-shadow: 0 20px 48px rgba(3, 11, 28, .42), 0 2px 10px rgba(3, 11, 28, .28);
        --glass-selected-bg: linear-gradient(135deg, rgba(69, 123, 213, .72), rgba(112, 161, 238, .56));
        --glass-selected-text: #f4f8ff;
        --glass-selected-icon: #d8e9ff;
        --glass-selected-border: rgba(183, 218, 255, .56);
        --glass-selected-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 8px 20px rgba(11,32,72,.42);
        --glass-button-primary-bg: linear-gradient(135deg, #3479e9, #4d8de8);
        --glass-button-primary-hover: linear-gradient(135deg, #4c90ff, #6ba9ff);
        --glass-button-secondary-bg: linear-gradient(135deg, rgba(112,153,216,.42), rgba(66,101,162,.34));
        --glass-button-secondary-hover: linear-gradient(135deg, rgba(135,178,242,.56), rgba(78,119,188,.46));
        --glass-button-quiet-bg: rgba(125,167,231,.18);
        background:
            radial-gradient(ellipse 58% 46% at 12% 4%, rgba(46, 102, 180, .52), transparent 68%),
            radial-gradient(ellipse 52% 42% at 94% 12%, rgba(104, 75, 176, .44), transparent 70%),
            radial-gradient(ellipse 58% 46% at 74% 100%, rgba(34, 135, 143, .3), transparent 68%),
            linear-gradient(135deg, #101d38 0%, #172b4b 45%, #1e2349 100%) !important;
        color: var(--glass-ink) !important;
    }

    body.theme-glass .layout {
        max-width: 100vw !important;
        overflow-x: clip !important;
    }
    body.theme-glass .main-content,
    body.theme-glass .content-area,
    body.theme-glass .local-print-body {
        background: transparent !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass::before {
        background:
            radial-gradient(circle at 24% 18%, rgba(133,183,255,.12), transparent 18%),
            radial-gradient(circle at 76% 32%, rgba(191,154,255,.1), transparent 16%),
            radial-gradient(circle at 48% 86%, rgba(74,184,190,.1), transparent 24%);
    }
    body.theme-glass .sidebar {
        background:
            linear-gradient(180deg, rgba(31, 55, 91, .86), rgba(17, 34, 62, .78)),
            radial-gradient(circle at 18% 0%, rgba(139,190,255,.18), transparent 38%) !important;
        border-right-color: rgba(153,188,239,.34) !important;
        color-scheme: dark !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass .topbar,
    body.theme-glass .local-print-topbar {
        background: linear-gradient(180deg, rgba(35,58,96,.84), rgba(24,43,75,.62)) !important;
        border-color: rgba(153,188,239,.3) !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass .sidebar-logo .logo-text,
    body.theme-glass .topbar-title { color: #eff6ff !important; }
    body.theme-glass .sidebar-logo .logo-sub,
    body.theme-glass .sidebar-version { color: #c4d3e8 !important; }
    body.theme-glass .nav-item { color: #d7e5f8 !important; }
    body.theme-glass .nav-item .nav-icon { color: #a9c2e4 !important; }
    body.theme-glass .nav-item:hover:not(.active) { background: rgba(125,167,231,.18) !important; color: #fff !important; }
    body.theme-glass .nav-item.active { color: var(--glass-selected-text) !important; }
    body.theme-glass .nav-item.active .nav-icon { color: var(--glass-selected-icon) !important; }
    body.theme-glass .nav-group-title { color: #c4d3e8 !important; }
    body.theme-glass .topbar-title,
    body.theme-glass .page-title,
    body.theme-glass .card-title,
    body.theme-glass .modal-title,
    body.theme-glass .feedback-title,
    body.theme-glass .vc-join-title { color: var(--glass-ink) !important; }
    body.theme-glass label,
    body.theme-glass .form-label,
    body.theme-glass .form-group > label,
    body.theme-glass .form-check label {
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .page-subtitle,
    body.theme-glass .printer-meta,
    body.theme-glass .field-hint,
    body.theme-glass .upload-subtext,
    body.theme-glass .vc-join-subtitle,
    body.theme-glass .ep-secondary-copy,
    body.theme-glass .scanner-field-hint,
    body.theme-glass .scanner-card-subtitle,
    body.theme-glass .feedback-subtitle,
    body.theme-glass .ep-support-subtitle,
    body.theme-glass .vc-muted,
    body.theme-glass .form-help { color: var(--glass-secondary) !important; }
    body.theme-glass .card,
    body.theme-glass .stat-card,
    body.theme-glass .printer-card,
    body.theme-glass .supply-card,
    body.theme-glass .supply-printer-panel,
    body.theme-glass .supply-model-card,
    body.theme-glass .goods-card,
    body.theme-glass .modal-card,
    body.theme-glass .modal-content,
    body.theme-glass .login-box,
    body.theme-glass .download-card,
    body.theme-glass .feedback-dialog,
    body.theme-glass .vc-join-dialog,
    body.theme-glass .ep-support-dialog,
    body.theme-glass .ep-legal-dialog,
    body.theme-glass .ep-device-dialog,
    body.theme-glass .fnos-retention-dialog,
    body.theme-glass .local-consumable-qr-card,
    body.theme-glass .vc-card,
    body.theme-glass .ep-settings-disclosure-body {
        background: var(--glass-surface-strong) !important;
        color: var(--glass-ink) !important;
        border-color: var(--glass-border) !important;
        box-shadow: var(--glass-shadow) !important;
    }
    body.theme-glass .feedback-tabs,
    body.theme-glass .feedback-history-item,
    body.theme-glass .feedback-file,
    body.theme-glass .feedback-privacy,
    body.theme-glass .feedback-log-option,
    body.theme-glass .ep-support-state,
    body.theme-glass .ep-support-messages,
    body.theme-glass .ep-support-composer,
    body.theme-glass .ep-support-consent,
    body.theme-glass .vc-note,
    body.theme-glass .ep-device-body { background: rgba(61, 89, 137, .48) !important; border-color: var(--glass-line) !important; }
    body.theme-glass .table-container,
    body.theme-glass .scanner-preview-card,
    body.theme-glass .preview-card,
    body.theme-glass .runtime-log { background: var(--glass-surface-strong) !important; }
    body.theme-glass table thead th { background: rgba(53, 82, 128, .82) !important; color: #eff6ff !important; }
    body.theme-glass th,
    body.theme-glass td { border-color: var(--glass-line) !important; color: var(--glass-ink) !important; }
    body.theme-glass tr:hover td { background: rgba(96, 140, 207, .22) !important; }
    body.theme-glass .form-input,
    body.theme-glass .form-select,
    body.theme-glass .form-textarea,
    body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
    body.theme-glass select,
    body.theme-glass textarea {
        background: rgba(35,59,98,.9) !important;
        color: var(--glass-ink) !important;
        border-color: var(--glass-line) !important;
    }
    body.theme-glass .form-input::placeholder,
    body.theme-glass textarea::placeholder { color: #aebfda !important; }
    body.theme-glass .empty-state,
    body.theme-glass .ep-dashboard-page .ep-printer-status-row { background: rgba(61, 89, 137, .42) !important; border-color: var(--glass-line) !important; }
    body.theme-glass .ep-dashboard-page .card,
    body.theme-glass .ep-dashboard-page .stat-card { background: linear-gradient(135deg, rgba(47,76,122,.78), rgba(37,57,101,.7)) !important; border-color: var(--glass-border) !important; }
    body.theme-glass .ep-dashboard-page .stat-card.success { background: linear-gradient(135deg, rgba(28,103,91,.7), rgba(35,77,91,.66)) !important; }
    body.theme-glass .ep-dashboard-page .stat-card.warning { background: linear-gradient(135deg, rgba(117,91,48,.72), rgba(76,65,59,.66)) !important; }
    body.theme-glass .ep-primary-action,
    body.theme-glass .ep-secondary-action { color: var(--glass-ink) !important; }
    body.theme-glass .modal-backdrop,
    body.theme-glass .feedback-overlay,
    body.theme-glass .ep-support-overlay { background: rgba(3, 10, 25, .62) !important; }
    body.theme-glass .status-badge.online,
    body.theme-glass .pill-success { background: rgba(31, 117, 88, .74) !important; color: #dcfff0 !important; }

    /* Feature surfaces must follow Dark Glass too.  These components live in
       feature stylesheets that intentionally keep their classic fallbacks;
       scope the correction here so Classic remains unchanged. */
    body.theme-glass .scanner-mode-tabs,
    body.theme-glass .scanner-empty,
    body.theme-glass .scanner-device-summary,
    body.theme-glass .scanner-job-details,
    body.theme-glass .scanner-duplex-note,
    body.theme-glass .scanner-output-row,
    body.theme-glass .scanner-message,
    body.theme-glass .scanner-result-tools,
    body.theme-glass .scanner-project-create,
    body.theme-glass .scanner-project-list-item,
    body.theme-glass .scanner-project-status,
    body.theme-glass .scanner-project-metrics > div,
    body.theme-glass .scanner-project-pending,
    body.theme-glass .scanner-project-batch-item,
    body.theme-glass .scanner-history-item,
    body.theme-glass .scanner-ocr-text-panel,
    body.theme-glass .scanner-preview-frame {
        background: rgba(29, 51, 88, .9) !important;
        border-color: var(--glass-line) !important;
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .scanner-mode-tab,
    body.theme-glass .scanner-project-list-item,
    body.theme-glass .scanner-history-item {
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .scanner-mode-tab:hover:not(.is-active):not([aria-selected="true"]),
    body.theme-glass .scanner-project-list-item:hover:not(.is-active) {
        background: rgba(96, 140, 207, .24) !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass .scanner-mode-tab.is-active,
    body.theme-glass .scanner-mode-tab[aria-selected="true"],
    body.theme-glass .scanner-project-list-item.is-active {
        background: var(--glass-selected-bg) !important;
        color: var(--glass-selected-text) !important;
        border-color: var(--glass-selected-border) !important;
        box-shadow: var(--glass-selected-shadow) !important;
    }
    body.theme-glass .scanner-empty strong,
    body.theme-glass .scanner-output-row strong,
    body.theme-glass .scanner-project-detail-header strong,
    body.theme-glass .scanner-history-item-title,
    body.theme-glass .scanner-ocr-text-panel pre {
        color: var(--glass-ink) !important;
    }
    body.theme-glass .scanner-empty-icon,
    body.theme-glass .scanner-project-column-title,
    body.theme-glass .scanner-meta-label,
    body.theme-glass .scanner-meta-row,
    body.theme-glass .scanner-project-list-item span,
    body.theme-glass .scanner-project-pending span:last-child,
    body.theme-glass .scanner-history-item-meta,
    body.theme-glass .scanner-history-storage,
    body.theme-glass .scanner-edit-summary,
    body.theme-glass .scanner-progress-labels,
    body.theme-glass .scanner-ocr-controls label {
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .scanner-preview-stage {
        background: rgba(13, 25, 49, .72);
        border-radius: 8px;
    }
    body.theme-glass .scanner-progress-track {
        background: rgba(154, 184, 223, .24) !important;
    }
    body.theme-glass .scanner-processed-badge {
        background: rgba(61, 89, 137, .62) !important;
        border-color: var(--glass-line) !important;
        color: var(--glass-secondary) !important;
    }

    body.theme-glass .fnos-settings-tabs button,
    body.theme-glass .fnos-retention-stats > div,
    body.theme-glass .fnos-health-issue,
    body.theme-glass .fnos-onboarding-grid a,
    body.theme-glass .fnos-preset-bar,
    body.theme-glass .fnos-remote-links a,
    body.theme-glass .fnos-mobile-cards tr {
        background: rgba(29, 51, 88, .9) !important;
        border-color: var(--glass-line) !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass .fnos-settings-tabs button:hover:not(.active),
    body.theme-glass .fnos-onboarding-grid a:hover,
    body.theme-glass .fnos-remote-links a:hover {
        background: rgba(96, 140, 207, .24) !important;
        border-color: var(--glass-selected-border) !important;
    }
    body.theme-glass .fnos-settings-tabs button.active {
        background: var(--glass-selected-bg) !important;
        border-color: var(--glass-selected-border) !important;
        color: var(--glass-selected-text) !important;
    }
    body.theme-glass .fnos-settings-tabs button,
    body.theme-glass .fnos-retention-stats span,
    body.theme-glass .fnos-health-issue > div:first-child > div,
    body.theme-glass .fnos-onboarding-grid span,
    body.theme-glass .fnos-remote-links span {
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .fnos-health-issue.error {
        background: rgba(153, 46, 55, .3) !important;
        border-color: rgba(255, 151, 151, .48) !important;
    }
    body.theme-glass .fnos-health-issue.warning {
        background: rgba(145, 101, 31, .3) !important;
        border-color: rgba(255, 211, 126, .48) !important;
    }
    body.theme-glass .fnos-all-good {
        background: rgba(31, 117, 88, .38) !important;
        color: #dcfff0 !important;
    }
    body.theme-glass .status-badge.warning {
        background: rgba(145, 101, 31, .48) !important;
        color: #ffe4a8 !important;
        border-color: rgba(255, 211, 126, .56) !important;
    }
    body.theme-glass .status-badge.error {
        background: rgba(153, 46, 55, .48) !important;
        color: #ffd1d1 !important;
        border-color: rgba(255, 151, 151, .56) !important;
    }

    body.theme-glass .ep-subtle-panel,
    body.theme-glass .ep-technical-details > summary,
    body.theme-glass .ep-account-extras > summary,
    body.theme-glass .ep-diagnostic-grid > a,
    body.theme-glass .info-banner,
    body.theme-glass .update-box,
    body.theme-glass .ep-legal-entry,
    body.theme-glass .ep-legal-section,
    body.theme-glass .ep-device-item,
    body.theme-glass .guide-tabs a,
    body.theme-glass .notice,
    body.theme-glass .uri {
        background: rgba(29, 51, 88, .9) !important;
        border-color: var(--glass-line) !important;
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .ep-technical-details > summary:hover,
    body.theme-glass .ep-account-extras > summary:hover,
    body.theme-glass .ep-diagnostic-grid > a:hover,
    body.theme-glass .ep-legal-entry:hover,
    body.theme-glass .guide-tabs a:hover {
        background: rgba(96, 140, 207, .24) !important;
        border-color: var(--glass-selected-border) !important;
    }
    body.theme-glass .ep-technical-details[open] > summary,
    body.theme-glass .ep-account-extras[open] > summary {
        background: rgba(53, 82, 128, .82) !important;
        border-color: var(--glass-selected-border) !important;
        color: var(--glass-ink) !important;
    }
    body.theme-glass .ep-technical-details > summary,
    body.theme-glass .ep-account-extras > summary,
    body.theme-glass .ep-diagnostic-grid strong,
    body.theme-glass .ep-legal-entry strong,
    body.theme-glass .ep-device-name,
    body.theme-glass .update-box strong,
    body.theme-glass .guide-card .card-title {
        color: var(--glass-ink) !important;
    }
    body.theme-glass .ep-diagnostic-grid small,
    body.theme-glass .update-status,
    body.theme-glass .small-note,
    body.theme-glass .steps li,
    body.theme-glass .ep-legal-entry span,
    body.theme-glass .ep-legal-section div,
    body.theme-glass .ep-device-meta,
    body.theme-glass .ep-info-table td:first-child {
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .ep-diagnostic-step {
        background: rgba(70, 125, 214, .38) !important;
        color: #d8e9ff !important;
    }
    body.theme-glass .info-banner {
        background: rgba(34, 91, 161, .48) !important;
    }
    body.theme-glass .notice.warn {
        background: rgba(145, 101, 31, .34) !important;
        border-color: rgba(255, 211, 126, .48) !important;
    }
    body.theme-glass .verified {
        background: rgba(31, 117, 88, .5) !important;
        color: #dcfff0 !important;
    }
    body.theme-glass input[type="file"] {
        background: rgba(29, 51, 88, .9) !important;
        color: var(--glass-secondary) !important;
        border-color: var(--glass-line) !important;
    }
    body.theme-glass input[type="file"]::file-selector-button {
        background: rgba(53, 82, 128, .92) !important;
        color: var(--glass-ink) !important;
        border: 0 !important;
        border-right: 1px solid var(--glass-line) !important;
    }
    body.theme-glass .empty-state {
        background: rgba(29, 51, 88, .9) !important;
        border-color: var(--glass-line) !important;
        color: var(--glass-secondary) !important;
    }
    body.theme-glass .empty-state strong,
    body.theme-glass .empty-state p { color: var(--glass-ink) !important; }
    body.theme-glass .ep-info-table td { border-color: var(--glass-line) !important; }
    body.theme-glass .ep-legal-card { background: var(--glass-surface-strong) !important; }
    body.theme-glass #applyHotfixBtn:disabled,
    body.theme-glass #dockerUpdateBtn:disabled {
        background: rgba(91, 112, 145, .5) !important;
        color: rgba(239, 246, 255, .62) !important;
        border-color: var(--glass-line) !important;
    }

    /* Black Glass specimen: keep the existing blue/purple atmosphere, but use
       a low-luminance graphite environment and translucent surfaces on
       Dashboard and printer management only.
       Other feature pages retain the already audited Dark Glass surfaces until
       this visual direction is approved for site-wide rollout. */
    body.theme-glass.page-dashboard,
    body.theme-glass.page-printers {
        background:
            radial-gradient(ellipse 54% 42% at 96% 8%, rgba(92, 66, 166, .24), transparent 70%),
            radial-gradient(ellipse 48% 38% at 70% 100%, rgba(29, 118, 126, .16), transparent 70%),
            linear-gradient(135deg, #070a12 0%, #0b1220 46%, #111328 100%) !important;
    }
    body.theme-glass.page-dashboard .sidebar,
    body.theme-glass.page-printers .sidebar {
        background:
            linear-gradient(180deg, rgba(12, 18, 30, .78), rgba(5, 9, 16, .66)),
            radial-gradient(circle at 18% 0%, rgba(116, 157, 230, .14), transparent 40%) !important;
        border-right-color: rgba(166, 190, 226, .24) !important;
        box-shadow: inset -1px 0 rgba(255,255,255,.08), 20px 0 50px rgba(0,0,0,.26) !important;
    }
    body.theme-glass.page-dashboard .topbar,
    body.theme-glass.page-printers .topbar {
        background: linear-gradient(180deg, rgba(15, 22, 36, .72), rgba(7, 11, 19, .56)) !important;
        border-bottom-color: rgba(166, 190, 226, .24) !important;
        box-shadow: inset 0 -1px 0 rgba(255,255,255,.08), 0 12px 32px rgba(0,0,0,.22) !important;
    }
    body.theme-glass.page-dashboard::before,
    body.theme-glass.page-printers::before {
        background:
            radial-gradient(circle at 24% 18%, rgba(123,174,255,.08), transparent 18%),
            radial-gradient(circle at 76% 32%, rgba(168,132,255,.08), transparent 16%),
            radial-gradient(circle at 48% 86%, rgba(74,184,190,.08), transparent 24%);
    }
    body.theme-glass.page-dashboard .ep-dashboard-page .card,
    body.theme-glass.page-dashboard .ep-dashboard-page .stat-card,
    body.theme-glass.page-dashboard .ep-dashboard-page .table-container,
    body.theme-glass.page-dashboard .ep-dashboard-page .empty-state,
    body.theme-glass.page-dashboard .ep-dashboard-page .ep-printer-status-row {
        background: linear-gradient(145deg, rgba(14, 18, 28, .72), rgba(7, 10, 17, .58) 58%, rgba(24, 28, 43, .64)) !important;
        border-color: rgba(166, 190, 226, .28) !important;
        box-shadow: 0 18px 44px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.12) !important;
        -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
        backdrop-filter: blur(8px) saturate(120%) !important;
    }
    body.theme-glass.page-dashboard .ep-dashboard-page .stat-card.success {
        background: linear-gradient(145deg, rgba(10, 61, 52, .72), rgba(7, 27, 31, .6)) !important;
    }
    body.theme-glass.page-dashboard .ep-dashboard-page .stat-card.warning {
        background: linear-gradient(145deg, rgba(79, 54, 22, .72), rgba(35, 27, 24, .62)) !important;
    }
    body.theme-glass.page-dashboard .ep-dashboard-page .ep-secondary-action {
        background: linear-gradient(145deg, rgba(17, 21, 32, .76), rgba(8, 11, 18, .58)) !important;
        border-color: rgba(166, 190, 226, .28) !important;
        color: var(--glass-ink) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 24px rgba(0,0,0,.22) !important;
    }

    body.theme-glass.page-printers .content-area > .card,
    body.theme-glass.page-printers .content-area > .printer-card,
    body.theme-glass.page-printers .printer-card,
    body.theme-glass.page-printers .empty-state,
    body.theme-glass.page-printers .ep-subtle-panel {
        background: linear-gradient(145deg, rgba(14, 18, 28, .72), rgba(7, 10, 17, .58) 58%, rgba(24, 28, 43, .64)) !important;
        border-color: rgba(166, 190, 226, .28) !important;
        box-shadow: 0 18px 44px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.12) !important;
        /* Printer lists are dense surfaces: keep their material static. */
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    body.theme-glass.page-printers .form-input,
    body.theme-glass.page-printers .form-select,
    body.theme-glass.page-printers .form-textarea,
    body.theme-glass.page-printers input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
    body.theme-glass.page-printers select,
    body.theme-glass.page-printers textarea {
        background: rgba(9, 13, 21, .68) !important;
        border-color: rgba(166, 190, 226, .26) !important;
        color: var(--glass-ink) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-glass .scanner-mode-tab,
    body.theme-glass .scanner-toggle-button,
    body.theme-glass .feedback-tab,
    body.theme-glass .fnos-settings-tabs button,
    body.theme-glass .btn { transition: none; }
}

@media (max-width: 768px) {
    body.theme-glass.page-dashboard .ep-dashboard-page .card,
    body.theme-glass.page-dashboard .ep-dashboard-page .stat-card {
        -webkit-backdrop-filter: blur(5px) saturate(115%) !important;
        backdrop-filter: blur(5px) saturate(115%) !important;
    }
    body.theme-glass .btn,
    body.theme-glass .scanner-mode-tab,
    body.theme-glass .scanner-toggle-button,
    body.theme-glass .feedback-tab,
    body.theme-glass .fnos-settings-tabs button { min-height: 40px; }
}

/* Manual Dark must use the same feature-surface contract as system Dark.
   These selectors intentionally sit outside the prefers-color-scheme block so
   a browser-local Dark choice cannot leave scanner/settings/diagnostic panels
   on their classic light fallback. */
html[data-ep-appearance="dark"] body.theme-glass .scanner-mode-tabs,
html[data-ep-appearance="dark"] body.theme-glass .scanner-empty,
html[data-ep-appearance="dark"] body.theme-glass .scanner-device-summary,
html[data-ep-appearance="dark"] body.theme-glass .scanner-job-details,
html[data-ep-appearance="dark"] body.theme-glass .scanner-duplex-note,
html[data-ep-appearance="dark"] body.theme-glass .scanner-output-row,
html[data-ep-appearance="dark"] body.theme-glass .scanner-message,
html[data-ep-appearance="dark"] body.theme-glass .scanner-result-tools,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-create,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-status,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-metrics > div,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-pending,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-batch-item,
html[data-ep-appearance="dark"] body.theme-glass .scanner-history-item,
html[data-ep-appearance="dark"] body.theme-glass .scanner-ocr-text-panel,
html[data-ep-appearance="dark"] body.theme-glass .scanner-preview-frame,
html[data-ep-appearance="dark"] body.theme-glass .fnos-settings-tabs button,
html[data-ep-appearance="dark"] body.theme-glass .fnos-retention-stats > div,
html[data-ep-appearance="dark"] body.theme-glass .fnos-health-issue,
html[data-ep-appearance="dark"] body.theme-glass .fnos-onboarding-grid a,
html[data-ep-appearance="dark"] body.theme-glass .fnos-preset-bar,
html[data-ep-appearance="dark"] body.theme-glass .fnos-remote-links a,
html[data-ep-appearance="dark"] body.theme-glass .fnos-mobile-cards tr,
html[data-ep-appearance="dark"] body.theme-glass .ep-subtle-panel,
html[data-ep-appearance="dark"] body.theme-glass .ep-technical-details > summary,
html[data-ep-appearance="dark"] body.theme-glass .ep-account-extras > summary,
html[data-ep-appearance="dark"] body.theme-glass .ep-diagnostic-grid > a,
html[data-ep-appearance="dark"] body.theme-glass .info-banner,
html[data-ep-appearance="dark"] body.theme-glass .update-box,
html[data-ep-appearance="dark"] body.theme-glass .ep-legal-entry,
html[data-ep-appearance="dark"] body.theme-glass .ep-legal-section,
html[data-ep-appearance="dark"] body.theme-glass .ep-device-item,
html[data-ep-appearance="dark"] body.theme-glass .guide-tabs a,
html[data-ep-appearance="dark"] body.theme-glass .notice,
html[data-ep-appearance="dark"] body.theme-glass .uri,
html[data-ep-appearance="dark"] body.theme-glass .empty-state {
    background: rgba(16, 20, 29, .72) !important;
    border-color: var(--glass-line) !important;
    color: var(--glass-secondary) !important;
}

html[data-ep-appearance="dark"] body.theme-glass .scanner-empty strong,
html[data-ep-appearance="dark"] body.theme-glass .scanner-output-row strong,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-detail-header strong,
html[data-ep-appearance="dark"] body.theme-glass .scanner-history-item-title,
html[data-ep-appearance="dark"] body.theme-glass .scanner-ocr-text-panel pre,
html[data-ep-appearance="dark"] body.theme-glass .ep-technical-details > summary,
html[data-ep-appearance="dark"] body.theme-glass .ep-account-extras > summary,
html[data-ep-appearance="dark"] body.theme-glass .ep-device-name,
html[data-ep-appearance="dark"] body.theme-glass .empty-state strong,
html[data-ep-appearance="dark"] body.theme-glass .empty-state p {
    color: var(--glass-ink) !important;
}

html[data-ep-appearance="dark"] body.theme-glass .scanner-mode-tab,
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="dark"] body.theme-glass .scanner-history-item,
html[data-ep-appearance="dark"] body.theme-glass .fnos-settings-tabs button,
html[data-ep-appearance="dark"] body.theme-glass .ep-diagnostic-grid small,
html[data-ep-appearance="dark"] body.theme-glass .small-note,
html[data-ep-appearance="dark"] body.theme-glass .steps li,
html[data-ep-appearance="dark"] body.theme-glass .ep-device-meta {
    color: var(--glass-secondary) !important;
}

html[data-ep-appearance="dark"] body.theme-glass .scanner-mode-tab:hover:not(.is-active):not([aria-selected="true"]),
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-list-item:hover:not(.is-active),
html[data-ep-appearance="dark"] body.theme-glass .fnos-settings-tabs button:hover:not(.active),
html[data-ep-appearance="dark"] body.theme-glass .guide-tabs a:hover {
    background: rgba(96, 140, 207, .24) !important;
    color: var(--glass-ink) !important;
}

html[data-ep-appearance="dark"] body.theme-glass .scanner-mode-tab.is-active,
html[data-ep-appearance="dark"] body.theme-glass .scanner-mode-tab[aria-selected="true"],
html[data-ep-appearance="dark"] body.theme-glass .scanner-project-list-item.is-active,
html[data-ep-appearance="dark"] body.theme-glass .fnos-settings-tabs button.active {
    background: var(--glass-selected-bg) !important;
    color: var(--glass-selected-text) !important;
    border-color: var(--glass-selected-border) !important;
    box-shadow: var(--glass-selected-shadow) !important;
}

html[data-ep-appearance="dark"] body.theme-glass.page-dashboard .ep-dashboard-page .card,
html[data-ep-appearance="dark"] body.theme-glass.page-dashboard .ep-dashboard-page .stat-card {
    -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
    backdrop-filter: blur(8px) saturate(120%) !important;
}

@media (max-width: 768px) {
    html[data-ep-appearance="dark"] body.theme-glass.page-dashboard .ep-dashboard-page .card,
    html[data-ep-appearance="dark"] body.theme-glass.page-dashboard .ep-dashboard-page .stat-card {
        -webkit-backdrop-filter: blur(5px) saturate(115%) !important;
        backdrop-filter: blur(5px) saturate(115%) !important;
    }
}

/* Standalone authentication and first-use surfaces must follow the same
   browser-local appearance as the authenticated shell.  These pages carry
   small inline classic fallbacks, so the scoped rules below deliberately win
   without changing the form flow or password handling. */
html[data-ep-appearance="light"] body.theme-glass .first-password-overlay {
    background: rgba(214, 229, 249, .24) !important;
    color: #142946 !important;
}
html[data-ep-appearance="light"] body.theme-glass .first-password-dialog {
    background: linear-gradient(135deg, rgba(250,253,255,.82), rgba(221,237,255,.62) 58%, rgba(232,225,255,.58)) !important;
    border-color: rgba(255,255,255,.84) !important;
    box-shadow: 0 30px 90px rgba(24,45,88,.22), inset 0 1px 0 rgba(255,255,255,.9) !important;
    color: #142946 !important;
}
html[data-ep-appearance="light"] body.theme-glass .first-password-title,
html[data-ep-appearance="light"] body.theme-glass .first-password-subtitle,
html[data-ep-appearance="light"] body.theme-glass .first-password-foot,
html[data-ep-appearance="light"] body.theme-glass .first-password-material-label,
html[data-ep-appearance="light"] body.theme-glass .first-password-dialog .form-label {
    color: #274362 !important;
}
html[data-ep-appearance="light"] body.theme-glass .first-password-notice {
    background: rgba(239,246,255,.78) !important;
    color: #24508f !important;
    border: 1px solid rgba(116,145,190,.24) !important;
}

html[data-ep-appearance="dark"] body.theme-glass .first-password-overlay,
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog {
    color: #f1f6ff !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-overlay {
    background: rgba(3, 7, 15, .38) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog {
    background: linear-gradient(145deg, rgba(14,18,28,.84), rgba(7,10,17,.7) 58%, rgba(24,28,43,.76)) !important;
    border-color: rgba(166,190,226,.34) !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-title,
html[data-ep-appearance="dark"] body.theme-glass .first-password-subtitle,
html[data-ep-appearance="dark"] body.theme-glass .first-password-foot,
html[data-ep-appearance="dark"] body.theme-glass .first-password-material-label,
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog .form-label {
    color: #f1f6ff !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-subtitle,
html[data-ep-appearance="dark"] body.theme-glass .first-password-foot,
html[data-ep-appearance="dark"] body.theme-glass .first-password-material-label {
    color: #c4d3e8 !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-notice {
    background: rgba(34,57,91,.7) !important;
    color: #e2efff !important;
    border: 1px solid rgba(166,190,226,.3) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog input {
    background: rgba(9,13,21,.74) !important;
    color: #f1f6ff !important;
    border-color: rgba(166,190,226,.34) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog input::placeholder {
    color: #aebfda !important;
}
html[data-ep-appearance="dark"] body.theme-glass .first-password-dialog .btn-default {
    background: rgba(16,20,29,.82) !important;
    color: #f1f6ff !important;
    border-color: rgba(166,190,226,.34) !important;
}

/* The first-use notification is generated at runtime by
   fnos_production_polish.js, so it needs explicit dark/light material rules
   in addition to the generic modal-card selectors. */
html[data-ep-appearance="light"] body.theme-glass .ep-modal-mask .ep-modal {
    background: linear-gradient(135deg, rgba(250,253,255,.84), rgba(221,237,255,.64) 58%, rgba(232,225,255,.62)) !important;
    color: #142946 !important;
    border-color: rgba(255,255,255,.84) !important;
}
html[data-ep-appearance="light"] body.theme-glass .ep-modal-mask .ep-modal-title,
html[data-ep-appearance="light"] body.theme-glass .ep-modal-mask .ep-notice-title,
html[data-ep-appearance="light"] body.theme-glass .ep-modal-mask .ep-notice-body,
html[data-ep-appearance="light"] body.theme-glass .ep-modal-mask .ep-password-panel {
    color: #142946 !important;
}
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-modal {
    background: linear-gradient(145deg, rgba(14,18,28,.86), rgba(7,10,17,.72) 58%, rgba(24,28,43,.78)) !important;
    color: #f1f6ff !important;
    border-color: rgba(166,190,226,.36) !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-modal-title,
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-notice-title,
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-notice-body,
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-password-panel,
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-modal-actions {
    color: #f1f6ff !important;
}
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-notice {
    border-color: rgba(166,190,226,.26) !important;
}
html[data-ep-appearance="dark"] body.theme-glass .ep-modal-mask .ep-password-panel {
    background: rgba(16,20,29,.72) !important;
    border-color: rgba(166,190,226,.3) !important;
}

/* Auto mode shares the Dark Glass contract only while the OS is dark.  This
   closes the gap between a manual Dark choice and a real system-dark browser
   without changing Auto on light systems. */
@media (prefers-color-scheme: dark) {
    html[data-ep-appearance="auto"] body.theme-glass .first-password-overlay,
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog {
        color: #f1f6ff !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-overlay {
        background: rgba(3, 7, 15, .38) !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-modal {
        background: linear-gradient(145deg, rgba(14,18,28,.86), rgba(7,10,17,.72) 58%, rgba(24,28,43,.78)) !important;
        border-color: rgba(166,190,226,.36) !important;
        box-shadow: 0 30px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.14) !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-title,
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog .form-label,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-modal-title,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-notice-title,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-notice-body,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-password-panel {
        color: #f1f6ff !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-subtitle,
    html[data-ep-appearance="auto"] body.theme-glass .first-password-foot,
    html[data-ep-appearance="auto"] body.theme-glass .first-password-material-label,
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-modal-actions {
        color: #c4d3e8 !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-notice {
        background: rgba(34,57,91,.7) !important;
        color: #e2efff !important;
        border: 1px solid rgba(166,190,226,.3) !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog input {
        background: rgba(9,13,21,.74) !important;
        color: #f1f6ff !important;
        border-color: rgba(166,190,226,.34) !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog input::placeholder { color: #aebfda !important; }
    html[data-ep-appearance="auto"] body.theme-glass .first-password-dialog .btn-default {
        background: rgba(16,20,29,.82) !important;
        color: #f1f6ff !important;
        border-color: rgba(166,190,226,.34) !important;
    }
    html[data-ep-appearance="auto"] body.theme-glass .ep-modal-mask .ep-password-panel {
        background: rgba(16,20,29,.72) !important;
        border-color: rgba(166,190,226,.3) !important;
    }
}

/* Final precedence guard for manual Light on a dark operating system.  This
   is deliberately last: style.css contains legacy system-dark !important
   rules for Classic, while this selector restores the Light Glass contract
   only for the explicit browser-local Light choice. */
html[data-ep-appearance="light"] body.theme-glass {
    color-scheme: light !important;
    --glass-ink: #142946;
    --glass-muted: #5d6e88;
    --glass-secondary: #405a7d;
    --glass-surface: rgba(255,255,255,.56);
    --glass-surface-strong: rgba(255,255,255,.78);
    --glass-border: rgba(255,255,255,.82);
    --glass-line: rgba(80,105,145,.22);
    background: radial-gradient(circle at 4% 2%, rgba(106,176,255,.38), transparent 27%), radial-gradient(circle at 96% 9%, rgba(182,156,255,.32), transparent 25%), radial-gradient(circle at 70% 95%, rgba(114,217,207,.18), transparent 28%), linear-gradient(135deg, #e9f3ff 0%, #f7f9fd 47%, #e9eefb 100%) !important;
    color: var(--glass-ink) !important;
}
html[data-ep-appearance="light"] body.theme-glass .main-content,
html[data-ep-appearance="light"] body.theme-glass .content-area,
html[data-ep-appearance="light"] body.theme-glass .local-print-body { background: transparent !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar { background: linear-gradient(180deg, rgba(245,249,255,.92), rgba(224,235,249,.78)), radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 34%) !important; color: var(--glass-ink) !important; border-right-color: rgba(255,255,255,.82) !important; }
html[data-ep-appearance="light"] body.theme-glass .topbar,
html[data-ep-appearance="light"] body.theme-glass .local-print-topbar { background: linear-gradient(180deg, rgba(246,250,255,.72), rgba(222,234,252,.32)) !important; color: var(--glass-ink) !important; border-color: rgba(255,255,255,.64) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar-logo .logo-text,
html[data-ep-appearance="light"] body.theme-glass .topbar-title,
html[data-ep-appearance="light"] body.theme-glass .page-title,
html[data-ep-appearance="light"] body.theme-glass .card-title { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .sidebar-logo .logo-sub,
html[data-ep-appearance="light"] body.theme-glass .sidebar-version,
html[data-ep-appearance="light"] body.theme-glass .nav-group-title,
html[data-ep-appearance="light"] body.theme-glass .page-subtitle,
html[data-ep-appearance="light"] body.theme-glass .field-hint { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item { color: #42536e !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item:hover:not(.active) { background: rgba(255,255,255,.48) !important; color: #1d3558 !important; }
html[data-ep-appearance="light"] body.theme-glass .nav-item.active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; }

html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu { background: var(--glass-surface-strong) !important; color: var(--glass-ink) !important; border-color: var(--glass-border) !important; box-shadow: var(--glass-shadow) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu-heading { color: var(--glass-muted) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice],
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice] { background: transparent !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice]:hover:not([aria-checked="true"]),
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice]:hover:not([aria-checked="true"]) { background: rgba(224,237,255,.42) !important; color: #1e4f9a !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-theme-choice][aria-checked="true"],
html[data-ep-appearance="light"] body.theme-glass .ep-theme-menu button[data-appearance-choice][aria-checked="true"] { background: rgba(224,237,255,.68) !important; color: #1e4f9a !important; }

html[data-ep-appearance="light"] body.theme-glass .card,
html[data-ep-appearance="light"] body.theme-glass .stat-card,
html[data-ep-appearance="light"] body.theme-glass .printer-card,
html[data-ep-appearance="light"] body.theme-glass .supply-card,
html[data-ep-appearance="light"] body.theme-glass .supply-printer-panel,
html[data-ep-appearance="light"] body.theme-glass .download-card,
html[data-ep-appearance="light"] body.theme-glass .modal-card,
html[data-ep-appearance="light"] body.theme-glass .modal-content,
html[data-ep-appearance="light"] body.theme-glass .feedback-dialog,
html[data-ep-appearance="light"] body.theme-glass .vc-card,
html[data-ep-appearance="light"] body.theme-glass .vc-join-dialog,
html[data-ep-appearance="light"] body.theme-glass .ep-support-dialog,
html[data-ep-appearance="light"] body.theme-glass .ep-device-dialog { background: rgba(255,255,255,.72) !important; color: var(--glass-ink) !important; border-color: rgba(255,255,255,.82) !important; }
html[data-ep-appearance="light"] body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html[data-ep-appearance="light"] body.theme-glass select,
html[data-ep-appearance="light"] body.theme-glass textarea,
html[data-ep-appearance="light"] body.theme-glass .form-input,
html[data-ep-appearance="light"] body.theme-glass .form-select,
html[data-ep-appearance="light"] body.theme-glass .form-textarea { background: rgba(255,255,255,.78) !important; color: var(--glass-ink) !important; border-color: rgba(116,145,190,.3) !important; }

html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tabs,
html[data-ep-appearance="light"] body.theme-glass .scanner-empty,
html[data-ep-appearance="light"] body.theme-glass .scanner-device-summary,
html[data-ep-appearance="light"] body.theme-glass .scanner-job-details,
html[data-ep-appearance="light"] body.theme-glass .scanner-duplex-note,
html[data-ep-appearance="light"] body.theme-glass .scanner-output-row,
html[data-ep-appearance="light"] body.theme-glass .scanner-message,
html[data-ep-appearance="light"] body.theme-glass .scanner-result-tools,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-create,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-status,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-metrics > div,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-pending,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-batch-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-ocr-text-panel,
html[data-ep-appearance="light"] body.theme-glass .scanner-preview-frame { background: rgba(255,255,255,.58) !important; border-color: var(--glass-line) !important; color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab:hover:not(.is-active):not([aria-selected="true"]),
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item:hover:not(.is-active) { background: rgba(224,237,255,.42) !important; color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab.is-active,
html[data-ep-appearance="light"] body.theme-glass .scanner-mode-tab[aria-selected="true"],
html[data-ep-appearance="light"] body.theme-glass .scanner-project-list-item.is-active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; border-color: var(--glass-selected-border) !important; box-shadow: var(--glass-selected-shadow) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-empty strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-output-row strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-detail-header strong,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item-title,
html[data-ep-appearance="light"] body.theme-glass .scanner-ocr-text-panel pre,
html[data-ep-appearance="light"] body.theme-glass .scanner-meta-label,
html[data-ep-appearance="light"] body.theme-glass .scanner-meta-row { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-empty-icon,
html[data-ep-appearance="light"] body.theme-glass .scanner-project-column-title,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-item-meta,
html[data-ep-appearance="light"] body.theme-glass .scanner-history-storage,
html[data-ep-appearance="light"] body.theme-glass .scanner-edit-summary,
html[data-ep-appearance="light"] body.theme-glass .scanner-progress-labels { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass .scanner-preview-stage { background: rgba(232,240,252,.72) !important; }

html[data-ep-appearance="light"] body.theme-glass .ep-subtle-panel,
html[data-ep-appearance="light"] body.theme-glass .ep-technical-details > summary,
html[data-ep-appearance="light"] body.theme-glass .ep-account-extras > summary,
html[data-ep-appearance="light"] body.theme-glass .ep-device-item,
html[data-ep-appearance="light"] body.theme-glass .ep-device-body,
html[data-ep-appearance="light"] body.theme-glass .vc-note,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-block,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid > a,
html[data-ep-appearance="light"] body.theme-glass .info-banner,
html[data-ep-appearance="light"] body.theme-glass .update-box,
html[data-ep-appearance="light"] body.theme-glass .notice,
html[data-ep-appearance="light"] body.theme-glass .uri,
html[data-ep-appearance="light"] body.theme-glass .empty-state { background: rgba(255,255,255,.58) !important; color: var(--glass-secondary) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-device-name,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid strong,
html[data-ep-appearance="light"] body.theme-glass .update-box strong,
html[data-ep-appearance="light"] body.theme-glass .empty-state strong,
html[data-ep-appearance="light"] body.theme-glass .empty-state p,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-title,
html[data-ep-appearance="light"] body.theme-glass .miniapp-copy strong { color: var(--glass-ink) !important; }
html[data-ep-appearance="light"] body.theme-glass .ep-device-meta,
html[data-ep-appearance="light"] body.theme-glass .ep-diagnostic-grid small,
html[data-ep-appearance="light"] body.theme-glass .small-note,
html[data-ep-appearance="light"] body.theme-glass .steps li,
html[data-ep-appearance="light"] body.theme-glass .cloud-access-hint,
html[data-ep-appearance="light"] body.theme-glass .miniapp-copy span { color: var(--glass-secondary) !important; }
html[data-ep-appearance="light"] body.theme-glass input[type="file"] { background: rgba(255,255,255,.78) !important; color: var(--glass-secondary) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass input[type="file"]::file-selector-button { background: rgba(224,237,255,.7) !important; color: var(--glass-ink) !important; border-color: var(--glass-line) !important; }
html[data-ep-appearance="light"] body.theme-glass .miniapp-qr { background: #fff !important; }

/* Dashboard quick actions must not inherit the Black Glass secondary surface
   when the browser-local choice is explicitly Light on a dark OS. */
html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .ep-secondary-action {
    background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(221,235,255,.48)) !important;
    border-color: rgba(255,255,255,.82) !important;
    color: var(--glass-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 20px rgba(77,111,164,.12) !important;
}
html[data-ep-appearance="light"] body.theme-glass.page-dashboard .ep-dashboard-page .ep-secondary-action:hover {
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(210,229,255,.68)) !important;
    border-color: rgba(255,255,255,.9) !important;
}

/* Shared appearance surface contract.  Earlier Dark Glass rules were added
   page-by-page, which left scanner, queue, cloud, diagnostics and settings
   surfaces on the older blue material.  These tokens make every feature page
   follow the same Light/Black Glass contract while keeping functional white
   previews (for example QR and paper output) as explicit exceptions. */
html[data-ep-appearance="light"] body.theme-glass,
html[data-ep-appearance="auto"] body.theme-glass {
    --ep-final-glass-bg: radial-gradient(circle at 4% 2%, rgba(106,176,255,.38), transparent 27%), radial-gradient(circle at 96% 9%, rgba(182,156,255,.32), transparent 25%), radial-gradient(circle at 70% 95%, rgba(114,217,207,.18), transparent 28%), linear-gradient(135deg, #e9f3ff 0%, #f7f9fd 47%, #e9eefb 100%);
    --ep-final-glass-surface: rgba(255,255,255,.72);
    --ep-final-glass-muted: rgba(255,255,255,.58);
    --ep-final-glass-input: rgba(255,255,255,.78);
    --ep-final-glass-ink: #142946;
    --ep-final-glass-secondary: #405a7d;
    --ep-final-glass-border: rgba(255,255,255,.82);
    --ep-final-glass-line: rgba(80,105,145,.22);
    --ep-final-glass-sidebar: linear-gradient(180deg, rgba(245,249,255,.92), rgba(224,235,249,.78)), radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 34%);
    --ep-final-glass-topbar: linear-gradient(180deg, rgba(246,250,255,.72), rgba(222,234,252,.32));
}
html[data-ep-appearance="dark"] body.theme-glass {
    --ep-final-glass-bg: radial-gradient(54% 42% at 96% 8%, rgba(92,66,166,.24), transparent 70%), radial-gradient(48% 38% at 70% 100%, rgba(29,118,126,.16), transparent 70%), linear-gradient(135deg, #070a12 0%, #0b1220 46%, #111328 100%);
    --ep-final-glass-surface: linear-gradient(145deg, rgba(14,18,28,.72), rgba(7,10,17,.58) 58%, rgba(24,28,43,.64));
    --ep-final-glass-muted: rgba(14,18,28,.62);
    --ep-final-glass-input: rgba(9,13,21,.68);
    --ep-final-glass-ink: #eff6ff;
    --ep-final-glass-secondary: #c4d3e8;
    --ep-final-glass-border: rgba(166,190,226,.28);
    --ep-final-glass-line: rgba(166,190,226,.24);
    --ep-final-glass-sidebar: linear-gradient(180deg, rgba(12,18,30,.78), rgba(5,9,16,.66)), radial-gradient(circle at 18% 0%, rgba(116,157,230,.14), transparent 40%);
    --ep-final-glass-topbar: linear-gradient(180deg, rgba(15,22,36,.72), rgba(7,11,19,.56));
}
@media (prefers-color-scheme: dark) {
    html[data-ep-appearance="auto"] body.theme-glass {
        --ep-final-glass-bg: radial-gradient(54% 42% at 96% 8%, rgba(92,66,166,.24), transparent 70%), radial-gradient(48% 38% at 70% 100%, rgba(29,118,126,.16), transparent 70%), linear-gradient(135deg, #070a12 0%, #0b1220 46%, #111328 100%);
        --ep-final-glass-surface: linear-gradient(145deg, rgba(14,18,28,.72), rgba(7,10,17,.58) 58%, rgba(24,28,43,.64));
        --ep-final-glass-muted: rgba(14,18,28,.62);
        --ep-final-glass-input: rgba(9,13,21,.68);
        --ep-final-glass-ink: #eff6ff;
        --ep-final-glass-secondary: #c4d3e8;
        --ep-final-glass-border: rgba(166,190,226,.28);
        --ep-final-glass-line: rgba(166,190,226,.24);
        --ep-final-glass-sidebar: linear-gradient(180deg, rgba(12,18,30,.78), rgba(5,9,16,.66)), radial-gradient(circle at 18% 0%, rgba(116,157,230,.14), transparent 40%);
        --ep-final-glass-topbar: linear-gradient(180deg, rgba(15,22,36,.72), rgba(7,11,19,.56));
    }
}

body.theme-glass {
    background: var(--ep-final-glass-bg) !important;
    color: var(--ep-final-glass-ink) !important;
}
body.theme-glass .main-content,
body.theme-glass .content-area,
body.theme-glass .local-print-body { background: transparent !important; color: var(--ep-final-glass-ink) !important; }
body.theme-glass .sidebar { background: var(--ep-final-glass-sidebar) !important; color: var(--ep-final-glass-ink) !important; border-right-color: var(--ep-final-glass-border) !important; }
body.theme-glass .topbar,
body.theme-glass .local-print-topbar { background: var(--ep-final-glass-topbar) !important; color: var(--ep-final-glass-ink) !important; border-color: var(--ep-final-glass-line) !important; }

body.theme-glass .card,
body.theme-glass .stat-card,
body.theme-glass .printer-card,
body.theme-glass .supply-card,
body.theme-glass .supply-printer-panel,
body.theme-glass .supply-model-card,
body.theme-glass .goods-card,
body.theme-glass .download-card,
body.theme-glass .modal-card,
body.theme-glass .modal-content,
body.theme-glass .feedback-dialog,
body.theme-glass .vc-card,
body.theme-glass .vc-join-dialog,
body.theme-glass .ep-support-dialog,
body.theme-glass .ep-legal-dialog,
body.theme-glass .ep-device-dialog,
body.theme-glass .fnos-retention-dialog,
body.theme-glass .ep-settings-disclosure-body,
body.theme-glass .scanner-device-card,
body.theme-glass .scanner-settings-card,
body.theme-glass .scanner-job-card,
body.theme-glass .scanner-history-card {
    background: var(--ep-final-glass-surface) !important;
    color: var(--ep-final-glass-ink) !important;
    border-color: var(--ep-final-glass-border) !important;
}
body.theme-glass .scanner-mode-tabs,
body.theme-glass .scanner-empty,
body.theme-glass .scanner-device-summary,
body.theme-glass .scanner-job-details,
body.theme-glass .scanner-duplex-note,
body.theme-glass .scanner-output-row,
body.theme-glass .scanner-message,
body.theme-glass .scanner-result-tools,
body.theme-glass .scanner-project-create,
body.theme-glass .scanner-project-list-item,
body.theme-glass .scanner-project-status,
body.theme-glass .scanner-project-metrics > div,
body.theme-glass .scanner-project-pending,
body.theme-glass .scanner-project-batch-item,
body.theme-glass .scanner-history-item,
body.theme-glass .scanner-ocr-text-panel,
body.theme-glass .scanner-preview-frame,
body.theme-glass .feedback-tabs,
body.theme-glass .feedback-history-item,
body.theme-glass .feedback-file,
body.theme-glass .feedback-privacy,
body.theme-glass .feedback-log-option,
body.theme-glass .ep-support-state,
body.theme-glass .ep-support-messages,
body.theme-glass .ep-support-composer,
body.theme-glass .ep-support-consent,
body.theme-glass .vc-note,
body.theme-glass .ep-device-body,
body.theme-glass .ep-subtle-panel,
body.theme-glass .ep-technical-details > summary,
body.theme-glass .ep-account-extras > summary,
body.theme-glass .ep-diagnostic-grid > a,
body.theme-glass .info-banner,
body.theme-glass .update-box,
body.theme-glass .ep-legal-entry,
body.theme-glass .ep-legal-section,
body.theme-glass .guide-tabs a,
body.theme-glass .notice,
body.theme-glass .uri,
body.theme-glass .cloud-access-block,
body.theme-glass .empty-state,
body.theme-glass .fnos-settings-tabs button,
body.theme-glass .fnos-retention-stats > div,
body.theme-glass .fnos-health-issue,
body.theme-glass .fnos-onboarding-grid a,
body.theme-glass .fnos-preset-bar,
body.theme-glass .fnos-remote-links a,
body.theme-glass .fnos-mobile-cards tr {
    background: var(--ep-final-glass-muted) !important;
    border-color: var(--ep-final-glass-line) !important;
    color: var(--ep-final-glass-secondary) !important;
}
body.theme-glass table,
body.theme-glass .table-container,
body.theme-glass .scanner-preview-card,
body.theme-glass .preview-card,
body.theme-glass .runtime-log { background: var(--ep-final-glass-muted) !important; color: var(--ep-final-glass-ink) !important; }
body.theme-glass table thead th { background: var(--ep-final-glass-muted) !important; color: var(--ep-final-glass-ink) !important; }
body.theme-glass th,
body.theme-glass td { border-color: var(--ep-final-glass-line) !important; color: var(--ep-final-glass-ink) !important; }
body.theme-glass input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body.theme-glass select,
body.theme-glass textarea,
body.theme-glass .form-input,
body.theme-glass .form-select,
body.theme-glass .form-textarea,
body.theme-glass input[type="file"] {
    background: var(--ep-final-glass-input) !important;
    color: var(--ep-final-glass-ink) !important;
    border-color: var(--ep-final-glass-line) !important;
}
body.theme-glass input::placeholder,
body.theme-glass textarea::placeholder { color: var(--ep-final-glass-secondary) !important; }
body.theme-glass .page-title,
body.theme-glass .topbar-title,
body.theme-glass .card-title,
body.theme-glass .modal-title,
body.theme-glass .feedback-title,
body.theme-glass .vc-join-title,
body.theme-glass .ep-device-name,
body.theme-glass .empty-state strong,
body.theme-glass .empty-state p { color: var(--ep-final-glass-ink) !important; }
body.theme-glass .page-subtitle,
body.theme-glass .printer-meta,
body.theme-glass .field-hint,
body.theme-glass .form-help,
body.theme-glass .scanner-field-hint,
body.theme-glass .scanner-card-subtitle,
body.theme-glass .feedback-subtitle,
body.theme-glass .ep-support-subtitle,
body.theme-glass .vc-muted,
body.theme-glass .small-note,
body.theme-glass .steps li,
body.theme-glass .cloud-access-hint,
body.theme-glass .ep-device-meta,
body.theme-glass .ep-diagnostic-grid small { color: var(--ep-final-glass-secondary) !important; }
body.theme-glass .nav-item { color: var(--ep-final-glass-secondary) !important; }
body.theme-glass .nav-item:hover:not(.active) { background: rgba(125,167,231,.18) !important; color: var(--ep-final-glass-ink) !important; }
body.theme-glass .nav-item.active { background: var(--glass-selected-bg) !important; color: var(--glass-selected-text) !important; }
body.theme-glass .menu-toggle { background: var(--ep-final-glass-muted) !important; color: var(--ep-final-glass-ink) !important; border-color: var(--ep-final-glass-line) !important; }
body.theme-glass .ep-theme-menu { background: var(--ep-final-glass-surface) !important; color: var(--ep-final-glass-ink) !important; border-color: var(--ep-final-glass-border) !important; }
body.theme-glass .ep-theme-menu button[data-theme-choice],
body.theme-glass .ep-theme-menu button[data-appearance-choice] { color: var(--ep-final-glass-ink) !important; }
body.theme-glass .btn-default,
body.theme-glass .ep-secondary-action,
body.theme-glass .scanner-toggle-button:not(.is-active),
body.theme-glass .feedback-tab:not(.active) { background: var(--ep-final-glass-muted) !important; color: var(--ep-final-glass-ink) !important; border-color: var(--ep-final-glass-border) !important; }
body.theme-glass .miniapp-qr { background: #fff !important; }
