/* ePenyuluh — stylesheet bersama (vanilla CSS, mobile-first) */
:root {
  --green: #0e7a57;
  --green-dark: #084c37;
  --green-soft: #e7f4ee;
  --green-mid: #c9e6d8;
  --gold: #d4a017;
  --gold-soft: #fdf6e0;
  --ink: #1c2b25;
  --muted: #5d6f66;
  --line: #dfe8e2;
  --bg: #f6f8f7;
  --card: #ffffff;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(8, 76, 55, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; color: var(--green-dark); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .container {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-dark); }
.brand img { width: 36px; height: 36px; border-radius: 9px; display: block; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-tag { font-size: .72rem; color: var(--muted); display: none; }
.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-links { display: none; gap: 18px; margin-left: 16px; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--green); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  text-decoration: none; background: var(--green); color: #fff;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-gold { background: var(--gold); color: #231a00; }
.btn-gold:hover { background: #bd8c12; }
.btn-outline { background: #fff; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-soft); }
.btn-ghost { background: transparent; color: var(--green); padding: 8px 10px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8f1d17; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero & landing ---------- */
.hero {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; padding: 56px 0 64px;
}
.hero h1 { color: #fff; font-size: 1.9rem; margin-bottom: .4em; }
.hero p.lead { font-size: 1.08rem; color: #d9efe3; max-width: 34rem; }
.hero .btn-row { margin-top: 22px; }
.hero-note { font-size: .85rem; color: #bcdccb; margin-top: 14px; }
.section { padding: 48px 0; }
.section-alt { background: #fff; }
.section h2 { font-size: 1.45rem; text-align: center; }
.section .subtitle { text-align: center; color: var(--muted); max-width: 36rem; margin: 0 auto 28px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: 1fr; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.05rem; margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.6rem; line-height: 1; }
.pain-num {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-dark);
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 10px;
}
.step-num {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #231a00;
  align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px;
}
.price { font-size: 1.7rem; font-weight: 800; color: var(--green-dark); }
.price small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.price-card.featured { border: 2px solid var(--gold); background: var(--gold-soft); }
.pill {
  display: inline-block; background: var(--gold); color: #231a00;
  font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.soon-banner {
  background: var(--gold-soft); border: 1px dashed var(--gold);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.modelb-box { background: var(--green-soft); border-radius: var(--radius); padding: 22px; }
.modelb-box ul, .checklist { padding-left: 1.2em; margin: 0 0 1em; }
.modelb-box li, .checklist li { margin-bottom: .4em; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; color: var(--green-dark); }
.faq p { margin: .6em 0 0; color: var(--muted); }
.site-footer { background: var(--green-dark); color: #cfe6da; padding: 32px 0; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }

/* ---------- Form ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; font-size: .83rem; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #c4d2c9; border-radius: 9px;
  font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green);
}
.field textarea { min-height: 88px; resize: vertical; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .93rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.check small { display: block; font-weight: 400; color: var(--muted); }
.form-error {
  display: none; background: var(--danger-soft); color: var(--danger);
  border: 1px solid #f0b9b4; border-radius: 9px; padding: 10px 12px; margin-bottom: 16px; font-size: .92rem;
}
.form-error.show { display: block; }
.form-ok {
  display: none; background: var(--green-soft); color: var(--green-dark);
  border: 1px solid var(--green-mid); border-radius: 9px; padding: 10px 12px; margin-bottom: 16px; font-size: .92rem;
}
.form-ok.show { display: block; }
.auth-wrap { padding: 40px 0 56px; }
.auth-wrap h1 { text-align: center; }
.auth-wrap .subtitle { text-align: center; color: var(--muted); }
.trial-note {
  background: var(--gold-soft); border: 1px solid #ecd27a; border-radius: 10px;
  padding: 12px 14px; font-size: .92rem; margin-bottom: 18px;
}
.auth-switch { text-align: center; margin-top: 18px; font-size: .93rem; }

/* ---------- Badge status ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.badge-draft { background: #eef1f0; color: #4a5a52; }
.badge-siap { background: var(--gold-soft); color: #7a5c00; }
.badge-terkirim { background: var(--green-soft); color: var(--green-dark); }
.badge-gagal { background: var(--danger-soft); color: var(--danger); }
.badge-menunggu { background: #e8eefc; color: #274690; }

/* ---------- Cincin progres ---------- */
.ring-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-bg { stroke: var(--green-mid); }
.ring .ring-fg { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring .ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.ring-label strong { font-size: 1.5rem; color: var(--green-dark); line-height: 1.1; }
.ring-label span { font-size: .78rem; color: var(--muted); }

/* ---------- Grid bulan ---------- */
.month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.month-cell {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fff; font-size: .88rem;
}
.month-cell.current { border-color: var(--green); background: var(--green-soft); }
.month-cell strong { display: block; font-size: 1.05rem; color: var(--green-dark); }
.month-cell .m-name { font-weight: 700; }
.month-cell .m-count { color: var(--muted); font-size: .8rem; }
.mini-bar { height: 6px; background: var(--green-mid); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- App ---------- */
.app-tabs {
  display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 60px; z-index: 15; overflow-x: auto;
}
.app-tabs .container { display: flex; gap: 4px; padding-top: 0; padding-bottom: 0; }
.tab-btn {
  background: none; border: none; border-bottom: 3px solid transparent;
  font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
  padding: 13px 14px 10px; white-space: nowrap;
}
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--gold); }
.tab-panel { display: none; padding: 24px 0 56px; }
.tab-panel.active { display: block; }
.tab-panel h1 { font-size: 1.4rem; }
.stack { display: grid; gap: 16px; }
.reminder {
  border-left: 4px solid var(--gold); background: var(--gold-soft);
  border-radius: 10px; padding: 14px 16px;
}
.reminder strong { color: #6b5200; }
.demo-banner {
  background: #fff3cd; border: 1px solid var(--gold); color: #6b5200;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: .93rem;
}
.danger-zone { border: 1px solid #f0b9b4; background: #fffafa; }
.danger-zone h3 { color: var(--danger); }
.kitab-item, .log-item {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.kitab-item:last-child, .log-item:last-child { border-bottom: none; }
.log-item { font-size: .9rem; }
.log-item time { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.page-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.page-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: .85rem; text-decoration: none; color: var(--ink);
}
.page-chip:hover { border-color: var(--green); color: var(--green); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  background: var(--green-dark); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: .93rem; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .25s, transform .25s; z-index: 50; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
.file-preview { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.photo-thumb { max-width: 180px; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; display: block; }

/* ---------- Responsif ---------- */
@media (min-width: 640px) {
  .hero h1 { font-size: 2.4rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .month-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-tag { display: block; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: flex; }
  .month-grid { grid-template-columns: repeat(6, 1fr); }
  .stack-2 { grid-template-columns: 1fr 1fr; }
}
