html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #f0f4f2;
}

* { box-sizing: border-box; }

:root {
    /* RVR Hospital Official Colors (Light Mode) */
    --primary-color: #1a6644;
    --primary-dark: #0a3d28;
    --primary-light: #2a8c5e;
    --accent-color: #d4a017; /* Darker gold for white background */
    --bg-dark: #ffffff; /* White background */
    --text-main: #1a1a1a; /* Dark text */
    --text-muted: #666666;
    
    /* Light Glassmorphism */
    --glass-bg: rgba(26, 102, 68, 0.05);
    --glass-border: rgba(26, 102, 68, 0.1);
    --glass-blur: blur(15px);
    
    /* Utilities */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

/* Typography Utilities */
.text-huge { font-weight: 900; letter-spacing: -2px; color: var(--primary-color); }
.text-large { font-size: 3.5rem; font-weight: 800; color: var(--primary-color); }
.text-medium { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); }
.text-accent { color: var(--accent-color); }

.info-label {
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.info-value {
    font-weight: 800;
    color: var(--primary-dark);
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-rows: 80px 1fr 80px;
    grid-template-columns: 1fr;
    height: 100vh;
    width: 100vw;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

/* Header (Premium Green Theme) */
.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(26, 102, 68, 0.4);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}

.header .hospital-logo {
    filter: brightness(0) invert(1); /* White logo */
    position: relative;
    z-index: 2;
}

.header-left { text-align: left; padding-left: 19px; }
.header-center { text-align: center; }
.header-right { text-align: right; padding-right: 19px; }

/* Main Serving Area */
.main-serving {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: #ffffff;
}

/* Next Queue Bar */
.next-queue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: rgba(26, 102, 68, 0.03);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* Footer Ticker */
.footer-ticker {
    background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    height: 60px;
    overflow: hidden;
    position: relative;
    color: #ffffff;
    width: 100%;
    box-shadow: 0 -4px 20px rgba(26, 102, 68, 0.4);
}

.footer-ticker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.ticker-content {
    white-space: nowrap;
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    will-change: transform;
    animation: ticker-move 120s linear infinite;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    gap: 50px;
}

@keyframes ticker-move {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Doctor Image Styling */
.doctor-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

/* =============================================
   DARK GREEN / BLACKISH THEME
   ============================================= */
body.dark-mode {
    background-color: #05140d !important;
    color: #e0e7e3 !important;
}

body.dark-mode, 
body.dark-mode .main-content, 
body.dark-mode .main-scrollable,
body.dark-mode .drawer-content,
body.dark-mode .content-area,
body.dark-mode .app-container {
    background: #05140d !important;
    background-color: #05140d !important;
}

body.dark-mode .admin-top-nav, 
body.dark-mode .admin-sub-header,
body.dark-mode .sidebar,
body.dark-mode .management-card,
body.dark-mode .card-header-custom,
body.dark-mode .config-card,
body.dark-mode .modal-card,
body.dark-mode .bottom-drawer,
body.dark-mode .drawer-footer,
body.dark-mode .token-display-card,
body.dark-mode .patient-form-card,
body.dark-mode .form-container,
body.dark-mode .token-circle-area,
body.dark-mode .glass-panel,
body.dark-mode .profile-upload-container,
body.dark-mode .profile-preview,
body.dark-mode .token-card-wrapper,
body.dark-mode .patient-form-container,
body.dark-mode .bg-white,
body.dark-mode .card,
body.dark-mode .card-header,
body.dark-mode .card-body,
body.dark-mode .card-footer {
    background: #0a1f16 !important;
    background-color: #0a1f16 !important;
    border-color: rgba(68, 255, 136, 0.1) !important;
    color: #e0e7e3 !important;
}

/* Hard override for any remaining white boxes */
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background: #ffffff"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color: #ffffff"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background-color:white"] {
    background-color: #0a1f16 !important;
    background: #0a1f16 !important;
}

body.dark-mode .nav-item {
    color: #88998e !important;
    border-bottom: 1px solid rgba(26, 102, 68, 0.1) !important;
}

body.dark-mode .nav-item.active {
    background: #1a6644 !important;
    color: #44ff88 !important;
}

body.dark-mode .page-title,
body.dark-mode .nav-brand {
    color: #44ff88 !important;
}

body.dark-mode .text-gradient {
    background: linear-gradient(135deg, #44ff88 0%, #2a8c5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode input, 
body.dark-mode select, 
body.dark-mode textarea {
    background: #0d2b1e !important;
    border-color: rgba(26, 102, 68, 0.4) !important;
    color: #ffffff !important;
}

body.dark-mode .doctor-card,
body.dark-mode .summary-box {
    background: rgba(68, 255, 136, 0.05) !important;
    border-color: rgba(68, 255, 136, 0.1) !important;
}

body.dark-mode .search-box {
    background: #0d2b1e !important;
    border-color: rgba(26, 102, 68, 0.4) !important;
}

body.dark-mode .nav-icon-btn {
    background: #1a6644 !important;
    color: #44ff88 !important;
}

body.dark-mode .profile-dropdown {
    background: #0a1f16 !important;
    border-color: rgba(26, 102, 68, 0.3) !important;
}

body.dark-mode .dropdown-item {
    color: #e0e7e3 !important;
}

body.dark-mode .dropdown-item:hover {
    background: rgba(26, 102, 68, 0.2) !important;
}

body.dark-mode .nav-pills-custom {
    background: #0d2b1e !important;
}

body.dark-mode .nav-pills-custom .nav-link {
    color: #88998e !important;
}

body.dark-mode .nav-pills-custom .nav-link.active {
    background: #1a6644 !important;
    color: #44ff88 !important;
}

body.dark-mode .report-table th {
    background: #1a6644 !important;
    color: #ffffff !important;
}

body.dark-mode .report-table td {
    border-color: rgba(26, 102, 68, 0.1) !important;
}

body.dark-mode .id-badge {
    background: rgba(68, 255, 136, 0.1) !important;
    color: #44ff88 !important;
}
