/* ============================================
   MedCore EHR - Healthcare Demo Styles
   Enterprise Dashboard Design
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    
    --accent-blue: #3b82f6;
    --accent-blue-dark: #2563eb;
    --accent-green: #22c55e;
    --accent-green-dark: #16a34a;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    --accent-purple: #a855f7;
    --accent-teal: #14b8a6;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --sidebar-width: 260px;
    --topbar-height: 64px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.2s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #18181b;
    --bg-secondary: #27272a;
    --bg-tertiary: #3f3f46;
    --bg-sidebar: #09090b;
    --bg-sidebar-hover: #18181b;
    
    --text-primary: #fafafa;
    --text-secondary: #d4d4d8;
    --text-muted: #71717a;
    --text-inverse: #18181b;
    
    --border-color: #3f3f46;
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-inverse);
    white-space: nowrap;
}

.logo-tag {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    margin-bottom: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-inverse);
}

.nav-item.active {
    background: var(--accent-blue);
    color: white;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    width: 100%;
}

.back-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.back-btn span {
    font-size: 14px;
    font-weight: 500;
}

.back-btn:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-inverse);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.search-box {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0 16px;
    height: 44px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-box svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-tertiary);
    border-radius: 50px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   PAGES
   ============================================ */
.page {
    display: none;
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
}

.page.active {
    display: block;
}

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

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-title p {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(59,130,246,0.1);
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-blue);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn-primary.full-width {
    width: 100%;
}

.btn-calc {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent-blue);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.btn-calc:hover {
    background: var(--accent-blue-dark);
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.link-btn:hover {
    color: var(--accent-blue-dark);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.stat-icon.blue { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: var(--accent-purple); }
.stat-icon.orange { background: rgba(245,158,11,0.1); color: var(--accent-orange); }

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Sections */
.dashboard-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Quick Calculators Grid */
.quick-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-calc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.quick-calc:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.qc-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qc-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.qc-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.qc-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Columns */
.dashboard-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Drug Quick Check */
.drug-quick-check {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drug-input-wrap {
    position: relative;
}

.drug-input-wrap input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.drug-input-wrap input:focus {
    border-color: var(--accent-blue);
}

.drug-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}

.drug-dropdown.show {
    display: block;
}

.drug-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.drug-dropdown-item:hover {
    background: var(--bg-tertiary);
}

.selected-drugs-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
}

.drug-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(59,130,246,0.1);
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 500;
    border-radius: 50px;
}

.drug-tag button {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 14px;
}

/* Vitals Quick Entry */
.vitals-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.vital-mini label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.vital-mini input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    text-align: center;
}

.vital-mini input:focus {
    border-color: var(--accent-blue);
}

.bp-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bp-inputs input {
    width: 50px;
    padding: 10px 8px;
    text-align: center;
}

.bp-inputs span {
    color: var(--text-muted);
}

.vitals-result {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.vitals-result.alert {
    background: rgba(239,68,68,0.1);
    color: var(--accent-red);
}

.vitals-result.warning {
    background: rgba(245,158,11,0.1);
    color: var(--accent-orange);
}

.vitals-result.success {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
}

/* ============================================
   CALCULATORS PAGE
   ============================================ */
.calc-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.calc-tabs::-webkit-scrollbar {
    display: none;
}

.calc-tab {
    flex-shrink: 0;
    padding: 14px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.calc-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.calc-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.calc-panel {
    display: none;
    padding: 24px;
}

.calc-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.calc-form {
    display: flex;
    flex-direction: column;
}

.calc-form h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.calc-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.input-unit {
    display: flex;
    gap: 8px;
}

.input-unit input {
    flex: 1;
    min-width: 0;
}

.input-unit select {
    width: auto;
    min-width: 70px;
}

.unit-label {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Radio & Checkbox */
.radio-row,
.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input,
.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
}

.radio-label span,
.checkbox-label span {
    font-size: 14px;
    color: var(--text-primary);
}

/* Calculator Results */
.calc-result {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.result-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    opacity: 0.5;
}

.result-placeholder span {
    font-size: 14px;
}

/* BMI Result */
.bmi-result-box {
    text-align: center;
}

.bmi-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.bmi-value.underweight { color: var(--accent-blue); }
.bmi-value.normal { color: var(--accent-green); }
.bmi-value.overweight { color: var(--accent-orange); }
.bmi-value.obese { color: var(--accent-red); }

.bmi-cat {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.bmi-scale {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bmi-scale div {
    flex: 1;
}

.bmi-scale .s-under { background: var(--accent-blue); }
.bmi-scale .s-normal { background: var(--accent-green); }
.bmi-scale .s-over { background: var(--accent-orange); }
.bmi-scale .s-obese { background: var(--accent-red); }

.bmi-marker {
    position: relative;
    height: 12px;
}

.bmi-marker span {
    position: absolute;
    width: 4px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 2px;
    transform: translateX(-50%);
}

.bmi-ranges {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

/* eGFR Result */
.egfr-result-box {
    text-align: center;
}

.egfr-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.egfr-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.egfr-stage {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.egfr-stage.g1 { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.egfr-stage.g2 { background: rgba(34,197,94,0.1); color: #22c55e; }
.egfr-stage.g3a { background: rgba(245,158,11,0.1); color: var(--accent-orange); }
.egfr-stage.g3b { background: rgba(249,115,22,0.1); color: #f97316; }
.egfr-stage.g4 { background: rgba(239,68,68,0.1); color: var(--accent-red); }
.egfr-stage.g5 { background: rgba(185,28,28,0.1); color: #b91c1c; }

.egfr-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* CrCl Result */
.crcl-result-box {
    text-align: center;
}

.crcl-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.crcl-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.crcl-adj {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.crcl-adj-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.crcl-adj-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* CVD Result */
.cvd-result-box {
    text-align: center;
}

.cvd-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.cvd-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.cvd-risk-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cvd-risk-level.low { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.cvd-risk-level.borderline { background: rgba(245,158,11,0.1); color: var(--accent-orange); }
.cvd-risk-level.intermediate { background: rgba(249,115,22,0.1); color: #f97316; }
.cvd-risk-level.high { background: rgba(239,68,68,0.1); color: var(--accent-red); }

.cvd-rec {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* MELD Result */
.meld-result-box {
    text-align: center;
}

.meld-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.meld-mortality {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.meld-mortality strong {
    color: var(--text-primary);
}

.meld-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* CHA2DS2 Score */
.score-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.score-item:hover {
    background: var(--bg-primary);
}

.score-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    flex-shrink: 0;
}

.score-item .item-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.score-item .item-pts {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.chads-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.chads-score {
    display: flex;
    align-items: baseline;
}

.score-num {
    font-size: 72px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.score-max {
    font-size: 24px;
    color: var(--text-muted);
}

.chads-risk {
    text-align: center;
}

.risk-pct {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.risk-label {
    font-size: 13px;
    color: var(--text-muted);
}

.chads-rec {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

/* ============================================
   DRUG CHECKER PAGE
   ============================================ */
.drug-checker-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    min-height: 500px;
}

.drug-search-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drug-search-wrap {
    position: relative;
}

.drug-search-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

.drug-search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.drug-search-wrap input:focus {
    border-color: var(--accent-blue);
}

.drug-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 30;
    display: none;
}

.drug-suggest.show {
    display: block;
}

.drug-suggest-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.drug-suggest-item:hover {
    background: var(--bg-tertiary);
}

.drug-suggest-item .drug-class {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 50px;
}

.selected-drugs {
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.selected-drugs .empty-msg {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px 20px;
}

.drug-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(59,130,246,0.1);
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    height: fit-content;
}

.drug-chip button {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    transition: var(--transition);
}

.drug-chip button:hover {
    opacity: 1;
}

/* Drug Results */
.drug-results-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow-y: auto;
}

.drug-results-section .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.drug-results-section .empty-state svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    opacity: 0.5;
}

.drug-results-section .empty-state p {
    font-size: 14px;
}

.interaction-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.interaction-item {
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.interaction-item.severe {
    background: rgba(239,68,68,0.05);
    border-color: var(--accent-red);
}

.interaction-item.moderate {
    background: rgba(245,158,11,0.05);
    border-color: var(--accent-orange);
}

.interaction-item.mild {
    background: rgba(59,130,246,0.05);
    border-color: var(--accent-blue);
}

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

.interaction-drugs {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.interaction-severity {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
}

.interaction-item.severe .interaction-severity {
    background: rgba(239,68,68,0.1);
    color: var(--accent-red);
}

.interaction-item.moderate .interaction-severity {
    background: rgba(245,158,11,0.1);
    color: var(--accent-orange);
}

.interaction-item.mild .interaction-severity {
    background: rgba(59,130,246,0.1);
    color: var(--accent-blue);
}

.interaction-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.no-interactions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(16,185,129,0.05);
    border-radius: var(--radius-md);
    color: var(--accent-green);
}

.no-interactions svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.no-interactions span {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   VITALS PAGE
   ============================================ */
.vitals-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.vital-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.vital-card.alert {
    border-color: var(--accent-red);
    background: rgba(239,68,68,0.02);
}

.vital-card.warning {
    border-color: var(--accent-orange);
    background: rgba(245,158,11,0.02);
}

.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.vc-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
}

.vc-status.normal {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
}

.vc-status.warning {
    background: rgba(245,158,11,0.1);
    color: var(--accent-orange);
}

.vc-status.alert {
    background: rgba(239,68,68,0.1);
    color: var(--accent-red);
}

.vc-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vc-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    outline: none;
    min-width: 0;
}

.vc-input input:focus {
    border-color: var(--accent-blue);
}

.vc-input select {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.vc-unit {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.vc-range {
    font-size: 12px;
    color: var(--text-muted);
}

.bp-input {
    justify-content: center;
}

.bp-input input {
    width: 70px;
    flex: none;
}

.bp-sep {
    font-size: 20px;
    color: var(--text-muted);
}

.bp-cat {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* Vitals Summary */
.vitals-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.vitals-summary h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.summary-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.summary-body .summary-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.summary-icon.normal { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.summary-icon.warning { background: rgba(245,158,11,0.1); color: var(--accent-orange); }
.summary-icon.alert { background: rgba(239,68,68,0.1); color: var(--accent-red); }

.summary-text {
    flex: 1;
    min-width: 0;
}

.summary-text strong {
    color: var(--text-primary);
}

/* ============================================
   DOSING PAGE
   ============================================ */
.dosing-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.dosing-sidebar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.dosing-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.param-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.param-form .form-group label {
    font-size: 12px;
}

.param-form .form-group input,
.param-form .form-group select {
    padding: 10px 12px;
    font-size: 13px;
}

.calculated-params {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cparam {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.cparam span:first-child {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cparam span:last-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Dosing Main */
.dosing-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drug-cat-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-tab {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.cat-tab:hover {
    background: var(--bg-tertiary);
}

.cat-tab.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.drug-item {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.drug-item:hover {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.02);
}

.drug-item.selected {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.05);
}

.drug-item .drug-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.drug-item .drug-generic {
    font-size: 12px;
    color: var(--text-muted);
}

/* Dose Output */
.dose-output {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 200px;
}

.dose-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    text-align: center;
    height: 100%;
    padding: 40px 20px;
}

.dose-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    opacity: 0.5;
}

.dose-placeholder p {
    font-size: 14px;
}

.dose-card {
    display: grid;
    gap: 20px;
}

.dose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dose-drug-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.dose-class {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 50px;
}

.dose-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dose-info-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.dose-info-item .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dose-info-item .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.dose-info-item .value small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.dose-notes {
    padding: 16px;
    background: rgba(59,130,246,0.05);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.dose-notes h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dose-notes p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.renal-adjustment {
    padding: 16px;
    background: rgba(245,158,11,0.05);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.renal-adjustment h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.renal-adjustment p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   PATIENTS PAGE
   ============================================ */
.patients-table-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
}

.data-table th {
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

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

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

.patient-name {
    font-weight: 600;
}

.patient-status {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
}

.patient-status.active {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
}

.patient-status.discharged {
    background: rgba(107,114,128,0.1);
    color: var(--text-muted);
}

.patient-status.critical {
    background: rgba(239,68,68,0.1);
    color: var(--accent-red);
}

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

.table-actions button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.table-actions button:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.table-actions button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.warning { border-left: 4px solid var(--accent-orange); }
.toast.info { border-left: 4px solid var(--accent-blue); }

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.toast.success .toast-icon { color: var(--accent-green); }
.toast.error .toast-icon { color: var(--accent-red); }
.toast.warning .toast-icon { color: var(--accent-orange); }
.toast.info .toast-icon { color: var(--accent-blue); }

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-calc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vitals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dose-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .drug-checker-container {
        grid-template-columns: 1fr;
    }
    
    .vitals-container {
        grid-template-columns: 1fr;
    }
    
    .dosing-container {
        grid-template-columns: 1fr;
    }
    
    .calc-panel.active {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page {
        padding: 16px;
    }
    
    .topbar {
        padding: 0 16px;
    }
    
    .search-box {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .quick-calc-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cols {
        grid-template-columns: 1fr;
    }
    
    .vitals-quick {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vitals-quick button {
        grid-column: 1 / -1;
    }
    
    .vitals-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid.cols-3 {
        grid-template-columns: 1fr;
    }
    
    .dose-info-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .quick-calc {
        padding: 12px;
    }
    
    .vital-mini {
        grid-column: span 2;
    }
    
    .bp-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .bp-inputs input {
        width: 100%;
    }
    
    .calc-tabs {
        gap: 0;
    }
    
    .calc-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

.sidebar-overlay.show {
    display: block;
}

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .menu-toggle,
    .toast-container {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page {
        display: block !important;
    }
}