/* =========================================================
   Optimis ASN - gaya tampilan
   Warna diambil dari selebaran: navy + toska
   ========================================================= */
:root {
  --navy: #020f4a;
  --navy-2: #0a1d6b;
  --teal: #16e0d2;
  --teal-dark: #0b8f88;
  --ink: #0d1530;
  --muted: #5b6480;
  --line: #e3e8f2;
  --bg: #f4f7fc;
  --card: #ffffff;
  --danger: #c62e3b;
  --danger-bg: #fdecee;
  --ok: #0f8a5f;
  --ok-bg: #e6f6ef;
  --warn-bg: #fff6e0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(2, 15, 74, .06), 0 4px 16px rgba(2, 15, 74, .06);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--teal-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---------- tata letak ---------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 460px; }
main { padding: 28px 0 96px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.menu-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .menu-grid .card { padding: 16px; } .menu-grid .card-link .badge { top: 10px; right: 10px; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }

/* ---------- kepala halaman ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand img { height: 40px; display: block; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: #dbe4ff; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.nav .btn { color: var(--navy); }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; padding: 6px 10px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px;
       font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .05s, filter .15s; min-height: 46px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: .9rem; }

/* ---------- kartu ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card h2, .card h3 { margin-bottom: .4em; }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .1s, box-shadow .15s; position: relative; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(2,15,74,.12); }
.card-link.disabled { pointer-events: none; opacity: .65; }
.icon-circle { width: 44px; height: 44px; border-radius: 12px; background: rgba(22,224,210,.16); color: var(--teal-dark);
               display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 10px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--muted); }
.badge-teal { background: rgba(22,224,210,.18); color: var(--teal-dark); }
.badge-gold { background: #fff1c7; color: #8a5a00; }
.card-link .badge { position: absolute; top: 16px; right: 16px; }

/* ---------- formulir ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(22,224,210,.25); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.check input, .field .check input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--teal-dark); box-shadow: none; }
.check:has(input:checked) { border-color: var(--teal-dark); background: rgba(22,224,210,.06); }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; padding: 6px; }

/* ---------- pesan ---------- */
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: .95rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: #e8f0ff; color: #1d3b8f; }
.alert-warn { background: var(--warn-bg); color: #7a5200; }

/* ---------- halaman masuk/daftar ---------- */
.auth-page { min-height: 100vh; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); padding: 32px 0 64px; }
.auth-page .brand { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-page .brand img { height: 52px; }
.auth-page .card { padding: 28px 24px; }
.auth-page .foot { text-align: center; color: #c9d4ff; margin-top: 18px; }
.auth-page .foot a { color: var(--teal); font-weight: 700; }

/* ---------- beranda ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(22,224,210,.18), transparent 60%), linear-gradient(170deg, var(--navy) 0%, var(--navy-2) 100%);
        color: #fff; padding: 56px 0 72px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.02em; }
.hero h1 span { color: var(--teal); display: block; }
.hero p.lead { font-size: 1.1rem; color: #c9d4ff; max-width: 560px; }
.hero .row { margin-top: 24px; }
.quote { background: #f2f8fd; color: var(--navy); border-radius: 18px; padding: 18px 22px; font-style: italic; font-weight: 700; margin-top: 32px; max-width: 520px; }
section.block { padding: 56px 0; }
section.block.alt { background: #fff; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--teal); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }
.cta { background: var(--navy); color: #fff; border-radius: 22px; padding: 36px 28px; text-align: center; }
.cta p { color: #c9d4ff; }
footer.site { background: var(--navy); color: #c9d4ff; padding: 32px 0 96px; font-size: .95rem; }
footer.site a { color: #fff; text-decoration: none; font-weight: 600; }

/* ---------- dashboard ---------- */
.welcome { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: var(--radius); padding: 22px; }
.welcome p { color: #c9d4ff; margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.empty { color: var(--muted); font-size: .95rem; }

/* ---------- tombol WhatsApp melayang ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: #25d366; color: #fff; border-radius: 999px; padding: 12px 18px 12px 14px;
            display: flex; gap: 8px; align-items: center; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.wa-float svg { width: 24px; height: 24px; }
@media (max-width: 480px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- notifikasi kecil ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
         z-index: 100; font-size: .95rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--teal-dark); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 24px 0; }
.welcome .badge-teal { background: var(--teal); color: var(--navy); }
.field .check { display: flex; font-weight: 400; margin-bottom: 8px; }

/* ---------- logo ---------- */
.brandmark { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brandmark img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.brandmark span { font-weight: 800; font-size: .98rem; line-height: 1.05; letter-spacing: -.01em; padding-left: 10px; border-left: 2px solid rgba(255,255,255,.85); }
.brand { text-decoration: none; }
.brand img { height: auto; }
.auth-page .brandmark img { width: 52px; height: 52px; }
.auth-page .brandmark span { font-size: 1.15rem; }
