/* ============================================================
   TGMD-3 VALIDATOR — STYLESHEET
   Palet: latar netral hangat, aksen teal (tenang, profesional,
   sesuai konteks asesmen klinis anak berkebutuhan khusus).
   ============================================================ */

:root {
    --color-bg: #FAFAF7;
    --color-surface: #FFFFFF;
    --color-border: #E2E0D8;
    --color-text: #232925;
    --color-text-muted: #6B6F69;
    --color-accent: #2D6A6A;
    --color-accent-dark: #1F4D4D;
    --color-pending: #C9C5B8;
    --color-partial: #C9912F;
    --color-done: #2D6A6A;
    --radius: 10px;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

h1, h2 {
    font-weight: 600;
    margin: 0 0 0.4rem;
}

/* ---------- Dashboard (nilai.php) ---------- */

.topbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 1rem;
}

.topbar h1 {
    font-size: 1.3rem;
}

.validator-name {
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
}

.progress-bar {
    background: var(--color-pending);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: var(--color-accent);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.video-list {
    padding: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

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

.kelas-group h2 {
    font-size: 1rem;
    color: var(--color-accent-dark);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
}

.video-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.15s ease;
}

.video-card:hover,
.video-card:focus-visible {
    border-color: var(--color-accent);
}

.subject-code {
    font-weight: 600;
}

.trial {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.badge {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    width: fit-content;
}

.badge-pending { background: var(--color-pending); color: #4A4A40; }
.badge-partial { background: var(--color-partial); }
.badge-done    { background: var(--color-done); }

.empty-state {
    color: var(--color-text-muted);
    text-align: center;
    padding: 2rem 1rem;
}

/* ---------- Halaman penilaian (video.php) — layout 2 kolom ---------- */

.video-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.back-link {
    color: var(--color-accent-dark);
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.video-title {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

.validator-badge {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Wrapper 2 kolom */
.scoring-layout {
    overflow: hidden;
    padding: 1rem;
    box-sizing: border-box;
}

/* Kolom kiri: video */
.col-video {
    float: left;
    width: 57%;
    position: sticky;
    top: 1rem;
}

#player {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    background: #000;
}

.player-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.player-controls button {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.82rem;
    cursor: pointer;
}

.player-controls button:hover {
    border-color: var(--color-accent);
}

/* Kolom kanan: form */
.col-form {
    float: right;
    width: 40%;
}

.kriteria-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kriteria-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--color-surface);
    margin: 0;
}

.kriteria-item legend {
    font-size: 0.88rem;
    padding: 0;
    line-height: 1.4;
}

.radio-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.radio-label:hover        { border-color: var(--color-accent); background: #eaf4f4; }
.radio-label.selected-ya  { background: #d4edda; border-color: #2D6A6A; color: #1F4D4D; font-weight: 600; }
.radio-label.selected-tidak { background: #fde8e8; border-color: #B3423C; color: #7a1f1a; font-weight: 600; }

.catatan-label {
    display: block;
    margin: 0.75rem 0 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
}

textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    box-sizing: border-box;
}

#btn-submit {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem;
    border: none;
    border-radius: var(--radius);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

#btn-submit:disabled      { opacity: 0.6; cursor: default; }
#btn-submit:hover:not(:disabled) { background: var(--color-accent-dark); }

#form-message {
    min-height: 1.2em;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    text-align: center;
}

/* HP: tumpuk vertikal */
@media (max-width: 680px) {
    .col-video,
    .col-form {
        float: none;
        width: 100%;
        position: static;
    }
    .validator-badge { display: none; }
}

.message-success { color: var(--color-accent-dark); }
.message-error { color: #B3423C; }

/* ---------- Halaman selesai & error ---------- */

.finish-page,
.error-page {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
    padding: 0 1rem;
}

.finish-page h1,
.error-page h1 {
    font-size: 1.4rem;
    color: var(--color-accent-dark);
}

/* ---------- Aksesibilitas ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .progress-fill {
        transition: none;
    }
}