/* ============================================================
   Plantech Medical BI Dashboard — Dynamic Dark Theme
   Brand: plantechmd.com
   Fonts: Noto Sans Hebrew (sans-serif)
   Colors: #147C44 (green) + #C8A951 (gold) + #121212 (bg)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Brand Colors from plantechmd.com */
    --green-primary: #147C44;
    --green-light: #22C55E;
    --green-dark: #115e33;
    --green-glow: rgba(20, 124, 68, 0.4);
    --green-subtle: rgba(34, 197, 94, 0.08);
    --green-border: rgba(34, 197, 94, 0.3);

    --gold: #C8A951;
    --gold-light: #d4b96a;
    --gold-glow: rgba(200, 169, 81, 0.3);

    --red: #ef4444;
    --red-subtle: rgba(239, 68, 68, 0.15);
    --orange: #f59e0b;
    --orange-subtle: rgba(245, 158, 11, 0.15);

    /* Backgrounds */
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --bg-input: #2a2a2a;
    --bg-sidebar: #0f0f0f;

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-white: #ffffff;

    /* Borders */
    --border-color: #2a2a2a;
    --border-light: #333333;

    /* Sizing */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--green-glow);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Hebrew', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans Hebrew', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.en-heading {
    font-family: 'Noto Sans Hebrew', Arial, sans-serif;
}

a { color: var(--green-light); text-decoration: none; }
a:hover { color: var(--gold); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(20,124,68,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(200,169,81,0.08) 0%, transparent 50%);
    padding: 20px;
}

.login-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s var(--transition-slow);
}

.login-logo-wrap {
    margin-bottom: 24px;
}

.login-logo {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(20,124,68,0.3));
}

.login-title {
    font-family: 'Noto Sans Hebrew', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 16px;
    color: var(--green-light);
    font-weight: 500;
    margin-bottom: 36px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: right;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 16px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    direction: rtl;
}

.input-group input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(20,124,68,0.2);
}

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

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 8px;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

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

.login-error {
    color: var(--red);
    font-size: 14px;
    min-height: 20px;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
    direction: rtl;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-normal), filter var(--transition-normal);
}

.sidebar-header:hover .sidebar-logo {
    transform: scale(1.03);
    filter: drop-shadow(0 2px 8px rgba(20,124,68,0.4));
}

/* ---------- Sidebar Nav ---------- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-family: 'Noto Sans Hebrew', sans-serif;
}

.nav-item:hover {
    background: var(--green-subtle);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(20,124,68,0.2), rgba(20,124,68,0.1));
    color: var(--green-light);
    font-weight: 600;
    border-right: 3px solid var(--green-primary);
}

.nav-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 16px;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 16px 4px;
}

/* ---------- Sidebar Footer ---------- */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    flex-shrink: 0;
}

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

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

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

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    color: var(--red);
    background: var(--red-subtle);
}

/* ---------- Sidebar Overlay (mobile) ---------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Top Bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 50;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.topbar-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
}

.topbar-filters {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

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

.icon-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    border-color: var(--green-primary);
    color: var(--green-light);
    background: var(--green-subtle);
}

/* ---------- Period Pills ---------- */
.period-pills {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.period-pill {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.period-pill:hover {
    color: var(--text-primary);
}

.period-pill.active {
    background: var(--green-primary);
    color: var(--text-white);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--green-glow);
}

/* ---------- Filter Panel ---------- */
.filter-panel {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    animation: slideDown 0.3s ease;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 14px;
    min-width: 140px;
    transition: border-color var(--transition-fast);
}

.filter-input:focus {
    outline: none;
    border-color: var(--green-primary);
}

.filter-sep {
    color: var(--text-muted);
    font-size: 13px;
    padding-bottom: 10px;
}

.clear-filters-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-filters-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ---------- Page Content ---------- */
.page-content {
    flex: 1;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--green-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: width var(--transition-normal);
}

.kpi-card:hover {
    border-color: var(--green-border);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.kpi-card:hover::before {
    width: 6px;
}

.kpi-card.gold::before { background: var(--gold); }
.kpi-card.red::before { background: var(--red); }
.kpi-card.orange::before { background: var(--orange); }

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.kpi-delta.positive {
    color: var(--green-light);
    background: rgba(34,197,94,0.12);
}

.kpi-delta.negative {
    color: var(--red);
    background: var(--red-subtle);
}

.kpi-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--green-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-light);
}

/* ============================================================
   CHARTS
   ============================================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: border-color var(--transition-normal);
}

.chart-card:hover {
    border-color: var(--green-border);
    box-shadow: 0 0 16px rgba(20, 124, 68, 0.15);
}

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

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

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

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.data-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.data-table-title {
    font-size: 15px;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.data-table th:hover {
    color: var(--green-light);
}

.data-table th.sorted-asc::after { content: ' ↑'; color: var(--green-light); }
.data-table th.sorted-desc::after { content: ' ↓'; color: var(--green-light); }

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
    box-shadow: inset 3px 0 0 var(--green-primary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: fit-content;
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn:hover {
    border-color: var(--green-primary);
    box-shadow: 0 4px 12px var(--green-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
    border-color: var(--green-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    transform: translateY(-1px);
}

.btn-gold {
    background: linear-gradient(135deg, #8a6914, var(--gold));
    border-color: var(--gold);
    color: var(--text-white);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 24px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 120px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-chart {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 300px;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.4s ease; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease; }
.animate-slide-in { animation: slideInRight 0.4s ease; }

/* Stagger children animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }

/* Glow pulse on active nav */
@keyframes glow-pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px var(--green-glow); }
}

.nav-item.active {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* KPI value count-up entrance */
@keyframes kpi-pop {
    0% { opacity: 0; transform: scale(0.8) translateY(8px); }
    60% { opacity: 1; transform: scale(1.03) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.kpi-value {
    animation: kpi-pop 0.5s ease forwards;
}

/* Hover glow on data table wrap */
.data-table-wrap {
    transition: box-shadow var(--transition-normal);
}

.data-table-wrap:hover {
    box-shadow: 0 0 16px rgba(20, 124, 68, 0.1);
}

/* Button ripple glow on click */
.btn-primary:active {
    box-shadow: 0 0 24px var(--green-glow);
}

/* Chart card entrance */
.chart-card {
    animation: fadeInUp 0.4s ease forwards;
}

/* ============================================================
   GAUGE (for agents page)
   ============================================================ */
.gauge-container {
    position: relative;
    width: 140px;
    height: 70px;
    margin: 0 auto;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all var(--transition-normal);
}

.alert-card:hover {
    border-color: var(--green-border);
    box-shadow: 0 0 12px rgba(20, 124, 68, 0.12);
    transform: translateX(-2px);
}

.alert-card.severity-high { border-right: 4px solid var(--red); }
.alert-card.severity-medium { border-right: 4px solid var(--orange); }
.alert-card.severity-low { border-right: 4px solid var(--gold); }

.alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-card.severity-high .alert-icon { background: var(--red-subtle); color: var(--red); }
.alert-card.severity-medium .alert-icon { background: var(--orange-subtle); color: var(--orange); }
.alert-card.severity-low .alert-icon { background: rgba(200,169,81,0.15); color: var(--gold); }

.alert-content { flex: 1; }
.alert-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.alert-desc { font-size: 13px; color: var(--text-secondary); }
.alert-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 14px; }

/* ============================================================
   TOOLTIP
   ============================================================ */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 200;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ============================================================
   RESPONSIVE — TABLET (768px)
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    .main-content {
        margin-right: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .topbar-filters {
        display: none;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 220px;
    }

    .filter-row {
        flex-direction: column;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input {
        width: 100%;
    }

    .kpi-value {
        font-size: 22px;
    }

    .kpi-card {
        padding: 14px;
    }

    .login-container {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 26px;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (480px)
   ============================================================ */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-value {
        font-size: 20px;
    }

    .topbar-title h2 {
        font-size: 16px;
    }

    .chart-container {
        height: 200px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .login-logo {
        width: 80px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .sidebar, .topbar, .hamburger-btn, .topbar-actions { display: none !important; }
    .main-content { margin-right: 0; }
    .page-content { padding: 0; }
    .kpi-card { break-inside: avoid; }
    body { background: white; color: black; }
}
