/* ============================================
   NILSSON BOOKING — COMPLETELY NEW LAYOUT
   Modern topnav + split-screen + grid widgets
   ============================================ */

:root {
    /* Färgschema — jordnära, modern */
    --surface: #fafaf9;
    --surface-raised: #ffffff;
    --surface-sunken: #f5f5f4;
    --ink: #1c1917;
    --ink-secondary: #57534e;
    --ink-muted: #a8a29e;
    --ink-faint: #d6d3d1;
    --border: #e7e5e4;
    --border-subtle: #f5f5f4;

    /* Accent — djup tegel */
    --accent: #c2410c;
    --accent-light: #ea580c;
    --accent-dim: rgba(194,65,12,0.08);
    --accent-dim-strong: rgba(194,65,12,0.15);

    /* Statusfärger — mjukare */
    --green: #16a34a;
    --green-bg: #dcfce7;
    --green-border: #86efac;
    --red: #dc2626;
    --red-bg: #fee2e2;
    --red-border: #fecaca;

    /* KOMPATIBILITET — gamla variabler som alias till nya */
    --bg-primary: var(--surface-raised);
    --bg-secondary: var(--surface);
    --bg-tertiary: var(--surface-sunken);
    --bg-warm: var(--surface);
    --border-color: var(--border);
    --border-hover: var(--ink-faint);
    --border-subtle: var(--surface-sunken);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-secondary);
    --text-muted: var(--ink-muted);
    --text-faint: var(--ink-faint);
    --success: var(--green);
    --success-bg: var(--green-bg);
    --success-border: var(--green-border);
    --danger: var(--red);
    --danger-bg: var(--red-bg);
    --danger-border: var(--red-border);
    --warning: var(--amber);
    --warning-bg: var(--amber-bg);
    --warning-border: var(--amber-border);
    --info: var(--blue);
    --info-bg: var(--blue-bg);
    --info-border: var(--blue-border);
    --primary: var(--ink);
    --primary-light: var(--ink-secondary);
    --primary-hover: var(--ink);
    --blue: #2563eb;
    --blue-bg: #dbeafe;
    --blue-border: #93c5fd;
    --amber: #d97706;
    --amber-bg: #fef3c7;
    --amber-border: #fde68a;

    /* Topbar */
    --topbar-height: 56px;
    --topbar-bg: #ffffff;
    --topbar-border: #e7e5e4;

    /* Mått */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 999px;

    /* Skuggor — ultra-soft */
    --shadow-xs: 0 1px 2px rgba(28,25,23,0.03);
    --shadow-sm: 0 1px 3px rgba(28,25,23,0.04), 0 1px 2px rgba(28,25,23,0.02);
    --shadow: 0 4px 12px rgba(28,25,23,0.05), 0 2px 4px rgba(28,25,23,0.03);
    --shadow-lg: 0 12px 32px rgba(28,25,23,0.06), 0 4px 8px rgba(28,25,23,0.03);

    /* Övergångar */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--surface);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
}

/* ============================================
   TOPBAR — Horizontal Navigation
   ============================================ */

.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 8px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    margin-right: 16px;
    white-space: nowrap;
}

.topbar-brand:hover { color: var(--accent); }

.brand-icon {
    width: 32px; height: 32px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem;
}

/* Topbar nav links */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.topbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    transition: all 0.15s var(--ease);
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.topbar-link:hover {
    color: var(--ink-secondary);
    background: var(--surface-sunken);
}

.topbar-link.active {
    color: var(--accent);
    background: var(--accent-dim);
    font-weight: 600;
}

.topbar-link svg { opacity: 0.6; }
.topbar-link.active svg { opacity: 1; stroke: var(--accent); }

/* Topbar right section */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-secondary);
    text-decoration: none;
    transition: all 0.15s var(--ease);
}

.user-pill:hover { background: var(--border-subtle); }

.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
}

/* Dropdown in topbar */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    padding: 6px;
    animation: dropIn 0.15s var(--ease);
}
.dropdown.open .dropdown-menu { display: block; }
@keyframes dropIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--ink-secondary);
    text-decoration: none;
    transition: all 0.1s var(--ease);
}
.dropdown-item:hover { background: var(--surface-sunken); color: var(--ink); }
.dropdown-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px; }

/* Mobile menu */
.topbar-menu-btn {
    display: none;
    background: none; border: none;
    color: var(--ink-muted); cursor: pointer;
    padding: 8px; border-radius: var(--radius-sm);
}
.topbar-menu-btn:hover { background: var(--surface-sunken); color: var(--ink); }

/* ============================================
   MAIN LAYOUT — Under topbar
   ============================================ */

.main {
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

/* Page header */
.page-header {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.3;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-top: 4px;
}

/* ============================================
   WIDGET GRID (dashboard)
   ============================================ */

.widget-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.widget {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s var(--ease);
}

.widget:hover {
    box-shadow: var(--shadow);
    border-color: var(--ink-faint);
}

.widget-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.widget-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1;
}

.widget-value.warning { color: var(--amber); }

/* Two-column layout for dashboard */
.layout-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.layout-split .main-col { min-width: 0; }
.layout-split .side-col { min-width: 0; }

/* ============================================
   PANEL — Card-like container
   ============================================ */

.panel {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
}

.panel-body { padding: 0; }

/* ============================================
   BOOKING ROW — Timeline style
   ============================================ */

.booking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.12s var(--ease);
    position: relative;
}

.booking-item:last-child { border-bottom: none; }
.booking-item:hover { background: var(--surface-sunken); }

.booking-indicator {
    width: 3px;
    align-self: stretch;
    border-radius: var(--radius-full);
    background: var(--border);
    flex-shrink: 0;
}
.booking-indicator.confirmed { background: var(--green); }
.booking-indicator.seated { background: var(--blue); }
.booking-indicator.completed { background: var(--ink-faint); }
.booking-indicator.cancelled { background: var(--red); }

.booking-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    min-width: 48px;
    text-align: right;
    flex-shrink: 0;
}

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

.booking-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-meta {
    font-size: 0.78rem;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.booking-status {
    flex-shrink: 0;
}

/* ============================================
   STATUS PILL — Small
   ============================================ */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.pill::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.pill-confirmed { background: var(--green-bg); color: #15803d; border-color: var(--green-border); }
.pill-seated { background: var(--blue-bg); color: #1d4ed8; border-color: var(--blue-border); }
.pill-completed { background: var(--surface-sunken); color: var(--ink-muted); border-color: var(--border); }
.pill-cancelled { background: var(--red-bg); color: #b91c1c; border-color: var(--red-border); }
.pill-no_show { background: var(--amber-bg); color: #92400e; border-color: var(--amber-border); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s var(--ease);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    color: inherit;
}

.btn-filled {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.btn-filled:hover { background: #292524; border-color: #292524; }

.btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-accent:hover { background: #b45309; border-color: #b45309; }

.btn-subtle {
    background: var(--surface-sunken);
    color: var(--ink-secondary);
    border-color: var(--border);
}
.btn-subtle:hover { background: var(--border-subtle); border-color: var(--ink-faint); }

.btn-ghost {
    color: var(--ink-muted);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-sunken); color: var(--ink); }

.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Kompatibilitet — gamla knappklasser */
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #292524; border-color: #292524; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { background: #15803d; border-color: #15803d; }

/* ============================================
   FORMS
   ============================================ */

.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-label .req { color: var(--red); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-raised);
    transition: all 0.15s var(--ease);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder { color: var(--ink-faint); }

.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--ink-faint); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a8a29e' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    cursor: pointer;
}

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

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

.form-hint {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 4px;
}

/* ============================================
   TIME SLOTS — Horizontal chips
   ============================================ */

.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.time-slot {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-secondary);
    background: var(--surface-raised);
    transition: all 0.12s var(--ease);
    user-select: none;
}

.time-slot:hover:not(.disabled):not(.selected) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.time-slot.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(217,119,6,0.25);
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-sunken);
    color: var(--ink-faint);
    border-color: var(--border-subtle);
    text-decoration: none;
}

.time-slot-placeholder {
    width: 100%;
    padding: 24px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.85rem;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-sunken);
}

/* ============================================
   ALERT
   ============================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert svg { flex-shrink: 0; }

.alert-success { background: var(--green-bg); color: #15803d; border-color: var(--green-border); }
.alert-error { background: var(--red-bg); color: #b91c1c; border-color: var(--red-border); }
.alert-warning { background: var(--amber-bg); color: #92400e; border-color: var(--amber-border); }
.alert-info { background: var(--blue-bg); color: #1e40af; border-color: var(--blue-border); }

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,0.4);
    backdrop-filter: blur(6px);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: modalUp 0.25s var(--ease);
}
@keyframes modalUp { from { opacity:0; transform: translateY(12px) scale(0.98); } to { opacity:1; transform: translateY(0) scale(1); } }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
    background: none; border: none;
    font-size: 1.4rem; color: var(--ink-muted);
    cursor: pointer; padding: 4px; line-height: 1;
    border-radius: var(--radius-sm);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--surface-sunken); color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px 24px; display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================
   TABLES
   ============================================ */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    background: var(--surface-sunken);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--ink-secondary);
}
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--surface-sunken); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================
   SPLIT-SCREEN (guest booking)
   ============================================ */

.split-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: 100vh;
}

.split-left {
    background: linear-gradient(160deg, #1c1917 0%, #292524 50%, #44403c 100%);
    color: #fff;
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.split-left::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(217,119,6,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.split-left-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.split-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    margin-bottom: 40px;
}

.split-brand-icon {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; color: #fff;
}

.split-restaurant-logo {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    background: #fff;
}

.split-restaurant-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.split-restaurant-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 20px;
}

.split-restaurant-address {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.split-policies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.split-policy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

.split-policy strong { color: #fff; font-weight: 600; }

.split-info-box {
    margin-top: auto;
    padding: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.split-info-box svg { flex-shrink: 0; color: var(--accent-light); }
.split-info-box strong { color: #fff; }

.split-right {
    background: var(--surface);
    padding: 48px 40px;
    overflow-y: auto;
}

.split-right-inner {
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   ADMIN COMPATIBILITY — Missing classes from old CSS
   ============================================ */

/* Card (used on admin pages) */
.card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ink);
}

/* Form check (checkbox) */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}
.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.form-check-label {
    font-size: 0.88rem;
    color: var(--ink-secondary);
    cursor: pointer;
}

/* Status badge (admin tables) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.status-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.status-confirmed { background: var(--green-bg); color: #15803d; }
.status-seated { background: var(--blue-bg); color: #1d4ed8; }
.status-completed { background: var(--surface-sunken); color: var(--ink-muted); }
.status-cancelled { background: var(--red-bg); color: #b91c1c; }
.status-no_show { background: var(--amber-bg); color: #92400e; }
.status-pending { background: var(--amber-bg); color: #92400e; }

/* Stat card (admin dashboard) */
.stat-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s var(--ease);
}
.stat-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--ink-faint);
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon.primary { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--blue); }
.stat-icon.warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: var(--amber); }
.stat-icon.success { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: var(--green); }
.stat-icon.info { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--blue); }
.stat-icon.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #a855f7; }

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 440px;
}

.auth-visual {
    background: linear-gradient(135deg, #1c1917 0%, #292524 60%, #44403c 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    top: -30%; right: -30%;
    width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(217,119,6,0.1) 0%, transparent 60%);
}

.auth-visual-content { position: relative; z-index: 1; }
.auth-visual h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.auth-visual p { color: rgba(255,255,255,0.55); font-size: 0.95rem; line-height: 1.6; margin: 0; }

.auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    background: var(--surface);
}

.auth-card-inner {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 28px;
}
.auth-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink);
}
.auth-header p { color: var(--ink-muted); font-size: 0.88rem; margin: 0; }

/* ============================================
   CONFIRMATION PAGE
   ============================================ */

.confirm-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--surface);
}

.confirm-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeUp 0.4s var(--ease);
}
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirm-icon.success {
    background: var(--green-bg);
    color: var(--green);
    border: 2px solid var(--green-border);
}

.confirm-icon.error {
    background: var(--red-bg);
    color: var(--red);
    border: 2px solid var(--red-border);
}

.confirm-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink);
}

.confirm-subtitle {
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.confirm-code {
    display: inline-block;
    padding: 10px 24px;
    background: var(--surface-sunken);
    border: 1.5px dashed var(--accent);
    border-radius: var(--radius);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.confirm-details {
    background: var(--surface-sunken);
    border-radius: var(--radius);
    padding: 20px;
    text-align: left;
    margin-bottom: 24px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.88rem;
}
.confirm-row:last-child { border-bottom: none; }

.confirm-label { color: var(--ink-muted); font-weight: 500; }
.confirm-value { color: var(--ink); font-weight: 600; }

/* ============================================
   RESTAURANT LIST (guest)
   ============================================ */

.restaurant-layout {
    min-height: 100vh;
    background: var(--surface);
}

.restaurant-layout .topbar {
    position: relative;
    border-bottom: 1px solid var(--topbar-border);
}

.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.restaurant-tile {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    color: inherit;
    display: block;
}

.restaurant-tile:hover {
    box-shadow: var(--shadow);
    border-color: var(--ink-faint);
    transform: translateY(-2px);
}

.restaurant-tile-visual {
    height: 140px;
    background: linear-gradient(135deg, #292524 0%, #57534e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.restaurant-tile-visual img,
.restaurant-tile-visual .tile-logo-fallback {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    position: relative; z-index: 1;
}

.tile-logo-fallback {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
}

.restaurant-tile-body {
    padding: 18px;
}

.restaurant-tile-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.restaurant-tile-meta {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.restaurant-tile-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   UPCOMING ITEM (small, compact)
   ============================================ */

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.1s;
}
.upcoming-item:last-child { border-bottom: none; }
.upcoming-item:hover { background: var(--surface-sunken); }

.upcoming-date {
    text-align: center;
    min-width: 40px;
}
.upcoming-day {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.upcoming-month {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink-muted);
    letter-spacing: 0.05em;
}

.upcoming-info { flex: 1; min-width: 0; }
.upcoming-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upcoming-time {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 1px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--ink-muted);
}
.empty-state svg {
    margin: 0 auto 12px;
    display: block;
    color: var(--ink-faint);
}
.empty-state-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-secondary);
    margin-bottom: 4px;
}
.empty-state-text {
    font-size: 0.82rem;
    margin: 0;
}

/* ============================================
   TABS
   ============================================ */

.tab-bar {
    display: flex;
    gap: 0;
    background: var(--surface-sunken);
    padding: 4px;
    border-radius: var(--radius-sm);
    width: fit-content;
    margin-bottom: 24px;
}

.tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.12s var(--ease);
    border: none;
    background: none;
    font-family: inherit;
}
.tab:hover { color: var(--ink-secondary); }
.tab.active {
    background: var(--surface-raised);
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* ============================================
   SEARCH
   ============================================ */

.search-box {
    position: relative;
}
.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
}
.search-box input {
    padding-left: 38px;
    width: 260px;
}

/* ============================================
   INFO BOX
   ============================================ */

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--ink-secondary);
}
.info-box svg { flex-shrink: 0; color: var(--green); }
.info-box strong { color: var(--ink); }

/* ============================================
   FLASH MESSAGE
   ============================================ */

.flash {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeUp 0.3s var(--ease);
}
.flash-success { background: var(--green-bg); color: #15803d; border: 1px solid var(--green-border); }
.flash-error { background: var(--red-bg); color: #b91c1c; border: 1px solid var(--red-border); }

/* ============================================
   BOOKING ACTIONS DROPDOWN MENU
   ============================================ */

.booking-actions {
    position: relative;
    flex-shrink: 0;
}

.booking-actions-btn {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.12s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-actions-btn:hover {
    background: var(--surface-sunken);
    color: var(--ink);
}

.booking-actions-menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 6px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    z-index: 99999;
    min-width: 180px;
    animation: dropIn 0.15s var(--ease);
}

.booking-actions-menu.active {
    display: block;
}

.booking-actions-menu button,
.booking-actions-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--ink-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.1s var(--ease);
    text-align: left;
}

.booking-actions-menu button:hover,
.booking-actions-menu a:hover {
    background: var(--surface-sunken);
    color: var(--ink);
}

.booking-actions-menu .danger {
    color: var(--red);
    border-top: 1px solid var(--border-subtle);
}

.booking-actions-menu .danger:hover {
    background: var(--red-bg);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
@keyframes dropIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }

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

@media print {
    .topbar, .no-print { display: none !important; }
    .main { padding-top: 0 !important; }
    body { background: white; }
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 900px) {
    .widget-grid { grid-template-columns: repeat(2, 1fr); }
    .layout-split { grid-template-columns: 1fr; }
    .layout-split .side-col { display: none; }
    .split-layout { grid-template-columns: 1fr; }
    .split-left { display: none; }
    .split-right { padding: 24px 20px; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form-side { padding: 32px 24px; }
    .topbar-nav { display: none; position: absolute; top: var(--topbar-height); left: 0; right: 0; background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-border); padding: 8px; flex-direction: column; gap: 2px; }
    .topbar-nav.open { display: flex; }
    .topbar-menu-btn { display: block; }
    .topbar-link { width: 100%; }
}

@media (max-width: 640px) {
    .widget-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .widget { padding: 14px; }
    .widget-value { font-size: 1.4rem; }
    .content { padding: 16px 12px 32px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .page-header { flex-direction: column; }
    .search-box input { width: 100%; }
    .restaurants-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
}
