/* ============================================
   VoteMaster — Design System
   Premium Dark Mobile-First UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
    /* Backgrounds */
    --bg-primary: #080816;
    --bg-secondary: #0e0e24;
    --bg-card: #151530;
    --bg-card-hover: #1c1c3d;
    --bg-input: #1e1e40;
    --bg-input-focus: #252552;
    --bg-overlay: rgba(8, 8, 22, 0.85);

    /* Accent Colors */
    --accent-primary: #4f6af5;
    --accent-primary-glow: rgba(79, 106, 245, 0.25);
    --accent-hover: #6380ff;
    --accent-active: #3a53d4;

    /* Mood Colors */
    --mood-green: #22c55e;
    --mood-green-bg: rgba(34, 197, 94, 0.12);
    --mood-green-border: rgba(34, 197, 94, 0.3);
    --mood-orange: #f59e0b;
    --mood-orange-bg: rgba(245, 158, 11, 0.12);
    --mood-orange-border: rgba(245, 158, 11, 0.3);
    --mood-red: #ef4444;
    --mood-red-bg: rgba(239, 68, 68, 0.12);
    --mood-red-border: rgba(239, 68, 68, 0.3);

    /* Turnout */
    --voted-black: #212529;
    --turnout-blue: #3b82f6;

    /* Text */
    --text-primary: #f0f0ff;
    --text-secondary: #a0a0c0;
    --text-muted: #6b6b8d;
    --text-inverse: #080816;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);

    /* 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-blue: 0 0 20px rgba(79, 106, 245, 0.3);
    --shadow-glow-green: 0 0 20px rgba(34, 197, 94, 0.3);
    --shadow-glow-red: 0 0 20px rgba(239, 68, 68, 0.3);

    /* Spacing */
    --nav-height: 64px;
    --bottom-nav-height: 72px;
    --page-padding: 16px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }

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

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

a { color: var(--accent-primary); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Layout ── */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    background: var(--bg-primary);
}

.page-content {
    padding: var(--page-padding);
    padding-top: calc(var(--nav-height) + 12px);
    padding-bottom: calc(var(--bottom-nav-height) + 48px + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
}

/* ── Top Navigation Bar ── */
.top-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: rgba(8, 8, 22, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-padding);
    z-index: 1000;
}

.top-nav h1 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-nav h1 .icon { font-size: 1.4rem; }

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

.top-nav-actions .nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.top-nav-actions .nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ── Bottom Navigation Bar ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--bottom-nav-height);
    background: rgba(14, 14, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    gap: 16px;
    padding: 12px 16px 0 16px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.bottom-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
    text-decoration: none;
    position: relative;
    flex: 0 0 auto;
    min-width: 64px;
}

.bottom-nav a .nav-icon {
    font-size: 1.3rem;
    transition: var(--transition-spring);
}

.bottom-nav a:hover, .bottom-nav a.active {
    color: #5c67f2;
}

.bottom-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #5c67f2;
    border-radius: 4px;
}

.bottom-nav a.active .nav-icon {
    background: rgba(92, 103, 242, 0.1);
    padding: 4px 16px;
    border-radius: 16px;
    transform: scale(1.05);
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-medium);
}

.card-glass {
    background: rgba(21, 21, 48, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow-blue);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-primary:active {
    background: var(--accent-active);
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
    background: var(--bg-input-focus);
    border-color: var(--border-strong);
}

.btn-green {
    background: var(--mood-green);
    color: white;
    box-shadow: var(--shadow-glow-green);
}
.btn-green:hover { filter: brightness(1.1); }

.btn-red {
    background: var(--mood-red);
    color: white;
    box-shadow: var(--shadow-glow-red);
}
.btn-red:hover { filter: brightness(1.1); }

.btn-orange {
    background: var(--mood-orange);
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}
.btn-whatsapp:hover { background: #20bd5a; }

.btn-dark {
    background: var(--voted-black);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-capsule {
    border-radius: var(--radius-full);
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ── Mood Badges ── */
.mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-spring);
    user-select: none;
}

.mood-badge:active {
    transform: scale(0.92);
}

.mood-badge.mood-green {
    background: var(--mood-green-bg);
    color: var(--mood-green);
    border: 1px solid var(--mood-green-border);
}

.mood-badge.mood-orange {
    background: var(--mood-orange-bg);
    color: var(--mood-orange);
    border: 1px solid var(--mood-orange-border);
}

.mood-badge.mood-red {
    background: var(--mood-red-bg);
    color: var(--mood-red);
    border: 1px solid var(--mood-red-border);
}

.voted-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-spring);
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    user-select: none;
}

.voted-badge:active {
    transform: scale(0.92);
}

.voted-badge.voted-yes {
    background: var(--voted-black);
    color: white;
    border-color: var(--voted-black);
}

/* ── Progress Bars ── */
.progress-bar-container {
    margin-bottom: 14px;
}

.progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.progress-label-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-label-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
    border-radius: var(--radius-full);
}

.progress-fill.blue { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.progress-fill.green { background: linear-gradient(90deg, #16a34a, #4ade80); }
.progress-fill.orange { background: linear-gradient(90deg, #d97706, #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, #dc2626, #f87171); }

/* ── Form Elements ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ── Search Bar ── */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-container .form-input {
    padding-left: 42px;
}

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

.filter-tab {
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.filter-tab:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-tab.active {
    background: #5c67f2;
    color: white;
    border-color: #5c67f2;
    box-shadow: 0 4px 12px rgba(92,103,242,0.3);
}

/* ── Voter Card ── */
.voter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.voter-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.voter-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.voter-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.voter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.voter-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.voter-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

/* ── Stat Cards ── */
.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ── Alert Cards ── */
.alert-card {
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-card.alert-danger {
    background: var(--mood-red-bg);
    border: 1px solid var(--mood-red-border);
}

.alert-card.alert-warning {
    background: var(--mood-orange-bg);
    border: 1px solid var(--mood-orange-border);
}

.alert-card.alert-success {
    background: var(--mood-green-bg);
    border: 1px solid var(--mood-green-border);
}

.alert-card .alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-card .alert-content {
    flex: 1;
}

.alert-card .alert-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.alert-card .alert-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Upload Zone ── */
.upload-zone {
    display: block;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: var(--bg-card);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(79, 106, 245, 0.05);
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.upload-zone .upload-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.upload-zone .upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.file-input-hidden {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    inset: auto auto 0 0;
}

/* ── Voter Slip ── */
.voter-slip {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #1a1a2e;
    max-width: 400px;
    margin: 0 auto;
}

.voter-slip-header {
    background: linear-gradient(135deg, #1a1a5e, #2d2d7a);
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voter-slip-header .slip-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.voter-slip-header .slip-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.voter-slip-candidate {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f0f4ff;
    border-bottom: 1px solid #e0e6f0;
}

.voter-slip-candidate img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid #1a1a5e;
}

.voter-slip-body {
    padding: 16px 20px;
}

.voter-slip-body .slip-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.voter-slip-body .slip-row:last-child {
    border-bottom: none;
}

.voter-slip-body .slip-row .slip-label {
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
}

.voter-slip-body .slip-row .slip-value {
    font-weight: 700;
    color: #1a1a2e;
    text-align: right;
}

.voter-slip-footer {
    padding: 12px 20px;
    background: #f8f8fc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #888;
    border-top: 1px solid #eee;
}

.voter-slip-booth {
    padding: 12px 20px;
    background: #f0f4ff;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #333;
}

/* ── EVM Simulator ── */
.evm-container {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    overflow: hidden;
}

.evm-header {
    background: linear-gradient(135deg, #1a1a3e, #252560);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.evm-header h2 {
    font-size: 1rem;
    color: white;
}

.evm-header .evm-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--mood-green);
    font-weight: 600;
}

.evm-header .evm-status .led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mood-green);
    animation: led-pulse 2s infinite;
}

@keyframes led-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.evm-serial {
    padding: 8px 20px;
    background: var(--bg-secondary);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.evm-slot {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
    gap: 12px;
}

.evm-slot:hover {
    background: var(--bg-card-hover);
}

.evm-slot-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.evm-slot-info {
    flex: 1;
    min-width: 0;
}

.evm-candidate-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.evm-party {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.evm-symbol {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.evm-vote-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.evm-led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #222;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    transition: var(--transition-fast);
}

.evm-led.active {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.9), inset 0 0 4px rgba(255, 255, 255, 0.4);
}

.evm-vote-btn {
    width: 60px;
    height: 36px;
    border-radius: 20px;
    background: #2563eb;
    border: 2px solid #1e3a8a;
    border-bottom: 4px solid #1e3a8a;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.evm-vote-btn:hover {
    background: #3b82f6;
    transform: translateY(1px);
    border-bottom-width: 3px;
}

.evm-vote-btn:active {
    transform: translateY(4px);
    border-bottom-width: 0px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.evm-nota {
    padding: 12px 20px;
    text-align: center;
    border-top: 2px solid var(--border-medium);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--mood-red);
}

/* VVPAT Fullscreen UI */
.vvpat-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vvpat-esc-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    border: 1px solid rgba(255,255,255,0.2);
}

.vvpat-unit {
    width: 320px;
    background: #1c2130;
    border-radius: 12px;
    border: 4px solid #2d3748;
    box-shadow: 0 0 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.vvpat-unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 2px solid #2d3748;
}

.vvpat-unit-title {
    color: #e2e8f0;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.vvpat-unit-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.vvpat-window-container {
    padding: 24px 20px;
}

.vvpat-window-inner {
    background: #0f111a;
    border-radius: 8px;
    height: 380px;
    border: 2px solid #000;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.vvpat-meta {
    display: none;
}

.vvpat-slip {
    background: #e8e6df; /* Paper-like off-white */
    width: 220px;
    position: absolute;
    top: -400px; /* Start hidden above */
    padding: 16px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-top: 3px dotted #aaa;
    border-bottom: 3px dotted #aaa;
    display: flex;
    flex-direction: column;
}

.vvpat-slip-header {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: left;
    color: #000;
    letter-spacing: -0.2px;
}

.vvpat-slip-divider {
    border-bottom: 1.5px solid #000;
    margin: 8px 0 12px 0;
}

.vvpat-slip-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}

.vvpat-slip-slot {
    background: #333;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
}

.vvpat-slip-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #000;
    text-align: right;
    line-height: 1.2;
    word-wrap: break-word;
}

.vvpat-slip-symbol-container {
    border: 1.5px solid #000;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: transparent;
}

.vvpat-slip-symbol-img {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.vvpat-slip-party {
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #000;
}

.vvpat-meta-inner {
    margin-top: 2px;
    font-family: monospace;
    font-size: 0.7rem;
    color: #444;
    line-height: 1.4;
    text-align: left;
}

@keyframes vvpat-drop {
    0% { top: -400px; }
    20% { top: 20px; }
    80% { top: 20px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* ── Import Log ── */
.import-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.import-item .import-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.import-item .import-info {
    flex: 1;
}

.import-item .import-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.import-item .import-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.import-item .import-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.mood-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}
.mood-green { background: #e8f5e9; color: var(--mood-green); }
.mood-red { background: #ffebee; color: var(--mood-red); }
.mood-orange { background: #fff3e0; color: var(--mood-orange); }

/* New Pill Badges for Redesigned Cards */
.mood-badge-pill, .voted-badge-pill, .action-badge-pill {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.mood-badge-pill.mood-green { background: #e8f5e9; color: var(--mood-green); }
.mood-badge-pill.mood-orange { background: #fff3e0; color: var(--mood-orange); }
.mood-badge-pill.mood-red { background: #ffebee; color: var(--mood-red); }

.mood-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.voted-badge-pill {
    background: #e1f5fe; color: #0288d1;
}
.voted-badge-pill.voted-yes {
    background: #e8f5e9; color: #2e7d32;
}

.action-badge-pill.whatsapp-badge { background: #e8f5e9; color: #2e7d32; }
.action-badge-pill.phone-badge { background: #f5f5f5; color: #424242; }
.action-badge-pill.disabled { opacity: 0.6; cursor: not-allowed; }

.import-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.import-status.success { background: var(--mood-green-bg); color: var(--mood-green); }
.import-status.partial { background: var(--mood-orange-bg); color: var(--mood-orange); }
.import-status.failed { background: var(--mood-red-bg); color: var(--mood-red); }
.import-status.processing { background: var(--accent-primary-glow); color: var(--accent-primary); }

/* ── Section Headers ── */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header .section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.section-header .section-title {
    font-size: 1rem;
    font-weight: 700;
}

.section-header .section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Modal / Overlay ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-medium);
    margin: 0 auto 16px;
}

/* ── Toast / Notification ── */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    z-index: 4000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: calc(100% - 32px);
    font-size: 0.85rem;
    font-weight: 500;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success { border-color: var(--mood-green-border); }
.toast.toast-error { border-color: var(--mood-red-border); }

/* ── Loading Spinner ── */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
}

.loading-overlay .loading-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state .empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state .empty-text {
    font-size: 0.85rem;
}

/* ── Phone Link Suggestion ── */
.phone-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.phone-suggestion:hover {
    border-color: var(--accent-primary);
}

.phone-suggestion .phone-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.phone-suggestion .phone-number {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ── Login Page Redesign ── */
.login-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-primary);
    overflow: hidden;
    z-index: -1;
}

.login-blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.login-blob-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: var(--accent-primary);
}

.login-blob-2 {
    bottom: -10%; right: -10%;
    width: 60vw; height: 60vw;
    background: #4f46e5;
    animation-delay: -5s;
}

.login-blob-3 {
    top: 40%; left: 60%;
    width: 40vw; height: 40vw;
    background: #ec4899;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.login-container {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(var(--bg-card-rgb, 30, 30, 40), 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    padding: 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-circle {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
    color: white;
}

.login-header h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--mood-red);
    color: var(--mood-red);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 24px;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    font-size: 1.1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 48px;
    background: rgba(var(--bg-input-rgb, 10, 10, 20), 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 52px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

[data-theme="light"] .input-with-icon .form-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.input-with-icon .form-input:focus {
    background: var(--bg-input);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-btn {
    height: 52px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
    border: none;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(79, 70, 229, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.w-full { width: 100%; }
.hidden { display: none !important; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue { background: var(--accent-primary-glow); color: var(--accent-primary); }

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 400ms ease-out;
}

.animate-slide-up {
    animation: slideUp 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Responsive ── */
@media (min-width: 768px) {
    .app-container {
        border-left: 1px solid var(--border-subtle);
        border-right: 1px solid var(--border-subtle);
    }
}

/* ── PWA Safe Areas ── */
@supports (padding: max(0px)) {
    .top-nav {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   LIGHT MODE THEME
   ============================================ */
[data-theme="light"] {
    /* Backgrounds */
    --bg-primary: #f0f2f8;
    --bg-secondary: #e8eaf2;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9ff;
    --bg-input: #f0f2f8;
    --bg-input-focus: #e5e8f5;
    --bg-overlay: rgba(0, 0, 0, 0.4);

    /* Text */
    --text-primary: #1a1a2e;
    --text-secondary: #555575;
    --text-muted: #8888a5;
    --text-inverse: #ffffff;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.16);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow-blue: 0 4px 16px rgba(79, 106, 245, 0.2);
    --shadow-glow-green: 0 4px 16px rgba(34, 197, 94, 0.15);
    --shadow-glow-red: 0 4px 16px rgba(239, 68, 68, 0.15);

    /* Mood — slightly adjusted for light bg */
    --mood-green-bg: rgba(34, 197, 94, 0.1);
    --mood-green-border: rgba(34, 197, 94, 0.25);
    --mood-orange-bg: rgba(245, 158, 11, 0.1);
    --mood-orange-border: rgba(245, 158, 11, 0.25);
    --mood-red-bg: rgba(239, 68, 68, 0.08);
    --mood-red-border: rgba(239, 68, 68, 0.2);
    --accent-primary-glow: rgba(79, 106, 245, 0.1);
}

/* Light mode overrides for specific elements */
[data-theme="light"] body {
    background: var(--bg-primary);
}

[data-theme="light"] .top-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .login-container {
    background: linear-gradient(180deg, #e8eaf5 0%, #d5d8ed 100%);
}

[data-theme="light"] .login-card {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .login-logo h1 {
    background: linear-gradient(135deg, #3a4ed0, #7c5cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .modal-content {
    background: #ffffff;
}

[data-theme="light"] .evm-container {
    background: #e8eaed;
    border: 2px solid #ccc;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.7), 0 8px 24px rgba(0,0,0,0.15);
}

[data-theme="light"] .evm-header {
    background: #d0d4da;
    border-bottom: 2px solid #bbc0c8;
}

[data-theme="light"] .evm-header h2 {
    color: #333;
}

[data-theme="light"] .evm-serial {
    background: #dde0e6;
    color: #555;
    border-bottom: 1px solid #c0c4cc;
}

[data-theme="light"] .evm-slot {
    border-bottom: 1px solid #d1d5db;
    background: #f3f4f6;
}

[data-theme="light"] .evm-slot:hover {
    background: #ffffff;
}

[data-theme="light"] .evm-slot-number,
[data-theme="light"] .evm-symbol {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

[data-theme="light"] .evm-vote-btn {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 0 #1d4ed8, 0 6px 8px rgba(0,0,0,0.2);
}

[data-theme="light"] .evm-vote-btn:active {
    background: #2563eb;
    box-shadow: 0 0 0 #1d4ed8, inset 0 2px 4px rgba(0,0,0,0.3);
}

[data-theme="light"] .progress-bar {
    background: #e5e7ef;
}

[data-theme="light"] .voter-slip {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .upload-zone {
    background: #fafbff;
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .upload-zone:hover,
[data-theme="light"] .upload-zone.dragover {
    background: rgba(79, 106, 245, 0.04);
    border-color: var(--accent-primary);
}

[data-theme="light"] .form-input::placeholder {
    color: #aaa;
}

[data-theme="light"] .toast {
    background: #ffffff;
    color: #1a1a2e;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

/* ── Theme & Language Toggle Buttons ── */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0;
}

.toggle-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.toggle-btn.active-toggle {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.lang-toggle {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.theme-toggle {
    font-size: 1rem;
}

.toggle-separator {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
    margin: 0 2px;
}

/* ── Circular Charts ── */
.circular-chart-container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.circular-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.circular-chart {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.circular-chart::before {
    content: '';
    position: absolute;
    inset: 6px;
    background: var(--bg-card);
    border-radius: 50%;
    z-index: 1;
}
.circular-chart-value {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}
.circular-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   IMPERSONATION BAR
   ============================================ */
.impersonation-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    flex-wrap: wrap;
    text-align: center;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.impersonation-bar-admin {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}
.impersonation-bar-agent {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
}
.impersonation-bar-text {
    display: flex;
    align-items: center;
    gap: 6px;
}
.impersonation-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
}
.impersonation-bar-btn:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-1px);
}

/* Adjust page content when impersonation bar is visible */
.has-impersonation-bar {
    padding-top: 8px;
}

/* Super Admin Settings Modal */
.sa-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sa-modal-overlay.active {
    display: flex;
}
.sa-modal {
    background: var(--bg-card);
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    animation: saModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes saModalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.sa-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.sa-btn-primary {
    background: var(--accent);
    color: #fff;
}
.sa-btn-cancel {
    background: var(--bg-hover);
    color: var(--text-primary);
}
