/* ==========================================================================
   Hospital Appointment System — UI Design System
   ==========================================================================
   Production-ready, responsive, consistent.
   Shared across public, patient, doctor, and admin areas.
   ========================================================================== */

/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    color: #1f2937;
}

/* ── Navigation ────────────────────────────────────────────────────────── */
.navbar {
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .brand {
    font-size: 20px;
    font-weight: 700;
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1px;
}

.nav-links li a {
    text-decoration: none;
    padding: 14px 12px;
    display: block;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav-links li a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-links li a.active {
    border-bottom-color: white;
    background: rgba(255,255,255,0.08);
}

.user-info {
    font-size: 13px;
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.user-info .role-badge {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Navbar Themes */
.navbar-patient { background: #1976d2; color: white; }
.navbar-patient .nav-links li a { color: rgba(255,255,255,0.85); }
.navbar-patient .nav-links li a:hover { color: white; }
.navbar-patient .user-info { color: rgba(255,255,255,0.8); }

.navbar-doctor { background: #1565c0; color: white; }
.navbar-doctor .nav-links li a { color: rgba(255,255,255,0.85); }
.navbar-doctor .nav-links li a:hover { color: white; }
.navbar-doctor .user-info { color: rgba(255,255,255,0.8); }

.navbar-admin { background: #1a237e; color: white; }
.navbar-admin .nav-links li a { color: rgba(255,255,255,0.85); }
.navbar-admin .nav-links li a:hover { color: white; }
.navbar-admin .user-info { color: rgba(255,255,255,0.8); }

/* ── Public Auth Navbar (hero style) ──────────────────────────────────── */
.navbar-public {
    background: linear-gradient(135deg, #1a237e, #283593);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: static;
}

.navbar-public .logo { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.navbar-public .nav-links { display: flex; gap: 12px; flex-wrap: wrap; }
.navbar-public .nav-links a {
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

/* ── Main Content ──────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 28px 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

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

.page-header > div:first-child { min-width: 0; flex: 1; }
.page-header h1 { font-size: 26px; color: #111827; font-weight: 700; }
.page-header .subtitle { color: #6b7280; font-size: 14px; margin-top: 4px; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Messages / Flash Alerts ───────────────────────────────────────────── */
.messages-container { margin-bottom: 20px; }

.message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.message:last-child { margin-bottom: 0; }
.message .msg-icon { font-size: 18px; flex-shrink: 0; }

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.card h2 { font-size: 20px; margin-bottom: 16px; color: #111827; }
.card h3 { font-size: 16px; margin-bottom: 10px; color: #4b5563; }

.form-card { max-width: 560px; margin: 0 auto; }

/* ── Stats Grid ────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-card .stat-number { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 13px; color: #6b7280; font-weight: 500; }

.stat-blue .stat-number { color: #1976d2; }
.stat-orange .stat-number { color: #ff9800; }
.stat-green .stat-number { color: #28a745; }
.stat-red .stat-number { color: #dc3545; }
.stat-purple .stat-number { color: #9c27b0; }

/* ── Action Cards Grid ─────────────────────────────────────────────────── */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.action-card .icon { font-size: 36px; margin-bottom: 12px; }
.action-card h3 { font-size: 16px; color: #111827; margin-bottom: 4px; }
.action-card p { font-size: 13px; color: #6b7280; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrapper,
.table-responsive,
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

/* Sticky action column — keeps Fund/View/Disable buttons visible
   even when the table is wider than its container and scrolls
   horizontally. Applied to the last column of wide admin tables. */
.sticky-actions {
    position: sticky;
    right: 0;
    background: inherit;
    box-shadow: -4px 0 8px rgba(0,0,0,0.06);
    z-index: 1;
}

tr:hover .sticky-actions {
    background: #f1f5f9;
}

tr:nth-child(even) .sticky-actions {
    background: #f9fafb;
}

tr:nth-child(even):hover .sticky-actions {
    background: #f1f5f9;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 650px;
}

th, td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    vertical-align: middle;
}

th {
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

tr:nth-child(even) { background: #f9fafb; }
tr:hover { background: #f1f5f9; }

/* Table Header Themes */
th.theme-patient { background: #1976d2; color: white; }
th.theme-doctor { background: #1565c0; color: white; }
th.theme-admin { background: #1a237e; color: white; }

/* ── Status Badges ─────────────────────────────────────────────────────── */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #cce5ff; color: #004085; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-info { background: #e0f2fe; color: #0369a1; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    line-height: 1.4;
    white-space: nowrap;
}

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

.btn-primary { background: #1976d2; color: white; }
.btn-primary:hover { background: #1565c0; box-shadow: 0 4px 12px rgba(25,118,210,0.3); }

.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; box-shadow: 0 4px 12px rgba(40,167,69,0.3); }

.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; box-shadow: 0 4px 12px rgba(220,53,69,0.3); }

.btn-warning { background: #ffc107; color: #1f2937; }
.btn-warning:hover { background: #e0a800; box-shadow: 0 4px 12px rgba(255,193,7,0.3); }

.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover { background: #5a6268; box-shadow: 0 4px 12px rgba(108,117,125,0.3); }

.btn-info { background: #0ea5e9; color: white; }
.btn-info:hover { background: #0284c7; box-shadow: 0 4px 12px rgba(14,165,233,0.3); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

.btn-outline {
    background: transparent;
    border: 2px solid #1976d2;
    color: #1976d2;
}
.btn-outline:hover { background: #1976d2; color: white; }

/* Public page button variants */
.btn-login {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-login:hover { background: rgba(255,255,255,0.25); border-color: white; }

.btn-register-public {
    background: #ff6f00;
    color: white;
    border: 2px solid #ff6f00;
}
.btn-register-public:hover { background: #e65100; }

.btn-dashboard-landing {
    background: #4caf50;
    color: white;
    border: 2px solid #4caf50;
}
.btn-dashboard-landing:hover { background: #388e3c; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    color: #1f2937;
    line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.12);
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select { cursor: pointer; }

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.field-hint {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { color: #111827; margin-bottom: 8px; font-size: 20px; }
.empty-state p { color: #6b7280; margin-bottom: 20px; font-size: 14px; }

/* ── Filter / Search Bar ───────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 9px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.12);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 18px 20px;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
    background: white;
    margin-top: auto;
}

/* ── Wallet Card (Patient) ─────────────────────────────────────────────── */
.wallet-balance-card {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 24px rgba(37,99,235,0.2);
    margin-bottom: 20px;
}

.balance-icon {
    font-size: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.balance-details { flex: 1; }

.balance-label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.balance-amount {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 4px;
}

.balance-updated { font-size: 12px; opacity: 0.7; }

/* ── Info Banner ───────────────────────────────────────────────────────── */
.info-banner {
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.info-banner-green {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.info-banner-blue {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.info-banner-gray {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.info-banner .btn { margin-left: auto; }

/* ── Confirmation Modal ────────────────────────────────────────────────── */
#confirmModalOverlay {
    display: none;
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6) !important;
    z-index: 1040;
}

#confirmModalBox {
    display: none;
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 90vw;
    max-width: 460px;
}

#confirmModalBox > div {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

.confirm-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confirm-modal-header h5 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.confirm-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
    line-height: 1;
}

.confirm-modal-body {
    padding: 22px;
    color: #374151;
    font-size: 15px;
    line-height: 1.5;
}

.confirm-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Landing Page Specific ─────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    padding: 50px 30px;
    text-align: center;
}

.hero h1 { font-size: 36px; margin-bottom: 10px; }
.hero p {
    font-size: 16px;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.date-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.date-header {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-header .day-name { font-weight: 700; color: #1a237e; font-size: 16px; }
.date-header .date-full { color: #5c6bc0; font-size: 14px; }
.date-header .date-badge {
    background: #1a237e;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: auto;
}

.slot-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.slot-row:last-child { border-bottom: none; }
.slot-row:hover { background: #f8f9ff; }

.slot-time { font-weight: 600; color: #333; min-width: 140px; font-size: 15px; }

.slot-session {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}
.slot-session.morning { background: #e3f2fd; color: #1565c0; }
.slot-session.evening { background: #fff3e0; color: #e65100; }

.slot-capacity { flex: 1; text-align: right; font-size: 14px; }
.slot-capacity .high { color: #2e7d32; font-weight: 600; }
.slot-capacity .medium { color: #e65100; font-weight: 600; }
.slot-capacity .low { color: #c62828; font-weight: 600; }

.slot-book { min-width: 100px; text-align: right; }

.btn-book {
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-block;
}
.btn-book-guest { background: #ff6f00; color: white; }
.btn-book-guest:hover { background: #e65100; transform: translateY(-1px); }
.btn-book-auth { background: #4caf50; color: white; }
.btn-book-auth:hover { background: #388e3c; transform: translateY(-1px); }

.info-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.info-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.info-item .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.green { background: #4caf50; }
.dot.orange { background: #ff9800; }
.dot.red { background: #f44336; }

.weekend-badge {
    background: #fce4ec;
    color: #c62828;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* ── Currently Serving Banner ──────────────────────────────────────────── */
.hero-serving {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 14px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-serving .serving-label { font-size: 14px; color: #1e40af; font-weight: 600; }
.hero-serving .serving-token { font-size: 36px; font-weight: 800; color: #2563eb; letter-spacing: 2px; }

/* ── Utility Classes ───────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: #6b7280; }
.text-nowrap { white-space: nowrap; }
.w-full { width: 100%; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .main-content { padding: 24px 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; padding: 10px 16px; }
    .nav-links { width: 100%; justify-content: center; }
    .nav-links li a { padding: 10px 10px; font-size: 13px; }
    .user-info { width: 100%; justify-content: center; padding: 8px 0 0; }
    .main-content { padding: 20px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .action-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header h1 { font-size: 22px; }
    .wallet-balance-card { flex-direction: column; text-align: center; padding: 24px; }
    .balance-amount { font-size: 32px; }
    .hero h1 { font-size: 24px; }
    .hero { padding: 40px 20px; }
    .slot-row { flex-wrap: wrap; gap: 8px; }
    .slot-time { min-width: 100%; }
    .slot-book { min-width: 100%; text-align: center; }
    .form-card { max-width: 100%; }
    table { font-size: 13px; }
    th, td { padding: 10px 12px; }
    .info-banner { flex-direction: column; text-align: center; }
    .info-banner .btn { margin: 8px auto 0; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: 1fr; }
    .nav-links li a { padding: 8px 8px; font-size: 12px; }
    .main-content { padding: 16px 12px; }
    .card { padding: 18px; }
    .page-header h1 { font-size: 20px; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; text-align: center; font-size: 13px; }
    .balance-amount { font-size: 28px; }
    .wallet-balance-card { padding: 20px; }
    .balance-icon { width: 64px; height: 64px; font-size: 36px; }
    table { min-width: 500px; font-size: 12px; }
    th, td { padding: 8px 10px; }
    .date-group { border-radius: 8px; }
    .date-header { padding: 10px 14px; flex-wrap: wrap; }
    .slot-row { padding: 10px 14px; }
    .form-group input,
    .form-group textarea,
    .form-group select { font-size: 16px; } /* Prevent iOS zoom */
    .hero h1 { font-size: 20px; }
    .hero p { font-size: 14px; }
}

/* ── Mobile Hamburger Navigation ──────────────────────────────────────── */
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.35);
    color: white;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.25); }
.nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 900px) {
    .navbar { flex-wrap: wrap; }
    .navbar .nav-toggle { display: block; order: 3; }
    .navbar .brand { flex: 1; }
    /* Collapse the menu: works for both ul.nav-links and div.nav-links */
    .navbar .nav-links {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 0 4px;
    }
    .navbar .nav-links.open { display: flex; }
    .navbar .nav-links li a,
    .navbar .nav-links a {
        border-bottom: none;
        border-radius: 10px;
        padding: 12px 14px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .navbar .user-info { order: 2; padding: 0; }
}

@media (max-width: 480px) {
    .navbar .nav-links li a,
    .navbar .nav-links a { padding: 10px 12px; font-size: 13.5px; }
}

/* ── Mobile-friendly tables ───────────────────────────────────────────── */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll table { min-width: 560px; }

/* ── Responsive safe-embeds ───────────────────────────────────────────── */
iframe { max-width: 100%; }