/* ==========================================================================
   SKYNAV MATSC E-VOTING DESIGN SYSTEM
   ========================================================================== */

   :root {
    /* Color Palette */
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-glow: rgba(2, 132, 199, 0.12);
    
    --secondary: #64748b;
    --secondary-hover: #475569;
    
    --success: #059669;
    --success-hover: #047857;
    --success-glow: rgba(5, 150, 105, 0.12);
    
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-outline: rgba(220, 38, 38, 0.08);
    
    /* Layout & Styling Tokens */
    --font-family: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --glass-blur: 20px;
    --transition-speed: 0.3s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f1f5f9;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   DYNAMIC BACKGROUND GLOW
   ========================================================================== */

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    top: -200px;
    right: -100px;
    animation: floatGlow1 20s infinite alternate ease-in-out;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(0,0,0,0) 70%);
    bottom: -150px;
    left: -100px;
    animation: floatGlow2 20s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 80px) scale(1.15); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, -60px) scale(1.1); }
}

/* ==========================================================================
   GLASSMORPHISM COMPONENT
   ========================================================================== */

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
    transition: transform var(--transition-speed) var(--transition-curve),
                border-color var(--transition-speed) var(--transition-curve),
                box-shadow var(--transition-speed) var(--transition-curve);
}

/* ==========================================================================
   LOGIN CARD & ANIMATIONS
   ========================================================================== */

#login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s var(--transition-curve),
                opacity 0.5s var(--transition-curve);
    z-index: 100;
}

#login-container.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.logo-area {
    text-align: center;
    margin-bottom: 35px;
}

.app-logo {
    height: 70px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 12px var(--primary-glow));
}

.logo-area h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.subtitle {
    font-size: 13px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ==========================================================================
   INPUTS & FORM ELEMENTS
   ========================================================================== */

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-speed),
                box-shadow var(--transition-speed);
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.input-group input:focus + i {
    color: var(--primary);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-curve);
    gap: 8px;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 14px 0 var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--success-glow);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 10px;
    border-radius: 50%;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo-img {
    height: 48px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.brand h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.tagline {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--primary);
}

/* ==========================================================================
   MAIN APP LAYOUT
   ========================================================================== */

.app-main {
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.app-section {
    animation: fadeIn 0.4s var(--transition-curve);
}

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

/* ==========================================================================
   BANNER & BADGES
   ========================================================================== */

.voting-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    margin-bottom: 30px;
}

.banner-text h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.banner-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.user-status-badge.pending {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--primary);
}

/* ==========================================================================
   TOOLBAR & FILTERS
   ========================================================================== */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all var(--transition-speed);
}

.search-bar input:focus {
    border-color: var(--primary);
    background: rgba(248, 250, 252, 0.85);
}

.stat-bubble {
    padding: 10px 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--card-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   CANDIDATE GRID & CARDS
   ========================================================================== */

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.candidate-card {
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.candidate-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 12px 24px 0 rgba(15, 23, 42, 0.1);
}

.avatar-wrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(255,255,255,0) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.candidate-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f1f5f9;
}

/* Initials Avatar if image missing */
.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #0f172a;
    background: linear-gradient(135deg, #cbd5e1 0%, #e2e8f0 100%);
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.candidate-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.candidate-pos {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.candidate-nik {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
}

/* ==========================================================================
   THANK YOU AREA
   ========================================================================== */

#thank-you-area {
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto 0;
}

.icon-success {
    font-size: 70px;
    color: var(--success);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--success-glow));
}

#thank-you-area h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
}

#thank-you-area p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   ADMIN LAYOUT & WORKSPACE
   ========================================================================== */

.admin-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 30px;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-control-card {
    padding: 24px;
}

.admin-control-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.admin-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

.stat-row .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-row .val {
    font-size: 14px;
    font-weight: 700;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--primary);
}

.divider {
    border: none;
    border-top: 1px solid var(--card-border);
    margin: 20px 0;
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-card {
    padding: 24px;
}

.chart-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}

.chart-container-large {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Admin Tally Main Card */
.tally-card {
    padding: 30px;
}

.tally-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.tally-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.tally-tabs {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn.active {
    background: var(--card-border);
    color: var(--text-primary);
}

.tab-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tally-tab-content {
    display: none;
}

.tally-tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.admin-table th {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--card-border);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #000;
}
.rank-2 {
    background: linear-gradient(135deg, #cbd5e1 0%, #64748b 100%);
    color: #000;
}
.rank-3 {
    background: linear-gradient(135deg, #fb923c 0%, #c2410c 100%);
    color: #000;
}

.table-cand-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-cand-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

.table-cand-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

.btn-group-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.04);
    padding: 3px;
    border-radius: 6px;
    width: 140px;
    margin: 0 auto;
}

.toggle-btn {
    border: none;
    flex: 1;
    font-size: 10px;
    font-weight: 700;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all var(--transition-speed);
}

.toggle-btn.btn-yes.active {
    background: var(--success);
    color: var(--text-primary);
}

.toggle-btn.btn-no.active {
    background: var(--danger);
    color: var(--text-primary);
}

/* ==========================================================================
   MODALS / DIALOGS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal var(--transition-speed) var(--transition-curve);
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    width: 90%;
    max-width: 480px;
    padding: 35px;
    text-align: center;
    animation: scaleInModal 0.4s var(--transition-curve);
}

@keyframes scaleInModal {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.modal-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-meta-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 23, 42, 0.04);
    border-radius: var(--radius-sm);
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.modal-candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--card-border);
}

.modal-candidate-info {
    display: flex;
    flex-direction: column;
}

.modal-candidate-info .position {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.modal-candidate-info .nik {
    font-size: 11px;
    color: var(--text-muted);
}

.modal-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
    font-size: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.hidden {
    display: none !important;
}

.mt-20 {
    margin-top: 20px;
}

.button-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.form-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
}

.form-footer a {
    color: var(--primary);
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .glass-header {
        padding: 15px 20px;
    }
    
    .app-main {
        padding: 20px;
    }

    .voting-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        max-width: none;
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   FORM DATA KARYAWAN (ADMIN)
   ========================================================================== */

.employee-form {
    padding: 22px;
    margin-bottom: 25px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.02);
}

.employee-form h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.employee-form.editing {
    border-color: rgba(2, 132, 199, 0.35);
    background: rgba(2, 132, 199, 0.04);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-field .required {
    color: var(--danger);
}

.form-field input {
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all var(--transition-speed);
}

.form-field input:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.form-field input:disabled {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-field small {
    font-size: 11px;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.row-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-row {
    padding: 6px 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-row:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-row.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-row:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-row:disabled:hover {
    border-color: var(--card-border);
    color: var(--text-secondary);
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-pill.voted {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.status-pill.idle {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-secondary);
}

.status-pill.admin {
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary);
}

@media (max-width: 640px) {
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

.duration-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.5);
}

.duration-row label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duration-row input {
    width: 64px;
    padding: 6px 8px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.duration-row input:focus {
    border-color: var(--primary);
}

.duration-row input:disabled {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-muted);
    cursor: not-allowed;
}

.duration-unit {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: auto;
}

/* ==========================================================================
   ABSENSI HARI-H
   ========================================================================== */

.absensi-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.absensi-head > i {
    font-size: 30px;
    color: var(--primary);
    margin-top: 2px;
}

.absensi-head h2 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }

.absensi-head p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.absensi-identitas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    padding: 18px;
    margin-bottom: 22px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}

.ai-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.ai-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-item strong { font-size: 14px; font-weight: 700; line-height: 1.4; word-break: break-word; }

.absensi-label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.absensi-pilihan {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.absensi-opsi { cursor: pointer; }

.absensi-opsi input { position: absolute; opacity: 0; pointer-events: none; }

.opsi-isi {
    display: block;
    padding: 20px 18px;
    border: 2px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    text-align: center;
    transition: all var(--transition-speed);
}

.opsi-isi i { display: block; font-size: 26px; color: var(--text-muted); margin-bottom: 10px; }

.opsi-isi strong { display: block; font-size: 15px; font-weight: 800; margin-bottom: 4px; }

.opsi-isi small { font-size: 11.5px; color: var(--text-secondary); line-height: 1.4; }

.absensi-opsi:hover .opsi-isi { border-color: var(--primary); }

.absensi-opsi input:checked + .opsi-isi {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.07);
}

.absensi-opsi input:checked + .opsi-isi i { color: var(--success); }

.absensi-selesai,
.absensi-tertutup {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
}

.absensi-selesai {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.absensi-selesai i { font-size: 26px; color: var(--success); }

.absensi-selesai strong { display: block; font-size: 14px; font-weight: 800; margin-bottom: 2px; }

.absensi-selesai span { font-size: 12.5px; color: var(--text-secondary); }

.absensi-tertutup {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 13px;
}

.absensi-tertutup i { font-size: 20px; color: var(--text-muted); }

/* ==========================================================================
   JALUR PEMILIHAN
   ========================================================================== */

.jalur-card { padding: 24px; margin-bottom: 25px; }

.jalur-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}

.jalur-head h3 { font-size: 16px; font-weight: 800; }

.jalur-desc { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }

.jalur-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 18px;
}

.jalur-stat {
    padding: 13px 16px; background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--card-border); border-radius: var(--radius-sm);
}

.jalur-stat .label {
    display: block; font-size: 10.5px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px;
}

.jalur-stat strong { font-size: 20px; font-weight: 900; color: var(--primary); }

.jalur-penjelasan {
    padding: 13px 16px; margin-bottom: 16px; border-radius: var(--radius-sm);
    background: rgba(2, 132, 199, 0.06); border: 1px solid rgba(2, 132, 199, 0.2);
    font-size: 12.5px; line-height: 1.6; color: var(--text-secondary);
}

.jalur-daftar { margin-bottom: 16px; }

.jalur-baris {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border: 1px solid var(--card-border); border-radius: var(--radius-sm); margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5); font-size: 13px;
}

.jalur-baris .urut {
    width: 26px; height: 26px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--primary);
    color: #fff; font-size: 11px; font-weight: 800;
}

.jalur-baris .nama { font-weight: 700; }

.jalur-baris .ket { margin-left: auto; font-size: 12px; color: var(--text-secondary); }

.jalur-aksi { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   LAMBANG MUSCAB V
   ========================================================================== */

.logo-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 6px;
}

.app-logo-muscab {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(2, 132, 199, 0.3);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.header-logo-muscab {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--card-border);
    margin-left: -4px;
}

@media (max-width: 640px) {
    .header-logo-muscab { display: none; }
}

/* ==========================================================================
   TATA TERTIB PEMILIHAN
   ========================================================================== */

.tatib-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.tatib-head > i { font-size: 30px; color: var(--primary); margin-top: 2px; }

.tatib-head h2 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }

.tatib-head p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.tatib-isi {
    max-height: 340px;
    overflow-y: auto;
    padding: 20px 22px;
    margin-bottom: 20px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}

.tatib-isi p {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.tatib-isi ul { margin: 0 0 14px 2px; padding: 0; list-style: none; }

.tatib-isi li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.tatib-isi li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.tatib-centang {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px 17px;
    margin-bottom: 16px;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(2, 132, 199, 0.04);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    cursor: pointer;
}

.tatib-centang input { margin-top: 3px; flex-shrink: 0; }

#btn-tatib-lanjut:disabled { opacity: 0.5; cursor: not-allowed; }

/* Keterangan cara kehadiran yang sudah ditetapkan panitia, bukan pilihan.
   Tampilannya menyerupai kartu pilihan terpilih supaya tidak terasa asing. */
.absensi-opsi-tetap { cursor: default; }

.absensi-opsi-tetap .opsi-isi {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.07);
}

.absensi-opsi-tetap .opsi-isi i { color: var(--success); }

/* Panel rekap suara offline pada tabel perolehan Tahap 2. */
.offline-rekap {
    display: flex; justify-content: space-between; align-items: center;
    gap: 18px; flex-wrap: wrap;
    margin-top: 18px; padding: 16px 18px;
    border: 1px dashed var(--border); border-radius: 14px;
    background: rgba(14, 165, 164, 0.04);
}

.offline-rekap strong { display: block; font-size: 14px; margin-bottom: 4px; }

.offline-rekap p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; max-width: 540px; }

.offline-rekap-aksi { display: flex; align-items: center; gap: 12px; }

.input-offline {
    width: 90px; padding: 7px 10px; text-align: center;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 700;
    background: var(--card-bg); color: var(--text-primary);
}

.input-offline:focus { outline: none; border-color: var(--primary); }

/* Panel penetapan nomor urut calon pada tabel perolehan Tahap 1. */
.nomor-urut-baris { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }

.nomor-urut-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 13px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--card-bg);
}

.nomor-urut-item strong { display: block; font-size: 13px; line-height: 1.3; }

.nomor-urut-item span { font-size: 11px; color: var(--text-secondary); }

.input-nomor { width: 64px; text-align: center; font-weight: 800; }

/* Pengunggah foto karyawan pada formulir admin. */
.unggah-foto { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.unggah-foto input[type="file"] { flex: 1 1 200px; font-size: 13px; }

.pratinjau-foto {
    display: flex; align-items: center; gap: 12px;
    margin-top: 10px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--card-bg);
}

.pratinjau-foto img {
    width: 56px; height: 56px; border-radius: 10px;
    object-fit: cover; display: block;
}

.pratinjau-foto span { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* Kartu kendali mode simulasi pada panel admin. Warnanya dibedakan dari
   kendali pemilihan sungguhan supaya tidak tertukar saat hari-H. */
.kartu-simulasi {
    border: 1px dashed #b45309; border-radius: 14px;
    padding: 14px 16px; margin-bottom: 12px;
    background: rgba(180, 83, 9, 0.05);
}

.simulasi-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.simulasi-kepala strong { font-size: 14px; color: #b45309; }

.simulasi-ket { margin: 8px 0 12px; font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }

.simulasi-baris { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; }

.simulasi-baris input {
    width: 70px; padding: 6px 9px; text-align: center; font-weight: 700;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--card-bg); color: var(--text-primary); font-family: inherit;
}

.simulasi-aksi { display: flex; flex-wrap: wrap; gap: 6px; }

.simulasi-info { margin-top: 10px; font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }

.simulasi-tautan {
    display: inline-block; margin-top: 10px;
    font-size: 12px; font-weight: 600; color: #b45309; text-decoration: none;
}
