/* =========================================================
   GradePCB Cek — Stylesheet
   Tema: alat diagnostik teknisi (PCB / papan sirkuit)
   ========================================================= */

:root {
  --bg: #0B1512;
  --bg-app: #0E1A16;
  --surface: #132420;
  --surface-2: #17302A;
  --border: #1F3A33;
  --text: #EAF2ED;
  --text-dim: #8FA79C;
  --text-faint: #5E7A70;

  --accent: #E3A857;      /* copper/gold trace */
  --accent-strong: #F0BE79;
  --trace: #35C48C;       /* solder-mask green */
  --trace-dim: #1E7A57;

  --g-top: #35C48C;
  --g-high: #4FD1C5;
  --g-midhigh: #63B3ED;
  --g-mid: #63B3ED;
  --g-low: #F0B429;
  --g-bad: #F2555A;
  --g-choice: #A78BFA;
  --g-other: #8FA79C;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;

  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --shell-max: 480px;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 8%, rgba(53,196,140,0.10), transparent 45%),
    radial-gradient(circle at 85% 92%, rgba(227,168,87,0.08), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

p { margin: 0 0 12px; color: var(--text-dim); }

a { color: inherit; }

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* ---------------- App shell ---------------- */

.app-shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(0,0,0,0.35);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(14,26,22,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 15px; }
.brand-text small { color: var(--text-faint); font-size: 10.5px; letter-spacing: 0.02em; }

.topbar-badge {
  font-size: 10px;
  color: var(--trace);
  border: 1px solid var(--trace-dim);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.app-content {
  flex: 1;
  padding: 20px 16px 28px;
  padding-bottom: calc(28px + 64px + env(safe-area-inset-bottom));
}

/* ---------------- Bottom nav ---------------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max);
  display: flex;
  background: rgba(15,28,24,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-faint);
  font-size: 10.5px;
  padding: 6px 2px;
  border-radius: var(--radius-s);
  transition: color .15s ease;
}

.nav-item.is-active { color: var(--trace); }
.nav-item svg { stroke: currentColor; }

/* ---------------- Hero / search ---------------- */

.hero { padding-top: 4px; margin-bottom: 22px; }
.hero h1 { font-size: 24px; }
.hero-sub { font-size: 14px; }

.segmented {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 4px;
  margin-bottom: 10px;
}

.seg-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 10px;
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--surface-2);
  color: var(--trace);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.search-box svg { color: var(--text-faint); flex-shrink: 0; }

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}

.search-box input::placeholder { color: var(--text-faint); }

.clear-btn {
  background: var(--surface-2);
  border: none;
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(180deg, var(--trace), var(--trace-dim));
  color: #06110D;
  border: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 18px;
  border-radius: var(--radius-m);
  cursor: pointer;
}

.btn-block { width: 100%; display: block; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--trace-dim);
  color: var(--trace);
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 16px;
  border-radius: var(--radius-m);
  cursor: pointer;
}

.btn-small { padding: 7px 12px; font-size: 12.5px; }

.btn-text {
  background: none;
  border: none;
  color: var(--g-bad);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

/* ---------------- Quick shortcuts ---------------- */

.quick-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.shortcut-card {
  grid-column: span 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 14px;
  text-decoration: none;
  color: var(--text);
}

.shortcut-card:nth-child(3) { grid-column: span 2; }

.shortcut-card svg { color: var(--trace); flex-shrink: 0; margin-top: 2px; }
.shortcut-accent svg { color: var(--accent); }

.shortcut-card strong { display: block; font-size: 14px; margin-bottom: 2px; }
.shortcut-card span { font-size: 12px; color: var(--text-faint); }

/* ---------------- Stats ---------------- */

.stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}

.stat-pill {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 8px;
  text-align: center;
}

.stat-pill strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--accent-strong);
}

.stat-pill span { font-size: 10.5px; color: var(--text-faint); }

/* ---------------- Legend ---------------- */

.legend-section { margin-bottom: 26px; }
.section-sub { font-size: 13px; margin-top: -2px; }

.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 10px 12px;
}

.legend-text { display: flex; flex-direction: column; }
.legend-text strong { font-size: 13px; }
.legend-text span { font-size: 11.5px; color: var(--text-faint); }

.info-section { margin-bottom: 10px; }
.info-section p { font-size: 13px; }

/* ---------------- Grade badge ---------------- */

.grade-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.g-top      { color: var(--g-top);      background: color-mix(in srgb, var(--g-top) 14%, transparent);      border-color: color-mix(in srgb, var(--g-top) 40%, transparent); }
.g-high     { color: var(--g-high);     background: color-mix(in srgb, var(--g-high) 14%, transparent);     border-color: color-mix(in srgb, var(--g-high) 40%, transparent); }
.g-midhigh  { color: var(--g-midhigh);  background: color-mix(in srgb, var(--g-midhigh) 14%, transparent);  border-color: color-mix(in srgb, var(--g-midhigh) 40%, transparent); }
.g-mid      { color: var(--g-mid);      background: color-mix(in srgb, var(--g-mid) 14%, transparent);      border-color: color-mix(in srgb, var(--g-mid) 40%, transparent); }
.g-low      { color: var(--g-low);      background: color-mix(in srgb, var(--g-low) 14%, transparent);      border-color: color-mix(in srgb, var(--g-low) 40%, transparent); }
.g-bad      { color: var(--g-bad);      background: color-mix(in srgb, var(--g-bad) 14%, transparent);      border-color: color-mix(in srgb, var(--g-bad) 40%, transparent); }
.g-choice   { color: var(--g-choice);   background: color-mix(in srgb, var(--g-choice) 14%, transparent);   border-color: color-mix(in srgb, var(--g-choice) 40%, transparent); }
.g-other    { color: var(--g-other);    background: color-mix(in srgb, var(--g-other) 14%, transparent);    border-color: color-mix(in srgb, var(--g-other) 40%, transparent); }

/* ---------------- Page head (cek-ic / cek-hp / nota) ---------------- */

.page-head { margin-bottom: 14px; }
.page-head h1 { font-size: 21px; }
.page-head p { font-size: 13.5px; }

.search-page-form { margin-bottom: 14px; }

.brand-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 2px;
  scrollbar-width: none;
}
.brand-chips::-webkit-scrollbar { display: none; }

.chip-btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.chip-btn.is-active {
  background: var(--surface-2);
  border-color: var(--trace-dim);
  color: var(--trace);
}

.chip-example {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin: 3px 3px 0 0;
  display: inline-block;
}

.empty-hint { font-size: 13.5px; line-height: 1.7; }
.result-count { font-size: 12.5px; color: var(--text-faint); margin-bottom: 10px; }

/* ---------------- IC list ---------------- */

.ic-list, .hp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.ic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 13px;
}

.ic-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.ic-code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.ic-brand { font-size: 11px; color: var(--text-faint); }

/* ---------------- HP list ---------------- */

.hp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 10px 12px;
}

.hp-thumb, .hp-thumb-fallback {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-s);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface-2);
}

.hp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hp-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--trace);
  font-size: 17px;
}

.hp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-model { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-brand { font-size: 11px; color: var(--text-faint); }

/* ---------------- Nota / invoice builder ---------------- */

.nota-tabs { margin-bottom: 16px; }
.nota-tab-panel { display: none; }
.nota-tab-panel.is-active { display: block; }

.nota-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.nota-section > summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nota-section > summary::-webkit-details-marker { display: none; }
.nota-section > summary::after { content: '▾'; color: var(--text-faint); font-size: 11px; }
.nota-section[open] > summary { margin-bottom: 10px; }

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-title-row h2 { font-size: 14px; margin: 0; }

.form-grid { display: flex; flex-direction: column; gap: 10px; }

.form-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-dim); }

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 10px 11px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}

.form-field textarea { resize: vertical; }
.field-hint { font-size: 10.5px; color: var(--text-faint); }

.logo-preview-wrap { display: flex; align-items: center; gap: 10px; }
#biz-logo-preview { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: var(--radius-s); padding: 3px; }

.item-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.item-row {
  display: grid;
  grid-template-columns: 1fr 46px 78px 26px;
  gap: 6px;
  align-items: center;
}

.item-row input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 9px 8px;
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
  min-width: 0;
}

.item-remove {
  background: transparent;
  border: none;
  color: var(--g-bad);
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}

/* ---- Printable nota paper ---- */

.nota-paper {
  background: #ffffff;
  color: #16221D;
  border-radius: var(--radius-m);
  padding: 20px 18px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.nota-paper-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #16221D;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.nota-paper-head img { width: 44px; height: 44px; object-fit: contain; }
.nota-paper-head div { display: flex; flex-direction: column; }
.nota-paper-head strong { font-family: var(--font-head); font-size: 16px; }
.nota-paper-head span { font-size: 11px; color: #55645C; }

.nota-paper-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11.5px;
}
.nota-paper-meta div { display: flex; flex-direction: column; gap: 2px; }
.nota-paper-meta span { color: #55645C; font-size: 10.5px; }

.nota-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.nota-table th, .nota-table td { text-align: left; padding: 6px 4px; font-size: 11.5px; border-bottom: 1px solid #E4E9E6; }
.nota-table th { color: #55645C; font-weight: 600; }
.nota-table td:nth-child(2), .nota-table th:nth-child(2) { text-align: center; }
.nota-table td:nth-child(3), .nota-table td:nth-child(4),
.nota-table th:nth-child(3), .nota-table th:nth-child(4) { text-align: right; }

.nota-totals { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.nota-totals > div { display: flex; justify-content: space-between; font-size: 12px; }
.nota-totals .grand-total { border-top: 1px solid #16221D; margin-top: 4px; padding-top: 6px; font-size: 13.5px; }

.nota-paper-note { font-size: 11px; color: #55645C; font-style: italic; margin-bottom: 6px; }
.nota-paper-foot { text-align: center; font-size: 10.5px; color: #55645C; margin: 0; }

.nota-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.nota-actions button { flex: 1; }

/* ---------------- Print ---------------- */

@media print {
  body * { visibility: hidden; }
  #nota-print-area, #nota-print-area * { visibility: visible; }
  #nota-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
  .topbar, .bottom-nav, .nota-tabs, .nota-actions, #tab-edit { display: none !important; }
}

/* ---------------- Responsive (desktop preview) ---------------- */

@media (min-width: 560px) {
  .app-shell { margin-top: 18px; margin-bottom: 18px; min-height: calc(100vh - 36px); border-radius: var(--radius-l); overflow: hidden; }
  .bottom-nav { border-radius: 0 0 var(--radius-l) var(--radius-l); }
}

/* =========================================================
   PWA INSTALL POPUP — muncul dari ATAS
   Tema: hijau solder-mask + copper (sesuai GradePCB)
   ========================================================= */

.pwa-popup {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 10, .65);
  display: flex;
  align-items: flex-start;                    /* ⬅ popup di atas */
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  animation: pwaFadeIn .25s ease;
}
.pwa-popup[hidden] { display: none; }

.pwa-popup-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-l);
  padding: 22px 20px 18px;
  text-align: center;
  border: 1px solid var(--trace-dim);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55),
              0 0 0 1px rgba(53, 196, 140, 0.08) inset;
  animation: pwaSlideDown .32s ease;          /* ⬅ turun dari atas */
}

.pwa-popup-icon {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.pwa-popup-card h3 {
  margin: 6px 0 8px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--trace);
}

.pwa-popup-card p {
  margin: 0 0 18px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.pwa-popup-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

/* Tombol utama popup — hijau solder */
.pwa-btn-primary {
  background: linear-gradient(180deg, var(--trace), var(--trace-dim));
  color: #06110D;
  font-weight: 700;
  padding: 13px 16px;
  border: 0;
  border-radius: var(--radius-m);
  font-family: var(--font-body);
  font-size: .95rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(53, 196, 140, 0.28);
}
.pwa-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(53, 196, 140, 0.40);
}
.pwa-btn-primary:active { transform: scale(.98); }

/* Tombol "Nanti Saja" — outline */
.pwa-btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 11px 16px;
  border-radius: var(--radius-m);
  font-family: var(--font-body);
  font-size: .88rem;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.pwa-btn-ghost:hover { border-color: var(--trace); color: var(--trace); }

/* ---------- Animasi ---------- */
@keyframes pwaFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ⬇ popup turun dari atas */
@keyframes pwaSlideDown {
  from { transform: translateY(-24px); opacity: 0 }
  to   { transform: translateY(0);     opacity: 1 }
}

/* ⬆ popup naik dari bawah (cadangan) */
@keyframes pwaSlideUp {
  from { transform: translateY(24px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}

/* =========================================================
   PWA INSTALL BUTTON — Footer
   ========================================================= */

.pwa-install-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px auto 16px;
  max-width: 420px;
  padding: 0 4px;
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, var(--trace), var(--trace-dim));
  color: #06110D;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(53, 196, 140, 0.28);
  transition: transform .15s ease, box-shadow .2s ease;
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(53, 196, 140, 0.40);
}
.pwa-install-btn:active { transform: scale(.98); }
.pwa-install-btn svg { flex-shrink: 0; }

.pwa-install-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.55;
}
.pwa-install-hint strong { color: var(--accent-strong); }

/* Varian iOS — warna copper/gold */
.pwa-install-wrap.is-ios .pwa-install-btn {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #2A1A05;
}

/* Sudah install — outline hijau */
.pwa-install-wrap.is-installed .pwa-install-btn {
  background: transparent;
  border: 1px solid var(--trace-dim);
  color: var(--trace);
  box-shadow: none;
}
.pwa-install-wrap.is-installed .pwa-install-btn:hover {
  transform: none;
  box-shadow: 0 0 0 1px var(--trace-dim) inset;
}

/* ---------------------------------------------------------
   Tombol Donasi di Topbar
   --------------------------------------------------------- */
.topbar-donate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--accent-strong);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(227, 168, 87, 0.08);
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.topbar-donate:hover {
  background: rgba(227, 168, 87, 0.18);
  color: var(--accent);
  transform: translateY(-1px);
}
.topbar-donate:active { transform: scale(.97); }
.topbar-donate svg { flex-shrink: 0; }
/* =========================================================
   TAMBAHAN — Halaman konten statis (Kontak, Syarat, Privasi,
   Tentang, Harga, Disclaimer) + halaman detail /ic & /hp +
   breadcrumb & FAQ. Ditulis mengikuti token warna/gaya yang
   sudah ada di atas supaya tetap satu tema dengan halaman lain.
   ========================================================= */

:root {
  --text-secondary: var(--text-dim);
  --text-muted: var(--text-faint);
}

.text-muted-sm { font-size: 12.5px; color: var(--text-faint); margin: 2px 0 0; }

/* ---------------- Breadcrumb ---------------- */
.breadcrumb-nav { margin: 0 0 12px; overflow-x: auto; }
.breadcrumb-nav ol {
  list-style: none; display: flex; flex-wrap: nowrap; align-items: center;
  gap: 6px; margin: 0; padding: 0; font-size: 11.5px; white-space: nowrap;
}
.breadcrumb-nav li { display: flex; align-items: center; gap: 6px; }
.breadcrumb-nav li:not(:last-child)::after { content: '/'; color: var(--text-faint); }
.breadcrumb-nav a { color: var(--text-dim); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--trace); }
.breadcrumb-nav span[aria-current] { color: var(--text); font-weight: 600; }

/* ---------------- Hero card (dipakai di semua halaman statis) ---------------- */
.hero-card {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 18px 16px;
  margin-bottom: 16px;
}
.hero-card h1 {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; margin: 0;
}
.hero-card h1 i { color: var(--trace); font-size: 17px; }
.location-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
}
.location-tag.green { border-color: var(--trace-dim); color: var(--trace); }

/* ---------------- FAQ ---------------- */
.faq-section { margin: 20px 0; }
.faq-section h2 { font-size: 16px; margin-bottom: 10px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 10px 13px;
}
.faq-item summary {
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--trace); font-weight: 700; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 8px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.55; }

/* ---------------- Detail page (/ic/{slug}, /hp/{slug}) ---------------- */
.detail-page { display: flex; flex-direction: column; gap: 4px; }
.detail-hero-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 16px; margin-bottom: 16px;
}
.detail-hero-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detail-code { font-size: 18px; }
.detail-badge { font-size: 13px; padding: 6px 12px; }
.detail-section { margin-bottom: 20px; }
.detail-section h2 { font-size: 16px; margin-bottom: 8px; }
.detail-section p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin: 0 0 8px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th, .detail-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border);
}
.detail-table th { width: 40%; color: var(--text-faint); font-weight: 600; }
.detail-steps { padding-left: 18px; font-size: 13.5px; color: var(--text-dim); line-height: 1.7; }
.detail-steps li { margin-bottom: 6px; }
.related-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.related-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 10px; text-decoration: none; color: var(--text); font-size: 12.5px;
}
.related-card code { font-family: var(--font-mono); font-size: 12.5px; }
.related-card:hover { border-color: var(--trace-dim); }
.detail-hp-media { border-radius: var(--radius-m); overflow: hidden; margin-bottom: 16px; background: var(--surface-2); }
.detail-hp-media img { width: 100%; max-height: 220px; object-fit: contain; display: block; margin: 0 auto; }
.detail-cta {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--trace-dim);
  border-radius: var(--radius-m); padding: 14px; margin-bottom: 20px; font-size: 13.5px;
}
.detail-back { font-size: 13px; }
.detail-back a { color: var(--text-dim); text-decoration: none; }
.detail-back a:hover { color: var(--trace); }

.ic-card-link, .hp-card-link {
  display: flex; align-items: center; width: 100%; text-decoration: none; color: inherit;
  gap: 10px; justify-content: space-between;
}
.hp-card-link { gap: 12px; }
.ic-card, .hp-card { padding: 0; overflow: hidden; }
.ic-card-link { padding: 12px 13px; }
.hp-card-link { padding: 10px 12px; }

/* ---------------- WhatsApp buttons (reused across static pages) ---------------- */
.contact-wa-btn, .terms-wa-btn, .about-wa-btn, .privacy-wa-btn, .cta-wa-btn, .terms-link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--trace); color: #06120D; font-weight: 700;
  font-size: 13.5px; padding: 11px 18px; border-radius: 999px;
  text-decoration: none; border: none; white-space: nowrap;
}
.contact-wa-btn:hover, .terms-wa-btn:hover, .about-wa-btn:hover, .privacy-wa-btn:hover, .cta-wa-btn:hover, .terms-link-btn:hover {
  background: var(--accent-strong); color: #1a1204;
}
.btn-primary { background: var(--trace); color: #06120D; font-weight: 700; padding: 12px; border-radius: var(--radius-m); }
.btn-block { width: 100%; }

/* ---------------- Kontak page ---------------- */
.contact-page { display: flex; flex-direction: column; gap: 14px; }
.contact-card-wa {
  background: var(--surface); border: 1px solid var(--trace-dim);
  border-radius: var(--radius-l); padding: 22px 18px; text-align: center;
}
.contact-icon-wa { font-size: 34px; color: var(--trace); margin-bottom: 8px; }
.contact-card-wa h2 { font-size: 16px; }
.contact-card-wa p { font-size: 12.5px; color: var(--text-dim); margin: 4px 0 14px; }
.wa-status { margin-top: 12px; font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; justify-content: center; gap: 6px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trace); display: inline-block; box-shadow: 0 0 0 3px rgba(53,196,140,0.2); }
.contact-info-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.contact-info-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 14px; text-align: center;
}
.contact-info-icon { font-size: 20px; margin-bottom: 6px; color: var(--trace); }
.contact-info-icon.location { color: var(--accent); }
.contact-info-icon.response { color: var(--g-choice); }
.contact-info-item h3 { font-size: 13.5px; margin-bottom: 4px; }
.contact-info-item p { font-size: 12.5px; color: var(--text-dim); margin: 0; }

/* ---------------- Terms / Privacy / Disclaimer layout ---------------- */
.terms-page, .privacy-page { display: flex; flex-direction: column; gap: 16px; }
.terms-content, .privacy-content { display: flex; flex-direction: column; gap: 18px; }
.terms-section, .privacy-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 15px 16px;
}
.terms-section h2, .privacy-section h2 {
  font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.terms-section h2 i, .privacy-section h2 i { color: var(--trace); font-size: 14px; }
.terms-section h3, .privacy-section h3 {
  font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin: 12px 0 6px; color: var(--accent-strong);
}
.terms-section p, .privacy-section p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin: 0 0 8px; }
.terms-section ul, .terms-section ol, .privacy-section ul {
  font-size: 13px; color: var(--text-dim); line-height: 1.65; padding-left: 18px; margin: 0 0 6px;
}
.terms-section li, .privacy-section li { margin-bottom: 5px; }
.terms-contact { margin-top: 8px; }
.terms-sidebar, .privacy-sidebar, .about-page-sidebar { display: flex; flex-direction: column; gap: 10px; }
.terms-card, .privacy-card, .about-card-side {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 13px 14px;
}
.terms-card h3, .privacy-card h3, .about-card-side h3 {
  font-size: 13px; display: flex; align-items: center; gap: 7px; margin-bottom: 6px;
}
.terms-card h3 i, .privacy-card h3 i, .about-card-side h3 i { color: var(--trace); }
.terms-card p, .privacy-card p, .about-card-side p { font-size: 12px; color: var(--text-dim); margin: 0 0 8px; }
.terms-link-btn { font-size: 12px; padding: 8px 14px; }
.terms-links, .privacy-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.terms-links li a, .privacy-links li a {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--text-dim); text-decoration: none; padding: 4px 0;
}
.terms-links li a:hover, .privacy-links li a:hover { color: var(--trace); }
.terms-links li a i, .privacy-links li a i { font-size: 10px; color: var(--text-faint); }

/* ---------------- Tentang Kami ---------------- */
.about-page { display: flex; flex-direction: column; gap: 16px; }
.about-page-content { display: flex; flex-direction: column; gap: 16px; }
.about-page-text h2 { font-size: 16px; margin-bottom: 6px; }
.about-page-text p { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; margin: 0 0 10px; }
.visi-misi { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
.visi, .misi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 13px 14px;
}
.visi h3, .misi h3 { font-size: 13.5px; margin-bottom: 6px; color: var(--accent-strong); }
.visi p, .misi p, .misi ul { font-size: 12.5px; color: var(--text-dim); margin: 0; padding-left: 16px; }

.services-section, .advantages-section { margin: 20px 0; }
.services-section h2, .advantages-section h2, .testimonial-grid-title {
  font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.services-section h2 i, .advantages-section h2 i { color: var(--trace); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.service-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 14px 10px; text-align: center;
}
.service-icon { font-size: 22px; color: var(--trace); margin-bottom: 8px; }
.service-item h3 { font-size: 12.5px; margin-bottom: 4px; }
.service-item p { font-size: 11px; color: var(--text-faint); margin: 0; }

.advantages-grid { display: flex; flex-direction: column; gap: 10px; }
.advantage-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 12px 14px;
}
.advantage-number {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--trace); color: #06120D; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.advantage-item h3 { font-size: 13px; margin: 0 0 3px; }
.advantage-item p { font-size: 12px; color: var(--text-dim); margin: 0; }

.testimonial-grid { display: flex; flex-direction: column; gap: 10px; }
.testimonial-item, .testimonial-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 14px;
}
.testi-stars { color: var(--accent); font-size: 12px; margin-bottom: 6px; }
.testimonial-item p, .testimonial-card p { font-size: 12.5px; color: var(--text-dim); font-style: italic; margin: 0 0 8px; }
.testi-author { font-size: 12px; font-weight: 600; color: var(--text); }

/* ---------------- CTA banner (dipakai di banyak halaman) ---------------- */
.cta-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--trace-dim); border-radius: var(--radius-l);
  padding: 16px; margin: 20px 0;
}
.cta-content { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 180px; }
.cta-icon { font-size: 26px; color: var(--trace); flex-shrink: 0; }
.cta-banner h3 { font-size: 14.5px; margin: 0 0 3px; }
.cta-banner p { font-size: 12px; color: var(--text-dim); margin: 0; }
.cta-mini {
  text-align: center; font-size: 13px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 12px; margin: 16px 0;
}
.cta-mini-link { color: var(--trace); font-weight: 600; text-decoration: none; }
.cta-mini-link:hover { text-decoration: underline; }

/* ---------------- Harga HP (harga.php) ---------------- */
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 16px;
}
.price-intro { font-size: 13px; color: var(--text-dim); margin: 0 0 10px; }
.price-notice {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent-strong);
  background: rgba(227,168,87,0.08); border: 1px solid var(--accent); border-radius: var(--radius-s);
  padding: 8px 10px; margin-bottom: 14px;
}
.price-table-wrap { overflow-x: auto; margin-bottom: 12px; }
.price-table, .price-grade-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.price-table th, .price-table td, .price-grade-table th, .price-grade-table td {
  padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.price-table th, .price-grade-table th { color: var(--text-faint); font-weight: 600; font-size: 11.5px; }
.price-sub { display: block; font-size: 11px; color: var(--text-faint); font-weight: 400; }
.price-value { color: var(--trace); font-weight: 700; }
.price-note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.price-note-list li { font-size: 12px; color: var(--text-dim); display: flex; align-items: flex-start; gap: 7px; }
.price-note-list i { color: var(--trace); margin-top: 2px; }

/* ---------------- Harga Grade (harga-grade.php) ---------------- */
.price-grade-page { display: flex; flex-direction: column; gap: 18px; }
.price-intro-box { display: grid; grid-template-columns: 1fr; gap: 10px; }
.price-info-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 12px 14px;
}
.price-info-card i { font-size: 18px; }
.price-info-card.beli i { color: var(--trace); }
.price-info-card.jual i { color: var(--accent); }
.price-info-card.margin i { color: var(--g-choice); }
.price-info-card .label { display: block; font-size: 11px; color: var(--text-faint); }
.price-info-card .value { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.price-grade-section h2 {
  font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.price-grade-section h2 i { color: var(--trace); }
.price-grade-table-wrapper { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); }
.price-grade-table { min-width: 480px; }
.price-beli { color: var(--trace); font-weight: 600; }
.price-jual { color: var(--accent); font-weight: 600; }
.price-margin { color: var(--text-dim); }
.satuan-badge {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
}
.price-note {
  display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--text-faint);
  padding: 10px 12px;
}
.price-note i { margin-top: 2px; color: var(--accent); }
.price-notes-final {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 15px 16px;
}
.price-notes-final h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.price-notes-final h3 i { color: var(--trace); }
.price-notes-final ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.price-notes-final li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.price-notes-final li i { color: var(--trace); margin-top: 2px; }

/* ---------------- Footer links (halaman statis) ---------------- */
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  margin-bottom: 8px; padding: 0 6px;
}
.footer-links a { font-size: 11.5px; color: var(--text-faint); text-decoration: none; }
.footer-links a:hover { color: var(--trace); }
.footer-copy { text-align: center; font-size: 11px; color: var(--text-faint); margin: 0 0 6px; }

@media (min-width: 420px) {
  .contact-info-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .visi-misi { grid-template-columns: 1fr 1fr; }
  .price-intro-box { grid-template-columns: 1fr 1fr 1fr; }
}

.app-footer {
  margin-top: 24px;
  padding: 16px 4px 90px;
  border-top: 1px solid var(--border);
}
