/* ==========================================================
   SITE CORE — sistem desain sisi responden (SIEP-POLTEKKES)
   Modern namun klasik: huruf serif untuk judul, garis tipis,
   warna teal & navy, sudut moderat.
   Dipakai semua halaman responden. CSS khusus halaman ada di
   file terpisah dan hanya memakai awalan "pg-".
   ========================================================== */

:root {
    --s-teal: #0f766e;
    --s-teal-dark: #0b5a54;
    --s-teal-soft: #e6f4f2;
    --s-navy: #12263f;
    --s-navy-2: #1d3a5f;
    --s-gold: #b8892b;
    --s-ink: #1f2a37;
    --s-muted: #5b6776;
    --s-faint: #8a94a3;
    --s-line: #dfe4ea;
    --s-line-soft: #eceff3;
    --s-bg: #f6f5f1;
    --s-paper: #ffffff;
    --s-ok: #0b7a55;
    --s-ok-soft: #e4f5ed;
    --s-warn: #9a6700;
    --s-warn-soft: #fff4d6;
    --s-err: #b42318;
    --s-err-soft: #fdecea;
    --s-radius: 10px;
    --s-radius-lg: 16px;
    --s-shadow: 0 1px 2px rgba(18, 38, 63, .05), 0 6px 20px rgba(18, 38, 63, .06);
    --s-shadow-lg: 0 2px 4px rgba(18, 38, 63, .06), 0 16px 40px rgba(18, 38, 63, .10);
    --s-serif: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; /* font judul: sans-serif (bukan Times New Roman) */
    --s-sans: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --s-max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site {
    margin: 0;
    font-family: var(--s-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--s-ink);
    background: var(--s-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body.site > main { flex: 1 0 auto; }

body.site a { color: var(--s-teal); }
body.site img { max-width: 100%; }

.site-icon { flex: 0 0 auto; vertical-align: middle; }

.site-skip {
    position: absolute; left: -999px; top: 8px; z-index: 100;
    background: var(--s-navy); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.site-skip:focus { left: 8px; }

.site-wrap {
    width: 100%;
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Tombol ---------- */
.site-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px;
    font: 600 14px/1.2 var(--s-sans);
    border: 1.5px solid transparent;
    border-radius: var(--s-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.site-btn:focus-visible { outline: 3px solid rgba(15, 118, 110, .35); outline-offset: 2px; }
body.site a.site-btn-primary, .site-btn-primary { background: var(--s-teal); color: #fff; }
body.site a.site-btn-primary:hover, .site-btn-primary:hover { background: var(--s-teal-dark); box-shadow: 0 6px 16px rgba(15, 118, 110, .28); transform: translateY(-1px); }
body.site a.site-btn-ghost, .site-btn-ghost { background: transparent; color: var(--s-navy); border-color: var(--s-line); }
body.site a.site-btn-ghost:hover, .site-btn-ghost:hover { border-color: var(--s-teal); color: var(--s-teal); background: var(--s-teal-soft); }
body.site a.site-btn-light, .site-btn-light { background: #fff; color: var(--s-navy); }
body.site a.site-btn-light:hover, .site-btn-light:hover { background: var(--s-teal-soft); }
.site-btn[disabled], .site-btn.is-disabled { background: #e6e9ee; color: #98a2b0; cursor: not-allowed; box-shadow: none; transform: none; pointer-events: none; }
.site-btn-lg { padding: 13px 26px; font-size: 15px; }
.site-btn-block { width: 100%; }

/* ---------- Navbar ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--s-paper);
    border-top: 3px solid var(--s-teal);
    border-bottom: 1px solid var(--s-line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 4px 18px rgba(18, 38, 63, .05);
}
.site-nav-inner {
    max-width: var(--s-max); margin: 0 auto; padding: 0 24px;
    min-height: 76px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--s-navy); }
body.site .site-brand { color: var(--s-navy); }
.site-brand img { width: auto; height: 54px; max-width: 120px; object-fit: contain; }
.site-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.site-brand strong { font: 700 19px/1.2 var(--s-serif); letter-spacing: .02em; }
.site-brand small { font-size: 12px; color: var(--s-muted); letter-spacing: .03em; }

.site-menu { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
body.site .site-links a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 28px 14px 25px;
    font-weight: 600; font-size: 14.5px;
    color: var(--s-muted); text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
body.site .site-links a:hover { color: var(--s-teal); }
body.site .site-links a.is-active { color: var(--s-teal); border-bottom-color: var(--s-teal); }

.site-login-btn { padding: 9px 20px; }

.site-user { position: relative; }
.site-user-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--s-bg); border: 1px solid var(--s-line); border-radius: 999px;
    cursor: pointer; font: inherit; color: var(--s-navy);
}
.site-user-btn:hover { border-color: var(--s-teal); }
.site-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--s-navy); color: #fff;
    display: grid; place-items: center; font: 700 15px var(--s-serif);
}
.site-user-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; max-width: 170px; }
.site-user-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-user-text small { font-size: 11.5px; color: var(--s-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-user-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px;
    background: #fff; border: 1px solid var(--s-line); border-radius: var(--s-radius);
    box-shadow: var(--s-shadow-lg); padding: 6px;
}
.site-user.is-open .site-user-menu { display: block; }
body.site .site-user-menu a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 8px; color: var(--s-ink); text-decoration: none; font-size: 14px; font-weight: 500;
}
body.site .site-user-menu a:hover { background: var(--s-bg); }
body.site .site-user-menu a.danger { color: var(--s-err); }

.site-nav-toggle {
    display: none; background: none; border: 1px solid var(--s-line); border-radius: 8px;
    padding: 8px; color: var(--s-navy); cursor: pointer;
}

/* ---------- Header halaman ---------- */
.site-pagehead {
    background: linear-gradient(135deg, var(--s-navy) 0%, var(--s-navy-2) 100%);
    color: #fff;
    border-bottom: 3px solid var(--s-gold);
}
.site-pagehead .site-wrap { padding-top: 44px; padding-bottom: 44px; }
.site-eyebrow {
    display: inline-block; font: 700 11.5px/1 var(--s-sans);
    letter-spacing: .16em; text-transform: uppercase; color: var(--s-gold);
    margin-bottom: 12px;
}
.site-pagehead .site-eyebrow { color: #e6c36f; }
.site-pagehead h1 { margin: 0 0 8px; font: 700 34px/1.2 var(--s-serif); }
.site-pagehead p { margin: 0; color: #c9d5e5; max-width: 640px; }

/* ---------- Kartu, lencana, alert ---------- */
.site-card {
    background: var(--s-paper); border: 1px solid var(--s-line);
    border-radius: var(--s-radius-lg); box-shadow: var(--s-shadow);
}

.site-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 999px;
    font: 700 11.5px/1.5 var(--s-sans); letter-spacing: .03em;
    background: var(--s-line-soft); color: var(--s-muted);
}
.site-badge.public { background: var(--s-ok-soft); color: var(--s-ok); }
.site-badge.internal { background: #e8edf6; color: var(--s-navy-2); }
.site-badge.open { background: var(--s-teal-soft); color: var(--s-teal-dark); }
.site-badge.done { background: var(--s-ok-soft); color: var(--s-ok); }
.site-badge.warn { background: var(--s-warn-soft); color: var(--s-warn); }
.site-badge.muted { background: var(--s-line-soft); color: var(--s-muted); }

.site-alert {
    padding: 12px 16px; border-radius: var(--s-radius); font-size: 14px;
    border: 1px solid; margin-bottom: 16px;
}
.site-alert.error { background: var(--s-err-soft); color: var(--s-err); border-color: #f4c7c2; }
.site-alert.ok { background: var(--s-ok-soft); color: var(--s-ok); border-color: #b7e3cf; }
.site-alert.info { background: var(--s-teal-soft); color: var(--s-teal-dark); border-color: #b9dfda; }

/* ---------- Form ---------- */
.site-field { margin-bottom: 18px; }
.site-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--s-navy); }
.site-input {
    width: 100%; padding: 11px 14px; font: inherit; color: var(--s-ink);
    background: #fff; border: 1.5px solid var(--s-line); border-radius: var(--s-radius);
    transition: border-color .15s, box-shadow .15s;
}
.site-input:focus { outline: none; border-color: var(--s-teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }

/* ---------- Footer ---------- */
.site-footer { background: var(--s-navy); color: #c3cfdf; margin-top: 64px; border-top: 3px solid var(--s-gold); }
.site-footer-inner {
    max-width: var(--s-max); margin: 0 auto; padding: 44px 24px 32px;
    display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px;
}
.site-footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.site-footer-brand img { width: auto; height: 46px; max-width: 120px; object-fit: contain; }
.site-footer-brand strong { color: #fff; font: 700 18px var(--s-serif); letter-spacing: .02em; }
.site-footer-brand p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.65; color: #aebcd0; }
.site-footer h4 { margin: 0 0 12px; font: 700 12px var(--s-sans); letter-spacing: .14em; text-transform: uppercase; color: #e6c36f; }
.site-footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.site-footer-col p { margin: 0; line-height: 1.6; }
.site-footer-col strong { color: #fff; }
body.site .site-footer a { color: #c3cfdf; text-decoration: none; }
body.site .site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer-bar {
    border-top: 1px solid rgba(255, 255, 255, .1);
    max-width: var(--s-max); margin: 0 auto; padding: 16px 24px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 12.5px; color: #8fa0b8;
}

/* ---------- Responsif ---------- */
@media (max-width: 960px) {
    .site-nav-inner { min-height: 68px; flex-wrap: wrap; }
    .site-nav-toggle { display: inline-flex; }
    .site-menu {
        display: none; width: 100%; flex-direction: column; align-items: stretch;
        gap: 12px; padding: 8px 0 18px; margin-left: 0; order: 3;
    }
    .site-menu.is-open { display: flex; }
    .site-links { flex-direction: column; }
    body.site .site-links a { padding: 12px 8px; border-bottom: 0; border-left: 3px solid transparent; }
    body.site .site-links a.is-active { border-left-color: var(--s-teal); background: var(--s-teal-soft); }
    .site-user-menu { position: static; display: block; box-shadow: none; margin-top: 8px; }
    .site-user-btn svg:last-child { display: none; }
    .site-login-btn { align-self: flex-start; }
    .site-footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
    .site-wrap, .site-nav-inner { padding-left: 16px; padding-right: 16px; }
    .site-brand img { height: 44px; max-width: 96px; }
    .site-brand strong { font-size: 16.5px; }
    .site-pagehead h1 { font-size: 27px; }
}

@media (max-width: 560px) {
    .site-nav-inner { flex-wrap: nowrap; }
    .site-brand { min-width: 0; gap: 10px; }
    .site-brand small { display: none; }
    .site-brand strong { font-size: 15px; }
    .site-brand img { max-width: 84px; }
    .site-menu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; padding: 8px 16px 18px; border-bottom: 1px solid var(--s-line); box-shadow: 0 12px 24px rgba(18,38,63,.1); }
    .site-nav { position: sticky; }
}

/* Kolom password dengan ikon mata (dipakai di semua halaman) */
.pg-pass { position: relative; }
.pg-pass .site-input { padding-right: 48px; }
.pg-pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; color: var(--s-faint); border-radius: 8px; cursor: pointer; }
.pg-pass-toggle:hover { color: var(--s-teal); background: var(--s-teal-soft); }
.pg-pass-toggle:focus-visible { outline: 3px solid rgba(15, 118, 110, .35); }
.pg-pass-toggle .eye-off { display: none; }
.pg-pass-toggle.is-visible .eye-on { display: none; }
.pg-pass-toggle.is-visible .eye-off { display: inline; }
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none !important; }
