@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ============================================================
   Revue.day runtime overrides — 2026 design refresh
   Targets the compiled Vite/React admin dashboard (index.html)
   ============================================================ */

/* ── CSS custom properties ── */
:root {
    --hostabl-sidebar-width: 260px;
    --hostabl-sidebar-collapsed: 76px;
    --hostabl-panel-radius: 16px;
    --hostabl-ink: #0f172a;
    --hostabl-muted: #64748b;
    --hostabl-line: #e2e8f0;
    --hostabl-soft: #f8fafc;
    --hostabl-success: #15803d;
    --hostabl-warning: #b45309;
    --hostabl-danger: #b91c1c;
    --hostabl-primary: #2563eb;
    --hostabl-primary-dark: #1d4ed8;
    --hostabl-shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.06);
    --hostabl-shadow-md: 0 4px 6px -1px rgba(15,23,42,0.07), 0 12px 28px rgba(15,23,42,0.09);
}

/* ── Base ── */
body {
    background: #f1f5f9;
    color: var(--hostabl-ink);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ================================================================
   LAYOUT
   ================================================================ */

.dashboard-layout {
    min-height: 100vh;
    align-items: stretch;
    background: linear-gradient(180deg, #f1f5f9 0%, #eef2f8 100%);
}

@media (min-width: 769px) {
    .dashboard-layout {
        display: grid !important;
        grid-template-columns: var(--hostabl-sidebar-width) minmax(0, 1fr);
    }

    .sidebar {
        width: var(--hostabl-sidebar-width) !important;
        min-width: var(--hostabl-sidebar-width) !important;
        border-right: 1px solid rgba(255,255,255,0.08);
        padding: 20px 14px !important;
    }

    .sidebar.collapsed {
        width: var(--hostabl-sidebar-collapsed) !important;
        min-width: var(--hostabl-sidebar-collapsed) !important;
    }

    .content {
        padding: 28px !important;
    }
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(160deg, #111c30 0%, #0e1a2e 55%, #091422 100%) !important;
    box-shadow: 2px 0 0 rgba(255,255,255,0.04), 6px 0 32px rgba(0,0,0,0.28);
    z-index: 60;
    display: flex;
    flex-direction: column;
}

/* Brand / logo area */
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: left;
    margin-bottom: 12px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sidebar .brand::before {
    content: "Rd";
    width: 40px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #3a3a3a 0%, #222222 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.sidebar.collapsed .brand {
    justify-content: center;
    padding: 0;
    background: transparent;
    border-color: transparent;
    min-height: 44px;
    gap: 0;
    font-size: 0 !important; /* hide brand text, keep ::before icon */
}

.sidebar.collapsed .brand::before {
    font-size: 1rem; /* restore size for the R icon */
}

.sidebar.collapsed .brand::before {
    display: flex;
}

/* User info */
.sidebar .user-info {
    text-align: left;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    color: #94aabf;
    font-size: 0.82rem;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Nav list */
.sidebar ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    margin-top: 4px;
    padding-bottom: 80px;
    flex: 1 1 auto;
    scrollbar-width: none;
}

.sidebar ul::-webkit-scrollbar { display: none; }

.sidebar li {
    margin: 0;
}

/* Nav section label */
.sidebar .nav-section-label {
    padding: 10px 12px 4px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.24);
}

/* Nav links — default state */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #7a96b4;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

/* Hover */
.sidebar a:hover {
    background: rgba(255,255,255,0.07);
    color: #c8daea;
    text-decoration: none;
}

/* Active — soft blue highlight with left accent */
.sidebar a.active {
    background: rgba(37,99,235,0.18) !important;
    color: #93c5fd !important;
    border-color: rgba(37,99,235,0.28) !important;
    font-weight: 700;
    position: relative;
}

.sidebar a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59,130,246,0.7);
}

/* Sidebar toggle — floating pill at the sidebar's right edge */
.sidebar .sidebar-toggle {
    position: fixed !important;
    top: 22px !important;
    left: calc(var(--hostabl-sidebar-width) - 14px) !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #3a3a3a 0%, #222222 100%) !important;
    border: 2px solid rgba(255,255,255,0.18) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.45) !important;
    font-size: 0 !important;
    z-index: 200;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, left 0.25s ease;
}

.sidebar.collapsed .sidebar-toggle {
    left: calc(var(--hostabl-sidebar-collapsed) - 14px) !important;
}

.sidebar .sidebar-toggle:hover {
    background: linear-gradient(135deg, #555555 0%, #333333 100%) !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.5) !important;
    transform: none !important;
}

.sidebar .sidebar-toggle::before {
    content: "\2039";
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
    margin-right: -2px;
}

.sidebar.collapsed .sidebar-toggle::before {
    content: "\203A";
    margin-right: 0;
    margin-left: -2px;
}

/* Logout button */
.btn-logout {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 12px !important;
    color: #7a96b4 !important;
    min-height: 40px;
    z-index: 5;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-logout:hover {
    background: rgba(239,68,68,0.15) !important;
    border-color: rgba(239,68,68,0.25) !important;
    color: #fca5a5 !important;
}

.hostabl-logout-icon {
    flex: 0 0 auto;
}

.sidebar.collapsed .btn-logout {
    left: 8px;
    right: 8px;
    padding: 0 !important;
    min-height: 40px;
}

.sidebar.collapsed .btn-logout .hostabl-logout-label {
    display: none;
}

/* Dark mode toggle button (added by JS) */
.hostabl-dark-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #7a96b4;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.hostabl-dark-toggle:hover {
    background: rgba(255,255,255,0.09);
    color: #c8daea;
}

.hostabl-dark-toggle .toggle-icon {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.sidebar.collapsed .hostabl-dark-toggle {
    padding: 0;
    justify-content: center;
    min-height: 36px;
}

.sidebar.collapsed .hostabl-dark-toggle .toggle-icon {
    width: auto;
}

.hostabl-dark-toggle .toggle-icon svg {
    display: block;
}

/* ── Collapsed sidebar: icons only, everything centered (all widths) ── */

.sidebar.collapsed .hostabl-nav-label,
.sidebar.collapsed .toggle-label,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-section-label {
    display: none !important;
}

.sidebar.collapsed a {
    justify-content: center;
    padding: 0 !important;
    gap: 0;
}

.sidebar.collapsed a::before {
    display: none; /* no active accent bar when collapsed */
}

.sidebar.collapsed .hostabl-nav-icon {
    margin: 0;
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

/* Responsive grid: auto-expand content when sidebar collapses */
@media (min-width: 769px) {
    .dashboard-layout:has(.sidebar.collapsed) {
        grid-template-columns: var(--hostabl-sidebar-collapsed) minmax(0, 1fr) !important;
    }
}

/* ================================================================
   CONTENT AREA
   ================================================================ */

.content {
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 26px 32px;
    position: relative;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 240px),
        #f1f5f9;
}

.content > div {
    max-width: 1480px;
    margin: 0 auto;
}

.content h2, .content h3 {
    color: var(--hostabl-ink);
    letter-spacing: -0.01em;
}

/* ================================================================
   DASHBOARD HEADER
   ================================================================ */

.dashboard-header {
    position: sticky !important;
    top: 18px !important;
    z-index: 35 !important;
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) auto minmax(260px, auto);
    align-items: center;
    gap: 14px;
    border-radius: 18px !important;
    padding: 14px !important;
    margin-bottom: 20px !important;
    background: rgba(255,255,255,0.94) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--hostabl-line);
    box-shadow: var(--hostabl-shadow-sm);
}

.date-nav {
    display: inline-flex;
    width: fit-content;
    padding: 5px;
    border: 1px solid var(--hostabl-line);
    border-radius: 14px;
    background: var(--hostabl-soft);
}

.dashboard-header .date-input-wrapper {
    min-width: 174px;
    border-color: transparent;
    background: #fff;
}

.dashboard-header .stats-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(92px, 1fr));
    gap: 8px;
}

.dashboard-header .actions .view-toggle {
    border: 1px solid var(--hostabl-line);
    background: var(--hostabl-soft);
    border-radius: 14px;
}

.dashboard-header .actions .view-toggle button {
    border-radius: 11px;
    font-weight: 800;
}

.dashboard-header .actions .view-toggle button.active {
    background: #0f172a !important;
    color: #fff !important;
}

.dashboard-header .actions .view-toggle .btn-primary {
    background: var(--hostabl-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(37,99,235,0.26);
}

/* ================================================================
   STAT CARDS
   ================================================================ */

.stats-bar {
    gap: 10px;
}

.stat-item,
.stat-card {
    position: relative;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 14px 12px 18px;
    min-width: 100px;
    overflow: hidden;
    box-shadow: var(--hostabl-shadow-sm);
}

/* Colored top-left accent bar */
.stat-item::before,
.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 28px;
    border-radius: 0 3px 3px 0;
    background: var(--hostabl-primary);
}

.stat-label {
    display: block;
    color: var(--hostabl-muted);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.stat-value {
    display: block;
    color: var(--hostabl-ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn-primary,
.btn-secondary,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    min-height: 42px;
    line-height: 1.15;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn-primary {
    background: var(--hostabl-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(37,99,235,0.28);
}

.btn-primary:hover {
    background: var(--hostabl-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(37,99,235,0.34);
    text-decoration: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid var(--hostabl-line);
}

.btn-secondary:hover {
    background: #e8edf5;
    border-color: #c8d4e2;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-small {
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-icon {
    border: 1px solid var(--hostabl-line);
    border-radius: 11px;
    background: #fff;
    color: var(--hostabl-ink);
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-icon:hover {
    transform: translateY(-1px);
    border-color: #bfcfe0;
    box-shadow: 0 4px 10px rgba(15,23,42,0.08);
}

.btn-icon-action {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

/* Actions container */
.actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.actions .view-toggle {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
}

.actions .view-toggle button {
    min-width: 78px;
    min-height: 40px;
    border-radius: 11px;
    border: 1px solid transparent;
}

.actions .view-toggle .btn-primary {
    margin-left: 4px;
}

/* ================================================================
   FORMS & INPUTS
   ================================================================ */

input,
select,
textarea,
.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid var(--hostabl-line);
    border-radius: 11px;
    background: #fff;
    color: var(--hostabl-ink);
    min-height: 44px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hostabl-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.13);
}

/* Date picker */
.date-picker-container {
    border: 1px solid #d7e0ea;
    box-shadow: var(--hostabl-shadow-sm);
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.date-input-wrapper {
    background: #fff;
    border: 1px solid #d0dae7;
    border-radius: 12px;
    min-height: 46px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.date-input {
    font-weight: 600;
    color: #1f314b;
    letter-spacing: 0.01em;
    cursor: pointer;
    min-height: unset;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

input[type="date"].date-input {
    appearance: none;
}

.date-input:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.quick-select button {
    border-radius: 999px;
    font-weight: 700;
}

/* Settings labels */
.settings-page .accordion-content .settings-section > .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 12px;
}

.settings-page .accordion-content .settings-section .turn-times-list .form-row.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-page .accordion-content .settings-section .form-row > label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: #2f4360;
}

.settings-page .accordion-content .settings-section .form-row > label input,
.settings-page .accordion-content .settings-section .form-row > label select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfd9e7;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 1rem;
}

.settings-page .accordion-content .settings-section h4 {
    margin: 14px 0 8px;
}

.turn-times-list {
    display: grid;
    gap: 10px;
}

.settings-section code,
.settings-section pre {
    word-break: break-word;
}

.settings-section .btn-primary {
    white-space: nowrap;
}

/* ================================================================
   BOOKINGS TABLE
   ================================================================ */

.bookings-table {
    background: #fff;
    border: 1px solid var(--hostabl-line);
    border-radius: 18px !important;
    box-shadow: var(--hostabl-shadow-sm);
    overflow: hidden;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.bookings-table table {
    border-collapse: separate;
    border-spacing: 0;
}

.bookings-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--hostabl-soft);
    color: var(--hostabl-muted);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(226,232,240,0.4) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.bookings-table th:first-child { border-top-left-radius: 18px; }
.bookings-table th:last-child  { border-top-right-radius: 18px; }

.bookings-table td {
    color: var(--hostabl-ink);
    vertical-align: middle;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(226,232,240,0.22) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* No zebra stripes — keeps it clean */
.bookings-table tbody tr:nth-child(even) td {
    background: transparent;
}

.bookings-table td:first-child {
    font-weight: 800;
    color: #0f172a;
}

.bookings-table tbody tr {
    transition: background 0.16s ease;
}

.bookings-table tbody tr:hover {
    background: #f8fbff;
}

/* ================================================================
   GRID LINE SUPPRESSION — professional, clean look
   Remove excessive borders/dividers from the React app's default styles.
   ================================================================ */

/* ── Grid line suppression — site-wide ─────────────────────────────────── */

/* Kill ALL left/right/top borders on every cell and row */
table tr,
table th,
table td {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Single faint horizontal rule only between rows, nothing on last row */
table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(226,232,240,0.35) !important;
}
table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Thead: one clean separator line under headers */
table thead th {
    border-bottom: 1px solid rgba(226,232,240,0.55) !important;
}

/* Dark mode: slightly lighter lines */
body.hostabl-dark table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
body.hostabl-dark table thead th {
    border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}

/* Suppress dividers inside settings accordion / sections */
.accordion-content > * + *,
.settings-section > * + * {
    border-top: none !important;
}

/* Soften hr elements */
.content hr,
.settings-page hr,
.accordion-content hr {
    border: none !important;
    border-top: 1px solid rgba(226,232,240,0.3) !important;
    margin: 12px 0 !important;
}

/* Opening hours day rows */
.day-row + .day-row {
    border-top: 1px solid rgba(226,232,240,0.25) !important;
    margin-top: 4px;
}

/* Customer list / any generic list rows */
.customer-list > *,
.customers-list > *,
[class*="customer-row"],
[class*="list-row"] {
    border-bottom: 1px solid rgba(226,232,240,0.4) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* ================================================================
   STATUS BADGES
   ================================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.30rem 0.60rem;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-confirmed {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-seated {
    background: #dcfce7;
    color: var(--hostabl-success);
    border-color: #bbf7d0;
}

.status-cancelled {
    background: #fee2e2;
    color: var(--hostabl-danger);
    border-color: #fecaca;
}

.status-finished {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.status-pending {
    background: #fef9c3;
    color: #92400e;
    border-color: #fde68a;
}

/* ================================================================
   MODALS — New Booking & general
   ================================================================ */

.modal-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(9,18,34,0.52);
}

.modal-content {
    width: min(94vw, 560px) !important;
    border-radius: 22px !important;
    border: 1px solid var(--hostabl-line);
    box-shadow: 0 8px 24px rgba(15,23,42,0.10), 0 32px 80px rgba(15,23,42,0.20);
    padding: 0 !important;
    overflow: hidden auto !important;
    max-height: min(92vh, 860px) !important;
}

/* ── Modal header ── */
.modal-content > *:first-child,
.modal-content h3:first-child,
.modal-content > div > h3:first-child {
    background: #fff;
    border-bottom: 1.5px solid var(--hostabl-line);
    padding: 20px 24px !important;
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: var(--hostabl-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-content > div { padding: 0; }

/* ── Modal body ── */
.modal-content form,
.modal-content > div > *:not(h3):not(.modal-actions) {
    padding: 0 24px;
}

.modal-content .form-row:first-of-type,
.modal-content form > *:first-child { margin-top: 20px; }

.modal-content h3 {
    margin-top: 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Section label injected by JS ── */
.hostabl-modal-section {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.hostabl-modal-section:first-of-type { margin-top: 20px; }

/* ── Form rows ── */
.modal-content .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.modal-content .form-row.full-width,
.modal-content .form-group:has(textarea),
.modal-content .form-group:has(select) {
    grid-column: 1 / -1;
}

/* ── Labels ── */
.modal-content label,
.modal-content .form-group label {
    font-size: 0.79rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.01em;
}

/* ── Inputs ── */
.modal-content input,
.modal-content select,
.modal-content textarea {
    min-height: 38px;
    border-radius: 11px !important;
    padding: 0 12px !important;
    font-size: 0.88rem !important;
    font-weight: 500;
    border: 1.5px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: var(--hostabl-primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10) !important;
    background: #fff !important;
    outline: none;
}

.modal-content textarea {
    min-height: 66px;
    padding: 9px 12px !important;
    resize: vertical;
    line-height: 1.5;
}

/* ── Modal footer actions ── */
.modal-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.97) 26%);
    padding: 16px 24px 22px;
    margin-top: 6px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

/* Table chip selector in modal */
.table-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 4px 0;
}

.table-chip {
    border-radius: 9px !important;
    background: #f1f5f9 !important;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid #d8e3ee !important;
    padding: 6px 12px;
    min-height: 34px;
    transition: all 0.15s ease;
}

.table-chip:hover {
    border-color: var(--hostabl-primary) !important;
    background: rgba(37,99,235,0.08) !important;
    color: var(--hostabl-primary);
}

.table-chip.selected {
    background: var(--hostabl-primary) !important;
    color: #fff !important;
    border-color: var(--hostabl-primary) !important;
    box-shadow: 0 3px 10px rgba(37,99,235,0.28);
}

/* ================================================================
   TABLE SELECTOR / CHIPS
   ================================================================ */

.table-selector {
    gap: 8px;
}

.table-chip {
    border-radius: 999px;
    background: #fff;
    font-weight: 800;
    border: 1px solid var(--hostabl-line);
    transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.table-chip:hover {
    border-color: var(--hostabl-primary);
    background: rgba(37,99,235,0.07);
}

.table-chip.selected {
    background: var(--hostabl-primary);
    color: #fff;
    border-color: var(--hostabl-primary);
    box-shadow: 0 6px 16px rgba(37,99,235,0.24);
}

/* ================================================================
   SETTINGS PAGE
   ================================================================ */

.settings-page {
    max-width: 1120px !important;
    margin: 0 auto;
}

.settings-section {
    border: 1px solid var(--hostabl-line);
    border-radius: 18px !important;
    padding: 22px !important;
    background: #fff;
    box-shadow: var(--hostabl-shadow-sm);
}

.accordion-item {
    border: 1px solid var(--hostabl-line);
    border-radius: 18px !important;
    box-shadow: var(--hostabl-shadow-sm);
    overflow: hidden;
}

.accordion-header {
    min-height: 58px;
    padding: 0 18px !important;
    background: var(--hostabl-soft) !important;
}

.table-item,
.combo-item,
.day-row {
    border: 1px solid var(--hostabl-line);
    border-radius: 14px !important;
    background: #fff !important;
}

/* ── Tables & Rooms: improved grid layout ── */
.tables-list,
.table-list,
[class*="tables-grid"],
[class*="table-grid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.table-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.table-item:hover {
    border-color: #c5d4e4 !important;
    box-shadow: 0 4px 14px rgba(15,23,42,0.08);
}

.table-item .table-name,
.table-item > strong,
.table-item > b {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hostabl-ink);
}

.table-item .table-meta,
.table-item > span:not([class*="btn"]) {
    font-size: 0.8rem;
    color: var(--hostabl-muted);
    margin-top: 2px;
}

.table-item .table-actions,
.table-item > div:last-child {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Rooms/sections group header */
.table-section-header,
[class*="section-header"],
[class*="room-header"] {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hostabl-muted);
    padding: 6px 4px 8px;
    border-bottom: 1px solid var(--hostabl-line);
    margin-bottom: 8px;
}

/* Combo/section containers */
.combo-item {
    padding: 14px 16px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.15s ease;
}

.combo-item:hover {
    box-shadow: 0 4px 14px rgba(15,23,42,0.07);
}

/* ================================================================
   REPORTS
   ================================================================ */

.reports-container {
    display: grid;
    gap: 16px;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.reports-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(241,245,249,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--hostabl-line);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--hostabl-shadow-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.chart-card {
    background: #fff;
    border: 1px solid var(--hostabl-line);
    border-radius: 18px !important;
    box-shadow: var(--hostabl-shadow-sm);
    padding: 18px;
    min-height: 350px;
}

.chart-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hostabl-ink);
}

.chart-card .recharts-responsive-container {
    min-height: 275px;
}

/* ================================================================
   FLOOR PLAN
   ================================================================ */

.floor-plan-editor {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
    gap: 14px;
    min-height: 680px;
}

.toolbar {
    width: auto;
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
    box-shadow: var(--hostabl-shadow-sm);
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 88px;
}

.canvas-container {
    min-height: min(720px, calc(100vh - 150px));
}

/* ================================================================
   WIDGET GENERATOR
   ================================================================ */

.widget-generator .settings-section > .hostabl-copy-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.widget-generator .settings-section pre {
    margin: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    padding: 14px 16px !important;
}

.widget-generator .settings-section code {
    width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.widget-generator .settings-section .hostabl-copy-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    height: 44px;
    min-width: 140px;
    padding: 0 18px !important;
    border-radius: 12px;
    align-self: flex-start;
}

.widget-generator iframe {
    width: 100%;
    min-height: 560px;
    border: 0;
}

.hostabl-widget-styles {
    display: grid;
    gap: 14px;
}

.hostabl-widget-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hostabl-widget-controls label {
    display: grid;
    gap: 7px;
    color: #2f4360;
    font-weight: 700;
}

.hostabl-widget-controls input,
.hostabl-widget-controls select {
    min-height: 42px;
    padding: 0 10px;
}

.hostabl-widget-output {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.hostabl-widget-output pre {
    margin: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    overflow: auto;
}

.hostabl-widget-preview-frame {
    width: 100%;
    min-height: 370px;
    border: 1px solid var(--hostabl-line);
    border-radius: 16px;
    background: #fff;
}

/* ================================================================
   AUTH PAGE
   ================================================================ */

.auth-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(37,99,235,0.18), transparent 38rem),
        linear-gradient(160deg, #0c1624 0%, #111d35 50%, #0a1420 100%) !important;
}

.auth-card {
    width: min(100%, 460px) !important;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 24px !important;
    padding: 38px !important;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 32px 90px rgba(0,0,0,0.36) !important;
}

.auth-card::before {
    content: "Revue.day";
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 24px;
    padding: 0 14px;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    background: #f7fafc;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-card h2 {
    text-align: left !important;
    margin: 0 0 24px !important;
    color: #0f172a !important;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.auth-card .form-group label {
    color: #334155;
    font-weight: 700;
}

.auth-card input {
    min-height: 48px;
    background: #f8fafc !important;
    border-radius: 12px;
}

.auth-card .btn-primary {
    width: 100%;
    min-height: 50px;
    margin-top: 6px;
    border-radius: 14px;
    font-size: 1rem;
}

.auth-card p {
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* ================================================================
   LOADING STATES — animated spinner instead of text
   ================================================================ */

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.hostabl-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(91, 94, 86, 0.18);
    border-top-color: var(--hostabl-primary, #2563eb);
    animation: hostablSpin 0.8s linear infinite;
    flex: 0 0 auto;
}

.hostabl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

body.hostabl-dark .hostabl-spinner {
    border-color: rgba(255, 255, 255, 0.14);
    border-top-color: #60a5fa;
}

/* ================================================================
   TIMELINE
   ================================================================ */

.timeline-container {
    border: 1px solid var(--hostabl-line);
    border-radius: 18px;
    box-shadow: var(--hostabl-shadow-sm);
    max-height: calc(100vh - 180px);
    overflow: auto;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

.hostabl-print-button {
    white-space: nowrap;
}

.hostabl-print-title {
    display: none;
}

/* Customer management */
.customer-management {
    width: min(100%, 1180px);
}

/* ================================================================
   RESPONSIVE — 1180px
   ================================================================ */

@media (max-width: 1180px) {
    .dashboard-header {
        grid-template-columns: 1fr;
    }

    .dashboard-header .date-nav,
    .dashboard-header .stats-bar,
    .dashboard-header .actions,
    .dashboard-header .actions .view-toggle {
        width: 100%;
    }

    .dashboard-header .stats-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ================================================================
   RESPONSIVE — 1024px (compact sidebar)
   ================================================================ */

@media (max-width: 1024px) {
    /* Default to the compact column; JS auto-collapses the sidebar here.
       All icon-only styling is scoped to .collapsed so the user can still
       expand the menu with the toggle and get the full sidebar back. */
    .dashboard-layout {
        display: grid !important;
        grid-template-columns: var(--hostabl-sidebar-width) minmax(0, 1fr);
    }

    .dashboard-layout:has(.sidebar.collapsed),
    .dashboard-layout.hostabl-sidebar-collapsed {
        grid-template-columns: var(--hostabl-sidebar-collapsed) minmax(0, 1fr);
    }

    .sidebar.collapsed {
        width: var(--hostabl-sidebar-collapsed) !important;
        min-width: var(--hostabl-sidebar-collapsed) !important;
        padding: 14px 8px !important;
    }

    .sidebar.collapsed a.active {
        background: #fff !important;
        border-radius: 12px;
    }

    .content {
        padding: 16px !important;
    }

    .dashboard-header {
        top: 10px !important;
    }

    .dashboard-header .stats-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .actions {
        width: 100%;
        justify-content: flex-start;
    }

    .actions .view-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .actions .view-toggle .btn-primary {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .chart-card {
        min-height: 310px;
    }

    .chart-card .recharts-responsive-container {
        min-height: 230px;
    }

    .floor-plan-editor {
        grid-template-columns: 1fr !important;
        min-height: 0;
    }

    .toolbar {
        max-height: none;
        position: static;
    }

    .canvas-container {
        min-height: 520px;
    }

    .settings-page .accordion-content .settings-section > .form-row,
    .settings-page .accordion-content .settings-section .turn-times-list .form-row.compact {
        grid-template-columns: 1fr;
    }

    .widget-generator .settings-section > .hostabl-copy-row {
        grid-template-columns: 1fr;
    }

    .widget-generator .settings-section .hostabl-copy-btn {
        width: 100%;
    }

    .hostabl-widget-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hostabl-widget-output {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   RESPONSIVE — 768px (mobile: horizontal nav bar)
   ================================================================ */

@media (max-width: 768px) {
    .dashboard-layout {
        display: block !important;
        min-height: 100vh;
    }

    .sidebar {
        position: sticky !important;
        top: 0 !important;
        left: 0;
        right: 0;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        padding: 10px 12px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        overflow: visible !important;
        z-index: 1500;
        border-right: none;
        box-shadow: 0 4px 20px rgba(8,17,40,0.24);
    }

    .sidebar .sidebar-toggle {
        display: none !important;
    }

    .sidebar .brand {
        display: flex !important;
        margin: 0;
        font-size: 1.05rem;
        flex: 1 1 auto;
        min-height: 38px;
        padding: 0 10px;
        border-radius: 10px;
        margin-bottom: 0;
    }

    .sidebar .user-info {
        display: none !important;
    }

    .sidebar ul {
        order: 2;
        width: 100%;
        margin: 4px 0 0;
        padding: 0 0 4px;
        display: flex;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.18) transparent;
        -webkit-overflow-scrolling: touch;
        flex: none;
    }

    .sidebar li {
        flex: 0 0 auto;
    }

    .sidebar a {
        min-height: 36px;
        padding: 7px 13px;
        border-radius: 999px;
        font-size: 0.88rem !important;
        white-space: nowrap;
        text-align: center;
        justify-content: center;
        color: #a8bcd4;
    }

    .sidebar a.active::before {
        display: none;
    }

    .sidebar a.active {
        border-radius: 999px !important;
    }

    .btn-logout {
        position: static;
        order: 1;
        width: auto;
        margin-left: auto;
        padding: 7px 13px;
        min-height: 36px;
        border-radius: 999px;
        font-size: 0.88rem;
        left: auto;
        right: auto;
        bottom: auto;
    }

    .content {
        margin: 0 !important;
        height: auto !important;
        min-height: calc(100vh - 80px);
        padding: 14px !important;
    }

    .dashboard-header {
        position: static !important;
        top: auto !important;
        border-radius: 16px !important;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px !important;
        margin-bottom: 14px !important;
    }

    .dashboard-header .date-nav,
    .dashboard-header .stats-bar,
    .dashboard-header .actions {
        width: 100%;
    }

    .dashboard-header .date-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dashboard-header .stats-bar {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .dashboard-header .actions {
        justify-content: flex-start;
    }

    .dashboard-header .actions .view-toggle {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding: 4px;
    }

    .dashboard-header .actions .view-toggle button {
        flex: 0 0 auto;
        min-width: 84px;
    }

    .bookings-table {
        overflow-x: auto;
        max-height: none;
        border-radius: 16px !important;
        -webkit-overflow-scrolling: touch;
    }

    .bookings-table table {
        min-width: 740px;
    }

    .reports-header {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .quick-select {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        padding-bottom: 2px;
        justify-content: flex-start;
    }

    .quick-select button {
        flex: 0 0 auto;
    }

    .date-picker-container {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .date-inputs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .date-input-wrapper {
        width: 100%;
        min-height: 44px;
    }

    .stat-item, .stat-card {
        min-width: 0;
        padding: 10px 12px 10px 16px;
    }

    .stat-label { font-size: 0.64rem; }
    .stat-value { font-size: 1.1rem; }

    .settings-page .accordion-content,
    .settings-page .settings-section {
        padding: 14px;
    }

    .settings-page .accordion-content .settings-section > .form-row,
    .settings-page .accordion-content .settings-section .turn-times-list .form-row.compact {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .form-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .modal-content {
        width: min(96vw, 560px) !important;
        padding: 16px !important;
        border-radius: 18px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content .form-row {
        grid-template-columns: 1fr !important;
    }

    .widget-generator iframe {
        min-height: 500px;
    }

    .floor-plan-editor {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .canvas-container {
        min-height: 430px;
    }

    .auth-card {
        width: min(100%, 420px) !important;
        padding: 28px !important;
    }
}

/* ================================================================
   RESPONSIVE — 520px
   ================================================================ */

@media (max-width: 520px) {
    .dashboard-header .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .date-nav {
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .date-nav .btn-secondary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .dashboard-header .actions .view-toggle {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        white-space: normal !important;
    }

    .dashboard-header .actions .view-toggle button {
        width: 100%;
        min-width: 0 !important;
    }

    .auth-container {
        padding: 12px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .auth-card {
        padding: 22px !important;
        border-radius: 20px !important;
    }
}

/* ================================================================
   RESPONSIVE — 480px
   ================================================================ */

@media (max-width: 480px) {
    .sidebar .brand { font-size: 0.95rem; }

    .sidebar a,
    .btn-logout {
        font-size: 0.82rem !important;
        min-height: 34px;
        padding: 6px 10px;
    }

    .content {
        padding: 10px !important;
    }

    .dashboard-header .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-header .actions .view-toggle button {
        min-width: 76px;
        min-height: 36px;
    }

    .bookings-table table {
        min-width: 680px;
    }

    .chart-card {
        min-height: 270px;
        padding: 12px;
    }

    .chart-card .recharts-responsive-container {
        min-height: 190px;
    }

    .hostabl-widget-controls {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   CUSTOM DASHBOARD CALENDAR POPUP
   ================================================================ */

.hostabl-cal-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15,23,42,0.10), 0 30px 80px rgba(15,23,42,0.16);
    padding: 22px 24px;
    width: min(440px, calc(100vw - 28px));
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    animation: hcalIn 0.16s ease;
}

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

.hcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.hcal-header strong {
    flex: 1;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.hcal-nav {
    width: 48px;
    height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #374151;
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease;
    flex-shrink: 0;
}

.hcal-nav:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.hcal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px 5px;
}

.hcal-dow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hcal-cell {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    width: 100%;
}

.hcal-cell:hover:not(.hcal-past):not(.hcal-empty) { background: #eff6ff; color: #2563eb; }
.hcal-today { background: #dbeafe; color: #1d4ed8; font-weight: 800; }
.hcal-selected { background: #2563eb !important; color: #fff !important; font-weight: 800; box-shadow: 0 6px 16px rgba(37,99,235,0.32); }
.hcal-past { color: #d1d5db; cursor: not-allowed; }
.hcal-empty { cursor: default; pointer-events: none; }

@media (max-width: 480px) {
    .hostabl-cal-popup {
        border-radius: 18px;
        padding: 16px;
    }

    .hcal-header {
        margin-bottom: 12px;
    }

    .hcal-header strong {
        font-size: 1.1rem;
    }

    .hcal-nav {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 1.25rem;
    }

    .hcal-grid {
        gap: 4px 3px;
    }

    .hcal-dow {
        height: 22px;
        font-size: 0.65rem;
    }

    .hcal-cell {
        height: 38px;
        border-radius: 10px;
        font-size: 0.9rem;
    }
}

body.hostabl-dark .hostabl-cal-popup {
    background: #111c30;
    border-color: rgba(255,255,255,0.12);
}
body.hostabl-dark .hcal-header strong { color: #e2e8f0; }
body.hostabl-dark .hcal-nav { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #c8d4e8; }
body.hostabl-dark .hcal-cell { color: #c8d4e8; }
body.hostabl-dark .hcal-today { background: rgba(37,99,235,0.25); color: #93c5fd; }
body.hostabl-dark .hcal-past { color: #374151; }

/* ================================================================
   MODAL ENHANCEMENTS — Time grid, Party size, Occasions
   ================================================================ */

/* ── Time picker grid ── */
.hostabl-time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-height: 208px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
    margin-bottom: 4px;
}

.hostabl-time-btn {
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.hostabl-time-btn:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
}

.hostabl-time-btn.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37,99,235,0.28);
}

body.hostabl-dark .hostabl-time-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #c8d4e8; }
body.hostabl-dark .hostabl-time-btn:hover { background: rgba(37,99,235,0.18); border-color: #3b82f6; color: #93c5fd; }
body.hostabl-dark .hostabl-time-btn.selected { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ── Party size quick-select ── */
.hostabl-party-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.hostabl-party-btn {
    min-width: 42px;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
    color: #374151;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0 10px;
    transition: all 0.12s ease;
}

.hostabl-party-btn:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-1px);
}

.hostabl-party-btn.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 3px 10px rgba(37,99,235,0.28);
}

body.hostabl-dark .hostabl-party-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #c8d4e8; }
body.hostabl-dark .hostabl-party-btn:hover { background: rgba(37,99,235,0.18); border-color: #3b82f6; color: #93c5fd; }
body.hostabl-dark .hostabl-party-btn.selected { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ── Notes + Occasions: notes on top, flags in a plain horizontal row below ── */
.hostabl-notes-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-items: stretch !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}

.hostabl-notes-row > * {
    min-width: 0;
}

.hostabl-occasions {
    width: 100% !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 14px;
}

.hostabl-occasions-title {
    display: none; /* title removed per user request */
}

.hostabl-occasion-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 6px;
    transition: color 0.12s ease;
    user-select: none;
    white-space: nowrap;
    line-height: 1.2;
}

.hostabl-occasion-label:hover { color: #2563eb; }

.hostabl-occasion-label input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    min-height: 0 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

body.hostabl-dark .hostabl-occasions { background: transparent; border-color: transparent; }
body.hostabl-dark .hostabl-occasions-title { color: #7a96b4; }
body.hostabl-dark .hostabl-occasion-label { color: #c8d4e8; }
body.hostabl-dark .hostabl-occasion-label:hover { color: #93c5fd; }

/* ── Improved date-input-wrapper ── */
.date-input-wrapper {
    min-height: 48px !important;
    padding: 0 14px !important;
    border-radius: 13px !important;
    cursor: pointer;
    gap: 10px !important;
}

/* Block native date picker — our custom calendar opens instead.
   pointer-events:none passes clicks through the input to the wrapper,
   which the pointerdown handler catches to open the custom hcal. */
.dashboard-header .date-input-wrapper input[type="date"],
.date-nav .date-input-wrapper input[type="date"] {
    pointer-events: none !important;
    cursor: pointer;
}

.date-input {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}

/* ── Modal date picker container (calendar + Today/Tomorrow) ── */
.hostabl-date-picker-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 4px;
    width: 100%;
}

.hostabl-modal-date-wrap {
    flex: 1 1 auto;
    min-width: 120px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 13px;
    padding: 0 14px;
    min-height: 46px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hostabl-modal-date-wrap:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}

.hostabl-date-display-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hostabl-date-shortcuts {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.hostabl-date-shortcut {
    padding: 6px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    line-height: 1;
}

.hostabl-date-shortcut:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.hostabl-date-shortcut.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

body.hostabl-dark .hostabl-modal-date-wrap {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

body.hostabl-dark .hostabl-modal-date-wrap:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.12);
}

body.hostabl-dark .hostabl-date-display-text { color: #c8d4e8; }

body.hostabl-dark .hostabl-date-shortcut {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #c8d4e8;
}

body.hostabl-dark .hostabl-date-shortcut:hover {
    background: rgba(37,99,235,0.18);
    border-color: #3b82f6;
    color: #93c5fd;
}

body.hostabl-dark .hostabl-date-shortcut.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* ================================================================
   FINAL POLISH — Sidebar collapse + New Booking modal alignment
   ================================================================ */

@media (min-width: 769px) {
    .dashboard-layout.hostabl-sidebar-collapsed,
    .dashboard-layout:has(.sidebar.collapsed) {
        grid-template-columns: var(--hostabl-sidebar-collapsed) minmax(0, 1fr) !important;
    }
}

.sidebar a.hostabl-nav-enhanced {
    gap: 11px;
    padding: 0 12px;
}

.hostabl-nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    opacity: 0.9;
}

.hostabl-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* (tablet media block removed — icon-only styling is scoped to
   .sidebar.collapsed below, so a manually expanded sidebar keeps labels) */

.sidebar.collapsed a.hostabl-nav-enhanced {
    justify-content: center;
    padding: 0;
    width: 44px;
    min-height: 44px;
    margin-inline: auto;
}

.sidebar.collapsed .hostabl-nav-label {
    display: none;
}

.modal-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    overflow: auto;
    z-index: 5000 !important;
    isolation: isolate;
}

.dashboard-layout:has(.modal-overlay) .content {
    position: relative;
    z-index: 5000 !important;
    overflow: visible !important;
}

.dashboard-layout:has(.modal-overlay) .sidebar {
    z-index: 10 !important;
}

.modal-content {
    width: min(calc(100vw - 48px), 1120px) !important;
    max-width: 1120px !important;
    max-height: calc(100vh - 40px) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    background: #fff;
}

.modal-content,
.modal-content * {
    box-sizing: border-box;
}

.modal-content .modal-header,
.modal-content > div:first-child {
    position: sticky;
    top: 0;
    z-index: 3;
    min-height: 54px;
    padding: 12px 18px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--hostabl-line);
    background: rgba(255,255,255,0.98);
}

.modal-content .modal-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: block !important;
    color: var(--hostabl-ink);
    font-size: 1.18rem !important;
    line-height: 1.2;
}

.modal-content .modal-header button,
.modal-content > div:first-child > button {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: 1px solid var(--hostabl-line) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
}

.modal-content form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding: 12px 18px 0 !important;
    width: 100%;
    max-width: 100%;
}

.modal-content .form-row {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 10px !important;
    overflow: visible !important;
}

.modal-content .form-row .form-group {
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
}

.modal-content .form-row .form-group:has(select),
.modal-content .form-row .form-group:has(input[type="date"]),
.modal-content .form-row .form-group:has(.hostabl-date-picker-container) {
    grid-column: auto !important;
}

.modal-content form > .form-group {
    margin: 0 0 10px !important;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    min-width: 0;
    max-width: 100%;
}

.hostabl-native-time-select {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.hostabl-native-time-select:focus {
    outline: none !important;
}

.hostabl-time-manual {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin: -28px 0 8px;
    min-height: 30px;
}

.hostabl-time-manual-trigger {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid #d7e0ea !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(20, 31, 61, 0.06);
}

.hostabl-time-manual-trigger svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hostabl-time-manual.open .hostabl-time-manual-trigger,
.hostabl-time-manual-trigger:hover {
    border-color: var(--hostabl-accent) !important;
    color: var(--hostabl-accent) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 10px 20px rgba(20, 31, 61, 0.08);
}

.hostabl-time-manual-panel {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 8;
    width: 236px;
    padding: 12px;
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.hostabl-time-manual-panel label {
    display: block;
    margin: 0 0 8px !important;
    color: #475569 !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hostabl-time-manual-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hostabl-time-manual-entry input {
    min-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    text-align: center;
    font-weight: 850 !important;
    letter-spacing: 0.08em;
}

.hostabl-time-manual-apply {
    min-height: 38px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--hostabl-accent) !important;
    color: #fff !important;
    font-weight: 850 !important;
}

.hostabl-time-manual-hint {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
}

.hostabl-time-manual.invalid .hostabl-manual-time-input {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10) !important;
}

.hostabl-time-select-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 104px;
    padding: 0 2px 2px;
    overflow-x: hidden !important;
}

.hostabl-time-select-grid .hostabl-time-btn {
    width: auto !important;
    min-width: 0 !important;
    height: 30px;
    border-radius: 10px;
    font-size: 0.78rem;
    padding: 0 6px !important;
}

.hostabl-time-empty {
    grid-column: 1 / -1;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.84rem;
    font-weight: 700;
}

.hostabl-modal-section {
    display: none !important;
}

.modal-content form > .hostabl-modal-section:first-child {
    margin-top: 0 !important;
}

.modal-content .hostabl-date-picker-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.modal-content .hostabl-modal-date-wrap {
    width: 100%;
    min-width: 0;
    min-height: 46px !important;
    padding: 0 12px !important;
    border: 1px solid #d7e0ea !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(20, 31, 61, 0.08) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    color: #1f314b !important;
    font-weight: 800 !important;
}

.modal-content .hostabl-modal-date-wrap:hover {
    border-color: #bfcbdb !important;
    box-shadow: 0 12px 26px rgba(20, 31, 61, 0.11) !important;
}

.modal-content .hostabl-modal-date-wrap .date-input-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4fb;
    font-size: 0;
    position: relative;
}

.modal-content .hostabl-modal-date-wrap .date-input-icon::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #526172;
    border-radius: 4px;
    box-shadow: inset 0 4px 0 rgba(82, 97, 114, 0.16);
}

.modal-content .hostabl-modal-date-wrap .date-input {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-content .hostabl-date-shortcuts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
}

.modal-content .hostabl-date-shortcut {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
}

/* (old 2-column occasions grid removed — compact side-panel layout used instead) */

.modal-actions {
    margin: 4px -18px 0;
    padding: 12px 18px 16px !important;
    border-top: 1px solid rgba(226,232,240,0.88);
    background: rgba(255,255,255,0.98) !important;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
    min-width: 118px;
}

.modal-actions .btn-primary.hostabl-save-loading,
.modal-content button.hostabl-save-loading {
    cursor: wait !important;
    opacity: 0.92;
    pointer-events: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.hostabl-save-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: hostablSpin 0.72s linear infinite;
    flex: 0 0 auto;
}

@keyframes hostablSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
        align-items: flex-start !important;
    }

    .modal-content {
        width: 100% !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 18px !important;
    }

    .modal-content form {
        padding: 16px 16px 0 !important;
    }

    .modal-content .form-row {
        grid-template-columns: 1fr !important;
    }

    .hostabl-date-picker-container,
    .hostabl-notes-row {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }

    .hostabl-date-shortcuts {
        width: 100%;
    }

    .hostabl-date-shortcut {
        flex: 1 1 0;
        min-height: 38px;
    }

    .hostabl-time-select-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-actions {
        margin-inline: -16px;
        padding: 14px 16px 16px !important;
    }
}

/* ================================================================
   DARK MODE  (.hostabl-dark on body, toggled by JS)
   ================================================================ */

body.hostabl-dark {
    background: #0b1221 !important;
    color: #cbd5e1;
    --hostabl-ink: #e2e8f0;
    --hostabl-muted: #7a96b4;
    --hostabl-line: rgba(255,255,255,0.10);
    --hostabl-soft: rgba(255,255,255,0.04);
    --hostabl-primary: #60a5fa;
}

body.hostabl-dark .dashboard-layout { background: #0b1221 !important; }

body.hostabl-dark .content {
    background: #0b1221 !important;
    color: #cbd5e1;
}

body.hostabl-dark .dashboard-header {
    background: rgba(17,28,48,0.94) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

body.hostabl-dark .date-nav,
body.hostabl-dark .dashboard-header .actions .view-toggle {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

body.hostabl-dark .dashboard-header .actions .view-toggle button { color: #94a3b8; }
body.hostabl-dark .dashboard-header .actions .view-toggle button.active { background: #1e40af !important; color: #fff !important; }
body.hostabl-dark .dashboard-header .actions .view-toggle .btn-primary { background: #2563eb !important; }

body.hostabl-dark .date-input-wrapper {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #c8d4e8;
}

body.hostabl-dark .stat-item,
body.hostabl-dark .stat-card {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

body.hostabl-dark .stat-label { color: #7a96b4; }
body.hostabl-dark .stat-value { color: #e2e8f0; }

body.hostabl-dark .bookings-table,
body.hostabl-dark .settings-section,
body.hostabl-dark .chart-card,
body.hostabl-dark .accordion-item,
body.hostabl-dark .timeline-container,
body.hostabl-dark .date-picker-container {
    background: #111c30 !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #cbd5e1;
}

body.hostabl-dark .bookings-table th {
    background: #0e1828 !important;
    color: #7a96b4;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

body.hostabl-dark .bookings-table td {
    color: #c8d4e8;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}
body.hostabl-dark .bookings-table tbody tr:last-child td { border-bottom: none !important; }
body.hostabl-dark .bookings-table tbody tr:hover { background: rgba(255,255,255,0.03) !important; }
body.hostabl-dark .bookings-table tbody tr:nth-child(even) td { background: transparent !important; }
body.hostabl-dark .bookings-table td:first-child { color: #e2e8f0; }

body.hostabl-dark .accordion-header {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #c8d4e8;
}

body.hostabl-dark input,
body.hostabl-dark select,
body.hostabl-dark textarea,
body.hostabl-dark .form-group input,
body.hostabl-dark .form-group select,
body.hostabl-dark .form-group textarea {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.14) !important;
    color: #d1dae8 !important;
}

body.hostabl-dark input:focus,
body.hostabl-dark select:focus,
body.hostabl-dark textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.22) !important;
    background: rgba(255,255,255,0.09) !important;
}

body.hostabl-dark .btn-secondary,
body.hostabl-dark .btn-small:not(.btn-primary) {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.14) !important;
    color: #c8d4e8 !important;
}

body.hostabl-dark .btn-icon {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #c8d4e8 !important;
}

body.hostabl-dark .reports-header {
    background: rgba(11,18,33,0.95) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

body.hostabl-dark .table-item,
body.hostabl-dark .combo-item,
body.hostabl-dark .day-row {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

body.hostabl-dark .status-confirmed { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }
body.hostabl-dark .status-seated    { background: #14532d; color: #86efac; border-color: #166534; }
body.hostabl-dark .status-cancelled { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
body.hostabl-dark .status-finished  { background: #1e293b; color: #94a3b8; border-color: #334155; }
body.hostabl-dark .status-pending   { background: #451a03; color: #fdba74; border-color: #7c2d12; }

body.hostabl-dark .modal-overlay { background: rgba(0,0,0,0.72); }

body.hostabl-dark .modal-content {
    background: #111c30 !important;
    border-color: rgba(255,255,255,0.12) !important;
}

body.hostabl-dark .modal-content > *:first-child,
body.hostabl-dark .modal-content h3:first-child {
    background: #0e1828 !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #e2e8f0 !important;
}

body.hostabl-dark .modal-actions {
    background: linear-gradient(180deg, rgba(17,28,48,0) 0%, rgba(17,28,48,0.98) 28%) !important;
}

body.hostabl-dark .modal-content input,
body.hostabl-dark .modal-content select,
body.hostabl-dark .modal-content textarea {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.14) !important;
    color: #d1dae8 !important;
}

body.hostabl-dark .modal-content label,
body.hostabl-dark .modal-content .form-group label { color: #94aabf !important; }

body.hostabl-dark .hostabl-modal-section {
    color: #4a6580;
    border-color: rgba(255,255,255,0.06);
}

body.hostabl-dark .toolbar {
    background: #111c30 !important;
    border-color: rgba(255,255,255,0.10) !important;
}

/* ================================================================
   TEAM MANAGEMENT UI
   ================================================================ */

.hostabl-team-page {
    padding: 24px 28px;
    max-width: 700px;
}

.hostabl-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.hostabl-team-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--hostabl-ink);
    letter-spacing: -0.02em;
    margin: 0;
}

.hostabl-team-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.hostabl-team-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    transition: box-shadow 0.15s ease;
}

.hostabl-team-card:hover { box-shadow: var(--hostabl-shadow-sm); }

.hostabl-team-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.hostabl-team-info { flex: 1; min-width: 0; }

.hostabl-team-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hostabl-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hostabl-team-username {
    font-size: 0.76rem;
    color: var(--hostabl-muted);
    margin-top: 1px;
}

.hostabl-role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: capitalize;
    flex-shrink: 0;
}

.hostabl-role-admin    { background: #eff6ff; color: #2563eb; }
.hostabl-role-manager  { background: #f0fdf4; color: #15803d; }
.hostabl-role-staff    { background: #f9fafb; color: #374151; border: 1px solid #e2e8f0; }
.hostabl-role-readonly { background: #fef9c3; color: #854d0e; }

.hostabl-team-actions { display: flex; gap: 6px; flex-shrink: 0; }

.hostabl-team-btn {
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #374151;
    transition: all 0.12s ease;
}

.hostabl-team-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.hostabl-team-btn.danger:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.hostabl-team-btn.inactive { opacity: 0.5; }

.hostabl-team-add-form {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.hostabl-team-add-form.open { display: flex; }

.hostabl-team-add-form h3 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--hostabl-ink);
    margin: 0 0 4px;
}

.hostabl-team-add-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hostabl-team-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    display: block;
    margin-bottom: 4px;
}

.hostabl-team-field input,
.hostabl-team-field select {
    width: 100%;
    min-height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 11px;
    font-size: 0.87rem;
    background: #fff;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.hostabl-team-field input:focus,
.hostabl-team-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}

.hostabl-team-add-actions { display: flex; gap: 8px; justify-content: flex-end; }

.hostabl-team-error {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    display: none;
}

.hostabl-team-empty {
    text-align: center;
    padding: 32px;
    color: var(--hostabl-muted);
    font-size: 0.9rem;
}

body.hostabl-dark .hostabl-team-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
}

body.hostabl-dark .hostabl-team-name { color: #e2e8f0; }
body.hostabl-dark .hostabl-team-header h2 { color: #e2e8f0; }

body.hostabl-dark .hostabl-team-add-form {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.10);
}

body.hostabl-dark .hostabl-team-field input,
body.hostabl-dark .hostabl-team-field select {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #d1dae8;
}

body.hostabl-dark .hostabl-team-btn {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #c8d4e8;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
    @page { margin: 14mm; }

    body.hostabl-printing {
        background: #fff !important;
        color: #111827 !important;
    }

    body.hostabl-printing .sidebar,
    body.hostabl-printing .dashboard-header,
    body.hostabl-printing .modal-overlay,
    body.hostabl-printing .timeline-container,
    body.hostabl-printing .canvas-container,
    body.hostabl-printing .hostabl-print-button,
    body.hostabl-printing .btn-icon-action {
        display: none !important;
    }

    body.hostabl-printing .dashboard-layout,
    body.hostabl-printing .content {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    body.hostabl-printing .hostabl-print-title {
        display: block !important;
        margin: 0 0 14px;
        padding-bottom: 10px;
        border-bottom: 2px solid #111827;
    }

    body.hostabl-printing .hostabl-print-title h1 {
        margin: 0 0 4px;
        font-size: 22px;
    }

    body.hostabl-printing .hostabl-print-title p {
        margin: 0;
        color: #475569;
        font-size: 12px;
    }

    body.hostabl-printing .bookings-table {
        display: block !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        max-height: none !important;
    }

    body.hostabl-printing .bookings-table table {
        min-width: 0 !important;
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 11px;
    }

    body.hostabl-printing .bookings-table th,
    body.hostabl-printing .bookings-table td {
        padding: 7px 6px !important;
        border-bottom: 1px solid #d1d5db !important;
        color: #111827 !important;
    }

    body.hostabl-printing .bookings-table th:nth-last-child(-n + 2),
    body.hostabl-printing .bookings-table td:nth-last-child(-n + 2) {
        display: none !important;
    }

    body.hostabl-printing .status-badge {
        border: 0 !important;
        background: transparent !important;
        color: #111827 !important;
        padding: 0 !important;
        font-weight: 700;
    }
}

/* ================================================================
   REVUE.DAY SIGNATURE DESIGN LAYER
   ================================================================ */

:root {
    --revue-ink: #20221f;
    --revue-graphite: #343733;
    --revue-muted: #73786f;
    --revue-line: #dedbd1;
    --revue-paper: #fbfaf5;
    --revue-canvas: #f2f0e9;
    --revue-panel: rgba(255, 255, 250, 0.88);
    --revue-accent: #2563eb;
    --revue-accent-dark: #1d4ed8;
    --revue-green: #0f8a5f;
    --revue-shadow: 0 18px 60px rgba(32, 34, 31, 0.10);
    --revue-shadow-soft: 0 8px 26px rgba(32, 34, 31, 0.08);
    --hostabl-ink: var(--revue-ink);
    --hostabl-muted: var(--revue-muted);
    --hostabl-line: var(--revue-line);
    --hostabl-soft: #f6f4ee;
    --hostabl-primary: var(--revue-accent);
    --hostabl-primary-dark: var(--revue-accent-dark);
}

body {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0) 260px),
        var(--revue-canvas) !important;
    color: var(--revue-ink);
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: geometricPrecision;
}

.dashboard-layout {
    background:
        linear-gradient(180deg, #f8f6ef 0%, #efede5 100%) !important;
}

.content {
    background:
        linear-gradient(180deg, rgba(255,255,250,0.88) 0%, rgba(255,255,255,0) 280px),
        var(--revue-canvas) !important;
}

.content > div {
    max-width: 1500px;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)),
        linear-gradient(160deg, #252824 0%, #171916 58%, #10120f 100%) !important;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 8px 0 36px rgba(21, 23, 20, 0.34);
}

.sidebar ul {
    gap: 6px;
}

.sidebar li {
    margin: 0 !important;
}

/* (old favicon.svg brand block removed — brand is now handled by the main block above) */

.sidebar .user-info,
.hostabl-dark-toggle,
.btn-logout {
    border-color: rgba(255,255,255,0.10) !important;
    background: rgba(255,255,255,0.055) !important;
    color: rgba(245,245,238,0.74) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebar a {
    min-height: 44px;
    border-radius: 10px;
    color: rgba(245,245,238,0.58);
    border: 1px solid transparent;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.075);
    color: #fff;
    transform: translateX(2px);
}

.sidebar a.active {
    background: #f7f5ee !important;
    border-color: rgba(255,255,255,0.18) !important;
    color: #20221f !important;
    box-shadow: 0 12px 26px rgba(0,0,0,0.24);
}

.sidebar a.active::before {
    display: none;
}

.hostabl-nav-icon {
    opacity: 0.86;
}

.sidebar-toggle {
    border-color: rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.08) !important;
    color: rgba(245,245,238,0.88) !important;
}

.sidebar-toggle:hover,
.btn-logout:hover,
.hostabl-dark-toggle:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

.dashboard-header,
.reports-header,
.settings-section,
.chart-card,
.accordion-item,
.timeline-container,
.bookings-table,
.stat-item,
.stat-card,
.customer-management .settings-section {
    border-color: rgba(91, 94, 86, 0.16) !important;
    background: var(--revue-panel) !important;
    box-shadow: var(--revue-shadow-soft) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dashboard-header {
    top: 16px !important;
    border-radius: 14px !important;
    padding: 12px !important;
    gap: 12px !important;
}

.date-nav,
.dashboard-header .actions .view-toggle {
    background: rgba(255,255,255,0.62) !important;
    border-color: rgba(91, 94, 86, 0.16) !important;
    border-radius: 12px;
}

.dashboard-header .date-input-wrapper,
.date-input-wrapper {
    background: rgba(255,255,255,0.78) !important;
    border-color: rgba(91, 94, 86, 0.16) !important;
    border-radius: 10px;
}

.date-input {
    font-weight: 760;
    letter-spacing: 0;
}


.dashboard-header .actions .view-toggle button.active {
    background: var(--revue-graphite) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(32,34,31,0.18);
}

.btn-primary,
.dashboard-header .actions .view-toggle .btn-primary,
.hostabl-time-btn.selected,
.hostabl-party-btn.selected,
.hostabl-date-shortcut.active,
.hostabl-time-manual-apply {
    background: var(--revue-accent) !important;
    color: #fff !important;
    border-color: var(--revue-accent) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25) !important;
}

.btn-primary:hover,
.dashboard-header .actions .view-toggle .btn-primary:hover {
    background: var(--revue-accent-dark) !important;
}

.btn-secondary,
.btn-small:not(.btn-primary),
.btn-icon,
.hostabl-time-btn,
.hostabl-party-btn,
.hostabl-date-shortcut,
.hostabl-occasion-label,
.modal-content input,
.modal-content textarea,
.modal-content select,
input,
textarea,
select {
    border-color: rgba(91, 94, 86, 0.18) !important;
    background: rgba(255,255,255,0.72) !important;
    color: var(--revue-ink) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.56);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

button,
.btn-primary,
.btn-secondary,
.btn-icon,
.hostabl-time-btn,
.hostabl-party-btn,
.hostabl-date-shortcut,
.hostabl-occasion-label {
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22) !important;
    outline-offset: 2px;
}

.btn-secondary:hover,
.btn-icon:hover,
.hostabl-time-btn:hover,
.hostabl-party-btn:hover,
.hostabl-date-shortcut:hover,
.hostabl-occasion-label:hover {
    background: #fff !important;
    border-color: rgba(37,99,235,0.32) !important;
    color: var(--revue-accent) !important;
}

.stat-item,
.stat-card {
    border-radius: 12px;
    padding: 13px 15px;
    overflow: hidden;
}

.stat-item::before,
.stat-card::before {
    width: 4px;
    height: 32px;
    background: linear-gradient(180deg, var(--revue-accent), var(--revue-green));
}

.stat-label,
.bookings-table th {
    color: #7a7e75;
    letter-spacing: 0.075em;
}

.stat-value {
    color: var(--revue-ink);
}

.bookings-table {
    border-radius: 14px !important;
    overflow: hidden;
}

.bookings-table th {
    background: rgba(246,244,238,0.95) !important;
}

/* bookings-table td: rely on base horizontal rule only — no side borders, no zebra */

.bookings-table tbody tr:hover td {
    background: rgba(37,99,235,0.045);
}

.no-data,
.loading-state {
    border: 1px solid rgba(91,94,86,0.14);
    border-radius: 14px;
    background: rgba(255,255,250,0.72);
    color: var(--revue-muted);
    box-shadow: var(--revue-shadow-soft);
}

.status-badge {
    border-radius: 999px;
    font-weight: 850;
}

.status-confirmed {
    background: #e8f0ff;
    color: #1d4ed8;
    border-color: #c9d9ff;
}

.status-seated {
    background: #e5f8ef;
    color: #0f8a5f;
    border-color: #bfead4;
}

.status-cancelled {
    background: #fff0ef;
    color: #b42318;
    border-color: #ffd0cc;
}

.auth-container {
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,250,0.92) 0 18%, rgba(255,255,255,0) 42%),
        linear-gradient(135deg, rgba(247,245,238,0.95) 0%, rgba(232,228,216,0.94) 100%) !important;
    padding: 32px;
}

.auth-container::before {
    content: "";
    position: fixed;
    inset: 18px;
    border: 1px solid rgba(91,94,86,0.14);
    border-radius: 22px;
    pointer-events: none;
}

.auth-card {
    width: min(100%, 480px) !important;
    border: 1px solid rgba(91,94,86,0.16) !important;
    border-radius: 18px !important;
    padding: 34px !important;
    background: rgba(255,255,250,0.92) !important;
    box-shadow: 0 34px 90px rgba(32,34,31,0.20) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.74);
}

.auth-card::before {
    content: "";
    display: block;
    width: 100%;
    height: 132px;
    margin: 0 0 20px;
    padding: 0;
    border: 1px solid rgba(91,94,86,0.14);
    border-radius: 14px;
    background:
        #ffffff url('./revueday-logo.png') center / min(76%, 300px) auto no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.auth-card h2 {
    margin-bottom: 20px !important;
    color: var(--revue-ink) !important;
    font-size: 1.75rem;
    font-weight: 850;
}

.auth-card input {
    min-height: 50px;
}

.auth-card .btn-primary {
    min-height: 52px;
    border-radius: 12px !important;
    font-weight: 850;
}

.modal-overlay {
    background: rgba(32,34,31,0.54) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-content {
    border: 1px solid rgba(91,94,86,0.16) !important;
    border-radius: 18px !important;
    background: rgba(255,255,250,0.94) !important;
    box-shadow: 0 34px 100px rgba(32,34,31,0.28) !important;
    overflow: hidden;
}

.modal-content .modal-header,
.modal-content > div:first-child {
    background: rgba(255,255,250,0.94) !important;
    border-color: rgba(91,94,86,0.15) !important;
}

.modal-content .modal-header h3 {
    color: var(--revue-ink) !important;
}

.modal-content form {
    scrollbar-width: thin;
    scrollbar-color: rgba(91,94,86,0.28) transparent;
}

.modal-actions {
    background: rgba(255,255,250,0.96) !important;
    border-color: rgba(91,94,86,0.14) !important;
}

.hostabl-cal-popup {
    border-color: rgba(91,94,86,0.14);
    background: rgba(255,255,250,0.98);
    box-shadow: 0 30px 90px rgba(32,34,31,0.18);
}

.hcal-header strong,
.hcal-cell {
    color: var(--revue-ink);
}

.hcal-nav {
    background: #f6f4ee;
    border-color: rgba(91,94,86,0.16);
}

.hcal-selected {
    background: var(--revue-accent) !important;
}

.hcal-today {
    background: #e8f0ff;
    color: var(--revue-accent);
}

.hostabl-widget-styles,
.widget-generator .settings-section {
    border-radius: 14px !important;
}

.hostabl-widget-preview-frame {
    border-radius: 12px;
}

.hostabl-widget-shell,
.hostabl-booking-widget,
.hostabl-widget-card {
    border-color: rgba(91,94,86,0.15) !important;
    box-shadow: var(--revue-shadow-soft) !important;
}

body.hostabl-dark {
    --revue-ink: #f2f4ed;
    --revue-muted: #a4ab9e;
    --revue-line: rgba(255,255,255,0.12);
    --revue-panel: rgba(28,31,27,0.84);
    --revue-canvas: #11130f;
    background: #11130f !important;
}

body.hostabl-dark .dashboard-layout,
body.hostabl-dark .content {
    background: #11130f !important;
}

body.hostabl-dark .dashboard-header,
body.hostabl-dark .reports-header,
body.hostabl-dark .settings-section,
body.hostabl-dark .chart-card,
body.hostabl-dark .accordion-item,
body.hostabl-dark .timeline-container,
body.hostabl-dark .bookings-table,
body.hostabl-dark .stat-item,
body.hostabl-dark .stat-card,
body.hostabl-dark .modal-content {
    background: rgba(28,31,27,0.88) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

body.hostabl-dark .bookings-table th {
    background: rgba(18,20,17,0.96) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

body.hostabl-dark .auth-container {
    background: linear-gradient(135deg, #171916 0%, #252824 100%) !important;
}

body.hostabl-dark .auth-card,
body.hostabl-dark .auth-card::before {
    background-color: #f7f5ee !important;
}

@media (max-width: 768px) {
    .auth-container::before {
        inset: 10px;
        border-radius: 18px;
    }

    .auth-card {
        width: min(100% - 24px, 440px) !important;
        padding: 24px !important;
        border-radius: 16px !important;
    }

    .auth-card::before {
        height: 108px;
        background-size: min(82%, 270px) auto;
    }

    .sidebar .brand {
        min-height: 74px;
        background-size: 78% auto !important;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px !important;
    }

    .auth-card::before {
        height: 96px;
        margin-bottom: 16px;
        background-size: 88% auto;
    }
}

/* ================================================================
   CUSTOMER LIST — collapsible name-only rows
   ================================================================ */

.customer-management .table-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    border: 1px solid rgba(91,94,86,0.14);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,250,0.94);
    grid-template-columns: unset !important;
}

/* Reset the generic table-item card style for customer list */
.customer-management .table-item {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(91,94,86,0.09) !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 140ms ease;
    gap: 0 !important;
    grid-template-columns: unset !important;
}

.customer-management .table-item:last-child {
    border-bottom: none !important;
}

.customer-management .table-item:hover {
    background: rgba(37,99,235,0.04) !important;
    border-color: rgba(91,94,86,0.09) !important;
    box-shadow: none !important;
}

/* First child of table-item = the info row (name + phone + visits) */
.customer-management .table-item > div:first-child {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 16px;
    gap: 0;
}

/* Name — always visible */
.customer-management .table-item > div:first-child > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.91rem;
    font-weight: 700;
    color: var(--revue-ink, #20221f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Phone + visits — hidden by default */
.customer-management .table-item > div:first-child > div:not(:first-child) {
    display: none !important;
}

/* Action buttons (View / Edit) — hidden by default */
.customer-management .table-item > div:last-child:not(:first-child) {
    display: none !important;
}

/* Expand chevron */
.customer-management .table-item::after {
    content: "›";
    font-size: 1.05rem;
    line-height: 1;
    color: var(--revue-muted, #73786f);
    padding: 0 16px;
    flex-shrink: 0;
    transition: transform 150ms ease;
    font-weight: 400;
}

.customer-management .table-item.hostabl-ci-expanded::after {
    transform: rotate(90deg);
    color: var(--revue-accent, #2563eb);
}

/* Expand detail panel inserted by JS */
.hostabl-customer-details {
    display: none;
    background: rgba(246,244,238,0.55);
    border-bottom: 1px solid rgba(91,94,86,0.09);
    padding: 10px 16px 12px;
}

.hostabl-customer-details.open {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: start;
}

.hostabl-cd-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hostabl-cd-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--revue-muted, #73786f);
}

.hostabl-cd-value {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--revue-ink, #20221f);
}

.hostabl-cd-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    grid-column: 1 / -1;
    padding-top: 4px;
}

body.hostabl-dark .hostabl-customer-details {
    background: rgba(28,31,27,0.5);
    border-bottom-color: rgba(255,255,255,0.07);
}

body.hostabl-dark .customer-management .table-item {
    border-bottom-color: rgba(255,255,255,0.07) !important;
}

/* ================================================================
   SPACING FIXES — prevent touching / overlapping elements
   ================================================================ */

/* Gap between page header and first card */
.customer-management .page-header {
    margin-bottom: 16px;
}

/* Ensure search bar has breathing room */
.customer-management .settings-section > div:first-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Consistent gap within settings sections */
.settings-section > * + * {
    margin-top: 0;
}

/* Ensure btn-small buttons don't overlap */
.btn-small + .btn-small {
    margin-left: 4px;
}

/* Reports header — gap below */
.reports-header {
    margin-bottom: 12px;
}

/* Settings accordion items — space them */
.accordion-item + .accordion-item {
    margin-top: 8px;
}

/* Bookings toolbar actions — gap */
.dashboard-header .actions {
    gap: 8px;
}

/* ================================================================
   DESIGN REFINEMENT PASS — typography, depth & detail
   Cascades over both earlier layers; keep this block last.
   ================================================================ */

:root {
    --revue-accent: #2156cf;
    --revue-accent-dark: #1a46ad;
    --revue-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --revue-sans: 'Manrope', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body,
button,
input,
select,
textarea {
    font-family: var(--revue-sans);
}

::selection {
    background: rgba(33, 86, 207, 0.16);
}

/* ── Editorial display type ── */

.content h2,
.auth-card h2,
.modal-content .modal-header h3 {
    font-family: var(--revue-serif) !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
}

.page-header h2 {
    font-size: 1.6rem !important;
    line-height: 1.15;
}

.page-header h2::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin-top: 9px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--revue-accent), var(--revue-green));
}

.page-header .subtitle,
.page-header p {
    color: var(--revue-muted);
    font-weight: 550;
}

.sidebar .brand {
    font-family: var(--revue-serif);
    font-weight: 600;
    letter-spacing: 0;
}

.stat-value {
    font-family: var(--revue-serif);
    font-weight: 600;
    font-size: 1.42rem;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.chart-card h3 {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--revue-muted);
}

/* ── Numerals align in columns ── */

.bookings-table td,
.date-input,
.hostabl-time-btn {
    font-variant-numeric: tabular-nums;
}

/* ── Buttons: tactile, consistent ── */

.btn-primary {
    border-radius: 10px !important;
    background: linear-gradient(180deg, #2e63db 0%, var(--revue-accent) 100%) !important;
    border-color: var(--revue-accent-dark) !important;
    box-shadow: 0 8px 20px rgba(33, 86, 207, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2a5cd2 0%, var(--revue-accent-dark) 100%) !important;
}

.btn-primary:active,
.btn-secondary:active,
.btn-small:active,
.btn-icon:active,
.hostabl-time-btn:active,
.hostabl-party-btn:active,
.hostabl-date-shortcut:active {
    transform: translateY(1px);
}

/* ── Stat cards: gentle lift on hover ── */

.stat-item,
.stat-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.stat-item:hover,
.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(32, 34, 31, 0.12) !important;
}

/* ── Status badges: dot indicator, calmer weight ── */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

/* ── Tables: refined hover, stronger lead column ── */

.bookings-table td:first-child {
    font-weight: 750;
}

.bookings-table tbody tr:hover td {
    background: rgba(33, 86, 207, 0.05);
}

/* ── Softer modal depth ── */

.modal-content {
    box-shadow: 0 24px 70px rgba(32, 34, 31, 0.22) !important;
}

/* ── Inputs: hover affordance ── */

.modal-content input:hover:not(:focus),
.modal-content select:hover:not(:focus),
.modal-content textarea:hover:not(:focus) {
    border-color: rgba(91, 94, 86, 0.34) !important;
}

/* ── Empty states ── */

.no-data,
.loading-state {
    border-style: dashed;
    padding: 40px 24px;
    text-align: center;
    font-weight: 650;
    background: transparent !important;
    box-shadow: none !important;
}

/* ── Sidebar text rhythm ── */

.sidebar a {
    font-weight: 650;
    letter-spacing: 0.005em;
}

.sidebar .user-info {
    border-radius: 12px !important;
    letter-spacing: 0.01em;
}

/* ── Thin, unobtrusive scrollbars ── */

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 94, 86, 0.30) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(91, 94, 86, 0.26);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(91, 94, 86, 0.42);
}

/* ── Dark mode parity ── */

body.hostabl-dark ::selection {
    background: rgba(96, 165, 250, 0.30);
}

body.hostabl-dark {
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

body.hostabl-dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    background-clip: content-box;
}

body.hostabl-dark .page-header h2,
body.hostabl-dark .content h2 {
    color: #f2f4ed;
}

/* ── Toolbar groups: no borders, just quiet surfaces ── */

.date-nav,
.dashboard-header .actions .view-toggle {
    border: none !important;
}

/* ── Occasion flags: plain inline checkboxes (revue layer un-styling) ── */

.hostabl-occasion-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
}

.hostabl-occasion-label:hover {
    background: transparent !important;
    border: none !important;
}

/* ── Party-size pencil button ── */

.hostabl-party-edit svg {
    display: block;
}

.hostabl-party-edit.selected {
    background: var(--revue-accent) !important;
    border-color: var(--revue-accent) !important;
    color: #fff !important;
}

/* ================================================================
   DARK MODE CONTRAST REPAIR
   The revue layer paints pill controls with light backgrounds
   (!important), which turns them unreadable in dark mode. These
   rules come last, so they win.
   ================================================================ */

body.hostabl-dark .btn-secondary,
body.hostabl-dark .btn-small:not(.btn-primary),
body.hostabl-dark .btn-icon,
body.hostabl-dark .hostabl-time-btn,
body.hostabl-dark .hostabl-party-btn,
body.hostabl-dark .hostabl-date-shortcut {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #d7dce6 !important;
    box-shadow: none !important;
}

body.hostabl-dark .btn-secondary:hover,
body.hostabl-dark .btn-small:not(.btn-primary):hover,
body.hostabl-dark .btn-icon:hover,
body.hostabl-dark .hostabl-time-btn:hover,
body.hostabl-dark .hostabl-party-btn:hover,
body.hostabl-dark .hostabl-date-shortcut:hover {
    background: rgba(37, 99, 235, 0.20) !important;
    border-color: rgba(96, 165, 250, 0.55) !important;
    color: #cfe0ff !important;
}

body.hostabl-dark .hostabl-time-btn.selected,
body.hostabl-dark .hostabl-party-btn.selected,
body.hostabl-dark .hostabl-party-edit.selected,
body.hostabl-dark .hostabl-date-shortcut.active {
    background: var(--revue-accent) !important;
    border-color: var(--revue-accent) !important;
    color: #fff !important;
}

body.hostabl-dark .hostabl-occasion-label {
    background: transparent !important;
    color: #c8d4e8 !important;
}

body.hostabl-dark .hostabl-time-manual-trigger {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #d7dce6 !important;
    box-shadow: none !important;
}

body.hostabl-dark .hostabl-time-manual-panel {
    background: #16202f;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

body.hostabl-dark .hostabl-time-manual-panel label {
    color: #94aabf !important;
}

body.hostabl-dark .hostabl-time-manual-hint {
    color: #7a96b4;
}

body.hostabl-dark .hostabl-time-empty {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
    color: #94aabf;
}

body.hostabl-dark .hostabl-modal-date-wrap {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

body.hostabl-dark .hostabl-modal-date-wrap .date-input-icon {
    background: rgba(255, 255, 255, 0.10);
}

body.hostabl-dark .hostabl-modal-date-wrap .date-input-icon::before {
    border-color: #b9c6d8;
}

/* ── Dark mode: customer list (was cream surface with light text) ── */

body.hostabl-dark .customer-management .table-list {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

body.hostabl-dark .customer-management .table-item {
    background: transparent !important;
}

body.hostabl-dark .customer-management .table-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.hostabl-dark .customer-management .table-item > div:first-child > div:first-child {
    color: #e9ecf2;
}

body.hostabl-dark .customer-management .table-item::after {
    color: #7a8294;
}

body.hostabl-dark .hostabl-customer-details {
    background: rgba(255, 255, 255, 0.03);
}

body.hostabl-dark .hostabl-cd-label {
    color: #7a96b4;
}

body.hostabl-dark .hostabl-cd-value {
    color: #e9ecf2;
}

/* ── Dark mode: neutralize the modal's leftover blue-navy surfaces ── */

body.hostabl-dark .modal-content {
    background: #191b18 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

body.hostabl-dark .modal-content .modal-header,
body.hostabl-dark .modal-content > div:first-child {
    background: rgba(22, 24, 21, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.hostabl-dark .modal-actions {
    background: rgba(22, 24, 21, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* The title itself carries no surface — kills the navy block behind "New Booking" */
body.hostabl-dark .modal-content .modal-header h3,
body.hostabl-dark .modal-content > div:first-child > h3 {
    background: transparent !important;
}

/* No panel behind the date field + shortcuts — controls sit directly on the modal */
body.hostabl-dark .date-picker-container,
body.hostabl-dark .hostabl-date-picker-container {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ── Dark mode: custom calendar popup ── */

body.hostabl-dark .hostabl-cal-popup {
    background: #16202f;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

body.hostabl-dark .hcal-header strong,
body.hostabl-dark .hcal-cell {
    color: #e2e8f0;
}

body.hostabl-dark .hcal-nav {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: #d7dce6;
}

body.hostabl-dark .hcal-today {
    background: rgba(37, 99, 235, 0.22);
    color: #93c5fd;
}
