/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #00d4ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f0f4f8;
    --dark-text: #1f2937;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-text);
}

/* ===== NAVBAR ===== */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
}

.navbar-brand-custom {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand-custom i {
    font-size: 2rem;
}

.navbar-text-custom {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
}

.logout-link {
    color: var(--accent-color) !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-link:hover {
    color: white !important;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease;
}

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

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.login-body {
    padding: 2rem 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
    outline: none;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}

.alert-custom {
    border-radius: 8px;
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-danger-custom {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===== VOTING PAGE ===== */
.voting-container {
    padding: 2rem 0;
    min-height: 100vh;
}

.voting-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    animation: slideUp 0.5s ease;
}

.voting-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voting-header h2 i {
    font-size: 1.8rem;
}

.status-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, #00a8cc 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    background: linear-gradient(135deg, #f0f4f8 0%, #e0e7ff 100%);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

.user-info strong {
    color: var(--primary-color);
}

/* ===== VOTING CARDS ===== */
.voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.voting-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease;
}

.voting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.voting-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voting-card-header i {
    font-size: 1.8rem;
}

.voting-card-body {
    padding: 1.5rem;
}

.form-select-custom {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.form-select-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
    outline: none;
}

.btn-submit {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.voted-badge {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.voted-badge i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.success-alert {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid var(--success-color);
}

/* ===== ADMIN PAGE ===== */
.admin-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-admin {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn-admin-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}

.btn-admin-secondary {
    background: #e5e7eb;
    color: var(--dark-text);
    border: 2px solid #d1d5db;
}

.btn-admin-secondary:hover {
    background: #d1d5db;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.result-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    animation: slideUp 0.5s ease;
}

.result-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.result-card-body {
    padding: 1.5rem;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th {
    background: #f3f4f6;
    color: var(--dark-text);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.result-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-table tr:hover {
    background: #f9fafb;
}

.vote-count {
    background: linear-gradient(135deg, var(--accent-color) 0%, #00a8cc 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
}

/* ===== TAB NAVIGATION ===== */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: var(--dark-text);
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .voting-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-group {
        width: 100%;
        justify-content: flex-start;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .voting-card-header {
        font-size: 1.1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== KANDIDAT OPTIONS STYLE ===== */
.kandidat-option {
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #e5e7eb !important;
}

.kandidat-option:hover {
    border-color: #3b82f6 !important;
    background-color: #f8fafc;
    transform: translateX(5px);
}

.kandidat-option input[type="radio"]:checked + label {
    color: #3b82f6;
}

.kandidat-option input[type="radio"]:checked ~ label img {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.kandidat-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
