/* =========================================================================
   BotLelang Properti — gaya visual mockup
   ========================================================================= */
:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f0f4f2;
  --ink: #12211c;
  --ink-2: #3f4f4a;
  --muted: #687873;
  --line: #e1e8e5;
  --brand: #0f5c4a;
  --brand-700: #0a4235;
  --brand-50: #e7f3ee;
  --navy: #0b3a5c;
  --navy-50: #e6eef5;
  --bid: #d9480f;
  --bid-50: #fff0e6;
  --warn: #9a5b00;
  --warn-50: #fff5db;
  --danger: #c92a2a;
  --danger-50: #ffecec;
  --ok: #2b8a3e;
  --ok-50: #e9f7ec;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 32, .06), 0 6px 20px rgba(16, 40, 32, .06);
  --shadow-lg: 0 20px 50px rgba(10, 30, 25, .22);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85em; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ------------------------------ Banner demo ------------------------------ */
.demo-banner { background: var(--navy); color: #fff; font-size: .82rem; }
.demo-banner .container { display: flex; gap: 8px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.demo-banner b { color: #ffd8a8; }
.demo-banner a { color: #fff; text-decoration: underline; white-space: nowrap; }

/* -------------------------------- Header -------------------------------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { flex: none; white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--navy)); display: grid; place-items: center; color: #fff; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: 0; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--brand-50); color: var(--brand); }
.role-picker { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.role-picker label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.role-picker select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); font-weight: 600; max-width: 210px; }
.header .menu-btn { display: none; margin-left: 4px; }

@media (max-width: 1240px) { .brand small, .role-picker label { display: none; } }
@media (max-width: 1180px) {
  .header .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}
@media (max-width: 560px) {
  .header .container { gap: 8px; }
  .brand { font-size: .92rem; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .role-picker label { display: none; }
  .role-picker select { max-width: 132px; font-size: .85rem; padding: 7px 8px; }
}

/* -------------------------------- Tombol -------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(15, 92, 74, .35); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-bid { background: var(--bid); color: #fff; }
.btn-bid:hover { background: #b93d0c; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: #c5d1cc; background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--brand); padding: 8px 10px; }
.btn-ghost:hover { background: var(--brand-50); }
.btn-danger { background: var(--surface); border-color: #f1b5b5; color: var(--danger); }
.btn-danger:hover { background: var(--danger-50); }
.btn-sm { padding: 7px 11px; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: 13px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

/* ------------------------------- Lencana ------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.st-aktif { background: var(--ok-50); color: var(--ok); }
.st-segera { background: var(--warn-50); color: var(--warn); }
.st-selesai { background: #eceff3; color: #495057; }
.st-draft { background: var(--navy-50); color: var(--navy); }
.b-sim { background: #fff3bf; color: #7a5a00; }
.b-fiktif { background: #f3e8ff; color: #6b2fa3; }
.b-video { background: rgba(15, 23, 42, .75); color: #fff; }
.bs-tertinggi { background: var(--bid-50); color: var(--bid); }
.bs-tergantikan { background: #f1f3f5; color: #5c6670; }
.bs-pemenang { background: var(--ok-50); color: var(--ok); }

/* -------------------------------- Kartu -------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.section { padding: 36px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }
.page-head { padding: 28px 0 8px; }
.page-head p { color: var(--muted); max-width: 760px; }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; align-items: flex-start; }
.notice svg { margin-top: 2px; }
.notice p { margin: 0; }
.notice.info { background: var(--navy-50); color: #123b5a; }
.notice.warn { background: var(--warn-50); color: #6b4300; }
.notice.danger { background: var(--danger-50); color: #8a1c1c; }
.notice.ok { background: var(--ok-50); color: #1f6a30; }
.notice.sim { background: #fff9db; color: #6b5200; border: 1px dashed #e6c450; }

/* ---------------------------------- Hero ---------------------------------- */
.hero { padding: 44px 0 28px; background: radial-gradient(1200px 400px at 90% -10%, #d7ece4 0, transparent 60%), radial-gradient(800px 300px at -10% 10%, #dfe9f3 0, transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero h1 span { color: var(--brand); }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 600px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 18px; }
.hero-visual { position: relative; }
.hero-visual .card { overflow: hidden; }
.hero-float { position: absolute; left: -22px; bottom: 96px; width: 260px; padding: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; max-width: 520px; }
.kpi-mini b { display: block; font-size: 1.35rem; }
.kpi-mini span { font-size: .8rem; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { padding: 18px; }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-float { position: static; width: auto; margin-top: 12px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .hero-cta .btn { flex: 1 1 100%; } }

/* ------------------------------ Kartu listing ------------------------------ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.pcard { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.pcard:hover { box-shadow: 0 10px 30px rgba(16, 40, 32, .12); transform: translateY(-2px); }
.pcard-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); cursor: pointer; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-media .tl { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard-media .br { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.fav-btn { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; color: #868e96; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.fav-btn.on { color: #e03131; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard-title { font-weight: 800; font-size: 1.04rem; margin: 0; }
.pcard-loc { color: var(--muted); font-size: .86rem; display: flex; gap: 5px; align-items: center; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.price-row .lbl { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.price-row .val { font-weight: 800; font-variant-numeric: tabular-nums; }
.price-row .val.bid { color: var(--bid); }
.meta-row { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-2); font-size: .84rem; }
.meta-row span { display: inline-flex; gap: 5px; align-items: center; }
.pcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.countdown.soon { color: var(--warn); font-weight: 700; }

/* ------------------------------- Filter bar ------------------------------- */
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; padding: 14px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field > .lbl { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .76rem; color: var(--muted); }
.field .err { font-size: .78rem; color: var(--danger); font-weight: 600; }
.input, .select, .textarea { width: 100%; border: 1px solid #d3ddd9; border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: 3px solid rgba(15, 92, 74, .15); }
.input.invalid { border-color: var(--danger); }
.textarea { min-height: 110px; resize: vertical; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 38px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid #d3ddd9; border-right: 0; border-radius: 10px 0 0 10px; font-weight: 700; color: var(--ink-2); }
.input-prefix .input { border-radius: 0 10px 10px 0; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } .filters .f-search { grid-column: 1 / -1; } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ------------------------------ Detail listing ------------------------------ */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.thumb { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--brand); }
.video-thumb { position: relative; display: block; width: 100%; border: 0; padding: 0; cursor: pointer; border-radius: inherit; overflow: hidden; background: #0f172a; }
.video-thumb img { opacity: .62; width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-thumb .play span { width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: grid; place-items: center; color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.thumb .video-thumb .play span { width: 30px; height: 30px; }
.video-thumb .vlabel { position: absolute; left: 8px; bottom: 8px; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spec { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.spec .lbl { font-size: .74rem; color: var(--muted); font-weight: 600; }
.spec .val { font-weight: 700; }
.bid-panel { position: sticky; top: 84px; }
.bid-top { background: linear-gradient(135deg, var(--bid-50), #fff); border: 1px solid #ffd0b3; border-radius: 12px; padding: 14px; }
.bid-top .amount { font-size: 1.7rem; font-weight: 900; color: var(--bid); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.winner { background: var(--ok-50); border: 1px solid #b2e2bd; border-radius: 12px; padding: 14px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } .bid-panel { position: static; } .thumbs { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------- Tabel --------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.me td { background: #f2fbf6; }
@media (max-width: 640px) {
  .tbl.stackable thead { display: none; }
  .tbl.stackable tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.stackable td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 12px; text-align: right; }
  .tbl.stackable td::before { content: attr(data-l); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: left; }
}

/* -------------------------------- Formulir -------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.c12 { grid-column: span 12; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c8 { grid-column: span 8; }
@media (max-width: 720px) { .c6, .c4, .c3, .c8 { grid-column: span 12; } .c3.half, .c4.half, .c6.half { grid-column: span 6; } }
.form-section { padding: 20px; }
.form-section h3 { display: flex; align-items: center; gap: 8px; }
.form-section + .form-section { margin-top: 16px; }
.uploader { border: 2px dashed #c6d3ce; border-radius: 12px; padding: 18px; text-align: center; background: #fbfdfc; }
.uploader.drag { border-color: var(--brand); background: var(--brand-50); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item button { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; display: grid; place-items: center; }
.photo-item .cover { position: absolute; left: 5px; bottom: 5px; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; counter-reset: st; }
.stepper li { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); font-size: .84rem; font-weight: 600; color: var(--muted); }
.stepper li::before { counter-increment: st; content: counter(st); width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; border: 1px solid var(--line); }
.stepper li.on { background: var(--brand-50); color: var(--brand); }
.stepper li.done::before { content: "✓"; background: var(--brand); color: #fff; border-color: var(--brand); }
.stepper { padding: 0; margin: 0 0 12px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; background: rgba(245, 247, 246, .96); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 16px; backdrop-filter: blur(6px); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }

/* -------------------------------- Dashboard -------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { padding: 16px; }
.kpi .lbl { font-size: .8rem; color: var(--muted); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.kpi .val { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .78rem; color: var(--muted); }
.perf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.perf { display: flex; flex-direction: column; overflow: hidden; }
.perf-head { display: flex; gap: 12px; padding: 14px; align-items: center; }
.perf-head img, .perf-head .noimg { width: 78px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; }
.perf-head .noimg { background: repeating-linear-gradient(45deg, #eef2f0, #eef2f0 8px, #e3e9e6 8px, #e3e9e6 16px); display: grid; place-items: center; color: var(--muted); }
.perf-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.perf-stats > div { padding: 10px 12px; border-right: 1px solid var(--line); }
.perf-stats > div:nth-child(3n) { border-right: 0; }
.perf-stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.perf-stats .lbl { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.perf-stats .val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; }
.perf-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.perf-issues { padding: 10px 14px 0; display: flex; flex-direction: column; gap: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .perf-grid { grid-template-columns: 1fr; } }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; flex: none; }

/* --------------------------------- Grafik --------------------------------- */
.chart-box { position: relative; }
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid line { stroke: #e7ecea; stroke-width: 1; }
.chart-axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.chart-area { fill: url(#areaGrad); }
.chart-dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.chart-start { stroke: #9aa8a3; stroke-dasharray: 4 4; stroke-width: 1.5; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-tip { position: absolute; pointer-events: none; background: #102a22; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .78rem; transform: translate(-50%, -110%); white-space: nowrap; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s; }
.chart-tip.show { opacity: 1; }

/* -------------------------------- Simulasi chat -------------------------------- */
.wa-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .wa-layout { grid-template-columns: minmax(0, 1fr) 300px; } .wa-people { grid-column: 1 / -1; } }
@media (max-width: 800px) { .wa-layout { grid-template-columns: 1fr; } }
.wa-people { padding: 14px; }
.people-list { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1100px) { .people-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; } .person { min-width: 170px; } .person b, .person .meta { white-space: nowrap; } }
.person { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; width: 100%; }
.person:hover { background: var(--surface-2); }
.person.active { background: var(--brand-50); border-color: #bfe0d3; }
.person .meta { font-size: .74rem; color: var(--muted); }
.person .unread { margin-left: auto; background: var(--bid); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; }

.chat { display: flex; flex-direction: column; height: min(78vh, 760px); min-height: 520px; overflow: hidden; border-radius: 18px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--brand-700), var(--navy)); color: #fff; }
.chat-head .avatar { background: #fff; color: var(--brand); width: 40px; height: 40px; }
.chat-head .t { font-weight: 800; line-height: 1.2; }
.chat-head .s { font-size: .76rem; opacity: .85; }
.chat-head .badge { margin-left: auto; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 12px; background-color: #eef3f0; background-image: radial-gradient(#dde6e2 1px, transparent 1px); background-size: 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.chat-day { align-self: center; background: #fff; color: var(--muted); border-radius: 8px; padding: 3px 10px; font-size: .74rem; margin: 6px 0; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.chat-sys { align-self: center; background: #fff9db; color: #6b5200; border-radius: 8px; padding: 6px 10px; font-size: .76rem; max-width: 90%; text-align: center; }
.msg { max-width: min(84%, 420px); padding: 8px 10px 6px; border-radius: 12px; position: relative; font-size: .9rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); word-wrap: break-word; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: #d6efe3; border-top-right-radius: 4px; }
.msg .time { display: block; text-align: right; font-size: .68rem; color: #7b8b86; margin-top: 2px; }
.msg .txt { white-space: pre-wrap; }
.msg.proactive { border-left: 3px solid var(--bid); }
.msg-img { border-radius: 8px; overflow: hidden; margin: -2px -4px 6px; }
.msg-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.msg-card .ttl { font-weight: 800; margin-bottom: 4px; }
.msg-card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0; font-size: .84rem; }
.msg-card dt { color: var(--muted); }
.msg-card dd { margin: 0; font-weight: 700; text-align: right; }
.msg-card .foot { font-size: .78rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.msg-btns { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.msg-btns button { border: 0; border-top: 1px solid #e3ebe7; background: none; padding: 8px 4px 4px; font-weight: 700; color: var(--brand); cursor: pointer; font-size: .86rem; }
.msg-btns button:hover { background: #f4faf7; }
.msg-btns button.ui { color: var(--navy); }
.msg-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.msg-list button { width: 100%; text-align: left; border: 1px solid #e3ebe7; border-radius: 8px; background: #fafcfb; padding: 7px 9px; cursor: pointer; display: flex; gap: 8px; }
.msg-list button:hover { border-color: var(--brand); }
.msg-list .no { font-weight: 800; color: var(--brand); }
.msg-list .st { font-size: .76rem; color: var(--muted); display: block; }
.typing { align-self: flex-start; background: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa8a3; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; background: #f7faf9; border-top: 1px solid var(--line); scrollbar-width: thin; }
.chat-quick button { flex: none; border: 1px solid #cfe0d8; background: #fff; color: var(--brand); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.chat-quick button:hover { background: var(--brand-50); }
.chat-compose { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--line); align-items: center; position: relative; }
.chat-compose .input { border-radius: 999px; }
.attach-menu { position: absolute; bottom: 60px; left: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; min-width: 220px; z-index: 3; }
.attach-menu button { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 10px; border-radius: 8px; cursor: pointer; text-align: left; font-weight: 600; }
.attach-menu button:hover { background: var(--surface-2); }
.gw-log { max-height: 420px; overflow-y: auto; font-size: .78rem; display: flex; flex-direction: column; gap: 6px; }
.gw-log div { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.gw-log .d { font-weight: 800; text-transform: uppercase; font-size: .66rem; letter-spacing: .05em; }
.gw-log .in .d { color: var(--navy); } .gw-log .out .d { color: var(--brand); } .gw-log .blocked .d { color: var(--danger); } .gw-log .system .d { color: var(--warn); }

/* ------------------------- Diagram arsitektur ------------------------- */
.arch { display: grid; grid-template-columns: repeat(5, auto); gap: 8px; align-items: center; justify-content: start; overflow-x: auto; }
.arch .node { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .85rem; text-align: center; }
.arch .node small { display: block; font-weight: 500; color: var(--muted); }
.arch .node.mock { border: 2px dashed #e6c450; background: #fffbea; }
.arch .arr { color: var(--muted); font-weight: 800; }
@media (max-width: 720px) { .arch { grid-template-columns: 1fr; } .arch .arr { transform: rotate(90deg); justify-self: center; } }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ced4da; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid rgba(15, 92, 74, .35); }

/* --------------------------------- Modal --------------------------------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
.modal-root.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 25, 20, .55); animation: fade .15s; }
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100% - 24px)); max-height: calc(100% - 24px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { width: min(860px, calc(100% - 24px)); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 560px) {
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; border-radius: 18px 18px 0 0; max-height: 92%; }
  .modal-foot .btn { flex: 1 1 auto; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; margin-top: 10px; } }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: var(--surface-2); }
.video-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b1220; }
.video-stage img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 8s ease-in-out infinite alternate; }
.video-stage .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .55)); color: #fff; }
.video-stage .bar { height: 5px; background: rgba(255, 255, 255, .3); border-radius: 3px; overflow: hidden; }
.video-stage .bar i { display: block; height: 100%; width: 0; background: #fff; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -2%); } }

/* -------------------------------- Toast -------------------------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100% - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #102a22; color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: pop .2s; }
.toast.ok { background: #165c34; } .toast.warn { background: #7a4b00; } .toast.err { background: #8a1c1c; }
.toast small { display: block; opacity: .8; font-size: .74rem; }
@media (max-width: 560px) { .toasts { left: 16px; right: 16px; bottom: 12px; max-width: none; } }

/* -------------------------------- Footer -------------------------------- */
.footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--line); background: var(--surface); font-size: .86rem; color: var(--muted); }
.footer .container { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 380px) { .brand > span:last-child { display: none; } }
.detail-grid > *, .dash-grid > *, .two-col > *, .wa-layout > * { min-width: 0; }
