/* GENIUS — hijau army + aksen emas */
:root {
  --army-900: #1f2614;
  --army-800: #2b3520;
  --army-700: #3a4729;
  --army-600: #4b5320;
  --army-500: #5f6b3a;
  --army-100: #e6e9da;
  --army-50:  #f4f5ee;
  --gold-600: #b8901f;
  --gold-500: #d4a72c;
  --gold-400: #e6c157;
  --gold-100: #faf1d6;
  --ink: #1d2116;
  --muted: #646b55;
  --line: #d9dccb;
  --white: #ffffff;
  --red: #b3412e;
  --red-bg: #f8e4df;
  --green: #3d7a3a;
  --green-bg: #e2f0dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31,38,20,.06), 0 6px 20px rgba(31,38,20,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink); background: var(--army-50); line-height: 1.55; font-size: 15px;
}
h1, h2, h3, h4 { font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
a { color: var(--army-600); }
img { max-width: 100%; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.gold { color: var(--gold-500); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; text-decoration: none;
  transition: transform .05s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--army-600); color: var(--white); }
.btn-primary:hover { background: var(--army-700); }
.btn-gold { background: var(--gold-500); color: var(--army-900); }
.btn-gold:hover { background: var(--gold-400); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--army-500); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* Kartu & panel */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 17px; }
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat .value { font: 700 26px/1.2 "Bricolage Grotesque", sans-serif; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat-dark { background: linear-gradient(135deg, var(--army-700), var(--army-900)); color: var(--white); border: none; }
.stat-dark .label, .stat-dark .sub { color: var(--army-100); }
.stat-dark .value { color: var(--gold-400); }

/* Form */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  font: inherit; background: var(--white); color: var(--ink);
}
.input:focus { outline: 2px solid var(--gold-400); outline-offset: 0; border-color: var(--gold-500); }
.field { margin-bottom: 14px; }
.error { color: var(--red); font-size: 13px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }

/* Notifikasi */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: #c4dfb9; }
.alert-error { background: var(--red-bg); color: var(--red); border-color: #efc6bc; }
.alert-warning { background: var(--gold-100); color: #7a5c0b; border-color: #efdc9f; }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--army-100); color: var(--army-700); }
.badge-pending { background: var(--gold-100); color: #7a5c0b; }
.badge-active, .badge-approved, .badge-paid { background: var(--green-bg); color: var(--green); }
.badge-rejected, .badge-suspended { background: var(--red-bg); color: var(--red); }
.badge-gold { background: var(--gold-500); color: var(--army-900); }

/* Tabel */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--army-100); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.plus { color: var(--green); font-weight: 600; }
.minus { color: var(--red); font-weight: 600; }

/* Pagination bawaan Laravel (tailwind view) dirender sederhana */
nav[role="navigation"] { margin-top: 16px; }
nav[role="navigation"] svg { width: 16px; height: 16px; }

/* ===== Publik ===== */
.topbar { background: var(--army-900); color: var(--white); position: sticky; top: 0; z-index: 20; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font: 800 20px "Bricolage Grotesque", sans-serif; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-500); color: var(--army-900); display: grid; place-items: center; font-weight: 800; }
.brand small { display: block; font: 500 11px "Plus Jakarta Sans", sans-serif; color: var(--army-100); letter-spacing: .04em; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--army-100); text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--gold-400); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } }

.hero { background: radial-gradient(ellipse at 80% 0%, rgba(212,167,44,.22), transparent 55%), linear-gradient(160deg, var(--army-700), var(--army-900)); color: var(--white); padding: 72px 0 88px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); max-width: 760px; }
.hero h1 span { color: var(--gold-400); }
.hero p { color: var(--army-100); max-width: 620px; font-size: 17px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 14px; }
.section { padding: 64px 0; }
.section-title { font-size: clamp(26px, 3.5vw, 36px); }

.pkg { position: relative; display: flex; flex-direction: column; }
.pkg-head { display: flex; justify-content: space-between; align-items: baseline; }
.pkg h3 { font-size: 22px; margin: 0; }
.pkg .price { font: 800 28px "Bricolage Grotesque", sans-serif; color: var(--army-700); margin: 10px 0 4px; }
.pkg ul { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; }
.pkg li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--line); }
.pkg li b { font-variant-numeric: tabular-nums; }
.pkg.featured { border: 2px solid var(--gold-500); }
.pkg.featured::before { content: "Terpopuler"; position: absolute; top: -12px; right: 16px; background: var(--gold-500); color: var(--army-900); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

.note-box { background: var(--white); border-left: 4px solid var(--gold-500); border-radius: 10px; padding: 16px 20px; }
.legal { background: var(--army-100); border-radius: var(--radius); padding: 20px; font-size: 14px; color: var(--army-800); }

/* Kalkulator */
.calc { background: var(--army-800); color: var(--white); border-radius: 20px; padding: 28px; }
.calc label { color: var(--army-100); }
.calc .input { background: var(--army-900); border-color: var(--army-600); color: var(--white); }
.calc-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; margin-bottom: 8px; }
.calc-row span { font-size: 14px; color: var(--army-100); }
.calc-result { background: var(--army-900); border-radius: 14px; padding: 20px; border: 1px solid var(--army-600); }
.calc-result .big { font: 800 34px "Bricolage Grotesque", sans-serif; color: var(--gold-400); font-variant-numeric: tabular-nums; }
.calc-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--army-100); border-bottom: 1px dashed var(--army-600); }
.calc-line b { color: var(--white); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--gold-500); }
.disclaimer { font-size: 12px; color: var(--army-100); margin-top: 12px; }

.footer { background: var(--army-900); color: var(--army-100); padding: 32px 0; font-size: 13px; }

/* ===== Auth ===== */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--army-700), var(--army-900)); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { color: var(--ink); justify-content: center; margin-bottom: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: var(--white); border: 1px solid var(--line); color: var(--ink); }

/* ===== App (member/admin) ===== */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--army-900); color: var(--army-100); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { margin: 0 6px 24px; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--army-500); margin: 18px 10px 6px; font-weight: 700; }
.side-link { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 9px; color: var(--army-100); text-decoration: none; font-size: 14px; }
.side-link:hover { background: var(--army-800); color: var(--white); }
.side-link.active { background: var(--army-700); color: var(--gold-400); font-weight: 600; }
.side-link .count { background: var(--gold-500); color: var(--army-900); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.main { padding: 24px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; margin: 0; }
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--army-900); padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .main { padding: 16px; }
}

.ref-box { display: flex; gap: 8px; }
.ref-box .input { font-family: ui-monospace, monospace; font-size: 13px; }

/* Pohon binary */
.tree-scroll { overflow-x: auto; padding: 8px 0 16px; }
.tree { display: flex; justify-content: center; min-width: 760px; }
.tree ul { padding-top: 20px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 20px 4px 0; flex: 1; }
.tree li::before, .tree li::after { content: ""; position: absolute; top: 0; right: 50%; border-top: 2px solid var(--army-500); width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--army-500); }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--army-500); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree ul ul::before { content: ""; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--army-500); height: 20px; }
.node { display: inline-block; min-width: 120px; max-width: 160px; padding: 10px 8px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-size: 12px; }
.node:hover { border-color: var(--gold-500); }
.node .nm { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node .cd { font-family: ui-monospace, monospace; color: var(--muted); font-size: 11px; }
.node .lr { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.node.root { background: var(--army-700); color: var(--white); border-color: var(--army-700); }
.node.root .cd, .node.root .lr { color: var(--army-100); }
.node.empty { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted); padding: 16px 8px; }
.pkg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.pkg-reseller { background: #8a9470; } .pkg-silver { background: #b8bcc4; } .pkg-gold { background: var(--gold-500); } .pkg-platinum { background: #6aa6b8; }

/* Chart batang sederhana */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--army-500); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { background: var(--gold-500); }
.bars-x { display: flex; gap: 6px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; }

.proof-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
details summary { cursor: pointer; }
.inline-form { display: inline; }
.node.slot { color: var(--army-600); border-color: var(--gold-500); background: var(--gold-100); font-weight: 600; text-decoration: none; }
.node.slot:hover { background: var(--gold-400); color: var(--army-900); }

/* ===== Board POSNAS (1-2-4-8-16) ===== */
.pn-board { margin-top: 16px; padding: 16px 8px; border-radius: 16px; background: radial-gradient(ellipse at 50% 0%, rgba(212,167,44,.14), transparent 60%), var(--army-50); border: 1px solid var(--line); }
.pn-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; margin-bottom: 10px; }
.pn-label { display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; }
.pn-label span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pn-dots { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; }
.pn-cell { display: flex; justify-content: center; margin: 0; }
.pn-dot { width: clamp(22px, 5vw, 46px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(9px, 1.6vw, 14px); border: 2px solid var(--army-500); background: var(--army-700); color: var(--army-100); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.pn-lock { opacity: .8; filter: grayscale(.3); }
.pn-me { background: var(--gold-500); border-color: var(--gold-600); color: var(--army-900); flex-direction: column; font-weight: 800; }
.pn-door { cursor: pointer; background: var(--gold-400); border: 3px solid var(--army-900); color: var(--army-900); font-weight: 800; flex-direction: column; animation: pn-pulse 1.6s ease-in-out infinite; font-family: inherit; padding: 0; }
.pn-door:hover { background: var(--gold-500); transform: scale(1.06); }
.pn-door-off { animation: none; cursor: not-allowed; background: var(--line); color: var(--muted); border-color: var(--muted); }
.pn-ico { line-height: 1; }
.pn-txt { font-size: .55em; letter-spacing: .02em; line-height: 1.1; }
.pn-arrow { text-align: center; margin-top: 4px; }
@keyframes pn-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,167,44,.7); } 50% { box-shadow: 0 0 0 8px rgba(212,167,44,0); } }
@media (max-width: 720px) {
  .pn-row { grid-template-columns: 1fr; }
  .pn-label { flex-direction: row; gap: 8px; }
  .pn-dot { width: clamp(16px, 5.2vw, 30px); border-width: 1px; }
  .pn-txt { display: none; }
}

/* Board POSNAS live */
.pn-live { font-size: 11px; color: var(--green); margin-left: 6px; vertical-align: middle; animation: pn-blink 2s infinite; }
.pn-live.off { color: var(--red); animation: none; }
@keyframes pn-blink { 50% { opacity: .35; } }
.pn-me-bar { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--gold-100); border: 1px solid var(--gold-400); font-size: 14px; }
.pn-fill { background: var(--army-500); border-color: var(--army-700); color: var(--white); flex-direction: column; }
.pn-q { font-size: 11px; }
.pn-prog { height: 4px; background: var(--line); border-radius: 99px; margin-top: 3px; max-width: 80px; overflow: hidden; }
.pn-prog i { display: block; height: 100%; background: var(--gold-500); }
.pn-flash { animation: pn-flash 1.2s ease-out; }
@keyframes pn-flash { 0% { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(212,167,44,.6); } 100% { transform: none; } }

/* Board POSNAS: tab tingkat, puncak qualified, animasi naik board */
.pn-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 14px; }
.pn-tab { border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 8px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.pn-tab span { color: var(--muted); }
.pn-tab.on { border-color: var(--army-600); background: var(--army-700); color: var(--white); }
.pn-tab.on span { color: var(--army-100); }
.pn-mini { display: block; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pn-mini u { display: block; height: 100%; background: var(--gold-500); }
.pn-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 14px; }
.pn-stage { position: relative; }
.pn-board .pn-dots { margin-bottom: 10px; }
.pn-top { position: relative; width: clamp(40px, 7vw, 64px); border-width: 3px; }
.pn-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.pn-ring circle { fill: none; stroke: var(--gold-500); stroke-width: 2.5; stroke-linecap: round; }
.pn-tag { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; font-weight: 800; white-space: nowrap; color: var(--army-700); }
.pn-qual { background: var(--gold-400) !important; color: var(--army-900) !important; border-color: var(--gold-600) !important; animation: pn-pulse 1.4s ease-in-out infinite; }
.pn-qual .pn-tag { color: var(--gold-600); }
.pn-split .pn-dots:not(:first-child) { animation: pn-split .9s ease-out; }
@keyframes pn-split { 0% { transform: translateY(14px); opacity: .3; } 100% { transform: none; opacity: 1; } }
.pn-fly { position: absolute; left: 50%; top: 0; display: flex; align-items: center; gap: 8px; transform: translate(-50%, 0); background: var(--army-900); color: var(--gold-400); padding: 6px 12px 6px 6px; border-radius: 99px; font-size: 13px; z-index: 5; }
.pn-fly.go { animation: pn-fly 2.6s ease-in forwards; }
@keyframes pn-fly { 0% { transform: translate(-50%, 30px) scale(.8); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -70px) scale(.9); opacity: 0; } }
.pn-pager { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pn-feed { margin-top: 12px; }
.pn-feed-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 6px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 720px) {
  .pn-tabs { grid-template-columns: repeat(3, 1fr); }
  .pn-top { width: 40px; }
}

/* Marketplace */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mp-card { display: flex; flex-direction: column; padding: 14px; }
.mp-img { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--army-600), var(--army-800)); display: grid; place-items: center; margin-bottom: 10px; }
.mp-img img { width: 100%; height: 100%; object-fit: cover; }
.mp-img span { font: 800 44px "Bricolage Grotesque", sans-serif; color: var(--gold-400); }
.mp-cb { position: absolute; top: 8px; left: 8px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--gold-500); color: var(--army-900); padding: 2px 8px; border-radius: 99px; }
.mp-name { font-size: 16px; margin: 0 0 4px; }
.mp-desc { margin: 0 0 8px; }
.mp-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.mp-price { font: 800 18px "Bricolage Grotesque", sans-serif; color: var(--army-700); }
@media (max-width: 860px) { .page-head + .grid.g-2 { grid-template-columns: 1fr !important; } }
