/* ===== THEME VARIABLES ===== */
:root,
[data-theme="dark"] {
    --primary: #c9a96e;
    --primary-dark: #b8944f;
    --primary-light: #e4d5b8;
    --primary-glow: rgba(201, 169, 110, 0.15);
    --bg: #0a0a0e;
    --bg-2: #141418;
    --bg-3: #1e1e26;
    --bg-4: #2a2a34;
    --text: #ece4d8;
    --text-muted: #9a9084;
    --text-light: #bab0a4;
    --border: rgba(201, 169, 110, 0.12);
    --border-light: rgba(255, 255, 255, 0.05);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --info: #06b6d4;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --navbar-bg: rgba(10, 10, 14, 0.88);
    --card-bg: #141418;
    --input-bg: #1e1e26;
    --input-border: #2e2e3a;
    --table-head-bg: #1e1e26;
    --table-border: rgba(255,255,255,0.03);
    --modal-bg: #141418;
    --modal-border: rgba(201,169,110,0.12);
    --gradient-1: linear-gradient(135deg, #0a0a0e 0%, #141418 50%, #0a0a0e 100%);
    --gradient-hero: radial-gradient(ellipse at 30% 50%, rgba(201,169,110,0.08) 0%, transparent 60%);
}

[data-theme="light"] {
    --primary: #8a7450;
    --primary-dark: #705e3e;
    --primary-light: #e8dec8;
    --primary-glow: rgba(138, 116, 80, 0.1);
    --bg: #f8f4ee;
    --bg-2: #ffffff;
    --bg-3: #f2eee8;
    --bg-4: #e8e2da;
    --text: #1a1612;
    --text-muted: #8a8278;
    --text-light: #6a6258;
    --border: rgba(138, 116, 80, 0.12);
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #ca8a04;
    --info: #0891b2;
    --navbar-bg: rgba(255, 255, 255, 0.92);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #d8d0c8;
    --table-head-bg: #f2eee8;
    --table-border: rgba(0,0,0,0.04);
    --modal-bg: #ffffff;
    --modal-border: rgba(138,116,80,0.12);
    --gradient-1: linear-gradient(135deg, #f8f4ee 0%, #ffffff 50%, #f8f4ee 100%);
    --gradient-hero: radial-gradient(ellipse at 30% 50%, rgba(138,116,80,0.06) 0%, transparent 60%);
}

/* ===== BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}
::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-3); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text); }

/* ===== NAVBAR ===== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 0;
    transition: var(--transition);
}
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: 0.5px;
}
.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 8px 18px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-glow);
}

/* ===== THEME TOGGLE (navbar version) ===== */
.theme-toggle-nav {
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}
.theme-toggle-nav:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

.theme-toggle-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    box-shadow: var(--shadow);
}
.theme-toggle-float:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-2px);
}

/* ===== THEME TOGGLE (sidebar version) ===== */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.theme-toggle:hover {
    color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}
.btn-primary {
    background: var(--primary);
    border: none;
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    animation: heroGlow 10s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0,0) scale(1); opacity: 0.6; }
    100% { transform: translate(3%,2%) scale(1.2); opacity: 1; }
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--text) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 520px;
    line-height: 1.7;
}
.hero-stats { display: flex; gap: 48px; margin-top: 3rem; }
.hero-stat-item h3 {
    font-size: 1.8rem; font-weight: 800;
    color: var(--primary); margin-bottom: 0;
}
.hero-stat-item p { color: var(--text-muted); font-size: 0.85rem; margin: 0; letter-spacing: 0.5px; text-transform: uppercase; }

/* ===== SECTIONS ===== */
.section { padding: 90px 0; }
.section-title {
    font-size: 2rem; font-weight: 800;
    margin-bottom: 0.5rem; letter-spacing: -0.5px;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 3rem; }
.bg-dark-2 { background: var(--bg-2); }

/* ===== CARDS ===== */
.service-card, .worker-card, .pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.35s ease;
    height: 100%;
}
.service-card:hover, .worker-card:hover, .pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.service-icon { font-size: 2.2rem; color: var(--primary); margin-bottom: 1rem; display: block; }
.service-card h5 { font-weight: 700; margin-bottom: 0.5rem; font-size: 1.1rem; }
.service-card .price { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.service-card .duration { color: var(--text-muted); font-size: 0.8rem; }

/* ===== TOKEN DISPLAY ===== */
.token-screen {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-light);
}
.token-number { font-size: 3.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.token-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; }
.token-info { font-size: 0.9rem; color: var(--text); }

/* ===== FORMS ===== */
.booking-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border-light);
}
.form-control, .form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}
.form-control:focus, .form-select:focus {
    background: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--text-light); margin-bottom: 6px; }

/* ===== AUTH ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    padding: 20px;
}
.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 44px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}
.auth-card .brand {
    font-size: 1.6rem; font-weight: 800;
    color: var(--primary); text-align: center;
    margin-bottom: 0.3rem;
}
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: var(--bg-2);
    border-right: 1px solid var(--border-light);
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    font-size: 1.2rem; font-weight: 800;
    color: var(--primary);
    display: block;
    padding: 8px 12px 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    margin-bottom: 2px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}
.sidebar .nav-item:hover, .sidebar .nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
}
.sidebar .nav-item i { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar .nav-item.theme-toggle {
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}
.sidebar .nav-item.theme-toggle:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 28px;
    min-height: 100vh;
}

/* ===== STATS ===== */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
    background: var(--primary-glow);
    color: var(--primary);
}
.stat-card h3 { font-size: 1.6rem; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.stat-card p { color: var(--text-muted); margin: 0; font-size: 0.85rem; }

/* ===== TABLES ===== */
.table { color: var(--text); margin: 0; }
.table thead th {
    background: var(--table-head-bg);
    color: var(--primary);
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}
.table tbody td {
    border-bottom: 1px solid var(--table-border);
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
}
.table tbody tr:hover { background: var(--primary-glow); }
.table-responsive {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

/* ===== BADGES ===== */
.badge { padding: 5px 12px; font-weight: 500; border-radius: 20px; font-size: 0.75rem; }
.bg-warning { background: var(--warning) !important; color: #000 !important; }
.bg-info { background: var(--info) !important; }
.bg-primary { background: var(--primary) !important; color: #fff !important; }
.bg-success { background: var(--success) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-secondary { background: #6c757d !important; }

/* ===== MODAL ===== */
.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: var(--radius);
}
.modal-header { border-bottom-color: var(--border-light); padding: 20px 24px; }
.modal-body { padding: 24px; }
.modal-footer { border-top-color: var(--border-light); padding: 16px 24px; }
.btn-close { filter: none; }
[data-theme="dark"] .btn-close { filter: invert(0.85); }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border-light);
    padding: 6px 0 env(safe-area-inset-bottom);
    z-index: 999;
    justify-content: space-around;
    backdrop-filter: blur(20px);
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 4px 12px;
    text-decoration: none;
    transition: var(--transition);
}
.mobile-bottom-nav a.active { color: var(--primary); }
.mobile-bottom-nav a i { font-size: 1.2rem; }

/* ===== QUEUE ===== */
.queue-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-3);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: var(--transition);
}
.queue-item.active {
    background: var(--primary-glow);
    border-left: 3px solid var(--primary);
}
.queue-number { font-size: 1.2rem; font-weight: 700; color: var(--primary); min-width: 60px; }

/* ===== UTILITIES ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h4 { margin: 0; font-weight: 700; font-size: 1.3rem; }
.text-primary { color: var(--primary) !important; }
.bg-dark-card { background: var(--card-bg); }
.border-primary { border-color: var(--primary) !important; }
.rounded-custom { border-radius: var(--radius); }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* ===== ANIMATIONS ===== */
.fade-in { animation: fadeIn 0.4s ease; }
.slide-up { animation: slideUp 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===== STATUS DOT ===== */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.status-dot.green { background: var(--success); }
.status-dot.yellow { background: var(--warning); }
.status-dot.red { background: var(--danger); }
.status-dot.gray { background: #6c757d; }

/* ===== PROGRESS ===== */
.progress {
    background: var(--bg-4);
    border-radius: 20px;
    height: 8px;
}
.progress-bar {
    background: var(--primary);
    border-radius: 20px;
}

/* ===== TABS ===== */
.nav-tabs { border-bottom: 1px solid var(--border-light); }
.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.9rem;
}
.nav-tabs .nav-link:hover {
    color: var(--primary) !important;
    border: none;
}
.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    background: transparent;
    border-bottom: 2px solid var(--primary);
}

/* ===== TOAST ===== */
.toast { border-radius: var(--radius-sm); }

/* ===== PAGINATION ===== */
.page-link {
    background: var(--card-bg);
    border-color: var(--border-light);
    color: var(--text);
}
.page-link:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-bottom-nav { display: flex; }
    .section { padding: 60px 0; }
}
@media (max-width: 767px) {
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stat-item h3 { font-size: 1.4rem; }
    .booking-form { padding: 24px; }
    .auth-card { padding: 28px 24px; }
    .token-number { font-size: 2.8rem; }
    .section-title { font-size: 1.5rem; }
    .stat-card { padding: 16px; }
    .stat-card h3 { font-size: 1.3rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .main-content { padding: 20px 16px; }
    .sidebar { width: 100%; max-width: 300px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.3rem; }
    .service-card, .worker-card, .pricing-card { padding: 24px; }
}
