/* ========================================================
   PSTI KP & Skripsi – Public Form Styles
   Palet: #001188 (biru), #fcb900 (kuning), #ffffff (putih)
   ======================================================== */
:root {
    --psti-blue:       #001188;
    --psti-blue-mid:   #3347cc;
    --psti-blue-light: #e8ebff;
    --psti-blue-dark:  #000d6b;
    --psti-yellow:     #fcb900;
    --psti-yellow-bg:  #fff8e1;
    --psti-yellow-txt: #7a5800;
    --psti-text:       #1a1a2e;
    --psti-muted:      #6b7280;
    --psti-border:     #d1d5db;
    --psti-radius:     12px;
    --psti-radius-sm:  8px;
}

.psti-app {
    width: 100%;
    background: #fff;
    border-radius: var(--psti-radius);
    border: 1px solid var(--psti-border);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--psti-text);
}

/* Konten di dalam form dibatasi lebar agar tetap nyaman dibaca */
.psti-body,
.psti-countdown-bar,
.psti-header,
.psti-footer {
    max-width: 100%;
}

.psti-body {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

/* Type tabs & sub tabs selalu 50/50 full lebar */
.psti-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.psti-sub-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

/* Checklist jadi 3 kolom di layar lebar */
@media (min-width: 640px) {
    .psti-checklist {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* --- Header --- */
.psti-header {
    background: var(--psti-blue);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.psti-header-logo {
    width: 42px; height: 42px;
    background: var(--psti-yellow);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    color: var(--psti-blue);
    flex-shrink: 0;
}
.psti-header-info { display: flex; flex-direction: column; }
.psti-header-info strong { color: #fff; font-size: 15px; font-weight: 600; }
.psti-header-info span  { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 2px; }

/* --- Countdown bar --- */
.psti-countdown-bar {
    background: var(--psti-blue-light);
    border-bottom: 1px solid rgba(0,17,136,.15);
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.psti-cd-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--psti-blue);
    letter-spacing: .5px;
    text-transform: uppercase;
}
.psti-cd-clocks { display: flex; gap: 16px; justify-content: center; }
.psti-cd-unit { display: flex; flex-direction: column; align-items: center; }
.psti-cd-ring { width: 76px; height: 76px; position: relative; }
.psti-cd-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.psti-cd-num {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: var(--psti-blue);
}
.psti-cd-sub { font-size: 10px; color: var(--psti-blue-mid); margin-top: 4px; font-weight: 500; }

/* --- Body --- */
.psti-body { padding: 20px 22px; }

/* --- State empty/closed --- */
.psti-state-empty { text-align: center; padding: 36px 24px; }
.psti-state-icon  { font-size: 44px; margin-bottom: 12px; }
.psti-state-title { font-size: 16px; font-weight: 600; color: var(--psti-blue); margin-bottom: 6px; }
.psti-state-sub   { font-size: 13px; color: var(--psti-muted); max-width: 320px; margin: 0 auto; line-height: 1.6; }

/* --- Fields --- */
.psti-field-group { margin-bottom: 14px; position: relative; }
.psti-label { display: block; font-size: 12px; font-weight: 600; color: var(--psti-muted); margin-bottom: 5px; }
.psti-opt   { font-weight: 400; color: #aaa; }
.psti-input {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--psti-border);
    border-radius: var(--psti-radius-sm);
    font-size: 14px; color: var(--psti-text);
    background: #fff; outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.psti-input:focus { border-color: var(--psti-blue); }
.psti-textarea { min-height: 70px; resize: vertical; }

/* --- NIM Dropdown --- */
.psti-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: #fff; border: 1.5px solid var(--psti-blue); border-top: none;
    border-radius: 0 0 var(--psti-radius-sm) var(--psti-radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 200px; overflow-y: auto;
}
.psti-dropdown-item { padding: 9px 12px; cursor: pointer; }
.psti-dropdown-item:hover { background: var(--psti-blue-light); }
.psti-dropdown-nim  { font-size: 11px; color: var(--psti-blue-mid); }
.psti-dropdown-nama { font-size: 13px; font-weight: 500; color: var(--psti-text); }

/* --- Student card --- */
.psti-student-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--psti-blue-light);
    border: 1px solid rgba(0,17,136,.2);
    border-radius: 10px; padding: 12px 14px;
    margin-top: 10px;
}
.psti-student-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--psti-blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.psti-student-nim  { font-size: 11px; color: var(--psti-blue-mid); margin-bottom: 2px; }
.psti-student-name { font-size: 14px; font-weight: 600; color: var(--psti-blue); }

/* --- Status card --- */
.psti-status-card { border-radius: 10px; padding: 14px 16px; margin-top: 12px; font-size: 13px; }
.psti-status-pending { background: var(--psti-yellow-bg); border: 1px solid var(--psti-yellow); }
.psti-status-lunas   { background: #e6f4ea; border: 1px solid #4caf50; }

/* --- Divider --- */
.psti-divider { border: none; border-top: 1px solid var(--psti-border); margin: 18px 0; }

/* --- Type tabs --- */
.psti-type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; width: 100%; }
.psti-type-tab {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 10px; border-radius: 10px;
    border: 1.5px solid var(--psti-border);
    background: #fff; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--psti-muted);
    transition: all .15s;
}
.psti-type-tab.active { background: var(--psti-blue); border-color: var(--psti-blue); color: #fff; }
.psti-type-tab svg    { opacity: .7; }
.psti-type-tab.active svg { opacity: 1; }

/* --- Sub tabs --- */
.psti-sub-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; width: 100%; }
.psti-sub-tab {
    padding: 8px 10px; border-radius: var(--psti-radius-sm);
    border: 1.5px solid var(--psti-border); background: #fff;
    cursor: pointer; font-size: 12px; font-weight: 500; color: var(--psti-muted);
    transition: all .15s;
}
.psti-sub-tab.active { background: var(--psti-yellow-bg); border-color: var(--psti-yellow); color: var(--psti-yellow-txt); }

/* --- Checklist minat --- */
.psti-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.psti-check-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 7px;
    border: 1px solid var(--psti-border); background: #fff;
    cursor: pointer; font-size: 12px; color: var(--psti-text);
    transition: all .12s;
    user-select: none;
}
.psti-check-item.checked { border-color: var(--psti-blue); background: var(--psti-blue-light); color: var(--psti-blue); font-weight: 500; }
.psti-check-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--psti-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .12s; }
.psti-check-item.checked .psti-check-box { background: var(--psti-blue); border-color: var(--psti-blue); }
.psti-check-item.checked .psti-check-box::after { content: '✓'; color: #fff; font-size: 10px; line-height: 1; }

/* --- Badges --- */
.psti-badge-yellow { display: inline-block; background: var(--psti-yellow-bg); color: var(--psti-yellow-txt); border: 1px solid var(--psti-yellow); border-radius: 20px; padding: 1px 8px; font-size: 10px; font-weight: 600; margin-left: 4px; }

/* --- Error --- */
.psti-error { background: #fff0f0; border: 1px solid #f87171; color: #991b1b; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }

/* --- Submit button --- */
.psti-btn-submit {
    width: 100%; height: 44px;
    background: var(--psti-blue); color: #fff;
    border: none; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    margin-top: 18px; transition: background .15s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.psti-btn-submit:hover { background: var(--psti-blue-dark); }
.psti-btn-submit:disabled { background: #aaa; cursor: not-allowed; }

/* --- QRIS screen --- */
.psti-qris-nominal-box { background: var(--psti-blue-light); border-radius: 10px; padding: 16px; text-align: center; margin-bottom: 18px; }
.psti-qris-nominal-label { font-size: 11px; color: var(--psti-blue-mid); margin-bottom: 4px; }
.psti-qris-nominal-val   { font-size: 28px; font-weight: 700; color: var(--psti-blue); }
.psti-qris-nominal-sub   { font-size: 11px; color: var(--psti-muted); margin-top: 4px; }
.psti-qris-frame { width: 200px; height: 200px; margin: 0 auto 14px; background: var(--psti-blue); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.psti-qris-frame img { width: 100%; height: 100%; object-fit: contain; }
.psti-qris-loading { color: rgba(255,255,255,.7); font-size: 13px; }
.psti-qris-hint { text-align: center; font-size: 12px; color: var(--psti-muted); margin-bottom: 14px; }
.psti-qris-actions { display: flex; justify-content: center; }
.psti-btn-outline { padding: 9px 20px; border: 1.5px solid var(--psti-blue); border-radius: 8px; background: #fff; color: var(--psti-blue); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.psti-btn-outline:hover { background: var(--psti-blue-light); }
.psti-bayar-status { text-align: center; margin-top: 12px; font-size: 13px; font-weight: 600; padding: 8px; border-radius: 8px; }

/* --- Footer --- */
.psti-footer {
    background: var(--psti-yellow);
    padding: 8px 22px;
    display: flex; align-items: center; gap: 7px;
    font-size: 11px; color: var(--psti-blue); font-weight: 500;
}

/* Konsentrasi skripsi – checklist style (maks 3) */
.psti-konsentrasi-item.checked {
    border-color: var(--psti-blue);
    background: var(--psti-blue-light);
    color: var(--psti-blue);
    font-weight: 500;
}
.psti-konsentrasi-item.checked .psti-check-box {
    background: var(--psti-blue);
    border-color: var(--psti-blue);
}
.psti-konsentrasi-item.checked .psti-check-box::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
}

/* Input validation error state */
.psti-input.input-error {
    border-color: #e53e3e;
    background: #fff5f5;
}
.psti-input.input-error:focus {
    border-color: #e53e3e;
}

/* ---- Upload Bukti Pembayaran ---- */
.psti-bukti-wrap {
    margin-top: 18px;
    border-top: 1px solid var(--psti-border);
    padding-top: 16px;
}
.psti-bukti-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--psti-blue);
    margin-bottom: 10px;
}
.psti-bukti-upload-area {
    display: block;
    border: 2px dashed var(--psti-border);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s;
    min-height: 120px;
}
.psti-bukti-upload-area:hover { border-color: var(--psti-blue); }
.psti-bukti-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    color: var(--psti-muted);
    font-size: 13px;
}
.psti-bukti-placeholder small { font-size: 11px; color: #aaa; }
.psti-bukti-preview { text-align: center; }
.psti-bukti-preview img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
#psti-ocr-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.ocr-success { background: #e6f4ea; color: #1a7431; border: 1px solid #4caf50; }
.ocr-fail    { background: #fff8e1; color: #7a5800; border: 1px solid var(--psti-yellow); }
.ocr-error   { background: #fff0f0; color: #991b1b; border: 1px solid #f87171; }

/* Screen terverifikasi sistem */
.psti-verified-wrap {
    padding: 28px 22px 32px;
    text-align: center;
}
.psti-verified-icon {
    font-size: 52px;
    margin-bottom: 10px;
    line-height: 1;
}
.psti-verified-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--psti-blue);
    margin: 0 0 20px;
}

/* Info box tanggal & nominal */
.psti-verified-info {
    background: var(--psti-blue-light);
    border: 1px solid rgba(0,17,136,.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 auto 22px;
    max-width: 380px;
    text-align: left;
}
.psti-verified-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.psti-verified-label {
    font-size: 12px;
    color: var(--psti-muted);
    font-weight: 500;
}
.psti-verified-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--psti-blue);
}
.psti-verified-nominal {
    font-size: 22px;
    font-weight: 700;
    color: var(--psti-blue);
}
.psti-verified-divider {
    border: none;
    border-top: 1px solid rgba(0,17,136,.12);
    margin: 12px 0;
}

/* Checklist status */
.psti-verified-checklist {
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.psti-check-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
}
.psti-check-done {
    background: #e6f4ea;
    border: 1px solid #4caf50;
}
.psti-check-pending {
    background: var(--psti-yellow-bg);
    border: 1px solid var(--psti-yellow);
}
.psti-check-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.psti-check-circle-pending {
    background: var(--psti-yellow);
    color: var(--psti-yellow-txt);
}
.psti-check-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a7431;
    margin-bottom: 2px;
}
.psti-check-title-pending {
    color: var(--psti-yellow-txt);
}
.psti-check-desc {
    font-size: 11px;
    color: var(--psti-muted);
}
