/* Custom CSS for Election Management System */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding-top: 0;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        padding-top: 0;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .page-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-inactive {
    background-color: #f8d7da;
    color: #842029;
}

.status-pending {
    background-color: #fff3cd;
    color: #664d03;
}

.status-verified {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background-color: #f8d7da;
    color: #842029;
}

.election-elected {
    background-color: #d1e7dd;
    color: #0f5132;
}

.election-contesting {
    background-color: #cff4fc;
    color: #055160;
}

.election-defeated {
    background-color: #f8d7da;
    color: #842029;
}

.election-withdrawn {
    background-color: #e2e3e5;
    color: #41464b;
}

.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.dashboard-card .card-body {
    padding: 2rem;
}

.dashboard-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0;
}

.btn-close {
    filter: invert(1);
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Mobile Tab System */
.mobile-tabs {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tabs {
        display: block;
        margin-bottom: 1rem;
    }
    
    .mobile-tab-content {
        display: none;
    }
    
    .mobile-tab-content.active {
        display: block;
    }
    
    .mobile-tab-nav {
        display: flex;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-tab-nav .nav-link {
        flex: 1;
        text-align: center;
        padding: 0.75rem 0.5rem;
        border: none;
        background: transparent;
        color: #6c757d;
        font-size: 0.85rem;
        white-space: nowrap;
        border-radius: 0;
    }
    
    .mobile-tab-nav .nav-link.active {
        background: var(--primary-color);
        color: white;
    }
    
    .mobile-tab-nav .nav-link i {
        display: block;
        margin-bottom: 0.25rem;
        font-size: 1.2rem;
    }
    
    /* Hide desktop content on mobile */
    .desktop-only {
        display: none;
    }
    
    /* Mobile form improvements */
    .mobile-form .row {
        margin: 0;
    }
    
    .mobile-form .col-md-4,
    .mobile-form .col-md-8 {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .mobile-form .card {
        margin-bottom: 1rem;
    }
    
    /* Mobile table improvements */
    .mobile-table {
        font-size: 0.8rem;
    }
    
    .mobile-table th,
    .mobile-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .mobile-table .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Mobile dashboard cards */
    .dashboard-card h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-card p {
        font-size: 0.9rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    /* Mobile navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Mobile status badges */
    .status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Mobile buttons */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-group-sm .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
