/* Halaman login modern. Tanpa Bootstrap, tanpa gambar. */
:root {
    --deep: #0f2e26;
    --deep-2: #163d33;
    --brand: #1f6f5c;
    --brand-2: #2a8a72;
    --mint: #bfe6d6;
    --sun: #f2b84b;
    --ink: #10201b;
    --muted: #5f6f69;
    --line: #dfe5e2;
    --bg: #f4f6f5;
    --err: #b42318;
    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }

.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); }

/* ---------- panel kiri ---------- */
.side {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    padding: clamp(28px, 4.5vw, 64px);
    color: #eaf5f0;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(42, 138, 114, .45), transparent 60%),
        radial-gradient(90% 70% at 0% 100%, rgba(242, 184, 75, .10), transparent 60%),
        var(--deep);
}
.side::after { /* garis halus seperti kertas milimeter, sangat samar */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.side > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 14px; }
.logos { display: flex; gap: 8px; }
.logos img { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; background: #fff; padding: 5px; }
.mark { width: 48px; height: 48px; border-radius: 14px; background: var(--sun); display: grid; place-items: center; }
.mark svg { width: 26px; height: 26px; fill: var(--deep); }
.brand-name { font-weight: 700; font-size: 1.02rem; }
.brand-sub { font-size: .82rem; color: rgba(234, 245, 240, .66); margin-top: 2px; }

.hero { max-width: 560px; }
.date { margin: 0 0 14px; font-size: .9rem; font-weight: 600; color: var(--mint); }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.lead { margin: 18px 0 0; font-size: 1.02rem; line-height: 1.6; color: rgba(234, 245, 240, .74); max-width: 42ch; }

/* ornamen grid presensi */
.grid { margin: 0; width: min(100%, 230px); }
.grid-head, .grid-cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.grid-head span { font-size: .66rem; font-weight: 600; color: rgba(234, 245, 240, .5); text-align: center; padding-bottom: 6px; }
.c { aspect-ratio: 1; border-radius: 6px; background: rgba(255, 255, 255, .07); display: block;
     animation: isi .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d) * 28ms + 150ms); }
.c-h { background: var(--brand-2); }
.c-s { background: var(--sun); }
.c-i { background: #7db3ff; }
.c-a { background: #f07a6a; }
@keyframes isi { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.grid figcaption { margin-top: 12px; font-size: .74rem; color: rgba(234, 245, 240, .6); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.k { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.k:first-child { margin-left: 0; }
.k-h { background: var(--brand-2); } .k-s { background: var(--sun); } .k-i { background: #7db3ff; } .k-a { background: #f07a6a; }

/* ---------- panel kanan ---------- */
.main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 24px; }
.card {
    width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 34px 32px 28px; box-shadow: 0 1px 2px rgba(16, 32, 27, .04), 0 12px 32px -12px rgba(16, 32, 27, .12);
}
.card h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.015em; }
.sub { margin: 6px 0 24px; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.msg { border-radius: 12px; padding: 11px 14px; font-size: .88rem; margin-bottom: 18px; line-height: 1.45; }
.msg-err { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.msg-ok { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.msg-info { background: #fffaeb; color: #93370d; border: 1px solid #fedf89; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 7px; color: #2b3a35; }
.field input {
    width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: .98rem; color: var(--ink);
    background: #f8faf9; border: 1.5px solid var(--line); border-radius: 12px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #a3b0ab; }
.field input:hover { border-color: #c4cfca; }
.field input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 111, 92, .14); }
.field input.invalid { border-color: var(--err); box-shadow: 0 0 0 4px rgba(180, 35, 24, .1); }
#npsn { letter-spacing: .06em; font-variant-numeric: tabular-nums; font-weight: 600; }

.hint { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.hint .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); flex: none; }
.hint a, .foot a { color: var(--brand); font-weight: 600; text-decoration: none; }
.hint a:hover, .foot a:hover { text-decoration: underline; }

.pw { position: relative; }
.pw input { padding-right: 50px; }
.pw-toggle {
    position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; border-radius: 9px;
    background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.pw-toggle:hover { background: #eef2f0; color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .i-hide, .pw-toggle[aria-pressed="true"] .i-show { display: none; }
.pw-toggle[aria-pressed="true"] .i-hide { display: block; }
.caps { margin: 7px 0 0; font-size: .8rem; color: #93370d; }

.submit {
    width: 100%; height: 50px; margin-top: 6px; border: 0; border-radius: 12px; cursor: pointer;
    font: inherit; font-weight: 700; font-size: 1rem; color: #fff; background: var(--brand);
    transition: background .15s, transform .05s, box-shadow .15s;
    box-shadow: 0 6px 16px -6px rgba(31, 111, 92, .55);
}
.submit:hover { background: #185a4a; }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid rgba(31, 111, 92, .35); outline-offset: 2px; }
.submit.busy { opacity: .75; cursor: progress; }

.foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.admin-link { font-size: .82rem; color: var(--muted); text-decoration: none; }
.admin-link:hover { color: var(--brand); text-decoration: underline; }

/* ---------- layar kecil ---------- */
@media (max-width: 900px) {
    .lg { grid-template-columns: 1fr; }
    .side { gap: 22px; padding: 24px 20px 28px; }
    .hero h1 { font-size: 2rem; }
    .lead { display: none; }
    .grid { display: none; }
    .main { padding: 24px 16px 40px; justify-content: flex-start; margin-top: -14px; }
    .card { padding: 26px 20px 22px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .c { animation: none; }
    * { transition: none !important; }
}
