:root {
    --primary: #fb6300;
    --primary-dark: #fb6300;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(135deg, #fbfbfb 0%, #fcf9ff24 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Table responsive for mobile */
@media (max-width: 768px) {
    #voterTable thead {
        display: none; /* hide table headers */
    }

    #voterTable tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 0.5rem;
    }

    #voterTable tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
        font-size: 14px;
        border-bottom: 1px dashed #e5e7eb;
    }

    #voterTable tbody td:last-child {
        border-bottom: 0;
    }

    #voterTable tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6366f1;
    }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1f36 0%, #0f1419 100%);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.sidebar-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.sidebar-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}

.sidebar-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 400;
}

.sidebar-nav {
    padding: 20px 15px;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px 10px;
    margin-top: 20px;
}

.nav-section-title:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 14px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, transparent 100%);
    transition: width 0.4s ease;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: white;
    transform: translateX(5px);
    border-color: rgba(99, 102, 241, 0.3);
}

.sidebar-link:hover::before {
    width: 100%;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: white;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #fb6300 0%, #8b5cf6 100%);
    border-radius: 10px 0 0 10px;
}

.sidebar-link i {
    width: 24px;
    font-size: 18px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.sidebar-link:hover i {
    transform: scale(1.1);
}

.sidebar-link span {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.version-badge {
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.version-badge strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 700;
}

/* Top Header */
.top-header {
    /*position: fixed;*/
    left: var(--sidebar-width);
    right: 0;
    top: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    z-index: 90;
    display: flex;
    align-items: center;
    padding: 0 30px;
    transition: all 0.4s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.hamburger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    font-size: 28px;
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.date-badge i {
    color: #fb6300;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: white;
    border-radius: 50px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-profile:hover {
    border-color: #fb6300;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.logout-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}
/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: calc(var(--sidebar-width) * -1);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .top-header {
        left: 0;
        padding: 0 15px;
    }
    
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /*.main-content {*/
    /*    margin-left: 0;*/
    /*    padding: 20px 15px;*/
    /*}*/
    
    .page-title h1 {
        font-size: 18px;
    }
    
    .date-badge {
        display: none;
    }
    
    .user-info {
        display: none;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fb6300 0%, #8b5cf6 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #fb6300 0%, #7c3aed 100%);
}


.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-icon-wrapper {
    position: relative;
}

.stat-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.2;
    filter: blur(15px);
}

.btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        padding: 10px 20px;
        border-radius: 10px;
        color: white;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    }
    
    .voter-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .voter-table thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .voter-table thead th {
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .voter-table tbody tr {
        transition: all 0.2s ease;
    }
    
    .voter-table tbody tr:hover {
        background: #f8f9ff;
        transform: scale(1.01);
    }
    
    .voter-table tbody td {
        font-size: 14px;
        color: #334155;
    }
    
    .loading-spinner {
        border: 3px solid #f3f3f3;
        border-top: 3px solid #fb6300;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin: 20px auto;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    
    /* Responsive Fix for Tracker */
    @media (max-width: 768px) {
      .content-wrapper {
        padding: 1rem;
      }
    
      .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
      }
    
      #map {
        height: 60vh !important;
      }
    }
    
    
    
    /*  This is for Google map css  */
    .map-container {
    width: 100%;
    height: 380px;                /* perfect height for mobile */
    background: #f1f1f1;
    border-radius: 16px;          /* rounded corner like mobile apps */
    overflow: hidden;             /* important for rounded map edges */
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Make map respond well */
.map-container iframe,
.map-container .map-view {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Small devices */
@media (max-width: 480px) {
    .map-container {
        height: 320px;            /* optimized for phones */
        border-radius: 14px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .map-container {
        height: 280px;
    }
}

/* Mobile 2×2 layout */
@media (max-width: 768px) {

    /* Reduce padding and make compact */
    .content-wrapper {
        padding: 10px !important;
    }

    .filter-card {
        padding: 12px !important;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    /* Convert grid to 2 columns for mobile */
    .content-wrapper .grid {
        display: grid;
        /*grid-template-columns: repeat(2, 1fr) !important;*/
        gap: 12px !important;
    }

    /* Reduce spacing inside each field */
    .content-wrapper .grid > div {
        margin-bottom: 4px !important;
    }

    /* Better looking select box */
    .filter-select {
        border: 1px solid #d1d5db;
        background: #fafafa;
        border-radius: 10px;
        padding: 10px !important;
    }

    /* Focus style */
    .filter-select:focus {
        border-color: #7c3aed;
        box-shadow: 0 0 4px rgba(124, 58, 237, 0.3);
    }

    /* Label improvements */
    .content-wrapper label {
        font-size: 13px !important;
        margin-bottom: 4px !important;
        color: #333 !important;
    }

    /* Title styling */
    .content-wrapper h2 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }
}

    
   