/* ============================================
   Hospitality Manager — Stylesheet
   Mobile-first, fully responsive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --slate-950: #0f172a;
    --slate-900: #1e293b;
    --slate-800: #1e3a5f;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --accent-glow: rgba(37, 99, 235, 0.1);

    --teal: #0d9488;
    --teal-light: #ccfbf1;

    --rose: #e11d48;
    --rose-light: #ffe4e6;

    --amber: #f59e0b;
    --amber-light: #fef3c7;

    --white: #ffffff;
    --body-bg: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.15);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.25;
    color: var(--slate-900);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ============================================
   Navigation — Mobile first
   ============================================ */
.main-nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
    white-space: nowrap;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.nav-brand svg { color: var(--accent); }

/* Hamburger toggle */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    color: var(--slate-600);
    width: 36px;
    height: 36px;
    cursor: pointer;
    margin-left: auto;
    transition: all var(--transition);
}

.nav-toggle:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.nav-toggle svg { pointer-events: none; }

.nav-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--slate-100);
    margin-top: 0.25rem;
}

.nav-collapse.open { display: flex; }

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-links a {
    color: var(--slate-500);
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: block;
}

.nav-links a:hover {
    color: var(--slate-900);
    background: var(--slate-100);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    flex-wrap: wrap;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-700);
}

.user-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
}

.btn-logout {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    margin-left: auto;
}

.btn-logout:hover {
    color: var(--rose);
    border-color: var(--rose);
    background: var(--rose-light);
}

/* ============================================
   Container
   ============================================ */
.container {
    flex: 1;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container.container-wide {
    max-width: 1400px;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-950);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13,148,136,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-page .container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.login-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.login-header h1 {
    font-size: 1.45rem;
    color: var(--slate-900);
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--slate-400);
    font-size: 0.875rem;
    font-weight: 400;
}

.login-body {
    padding: 0.25rem 1.5rem 2rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem; /* 16px prevents iOS zoom */
    color: var(--text-primary);
    background: var(--white);
    transition: all var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--slate-300);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-success {
    background: var(--teal);
    color: var(--white);
}

.btn-success:hover {
    background: #0f766e;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(13,148,136,0.25);
}

.btn-danger {
    background: var(--rose);
    color: var(--white);
}

.btn-danger:hover { background: #be123c; color: var(--white); }

.btn-add-room {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border: 2px dashed #60a5fa;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    margin-bottom: 1rem;
    width: 100%;
    justify-content: center;
    letter-spacing: 0.02em;
}

.btn-add-room:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(59,130,246,0.25);
}

.btn-add-room:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59,130,246,0.2);
}

.btn-add-room svg {
    flex-shrink: 0;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    padding: 2px;
    stroke: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--slate-200);
    color: var(--slate-600);
}

.btn-outline:hover {
    border-color: var(--slate-400);
    background: var(--slate-50);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

a.btn-sm {
    line-height: 1;
    box-sizing: border-box;
    height: auto;
}

a.btn, button.btn {
    line-height: 1.2;
}

/* Checkbox label for forms */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--slate-600);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Toggle switch for settings */
.toggle-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: fit-content;
}

.toggle-switch-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--slate-300);
    border-radius: 22px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--teal);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* Feature toggle cards */
.feature-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.feature-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: default;
}

.feature-toggle.feature-active {
    border-color: var(--teal);
    background: #f0fdfa;
}

.feature-toggle-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-sm);
    background: var(--slate-100);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-active .feature-toggle-icon {
    background: #ccfbf1;
    color: var(--teal);
}

.feature-toggle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.feature-toggle-info strong {
    font-size: 0.9rem;
    color: var(--slate-700);
}

.feature-toggle-info span {
    font-size: 0.72rem;
    color: var(--slate-400);
}

.feature-active .feature-toggle-info strong {
    color: var(--slate-800);
}

.feature-active .feature-toggle-info span {
    color: var(--teal);
}

.toggle-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate-400);
    min-width: 20px;
}

.toggle-switch input:checked ~ .toggle-status,
.toggle-switch-label:has(input:checked) .toggle-status {
    color: var(--teal);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-break: break-word;
}

.alert-error  { background: var(--rose-light); color: var(--rose); }
.alert-success { background: var(--teal-light); color: var(--teal); }
.alert-warning { background: var(--amber-light); color: #b45309; }

/* ============================================
   Page Header
   ============================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body { padding: 1.25rem; }

/* ============================================
   Dashboard Stats
   ============================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--teal));
    border-radius: 3px 3px 0 0;
}

.stat-card .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ============================================
   Data Table — Mobile card layout
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

/* Mobile: stack rows as cards */
.data-table thead {
    display: none;
}

.data-table tbody tr {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.875rem;
    border: none;
}

.data-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-400);
    flex-shrink: 0;
    margin-right: 1rem;
}

.data-table td.actions {
    justify-content: flex-end;
    padding-top: 0.6rem;
    margin-top: 0.3rem;
    border-top: 1px solid var(--slate-100);
}

.data-table td.actions::before {
    display: none;
}

.data-table .role-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    display: inline-block;
}

.role-badge.admin { background: var(--accent-light); color: var(--accent); }
.role-badge.manager { background: #fef3c7; color: #92400e; }
.role-badge.user  { background: var(--teal-light); color: var(--teal); }

.user-badge.admin {
    background: var(--accent-light);
    color: var(--accent);
}

.user-badge.manager {
    background: #fef3c7;
    color: #92400e;
}

.user-badge.user {
    background: var(--teal-light);
    color: var(--teal);
}
.status-active    { color: var(--teal); font-weight: 600; }
.status-inactive  { color: var(--rose); font-weight: 600; }

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

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-backdrop.active { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-overflow-scrolling: touch;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-header {
    padding: 1.25rem 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--slate-100);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.modal-close {
    background: none;
    border: none;
    color: var(--slate-400);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    border-radius: 6px;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
    color: var(--slate-700);
    background: var(--slate-100);
}

.modal-body { padding: 1.25rem; }

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--slate-100);
    display: flex;
    gap: 0.75rem;
    justify-content: stretch;
    background: var(--slate-50);
    position: sticky;
    bottom: 0;
}

.modal-footer .btn {
    flex: 1;
}

/* ============================================
   Premises Grid & Cards
   ============================================ */
.premises-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.premises-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.premises-card:hover {
    box-shadow: var(--shadow-md);
}

.premises-card.inactive {
    opacity: 0.6;
}

.premises-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem;
    gap: 0.75rem;
}

.premises-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.premises-type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.18rem 0.5rem;
    border-radius: 99px;
    display: inline-block;
}

.premises-type-badge.pub        { background: var(--amber-light); color: #92400e; }
.premises-type-badge.hotel      { background: var(--accent-light); color: var(--accent); }
.premises-type-badge.restaurant { background: #fce7f3; color: #9d174d; }
.premises-type-badge.bar        { background: #ede9fe; color: #6d28d9; }
.premises-type-badge.guesthouse { background: var(--teal-light); color: var(--teal); }
.premises-type-badge.other      { background: var(--slate-100); color: var(--slate-600); }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.status-dot.active   { background: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.2); }
.status-dot.inactive { background: var(--rose); box-shadow: 0 0 0 3px rgba(225,29,72,0.2); }

.premises-card-body {
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.premises-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.premises-detail svg {
    color: var(--slate-400);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.premises-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    margin-top: auto;
    border-top: 1px solid var(--slate-100);
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================
   Form Rows (multi-column forms)
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

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

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

/* ============================================
   Form Sections (full-page forms)
   ============================================ */
.premises-form .form-section {
    margin-bottom: 1.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 0;
}

.section-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-section-msg {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 2px dashed var(--slate-200);
    border-radius: var(--radius-sm);
}

.add-row-btn {
    width: 100%;
    margin-top: 0.75rem;
    border-style: dashed;
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.add-row-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    border-style: dashed;
    color: var(--accent-hover);
}

/* ============================================
   Repeater Rows (dynamic add/remove)
   ============================================ */
.repeater-row {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--slate-50);
}

.repeater-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
}

.repeater-row-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--slate-400);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    border-radius: 4px;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.btn-remove:hover {
    color: var(--rose);
    background: var(--rose-light);
}

.repeater-row-body {
    padding: 1rem;
}

.repeater-row-body .form-group {
    margin-bottom: 0.75rem;
}

.repeater-row-body .form-group:last-child {
    margin-bottom: 0;
}

/* ============================================
   Count Badges (on premises cards)
   ============================================ */
.premises-counts {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.count-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
}

/* ============================================
   Dashboard — Per-Premises Panels
   ============================================ */
.stat-card.stat-accent {
    border-left: 3px solid var(--accent);
}

.dash-premises-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 0 1.25rem 0.75rem;
}

.dash-mini-stat {
    text-align: center;
    padding: 0.4rem 0;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
}

.dash-mini-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate-800);
    font-family: 'Outfit', sans-serif;
}

.dash-mini-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-occupancy-bar {
    height: 6px;
    background: var(--slate-100);
    border-radius: 99px;
    overflow: hidden;
    margin: 0 1.25rem 0.75rem;
}

.dash-occupancy-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.dash-premises-detail {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 1.25rem;
}

.dash-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--slate-50);
}

.dash-detail-row:last-child {
    border-bottom: none;
}

.dash-detail-row span {
    color: var(--text-muted);
}

.dash-detail-row strong {
    color: var(--slate-700);
    font-size: 0.85rem;
}

.dash-activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dash-activity-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1100px) {
    .dash-activity-4col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .dash-activity-grid {
        grid-template-columns: 1fr;
    }
    .dash-activity-4col {
        grid-template-columns: 1fr;
    }
}

/* Confirm modal — smaller, centered */
.modal-confirm {
    max-width: 400px;
}

.modal-confirm .modal-body {
    border-radius: var(--radius-md);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--slate-200);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-500);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: -2px;
    background: transparent;
}

.tab:hover {
    color: var(--slate-700);
    background: var(--slate-50);
    border-color: var(--slate-200);
    border-bottom: none;
}

.tab.active {
    color: var(--accent);
    font-weight: 600;
    background: var(--white);
    border-color: var(--slate-200);
    border-bottom: 2px solid var(--white);
}

.tab-count {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--slate-100);
    color: var(--slate-500);
    padding: 0.1rem 0.45rem;
    border-radius: 99px;
    line-height: 1.4;
}

.tab.active .tab-count {
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================
   Calendar Grid (Room Monthly Diary)
   ============================================ */
.cal-nav {
    display: flex;
    gap: 0.35rem;
}

.calendar-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.calendar-grid th,
.calendar-grid td {
    border: 1px solid var(--slate-200);
    text-align: center;
    padding: 0;
}

.cal-room-header {
    position: sticky;
    left: 0;
    background: var(--slate-50);
    z-index: 2;
    min-width: 110px;
    text-align: left !important;
    padding: 0.5rem 0.6rem !important;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
}

.cal-day-header {
    padding: 0.35rem 0.15rem !important;
    min-width: 38px;
    background: var(--slate-50);
}

.cal-day-header.today {
    background: var(--accent);
}

.cal-day-header.today .cal-day-num {
    color: var(--white);
}

.cal-day-header.today .cal-day-name {
    color: rgba(255,255,255,0.75);
}

.cal-day-num {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-700);
    line-height: 1.2;
}

.cal-day-name {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--slate-400);
    text-transform: uppercase;
}

.cal-room-name {
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 1;
    text-align: left !important;
    padding: 0.5rem 0.6rem !important;
    min-width: 110px;
    border-right: 2px solid var(--slate-200) !important;
}

.cal-room-name strong {
    display: block;
    font-size: 0.8rem;
    color: var(--slate-800);
    line-height: 1.2;
}

.cal-room-name small {
    font-size: 0.65rem;
    color: var(--slate-400);
}

.cal-cell {
    height: 36px;
    width: 38px;
    cursor: default;
    transition: background var(--transition);
    position: relative;
}

.cal-cell.available:hover {
    background: var(--slate-50);
    cursor: crosshair;
}

.cal-cell.available.selected {
    background: var(--accent);
    opacity: 0.5;
}

/* Status-based booking colours */
.cal-cell.bk-status-enquiry { background: #fed7aa !important; --bk-border: #ea580c; }
.cal-cell.bk-status-confirmed { background: #bbf7d0 !important; --bk-border: #16a34a; }
.cal-cell.bk-status-cancelled { background: #fecaca !important; --bk-border: #dc2626; }

.cal-cell.booked {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.cal-cell.booked.bk-start,
.cal-cell.booked.bk-boundary {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.cal-cell.booked.bk-end {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

.cal-cell.booked.bk-start.bk-end {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

/* Booking start — left border marker */
.cal-cell.bk-start,
.timeline-cell.bk-start {
    border-left: none !important;
}

/* Booking boundary — where one ends and another starts */
.cal-cell.bk-boundary {
    border-left: none !important;
}

/* Guest initial on first cell of booking */
.bk-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--slate-600);
    line-height: 1;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.cal-cell.booked,
.timeline-cell.booked {
    position: relative;
}

.cal-booking-dot {
    display: none;
}

/* ============================================
   Cell Hover Tooltip
   ============================================ */
.cal-cell,
.timeline-cell {
    position: relative;
}

.cell-tooltip {
    display: none;
    position: fixed;
    background: var(--slate-900);
    color: var(--white);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    min-width: 180px;
    max-width: 240px;
    flex-direction: column;
    gap: 0.2rem;
    pointer-events: none;
}

.cell-tooltip::after {
    display: none;
}

.cal-cell.booked:hover .cell-tooltip,
.timeline-cell.booked:hover .cell-tooltip {
    display: flex;
}

.cell-tooltip strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

.cell-tooltip span {
    font-size: 0.72rem;
    color: var(--slate-300);
    line-height: 1.3;
}

.cell-tooltip .tooltip-notes {
    font-style: italic;
    color: var(--slate-400);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.25rem;
    margin-top: 0.15rem;
}

/* Tooltip positioning handled by JavaScript */

/* ============================================
   Timeline Grid (Table Daily Diary)
   ============================================ */
.timeline-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.timeline-grid th,
.timeline-grid td {
    border: 1px solid var(--slate-200);
    text-align: center;
    padding: 0;
}

.timeline-hour {
    padding: 0.4rem 0.1rem !important;
    min-width: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--slate-500);
    background: var(--slate-50);
}

.timeline-cell {
    height: 40px;
    min-width: 25px;
    cursor: default;
    transition: background var(--transition);
}

.timeline-cell.hour-start {
    border-left: 1px solid var(--slate-200);
}

.timeline-cell.hour-half {
    border-left: 1px dashed var(--slate-100);
}

.timeline-cell.available:hover {
    background: var(--slate-50);
    cursor: crosshair;
}

.timeline-cell.available.selected {
    background: var(--teal);
    opacity: 0.4;
}

.timeline-cell.bk-status-enquiry { background: #fed7aa !important; --bk-border: #ea580c; }
.timeline-cell.bk-status-confirmed { background: #bbf7d0 !important; --bk-border: #16a34a; }
.timeline-cell.bk-status-cancelled { background: #fecaca !important; --bk-border: #dc2626; }

.timeline-cell.booked {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.timeline-cell.booked.bk-start {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.timeline-cell.booked.bk-end {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

.timeline-cell.booked.bk-start.bk-end {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

/* Form highlight flash on calendar selection */
.form-highlight {
    animation: formFlash 1.5s ease;
}

@keyframes formFlash {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    30%  { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Prevent text selection while dragging */
.calendar-grid,
.timeline-grid {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   Booking Rows (listing)
   ============================================ */
.booking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--slate-100);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.room-entry + .room-entry {
    margin-top: 0.5rem;
}

/* Monthly Table Calendar */
.table-month-cal {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.table-month-cal th {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-month-cal td {
    border: 1px solid var(--slate-200);
    vertical-align: top;
    height: 100px;
    padding: 0.35rem;
    cursor: pointer;
    transition: background 0.15s;
}

.table-month-cal td:hover:not(.cal-day-empty) {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.table-month-cal td:hover .cal-day-num {
    color: var(--slate-900) !important;
}

.table-month-cal td:hover .cal-day-count {
    color: #059669 !important;
}

.table-month-cal td:hover .cal-day-booking {
    color: var(--slate-800) !important;
}

.table-month-cal td:hover .cal-day-more {
    color: var(--slate-500) !important;
}

.cal-day-empty {
    background: var(--slate-50);
    cursor: default !important;
}

.cal-day-cell.cal-today {
    background: #eff6ff;
    border-color: var(--accent);
}

.cal-day-cell.cal-today:hover {
    background: #dbeafe;
}

.cal-day-cell.cal-has-bookings {
    background: #f0fdf4;
}

.cal-day-cell.cal-has-bookings:hover {
    background: #dcfce7;
}

.cal-day-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.2rem;
}

.cal-today .cal-day-num {
    color: var(--accent);
}

.cal-day-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: #059669;
    margin-bottom: 0.15rem;
}

.cal-day-booking {
    font-size: 0.65rem;
    color: var(--slate-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.cal-day-more {
    font-size: 0.6rem;
    color: var(--slate-500);
    font-style: italic;
}

@media (max-width: 768px) {
    .table-month-cal td {
        height: 70px;
        padding: 0.25rem;
    }
    .cal-day-booking {
        display: none;
    }
}

/* Weekly Room Grid */
.weekly-room-grid {
    width: 100%;
    border-collapse: collapse;
}

.weekly-room-grid th,
.weekly-room-grid td {
    border: 1px solid var(--slate-200);
    padding: 0;
    text-align: center;
}

.weekly-room-grid .cal-room-header {
    width: 130px;
    min-width: 130px;
}

.weekly-day-header {
    padding: 0.6rem 0.4rem !important;
    background: var(--slate-50);
    min-width: 100px;
}

.weekly-day-header.today {
    background: var(--accent);
}

.weekly-day-header.today .weekly-day-name,
.weekly-day-header.today .weekly-day-num {
    color: var(--white);
}

.weekly-day-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--slate-500);
    letter-spacing: 0.05em;
}

.weekly-day-num {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--slate-700);
}

.weekly-room-grid .cal-room-name {
    text-align: left !important;
    padding: 0.5rem 0.6rem !important;
    background: var(--white);
    border-right: 2px solid var(--slate-200) !important;
    position: sticky;
    left: 0;
    z-index: 1;
    width: 130px;
    min-width: 130px;
}

.weekly-cell {
    vertical-align: middle;
    height: 64px;
    padding: 0.5rem 0.65rem !important;
    text-align: left !important;
    transition: background 0.15s;
    min-width: 100px;
}

.weekly-cell.available {
    min-width: 100px;
    cursor: crosshair;
    user-select: none;
}

.weekly-cell.wk-selected {
    background: #bfdbfe !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

.weekly-cell.available:hover {
    background: var(--slate-50);
}

.weekly-cell.bk-status-enquiry { background: #fed7aa !important; --bk-border: #ea580c; }
.weekly-cell.bk-status-confirmed { background: #bbf7d0 !important; --bk-border: #16a34a; }
.weekly-cell.bk-status-cancelled { background: #fecaca !important; --bk-border: #dc2626; }

.weekly-cell.booked {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.weekly-cell.booked.bk-start,
.weekly-cell.booked.bk-boundary {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border);
}

.weekly-cell.booked.bk-end {
    box-shadow: inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

.weekly-cell.booked.bk-start.bk-end {
    box-shadow: inset 3px 0 0 0 var(--bk-border), inset 0 1px 0 0 var(--bk-border), inset 0 -1px 0 0 var(--bk-border), inset -1px 0 0 0 var(--bk-border);
}

.weekly-booking-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.weekly-booking-info strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.weekly-booking-dates {
    font-size: 0.72rem;
    color: var(--slate-600) !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weekly-booking-phone {
    font-size: 0.68rem;
    color: var(--slate-400) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .weekly-room-grid .cal-room-name {
        width: 90px;
        min-width: 90px;
    }
    .weekly-cell {
        height: 52px;
        padding: 0.3rem !important;
    }
    .weekly-booking-dates,
    .weekly-booking-phone {
        display: none;
    }
}

/* Weekly Table View */
.weekly-table-cell {
    vertical-align: top;
    height: 72px;
    padding: 0.35rem 0.45rem !important;
    text-align: left !important;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 100px;
}

.weekly-table-cell:hover {
    background: #f0f9ff;
}

.weekly-table-cell.wt-today {
    background: #eff6ff;
}

.weekly-table-cell.wt-today:hover {
    background: #dbeafe;
}

.weekly-table-cell.wt-has-bookings {
    background: #f0fdf4;
}

.weekly-table-cell.wt-has-bookings:hover {
    background: #dcfce7;
}

.weekly-table-cell.wt-today.wt-has-bookings {
    background: #ecfdf5;
}

.wt-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 0.15rem;
}

.wt-booking {
    display: flex;
    gap: 0.3rem;
    align-items: baseline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.wt-time {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--slate-500);
    flex-shrink: 0;
}

.wt-guest {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--slate-700);
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-more {
    font-size: 0.62rem;
    color: var(--slate-400);
    font-weight: 500;
    margin-top: 0.1rem;
}

/* Day hover tooltip — shows on hover over table cells with bookings */
.weekly-table-cell,
.cal-day-cell {
    position: relative;
}

.day-hover-tooltip {
    display: none;
    position: fixed;
    z-index: 200;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.65rem 0.75rem;
    min-width: 240px;
    max-width: 320px;
    text-align: left;
    pointer-events: none;
}

.weekly-table-cell:hover .day-hover-tooltip,
.cal-day-cell:hover .day-hover-tooltip {
    display: block;
}

.day-hover-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.4rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--slate-100);
}

.day-hover-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--slate-50);
}

.day-hover-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.day-hover-row strong {
    font-size: 0.78rem;
    color: var(--slate-800);
}

.day-hover-row span {
    font-size: 0.7rem;
    color: var(--slate-500);
}

.day-hover-row .status-badge {
    align-self: flex-start;
    margin-bottom: 0.1rem;
}

.day-hover-phone {
    font-size: 0.65rem !important;
    color: var(--slate-400) !important;
}

@media (max-width: 768px) {
    .weekly-table-cell {
        height: 52px;
        min-width: 80px;
        padding: 0.25rem !important;
    }
    .wt-guest {
        display: none;
    }
}

.booking-row:last-child {
    border-bottom: none;
}

/* Status select styling */
.status-select {
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
}

.status-badge.status-enquiry {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fb923c;
}

.status-badge.status-confirmed {
    background: #bbf7d0;
    color: #166534;
    border: 1px solid #4ade80;
}

.status-badge.status-cancelled {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
}

.booking-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.booking-info strong {
    font-size: 0.88rem;
    color: var(--slate-900);
}

/* Document icon badge */
.doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* Edit premises item rows */
.edit-item-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--slate-100);
}

.edit-item-row:last-of-type {
    border-bottom: none;
}

.booking-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
    text-align: center;
    padding: 1.25rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--slate-200);
    margin-top: auto;
    background: var(--white);
}

/* ============================================
   TABLET — 600px+
   ============================================ */
@media (min-width: 600px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .login-header {
        padding: 2.5rem 2rem 2rem;
    }

    .login-header h1 {
        font-size: 1.65rem;
    }

    .login-body {
        padding: 0.5rem 2rem 2.5rem;
    }

    .login-card {
        border-radius: var(--radius-xl);
    }

    .dashboard-stats {
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-card .stat-value {
        font-size: 2.25rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    /* Modal becomes centered card on tablet */
    .modal-backdrop {
        align-items: center;
        padding: 1rem;
    }

    .modal {
        max-width: 520px;
        border-radius: var(--radius-lg);
        max-height: 85vh;
        animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modalFadeIn {
        from { opacity: 0; transform: translateY(16px) scale(0.96); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .modal-footer {
        justify-content: flex-end;
    }

    .modal-footer .btn {
        flex: none;
    }

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

    .form-row-3 {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0 1rem;
    }

    .form-row-4 {
        grid-template-columns: 1fr 1fr;
        gap: 0 1rem;
    }

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

/* ============================================
   DESKTOP — 768px+
   ============================================ */
@media (min-width: 768px) {
    /* Nav becomes horizontal bar */
    .main-nav {
        flex-wrap: nowrap;
        padding: 0 2rem;
        height: 64px;
        gap: 0;
    }

    .nav-brand {
        font-size: 1.15rem;
        margin-right: 2rem;
    }

    .nav-toggle { display: none; }

    .nav-collapse {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        width: auto;
        flex: 1;
        padding-top: 0;
        border-top: none;
        margin-top: 0;
        gap: 0;
    }

    .nav-links {
        flex-direction: row;
        gap: 0.25rem;
        flex: 1;
    }

    .nav-links a {
        padding: 0.45rem 0.9rem;
        font-size: 0.875rem;
    }

    .nav-user {
        padding: 0;
        flex-wrap: nowrap;
        gap: 0.75rem;
        margin-left: auto;
    }

    .container {
        padding: 2.5rem 2rem;
    }

    /* Table becomes standard layout */
    .data-table thead {
        display: table-header-group;
        background: var(--slate-50);
    }

    .data-table th {
        padding: 0.75rem 1rem;
        text-align: left;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--slate-500);
        border-bottom: 1px solid var(--slate-200);
    }

    .data-table tbody tr {
        display: table-row;
        padding: 0;
    }

    .data-table td {
        display: table-cell;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--slate-100);
    }

    .data-table td::before { display: none; }

    .data-table td.actions {
        border-top: none;
        margin-top: 0;
        padding-top: 0.85rem;
    }

    .data-table tbody tr:hover {
        background: var(--slate-50);
    }

    .stat-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .premises-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-row-4 {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 0 1rem;
    }
}

/* ============================================
   LARGE DESKTOP — 1024px+
   ============================================ */
@media (min-width: 1024px) {
    .login-page::before {
        width: 700px;
        height: 700px;
    }

    .login-page::after {
        width: 500px;
        height: 500px;
    }

    .card-header {
        padding: 1.1rem 1.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

/* ============================================
   Utility — safe area for notched phones
   ============================================ */
@supports (padding: max(0px)) {
    .main-nav {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .main-footer {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
}

/* ============================================
   Print
   ============================================ */
@media print {
    .main-nav,
    .btn-logout,
    .nav-toggle,
    .actions,
    .modal-backdrop { display: none !important; }

    body { background: white; }
    .container { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================
   Music Calendar Views
   ============================================ */

/* Monthly grid (Mon-Sun calendar) */
.music-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--slate-200);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.music-grid-header {
    background: var(--slate-100);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
}

.music-grid-cell {
    background: var(--white);
    min-height: 90px;
    padding: 0.35rem;
    cursor: pointer;
    transition: background 0.15s;
}

.music-grid-cell:hover {
    background: var(--slate-50);
}

.music-grid-cell.music-grid-empty {
    background: var(--slate-50);
    cursor: default;
}

.music-grid-cell.music-today {
    background: #eff6ff;
}

.music-grid-day {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-400);
    margin-bottom: 0.25rem;
}

.music-today .music-grid-day {
    color: var(--accent);
    font-weight: 700;
}

.music-grid-booking {
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 2px;
    font-size: 0.7rem;
    line-height: 1.3;
    overflow: hidden;
}

.music-grid-booking strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-grid-booking span {
    color: rgba(0,0,0,0.5);
    font-size: 0.65rem;
}

/* Status backgrounds for music */
.status-bg-enquiry { background: #fed7aa; }
.status-bg-confirmed { background: #bbf7d0; }
.status-bg-cancelled { background: #fecaca; }

/* Weekly view */
.music-day-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--slate-100);
    min-height: 50px;
}

.music-day-row:last-child {
    border-bottom: none;
}

.music-day-row.music-today {
    background: #f0f9ff;
    margin: 0 -1.25rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
}

.music-day-label {
    width: 110px;
    min-width: 110px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-600);
    padding-top: 0.15rem;
}

.music-today .music-day-label {
    color: var(--accent);
}

.music-booking-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    flex: 1;
}

.music-booking-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.music-booking-info strong {
    font-size: 0.85rem;
}

.music-genre {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    width: fit-content;
}

.music-empty-day {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--slate-300);
    font-style: italic;
}

/* Yearly view */
.music-month-section {
    margin-bottom: 0.5rem;
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.music-month-section:last-child {
    margin-bottom: 0;
}

.music-month-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--slate-50);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-700);
    border-bottom: 1px solid var(--slate-100);
}

.music-year-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--slate-50);
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.music-year-row:last-child {
    border-bottom: none;
}

.music-year-date {
    min-width: 55px;
    font-weight: 600;
    color: var(--slate-500);
    font-size: 0.78rem;
}

.music-year-artist {
    font-weight: 600;
    color: var(--slate-800);
}

.music-empty-month {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    color: var(--slate-300);
    font-style: italic;
}

.music-empty-month:hover {
    background: var(--accent-light);
    color: var(--accent);
    font-style: normal;
}

.music-month-header:hover {
    background: var(--slate-100);
}

.music-year-row:hover {
    background: var(--slate-50);
}

/* Selected state for music calendar cells */
.music-selected {
    outline: 2px solid var(--accent) !important;
    outline-offset: -2px;
    background: var(--accent-light) !important;
}

/* Yearly mini month grid */
.music-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.music-mini-month {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.music-mini-title {
    background: var(--slate-50);
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--slate-700);
    text-align: center;
    border-bottom: 1px solid var(--slate-200);
}

.music-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 0.25rem;
}

.music-mini-hdr {
    text-align: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    padding: 0.15rem 0;
}

.music-mini-empty {
    min-height: 22px;
}

.music-mini-day {
    text-align: center;
    font-size: 0.65rem;
    padding: 0.2rem 0;
    border-radius: 3px;
    cursor: pointer;
    color: var(--slate-600);
    user-select: none;
}

.music-mini-day:hover {
    background: var(--slate-100);
}

.music-mini-today {
    font-weight: 700;
    color: var(--accent);
}

.music-mini-booked {
    font-weight: 700;
    color: var(--white);
}

.music-mini-confirmed { background: #16a34a; }
.music-mini-enquiry { background: #ea580c; }
.music-mini-cancelled { background: #dc2626; }

.music-mini-day.music-selected {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    background: var(--accent-light) !important;
    color: var(--accent) !important;
}

@media (max-width: 768px) {
    .music-year-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .music-year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
