/* === Reset & Variables === */
* { margin: 0; padding: 0; box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:root {
    --bg: #09101d;
    --bg2: #0d1628;
    --card: rgba(15, 23, 42, 0.92);
    --card2: #111b32;
    --surface: rgba(15, 23, 42, 0.78);
    --surface-hover: rgba(30, 41, 59, 0.82);
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(212, 175, 55, 0.22);
    --gold: #d4af37;
    --gold-h: #e5c34a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --blue: #38bdf8;
    --green: #22c55e;
    --amber: #f59e0b;
    --rose: #fb7185;
    --danger: #ef4444;
    --danger-h: #dc2626;
    --success: #22c55e;
    --input: #162238;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

body {
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.08), transparent 26%),
        radial-gradient(circle at 84% 8%, rgba(56, 189, 248, 0.05), transparent 20%),
        linear-gradient(180deg, #09101d 0%, #08111f 100%);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(10, 18, 32, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.header-brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.header-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-h));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #08111f;
    font-size: 1.1rem;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.22);
    flex-shrink: 0;
}

.header-copy { min-width: 0; }

.header-kicker {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.9);
    font-family: "JetBrains Mono", monospace;
}

.header h1 {
    margin-top: 0.15rem;
    font-size: 1.32rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: "Syne", "Inter", sans-serif;
}

.header-subline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    font-size: 0.83rem;
    color: var(--muted);
}

.header-divider { opacity: 0.45; }

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.header-clock-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212, 175, 55, 0.12);
    color: #cbd5e1;
    font-size: 0.74rem;
    white-space: nowrap;
}

.header-clock-label {
    color: var(--gold);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.role-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.role-owner {
    background: rgba(212, 175, 55, 0.16);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.28);
}

.role-staff {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-logout {
    height: 40px;
    padding: 0 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-v2-link {
    height: 40px;
    padding: 0 1rem;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(212, 175, 55, 0.12);
    color: #fde68a;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.btn-v2-link:hover {
    border-color: rgba(212, 175, 55, 0.42);
    color: #fff2b3;
    background: rgba(212, 175, 55, 0.18);
    transform: translateY(-1px);
}

.btn-logout:hover {
    border-color: rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    background: rgba(127, 29, 29, 0.12);
}

/* === Dashboard Tabs === */
.dashboard-tabs {
    position: sticky;
    top: 72px;
    z-index: 45;
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem 0;
    margin: 0 auto;
    max-width: 1380px;
    overflow-x: auto;
    scrollbar-width: none;
}

.dashboard-tabs::-webkit-scrollbar {
    display: none;
}

.dashboard-tab-btn {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    white-space: nowrap;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.dashboard-tab-btn:hover {
    color: #e2e8f0;
    border-color: rgba(212, 175, 55, 0.28);
    transform: translateY(-1px);
}

.dashboard-tab-btn.is-active {
    background: linear-gradient(180deg, rgba(113, 63, 18, 0.24), rgba(15, 23, 42, 0.94));
    border-color: rgba(212, 175, 55, 0.32);
    color: #fde68a;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.12);
}

/* === Layout Shell === */
.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
}

.dashboard-shell {
    display: grid;
    gap: 1.25rem;
    animation: fadeIn 0.28s ease;
}

.dash-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    scroll-margin-top: 164px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold);
    font-family: "Syne", "Inter", sans-serif;
}

.section-copy {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.section-meta {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
    font-size: 0.78rem;
}

body.is-owner .dash-block-owner-kpi { order: 1; }
body.is-owner .dash-block-owner-actions { order: 2; }
body.is-owner .dash-block-owner-exceptions { order: 3; }
body.is-owner .dash-block-owner-inventory-control { order: 4; }
body.is-owner .dash-block-operations { order: 5; }
body.is-owner .dash-block-guests { order: 6; }
body.is-owner .dash-block-availability { order: 7; }
body.is-owner .dash-block-timeline { order: 8; }
body.is-owner .dash-block-matrix { order: 9; }
body.is-owner .dash-block-owner-tools { order: 10; }

body.is-staff .dash-block-operations { order: 1; }
body.is-staff .dash-block-guests { order: 2; }
body.is-staff .dash-block-availability { order: 3; }
body.is-staff .dash-block-timeline { order: 4; }
body.is-staff .dash-block-matrix { order: 5; }
body.is-staff .dash-block-owner-tools { order: 6; }

@media (min-width: 1120px) {
    .dashboard-shell {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        align-items: start;
    }

    body.is-owner .dash-block-owner-kpi { grid-column: 1 / -1; }
    body.is-owner .dash-block-owner-actions { grid-column: 1 / -1; }
    body.is-owner .dash-block-owner-exceptions { grid-column: 1 / span 4; }
    body.is-owner .dash-block-owner-inventory-control { grid-column: 5 / -1; }
    body.is-owner .dash-block-operations { grid-column: 1 / -1; }
    body.is-owner .dash-block-guests { grid-column: 1 / span 8; }
    body.is-owner .dash-block-availability { grid-column: 9 / -1; }
    body.is-owner .dash-block-timeline { grid-column: 1 / -1; }
    body.is-owner .dash-block-matrix { grid-column: 1 / -1; }
    body.is-owner .dash-block-owner-tools { grid-column: 1 / -1; }

    body.is-staff .dash-block-operations { grid-column: 1 / -1; }
    body.is-staff .dash-block-guests { grid-column: 1 / -1; }
    body.is-staff .dash-block-availability { grid-column: 1 / span 4; }
    body.is-staff .dash-block-timeline { grid-column: 5 / -1; }
    body.is-staff .dash-block-matrix { grid-column: 1 / -1; }
    body.is-staff .dash-block-owner-tools { grid-column: 1 / -1; }
}

/* === Owner Command Center === */
.owner-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.owner-kpi-card {
    display: grid;
    gap: 0.42rem;
    min-height: 134px;
    padding: 1rem 1rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(9, 15, 27, 0.78), rgba(15, 23, 42, 0.96));
    position: relative;
    overflow: hidden;
}

.owner-kpi-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    opacity: 0.9;
}

.owner-kpi-card-accent-gold::before { background: linear-gradient(90deg, var(--gold), transparent); }
.owner-kpi-card-accent-green::before { background: linear-gradient(90deg, var(--green), transparent); }
.owner-kpi-card-accent-blue::before { background: linear-gradient(90deg, var(--blue), transparent); }
.owner-kpi-card-accent-rose::before { background: linear-gradient(90deg, var(--rose), transparent); }
.owner-kpi-card-accent-amber::before { background: linear-gradient(90deg, var(--amber), transparent); }

.owner-kpi-icon {
    font-size: 0.92rem;
    opacity: 0.82;
}

.owner-kpi-card-gold {
    border-color: rgba(212, 175, 55, 0.24);
    background: linear-gradient(180deg, rgba(113, 63, 18, 0.2), rgba(15, 23, 42, 0.98));
}

.owner-kpi-label {
    font-size: 0.73rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.owner-kpi-value {
    font-size: 2rem;
    line-height: 1.05;
    font-weight: 800;
    color: #f8fafc;
    font-family: "Syne", "Inter", sans-serif;
}

.owner-kpi-card-gold .owner-kpi-value {
    color: #fde68a;
}

.owner-kpi-meta {
    margin-top: auto;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

.owner-kpi-delta {
    font-size: 0.68rem;
    color: rgba(226, 232, 240, 0.72);
    font-family: "JetBrains Mono", monospace;
    letter-spacing: 0.02em;
}

.owner-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.owner-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1rem;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(15, 23, 42, 0.84);
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.owner-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.12);
}

.owner-action-btn-v2 {
    border-color: rgba(212, 175, 55, 0.32);
    background: rgba(212, 175, 55, 0.12);
    color: #fde68a;
}

.owner-action-btn-v2:hover {
    border-color: rgba(212, 175, 55, 0.46);
    background: rgba(212, 175, 55, 0.18);
    color: #fff2b3;
}

.owner-action-btn-rose {
    border-color: rgba(251, 113, 133, 0.22);
    color: #fecdd3;
}

.owner-action-btn-rose:hover {
    border-color: rgba(251, 113, 133, 0.36);
    background: rgba(127, 29, 29, 0.18);
}

.owner-security-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.owner-security-card,
.owner-side-card,
.owner-mini-stat,
.owner-info-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(9, 15, 27, 0.72);
}

.owner-security-label,
.owner-info-label,
.owner-mini-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.owner-security-card strong,
.owner-mini-stat strong,
.owner-info-card strong {
    display: block;
    margin-top: 0.35rem;
    color: #f8fafc;
    font-size: 1.1rem;
}

.owner-security-card p,
.owner-info-card p {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

.owner-exception-grid,
.owner-secondary-grid,
.owner-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}

.owner-mini-stat-rose {
    border-color: rgba(251, 113, 133, 0.22);
    background: rgba(127, 29, 29, 0.16);
}

.owner-mini-stat-amber {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(120, 53, 15, 0.16);
}

.owner-mini-stat-blue {
    border-color: rgba(56, 189, 248, 0.2);
    background: rgba(8, 47, 73, 0.16);
}

.owner-exception-note {
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.58);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.owner-summary-banner-compact {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.owner-summary-banner.owner-summary-banner-compact strong {
    display: inline;
    color: #fde68a;
    font-size: inherit;
}

.owner-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.95rem;
}

.owner-inventory-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    background: linear-gradient(180deg, rgba(9, 15, 27, 0.88), rgba(12, 20, 36, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.owner-inventory-card.is-loading {
    min-height: 220px;
    align-items: center;
    justify-items: center;
}

.owner-inventory-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.owner-inventory-title {
    font-family: "Syne", "Inter", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #f8fafc;
}

.owner-inventory-sub {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.5;
}

.owner-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.owner-risk-badge.risk-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.2);
}

.owner-risk-badge.risk-caution {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.18);
}

.owner-risk-badge.risk-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.2);
}

.owner-risk-badge.risk-danger {
    background: rgba(251, 113, 133, 0.14);
    color: #fecdd3;
    border-color: rgba(251, 113, 133, 0.2);
}

.owner-inventory-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.owner-inventory-metrics div {
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.56);
}

.owner-inventory-metrics span {
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: "JetBrains Mono", monospace;
}

.owner-inventory-metrics strong {
    color: #f8fafc;
    font-size: 1.02rem;
    font-weight: 700;
}

.owner-inventory-guestmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.owner-inventory-guestmeta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.34rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    font-size: 0.72rem;
}

.owner-inventory-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.owner-inventory-day {
    display: grid;
    gap: 0.18rem;
    padding: 0.65rem 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.44);
    text-align: center;
}

.owner-inventory-day-label,
.owner-inventory-day span {
    font-size: 0.68rem;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
}

.owner-inventory-day strong {
    font-size: 0.96rem;
    font-weight: 700;
    color: #f8fafc;
}

.owner-inventory-day.risk-ok {
    border-color: rgba(34, 197, 94, 0.15);
    background: rgba(20, 83, 45, 0.14);
}

.owner-inventory-day.risk-caution {
    border-color: rgba(59, 130, 246, 0.15);
    background: rgba(30, 64, 175, 0.12);
}

.owner-inventory-day.risk-warning {
    border-color: rgba(245, 158, 11, 0.16);
    background: rgba(120, 53, 15, 0.14);
}

.owner-inventory-day.risk-danger {
    border-color: rgba(251, 113, 133, 0.16);
    background: rgba(127, 29, 29, 0.14);
}

.owner-side-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.owner-side-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.owner-side-head p {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}

.owner-side-meta {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.owner-summary-banner,
.owner-warning-box {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(113, 63, 18, 0.12);
}

.owner-warning-box-danger {
    border-color: rgba(251, 113, 133, 0.28);
    background: rgba(127, 29, 29, 0.14);
}

.owner-summary-banner strong,
.owner-warning-box strong {
    display: block;
    color: #fde68a;
    font-size: 0.95rem;
}

.owner-summary-banner p,
.owner-warning-box p,
.owner-pane-copy {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
}

.owner-list-block {
    margin-top: 1rem;
}

.owner-list-title {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.owner-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.owner-account-chip {
    display: grid;
    gap: 0.15rem;
    min-width: 170px;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(9, 15, 27, 0.72);
}

.owner-account-chip strong {
    color: #f8fafc;
    font-size: 0.88rem;
}

.owner-account-chip span,
.owner-empty-note {
    color: var(--muted);
    font-size: 0.8rem;
}

.owner-modal {
    max-width: 760px;
}

.owner-modal-wide {
    max-width: 980px;
}

.owner-modal-body {
    display: grid;
    gap: 1rem;
}

.owner-tab-nav {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

.owner-tab-btn {
    height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.84);
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.owner-tab-btn.is-active {
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.26);
    color: #fde68a;
}

.twilio-pane { display: none; }
.twilio-pane.is-active { display: grid; gap: 1rem; }

.twilio-testing-grid {
    align-items: start;
}

.twilio-console-card,
.twilio-audit-card {
    min-height: 100%;
}

.twilio-send-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.9rem;
}

.twilio-template-row {
    margin-bottom: 0;
}

.twilio-send-status {
    margin-top: -0.1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.52);
}

.twilio-send-status.is-success {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(20, 83, 45, 0.18);
    color: #bbf7d0;
}

.twilio-send-status.is-error {
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(127, 29, 29, 0.18);
    color: #fecaca;
}

.twilio-send-status.is-loading {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(8, 47, 73, 0.18);
    color: #bae6fd;
}

.twilio-send-actions {
    padding: 0;
    border: 0;
    justify-content: flex-end;
}

.owner-audit-result {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.52rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.owner-audit-result.ok {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.owner-audit-result.fail {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.owner-link-card .btn {
    width: fit-content;
    margin-top: 0.8rem;
}

.owner-audit-list {
    display: grid;
    gap: 0.75rem;
}

.owner-audit-item {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(9, 15, 27, 0.72);
}

.owner-audit-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    color: #f8fafc;
    font-size: 0.88rem;
}

.owner-audit-top span,
.owner-audit-meta {
    color: var(--muted);
    font-size: 0.78rem;
}

.owner-audit-meta {
    margin-top: 0.25rem;
}

.owner-audit-diff {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
    flex-wrap: wrap;
    color: #e2e8f0;
    font-size: 0.82rem;
}

.owner-audit-arrow {
    color: var(--gold);
    font-weight: 800;
}

/* === Operational Cards === */
.ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.ops-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-height: 112px;
    padding: 1rem 1rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(12, 18, 30, 0.98));
    color: var(--text);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
}

.ops-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.28);
    box-shadow: 0 20px 35px rgba(2, 6, 23, 0.3);
}

.ops-card.is-active {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.12), 0 20px 35px rgba(2, 6, 23, 0.32);
}

.ops-card.is-muted {
    opacity: 0.68;
}

.ops-card.is-loading {
    pointer-events: none;
}

.ops-label {
    font-size: 0.76rem;
    color: #cbd5e1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.ops-value {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1;
}

.ops-hint {
    margin-top: auto;
    font-size: 0.76rem;
    color: var(--muted);
}

.tone-blue .ops-value { color: #7dd3fc; }
.tone-amber .ops-value { color: #fbbf24; }
.tone-gold .ops-value { color: #fde68a; }
.tone-green .ops-value { color: #86efac; }
.tone-rose .ops-value { color: #fda4af; }

.tone-blue.is-active { background: linear-gradient(180deg, rgba(8, 47, 73, 0.66), rgba(15, 23, 42, 0.98)); }
.tone-amber.is-active { background: linear-gradient(180deg, rgba(120, 53, 15, 0.58), rgba(15, 23, 42, 0.98)); }
.tone-gold.is-active { background: linear-gradient(180deg, rgba(113, 63, 18, 0.58), rgba(15, 23, 42, 0.98)); }
.tone-green.is-active { background: linear-gradient(180deg, rgba(20, 83, 45, 0.54), rgba(15, 23, 42, 0.98)); }
.tone-rose.is-active { background: linear-gradient(180deg, rgba(127, 29, 29, 0.54), rgba(15, 23, 42, 0.98)); }

/* === Attention Banner === */
.attention-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.18), rgba(15, 23, 42, 0.92));
}

.attention-banner.hidden { display: none; }

.attention-banner strong {
    display: block;
    font-size: 0.95rem;
    color: #fde68a;
}

.attention-banner p {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* === Toolbar & Filters === */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.toolbar .left {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-meta {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
}

.date-input {
    height: 38px;
    padding: 0 0.85rem;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    outline: none;
}

.date-input:focus,
.timeline-toolbar select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(212, 175, 55, 0.38);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.pill,
.pill-filter {
    height: 34px;
    padding: 0 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pill:hover,
.pill-filter:hover {
    border-color: rgba(212, 175, 55, 0.24);
    color: #e2e8f0;
}

.pill.active,
.pill-filter.is-active {
    border-color: rgba(212, 175, 55, 0.28);
    background: rgba(212, 175, 55, 0.16);
    color: #fde68a;
}

.filter-pills-channels .pill-filter.is-active {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
}

/* === Buttons === */
.btn {
    height: 38px;
    padding: 0 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-gold {
    background: var(--gold);
    color: #08111f;
}

.btn-gold:hover { background: var(--gold-h); }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: #cbd5e1;
}

.btn-outline:hover {
    border-color: rgba(212, 175, 55, 0.35);
    color: #fde68a;
}

.btn-danger {
    background: rgba(185, 28, 28, 0.92);
    color: #fff;
}

.btn-danger:hover { background: var(--danger-h); }

.btn-sm {
    height: 30px;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    border-radius: 12px;
}

/* === Availability === */
.avail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
}

.avail-card {
    padding: 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(9, 15, 27, 0.72);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.avail-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.24);
}

.avail-card .type {
    font-size: 0.84rem;
    color: var(--muted);
}

.avail-card .numbers {
    margin-top: 0.35rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.avail-card .numbers small {
    font-size: 0.98rem;
    color: var(--muted);
    font-weight: 500;
}

.avail-bar {
    height: 6px;
    margin-top: 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.avail-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #f6d96b);
}

.avail-card.full .numbers { color: #fca5a5; }
.avail-card.full .avail-bar-fill { background: linear-gradient(90deg, #ef4444, #f97316); }

/* === Table === */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(9, 15, 27, 0.76);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead { background: rgba(17, 27, 50, 0.92); }

th {
    padding: 0.85rem 1rem;
    color: var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 0.95rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: top;
    white-space: nowrap;
}

tbody tr:hover td { background: rgba(212, 175, 55, 0.08); }

.guest-main { display: grid; gap: 0.3rem; min-width: 220px; }
.guest-main strong { font-size: 0.98rem; color: #f8fafc; }

.guest-sub {
    font-size: 0.8rem;
    color: var(--muted);
}

.guest-audit-sub {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.72);
    font-family: 'JetBrains Mono', monospace;
}

.guest-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.badge-channel {
    background: rgba(212, 175, 55, 0.14);
    color: #fde68a;
    border: 1px solid rgba(212, 175, 55, 0.24);
}

.badge-status {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.badge-op {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge-op-active { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.badge-op-unassigned { background: rgba(245, 158, 11, 0.16); color: #fde68a; }
.badge-op-assigned { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.badge-op-pending { background: rgba(212, 175, 55, 0.18); color: #fde68a; }
.badge-op-checkin { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.badge-op-review { background: rgba(251, 113, 133, 0.18); color: #fecdd3; }
.badge-op-danger { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.badge-op-ota { background: rgba(59, 130, 246, 0.15); color: #bfdbfe; }
.badge-op-direct { background: rgba(168, 85, 247, 0.16); color: #e9d5ff; }
.badge-op-accepted { background: rgba(34, 197, 94, 0.1); color: #bbf7d0; }
.badge-op-phone { background: rgba(245, 158, 11, 0.14); color: #fde68a; }
.badge-op-location { background: rgba(56, 189, 248, 0.14); color: #bae6fd; }
.badge-op-mismatch { background: rgba(251, 113, 133, 0.14); color: #fecdd3; }

.room-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.22rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.room-state-unassigned {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.room-state-assigned {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.room-sub {
    margin-top: 0.32rem;
    color: var(--muted);
    font-size: 0.73rem;
}

/* ── Urgency group headers & left borders ─────────────── */
.urgency-group-header td {
    background: rgba(255,255,255,0.04);
    padding: 0.55rem 1rem;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.urgency-group-header.urgency-red td   { border-left: 4px solid #ef4444; color: #fca5a5; }
.urgency-group-header.urgency-yellow td { border-left: 4px solid #eab308; color: #fde68a; }
.urgency-group-header.urgency-green td  { border-left: 4px solid #22c55e; color: #86efac; }

tr.urgency-red td:first-child    { border-left: 4px solid #ef4444; }
tr.urgency-yellow td:first-child { border-left: 4px solid #eab308; }
tr.urgency-green td:first-child  { border-left: 4px solid #22c55e; }

.urgency-label { margin-right: 0.6rem; }
.urgency-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    color: var(--muted);
}

/* ── Room type badges ──────────────────────────────────── */
.badge-roomtype {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.02em;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}
.badge-roomtype-studio {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.28);
}
.badge-roomtype-studioplus {
    background: rgba(168, 85, 247, 0.16);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.28);
}
.badge-roomtype-2br {
    background: rgba(232, 185, 49, 0.16);
    color: #fde68a;
    border: 1px solid rgba(232, 185, 49, 0.28);
}

.badge-sameday {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(251, 146, 60, 0.16);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.3);
    margin-top: 0.2rem;
}

/* ── Guest card inline elements ────────────────────────── */
.guest-room-line {
    font-family: var(--mono, 'JetBrains Mono', monospace);
    font-size: 0.82rem;
    color: #94a3b8;
}
.ref-inline {
    color: var(--muted);
    font-size: 0.72rem;
    margin-left: 0.35rem;
    opacity: 0.7;
}
.phone-missing {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.78rem;
    border-bottom: 1.5px dashed rgba(239, 68, 68, 0.5);
    padding-bottom: 1px;
}
.phone-missing::before {
    content: '\26A0\00a0';
    font-size: 0.72rem;
}

.status-stack {
    display: grid;
    gap: 0.35rem;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.18rem 0.52rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-inline-checkin {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.status-inline-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* ── Bulk WhatsApp Blast ─────────────────────────────────── */
.blast-info {
    background: rgba(232, 185, 49, 0.08);
    border: 1px solid rgba(232, 185, 49, 0.2);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    color: #fde68a;
    font-size: 0.88rem;
}
.blast-info strong { color: #e8b931; font-size: 1.1rem; }
.blast-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #f8fafc;
    font-family: var(--sans, 'DM Sans', sans-serif);
    font-size: 0.88rem;
    padding: 0.7rem;
    resize: vertical;
}
.blast-textarea:focus {
    outline: none;
    border-color: rgba(232, 185, 49, 0.5);
    box-shadow: 0 0 0 2px rgba(232, 185, 49, 0.15);
}
.blast-char-count {
    text-align: right;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.2rem;
}
.blast-preview {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}
.blast-recipient-list {
    max-height: 180px;
    overflow-y: auto;
    margin: 0.8rem 0;
}
.blast-recipient-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
    color: #94a3b8;
}
.blast-recipient-item .name { color: #f8fafc; font-weight: 600; flex: 1; }
.blast-recipient-item .phone { font-family: var(--mono); font-size: 0.75rem; }
.blast-recipient-item .no-phone { color: #ef4444; font-size: 0.72rem; }
.blast-progress {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0;
}
.blast-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e8b931, #fde68a);
    border-radius: 999px;
    transition: width 0.3s ease;
}
.blast-status-text {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: center;
}
.blast-results {
    margin-top: 0.8rem;
}
.blast-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.blast-result-item .icon { font-size: 0.9rem; }
.blast-result-item.success { color: #86efac; }
.blast-result-item.failed { color: #fca5a5; }
.blast-select-cb { accent-color: #e8b931; width: 16px; height: 16px; cursor: pointer; }
.th-blast-cb, .td-blast-cb { width: 32px; text-align: center; padding-left: 0.5rem !important; padding-right: 0.2rem !important; }

.action-lock-note {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--muted);
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
}

.empty-row td,
.loading {
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem;
}

tbody tr.row-unassigned td {
    background: rgba(120, 53, 15, 0.1);
}

tbody tr.row-unassigned td:first-child {
    box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.85);
}

tbody tr.row-review td {
    background: rgba(127, 29, 29, 0.08);
}

tbody tr.row-review td:first-child {
    box-shadow: inset 3px 0 0 rgba(251, 113, 133, 0.85);
}

tbody tr.row-checked-in td {
    background: rgba(20, 83, 45, 0.08);
}

tbody tr.row-cancelled td {
    opacity: 0.72;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.72);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(10, 18, 32, 0.96);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.56);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header,
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-footer {
    border-bottom: none;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

.modal-header h2 {
    font-size: 1.05rem;
    color: #f8fafc;
}

.modal-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.45rem;
    cursor: pointer;
}

.modal-body { padding: 1.25rem; }

.modal-inline-note {
    margin-top: 0.25rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.16);
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.78rem;
    line-height: 1.55;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.32rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
    outline: none;
}

.form-group textarea {
    min-height: 92px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* === Toast / Loading === */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200;
    min-width: 220px;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: rgba(22, 163, 74, 0.95);
    color: white;
}

.toast-error {
    background: rgba(220, 38, 38, 0.95);
    color: white;
}

.spin {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.18);
    border-top-color: var(--gold);
    animation: spin 0.7s linear infinite;
}

/* === Upload / Owner Tools === */
.owner-tools-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(9, 15, 27, 0.7);
}

.owner-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.owner-tools-note {
    font-size: 0.82rem;
    color: var(--muted);
}

.drop-zone {
    border: 2px dashed rgba(212, 175, 55, 0.24);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(9, 15, 27, 0.68);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.05);
}

.drop-zone-inner { pointer-events: none; }

.import-stat {
    padding: 0.85rem;
    border-radius: 16px;
    text-align: center;
}

.import-stat .num {
    font-size: 1.45rem;
    font-weight: 800;
}

.import-stat .lbl {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === Matrix === */
.dash-block-matrix.is-collapsed .dash-collapsible {
    display: none;
}

.matrix-wrap,
.timeline-wrap {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(9, 15, 27, 0.74);
    overflow: hidden;
}

.matrix-scroll,
.timeline-scroll {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.matrix-table thead th {
    padding: 0.56rem 0.4rem;
    color: var(--gold);
    font-size: 0.64rem;
    text-align: center;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.matrix-day,
.matrix-num {
    display: block;
}

.matrix-day {
    font-size: 0.58rem;
    opacity: 0.8;
}

.matrix-num {
    margin-top: 0.16rem;
    font-size: 0.72rem;
    color: #f8fafc;
}

.matrix-table td {
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.matrix-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 92px;
    text-align: left;
    background: rgba(17, 27, 50, 0.96);
}

.matrix-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: rgba(10, 18, 32, 0.96);
}

.matrix-group {
    text-align: left !important;
    padding-left: 0.8rem !important;
    font-weight: 700;
    color: #f8fafc;
}

.matrix-weekend {
    background: rgba(212, 175, 55, 0.045);
}

.occ-pill {
    display: inline-grid;
    gap: 0.08rem;
    align-items: center;
    justify-items: center;
    min-width: 60px;
    padding: 0.28rem 0.55rem;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.occ-primary {
    font-size: 0.72rem;
    line-height: 1;
    font-family: "JetBrains Mono", monospace;
}

.occ-secondary {
    font-size: 0.56rem;
    line-height: 1;
    letter-spacing: 0.03em;
    opacity: 0.78;
    text-transform: uppercase;
    font-family: "JetBrains Mono", monospace;
}

.occ-empty { background: rgba(148, 163, 184, 0.08); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.16); }
.occ-low { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.22); }
.occ-mid { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.22); }
.occ-high { background: rgba(251, 191, 36, 0.16); color: #fde68a; border-color: rgba(251, 191, 36, 0.24); }
.occ-full { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(239, 68, 68, 0.22); }

/* === Timeline === */
.timeline-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.timeline-toolbar select {
    height: 38px;
    padding: 0 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
    outline: none;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.badge-legend-booking {
    background: rgba(212, 175, 55, 0.16);
    color: #fde68a;
    border: 1px solid rgba(212, 175, 55, 0.24);
}

.badge-legend-checkin {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.24);
}

.timeline-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.timeline-table thead th {
    padding: 0.56rem 0.38rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--gold);
    font-size: 0.65rem;
    text-transform: uppercase;
    text-align: center;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: 0.04em;
}

.timeline-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 96px;
    padding-left: 0.8rem;
    text-align: left;
    background: rgba(17, 27, 50, 0.96);
}

.timeline-type-header td {
    padding: 0.65rem 0.8rem;
    background: rgba(17, 27, 50, 0.94);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-group-name,
.timeline-group-meta {
    display: block;
}

.timeline-group-name {
    font-size: 0.74rem;
    color: var(--gold);
}

.timeline-group-meta {
    margin-top: 0.16rem;
    font-size: 0.6rem;
    color: rgba(226, 232, 240, 0.66);
    font-family: "JetBrains Mono", monospace;
    text-transform: none;
    letter-spacing: 0.04em;
}

.timeline-room-row td {
    padding: 0;
    height: 38px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.timeline-room-row td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    padding: 0 0.8rem;
    background: rgba(10, 18, 32, 0.96);
    color: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
}

.timeline-room-label {
    display: grid;
    gap: 0.08rem;
    align-content: center;
    min-height: 38px;
}

.timeline-room-main {
    display: block;
    color: #f8fafc;
    font-weight: 700;
}

.timeline-room-meta {
    display: block;
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: "JetBrains Mono", monospace;
}

.timeline-room-flag {
    display: inline-flex;
    width: fit-content;
    padding: 0.1rem 0.38rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #fde68a;
    font-size: 0.52rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: "JetBrains Mono", monospace;
}

.timeline-placeholder-row td:first-child {
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.28), rgba(10, 18, 32, 0.96));
}

.timeline-cell {
    position: relative;
    min-width: 52px;
}

.timeline-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    display: flex;
    align-items: center;
    padding: 0 7px;
    border-radius: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.64rem;
    font-weight: 700;
}

.timeline-bar-booking {
    background: rgba(212, 175, 55, 0.28);
    color: #fde68a;
    border: 1px solid rgba(212, 175, 55, 0.36);
}

.timeline-bar-checkin {
    background: rgba(56, 189, 248, 0.28);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.36);
}

.timeline-today {
    background: rgba(212, 175, 55, 0.05);
}

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 2.2rem;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.16);
    background: rgba(10, 18, 32, 0.88);
    backdrop-filter: blur(24px);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
    position: relative;
    z-index: 1;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.login-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-h));
    color: #08111f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.22);
}

.login-brand-title {
    font-family: "Syne", "Inter", sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
}

.login-brand-sub {
    margin-top: 0.08rem;
    font-size: 0.66rem;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-card-head {
    margin-bottom: 1.25rem;
}

.login-card h1 {
    color: #f8fafc;
    text-align: left;
    font-size: 1.42rem;
    font-family: "Syne", "Inter", sans-serif;
}

.login-card p.sub {
    margin: 0.35rem 0 0;
    color: var(--muted);
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.6;
}

.login-role-switch {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.login-role-btn {
    flex: 1;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: transparent;
    color: var(--muted);
    font-size: 0.76rem;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.login-role-btn.is-active {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.26);
    color: #fde68a;
}

.login-page .form-group label {
    color: #94a3b8;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: "JetBrains Mono", monospace;
}

.login-page .form-group input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 175, 55, 0.12);
    padding: 0.78rem 0.9rem;
}

.login-page .form-group input:focus {
    border-color: rgba(212, 175, 55, 0.38);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-login {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-h));
    color: #08111f;
    font-weight: 700;
    font-family: "Syne", "Inter", sans-serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.24);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--gold-h), #f1cf62);
}

.error {
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(127, 29, 29, 0.18);
    color: #fecaca;
    text-align: center;
}

.login-inline-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.6;
}

/* === Motion === */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 1024px) {
    html {
        font-size: 17px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        line-height: 1.45;
    }

    .container {
        padding: 1.05rem 1rem 1.6rem;
    }

    .dash-block {
        padding: 1rem;
        border-radius: 18px;
    }

    .section-title {
        font-size: 1.06rem;
    }

    .section-copy {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .dashboard-tab-btn,
    .owner-action-btn,
    .owner-tab-btn {
        font-size: 0.88rem;
    }

    .owner-kpi-label {
        font-size: 0.8rem;
    }

    .owner-kpi-value {
        font-size: 1.38rem;
    }

    .owner-kpi-meta,
    .owner-kpi-delta {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    th {
        font-size: 0.78rem;
    }

    td {
        font-size: 0.9rem;
    }

    .matrix-table {
        min-width: 680px;
        font-size: 0.9rem;
    }

    .matrix-table thead th {
        font-size: 0.72rem;
    }

    .matrix-day {
        font-size: 0.64rem;
    }

    .matrix-num {
        font-size: 0.82rem;
    }

    .timeline-table {
        min-width: 760px;
        font-size: 0.82rem;
    }

    .timeline-table thead th {
        font-size: 0.7rem;
    }
}

@media (max-width: 900px) {
    .header {
        padding: 0.9rem 1rem;
        align-items: flex-start;
    }

    .header h1 { font-size: 1.12rem; }
    .header-right { align-self: center; }
    .container { padding: 1rem; }

    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .owner-tools-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .owner-audit-top,
    .owner-side-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .owner-inventory-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .dashboard-tabs {
        top: 88px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .toolbar,
    .toolbar .left,
    .timeline-toolbar,
    .attention-banner,
    .header,
    .header-brand-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .header-clock-chip {
        width: 100%;
        justify-content: center;
    }

    .toolbar-meta,
    .section-meta {
        width: 100%;
        white-space: normal;
    }

    .btn,
    .date-input,
    .timeline-toolbar select {
        width: 100%;
    }

    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
    }

    .dashboard-tab-btn {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        max-width: calc(100% - 1rem);
    }

    .ops-grid {
        grid-template-columns: 1fr 1fr;
    }

    .owner-tab-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
    }

    .owner-tab-btn {
        white-space: nowrap;
    }

    .owner-inventory-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .twilio-send-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    th,
    td {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .table-wrap th:first-child,
    .table-wrap td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: rgba(10, 18, 32, 0.96);
    }

    .table-wrap thead th:first-child {
        z-index: 2;
        background: rgba(17, 27, 50, 0.96);
    }

    /* Guest card mobile adjustments */
    .guest-main { min-width: 160px; gap: 0.2rem; }
    .guest-main strong { font-size: 0.88rem; }
    .guest-sub { font-size: 0.72rem; line-height: 1.3; }
    .guest-room-line { font-size: 0.74rem; }
    .badge-roomtype { font-size: 0.62rem; padding: 0.06rem 0.32rem; }
    .ref-inline { font-size: 0.65rem; }
    .actions { gap: 0.25rem; }
    .actions .btn { font-size: 0.68rem; padding: 0.2rem 0.45rem; }
    .urgency-group-header td { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
}

@media (max-width: 540px) {
    .dashboard-tabs {
        top: 122px;
    }

    .ops-grid { grid-template-columns: 1fr 1fr; }
    .header-subline { font-size: 0.76rem; }
    .role-badge { align-self: flex-start; }
    .owner-exception-grid,
    .owner-secondary-grid,
    .owner-info-grid,
    .owner-security-strip {
        grid-template-columns: 1fr;
    }

    .owner-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .owner-inventory-grid,
    .owner-inventory-metrics {
        grid-template-columns: 1fr;
    }

    .owner-kpi-card {
        min-height: 122px;
    }

    .owner-modal,
    .owner-modal-wide {
        max-width: calc(100% - 1rem);
    }

    .login-card {
        padding: 1.45rem;
        max-width: 100%;
    }

    .login-role-switch {
        flex-direction: column;
    }
}

@media (max-width: 390px) {
    .ops-grid,
    .owner-kpi-grid {
        grid-template-columns: 1fr;
    }

    .owner-inventory-days {
        grid-template-columns: 1fr 1fr;
    }
}
