/* style.css - VoterSetu Modern Dashboard Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(26, 36, 56, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
    --real-accent: #10b981;
    --real-bg: rgba(16, 185, 129, 0.12);
    --false-accent: #f59e0b;
    --false-bg: rgba(245, 158, 11, 0.12);
    --unmapped-accent: #ef4444;
    --unmapped-bg: rgba(239, 68, 68, 0.12);
    --leader-accent: #a855f7;
    --leader-bg: rgba(168, 85, 247, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.4);
}

/* Modern Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* Dedicated Login View - Executive Modern Aesthetics */
.login-screen-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
    background: #080c16;
}

/* Ambient Glowing Background Orbs */
.login-glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(100px);
}

.login-glow-orb.orb-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(79, 70, 229, 0.15) 70%, transparent 100%);
    animation: orbDrift1 18s ease-in-out infinite alternate;
}

.login-glow-orb.orb-2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(59, 130, 246, 0.15) 70%, transparent 100%);
    animation: orbDrift2 22s ease-in-out infinite alternate;
}

.login-glow-orb.orb-3 {
    width: 320px;
    height: 320px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    animation: orbPulse 12s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes orbDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -50px) scale(1.1); }
}

@keyframes orbPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.35; }
}

/* Glassmorphism Card Container */
.login-box-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 440px;
    padding: 34px 32px;
    position: relative;
    z-index: 10;
    overflow: hidden;
    animation: cardFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.login-box-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #3b82f6 33%, #06b6d4 66%, #a855f7 100%);
}

/* Top bar: Portal Tag + Lang Pill */
.login-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.portal-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 9999px;
}

.portal-tag i {
    color: #6366f1;
}

.lang-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-pill-btn:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

/* Emblem & Header */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.emblem-wrapper {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emblem-ring {
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #a855f7);
    filter: blur(8px);
    opacity: 0.65;
    animation: ringPulse 4s ease-in-out infinite alternate;
}

@keyframes ringPulse {
    0% { opacity: 0.45; filter: blur(6px); }
    100% { opacity: 0.85; filter: blur(10px); }
}

.emblem-box {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.login-main-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 70%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.84rem;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 400;
}

.login-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.22);
    padding: 3px 12px;
    border-radius: 9999px;
    margin-top: 10px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 7px;
}

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

.field-icon {
    position: absolute;
    left: 15px;
    color: #64748b;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.25s ease;
}

.modern-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 13px 44px 13px 44px;
    font-size: 0.94rem;
    color: #f8fafc;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.modern-input::placeholder {
    color: #64748b;
    font-size: 0.88rem;
}

.modern-input:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 16px rgba(99, 102, 241, 0.15);
}

.input-container:focus-within .field-icon {
    color: #818cf8;
}

/* Defeat Chrome browser autofill background styling & yellow tint */
.modern-input:-webkit-autofill,
.modern-input:-webkit-autofill:hover, 
.modern-input:-webkit-autofill:focus, 
.modern-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.95) inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
}

.pwd-eye-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 8px;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwd-eye-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

/* Alert Banner */
.login-alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.84rem;
    padding: 11px 14px;
    border-radius: 10px;
    animation: alertShake 0.35s ease;
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Submit Button */
.login-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #3b82f6 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 14px 22px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 24px -5px rgba(99, 102, 241, 0.45);
    position: relative;
    overflow: hidden;
}

.login-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -5px rgba(99, 102, 241, 0.6);
    filter: brightness(1.08);
}

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

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Card Footer Security Notice */
.login-card-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.security-info-pill {
    font-size: 0.74rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1.4;
}

.security-info-pill i {
    color: #10b981;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.35);
}

.brand-info h1 {
    font-family: 'Outfit', 'Noto Sans Devanagari', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.booth-select {
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booth-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.lang-toggle-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* First-time Language Selection Modal Cards */
.lang-choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.lang-choice-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-choice-card:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.lang-choice-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.lang-choice-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.lang-choice-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.lang-choice-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* User Role Badge & Switcher */
.user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #38bdf8;
}

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

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.role-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.role-tag.ssa {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.role-tag.admin {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.role-tag.user {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.role-switch-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.role-switch-btn:hover {
    background: var(--primary);
    color: white;
}

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

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.primary::before { background: var(--primary-gradient); }
.stat-card.real::before { background: var(--real-accent); }
.stat-card.false::before { background: var(--false-accent); }
.stat-card.houses::before { background: #3b82f6; }
.stat-card.leaders::before { background: var(--leader-accent); }
.stat-card.ratio::before { background: #ec4899; }

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Navigation Tabs */
.tabs-nav {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.tab-btn .badge-pill {
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

/* Filter Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-box input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px 10px 38px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.chip-btn.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
    color: #a5b4fc;
}

/* Voters Grid / Table */
.voters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.voter-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    transition: all 0.2s ease;
}

.voter-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.voter-card.is-leader-card {
    border-color: rgba(168, 85, 247, 0.4);
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, rgba(17, 24, 39, 0.75) 100%);
}

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

.voter-serial {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.voter-epic {
    font-family: 'Outfit', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.voter-names {
    margin-top: 4px;
}

.name-hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.name-english {
    font-size: 0.88rem;
    font-weight: 500;
    color: #94a3b8;
}

.voter-relations {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voter-meta-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-real {
    background: var(--real-bg);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-false {
    background: var(--false-bg);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-unmapped {
    background: var(--unmapped-bg);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-leader {
    background: var(--leader-bg);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.voter-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 6px;
}

.btn-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #e2e8f0;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.15s ease;
    flex: 0 0 auto;
}

.voter-actions .btn-action {
    flex: 1;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-action.btn-leader {
    background: rgba(168, 85, 247, 0.1);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.25);
}

.btn-action.btn-leader:hover {
    background: var(--leader-accent);
    color: white;
}

/* Houses Mapping View */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.house-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.2s ease;
}

.house-card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md);
}

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

.house-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.house-roster {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.house-member-row {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.house-member-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    animation: modalScale 0.2s ease-out;
    box-sizing: border-box;
    margin: auto;
    position: relative;
}

.modal-body {
    overflow-y: auto !important;
    max-height: calc(90vh - 140px);
    padding-right: 4px;
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #cbd5e1;
}

.form-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: white;
    font-size: 0.95rem;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.makan-preview-box {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
}

.makan-preview-box.real {
    background: var(--real-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    display: block;
}

.makan-preview-box.false {
    background: var(--false-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Audit Table */
.audit-table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.audit-table th {
    background: rgba(15, 23, 42, 0.9);
    padding: 12px 16px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.audit-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.audit-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.page-btn.active {
    background: var(--primary);
    color: white;
}

/* API Docs Section */
.code-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    color: #38bdf8;
    margin-top: 10px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.25s ease;
}

.toast.success { border-color: var(--real-accent); }
.toast.error { border-color: var(--unmapped-accent); }

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

@media (max-width: 768px) {
    .container { padding: 12px; }
    .top-header { flex-direction: column; align-items: stretch; }
    .header-controls { flex-direction: column; align-items: stretch; }
    .voters-grid { grid-template-columns: 1fr; }
    .houses-grid { grid-template-columns: 1fr; }
}
