:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-800: #075985;
    --sky-900: #0c4a6e;

    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-300: #cbd5e1;
    --ink-100: #f1f5f9;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;

    --radius: 14px;
    --shadow: 0 4px 20px rgba(2, 132, 199, 0.12);
    --shadow-lg: 0 12px 36px rgba(2, 132, 199, 0.18);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--sky-50);
    color: var(--ink-900);
    line-height: 1.55;
}

a { color: var(--sky-700); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(135deg, var(--sky-600), var(--sky-800));
    color: #fff;
    padding: 28px 0 40px;
    text-align: center;
    position: relative;
}

.site-header .badge-tahun {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 12px;
    letter-spacing: .06em;
    margin-top: 10px;
    margin-bottom: 14px;
}

.site-header .logo-box {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: #fff;
    color: var(--sky-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    box-shadow: var(--shadow-lg);
}

.logo-img {
    object-fit: contain;
    padding: 4px;
}

.site-header h1 {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.3;
}

.site-header .sub {
    font-size: 14.5px;
    opacity: .95;
}

.site-header .alamat {
    font-size: 13px;
    opacity: .9;
    margin-top: 4px;
}

.site-header .tagline {
    font-size: 13px;
    opacity: .8;
    margin-top: 6px;
    font-style: italic;
}

/* ---------- Main / Cards ---------- */
main {
    margin-top: -24px;
    padding-bottom: 60px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 18px;
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
    color: var(--sky-800);
}

.welcome-arabic {
    font-family: 'Aref Ruqaa', serif;
    font-size: 32px;
    line-height: 1.4;
    color: var(--sky-700);
    text-align: center;
    margin: 10px 0 6px;
}
.welcome-heading {
    text-align: center;
    margin-top: 4px;
}
.welcome-card p { color: var(--ink-700); }
.welcome-card mark {
    background: var(--sky-100);
    color: var(--sky-700);
    padding: 1px 4px;
    border-radius: 4px;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 18px 0;
}

@media (min-width: 620px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature {
    background: var(--sky-50);
    border: 1px solid var(--sky-100);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.feature .icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--sky-500);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
}

.feature h3 { margin: 0 0 4px; font-size: 15px; color: var(--sky-800); }
.feature p { margin: 0; font-size: 13px; color: var(--ink-500); }

.info-strip {
    background: var(--sky-100);
    border: 1px dashed var(--sky-300);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--sky-800);
    margin-bottom: 18px;
}

.countdown-box {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    color: #9a3412;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 18px;
}
.countdown-box #countdown-timer {
    font-family: 'Courier New', monospace;
    font-size: 17px;
    letter-spacing: .04em;
}
.countdown-box.urgent {
    background: #fef2f2;
    border-color: var(--danger);
    color: #991b1b;
    animation: pulse-urgent 1s ease-in-out infinite;
}
@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

/* ---------- Kartu Rekening ---------- */
.bank-card {
    background: linear-gradient(135deg, var(--sky-700), var(--sky-900));
    color: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.bank-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.bank-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
}
.bank-logo-wide {
    width: auto;
    height: 52px;
    max-width: 210px;
    border-radius: 8px;
    padding: 6px 10px;
}
.bank-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.bank-name {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .02em;
}
.bank-norek {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .06em;
    font-family: 'Courier New', monospace;
    margin-bottom: 6px;
    word-break: break-all;
}
.bank-atasnama {
    font-size: 13.5px;
    color: rgba(255,255,255,.85);
}

/* ---------- QRIS (kolom kanan kartu rekening) ---------- */
.bank-card-cols {
    display: flex;
    align-items: stretch;
    gap: 18px;
}
.bank-card-col {
    flex: 1;
    min-width: 0;
}
.bank-card-col-divider {
    width: 1px;
    background: rgba(255,255,255,.25);
    flex-shrink: 0;
}
.qris-col-label {
    font-size: 12.5px;
    color: rgba(255,255,255,.8);
    margin-bottom: 10px;
    font-weight: 600;
}
.bank-card-col .btn-row { gap: 8px; }
.btn-qris {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.4);
    padding: 9px 12px;
    font-size: 12.5px;
    width: 100%;
}
.btn-qris:hover { background: rgba(255,255,255,.22); }

@media (max-width: 480px) {
    .bank-card-cols { flex-direction: column; gap: 16px; }
    .bank-card-col-divider { width: 100%; height: 1px; }
}

.qris-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .92);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    z-index: 100;
    cursor: pointer;
}
.qris-overlay.open { display: flex; }
.qris-overlay img {
    max-width: min(90vw, 420px);
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    background: #fff;
    padding: 12px;
}
.qris-overlay-hint {
    color: rgba(255,255,255,.85);
    font-size: 13.5px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    width: 100%;
}

.btn-primary { background: var(--sky-600); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--sky-700); }
.btn-outline { background: #fff; color: var(--sky-700); border: 1.5px solid var(--sky-300); }
.btn-outline:hover { background: var(--sky-50); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-ghost { background: transparent; color: var(--ink-500); border: 1.5px solid var(--ink-300); }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.btn-row.horizontal { flex-direction: column-reverse; }
@media (min-width: 480px) { .btn-row.horizontal { flex-direction: row; } }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}
.form-group label .opt {
    font-weight: 400;
    color: var(--ink-500);
    font-size: 12px;
}

input[type=text], input[type=date], input[type=number], input[type=password], textarea, select {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid var(--ink-300);
    border-radius: 10px;
    font-size: 14.5px;
    background: #fff;
    color: var(--ink-900);
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sky-500);
    box-shadow: 0 0 0 3px var(--sky-100);
}

textarea { resize: vertical; min-height: 70px; }

.password-wrap { position: relative; }
.password-wrap input[type=password], .password-wrap input[type=text] { padding-right: 42px; }
.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    padding: 6px;
    color: var(--ink-500);
}
.password-toggle-btn:hover { color: var(--sky-700); }

.date-select-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 8px;
}
.date-select-row select {
    padding: 11px 8px;
    text-align: center;
    text-align-last: center;
}

.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill {
    flex: 1;
    min-width: 120px;
    border: 1.5px solid var(--ink-300);
    border-radius: 10px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .12s, background .12s;
}
.radio-pill input { width: 16px; height: 16px; accent-color: var(--sky-600); }
.radio-pill:has(input:checked) {
    border-color: var(--sky-500);
    background: var(--sky-50);
    color: var(--sky-800);
    font-weight: 600;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-700);
}
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sky-600); flex-shrink: 0; }

.field-error {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 5px;
    display: none;
}
.form-group.has-error input,
.form-group.has-error select { border-color: var(--danger); }
.form-group.has-error .field-error,
.has-error .field-error { display: block; }

#setuju-wrap.has-error .checkbox-row {
    background: #fef2f2;
    border: 1.5px solid var(--danger);
    border-radius: 10px;
    padding: 10px 12px;
    margin: -1px;
}

/* ---------- Stepper ---------- */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
    counter-reset: step;
}
.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 11.5px;
    color: var(--ink-500);
}
.step-item::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--ink-300);
    color: var(--ink-500);
    margin: 0 auto 6px;
    font-weight: 700;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
.step-item::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--ink-300);
    z-index: 0;
}
.step-item:first-child::after { display: none; }
.step-item.active::before { background: var(--sky-600); border-color: var(--sky-600); color: #fff; }
.step-item.done::before { background: var(--sky-500); border-color: var(--sky-500); color: #fff; content: '✓'; }
.step-item.done::after, .step-item.active::after { background: var(--sky-500); }
.step-item.active { color: var(--sky-700); font-weight: 700; }

.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn .25s ease; }

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

/* ---------- File Upload ---------- */
.upload-box {
    border: 2px dashed var(--sky-300);
    border-radius: 12px;
    padding: 20px 14px;
    text-align: center;
    background: var(--sky-50);
    cursor: pointer;
    position: relative;
    transition: border-color .12s, background .12s;
}
.upload-box.has-file { border-color: var(--success); background: #f0fdf4; }
.upload-box.drag { border-color: var(--sky-600); background: var(--sky-100); }
.upload-box input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1;
}
.upload-box .upload-icon { font-size: 26px; margin-bottom: 6px; }
.upload-box .upload-text { font-size: 13.5px; color: var(--sky-700); font-weight: 600; }
.upload-box .upload-hint { font-size: 12px; color: var(--ink-500); margin-top: 3px; }
.upload-box .file-name { font-size: 13px; color: var(--success); font-weight: 600; margin-top: 4px; word-break: break-all; }
.upload-box .btn-ganti-file {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    width: auto;
    pointer-events: auto;
}

/* ---------- Review (Step 4) ---------- */
.review-block { margin-bottom: 14px; }
.review-block h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sky-700);
    margin: 0 0 8px;
    border-bottom: 1px solid var(--sky-100);
    padding-bottom: 6px;
}
.review-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13.5px;
    padding: 5px 0;
    border-bottom: 1px dotted var(--ink-100);
}
.review-row .k {
    color: var(--ink-500);
    flex: 0 0 150px;
    max-width: 150px;
}
.review-row .v {
    color: var(--ink-900);
    font-weight: 600;
    text-align: left;
    flex: 1;
}

@media (max-width: 420px) {
    .review-row { flex-direction: column; gap: 2px; }
    .review-row .k { flex-basis: auto; max-width: none; font-size: 12px; }
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: var(--ink-100); color: var(--ink-500); }

/* ---------- Alerts ---------- */
.alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: var(--sky-100); color: var(--sky-800); }

.expired-note {
    margin-top: 6px;
    font-size: 12px;
    opacity: .8;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--sky-900);
    color: rgba(255,255,255,.85);
    text-align: center;
    padding: 26px 16px;
    font-size: 13px;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer .fname { font-weight: 700; color: #fff; font-size: 14.5px; margin-bottom: 4px; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: #fff;
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    padding: 22px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute; top: 12px; right: 14px;
    border: none; background: var(--ink-100);
    width: 30px; height: 30px; border-radius: 50%;
    font-size: 16px; cursor: pointer; color: var(--ink-700);
}
.brosur-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; border: 1px solid var(--ink-100); border-radius: 10px; margin-bottom: 8px;
}

/* ---------- Sticky WA ---------- */
.wa-float {
    position: fixed;
    bottom: 18px;
    right: 18px;
    background: #25D366;
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    font-size: 26px;
    z-index: 40;
}

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--ink-100); }
.admin-sidebar {
    width: 220px;
    background: var(--sky-900);
    color: #fff;
    padding: 20px 14px;
    flex-shrink: 0;
}
.admin-sidebar .brand { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.admin-sidebar .brand small { display: block; font-weight: 400; opacity: .7; font-size: 11px; }
.admin-sidebar nav { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar nav a {
    color: rgba(255,255,255,.85);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}
.admin-sidebar nav a.active, .admin-sidebar nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar nav a.nav-logout { margin-top: 16px; opacity: .8; }
.admin-main { flex: 1; padding: 24px; min-width: 0; overflow-x: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.admin-topbar h1 { font-size: 20px; margin: 0; color: var(--sky-900); }

@media (max-width: 768px) {
    .admin-shell { flex-direction: column; min-height: 0; }
    .admin-sidebar { width: 100%; padding: 14px 16px; }
    .admin-sidebar .brand { margin-bottom: 0; }
    .admin-sidebar nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-top: 14px;
        padding-bottom: 4px;
        gap: 6px;
    }
    .admin-sidebar nav a {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px;
        padding: 8px 12px;
    }
    .admin-sidebar nav a.nav-logout { margin-top: 0; margin-left: auto; }
    .admin-main { padding: 16px; }
    .admin-topbar h1 { font-size: 18px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--sky-700); }
.stat-card .label { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }

.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 780px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--ink-100); white-space: nowrap; }
th { background: var(--sky-50); color: var(--sky-800); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: var(--sky-50); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--sky-600), var(--sky-900)); padding: 20px; }
.login-card { background: #fff; border-radius: var(--radius); padding: 30px 26px; width: 100%; max-width: 360px; box-shadow: var(--shadow-lg); }
.login-card .logo-box { margin: 0 auto 14px; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1.4fr 1fr; } }
.file-thumb { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--sky-50); border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; }

.export-jenjang-list { display: flex; flex-direction: column; gap: 10px; }
.export-jenjang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--sky-50);
    border: 1px solid var(--sky-100);
    border-radius: 12px;
    flex-wrap: wrap;
}
.export-jenjang-item .nama { font-weight: 700; color: var(--sky-800); font-size: 14.5px; }
.export-jenjang-item .jumlah { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }

.print-only { display: none; }
@media print {
    .no-print { display: none !important; }
    .print-only { display: block; }
    body { background: #fff; }
}
