/* =====================================================
   ROOMS-2026-1: modern skin for Rooms 0 + 2 only. Loads last.
   Light stage, white cards, hairlines, flat keys, one accent per room.
   Colour and surface only; nothing moves. Remove the <link> to go back.
   ===================================================== */

body.shell-room0 {
    --s26-accent: #0891b2;
    --s26-accent-deep: #0e7490;
    --s26-accent-soft: #e0f7fb;
    --s26-rail: #0b5563;
    --s26-rail-hover: rgba(255, 255, 255, 0.12);
    --r0-stage: #f5f7fa;
    --r0-card: #ffffff;
    --r0-pill: #ffffff;
    --r0-lift: 0 1px 2px rgba(16, 24, 40, 0.05);
    --r0-ink: #101828;
    --r0-muted: #667085;
}

/* Electric blue */
body.shell-room2 {
    --s26-accent: #0066ff;
    --s26-accent-deep: #0052cc;
    --s26-accent-soft: #e6f0ff;
    --s26-rail: #0057ff;
    --s26-rail-hover: rgba(255, 255, 255, 0.16);
    --r2-stage: #f5f7fa;
    --r2-card: #ffffff;
    --r2-card-deep: #0052cc;
    --r2-ink: #101828;
    --r0-stage: #f5f7fa;
    --r0-card: #ffffff;
    --r0-ink: #101828;
    --r0-muted: #667085;
    --r0-pill: #ffffff;
    --r0-card-line: #e4e7ec;
}

body:is(.shell-room0, .shell-room2) {
    --s26-line: #e4e7ec;
    --s26-ink: #101828;
    --s26-muted: #667085;
    --s26-card: #ffffff;
    --s26-stage: #f5f7fa;
    --s26-danger: #d92d20;
    --s26-danger-soft: #fef3f2;
    --s26-radius: 12px;
    --s26-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    color: var(--s26-ink);
    -webkit-font-smoothing: antialiased;
}

/* ── Stage ── */
body:is(.shell-room0, .shell-room2) .matrix-bg,
body.shell-room0 .r0-stage,
body.shell-room0 .r0-stage > .module-view,
body.shell-room0 .r0-stage > .content,
body.shell-room0 .r0-water,
body.shell-room0 .r0-water > .content,
body.shell-room2 .r2-stage {
    background: var(--s26-stage);
}

/* ── Rail ── */
body.shell-room0 .r0-rail,
body.shell-room2 .r2-rail {
    background: var(--s26-rail);
    box-shadow: none;
}

body.shell-room0 .r0-rail .module-tab,
body.shell-room0 .r0-rail .nav-secondary-item,
body.shell-room2 .r2-rail .module-tab,
body.shell-room2 .r2-rail .nav-secondary-item {
    background: transparent;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    color: #fff;
    font-weight: 500;
    padding: 10px 12px;
    transition: background 0.12s ease;
}

body.shell-room0 .r0-rail .module-tab:hover,
body.shell-room2 .r2-rail .module-tab:hover {
    background: var(--s26-rail-hover);
    box-shadow: none;
    color: #fff;
}

body.shell-room0 .r0-rail .module-tab.active,
body.shell-room2 .r2-rail .module-tab.active {
    background: #fff;
    border: none;
    box-shadow: none;
    color: var(--s26-accent-deep);
    font-weight: 600;
}

body.shell-room0 .r0-rail-logo,
body.shell-room2 .r2-rail-logo {
    border-radius: 10px;
}

body.shell-room2 .r2-rail-door,
body.shell-room2.hotel-phone .r2-rail-door,
body.shell-room0.hotel-phone .r0-rail-door {
    background: var(--s26-rail);
    box-shadow: none;
}

body.shell-room0 .r0-hotel-picker,
body.shell-room2 .r2-hotel-picker {
    background: #fff;
    border: 1px solid var(--s26-line);
    border-radius: 8px;
    box-shadow: none;
    color: var(--s26-muted);
    font-weight: 500;
}

/* ── Cards ── */
body.shell-room0 .r0-stage .glass-panel,
body.shell-room0 .r0-stage .corp-panel,
body.shell-room0 .r0-stage .table-wrap,
body.shell-room0 .r0-stage .footer-bar,
body.shell-room0 .r0-stage .module-summary-stats,
body.shell-room0 .r0-stage .stat-card,
body.shell-room0 #intelligence-view .search-bar,
body.shell-room0 #intelligence-view .period-filters,
body.shell-room0 #intelligence-view .table-wrap,
body.shell-room0 #intelligence-view .corp-table-wrap,
body.shell-room0 #intelligence-view .module-summary-stats,
body.shell-room0 #intelligence-view .stats,
body.shell-room2 .r2-stage .glass-panel,
body.shell-room2 .r2-stage .corp-panel,
body.shell-room2 .r2-stage .table-wrap,
body.shell-room2 .r2-stage .footer-bar,
body.shell-room2 .r2-stage .inv-subnav,
body.shell-room2 .r2-stage .inv-disclaimer,
body.shell-room2 .r2-stage .controls-bar .kj-controls-row,
body.shell-room2 .r2-stage .module-summary-stats,
body.shell-room2 .r2-stage .stat-card,
body.shell-room2 #intelligence-view .search-bar,
body.shell-room2 #intelligence-view .period-filters,
body.shell-room2 #intelligence-view .table-wrap,
body.shell-room2 #intelligence-view .corp-table-wrap,
body.shell-room2 #intelligence-view .module-summary-stats,
body.shell-room2 #intelligence-view .stats {
    background: var(--s26-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--s26-line);
    border-radius: var(--s26-radius);
    box-shadow: var(--s26-shadow);
    color: var(--s26-ink);
}

body:is(.shell-room0, .shell-room2) #intelligence-view .module-summary-stats,
body:is(.shell-room0, .shell-room2) #intelligence-view .stats,
body:is(.shell-room0, .shell-room2) .module-summary-stats {
    background: transparent;
    border: none;
    box-shadow: none;
}

body:is(.shell-room0, .shell-room2) .stat-label {
    color: var(--s26-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: none;
}

body:is(.shell-room0, .shell-room2) .stat-value {
    color: var(--s26-ink);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: none;
}

/* ── Fields ── */
body:is(.shell-room0, .shell-room2) #intelligence-view .search-bar {
    padding: 0;
    overflow: hidden;
}

body:is(.shell-room0, .shell-room2) #intelligence-view .search-bar input {
    background: transparent;
    border: none;
    border-radius: var(--s26-radius);
    box-shadow: none;
}

body:is(.shell-room0, .shell-room2) .period-select,
body:is(.shell-room0, .shell-room2) #intelligence-view #period-month.period-select,
body:is(.shell-room0, .shell-room2) #intelligence-view #period-month.period-select:disabled {
    background-color: #fff;
    border: 1px solid var(--s26-line);
    border-radius: 8px;
    box-shadow: none;
    color: var(--s26-ink);
}

body:is(.shell-room0, .shell-room2) #intelligence-view #period-month.period-select:disabled {
    color: var(--s26-muted);
    background-color: var(--s26-stage);
}

body:is(.shell-room0, .shell-room2) input:focus-visible,
body:is(.shell-room0, .shell-room2) select:focus-visible,
body:is(.shell-room0, .shell-room2) textarea:focus-visible {
    border-color: var(--s26-accent);
    box-shadow: 0 0 0 3px var(--s26-accent-soft);
    outline: none;
}

body:is(.shell-room0, .shell-room2) #intelligence-view .period-filters label {
    color: var(--s26-muted);
    font-weight: 500;
    text-shadow: none;
}

/* ── Tables ── */
body:is(.shell-room0, .shell-room2) table thead,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table thead {
    background: #fafbfc;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

body:is(.shell-room0, .shell-room2) table th,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table th {
    background: #fafbfc;
    border: none;
    border-bottom: 1px solid var(--s26-line);
    box-shadow: none;
    color: var(--s26-muted);
    font-weight: 500;
    text-shadow: none;
}

body:is(.shell-room0, .shell-room2) table th .sort-btn {
    color: var(--s26-muted);
    font-weight: 500;
    text-shadow: none;
}

body:is(.shell-room0, .shell-room2) #intelligence-view #client-table th.sort-active {
    box-shadow: inset 0 -2px 0 var(--s26-accent);
}

body:is(.shell-room0, .shell-room2) #intelligence-view #client-table th.sort-active .sort-btn {
    color: var(--s26-accent-deep);
}

body:is(.shell-room0, .shell-room2) table td,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table td {
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0f2f5;
    color: var(--s26-ink);
    text-shadow: none;
}

body:is(.shell-room0, .shell-room2) table tbody tr,
body:is(.shell-room0, .shell-room2) table tbody tr:nth-child(even) {
    background: transparent;
}

body:is(.shell-room0, .shell-room2) table tbody tr:hover,
body:is(.shell-room0, .shell-room2) table tbody tr.selected {
    background: #f8fafc;
}

body:is(.shell-room0, .shell-room2) #intelligence-view #client-table .col-city,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table .col-phone,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table .col-web,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table .col-orders {
    color: var(--s26-muted);
}

/* ── Keys: flat, no gloss ── */
body:is(.shell-room0, .shell-room2) .page-btn,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-new-btn,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-new-btn[hidden] {
    background: #fff;
    border: 1px solid var(--s26-line);
    border-radius: 8px;
    box-shadow: none;
    color: var(--s26-ink);
    font-weight: 500;
    letter-spacing: 0;
    text-shadow: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

body:is(.shell-room0, .shell-room2) .page-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #d0d5dd;
    color: var(--s26-ink);
}

body:is(.shell-room0, .shell-room2) #intelligence-view #client-new-btn,
body:is(.shell-room0, .shell-room2) #intelligence-view #client-new-btn[hidden] {
    background: var(--s26-accent);
    border-color: var(--s26-accent);
    color: #fff;
}

body:is(.shell-room0, .shell-room2) #intelligence-view #client-new-btn:hover {
    background: var(--s26-accent-deep);
    border-color: var(--s26-accent-deep);
    color: #fff;
}

body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-edit-btn,
body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-delete-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: none;
    font-weight: 500;
    text-shadow: none;
    transition: background 0.12s ease;
}

body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-edit-btn {
    color: var(--s26-accent-deep);
}

body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-edit-btn:hover {
    background: var(--s26-accent-soft);
}

body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-delete-btn {
    color: var(--s26-danger);
}

body:is(.shell-room0, .shell-room2) #intelligence-view .intel-row-delete-btn:hover {
    background: var(--s26-danger-soft);
}

/* ── Windows ── */
body:is(.shell-room0, .shell-room2) .client-panel.glass-panel,
body:is(.shell-room0, .shell-room2) .modal.glass-panel {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--s26-line);
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
    color: var(--s26-ink);
}

body:is(.shell-room0, .shell-room2) .modal.glass-panel {
    border-radius: 14px;
}

body:is(.shell-room0, .shell-room2) .panel-backdrop,
body:is(.shell-room0, .shell-room2) .modal-overlay {
    background: rgba(16, 24, 40, 0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body:is(.shell-room0, .shell-room2) .panel-title,
body:is(.shell-room0, .shell-room2) .modal-title {
    color: var(--s26-ink);
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: none;
}

body:is(.shell-room0, .shell-room2) .client-panel input,
body:is(.shell-room0, .shell-room2) .client-panel select,
body:is(.shell-room0, .shell-room2) .client-panel textarea,
body:is(.shell-room0, .shell-room2) .modal input,
body:is(.shell-room0, .shell-room2) .modal select,
body:is(.shell-room0, .shell-room2) .modal textarea {
    background: #fff;
    border: 1px solid var(--s26-line);
    border-radius: 8px;
    box-shadow: none;
    color: var(--s26-ink);
}

body:is(.shell-room0, .shell-room2) .client-panel label,
body:is(.shell-room0, .shell-room2) .modal label {
    color: var(--s26-muted);
    text-shadow: none;
}

/* ── Rail wins over the older tab rules, both rooms ── */
body.shell-room0 .r0-rail .module-tab,
body.shell-room0 .r0-rail .nav-secondary-item,
body.shell-room2 .r2-rail .module-tab,
body.shell-room2 .r2-rail .nav-secondary-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
}

body:is(.shell-room0, .shell-room2) .module-tab .module-tab-label {
    color: inherit !important;
    text-shadow: none !important;
}

body.shell-room0 .r0-rail .module-tab:hover,
body.shell-room2 .r2-rail .module-tab:hover {
    background: var(--s26-rail-hover) !important;
}

body.shell-room0 .r0-rail .module-tab.active,
body.shell-room0 .r0-rail .module-tab.active:hover,
body.shell-room2 .r2-rail .module-tab.active,
body.shell-room2 .r2-rail .module-tab.active:hover {
    background: #fff !important;
    color: var(--s26-accent-deep) !important;
}

body.shell-room2 .r2-signout {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 8px;
    box-shadow: none !important;
    color: #fff !important;
    padding: 6px 12px;
    text-shadow: none !important;
}

/* Row text and keys on one line */
body:is(.shell-room0, .shell-room2) #intelligence-view #client-table td {
    vertical-align: middle;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Dropdowns keep one look; older rules pin theirs */
body:is(.shell-room0, .shell-room2) #intelligence-view .period-select {
    background-color: #fff !important;
    border: 1px solid var(--s26-line) !important;
    box-shadow: none !important;
    color: var(--s26-ink) !important;
    opacity: 1 !important;
}

body:is(.shell-room0, .shell-room2) #intelligence-view #period-month.period-select:disabled {
    background-color: var(--s26-stage) !important;
    color: var(--s26-muted) !important;
}

/* No ghost pill on inactive tabs */
body.shell-room0 .r0-rail .module-tab:not(.active):not(:hover),
body.shell-room2 .r2-rail .module-tab:not(.active):not(:hover) {
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
}

body.shell-room0 .r0-powered-by-text,
body.shell-room0 .r0-powered-by-name,
body.shell-room2 .r2-powered-by-text,
body.shell-room2 .r2-powered-by-name {
    color: #fff !important;
    text-shadow: none !important;
}

body.shell-room0 .r0-powered-by-text,
body.shell-room2 .r2-powered-by-text {
    opacity: 0.75;
    font-weight: 500;
}

/* ── Module lights: bright teal with a radiating glow; the active one breathes ── */
body:is(.shell-room0, .shell-room2) {
    --s26-glow: #19f5e1;
}

body.shell-room0 .r0-rail .module-tab .module-light,
body.shell-room2 .module-tab .module-light,
body.shell-room2 .r2-rail .module-tab .module-light {
    display: inline-block !important;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--s26-glow) !important;
    box-shadow: 0 0 6px 1px rgba(25, 245, 225, 0.65) !important;
    opacity: 1 !important;
}

body.shell-room0 .r0-rail .module-tab.active .module-light,
body.shell-room2 .r2-rail .module-tab.active .module-light {
    animation: s26-radiate 2.4s ease-in-out infinite;
}

@keyframes s26-radiate {
    0%, 100% {
        box-shadow:
            0 0 4px 1px rgba(25, 245, 225, 0.75),
            0 0 0 0 rgba(25, 245, 225, 0.45);
    }
    50% {
        box-shadow:
            0 0 10px 3px rgba(25, 245, 225, 0.9),
            0 0 0 7px rgba(25, 245, 225, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.shell-room0 .r0-rail .module-tab.active .module-light,
    body.shell-room2 .r2-rail .module-tab.active .module-light {
        animation: none;
    }
}

/* ── Phone: the rail tab is easy to hit. Visible 26 x 72, touch area 52 x 104. ── */
body.hotel-phone.shell-room0 .r0-rail-door,
body.shell-room2.hotel-phone .r2-rail-door {
    width: 26px;
    height: 72px;
    z-index: 70;
    overflow: visible;
    background: var(--s26-rail);
    border-radius: 0 12px 12px 0;
    box-shadow: 0 0 10px 1px rgba(25, 245, 225, 0.55);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body.hotel-phone.shell-room0 .r0-rail-door::before,
body.shell-room2.hotel-phone .r2-rail-door::before {
    content: '';
    position: absolute;
    left: 0;
    top: -16px;
    width: 52px;
    height: 104px;
}

body.hotel-phone.shell-room0 .r0-rail-door::after,
body.shell-room2.hotel-phone .r2-rail-door::after {
    content: '\203A';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
}

body.hotel-phone.shell-room0.r0-rail-open .r0-rail-door,
body.shell-room2.hotel-phone.r2-rail-open .r2-rail-door {
    display: none;
}

/* Stat cards: whole kroner, small unit, always inside the box */
body:is(.shell-room0, .shell-room2) #intelligence-view .stat-card {
    min-width: 0;
    overflow: hidden;
}

body:is(.shell-room0, .shell-room2) .stat-value .stat-unit {
    font-size: 0.55em;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--s26-muted);
}

body:is(.shell-room0, .shell-room2).hotel-phone #intelligence-view .stat-value {
    font-size: 1.25rem;
    white-space: nowrap;
}

/* Pulsing teal line around the active tab and the phone rail tab */
body.shell-room0 .r0-rail .module-tab.active,
body.shell-room2 .r2-rail .module-tab.active {
    position: relative;
}

body.shell-room0 .r0-rail .module-tab.active::after,
body.shell-room2 .r2-rail .module-tab.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--s26-glow);
    border-radius: inherit;
    pointer-events: none;
    animation: s26-ring 2.4s ease-in-out infinite;
}

@keyframes s26-ring {
    0%, 100% {
        box-shadow: 0 0 4px 0 rgba(25, 245, 225, 0.45);
        opacity: 0.7;
    }
    50% {
        box-shadow: 0 0 14px 3px rgba(25, 245, 225, 0.8);
        opacity: 1;
    }
}

body.hotel-phone.shell-room0 .r0-rail-door,
body.shell-room2.hotel-phone .r2-rail-door {
    animation: s26-door 2.4s ease-in-out infinite;
}

@keyframes s26-door {
    0%, 100% {
        box-shadow: 0 0 6px 0 rgba(25, 245, 225, 0.45);
    }
    50% {
        box-shadow: 0 0 14px 3px rgba(25, 245, 225, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.shell-room0 .r0-rail .module-tab.active::after,
    body.shell-room2 .r2-rail .module-tab.active::after,
    body.hotel-phone.shell-room0 .r0-rail-door,
    body.shell-room2.hotel-phone .r2-rail-door {
        animation: none;
    }
}

/* A hidden key stays hidden; the old .panel-delete-btn rule overrode it */
body:is(.shell-room0, .shell-room2) .panel-delete-btn[hidden] {
    display: none !important;
}

/* The GPS bar only shows during a real trip; the old .gps-bar rule overrode hidden */
body:is(.shell-room0, .shell-room2) .gps-bar[hidden] {
    display: none !important;
}
