@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;600;700&display=swap');

:root { 
    /* Tema Utama Pre-Test: Orange Pekat */
    --ugm-primary: #D35400; 
    --ugm-primary-hover: #b04600;
    
    /* Tema sekunder/warning: Kuning/Emas */
    --ugm-orange: #F2C94C; 
    
    /* Tema Navigasi & Aksen: Biru UGM */
    --ugm-navy: #003D79;   
    
    /* Tema background: Orange/Peach Sangat Lembut */
    --gform-bg: #fff5eb; 
    --gform-border: #dadce0;
}

body { 
    background-color: var(--gform-bg) !important; 
    /* FONT DIUBAH KE COMFORTAA (Gaya Modern/Rounded) */
    font-family: 'Comfortaa', cursive, sans-serif !important; 
    user-select: none; 
    overflow-x: hidden;
    color: #2C3E50;
}

input, select, button, textarea, .form-control {
    font-family: 'Comfortaa', cursive, sans-serif !important;
}

#mainWrapper { transition: filter 0.4s ease; }
.swal2-container { z-index: 999999 !important; font-family: 'Comfortaa', cursive, sans-serif !important; }
.is-blurred { filter: blur(12px); pointer-events: none; }

/* --- STYLE GOOGLE FORMS LOGIN --- */
.gform-container { max-width: 640px; margin: 40px auto; padding: 0 15px; }

.gform-header-card {
    background: white; 
    border-radius: 8px;
    border: 1px solid var(--gform-border);
    padding: 30px 24px;
    margin-bottom: 12px;
}
.gform-title { font-size: 2.2rem; color: #202124; line-height: 1.2; margin-bottom: 10px; font-weight: 700; }
.gform-subtitle { font-size: 1rem; color: #5f6368; }
.gform-divider { border-bottom: 1px solid var(--gform-border); margin: 20px 0; }
.gform-required-info { font-size: 0.9rem; color: #d93025; }

.gform-card {
    background: white; border-radius: 8px;
    border: 1px solid var(--gform-border);
    padding: 24px; margin-bottom: 12px;
    transition: box-shadow 0.2s;
}
.gform-card:focus-within {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding-left: 19px;  
    border-left: 5px solid var(--ugm-primary);
}

.gform-label { font-size: 1.1rem; color: #202124; margin-bottom: 8px; display: block; font-weight: bold; }
.gform-desc { font-size: 0.95rem; color: #5f6368; margin-bottom: 15px; }
.asterisk { color: #d93025; }

.gform-input {
    width: 100%; max-width: 350px;
    border: none; border-bottom: 1px solid #d1d5db;
    border-radius: 0; padding: 8px 0;
    font-size: 1.05rem; color: #202124;
    background: transparent; outline: none;
    transition: border-bottom 0.3s ease;
}
.gform-input:focus { border-bottom: 2px solid var(--ugm-primary); }

.gform-select {
    width: 100%; max-width: 350px;
    padding: 10px; border-radius: 4px;
    border: 1px solid var(--gform-border);
    font-size: 1.05rem; color: #202124; outline: none;
}
.gform-select:focus { border: 2px solid var(--ugm-primary); padding: 9px; }

.gform-footer-buttons { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.btn-gform-submit {
    background: var(--ugm-primary); color: white; border: none;
    padding: 10px 24px; border-radius: 4px; font-weight: 700; font-size: 1rem;
    transition: all 0.2s ease;
}
.btn-gform-submit:hover { background: var(--ugm-primary-hover); transform: translateY(-1px); }
.btn-gform-clear {
    background: transparent; color: var(--ugm-primary); border: none;
    font-weight: 700; font-size: 1rem; cursor: pointer;
}
.btn-gform-clear:hover { background: rgba(211, 84, 0, 0.05); border-radius: 4px; }
.gform-footer-text { text-align: center; font-size: 0.85rem; color: #5f6368; margin-top: 30px; line-height: 1.5; }

#violationOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 999990; display: none; }

/* EFEK KLIK TOMBOL MULAI */
.btn-start-clicked {
    background-color: #198754 !important; 
    border-color: #198754 !important;
    transform: scale(0.95);
    transition: all 0.2s ease;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2);
}

/* KURSOR UNTUK HEADER TABEL SORTING (ADMIN) */
th.sortable { cursor: pointer; white-space: nowrap; transition: background 0.2s; }
th.sortable:hover { background-color: #e2e8f0; }

/* ================= TIMER BERKEDIP MERAH (< 1 Menit) ================= */
.timer-warning {
    background-color: #dc3545 !important; /* Merah Alert */
    color: white !important;
    border-color: #ffc107 !important; /* Border kuning agar mencolok */
    animation: kedipBahaya 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes kedipBahaya {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 15px rgba(220, 53, 69, 0.8); }
    50% { opacity: 0.6; transform: scale(0.97); box-shadow: none; }
}

/* --- STYLE ADMIN DASHBOARD --- */
.admin-body { background: #f4f6f9 !important; }
.card { border: none; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 20px; }
.stat-box { padding: 20px; border-radius: 12px; color: white; text-align: center; }

#loginAdminWrapper { height: 100vh; display: flex; justify-content: center; align-items: center; }
.login-box { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }

/* =========================================================
   MEMAKSA SEMUA ELEMEN BOOTSTRAP MENJADI ORANGE (PRE-TEST)
========================================================== */
.text-primary { color: var(--ugm-primary) !important; }
.bg-primary { background-color: var(--ugm-primary) !important; }

.btn-primary { 
    background-color: var(--ugm-primary) !important; 
    border-color: var(--ugm-primary) !important; 
    color: white !important;
}
.btn-primary:hover { 
    background-color: var(--ugm-primary-hover) !important; 
    border-color: var(--ugm-primary-hover) !important; 
}

/* Membajak Tab Menu (Nav Pills) Admin */
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: var(--ugm-primary) !important;
    color: white !important;
}
.nav-pills .nav-link { color: var(--ugm-primary); font-weight: 600; }
.nav-pills .nav-link:hover { color: var(--ugm-primary-hover); background-color: rgba(211, 84, 0, 0.05); }

/* --- OVERRIDE WARNA ORANGE UGM --- */
.bg-soft-orange { background-color: #fdf5f0 !important; }
.btn-outline-primary { border-color: var(--ugm-primary) !important; color: var(--ugm-primary) !important; }
.btn-outline-primary:hover { background-color: var(--ugm-primary) !important; color: white !important; }

/* Kustomisasi Input Form Modern */
.custom-input { border-radius: 8px; border: 2px solid #e9ecef; transition: all 0.3s ease; background-color: #f8f9fa; }
.custom-input:focus { border-color: var(--ugm-primary); background-color: white; box-shadow: 0 0 0 0.25rem rgba(211, 84, 0, 0.15); }

/* --- KUSTOMISASI RADIO BUTTON JAWABAN (MODERN CARD UI) --- */
.gform-radio-option {
    display: flex; align-items: flex-start;
    margin-bottom: 15px; padding: 15px 20px;
    border: 2px solid #e9ecef; border-radius: 12px;
    cursor: pointer; transition: all 0.2s ease;
    background-color: white;
}
.gform-radio-option:hover { border-color: var(--ugm-orange); background-color: #fff9f5; }
.gform-radio-option.selected {
    border-color: var(--ugm-primary); background-color: rgba(211, 84, 0, 0.05);
    box-shadow: 0 4px 8px rgba(211, 84, 0, 0.1);
}
.gform-radio-circle { width: 24px; height: 24px; border: 2px solid #adb5bd; border-radius: 50%; margin-right: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; margin-top: 2px; }
.gform-radio-option.selected .gform-radio-circle { border-color: var(--ugm-primary); }
.gform-radio-option.selected .gform-radio-circle::after { content: ""; width: 14px; height: 14px; background-color: var(--ugm-primary); border-radius: 50%; }

/* ================= WARNA GRID ANGKA NAVIGASI ================= */

/* 1. Bentuk Dasar Kotak Angka */
.nav-grid-btn {
    width: 42px; height: 42px;
    border-radius: 8px; border: 2px solid #dee2e6;
    background-color: white; color: #495057;
    font-weight: bold; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease; font-size: 1rem;
}
.nav-grid-btn:hover { border-color: var(--ugm-navy); color: var(--ugm-navy); }

/* 2. Jika Sudah Dijawab -> Biru UGM */
.nav-grid-btn.answered { 
    background-color: var(--ugm-navy); 
    border-color: var(--ugm-navy); 
    color: white; 
}

/* 3. Jika Sedang Aktif di Nomor Tersebut -> Highlight Oranye */
.nav-grid-btn.current { 
    border-color: var(--ugm-orange); 
    color: var(--ugm-primary); 
    box-shadow: 0 0 0 4px rgba(211, 84, 0, 0.2); 
    transform: scale(1.1); 
    font-size: 1.1rem;
    z-index: 2; /* Menjaga agar bayangannya tidak tertimpa kotak sebelahnya */
}

/* 4. Jika Sudah Dijawab DAN Sedang Aktif */
.nav-grid-btn.answered.current { 
    background-color: var(--ugm-navy); 
    color: white; 
    border-color: var(--ugm-orange); 
}
