:root {
    --primary: #6d28d9;
    --primary-dark: #4c1d95;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-soft: #f5f3ff;
    --text-dark: #1e1b2e;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--bg-soft);
    color: var(--text-dark);
}

/* ===== HALAMAN LOGIN / PUBLIK ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, #1e1b2e 100%);
    padding: 24px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.auth-card .brand-side {
    background: radial-gradient(circle at top left, #7c3aed, #4c1d95);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-card .brand-side::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.auth-card .form-side {
    padding: 48px;
}

.brand-logo {
    width: 64px; height: 64px;
    background: rgba(255,255,255,.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 12px;
    transition: .25s;
}
.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(109,40,217,.35);
    color: #fff;
}

.form-control-custom {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
}
.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(109,40,217,.15);
}

/* ===== KARTU KANDIDAT (SURAT SUARA) ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 32px 0;
    border-radius: 0 0 28px 28px;
    margin-bottom: 32px;
}

.kandidat-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: .25s;
    height: 100%;
    background: #fff;
}
.kandidat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(109,40,217,.18);
}

.kandidat-card .foto-wrap {
    height: 220px;
    background: #ede9fe;
    display: flex; align-items:center; justify-content:center;
    overflow: hidden;
}
.kandidat-card .foto-wrap img {
    width: 100%; height: 100%; object-fit: cover;
}

.nomor-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--secondary);
    color: #fff;
    font-weight: 700;
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    z-index: 2;
}

.btn-pilih {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 10px;
    width: 100%;
}
.btn-pilih:hover { color: #fff; opacity: .9; }

/* ===== ADMIN LAYOUT ===== */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-dark), #1e1b2e);
    min-height: 100vh;
    color: #fff;
    width: 260px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    padding: 24px 0;
    z-index: 1000;
}
.admin-sidebar .brand {
    padding: 0 24px 24px;
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 16px;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.75);
    padding: 12px 24px;
    text-decoration: none;
    font-size: .95rem;
    transition: .2s;
    border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-left-color: var(--secondary);
}
.admin-content {
    margin-left: 260px;
    padding: 28px 32px;
}
@media (max-width: 991px) {
    .admin-sidebar { width: 100%; position: relative; min-height: auto; }
    .admin-content { margin-left: 0; }
}

.stat-card {
    border-radius: 18px;
    padding: 24px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,.1);
}
.stat-card .icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,.2);
    display: flex; align-items:center; justify-content:center;
    font-size: 20px;
    margin-bottom: 12px;
}
.stat-card h3 { font-weight: 700; margin-bottom: 0; }
.stat-card p { opacity: .85; margin-bottom: 0; font-size: .85rem; }

.bg-grad-1 { background: linear-gradient(135deg, #6d28d9, #4c1d95); }
.bg-grad-2 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-grad-3 { background: linear-gradient(135deg, #10b981, #059669); }
.bg-grad-4 { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.card-custom {
    border: none;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

.table thead th {
    border-bottom: 2px solid #ede9fe;
    color: #6b7280;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-status-buka { background: var(--success); }
.badge-status-tutup { background: var(--danger); }

.winner-banner {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 20px;
    padding: 28px;
    color: #452c00;
    text-align: center;
    box-shadow: 0 15px 35px rgba(245,158,11,.35);
}

/* ===== Tambahan untuk Laravel: tombol logout (form POST) di sidebar ===== */
.admin-sidebar form { margin: 0; }
.admin-sidebar button.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: none;
    border: 0;
    border-left: 3px solid transparent;
    color: rgba(255,255,255,.75);
    padding: 12px 24px;
    font-size: .95rem;
    text-align: left;
    transition: .2s;
}
.admin-sidebar button.sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-left-color: var(--secondary);
}
