:root {
  --gold: #D9B863;
  --gold-lt: #F6E7AE;
  --gold-dk: #A9852F;
  --ink: #F4F1E9;
  --muted: #A7A196;
  --line: rgba(217, 184, 99, .20);
  --line-soft: rgba(255, 255, 255, .09);
  --ok: #3FD79B;
  --no: #FF7A6E;
  --wait: #F0C35C;
  --radius: 18px;
  --shadow: 0 26px 50px -30px rgba(0, 0, 0, .95);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #000;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-accent {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46rem 32rem at 10% -10%, rgba(217, 184, 99, .13), transparent 62%),
    radial-gradient(40rem 28rem at 94% 2%, rgba(160, 128, 50, .10), transparent 60%),
    radial-gradient(38rem 26rem at 80% 92%, rgba(120, 96, 40, .08), transparent 64%),
    radial-gradient(32rem 24rem at 4% 82%, rgba(90, 74, 30, .10), transparent 62%),
    linear-gradient(180deg, #000000 0%, #08070A 55%, #000000 100%);
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; margin: 0 0 8px; }
h1 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--gold-lt); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1 1 auto; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; }

/* ---------- Header ---------- */
.site-head { padding: 22px 0 8px; }

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .8));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: .98rem; letter-spacing: .01em; }
.brand-text small { color: var(--muted); font-size: .74rem; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.site-nav a:hover { background: rgba(217, 184, 99, .10); color: var(--gold-lt); text-decoration: none; }
.site-nav a.active {
  background: linear-gradient(135deg, var(--gold-lt), var(--gold) 60%, var(--gold-dk));
  color: #191304;
  font-weight: 700;
  box-shadow: 0 10px 22px -12px rgba(217, 184, 99, .8);
}

main.wrap { padding: 28px 0 56px; }

.site-foot {
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
}
.site-foot p { margin: 0; }
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.foot-logo { width: 50px; height: 50px; border-radius: 50%; opacity: .9; }

/* ---------- Cards & sections ---------- */
.card {
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 26px 28px;
}
.card + .card, .card + .alert, .alert + .card, .stat-grid + .card, .card + .stat-grid { margin-top: 20px; }
.card.narrow { max-width: 560px; margin-inline: auto; }
.card-title { font-size: 1.05rem; margin-bottom: 16px; }
.sub-title {
  font-size: .95rem;
  margin: 22px 0 10px;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(217, 184, 99, .12);
  border: 1px solid rgba(217, 184, 99, .28);
  color: var(--gold-lt);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}
.hero-copy { padding: 8px 4px 0; }
.hero-copy h1 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem); }
.hero-logo {
  width: 104px; height: 104px;
  border-radius: 50%;
  margin-bottom: 16px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .9));
}
.lede { color: var(--muted); font-size: 1.02rem; max-width: 52ch; }
.hero-card {
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.hero-card h2 { font-size: 1rem; color: var(--gold-lt); }
.check-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: .93rem;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: .45em;
  width: 14px; height: 14px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .85);
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: .93rem;
  border: 1px solid transparent;
}
.alert-error { background: rgba(255, 122, 110, .10); border-color: rgba(255, 122, 110, .38); color: #FFC0B9; }
.alert-success { background: rgba(63, 215, 155, .10); border-color: rgba(63, 215, 155, .35); color: #A8F2D2; }
.alert-info { background: rgba(217, 184, 99, .10); border-color: rgba(217, 184, 99, .34); color: var(--gold-lt); }
.error-list { margin: 8px 0 0; padding-left: 20px; }
.error-list li { margin-bottom: 4px; }
.client-errors { margin: 18px 0 0; }

/* ---------- Forms ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 30px; }
fieldset:last-of-type { margin-bottom: 0; }
legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
  font-weight: 700;
  padding: 0;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
}
.step {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold) 65%, var(--gold-dk));
  color: #191304;
  font-size: .8rem;
  letter-spacing: 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }

.field { display: block; margin-bottom: 18px; }
.field > span, .file-title { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field em, .file-title em { color: #FF8A7E; font-style: normal; }

input[type=text], input[type=date], input[type=tel], input[type=password], textarea, input[type=file] {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: rgba(167, 161, 150, .75); }
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(217, 184, 99, .7);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 4px rgba(217, 184, 99, .16);
}
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1) sepia(1) saturate(3) hue-rotate(2deg); cursor: pointer; }

.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  font-size: .94rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.radio-card:hover { border-color: rgba(217, 184, 99, .45); background: rgba(255, 255, 255, .07); }
.radio-card:has(input:checked) {
  border-color: rgba(217, 184, 99, .85);
  background: rgba(217, 184, 99, .12);
  box-shadow: 0 0 0 3px rgba(217, 184, 99, .12);
  color: var(--gold-lt);
  font-weight: 600;
}
.radio-card input { accent-color: var(--gold); margin: 0; }

.files { gap: 18px 20px; }
.file-field {
  display: block;
  padding: 16px;
  border: 1px dashed rgba(217, 184, 99, .35);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  transition: border-color .16s ease, background .16s ease;
  cursor: pointer;
}
.file-field:hover { border-color: rgba(217, 184, 99, .7); background: rgba(255, 255, 255, .06); }
.file-hint { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.file-field input[type=file] { padding: 8px; font-size: .82rem; background: rgba(0, 0, 0, .35); }
.file-field input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(217, 184, 99, .4);
  background: rgba(217, 184, 99, .16);
  color: var(--gold-lt);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.file-field input[type=file]::file-selector-button:hover { background: rgba(217, 184, 99, .26); }
.file-name {
  display: block;
  margin-top: 8px;
  font-size: .8rem;
  color: var(--muted);
  word-break: break-all;
}
.file-name.has-file { color: var(--ok); font-weight: 600; }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  margin-top: 26px;
}
.form-foot p { margin: 0; max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .94rem;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .16s ease, background .16s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-lt), var(--gold) 55%, var(--gold-dk));
  color: #191304;
  font-weight: 700;
  box-shadow: 0 16px 30px -16px rgba(217, 184, 99, .85);
}
.btn-ghost { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(217, 184, 99, .6); color: var(--gold-lt); }
.btn-ok { background: linear-gradient(135deg, #3FD79B, #159C6C); color: #04140D; box-shadow: 0 16px 30px -18px rgba(63, 215, 155, .8); }
.btn-danger { background: linear-gradient(135deg, #FF7A6E, #C63B2E); color: #1A0705; box-shadow: 0 16px 30px -18px rgba(198, 59, 46, .8); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-stack { display: grid; gap: 10px; }

/* ---------- Success / result ---------- */
.success-icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3FD79B, #159C6C);
  color: #04140D;
  font-size: 1.7rem;
  box-shadow: 0 18px 30px -18px rgba(63, 215, 155, .9);
}
.reg-box {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin: 22px 0 24px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(217, 184, 99, .14), rgba(169, 133, 47, .10));
  border: 1px solid rgba(217, 184, 99, .34);
}
.reg-box small { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.reg-box strong {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  letter-spacing: .06em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--gold-lt);
}
.summary { display: grid; gap: 10px; margin: 0; text-align: left; }
.summary > div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); font-size: .86rem; }
.summary dd { margin: 0; font-size: .94rem; font-weight: 500; }
.actions-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0 12px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 6px; }
.page-head.with-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: .85rem; margin-bottom: 10px; color: var(--muted); }
.back-link:hover { color: var(--gold-lt); }

.search-card { display: flex; gap: 14px; align-items: flex-end; padding: 20px 22px; }
.search-card .field { margin-bottom: 0; }

.result-card .result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.result-card .result-head h2 {
  margin: 2px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  color: var(--gold-lt);
}

.badge {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-wait { background: rgba(240, 195, 92, .14); color: var(--wait); border: 1px solid rgba(240, 195, 92, .38); }
.badge-ok { background: rgba(63, 215, 155, .14); color: var(--ok); border: 1px solid rgba(63, 215, 155, .38); }
.badge-no { background: rgba(255, 122, 110, .13); color: var(--no); border: 1px solid rgba(255, 122, 110, .36); }
.badge-baru { background: rgba(167, 161, 150, .13); color: #D7D2C6; border: 1px solid rgba(167, 161, 150, .32); }
.badge-pindah { background: rgba(217, 184, 99, .16); color: var(--gold-lt); border: 1px solid rgba(217, 184, 99, .45); }

/* segmented filter (Semua / Siswa Baru / Siswa Pindah) */
.seg-control {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
}
.seg:hover { text-decoration: none; color: var(--gold-lt); background: rgba(217, 184, 99, .09); }
.seg.active {
  background: linear-gradient(135deg, var(--gold-lt), var(--gold) 60%, var(--gold-dk));
  color: #191304;
}
.seg-count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  font-size: .76rem;
  text-align: center;
}
.seg.active .seg-count { background: rgba(0, 0, 0, .22); color: #191304; }

.asal-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-field-key { border-style: solid; border-color: rgba(217, 184, 99, .55); background: rgba(217, 184, 99, .07); }

.note {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(240, 195, 92, .09);
  border: 1px solid rgba(240, 195, 92, .28);
  margin-bottom: 18px;
}
.note strong { color: var(--gold-lt); }
.note p { margin: 6px 0 0; font-size: .93rem; }

.berkas-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.berkas-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .1);
  font-size: .9rem;
}
.berkas-list li:last-child { border-bottom: 0; }
.berkas-list a { font-weight: 600; font-size: .86rem; }

/* ---------- Admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  display: block;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform .14s ease, border-color .16s ease;
}
.stat-card:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(217, 184, 99, .55); }
.stat-card small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.stat-card strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.stat-card.active {
  background: linear-gradient(135deg, rgba(217, 184, 99, .16), rgba(169, 133, 47, .10));
  border-color: rgba(217, 184, 99, .6);
}
.stat-card.active strong { color: var(--gold-lt); }

.table-card { padding: 12px 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 13px 14px; text-align: left; white-space: nowrap; }
thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
tbody tr { border-bottom: 1px solid rgba(255, 255, 255, .07); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: rgba(217, 184, 99, .07); }

.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.verify-form .field { margin-bottom: 16px; }
.login-card { padding: 32px; text-align: center; }
.login-card .summary, .login-card .berkas-list { text-align: left; }
.login-card form { margin-top: 18px; text-align: left; }
.login-card .btn { margin-top: 4px; }
.login-logo {
  display: block;
  width: 88px; height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .9));
}
.empty { padding: 40px 24px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .grid-2, .files { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .wrap { width: min(1080px, 100% - 24px); }
  .card { padding: 20px 18px 22px; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .search-card { flex-direction: column; align-items: stretch; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .form-foot .btn { width: 100%; }
  .head-inner { padding: 12px 14px; }
  .hero-logo { width: 84px; height: 84px; }
}
