:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #2af598 0%, #009efd 100%);
    --accent-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --radius-lg: 1rem;
    --radius-md: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body.voter-body {
    background-color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.modern-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.btn-modern {
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-modern-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-modern-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
    color: white;
}

.btn-modern-secondary {
    background: #f1f5f9;
    color: var(--text-primary);
}

.btn-modern-secondary:hover {
    background: #e2e8f0;
}

/* Candidate Grid Styling */
#candidate_list ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

#candidate_list li.candidate-item {
    list-style: none;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    margin: 0 !important;
    cursor: pointer;
    user-select: none;
}

#candidate_list li.candidate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
    border-color: #e2e8f0;
}

#candidate_list li.candidate-item.selected {
    border-color: #667eea !important;
    background-color: #f5f7ff !important;
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.2) !important;
}

.selection-control {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.candidate-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid #f1f5f9;
}

.candidate-name {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.instruction-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
}

.instruction-banner p {
    margin: 0 !important;
    color: #64748b;
    font-weight: 500;
}

.modern-card .box-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-card .box-title .gradient-text {
    font-size: 1.8rem;
}

.icheckbox_modern, .iradio_modern {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .modern-card {
        padding: 1rem;
    }
    .candidate-photo {
        width: 80px;
        height: 80px;
    }
}

/* Auth Pages Style */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    padding: 2.5rem;
}

.auth-logo {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white;
}

/* Sidebar and Navbar Overrides for Voters */
.voter-body .main-header .navbar,
.voter-body .main-header .logo {
    background: var(--primary-gradient) !important;
    border: none !important;
}

.voter-body .main-header .navbar .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.voter-body .main-sidebar {
    background-color: #1e1b4b !important; /* Deep indigo */
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.voter-body .sidebar-menu > li.header {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.4) !important;
    padding: 20px 25px 10px 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.voter-body .sidebar-menu > li > a {
    border-left: 3px solid transparent !important;
    padding: 12px 20px 12px 25px !important;
    transition: all 0.3s ease;
}

.voter-body .sidebar-menu > li:hover > a,
.voter-body .sidebar-menu > li.active > a {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border-left-color: #667eea !important;
}

.voter-body .user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 15px;
}

/* Fix for Content Wrapper background */
.voter-body .content-wrapper {
    background-color: #f8fafc !important;
}

/* Adjusting the Sidebar user panel text */
.voter-body .user-panel > .info > p {
    font-weight: 600;
    color: white;
}
