:root {
  --green: #1b6b3a;
  --green-d: #0f4224;
  --green-l: #2d9a56;
  --leaf: #7cb342;
  --gold: #c9a227;
  --gold-l: #e8c547;
  --cream: #f6f3ea;
  --sand: #efe8d8;
  --ink: #1a241c;
  --muted: #5c6b60;
  --white: #fff;
  --card: #fff;
  --shadow: 0 18px 50px rgba(15, 66, 36, .12);
  --radius: 18px;
  --nav-h: 76px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(15, 66, 36, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 197, 71, .25);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-l), var(--gold));
  display: grid; place-items: center; font-weight: 800; color: var(--green-d); font-size: 18px;
  box-shadow: 0 6px 16px rgba(201,162,39,.35);
}
.brand small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-l); opacity: .9; }
.brand strong { font-size: 14px; letter-spacing: .02em; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: #e8f5e9; font-size: 14px; font-weight: 600; opacity: .88; }
.nav-links a:hover { opacity: 1; color: var(--gold-l); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 14px; font-family: inherit;
}
.btn-gold { background: linear-gradient(180deg, #efd56a, #c9a227); color: var(--green-d); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: #e8f0ea; color: var(--green-d); }
.btn-danger { background: #c0392b; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12px; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh;
  background:
    linear-gradient(120deg, rgba(15,66,36,.88), rgba(27,107,58,.55)),
    radial-gradient(circle at 80% 20%, rgba(232,197,71,.25), transparent 40%);
  color: #fff;
  display: grid; place-items: center;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(transparent, var(--cream));
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 70px 0 100px; position: relative; z-index: 1; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(232,197,71,.35);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-l);
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.12; margin: 16px 0 14px; letter-spacing: -.03em; }
.hero p.lead { font-size: 17px; color: #e8f5e9; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); padding: 14px; border-radius: 14px; }
.stat b { display: block; font-size: 22px; color: var(--gold-l); }
.stat span { font-size: 12px; opacity: .85; }
.hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  border-radius: 24px; padding: 28px;
}
.hero-card h3 { margin-bottom: 12px; }
.list-check { list-style: none; display: grid; gap: 10px; }
.list-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: var(--gold); color: var(--green-d); display: grid; place-items: center; font-size: 12px; font-weight: 800;
}

/* SECTIONS */
section { padding: 80px 0; }
.sec-title { text-align: center; margin-bottom: 40px; }
.sec-title span { color: var(--green); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.sec-title h2 { font-size: 34px; letter-spacing: -.02em; margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid #ece6d6;
}
.icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(160deg, #e8f5e9, #c8e6c9);
  display: grid; place-items: center; font-size: 24px; margin-bottom: 14px;
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.about-panel {
  background: linear-gradient(160deg, var(--green-d), var(--green));
  color: #fff; border-radius: 28px; padding: 36px; min-height: 340px;
}
.about-panel h3 { color: var(--gold-l); margin-bottom: 10px; }
.misi { white-space: pre-line; font-size: 15px; opacity: .95; }
.timeline { display: grid; gap: 16px; }
.tl { display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.year { font-weight: 800; color: var(--green); }

.table-wrap { overflow: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #efe8d8; }
th { background: #f4faf5; color: var(--green-d); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.b-aktif, .b-disetujui, .b-berjalan, .b-lunas { background: #e8f5e9; color: #1b6b3a; }
.b-pengajuan, .b-pending { background: #fff8e1; color: #8d6e00; }
.b-ditolak, .b-nonaktif { background: #fdecea; color: #c0392b; }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.footer {
  background: var(--green-d); color: #d7eadc; padding: 40px 0 20px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer h4 { color: var(--gold-l); margin-bottom: 10px; }
.copy { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; font-size: 13px; opacity: .8; }

/* AUTH */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--cream);
}
.auth-art {
  background:
    linear-gradient(160deg, rgba(15,66,36,.9), rgba(27,107,58,.7)),
    radial-gradient(circle at 30% 80%, rgba(232,197,71,.3), transparent 50%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-form { display: grid; place-items: center; padding: 32px; }
.form-box { width: min(420px, 100%); background: #fff; padding: 32px; border-radius: 24px; box-shadow: var(--shadow); }
.form-box h1 { font-size: 26px; margin: 6px 0 18px; }
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #ddd5c2; font-family: inherit; font-size: 14px; background: #fffefb;
}
textarea { min-height: 90px; resize: vertical; }
.alert { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: 13px; }
.alert-err { background: #fdecea; color: #c0392b; }
.alert-ok { background: #e8f5e9; color: #1b6b3a; }

/* APP SHELL */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #0f4224, #163d27);
  color: #dceee1; padding: 22px 16px;
  position: sticky; top: 0;
  height: 100vh; max-height: 100vh;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.side-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; color: #fff; flex: 0 0 auto; }
.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-bottom: 10px;
}
.side-nav::-webkit-scrollbar { width: 8px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(232,197,71,.45); border-radius: 8px; }
.side-nav { scrollbar-color: rgba(232,197,71,.45) transparent; }
.side-nav a {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 12px; color: #d7eadc; font-size: 14px; font-weight: 600; margin-bottom: 4px;
}
.side-nav a:hover, .side-nav a.active { background: rgba(232,197,71,.18); color: var(--gold-l); }
.sidebar > div:last-child { flex: 0 0 auto; }
.main { padding: 24px 28px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kpi b { display: block; font-size: 22px; margin-top: 6px; color: var(--green-d); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 6px; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,66,36,.45); display: none; place-items: center; z-index: 80; padding: 20px; }
.modal-bg.show { display: grid; }
.modal { background: #fff; width: min(560px, 100%); border-radius: 20px; padding: 24px; max-height: 90vh; overflow: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.docs figure { margin: 0; background: #f6f3ea; border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.docs img { width: 100%; height: 180px; object-fit: cover; }
.docs figcaption { padding: 8px; font-size: 12px; font-weight: 700; }
#imgpop { display: none; position: fixed; inset: 0; background: rgba(10,20,14,.88); z-index: 120; place-items: center; padding: 24px; }
#imgpop.show { display: grid; }
#imgpop img { max-width: min(92vw, 980px); max-height: 82vh; object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
#imgpop p { color: #fff; text-align: center; margin-top: 10px; font-weight: 700; }
@media print {
  .nav, .sidebar, .btn, .topbar a { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
}
.check {
  display: flex; gap: 10px; align-items: flex-start;
  background: #f4faf5; border: 1px solid #d7eadc; padding: 12px; border-radius: 12px; margin-top: 12px; font-size: 14px;
}
.check input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.auth-form { overflow: auto; max-height: 100vh; }
.reg-wrap { min-height: 100vh; background: var(--cream); padding: 28px 16px 48px; }
.reg-card {
  width: min(720px, 100%); margin: 0 auto; background: #fff;
  border-radius: 24px; box-shadow: var(--shadow); padding: 28px 28px 32px;
  border: 1px solid #ece6d6;
}
.reg-head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #efe8d8; }
.reg-head h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.reg-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.form-sec { margin-bottom: 20px; }
.form-sec h4 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green); margin: 0 0 10px;
}
.sel-multi { min-height: 120px; }

@media (max-width: 960px) {
  .hero-grid, .about-grid, .cards, .contact-grid, .auth-wrap, .app, .kpis, .footer-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .nav-links { display: none; }
  .hero { min-height: auto; }
}
/* ===== MOBILE IMPROVEMENTS ===== */
html, body {
  overflow-x: hidden;
}

.container,
.nav-inner {
  width: min(1140px, calc(100% - 24px));
}

.main {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 720px;
}

input,
select,
textarea,
button,
.btn {
  min-height: 44px;
}

.btn-sm {
  min-height: 36px;
}

img {
  height: auto;
}

/* Tablet */
@media (max-width: 960px) {
  section {
    padding: 56px 0;
  }

  .hero-grid,
  .about-grid,
  .cards,
  .contact-grid,
  .auth-wrap,
  .app,
  .kpis,
  .footer-grid,
  .grid-2,
  .docs {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    gap: 24px;
    padding: 32px 0 64px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .sec-title h2 {
    font-size: 28px;
  }

  .auth-art {
    padding: 32px 24px;
  }

  .form-box,
  .reg-card,
  .modal {
    padding: 20px;
    border-radius: 18px;
  }

  .main {
    padding: 18px 16px 32px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .row,
  .actions,
  .hero-actions {
    gap: 10px;
  }

  .docs img {
    height: auto;
    max-height: 260px;
    object-fit: cover;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --nav-h: 68px;
    --radius: 14px;
  }

  body {
    font-size: 14px;
  }

  .container,
  .nav-inner {
    width: min(100%, calc(100% - 20px));
  }

  .brand {
    gap: 10px;
    min-width: 0;
  }

  .brand small {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .brand strong {
    font-size: 12px;
    line-height: 1.25;
  }

  .logo {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 10px;
  }

  .nav {
    height: auto;
    min-height: var(--nav-h);
    padding: 10px 0;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.15;
  }

  .hero p.lead {
    font-size: 15px;
  }

  .kicker,
  .stat span,
  .badge,
  .btn-sm,
  th {
    font-size: 11px;
  }

  .card,
  .about-panel,
  .kpi,
  .form-box,
  .reg-card,
  .modal {
    padding: 16px;
    border-radius: 16px;
  }

  .sec-title {
    margin-bottom: 24px;
  }

  .sec-title h2 {
    font-size: 24px;
  }

  .tl {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .year {
    font-size: 13px;
  }

  .footer {
    padding: 28px 0 18px;
  }

  .copy {
    font-size: 12px;
  }

  .main {
    padding: 14px 12px 28px;
  }

  .kpis {
    gap: 12px;
    margin-bottom: 16px;
  }

  .kpi b {
    font-size: 20px;
  }

  th,
  td {
    padding: 10px 12px;
    white-space: nowrap;
  }

  .actions,
  .row,
  .hero-actions {
    flex-wrap: wrap;
  }

  .actions .btn,
  .hero-actions .btn,
  .row .btn {
    width: 100%;
  }

  .check {
    padding: 10px;
    font-size: 13px;
  }

  .reg-wrap {
    padding: 18px 10px 32px;
  }

  .auth-form {
    padding: 18px 12px;
  }
}
