/* ================================================================
 * HORIZON THEME — Portal Hotspot SMKN 3 Surakarta
 * File  : assets/horizon.css
 * Keterangan : Tema visual Horizon. Menggantikan styles.css dan
 *              from_style.css pada semua halaman portal.
 *              school-shell.css (header/footer) tetap dimuat terpisah.
 * ================================================================ */

/* ── Token warna Horizon ──────────────────────────────────────── */
:root {
    --hz-bg-from       : #0f172a;   /* Langit malam – pojok kiri atas */
    --hz-bg-mid        : #1e1b4b;   /* Indigo dalam */
    --hz-bg-to         : #312e81;   /* Indigo – langit senja */
    --hz-glow          : #f59e0b;   /* Amber – cahaya horizon */
    --hz-glow-soft     : rgba(245,158,11,.15);

    --hz-primary       : #6366f1;   /* Indigo terang */
    --hz-primary-dark  : #4f46e5;
    --hz-primary-light : #e0e7ff;
    --hz-accent        : #f59e0b;   /* Amber */
    --hz-accent-dark   : #d97706;
    --hz-danger        : #ef4444;
    --hz-success       : #10b981;

    --hz-card-bg       : rgba(255,255,255,.97);
    --hz-card-border   : rgba(99,102,241,.15);
    --hz-card-shadow   : 0 24px 64px rgba(15,23,42,.35), 0 2px 8px rgba(99,102,241,.12);

    --hz-input-bg      : #f8faff;
    --hz-input-border  : #c7d2fe;
    --hz-input-focus   : #6366f1;

    --hz-text-heading  : #1e1b4b;
    --hz-text-body     : #475569;
    --hz-text-muted    : #94a3b8;

    --hz-radius-card   : 24px;
    --hz-radius-input  : 12px;
    --hz-radius-btn    : 12px;

    --hz-font          : 'Fredoka', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --hz-font-ui       : Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Reset dasar (hanya untuk konteks body school-shell-page) ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Background halaman ─────────────────────────────────────── */
body.school-shell-page {
    font-family: var(--hz-font);
    background:
        /* lapisan atas: grid tipis berwarna indigo transparan */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 39px,
            rgba(99,102,241,.05) 40px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 39px,
            rgba(99,102,241,.05) 40px
        ),
        /* gradien langit malam → senja */
        linear-gradient(160deg,
            var(--hz-bg-from) 0%,
            var(--hz-bg-mid)  45%,
            var(--hz-bg-to)   70%,
            #7c3aed            85%,
            #b45309            100%
        ) !important;
}

/* Hilangkan glow shapes lama yang konflik */
body.school-shell-page .background-shapes { display: none !important; }

/* ── Area konten utama (dari school-shell.css .school-main-content) ── */
.school-main-content {
    padding: 36px 16px 56px !important;
    align-items: flex-start !important;
}

/* ── Container halaman ──────────────────────────────────────── */
body.school-shell-page .container {
    width: min(460px, calc(100% - 24px));
    font-size: 16px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* ── Card / login-box ───────────────────────────────────────── */
.login-box,
.main-card,
.form-container,
.status-card {
    background : var(--hz-card-bg) !important;
    border     : 1px solid var(--hz-card-border) !important;
    border-radius: var(--hz-radius-card) !important;
    box-shadow : var(--hz-card-shadow) !important;
    padding    : 36px 32px 32px !important;
    animation  : hz-slide-up .45s cubic-bezier(.22,1,.36,1) both !important;
}

@keyframes hz-slide-up {
    from { opacity: 0; transform: translateY(28px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Header / judul di dalam card ──────────────────────────── */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1,
h1 {
    color      : var(--hz-text-heading) !important;
    font-size  : 26px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    line-height: 1.2;
}

/* Logo / brand icon di dalam card */
.brand-icon,
.header .brand-icon {
    height      : 72px !important;
    width       : auto !important;
    margin-bottom: 12px !important;
    filter      : drop-shadow(0 4px 12px rgba(99,102,241,.25));
    display     : block;
    margin-left : auto;
    margin-right: auto;
}

/* brand-header (index.php) */
.brand-header {
    text-align   : center;
    margin-bottom: 20px;
}
.brand-header h1 {
    color    : var(--hz-text-heading) !important;
    font-size: 24px !important;
}
.brand-header p {
    color    : var(--hz-text-body);
    font-size: 15px;
}

.header p {
    color    : var(--hz-text-body);
    font-size: 15px;
    font-weight: 500;
}

/* ── Formulir ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

label,
.form-label {
    display    : flex;
    align-items: center;
    gap        : 7px;
    color      : var(--hz-primary-dark) !important;
    font-size  : 14px !important;
    font-weight: 600 !important;
    margin-bottom: 7px !important;
    font-family: var(--hz-font-ui);
}

label .icon { font-size: 17px; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="numeric"],
select,
textarea {
    width       : 100%;
    padding     : 13px 16px;
    border      : 1.5px solid var(--hz-input-border);
    border-radius: var(--hz-radius-input);
    font-size   : 15px;
    font-family : var(--hz-font);
    background  : var(--hz-input-bg);
    color       : #1e293b;
    transition  : border-color .2s ease, box-shadow .2s ease, transform .15s ease;
    outline     : none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--hz-input-focus) !important;
    box-shadow  : 0 0 0 3px rgba(99,102,241,.18), 0 2px 6px rgba(99,102,241,.12);
    background  : #fff !important;
    transform   : translateY(-1px);
}

input::placeholder { color: var(--hz-text-muted); }

/* Input dengan ikon di dalam (index.php) */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-left: 44px;
}

.input-icon {
    position : absolute;
    left     : 14px;
    top      : 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color    : var(--hz-primary);
    pointer-events: none;
    z-index  : 2;
}

/* toggle mata password */
.toggle-password {
    position : absolute;
    right    : 14px;
    top      : 50%;
    transform: translateY(-50%);
    cursor   : pointer;
    font-size: 18px;
    color    : var(--hz-text-muted);
    z-index  : 10;
    user-select: none;
    transition : color .2s;
}
.toggle-password:hover { color: var(--hz-primary); }

/* Input wrapper dengan toggle: beri ruang kanan, HAPUS padding-left berlebih */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 46px !important;
}

/* input-group-custom (force_setup.php) */
.input-group-custom {
    position: relative;
    display : flex;
    align-items: center;
}
.input-group-custom input {
    flex: 1;
    padding-right: 46px !important;
}

/* ── Tombol utama ───────────────────────────────────────────── */
.btn-login {
    width        : 100%;
    padding      : 14px 20px;
    background   : linear-gradient(135deg, var(--hz-primary) 0%, var(--hz-primary-dark) 100%);
    border       : none;
    border-radius: var(--hz-radius-btn);
    color        : #fff !important;
    font-size    : 17px;
    font-weight  : 700;
    font-family  : var(--hz-font);
    cursor       : pointer;
    display      : flex;
    justify-content: center;
    align-items  : center;
    gap          : 8px;
    transition   : transform .2s ease, box-shadow .2s ease, filter .2s;
    box-shadow   : 0 8px 24px rgba(99,102,241,.4);
    margin-top   : 8px;
    text-decoration: none;
    letter-spacing : .01em;
}

.btn-login:hover {
    transform : translateY(-2px);
    box-shadow: 0 14px 32px rgba(99,102,241,.5);
    filter    : brightness(1.05);
}

.btn-login:active {
    transform : translateY(0);
    box-shadow: 0 4px 12px rgba(99,102,241,.35);
}

/* Variasi warna tombol (ubah/aksi) */
.btn-ubah {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 8px 24px rgba(245,158,11,.4) !important;
}
.btn-ubah:hover {
    box-shadow: 0 14px 32px rgba(245,158,11,.5) !important;
}

/* Tombol buat PIN (hijau) - masih dipertahankan walau PIN dinonaktifkan */
.btn-buat-pin {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 8px 24px rgba(16,185,129,.4) !important;
    text-decoration: none;
}
.btn-buat-pin:hover {
    box-shadow: 0 14px 32px rgba(16,185,129,.5) !important;
}

/* Tombol WhatsApp */
.btn-whatsapp {
    width        : 100%;
    padding      : 12px 20px;
    background   : linear-gradient(135deg, #25D366 0%, #128c7e 100%);
    box-shadow   : 0 8px 24px rgba(37,211,102,.35);
    border       : none;
    border-radius: var(--hz-radius-btn);
    color        : #fff !important;
    font-size    : 16px;
    font-weight  : 700;
    font-family  : var(--hz-font);
    cursor       : pointer;
    display      : flex;
    justify-content: center;
    align-items  : center;
    gap          : 8px;
    transition   : transform .2s ease, box-shadow .2s ease;
    margin-top   : 8px;
}
.btn-whatsapp:hover {
    transform : translateY(-2px);
    box-shadow: 0 14px 32px rgba(37,211,102,.5);
}
.btn-whatsapp .bi { font-size: 1.2em; }

/* ── Pesan error & sukses ───────────────────────────────────── */
.error-message {
    display    : block;
    color      : var(--hz-danger);
    font-size  : 12.5px;
    margin-top : 5px;
    min-height : 18px;
    font-weight: 500;
    font-family: var(--hz-font-ui);
}

.success-message,
.error-box,
.alert-box {
    margin-top   : 16px;
    padding      : 13px 16px;
    border-radius: 12px;
    display      : none;
    align-items  : center;
    gap          : 10px;
    font-weight  : 600;
    font-size    : 14px;
    font-family  : var(--hz-font-ui);
    animation    : hz-slide-in .35s ease-out both;
}

@keyframes hz-slide-in {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.success-message,
.alert-box.alert-success {
    background: #ecfdf5;
    color     : #065f46;
    border    : 1.5px solid #6ee7b7;
    display   : flex;
}

.error-box {
    background: #fef2f2;
    color     : #991b1b;
    border    : 1.5px solid #fca5a5;
}

.success-message .icon,
.error-box .icon { font-size: 20px; }

/* Status box sederhana */
.status-box {
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13.5px;
    font-family: var(--hz-font-ui);
}

/* ── Announcement box ───────────────────────────────────────── */
.announcement-box {
    font-family     : var(--hz-font-ui);
    font-size       : 13.5px;
    background-color: #eef2ff;
    border          : 1.5px solid #c7d2fe;
    color           : #3730a3;
    padding         : 14px 16px;
    border-radius   : 12px;
    margin-top      : 20px;
    line-height     : 1.55;
    position        : relative;
    z-index         : 2;
}

.announcement-box h4 {
    margin     : 0 0 8px;
    color      : #312e81;
    font-size  : 14px;
    font-weight: 700;
    display    : flex;
    align-items: center;
    gap        : 6px;
}

.announcement-box ul {
    padding-left: 18px;
    margin      : 0;
}

/* ── Tombol kembali / tautan ────────────────────────────────── */
.back-link {
    display     : inline-block;
    margin-top  : 16px;
    color       : var(--hz-text-muted) !important;
    text-decoration: none;
    font-weight : 500;
    font-size   : 14px;
    transition  : color .2s;
}
.back-link:hover { color: var(--hz-primary) !important; text-decoration: underline; }

/* Tautan biasa di dalam card */
.login-box a:not(.btn-login):not(.btn-ubah):not(.btn-buat-pin):not(.back-link) {
    color: var(--hz-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s;
}
.login-box a:not(.btn-login):not(.btn-ubah):not(.btn-buat-pin):not(.back-link):hover {
    color: var(--hz-primary-dark);
    text-decoration: underline;
}

/* ── Input PIN (force_setup) ────────────────────────────────── */
.input-pin {
    width        : 100%;
    padding      : 14px 16px;
    font-size    : 22px;
    font-family  : var(--hz-font);
    letter-spacing: 0.35em;
    text-align   : center;
    border       : 1.5px solid var(--hz-input-border);
    border-radius: var(--hz-radius-input);
    background   : var(--hz-input-bg);
    transition   : border-color .2s, box-shadow .2s;
}
.input-pin:focus {
    border-color: var(--hz-input-focus);
    box-shadow  : 0 0 0 3px rgba(99,102,241,.18);
    background  : #fff;
}

/* ── Step container (force_setup.php) ──────────────────────── */
.step-container { display: none; }
.step-container.active { display: block; }

/* Progress dots */
.progress-steps {
    display        : flex;
    justify-content: center;
    gap            : 10px;
    margin-bottom  : 20px;
}
.step-dot {
    width        : 10px;
    height       : 10px;
    border-radius: 50%;
    background   : #c7d2fe;
    transition   : background .3s, transform .3s;
}
.step-dot.active {
    background: var(--hz-primary);
    transform : scale(1.25);
}
.step-dot.done { background: var(--hz-success); }

/* ── Alert box dalam step ───────────────────────────────────── */
.alert-box {
    padding      : 12px 15px;
    border-radius: 10px;
    font-size    : 13.5px;
    font-family  : var(--hz-font-ui);
    margin-bottom: 14px;
}

/* ── Divider ────────────────────────────────────────────────── */
hr {
    border    : none;
    border-top: 1px solid #e2e8f0;
    margin    : 18px 0;
}

/* ── Modal PIN (dipertahankan, dinonaktifkan lewat JS) ──────── */
.pin-modal-overlay {
    position  : fixed;
    inset     : 0;
    background: rgba(15,23,42,.7);
    backdrop-filter: blur(4px);
    display   : flex;
    justify-content: center;
    align-items: center;
    z-index   : 999;
    opacity   : 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.pin-modal-overlay.show {
    opacity   : 1;
    visibility: visible;
}
.pin-modal-box {
    background   : #fff;
    padding      : 28px 32px;
    border-radius: 20px;
    width        : 90%;
    max-width    : 400px;
    text-align   : center;
    box-shadow   : 0 24px 60px rgba(15,23,42,.25);
    transform    : scale(.93);
    transition   : transform .3s ease;
}
.pin-modal-overlay.show .pin-modal-box { transform: scale(1); }
.pin-modal-box h2 {
    color      : var(--hz-accent-dark);
    font-family: var(--hz-font);
    margin     : 0 0 10px;
    font-size  : 22px;
}
.pin-modal-box p {
    color      : #475569;
    font-size  : 15px;
    line-height: 1.6;
    margin-bottom: 22px;
}
.modal-button {
    display      : inline-block;
    padding      : 11px 20px;
    border-radius: 10px;
    font-weight  : 700;
    font-family  : var(--hz-font);
    font-size    : 15px;
    cursor       : pointer;
    border       : none;
    transition   : all .25s ease;
    margin       : 4px;
}
.modal-button.secondary { background: #e2e8f0; color: #475569; }
.modal-button.secondary:hover { background: #cbd5e1; }
.modal-button.primary {
    background: linear-gradient(135deg, var(--hz-success) 0%, #059669 100%);
    color     : #fff;
    box-shadow: 0 6px 16px rgba(16,185,129,.3);
}
.modal-button.primary:hover {
    transform : translateY(-2px);
    box-shadow: 0 10px 24px rgba(16,185,129,.4);
}

/* ── FAB Bantuan ────────────────────────────────────────────── */
.fab-bantuan {
    position     : fixed;
    bottom       : 24px;
    right        : 20px;
    width        : auto;
    height       : 52px;
    padding      : 0 18px;
    background   : linear-gradient(135deg, #25D366 0%, #128c7e 100%);
    color        : #fff;
    display      : flex;
    justify-content: center;
    align-items  : center;
    border-radius: 999px;
    box-shadow   : 0 6px 20px rgba(18,140,126,.4);
    font-size    : 15px;
    font-weight  : 600;
    font-family  : var(--hz-font);
    text-decoration: none;
    z-index      : 998;
    transition   : all .3s ease;
    animation    : hz-pulse 2.5s infinite;
}
.fab-bantuan .bi {
    font-size   : 22px;
    margin-right: 7px;
}
.fab-bantuan:hover {
    background  : linear-gradient(135deg, #20b056 0%, #0f7066 100%);
    color       : #fff;
    transform   : scale(1.05);
    box-shadow  : 0 10px 28px rgba(18,140,126,.55);
    animation-play-state: paused;
}
@keyframes hz-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(37,211,102,.6); }
    70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0   rgba(37,211,102,0); }
}

/* ── Heading halaman (di luar card) ─────────────────────────── */
.page-title {
    color      : #fff;
    text-align : center;
    font-size  : 22px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(15,23,42,.4);
}

/* ── Horizon: header atas dimatikan ────────────────────────── */
.school-topbar        { display: none !important; }

/* ── Horizon: header bawah (navbar) — warna disesuaikan ────── */
.school-navbar {
    background: rgba(15,23,42,.92) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(99,102,241,.3) !important;
    box-shadow: 0 4px 24px rgba(15,23,42,.3) !important;
}

/* Garis aksen emas di bawah navbar tetap seperti theme sekolah */
.school-navbar::after {
    content : '';
    display : block;
    height  : 3px;
    background: linear-gradient(90deg, #f59e0b 0%, #fde68a 50%, #f59e0b 100%);
    position: absolute;
    bottom  : 0; left: 0; right: 0;
}

.school-navbar { position: relative; }

/* Brand text di dalam navbar */
.school-brand__text strong { color: #fff !important; }
.school-brand__text span   { color: rgba(255,255,255,.8) !important; }

/* Nav links */
.school-nav__link {
    color      : rgba(255,255,255,.9) !important;
    font-family: var(--hz-font-ui);
}
.school-nav__item:hover > .school-nav__trigger > .school-nav__link,
.school-nav__item:focus-within > .school-nav__trigger > .school-nav__link,
.school-nav__item.is-open > .school-nav__trigger > .school-nav__link,
.school-nav__item.is-active > .school-nav__trigger > .school-nav__link {
    background: rgba(99,102,241,.3) !important;
    color      : #fff !important;
}

/* Active underline: ganti gold → amber */
.school-nav__item.is-active > .school-nav__trigger > .school-nav__link::after {
    background: var(--hz-accent) !important;
}

/* Highlight btn: oranye → amber */
.school-nav__item.is-highlighted .school-nav__link {
    background   : var(--hz-accent) !important;
    color        : #1e1b4b !important;
    border-radius: 999px !important;
}
.school-nav__item.is-highlighted:hover .school-nav__link,
.school-nav__item.is-highlighted:focus-within .school-nav__link {
    background: var(--hz-accent-dark) !important;
}

/* ── Footer — pertahankan, sesuaikan aksen ──────────────────── */
.school-footer-accent {
    background: linear-gradient(90deg,
        var(--hz-glow)      0%,
        #fde68a             35%,
        var(--hz-primary)   35%,
        var(--hz-primary-dark) 100%) !important;
}

/* ── Responsif ──────────────────────────────────────────────── */
@media (max-width: 500px) {
    body.school-shell-page .container {
        width: calc(100% - 20px);
        font-size: 14px;
    }

    .login-box,
    .main-card {
        padding: 28px 20px 24px !important;
        border-radius: 18px !important;
    }

    h1 { font-size: 22px !important; }
    .header p { font-size: 14px; }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"] {
        padding : 11px 14px;
        font-size: 14px;
    }

    .btn-login {
        font-size: 15px;
        padding  : 13px;
    }

    .school-main-content {
        padding: 22px 10px 48px !important;
    }
}

@media (max-width: 360px) {
    .login-box,
    .main-card {
        padding: 22px 14px 20px !important;
    }
}
