/* assets/css/main.css */
/* Tema utama JUJUR.WEB.ID - simple, profesional, ringan */

:root {
    --color-bg: #f4f7fb;
    --color-bg-alt: #ffffff;
    --color-primary: #2065d1;
    --color-primary-soft: rgba(32, 101, 209, 0.08);
    --color-primary-dark: #16468f;
    --color-danger: #e53935;
    --color-warning: #f9a825;
    --color-text: #1b2733;
    --color-text-muted: #6c7a89;
    --radius-card: 16px;
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --transition-fast: 0.18s ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

/* Layout agar footer nempel bawah kalau konten sedikit */
body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* =============================
   LAYOUT HEADER & FOOTER
   ============================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
    color: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.78rem;
    opacity: 0.9;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-user {
    font-size: 0.85rem;
    opacity: 0.92;
}

/* MAIN WRAPPER */

.main-container {
    max-width: 1080px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1rem;
}

.main-no-container {
    margin: 0;
    padding: 0;
}

/* FOOTER */

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.5);
    background: #ffffff;
    padding: 0.75rem 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.footer-separator {
    margin: 0 0.35rem;
}

.footer-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    text-decoration: underline;
}

/* =============================
   BUTTONS
   ============================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast),
                color var(--transition-fast),
                box-shadow var(--transition-fast),
                border-color var(--transition-fast),
                transform 0.08s ease-out;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.65);
}

.btn-outline:hover {
    background: rgba(15, 23, 42, 0.35);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.18);
    color: #e5edff;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.32);
}

/* Tombol outline biru untuk konten di card (Masuk) */
.btn-outline-primary {
    background: #ffffff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: rgba(32, 101, 209, 0.06);
}

/* =============================
   FORM & CARD
   ============================= */

.card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.15rem;
}

.card-header {
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.card-body {
    margin-top: 0.35rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast),
                background-color var(--transition-fast);
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.form-help {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
}

/* =============================
   ALERTS
   ============================= */

.alert {
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    font-size: 0.82rem;
    margin-bottom: 0.8rem;
}

.alert-info {
    background: var(--color-primary-soft);
    color: #1d4ed8;
}

.alert-danger {
    background: rgba(229, 57, 53, 0.08);
    color: var(--color-danger);
}

.alert-warning {
    background: rgba(249, 168, 37, 0.09);
    color: #b45309;
}

/* =============================
   HERO PORTAL SISWA
   ============================= */

.hero-card {
    margin-bottom: 1rem;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
}

/* kiri teks */
.hero-left {
    order: 1;
}

/* kanan logo */
.hero-right {
    order: 2;
    text-align: center;
}

.hero-title {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
}

.hero-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0 0 0.9rem;
}

.hero-highlight {
    margin-bottom: 0.8rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-logo-circle {
    background: radial-gradient(circle at top left, #bfdbfe, #1d4ed8);
    border-radius: 999px;
    width: 200px;
    height: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.hero-logo-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.hero-visual-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.6rem;
}

/* Mobile: stack jadi 1 kolom, logo di atas, teks di bawah */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .hero-right {
        order: 1;
    }

    .hero-left {
        order: 2;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-logo-circle {
        width: 180px;
        height: 180px;
    }

    .hero-logo-img {
        width: 120px;
        height: 120px;
    }
}

/* =============================
   GRID UJIAN SAYA
   ============================= */

.exam-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

@media (min-width: 768px) {
    .exam-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.exam-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 0.7rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.exam-card-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.exam-card-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* =============================
   UTILITIES
   ============================= */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

/* =============================
   RESPONSIVE HEADER
   ============================= */

@media (max-width: 640px) {
    .header-inner {
        padding: 0.6rem 0.75rem;
    }

    .brand-title {
        font-size: 0.9rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .header-nav {
        justify-content: flex-end;
    }
}
