/* =====================================================================
   LPQ Al-Qur'an — stylesheet utama
   Tema: hijau Islami, putih, aksen emas. Sidebar desktop + nav ringkas HP.
   ===================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green-900: #073B2A;
  --green-800: #0B4A34;
  --green-700: #0F5C42;
  --green-600: #12805A;
  --green-500: #17A06F;
  --green-100: #E7F5EC;
  --green-50:  #F1F9F4;
  --gold:      #C9A227;
  --gold-dark: #9B7A12;
  --gold-light:#E7CB74;
  --gold-soft: #FBF3DA;
  --ivory:     #F5F8F3;
  --card:      #FFFFFF;
  --ink:       #173A2C;
  --ink-soft:  #2C4C3D;
  --muted:     #6B8278;
  --line:      #E2EAE4;
  --line-soft: #EEF3EF;
  --red:       #B42318;
  --red-soft:  #FEF3F2;
  --orange:    #B54708;
  --orange-soft:#FFF6ED;
  --blue:      #175CD3;
  --blue-soft: #EFF4FF;
  --radius:    14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 74, 52, .06);
  --shadow:    0 8px 24px rgba(11, 74, 52, .07);
  --shadow-lg: 0 18px 50px rgba(11, 74, 52, .12);
  --sidebar-w: 272px;
  --topbar-h:  68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 6% -8%, #E3F3E9 0, transparent 58%),
    radial-gradient(760px 380px at 100% 0, #FCF4DF 0, transparent 52%),
    var(--ivory);
  min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0 0 10px; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; }
::selection { background: #CDEBD8; }

/* ---------------- utilitas ---------------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }
.only-sm { display: none; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------------- sidebar & tata letak ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #0B4A34 0%, #073B2A 55%, #062F22 100%);
  color: #EAF3EE;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }

.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 16px; }
.side-brand img { width: 46px; height: 46px; border-radius: 12px; }
.side-brand b { display: block; font-size: 14.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; line-height: 1.25; }
.side-brand small { display: block; font-size: 11px; color: #A8C9B8; letter-spacing: .02em; }

.side-group { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: #8FB6A3; padding: 16px 10px 6px; font-weight: 600; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px;
  color: #D6E7DE; font-size: 13.6px; font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.side-link svg { flex: 0 0 auto; opacity: .9; }
.side-link span { flex: 1 1 auto; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.side-link.active { background: rgba(23,160,111,.24); color: #fff; box-shadow: inset 0 0 0 1px rgba(231,203,116,.28); }
.side-link.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--gold-light);
}
.side-link .count {
  background: var(--gold); color: #2B2000; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11.5px; color: #9DC1AF; }
.side-foot .who { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: #EAF3EE; }
.side-foot .who b { display: block; font-size: 12.5px; }
.side-foot .who small { color: #A8C9B8; }
.side-foot a { color: #CFE6DA; }
.side-foot .ava { width: 32px; height: 32px; border-radius: 50%; background: rgba(231,203,116,.22); color: var(--gold-light); display: grid; place-items: center; font-weight: 700; font-size: 12px; }

.main { flex: 1 1 auto; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 26px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 17.5px; line-height: 1.3; }
.topbar .sub { font-size: 11.5px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--green-50); border: 1px solid #DCEBE2; }
.user-chip .ava { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.user-chip .name { font-size: 12.5px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--green-800); cursor: pointer;
}
.icon-btn:hover { background: var(--green-50); text-decoration: none; }
.hamburger { display: none; }

.content { padding: 24px 26px 40px; max-width: 1320px; width: 100%; }
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(6,47,34,.45); backdrop-filter: blur(2px);
  z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.nav-open .sidebar-overlay { opacity: 1; pointer-events: auto; }

/* ---------------- kartu & bagian ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 15.5px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 17px; }
.section-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* judul halaman dengan aksen emas */
.page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-title h1 { font-size: 21px; }
.page-title .line { width: 34px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.page-title p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------------- statistik ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; gap: 13px; align-items: flex-start;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--green-50); opacity: .85;
}
.stat-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--green-100); color: var(--green-700); position: relative; z-index: 1;
}
.stat-ico.gold { background: var(--gold-soft); color: var(--gold-dark); }
.stat-ico.blue { background: var(--blue-soft); color: var(--blue); }
.stat-ico.orange { background: var(--orange-soft); color: var(--orange); }
.stat-body { position: relative; z-index: 1; min-width: 0; }
.stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 25px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.stat-foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.grid-2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---------------- tombol ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; border: 0; border-radius: 11px;
  padding: 10px 16px; font-size: 13.6px; font-weight: 600;
  cursor: pointer; transition: filter .15s, transform .05s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(11,74,52,.16);
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .6; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, #E0B93F, #B98F12); color: #251C00; box-shadow: 0 4px 12px rgba(201,162,39,.2); }
.btn-gold:hover { color: #251C00; }
.btn-light { background: #fff; color: var(--green-800); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: var(--green-50); color: var(--green-800); }
.btn-danger { background: linear-gradient(135deg, #DC4C40, #A6241A); box-shadow: 0 4px 12px rgba(180,35,24,.18); }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* loading state tombol */
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-light.loading::after, .btn-gold.loading::after { border-color: rgba(11,74,52,.25); border-top-color: var(--green-800); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- form ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: #2A4B3B; }
.field > label .req { color: var(--red); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date],
.field input[type=time], .field input[type=number], .field input[type=tel], .field input[type=search],
.field input[type=url], .field select, .field textarea, .input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 13.6px; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea, .textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: #9ED0B0; box-shadow: 0 0 0 3px rgba(18,128,90,.12);
}
.field input[readonly], .field input[disabled], .field select[disabled] { background: #F6F9F7; color: var(--muted); }
.field .help { font-size: 11.5px; color: var(--muted); }
.field .err { font-size: 11.5px; color: var(--red); font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #F0A9A2; box-shadow: 0 0 0 3px rgba(180,35,24,.08); }
/* ---------------- kolom kata sandi (ikon mata di dalam kolom) ---------------- */
.pass-wrap { position: relative; display: block; }
.pass-wrap input[type=password],
.pass-wrap input[type=text] {
  width: 100%;
  padding: 10px 46px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 13.6px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.pass-wrap input:focus {
  outline: none;
  border-color: #9ED0B0;
  box-shadow: 0 0 0 3px rgba(18,128,90,.12);
}
.pass-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pass-toggle:hover { background: var(--green-50); color: var(--green-700); }
.pass-toggle:focus-visible { outline: 2px solid #9ED0B0; outline-offset: 1px; }
.pass-toggle svg { display: block; }
.pass-toggle .ico-off { display: none; }
.pass-toggle[aria-pressed="true"] { color: var(--green-700); background: var(--green-50); }
.pass-toggle[aria-pressed="true"] .ico-on { display: none; }
.pass-toggle[aria-pressed="true"] .ico-off { display: block; }

.pass-meter { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pass-meter .bars { display: flex; gap: 4px; flex: 1 1 auto; max-width: 150px; }
.pass-meter .bars i { height: 4px; flex: 1 1 0; border-radius: 3px; background: #E7EDE9; transition: background .18s; }
.pass-meter .label { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pass-meter[data-level="1"] .bars i:nth-child(-n+1) { background: #DC4C40; }
.pass-meter[data-level="1"] .label { color: #B42318; }
.pass-meter[data-level="2"] .bars i:nth-child(-n+2) { background: #E9A23B; }
.pass-meter[data-level="2"] .label { color: var(--orange); }
.pass-meter[data-level="3"] .bars i:nth-child(-n+3) { background: #4E9F6E; }
.pass-meter[data-level="3"] .label { color: #12703F; }
.pass-meter[data-level="4"] .bars i { background: var(--green-600); }
.pass-meter[data-level="4"] .label { color: var(--green-800); }
.pass-meter.off { visibility: hidden; }

.auth-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.6; }
.auth-hint strong { color: var(--ink-soft); font-weight: 600; }

.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .input { flex: 1 1 auto; min-width: 0; }
.field .input-group > input,
.field .input-group > select { width: auto; flex: 1 1 0; min-width: 0; }

.check { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FBFDFB; }
.check input[type=checkbox] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--green-600); flex: 0 0 auto; }
.check label { font-size: 13px; font-weight: 600; cursor: pointer; }
.check .help { font-size: 11.5px; color: var(--muted); font-weight: 400; }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; }
.radio-pill span {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.radio-pill input:checked + span { border-color: #9ED0B0; background: var(--green-50); color: var(--green-800); box-shadow: inset 0 0 0 1px #BFE3CD; }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.form-actions .btn-light { margin-left: auto; }

/* ---------------- badge & status ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2.5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  line-height: 1.6; white-space: nowrap;
}
.badge-green { background: #E7F6EC; color: #12703F; }
.badge-gold { background: var(--gold-soft); color: #7C5F05; }
.badge-blue { background: var(--blue-soft); color: #1D4ED8; }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: #F2F4F3; color: #5A6B62; }

/* ---------------- tabel ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.2px; min-width: 560px; }
table.table thead th {
  background: #F7FAF8; color: #4B6659; font-size: 11.2px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table tbody td { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: #FBFDFB; }
table.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-empty { text-align: center; padding: 34px 16px; color: var(--muted); font-size: 13px; }
.table-empty strong { display: block; color: var(--ink-soft); font-size: 14px; margin-bottom: 3px; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main .nm { font-weight: 600; color: var(--ink); }
.cell-main .sub { font-size: 11.5px; color: var(--muted); }
.avatar-img, .avatar-initial { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: grid; place-items: center; }
.avatar-initial { background: linear-gradient(135deg, var(--green-100), #D8EEE0); color: var(--green-700); font-weight: 700; }

.pager { display: flex; gap: 5px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 9px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-soft);
}
.pager a:hover { background: var(--green-50); text-decoration: none; }
.pager .current { background: var(--green-700); border-color: var(--green-700); color: #fff; font-weight: 700; }
.pager .disabled { opacity: .45; }

/* ---------------- filter bar ---------------- */
.filter-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end;
  background: #FBFDFB; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 16px;
}
.filter-bar .field > label { font-size: 11.5px; }
.filter-bar .field input, .filter-bar .field select { padding: 8px 10px; font-size: 13px; }
.filter-bar .filter-actions { display: flex; gap: 8px; }
.search-line { display: flex; gap: 8px; align-items: center; }
.search-line .input { min-width: 200px; }

/* ---------------- tab ---------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a {
  padding: 9px 14px; font-size: 13.2px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--green-700); text-decoration: none; }
.tabs a.active { color: var(--green-800); border-bottom-color: var(--gold); }

/* ---------------- flash / toast ---------------- */
.flash-wrap { position: fixed; top: 78px; right: 22px; z-index: 90; display: flex; flex-direction: column; gap: 9px; max-width: min(420px, calc(100vw - 32px)); }
.flash {
  display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 12px;
  font-size: 13.2px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: flashIn .22s ease-out;
}
.flash svg { flex: 0 0 auto; margin-top: 2px; }
.flash-success { border-color: #C8EBD6; background: #F3FBF6; color: #14532D; }
.flash-error { border-color: #FBD5D5; background: #FEF5F5; color: #8A1C1C; }
.flash-warning { border-color: #F3E3AA; background: #FFF9E8; color: #7A5A05; }
.flash-info { border-color: #D9E2FA; background: #F5F8FF; color: #1E3A8A; }
.flash.hide-out { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }

/* ---------------- modal konfirmasi ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(6,47,34,.42); backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 18px; width: 100%; max-width: 430px;
  box-shadow: var(--shadow-lg); padding: 22px; animation: modalIn .18s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.modal-box h3 { font-size: 16.5px; margin-bottom: 6px; }
.modal-box p { color: var(--muted); font-size: 13.4px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 18px; }

/* ---------------- kosong & info ---------------- */
.empty {
  text-align: center; padding: 44px 20px; border: 1px dashed var(--line); border-radius: 16px; background: #FCFEFC;
}
.empty .ico {
  width: 54px; height: 54px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--green-50); color: var(--green-700); margin-bottom: 10px;
}
.empty h3 { font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 12.8px; color: var(--muted); max-width: 430px; margin: 0 auto 14px; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 13.2px; border: 1px solid; margin-bottom: 14px; }
.alert-info { background: #F5F8FF; border-color: #D9E2FA; color: #1E3A8A; }
.alert-warn { background: #FFF9E8; border-color: #F3E3AA; color: #7A5A05; }
.alert-ok { background: #F1FAF4; border-color: #C8EBD6; color: #14532D; }
.alert-err { background: #FEF3F2; border-color: #FBD5D5; color: #8A1C1C; }
.alert a { font-weight: 700; }
.info-list { display: grid; gap: 9px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.2px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); }
.info-row .v { font-weight: 600; text-align: right; word-break: break-word; }

/* ---------------- grafik ---------------- */
.chart-wrap { margin-top: 6px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.donut { position: relative; display: inline-grid; place-items: center; }
.donut svg { display: block; }
.donut-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-label b { font-size: 17px; display: block; line-height: 1.1; }
.donut-label small { font-size: 10.5px; color: var(--muted); }

/* ---------------- baris aksi cepat ---------------- */
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-tile {
  display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 13px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 13.4px;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.quick-tile:hover { text-decoration: none; border-color: #BFE3CD; box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-tile .qi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); flex: 0 0 auto; }
.quick-tile.gold .qi { background: var(--gold-soft); color: var(--gold-dark); }
.quick-tile small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---------------- langkah / progress ---------------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.step-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  background: #F4F8F5; border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.step-pill b { width: 19px; height: 19px; border-radius: 50%; background: #E4EEE7; display: grid; place-items: center; font-size: 10.5px; }
.step-pill.active { background: var(--green-50); border-color: #BFE3CD; color: var(--green-800); font-weight: 600; }
.step-pill.active b { background: var(--green-600); color: #fff; }
.step-pill.done b { background: var(--green-600); color: #fff; }
.progress { height: 8px; border-radius: 999px; background: #EAF2EC; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }

/* ---------------- kotak API URL & API Key ---------------- */
.api-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FBFDFB;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 9px;
}
.api-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.8px;
}
.api-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 132px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 12.2px;
}
.api-value {
  flex: 1 1 240px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 12.2px;
  color: var(--green-800);
  overflow-wrap: anywhere;
}
.api-value .api-ph { color: var(--gold-dark); font-weight: 700; }
.api-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 12.8px;
  color: var(--ink-soft);
  line-height: 1.85;
}
.api-steps li::marker { color: var(--green-600); font-weight: 700; }
.api-steps code { font-size: 11.6px; }

/* ---------------- pratinjau WhatsApp ---------------- */
.wa-preview {
  background: #E9F2EC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M0 30h60M30 0v60' stroke='%23D8E7DD' stroke-width='1'/%3E%3C/svg%3E");
  border-radius: 16px; padding: 16px; border: 1px solid #D5E6DB;
}
.wa-bubble {
  background: #fff; border-radius: 12px 12px 12px 3px; padding: 12px 14px; font-size: 13px;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 2px 6px rgba(11,74,52,.08); max-width: 100%;
}
.wa-bubble .meta { display: block; text-align: right; font-size: 10.5px; color: #8AA396; margin-top: 6px; }
.wa-sample { background: #F7FBF8; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 12.4px; white-space: pre-wrap; max-height: 260px; overflow: auto; color: var(--ink-soft); }
code, .code {
  background: #F1F5F2; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all;
}
.code-block { display: block; padding: 10px 12px; margin: 6px 0; }

/* ---------------- navigasi bawah (HP) ---------------- */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav .nav-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px;
  font-size: 10.5px; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer;
}
.bottom-nav a.active { color: var(--green-700); font-weight: 700; background: var(--green-50); }
.bottom-nav a:hover { text-decoration: none; }

/* ---------------- login ---------------- */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 22px;
  background:
    radial-gradient(900px 500px at 15% 0, #0F5C42 0, #073B2A 45%, #052619 100%);
  position: relative; overflow: hidden;
}
.auth-body::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
  background: radial-gradient(ellipse at 50% 100%, rgba(231,203,116,.18), transparent 65%);
  pointer-events: none;
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 30px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35); position: relative; z-index: 1;
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand img { width: 76px; height: 76px; border-radius: 18px; margin-bottom: 10px; }
.auth-brand h1 { font-size: 20px; letter-spacing: .01em; }
.auth-brand p { color: var(--muted); font-size: 12.5px; margin: 3px 0 0; font-style: italic; }
.auth-card .field { margin-bottom: 15px; }
.auth-card form .btn { margin-top: 5px; }
.auth-card .btn { width: 100%; padding: 12px; }
.auth-foot { text-align: center; font-size: 11.8px; color: var(--muted); margin-top: 16px; }
.auth-mark { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.45); font-size: 11.5px; z-index: 1; }

/* ---------------- cetak ---------------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .flash-wrap, .no-print, .form-actions { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  table.table { min-width: 0; font-size: 11.5px; }
  .table-wrap { overflow: visible; border: 0; }
}

/* ---------------- responsif ---------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2-even { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-102%); transition: transform .24s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  body.nav-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--green-800); }
  .topbar { padding: 0 15px; }
  .content { padding: 18px 15px 90px; }
  .bottom-nav { display: block; }
  .only-sm { display: initial; }
  .hide-sm { display: none !important; }
  .user-chip .name { display: none; }
  .flash-wrap { top: auto; bottom: 84px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 640px) {
  .stat-grid, .stat-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-value { font-size: 21px; }
  .stat-ico { width: 36px; height: 36px; border-radius: 10px; }
  .stat-label { font-size: 10.5px; }
  .form-grid, .form-grid.three, .grid-3 { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 16px; }
  .page-title h1 { font-size: 18.5px; }
  .content { padding: 16px 13px 92px; }
  .topbar h1 { font-size: 15.5px; }
  .topbar .sub { display: none; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .row-between { gap: 8px; }
  .auth-card { padding: 24px 20px; }
  table.table { font-size: 12.6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
