:root {
    --bg: #0f1419;
    --panel: #171e26;
    --line: #2a3440;
    --text: #e8eef5;
    --muted: #93a0b0;
    --accent: #d4a017;
    --accent-ink: #1a1400;
    --danger: #d96b6b;
    --ok: #5fbf8a;
    --radius: 12px;
    --font: "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
html:has(body.admin) {
    height: 100%;
    overflow: hidden;
}
body.admin {
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    background: linear-gradient(160deg, #0c1116, #141b23 55%, #10161d);
    color: var(--text);
    font-family: var(--font);
}
body.admin a,
body.admin a:hover,
body.admin a:focus,
body.admin a:active {
    text-decoration: none;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--line);
    padding: 1.15rem 0.9rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(10, 14, 18, 0.96);
    z-index: 30;
}

.admin-sidebar__head {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.admin-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.15rem 0.4rem 0.95rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--line);
    text-align: center;
    text-decoration: none;
    color: inherit;
}
.admin-brand__logo {
    display: block;
    height: 78px;
    width: auto;
    max-width: 132px;
    object-fit: contain;
    margin: 0 auto;
}
.admin-brand span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}
.admin-nav a,
.admin-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    transition: all 0.15s ease;
}
.admin-nav a .material-symbols-outlined,
.admin-logout .material-symbols-outlined {
    font-size: 1.25rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    vertical-align: middle;
}
.admin-nav a span:not(.material-symbols-outlined),
.admin-logout span:not(.material-symbols-outlined) {
    flex: 1;
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
}
.admin-nav a:hover,
.admin-logout:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}
.admin-nav a.is-active {
    background: rgba(212, 160, 23, 0.15);
    color: var(--accent);
    font-weight: 600;
}
.admin-nav a.is-active .material-symbols-outlined {
    color: var(--accent);
}

.admin-nav__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.85rem 0.85rem 0.25rem;
    opacity: 0.75;
}
.admin-nav__heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* Sidebar Toggle & Collapsed State */
.admin-top__left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-top__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-top__menu-btn:hover {
    background: rgba(212, 160, 23, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

body.admin {
    transition: grid-template-columns 0.25s cubic-bezier(0.2, 0, 0, 1);
}

body.admin.sidebar-collapsed {
    grid-template-columns: 74px minmax(0, 1fr);
}

body.admin.sidebar-collapsed .admin-sidebar {
    padding: 1rem 0.45rem;
    align-items: center;
}

body.admin.sidebar-collapsed .admin-brand {
    padding: 0.2rem 0 0.75rem;
    border-bottom: 1px solid var(--line);
    width: 100%;
}

body.admin.sidebar-collapsed .admin-brand__logo {
    height: 36px;
    max-width: 36px;
    object-fit: contain;
}

body.admin.sidebar-collapsed .admin-brand span {
    display: none;
}

body.admin.sidebar-collapsed .admin-nav {
    width: 100%;
}

body.admin.sidebar-collapsed .admin-nav a {
    justify-content: center;
    padding: 0.65rem 0;
    text-align: center;
    position: relative;
}

body.admin.sidebar-collapsed .admin-nav a span:not(.material-symbols-outlined) {
    display: none;
}

body.admin.sidebar-collapsed .admin-nav__heading {
    display: none;
}

body.admin.sidebar-collapsed .admin-logout {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0;
    text-align: center;
}

body.admin.sidebar-collapsed .admin-logout span:not(.material-symbols-outlined) {
    display: none;
}

.admin-main {
    min-width: 0;
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.75rem;
    border-bottom: 1px solid var(--line);
    background: rgba(12, 17, 22, 0.96);
    backdrop-filter: blur(8px);
}
.admin-top h1 { margin: 0; font-size: 1.35rem; }
.admin-user { color: var(--muted); font-size: 0.9rem; }
.admin-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.5rem 1.75rem 2.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.stat-card span { color: var(--muted); font-size: 0.82rem; }
.stat-card strong { display: block; margin-top: 0.35rem; font-size: 1.45rem; }

.dash { display: flex; flex-direction: column; gap: 1.15rem; }
.dash-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 0;
}
.dash-filters__presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dash-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
}
.dash-chip:hover { color: var(--text); border-color: rgba(212, 160, 23, 0.4); }
.dash-chip.is-active {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: transparent;
}
.dash-filters__custom {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.55rem;
}
.dash-filters__custom[hidden] { display: none !important; }
.dash-filters__custom label { margin: 0; min-width: 9.5rem; }
.dash-filters__custom button {
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    cursor: pointer;
}
.dash-filters__label {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
}
.dash-filters__label strong { color: var(--text); }

.dash-alerts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.65rem;
}
.dash-alert {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.03);
}
.dash-alert strong { font-size: 0.86rem; }
.dash-alert span { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.dash-alert--warn { border-color: rgba(212, 160, 23, 0.4); background: rgba(212, 160, 23, 0.08); }
.dash-alert--peak { border-color: rgba(212, 160, 23, 0.35); }
.dash-alert--danger { border-color: rgba(217, 107, 107, 0.45); background: rgba(217, 107, 107, 0.1); }
.dash-alert--danger strong { color: var(--danger); }

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.dash-kpi {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
a.dash-kpi:hover { border-color: rgba(212, 160, 23, 0.4); }
.dash-kpi span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.dash-kpi strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.28rem;
    line-height: 1.2;
    word-break: break-word;
}
.dash-trend {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.dash-trend--up { color: var(--ok); }
.dash-trend--down { color: var(--danger); }
.dash-trend--flat { color: var(--muted); }

.dash-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
    align-items: stretch;
}
.dash-grid--charts { grid-template-columns: 1fr 1fr; }
.dash-grid--tables { grid-template-columns: 1fr 1fr; }
.dash-panel {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dash-panel .panel__head { flex: 0 0 auto; }
.dash-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 240px;
    height: auto;
}
.dash-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.dash-chart-wrap--short { min-height: 260px; }

.dash-occ { display: flex; flex-direction: column; gap: 0.7rem; }
.dash-occ__day {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.15rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.02);
}
.dash-occ__day:hover { border-color: rgba(212, 160, 23, 0.35); }
.dash-occ__day.is-low { border-color: rgba(212, 160, 23, 0.45); background: rgba(212, 160, 23, 0.06); }
.dash-occ__meta { grid-row: 1 / 3; }
.dash-occ__meta strong { display: block; font-size: 0.92rem; }
.dash-occ__meta span { color: var(--muted); font-size: 0.75rem; }
.dash-occ__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.dash-occ__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c4921c, var(--accent));
}
.dash-occ__day.is-low .dash-occ__bar i { background: var(--accent); }
.dash-occ__day em {
    font-style: normal;
    font-weight: 700;
    font-size: 0.95rem;
}
.dash-occ__day small { grid-column: 2; color: var(--muted); font-size: 0.72rem; }

.dash-peak-now {
    margin: -0.35rem 0 0.85rem;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 600;
}
.dash-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
    align-items: end;
    min-height: 140px;
}
.dash-days__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    height: 140px;
}
.dash-days__item span {
    order: 2;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}
.dash-days__item.is-peak span { color: var(--accent); }
.dash-days__track {
    order: 1;
    flex: 1;
    width: 100%;
    max-width: 28px;
    border-radius: 8px 8px 4px 4px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.dash-days__track i {
    display: block;
    width: 100%;
    background: rgba(212, 160, 23, 0.35);
    border-radius: 8px 8px 4px 4px;
}
.dash-days__item.is-peak .dash-days__track i { background: var(--accent); }

.dash-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
}
.dash-metrics div {
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}
.dash-metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}
.dash-metrics strong { display: block; font-size: 0.98rem; }
.dash-metrics small { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.75rem; }

.dash-table,
.dash-table.table-wrap { width: 100%; }
.dash-table table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.dash-table th,
.dash-table td {
    padding: 0.65rem 0.45rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.dash-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.dash-table td small { display: block; color: var(--muted); margin-top: 0.15rem; }
.dash-tag {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    background: rgba(212, 160, 23, 0.16);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid,
    .dash-grid--charts,
    .dash-grid--tables { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-kpis { grid-template-columns: 1fr; }
    .dash-filters__label { margin-left: 0; }
    .dash-metrics { grid-template-columns: 1fr; }
    .dash-occ__day { grid-template-columns: 1fr auto; }
    .dash-occ__meta { grid-row: auto; }
    .dash-occ__bar { grid-column: 1 / -1; }
    .dash-occ__day small { grid-column: 1; }
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.panel__head h2 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.panel__head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.panel__head { margin-bottom: 1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.panel__head a { color: var(--accent); text-decoration: none; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
label small { font-size: 0.75rem; }
input, select, button, textarea {
    font: inherit;
}
input, select, textarea {
    background: #10161d;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
}
.checkbox { flex-direction: row; align-items: center; gap: 0.6rem; margin-top: 1.6rem; }
.form-actions { grid-column: 1 / -1; }
.form-actions button,
.filters button {
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
}
.form-actions .btn-ghost,
.rule-form__actions .btn-ghost,
.admin-modal__actions .btn-ghost {
    background: transparent !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
}
.form-actions .btn-ghost:hover,
.rule-form__actions .btn-ghost:hover,
.admin-modal__actions .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1rem;
    align-items: end;
}
.filters .btn-ghost {
    height: fit-content;
    align-self: end;
}

.bookings-table {
    table-layout: fixed;
    width: 100%;
    min-width: 960px;
}
.bookings-table th,
.bookings-table td {
    vertical-align: middle;
    padding: 0.85rem 0.5rem;
    width: 11.11%;
    box-sizing: border-box;
    word-break: break-word;
}
.bookings-table thead th {
    text-align: center !important;
}
.bookings-table .col-code,
.bookings-table .col-date,
.bookings-table .col-slot,
.bookings-table .col-duration,
.bookings-table .col-customer {
    text-align: left;
}
.bookings-table tbody td.col-mobile,
.bookings-table tbody td.col-status {
    text-align: center;
}
.bookings-table tbody td.col-price {
    text-align: right;
}
.bookings-table tbody td.col-actions {
    text-align: center;
}
.bookings-table .booking-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.84rem;
    color: var(--text);
}
.bookings-table .price-old {
    text-decoration: line-through;
    opacity: 0.65;
}
.bookings-table .muted-dash {
    color: var(--muted);
}
.bookings-table .rule-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--muted);
}
.bookings-table .phone-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
}
.bookings-table .phone-cell__num {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.bookings-table .phone-copy {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--muted);
}
.bookings-table .phone-copy .material-symbols-outlined {
    font-size: 1.05rem;
}
.bookings-table .phone-copy:hover {
    color: var(--accent);
}
.bookings-table .phone-copy.is-copied {
    color: var(--ok);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
small { color: var(--muted); }
.actions { display: flex; gap: 0.5rem; }
.btn-link {
    background: transparent;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
}
.btn-link--danger { color: var(--danger); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: capitalize;
    background: #2a3440;
}
.badge--confirmed { background: rgba(95,191,138,0.2); color: var(--ok); }
.badge--pending { background: rgba(212,160,23,0.2); color: var(--accent); }
.badge--cancelled { background: rgba(217,107,107,0.2); color: var(--danger); }

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.alert--success { background: rgba(95,191,138,0.15); color: var(--ok); }
.alert--error { background: rgba(217,107,107,0.15); color: var(--danger); }

/* —— Sports-inspired Admin Login —— */
body.admin-login {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: #07090d;
    overflow-x: hidden;
}

.login-stage {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-atmosphere {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(212, 160, 23, 0.18), transparent 55%),
        radial-gradient(70% 50% at 85% 80%, rgba(40, 90, 140, 0.2), transparent 50%),
        linear-gradient(160deg, #0a0e14 0%, #101820 45%, #0b1016 100%);
}

.login-atmosphere__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: loginPulse 8s ease-in-out infinite;
}
.login-atmosphere__glow--a {
    width: 42vw;
    height: 42vw;
    top: -12%;
    left: 10%;
    background: rgba(212, 160, 23, 0.22);
}
.login-atmosphere__glow--b {
    width: 36vw;
    height: 36vw;
    right: -8%;
    bottom: 5%;
    background: rgba(70, 120, 180, 0.18);
    animation-delay: -3s;
}

.login-atmosphere__beam {
    position: absolute;
    top: -20%;
    width: 18vw;
    height: 140%;
    background: linear-gradient(
        180deg,
        rgba(255, 230, 160, 0.16),
        rgba(212, 160, 23, 0.04) 45%,
        transparent 75%
    );
    filter: blur(18px);
    transform-origin: top center;
    animation: loginBeam 10s ease-in-out infinite;
}
.login-atmosphere__beam--1 { left: 18%; transform: rotate(8deg); }
.login-atmosphere__beam--2 { left: 46%; width: 22vw; animation-delay: -2.5s; transform: rotate(-2deg); }
.login-atmosphere__beam--3 { left: 72%; animation-delay: -5s; transform: rotate(-10deg); }

.login-atmosphere__court {
    position: absolute;
    inset: 12% 8% 8%;
    border: 1px solid rgba(212, 160, 23, 0.12);
    border-radius: 2rem;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(212, 160, 23, 0.1) 49.5%, rgba(212, 160, 23, 0.1) 50.5%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(212, 160, 23, 0.08) 49.5%, rgba(212, 160, 23, 0.08) 50.5%, transparent 50.5%);
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}

.login-atmosphere__court::before,
.login-atmosphere__court::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(212, 160, 23, 0.18);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.login-atmosphere__court::before { width: min(28vw, 220px); height: min(28vw, 220px); }
.login-atmosphere__court::after { width: min(12vw, 96px); height: min(12vw, 96px); }

.login-atmosphere__lines {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent 0,
            transparent 46px,
            rgba(255, 255, 255, 0.015) 46px,
            rgba(255, 255, 255, 0.015) 47px
        );
    opacity: 0.7;
    animation: loginDrift 18s linear infinite;
}

.login-atmosphere__orb {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212, 160, 23, 0.28);
    box-shadow: 0 0 40px rgba(212, 160, 23, 0.12);
    animation: loginFloat 7s ease-in-out infinite;
}
.login-atmosphere__orb--1 {
    width: 10px;
    height: 10px;
    top: 22%;
    right: 18%;
    background: rgba(212, 160, 23, 0.65);
}
.login-atmosphere__orb--2 {
    width: 7px;
    height: 7px;
    bottom: 24%;
    left: 16%;
    background: rgba(255, 255, 255, 0.45);
    animation-delay: -2.5s;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: stretch;
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1rem 1.5rem 0.25rem;
    animation: loginRise 0.7s ease both;
}

.login-hero__logo {
    width: min(160px, 42vw);
    height: auto;
    margin-bottom: 1.4rem;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.login-hero__eyebrow {
    margin: 0 0 0.55rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-hero__title {
    margin: 0;
    font-family: "Montserrat", var(--font);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 40px rgba(212, 160, 23, 0.25);
}

.login-hero__tagline {
    margin: 1rem 0 0;
    max-width: 28rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.login-hero__stats {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 26rem;
}

.login-hero__stats li {
    padding: 0.85rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 23, 0.18);
    background: rgba(10, 14, 18, 0.45);
    backdrop-filter: blur(8px);
}

.login-hero__stats strong {
    display: block;
    color: var(--accent);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-hero__stats span {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.login-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.85rem 1.7rem 1.55rem;
    border-radius: 22px;
    border: 1px solid rgba(212, 160, 23, 0.22);
    background:
        linear-gradient(160deg, rgba(28, 34, 42, 0.92), rgba(14, 18, 24, 0.94)),
        rgba(17, 22, 28, 0.9);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    animation: loginRise 0.7s ease 0.08s both;
}

.login-panel__head { margin-bottom: 0.25rem; }
.login-panel__head h2 {
    margin: 0.7rem 0 0.35rem;
    font-family: "Montserrat", var(--font);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.login-panel__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.login-panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    background: rgba(212, 160, 23, 0.1);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.login-panel__badge .material-symbols-outlined {
    font-size: 1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.login-captcha-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100% !important;
}

.login-captcha-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    border-radius: 12px;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.35);
    color: var(--accent);
    font-family: "IBM Plex Sans", monospace;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.login-field__control--captcha {
    flex: 1 !important;
    min-width: 0 !important;
}

.login-captcha-pill__math {
    color: #ffffff;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
}

.login-captcha-pill__equals {
    color: var(--accent);
}

.login-captcha-pill__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    margin-left: 0.15rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s ease, transform 0.25s ease;
}

.login-captcha-pill__refresh:hover {
    color: var(--accent);
    transform: rotate(180deg);
}

.login-captcha-pill__refresh.is-spinning {
    animation: captchaSpin 0.6s linear infinite;
    color: var(--accent);
}

@keyframes captchaSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-field__control input[type="number"]::-webkit-inner-spin-button,
.login-field__control input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.login-field__control input[type="number"] {
    -moz-appearance: textfield !important;
}

.login-field__control {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 16, 0.85);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.login-field__control .material-symbols-outlined {
    color: var(--muted);
    font-size: 1.2rem;
    transition: color 0.2s ease;
}
.login-field__control:focus-within {
    border-color: rgba(212, 160, 23, 0.55);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12);
    background: rgba(12, 16, 22, 0.95);
}
.login-field__control:focus-within .material-symbols-outlined {
    color: var(--accent);
}
.login-field__control input {
    flex: 1;
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.9rem 0 !important;
    color: var(--text);
    font: inherit;
    outline: none;
}
.login-field__control input::placeholder {
    color: #667284;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.95rem 1.1rem;
    background: linear-gradient(135deg, #f0c94a, #d4a017 55%, #b8890f);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(212, 160, 23, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.login-submit .material-symbols-outlined {
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}
.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(212, 160, 23, 0.36);
    filter: brightness(1.04);
}
.login-submit:hover .material-symbols-outlined {
    transform: translateX(3px);
}
.login-submit:active {
    transform: translateY(0);
}

.login-hint {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

@keyframes loginRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes loginPulse {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    50% { transform: scale(1.08); opacity: 0.7; }
}
@keyframes loginBeam {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.75; }
}
@keyframes loginDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-48px); }
}
@keyframes loginFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    .login-hero {
        padding: 0.25rem 0 0.5rem;
        text-align: center;
        align-items: center;
    }
    .login-hero__tagline { margin-left: auto; margin-right: auto; }
    .login-hero__stats { width: 100%; max-width: none; }
    .login-atmosphere__court { opacity: 0.22; }
}

@media (max-width: 480px) {
    .login-stage { padding: 1rem; }
    .login-panel { padding: 1.4rem 1.15rem 1.25rem; border-radius: 18px; }
    .login-hero__stats { grid-template-columns: 1fr; }
    .login-hero__title { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .login-atmosphere__glow,
    .login-atmosphere__beam,
    .login-atmosphere__lines,
    .login-atmosphere__orb,
    .login-hero,
    .login-panel {
        animation: none !important;
    }
}

.btn-accent,
.btn-ghost {
    font: inherit;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-accent {
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.inline-form { display: inline; margin: 0; }
.panel-footnote { margin: 0.85rem 0 0; color: var(--muted); font-size: 0.82rem; }

.material-symbols-outlined {
    font-family: "Material Symbols Outlined", sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

.rules-table {
    table-layout: auto;
    width: 100%;
    min-width: 720px;
}
.rules-table th,
.rules-table td {
    vertical-align: middle;
    padding: 0.85rem 0.75rem;
}
.rules-table .col-label,
.rules-table .col-days,
.rules-table .col-time,
.rules-table .col-status {
    text-align: left;
}
.rules-table .col-label { width: auto; }
.rules-table .col-days { white-space: nowrap; }
.rules-table .col-time { white-space: nowrap; }
.rules-table .col-num {
    white-space: nowrap;
    text-align: right;
    width: 1%;
}
.rules-table .col-status {
    white-space: nowrap;
    width: 1%;
    padding-right: 0.5rem;
}
.rules-table .col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    padding-left: 0.5rem;
}
.rules-table .rule-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
}
.rules-table tr.is-disabled td { opacity: 0.55; }
.rules-table tr.is-disabled .action-icons { opacity: 1; }

.action-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    cursor: pointer;
}
.icon-btn:hover {
    background: rgba(212, 160, 23, 0.14);
    border-color: rgba(212, 160, 23, 0.35);
}
.icon-btn--danger { color: var(--danger); }
.icon-btn--danger:hover {
    background: rgba(217, 107, 107, 0.14);
    border-color: rgba(217, 107, 107, 0.35);
}
.icon-btn .material-symbols-outlined { font-size: 1.15rem; }

/* DataTables (server-side) — dark admin theme */
.dataTables_wrapper {
    color: var(--muted);
    font-size: 0.9rem;
}

.dt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(10, 14, 18, 0.55);
}
.dt-toolbar__left,
.dt-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    float: none !important;
}
.dt-toolbar__right { margin-left: auto; }

.dt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}
.dt-footer__left,
.dt-footer__right {
    float: none !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    float: none !important;
    margin: 0;
    text-align: left;
}

.dt-length {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.dt-length__label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.dt-length label {
    display: inline-flex !important;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-direction: row !important;
    gap: 0;
}
.dt-length select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 4.5rem;
    margin: 0 !important;
    padding: 0.55rem 2rem 0.55rem 0.8rem !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background-color: #10161d !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 14px) calc(50% - 2px),
        calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color: var(--text) !important;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}
.dt-length select:hover,
.dt-length select:focus {
    border-color: rgba(212, 160, 23, 0.45) !important;
    outline: none;
}

.dt-search {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    min-width: min(280px, 72vw);
}
.dt-search label {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    flex-direction: row !important;
}
.dt-search__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.15rem !important;
    pointer-events: none;
    z-index: 1;
}
.dt-search input {
    width: 100% !important;
    margin: 0 !important;
    padding: 0.6rem 0.9rem 0.6rem 2.35rem !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #10161d !important;
    color: var(--text) !important;
    font: inherit;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.dt-search input::placeholder {
    color: #6f7b8a;
}
.dt-search input:hover,
.dt-search input:focus {
    border-color: rgba(212, 160, 23, 0.45) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.dataTables_wrapper .dataTables_info {
    float: none !important;
    padding: 0 !important;
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    margin: 0;
    padding: 0;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #10161d !important;
    border: 1px solid var(--line) !important;
    color: var(--muted) !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.75rem !important;
    margin: 0 0.15rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(212, 160, 23, 0.18) !important;
    border-color: rgba(212, 160, 23, 0.45) !important;
    color: var(--accent) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.45;
    cursor: default !important;
}
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}
table.dataTable thead th {
    border-bottom: 1px solid var(--line) !important;
    color: var(--muted);
    font-weight: 500;
}
table.dataTable tbody td {
    border-bottom: 1px solid var(--line) !important;
    color: var(--text);
}
table.dataTable.no-footer {
    border-bottom: 0 !important;
}
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background: transparent;
}
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}
.dataTables_processing {
    background: rgba(23, 30, 38, 0.92) !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 720px) {
    .dt-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .dt-toolbar__left,
    .dt-toolbar__right {
        width: 100%;
        margin-left: 0;
    }
    .dt-search { min-width: 0; width: 100%; }
    .dt-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .dt-footer__right { align-self: flex-end; }
}

.form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid__full {
    grid-column: 1 / -1;
}

.rule-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin: 0.25rem 0 0.5rem;
}
.rule-presets > span { color: var(--muted); font-size: 0.85rem; }
.rule-presets__btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rule-presets__btns button {
    background: #10161d;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.rule-presets__btns button:hover { border-color: var(--accent); color: var(--accent); }

.day-checks {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin: 0 0 0.75rem;
}
.day-checks legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.day-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    align-items: center;
}
.day-checks__item { margin-top: 0; }

.rule-form { display: flex; flex-direction: column; gap: 0.85rem; }
.rule-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.admin-modal[hidden] { display: none !important; }
.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.admin-modal__dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: min(90vh, 760px);
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.25rem 1.35rem 1.4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.admin-modal__dialog--wide {
    width: min(720px, 100%);
    max-height: min(92vh, 860px);
}
.optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.8em;
}
.promo-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(212, 160, 23, 0.16);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.promo-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.28);
    background: rgba(212, 160, 23, 0.08);
}
.promo-preview span {
    color: var(--muted);
    font-size: 0.82rem;
}
.promo-preview strong {
    color: var(--text);
    font-size: 0.95rem;
}
.admin-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.admin-modal__head h3 { margin: 0; font-size: 1.05rem; }
.admin-modal__close {
    color: var(--muted);
    flex-shrink: 0;
}
.admin-modal__close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line);
}
.admin-modal__close .material-symbols-outlined {
    font-size: 1.25rem;
}
.admin-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.5rem;
}
body.admin-modal-open { overflow: hidden; }

.switch-current {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}
.switch-current__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}
.switch-current__grid span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}
.switch-current__grid strong {
    font-size: 0.92rem;
    font-weight: 600;
}
.switch-form { display: flex; flex-direction: column; gap: 0.85rem; }
.switch-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}
.switch-slots {
    max-height: 280px;
    overflow: auto;
    padding-right: 0.2rem;
}
.switch-slots .muted {
    margin: 0.35rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.switch-slot-group { margin-bottom: 0.85rem; }
.switch-slot-group p {
    margin: 0 0 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.switch-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.switch-slot {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 5.6rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.2;
}
.switch-slot small {
    color: var(--muted);
    font-size: 0.7rem;
}
.switch-slot.is-available:hover {
    border-color: rgba(212, 160, 23, 0.55);
    background: rgba(212, 160, 23, 0.08);
}
.switch-slot.is-selected {
    border-color: transparent;
    background: linear-gradient(135deg, #e0b84a, #c4921c);
    color: #241c00;
}
.switch-slot.is-selected small { color: inherit; opacity: 0.8; }
.switch-slot.is-current:not(.is-selected) {
    outline: 1px dashed rgba(212, 160, 23, 0.7);
    outline-offset: 1px;
}
.switch-slot.is-booked,
.switch-slot.is-blocked,
.switch-slot:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
.switch-preview {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.28);
    background: rgba(212, 160, 23, 0.08);
}
.switch-preview__row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0.75rem 1rem;
}
.switch-preview__row span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}
.switch-preview__row small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
}
.switch-preview__row small.is-up { color: #e08b8b; }
.switch-preview__row small.is-down { color: #8fd19e; }
.switch-preview__offer {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}
.switch-history {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}
.switch-history h4 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
}
.switch-history ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.switch-history li {
    font-size: 0.82rem;
    color: var(--text);
}
.switch-history span,
.switch-history em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 0.75rem;
}
@media (max-width: 720px) {
    .switch-current__grid,
    .switch-preview__row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    body.admin {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: 100dvh;
    }
    .admin-sidebar {
        position: sticky;
        top: 0;
        height: auto;
        max-height: none;
        overflow: visible;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        z-index: 40;
    }
    .admin-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 auto; }
    .admin-main {
        height: auto;
        max-height: none;
        min-height: 0;
    }
    .form-grid--2 { grid-template-columns: 1fr; }
}

/* —— jQuery UI Datepicker (admin) —— */
input.admin-datepicker {
    cursor: pointer;
    min-width: 10.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa3ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.2rem;
}
#ui-datepicker-div,
div#ui-datepicker-div,
.ui-datepicker {
    z-index: 999999 !important;
    width: 17.5rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #121820;
    color: var(--text);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    font-family: var(--font);
}
.ui-datepicker .ui-datepicker-header {
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 0.2rem 0 0.55rem;
}
.ui-datepicker .ui-datepicker-title {
    margin: 0 1.8rem;
    font-size: 0.92rem;
    font-weight: 600;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    background: #10161d;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 6px;
    padding: 0.15rem 0.25rem;
    font-size: 0.82rem;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 0.35rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    cursor: pointer;
}
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(212, 160, 23, 0.15);
    border-color: rgba(212, 160, 23, 0.35);
}
.ui-datepicker .ui-icon {
    background-image: none !important;
    text-indent: 0;
    overflow: visible;
    width: 100%;
    height: 100%;
    margin: 0;
    display: grid;
    place-items: center;
    color: var(--text);
    font-size: 0;
}
.ui-datepicker .ui-datepicker-prev .ui-icon::before,
.ui-datepicker .ui-datepicker-next .ui-icon::before {
    font-size: 0.95rem;
    line-height: 1;
    color: var(--muted);
}
.ui-datepicker .ui-datepicker-prev .ui-icon::before { content: '‹'; }
.ui-datepicker .ui-datepicker-next .ui-icon::before { content: '›'; }
.ui-datepicker table {
    width: 100%;
    margin: 0;
    font-size: 0.82rem;
}
.ui-datepicker th {
    color: var(--muted);
    font-weight: 500;
    padding: 0.35rem 0;
    border: 0;
}
.ui-datepicker td {
    border: 0;
    padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0 auto;
    border-radius: 8px;
    border: 0;
    text-align: center;
    color: var(--text);
    background: transparent;
    line-height: 1;
}
.ui-datepicker td a:hover {
    background: rgba(212, 160, 23, 0.18);
    color: var(--accent);
}
.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-active.ui-state-hover {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
    font-weight: 600;
}
.ui-datepicker .ui-state-highlight {
    box-shadow: inset 0 0 0 1px rgba(212, 160, 23, 0.55);
}
.ui-datepicker .ui-datepicker-other-month span,
.ui-datepicker .ui-datepicker-unselectable span {
    opacity: 0.35;
}
.ui-datepicker .ui-datepicker-buttonpane {
    border-top: 1px solid var(--line);
    margin: 0.45rem 0 0;
    padding: 0.45rem 0 0;
    background: transparent;
}
.ui-datepicker .ui-datepicker-buttonpane button {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    opacity: 1;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
    background: rgba(212, 160, 23, 0.15);
    border-color: rgba(212, 160, 23, 0.4);
    color: var(--accent);
}
.ui-datepicker .ui-datepicker-buttonpane button:hover {
    filter: brightness(1.08);
}

/* Custom jQuery TimePicker (Dark-Gold Theme) */
.admin-timepicker-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
}
.admin-timepicker-input {
    width: 100%;
    padding-right: 2.4rem !important;
    cursor: pointer;
}
.admin-timepicker-icon {
    position: absolute;
    right: 0.75rem;
    color: var(--gold, #d4af37);
    font-size: 1.15rem;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
}
.admin-timepicker-wrap.is-active .admin-timepicker-icon {
    transform: scale(1.15);
    color: #fff;
}
.admin-timepicker-dropdown {
    position: absolute;
    z-index: 10050 !important;
    background: #14171a;
    border: 1px solid var(--gold-line, rgba(212, 175, 55, 0.4));
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(212, 175, 55, 0.15);
    overflow: hidden;
    animation: timePickerPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes timePickerPop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.admin-timepicker-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.admin-timepicker-list::-webkit-scrollbar {
    width: 5px;
}
.admin-timepicker-list::-webkit-scrollbar-thumb {
    background: rgba(242, 202, 80, 0.35);
    border-radius: 4px;
}
.admin-timepicker-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text, #f8fafc);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-timepicker-item:hover {
    background: rgba(242, 202, 80, 0.18);
    color: var(--gold, #d4af37);
}
.admin-timepicker-item.is-selected {
    background: var(--gold, #d4af37);
    color: #0b0d10;
    font-weight: 800;
}

/*  Bootbox confirm (dark admin)  */
.bootbox.modal { z-index: 2000; }
.bootbox .modal-dialog { max-width: 420px; }
.bootbox .modal-content {
    background: #171e26;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.bootbox .modal-header {
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.15rem;
}
.bootbox .modal-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
}
.bootbox .modal-header .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.7;
}
.bootbox .modal-body {
    padding: 1.15rem 1.2rem 0.85rem;
}
.bootbox .bootbox-message {
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.45;
}
.bootbox .modal-footer {
    border-top: 1px solid var(--line);
    padding: 0.85rem 1.15rem 1.05rem;
    gap: 0.5rem;
}
.bootbox .modal-footer .btn {
    min-width: 7rem;
    border-radius: 8px;
    font-weight: 600;
}
.bootbox .modal-footer .btn-warning {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.bootbox .modal-footer .btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.bootbox .modal-footer .btn-outline-light {
    color: var(--text);
    border-color: var(--line);
    background: transparent;
}
.bootbox .modal-footer .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: var(--muted);
}
.modal-backdrop.show { opacity: 0.65; z-index: 1990; }

/* —— Home Page CMS settings —— */
.form-span-2 { grid-column: 1 / -1; }

.cms-settings { display: flex; flex-direction: column; gap: 1.35rem; }
.cms-settings__hero,
.cms-editor__top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(212,160,23,0.12), transparent 45%),
        var(--panel);
}
.cms-settings__eyebrow,
.cms-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 0.45rem;
}
.cms-settings__hero h2,
.cms-editor__heading h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}
.cms-settings__hero p,
.cms-editor__heading p,
.cms-group__head p,
.cms-panel-card__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 46rem;
    line-height: 1.45;
}
.cms-settings__hero-actions,
.cms-editor__top-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.cms-settings__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
}
.cms-search {
    position: relative;
    flex: 1 1 240px;
    max-width: 360px;
}
.cms-search .material-symbols-outlined {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.15rem;
}
.cms-search input {
    width: 100%;
    padding-left: 2.4rem;
}
.cms-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.cms-chip {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.cms-chip.is-active,
.cms-chip:hover {
    border-color: rgba(212,160,23,0.45);
    color: var(--accent);
    background: rgba(212,160,23,0.12);
}
.cms-group { display: flex; flex-direction: column; gap: 0.85rem; }
.cms-group__head h3,
.cms-panel-card__head h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}
.cms-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}
.cms-card,
.cms-row,
.cms-item,
.cms-panel-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cms-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
}
.cms-card__icon,
.cms-row__icon,
.cms-editor__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(212,160,23,0.12);
    color: var(--accent);
    flex: 0 0 auto;
}
.cms-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}
.cms-card__title-row h4,
.cms-item__body h4 {
    margin: 0;
    font-size: 1rem;
}
.cms-card__body p,
.cms-row__body p,
.cms-item__body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
}
.cms-card__actions,
.cms-row__controls,
.cms-item__actions,
.cms-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.cms-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}
.cms-status.is-on { background: rgba(95,191,138,0.18); color: var(--ok); }
.cms-status.is-off { background: rgba(147,160,176,0.16); color: var(--muted); }

.cms-section-list { display: flex; flex-direction: column; gap: 0.65rem; }
.cms-row {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cms-row:hover {
    border-color: rgba(212,160,23,0.28);
    background: rgba(255,255,255,0.02);
}
.cms-row.is-disabled { opacity: 0.78; }
.cms-row.is-disabled .cms-row__icon {
    filter: grayscale(0.35);
    opacity: 0.8;
}
.cms-row.is-dragging {
    opacity: 0.55;
    border-color: rgba(212,160,23,0.55);
    background: rgba(212,160,23,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    cursor: grabbing;
}
.cms-row.is-drag-over-before {
    box-shadow: inset 0 2px 0 0 var(--accent);
}
.cms-row.is-drag-over-after {
    box-shadow: inset 0 -2px 0 0 var(--accent);
}
.cms-drag-handle {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    padding: 0;
}
.cms-drag-handle:hover {
    color: var(--accent);
    background: rgba(212,160,23,0.1);
}
.cms-drag-handle:active { cursor: grabbing; }
.cms-drag-handle .material-symbols-outlined { font-size: 1.25rem; }
.cms-section-list.is-sorting .cms-row:not(.is-dragging) {
    transition: transform 0.12s ease;
}
.cms-section-list.is-saving-order {
    pointer-events: none;
    opacity: 0.85;
}
.cms-row__order {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255,255,255,0.02);
}

/* Action rail: Order | Show | Edit */
.cms-actions--row {
    margin-top: 0;
    padding: 0.35rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(0,0,0,0.22);
    gap: 0.35rem;
    flex-wrap: nowrap;
}
.cms-actions--card {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}
.cms-actions__group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.35rem;
    min-height: 2.4rem;
}
.cms-actions__hint {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1;
}
.cms-actions__divider {
    width: 1px;
    align-self: stretch;
    margin: 0.25rem 0.1rem;
    background: rgba(255,255,255,0.08);
}
.cms-actions__show {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    min-height: 2.25rem;
    line-height: 1;
}
.cms-actions__show .cms-switch {
    flex-shrink: 0;
    line-height: 0;
}
.cms-actions__show .cms-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    line-height: 1;
    text-align: center;
}
.cms-actions--card .cms-btn--edit {
    flex-shrink: 0;
    align-self: center;
}

.cms-reorder {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}
.cms-reorder .inline-form { margin: 0; }
.cms-reorder .cms-icon-btn {
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.cms-reorder .cms-icon-btn + .inline-form .cms-icon-btn,
.cms-reorder .inline-form + .inline-form .cms-icon-btn {
    border-left: 1px solid var(--line);
}
.cms-icon-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.cms-icon-btn:hover { border-color: rgba(212,160,23,0.4); color: var(--accent); background: rgba(212,160,23,0.08); }
.cms-icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.cms-icon-btn:disabled:hover { border-color: transparent; color: var(--text); background: transparent; }
.cms-icon-btn--danger { color: var(--danger); }
.cms-icon-btn .material-symbols-outlined { font-size: 1.15rem; }

.cms-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 8px;
    padding: 0.65rem 0.95rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.cms-btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
}
.cms-btn--primary:hover { filter: brightness(1.05); }
.cms-btn--edit {
    background: var(--accent);
    color: var(--accent-ink);
    padding: 0.55rem 0.85rem;
    border-radius: 9px;
    white-space: nowrap;
}
.cms-btn--edit:hover { filter: brightness(1.05); }
.cms-btn--file { position: relative; overflow: hidden; }
.cms-btn--file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.cms-btn .material-symbols-outlined { font-size: 1.1rem; }

.cms-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font: inherit;
    position: relative;
}
.cms-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cms-switch__track {
    width: 2.4rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #2a3440;
    border: 1px solid var(--line);
    position: relative;
    display: inline-block;
}
.cms-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #c4ced8;
    transition: transform 0.18s ease, background 0.18s ease;
}
.cms-switch.is-on .cms-switch__track {
    background: rgba(212,160,23,0.28);
    border-color: rgba(212,160,23,0.55);
}
.cms-switch.is-on .cms-switch__thumb {
    transform: translateX(1.05rem);
    background: var(--accent);
}
.cms-switch__label { font-size: 0.8rem; font-weight: 600; min-width: 1.4rem; }
.cms-empty { color: var(--muted); text-align: center; padding: 1rem; }

/* Editor */
.cms-editor { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 5.5rem; }
.cms-editor__heading { display: flex; gap: 0.85rem; align-items: flex-start; }
.cms-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.35rem;
}
.cms-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0.65rem 0.9rem;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.cms-tab.is-active {
    color: var(--accent);
    background: rgba(212,160,23,0.1);
}
.cms-tab__count {
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.72rem;
    background: rgba(255,255,255,0.08);
}
.cms-tab-panel { display: flex; flex-direction: column; gap: 0.9rem; }
.cms-tab-panel[hidden] { display: none !important; }
.cms-panel-card { padding: 1.1rem 1.15rem; }
.cms-panel-card__head { margin-bottom: 1rem; }
.cms-panel-card__head--row {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.cms-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.cms-field { display: flex; flex-direction: column; gap: 0.35rem; }
.cms-field--full { grid-column: 1 / -1; }
.cms-field__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
}
.cms-field__label strong { font-size: 0.9rem; font-weight: 600; }
.cms-help { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.cms-tip {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    padding: 0;
}
.cms-toggle-field {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}
.cms-toggle-field--lg { padding: 1.1rem 1.15rem; }
.cms-toggle-field__text { display: flex; flex-direction: column; gap: 0.2rem; }
.cms-toggle-field__text strong { color: var(--text); }
.cms-toggle-field__text small { color: var(--muted); font-size: 0.82rem; }
.cms-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.85rem;
    flex-direction: row;
}
.cms-upload {
    display: grid;
    grid-template-columns: minmax(160px, 240px) 1fr;
    gap: 0.9rem;
    align-items: center;
}
.cms-upload__preview {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    border: 1px dashed var(--line);
    background: #10161d;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
    padding: 0.5rem;
}
.cms-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.cms-upload__preview .material-symbols-outlined { font-size: 1.8rem; opacity: 0.7; }
.cms-upload__actions { display: flex; flex-direction: column; gap: 0.65rem; align-items: flex-start; }
.cms-empty-panel {
    text-align: center;
    padding: 2.2rem 1rem;
    color: var(--muted);
}
.cms-empty-panel .material-symbols-outlined {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.cms-empty-panel h3 { margin: 0 0 0.35rem; color: var(--text); }
.cms-empty-panel p { margin: 0 0 1rem; }

.cms-item-list { display: flex; flex-direction: column; gap: 0.65rem; }
.cms-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem;
}
.cms-item.is-disabled { opacity: 0.7; }
.cms-item__media {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #10161d;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--accent);
}
.cms-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cms-item-form { padding: 0 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 1rem; }

.cms-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 15;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.85rem 0 0.15rem;
    margin-top: 0.5rem;
    background: linear-gradient(to top, rgba(12,17,22,0.98) 70%, rgba(12,17,22,0));
}

@media (max-width: 1100px) {
    .cms-actions--row {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .cms-actions__divider { display: none; }
}

@media (max-width: 900px) {
    .cms-row {
        grid-template-columns: auto auto auto 1fr;
        grid-template-areas:
            "drag order icon body"
            "actions actions actions actions";
    }
    .cms-drag-handle { grid-area: drag; }
    .cms-row__order { grid-area: order; }
    .cms-row__icon { grid-area: icon; }
    .cms-row__body { grid-area: body; }
    .cms-actions--row {
        grid-area: actions;
        width: 100%;
        justify-content: space-between;
    }
    .cms-fields { grid-template-columns: 1fr; }
    .cms-upload { grid-template-columns: 1fr; }
    .cms-item { grid-template-columns: 64px 1fr; }
    .cms-item__actions { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .cms-settings__hero,
    .cms-editor__top,
    .cms-panel-card { padding: 1rem; }
    .cms-card__actions,
    .cms-row__controls,
    .cms-actions--row,
    .cms-actions--card { width: 100%; }
    .cms-actions--row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .cms-actions__group,
    .cms-actions__show {
        justify-content: space-between;
        width: 100%;
        padding: 0.35rem 0.45rem;
        border: 1px solid rgba(255,255,255,0.05);
        border-radius: 10px;
        background: rgba(255,255,255,0.02);
    }
    .cms-btn--primary,
    .cms-btn--edit { flex: 1 1 auto; justify-content: center; }
    .cms-sticky-actions { justify-content: stretch; }
    .cms-sticky-actions > * { flex: 1 1 auto; text-align: center; justify-content: center; }
}

/* —— Shared AJAX loader —— */
.admin-ajax-loader {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    background: rgba(6, 10, 14, 0.45);
    backdrop-filter: blur(2px);
}
.admin-ajax-loader[hidden] { display: none !important; }
.admin-ajax-loader__panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: #12181f;
    color: #f3f6f8;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    font-weight: 600;
}
.admin-ajax-loader__spinner {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-top-color: #d4af37;
    animation: admin-ajax-spin 0.7s linear infinite;
}
@keyframes admin-ajax-spin {
    to { transform: rotate(360deg); }
}
body.admin-ajax-busy { cursor: progress; }
form.is-ajax-locking { opacity: 0.72; pointer-events: none; }

.cms-field.is-invalid input,
.cms-field.is-invalid textarea,
.cms-field.is-invalid select {
    border-color: #e35d6a !important;
    box-shadow: 0 0 0 1px rgba(227, 93, 106, 0.35);
}
.cms-field-error {
    margin: 0.2rem 0 0;
    color: #ff8b96;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ==========================================================================
   MOBILE-FIRST APP EXPERIENCE & RESPONSIVE LAYOUT
   ========================================================================== */

/* Mobile App Header */
.admin-top__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.admin-top__menu-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.admin-top__menu-btn:active {
    background: rgba(255, 255, 255, 0.08);
}
.admin-top__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.admin-top__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.admin-user__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.15);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.admin-user__avatar .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Sidebar Drawer on Mobile & Tablet */
.admin-sidebar__head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.admin-sidebar__close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 10;
}
.admin-sidebar__close:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.admin-sidebar__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.admin-sidebar__backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(12, 17, 22, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    z-index: 1100;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.6);
    user-select: none;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item .material-symbols-outlined {
    font-size: 22px;
    transition: transform 0.15s ease;
}
.mobile-nav-label {
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1;
}
.mobile-nav-item:active .material-symbols-outlined {
    transform: scale(0.92);
}
.mobile-nav-item.is-active {
    color: var(--accent);
}
.mobile-nav-item.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* Mobile Bottom Sheet (More Sheet) */
.mobile-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    transition: visibility 0.25s;
}
.mobile-sheet.is-open {
    visibility: visible;
}
.mobile-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mobile-sheet.is-open .mobile-sheet__backdrop {
    opacity: 1;
}
.mobile-sheet__dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: #141b23;
    border-radius: 20px 20px 0 0;
    border-top: 1px solid rgba(212, 160, 23, 0.3);
    padding: 0.75rem 1.25rem 1.5rem;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
}
.mobile-sheet.is-open .mobile-sheet__dialog {
    transform: translateY(0);
}
.mobile-sheet__handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 0 auto 0.75rem;
}
.mobile-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}
.mobile-sheet__head h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.mobile-sheet__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.mobile-sheet__card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.mobile-sheet__card:active {
    background: rgba(212, 160, 23, 0.1);
    border-color: var(--accent);
}
.mobile-sheet__card--danger {
    border-color: rgba(220, 53, 69, 0.3);
}
.mobile-sheet__card--danger:active {
    background: rgba(220, 53, 69, 0.15);
}

/* Universal Admin Modal Standards */
.admin-modal[hidden] {
    display: none !important;
}
.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 9, 0.85);
    backdrop-filter: blur(12px);
    z-index: 0;
}
.admin-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #14171a;
    border: 1px solid rgba(242, 202, 80, 0.35);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.2, 1, 0.3, 1);
    margin: auto;
}
.admin-modal__dialog--wide {
    max-width: 680px;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.admin-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: #101316;
    flex-shrink: 0;
}
.admin-modal__head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.admin-modal__close:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.45);
}
.admin-modal form,
.admin-modal .p-3,
.admin-modal__body {
    padding: 1.25rem 1.35rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-sizing: border-box;
    width: 100%;
}
.admin-modal__actions,
.rule-form__actions,
.form-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    margin-top: auto !important;
    position: static !important;
    background: transparent !important;
    padding: 1rem 0 0.25rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
.admin-modal__actions .btn,
.admin-modal__actions button,
.rule-form__actions button,
.form-actions button {
    width: 100% !important;
    min-height: 46px !important;
    padding: 0.65rem 0.5rem !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border-radius: 0.6rem !important;
    text-transform: uppercase !important;
    white-space: normal !important;
    line-height: 1.2 !important;
}

/* Global Responsive Adjustments for <= 992px (Mobile / Tablet) */
@media (max-width: 992px) {
    html,
    html:has(body.admin),
    body.admin {
        grid-template-columns: 1fr;
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
        z-index: 1200;
    }
    .admin-sidebar.is-open {
        transform: translateX(0);
    }
    .admin-main {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 90px !important; /* Space for bottom nav */
    }
    .admin-top {
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        background: rgba(15, 20, 25, 0.95);
        backdrop-filter: blur(8px);
        z-index: 100;
        border-bottom: 1px solid var(--line);
    }
    .admin-content {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0.85rem 0.75rem 2rem !important;
    }
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }
    .form-grid--2 {
        grid-template-columns: 1fr !important;
    }
    .admin-input,
    input[type="text"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS auto zoom */
        min-height: 44px; /* Touch target */
    }
    .btn, button, .icon-btn, a.btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .table-wrap {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none !important;
        text-align: left !important;
        margin-bottom: 0.75rem;
    }

    /* Mobile Bottom-Sheet Dialogs for All Modals */
    .admin-modal {
        padding: 0 !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
    }
    .admin-modal__dialog {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 90vh !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(0) !important;
        border-bottom: none !important;
        animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .admin-modal__head {
        padding: 0.9rem 1.15rem !important;
        border-bottom: 1px solid var(--line) !important;
        background: #101316 !important;
        flex-shrink: 0 !important;
    }
    .admin-modal form,
    .admin-modal .p-3,
    .admin-modal__body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding: 1rem 1.15rem 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
        max-height: calc(90vh - 60px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    .admin-modal__actions,
    .rule-form__actions,
    .form-actions {
        position: static !important;
        margin-top: auto !important;
        padding: 0.85rem 0 0.25rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        background: transparent !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.65rem !important;
        box-shadow: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .admin-modal__actions .btn,
    .admin-modal__actions button,
    .rule-form__actions button,
    .form-actions button {
        width: 100% !important;
        min-height: 46px !important;
        font-size: 0.82rem !important;
        padding: 0.6rem 0.4rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   Cancellation Policy Design System (Application Standards)
   ========================================================================== */
.policy-zones-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 1080px) {
    .policy-zones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .policy-zones-grid {
        grid-template-columns: 1fr;
    }
}

.policy-zone-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.policy-zone-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 160, 23, 0.4);
}
.policy-zone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--line);
}
.policy-zone-card--ok::before { background: var(--ok); }
.policy-zone-card--accent::before { background: var(--accent); }
.policy-zone-card--warn::before { background: #f97316; }
.policy-zone-card--danger::before { background: var(--danger); }

.policy-zone-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.policy-zone-card__tag {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.policy-zone-card--ok .policy-zone-card__tag { color: var(--ok); }
.policy-zone-card--accent .policy-zone-card__tag { color: var(--accent); }
.policy-zone-card--warn .policy-zone-card__tag { color: #fb923c; }
.policy-zone-card--danger .policy-zone-card__tag { color: var(--danger); }

.policy-zone-card__time {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    margin: 0.15rem 0;
}
.policy-zone-card__detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: auto;
    padding-top: 0.35rem;
}
.badge--neutral {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.time-window-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
}
.time-window-pill .material-symbols-outlined {
    font-size: 0.95rem;
    color: var(--accent);
}
.time-window-pill.ok .material-symbols-outlined {
    color: var(--ok);
}

.order-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Simulator Grid */
.simulator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    align-items: stretch;
}
@media (max-width: 900px) {
    .simulator-layout {
        grid-template-columns: 1fr;
    }
}

.input-with-adornment {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
}
.input-with-adornment .adornment {
    background: #10161d;
    border: 1px solid var(--line);
    border-right: none;
    padding: 0.7rem 0.85rem;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-with-adornment input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex: 1;
}

.simulator-result-box {
    background: rgba(10, 14, 18, 0.65);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
}
.simulator-result-box__readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}
.simulator-result-box__col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.simulator-result-box__col span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}
.simulator-result-box__col strong {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}
.text-ok { color: var(--ok) !important; }
.text-accent { color: var(--accent) !important; }
.text-warn { color: #fb923c !important; }
.text-danger { color: var(--danger) !important; }


    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
}
.time-window-pill .material-symbols-outlined {
    font-size: 0.95rem;
    color: var(--accent);
}
.time-window-pill.ok .material-symbols-outlined {
    color: var(--ok);
}

.order-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Simulator Grid */
.simulator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    align-items: stretch;
}
@media (max-width: 900px) {
    .simulator-layout {
        grid-template-columns: 1fr;
    }
}

.input-with-adornment {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
}
.input-with-adornment .adornment {
    background: #10161d;
    border: 1px solid var(--line);
    border-right: none;
    padding: 0.7rem 0.85rem;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-with-adornment input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex: 1;
}

.simulator-result-box {
    background: rgba(10, 14, 18, 0.65);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
}
.simulator-result-box__readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}
.simulator-result-box__col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.simulator-result-box__col span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}
.simulator-result-box__col strong {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}
.text-ok { color: var(--ok) !important; }
.text-accent { color: var(--accent) !important; }
.text-warn { color: #fb923c !important; }
.text-danger { color: var(--danger) !important; }


