/* Layout: full-height tool. Top bar, then one working surface (map canvas or Gantt grid), detail drawer on the right (bottom sheet on phones). */
:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #ebefea;
  --ink: #1b2420;
  --ink-2: #5a6762;
  --line: #d6ddd7;
  --accent: #0d7a69;
  --accent-ink: #ffffff;
  --link: #7c5fd0;
  --danger: #c2412d;
  --b1: #0e8a78; --b2: #d0563a; --b3: #4f5fc8; --b4: #b98110; --b5: #ad4596; --b6: #2b86c4;
  --st-idea: #a1aaa5; --st-rancang: #4775d6; --st-proses: #e0961a; --st-siap: #2e9a57; --st-hidup: #0e8a78; --st-parkir: #c3bcaf;
  --shadow: 0 1px 2px rgba(20,30,25,.06), 0 8px 24px rgba(20,30,25,.08);
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --lw: 300px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614; --surface: #19201d; --surface-2: #212a26; --ink: #e5ece8; --ink-2: #98a6a0; --line: #2e3934;
    --accent: #3cbfa6; --accent-ink: #0b1210; --link: #a993ec; --danger: #f07a63;
    --b1: #3cbfa6; --b2: #f08465; --b3: #8e9bf2; --b4: #e2b34a; --b5: #e07fcb; --b6: #6bb8ec;
    --st-idea: #7d8984; --st-rancang: #79a0f0; --st-proses: #f0b24a; --st-siap: #55c47f; --st-hidup: #3cbfa6; --st-parkir: #6f6a61;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111614; --surface: #19201d; --surface-2: #212a26; --ink: #e5ece8; --ink-2: #98a6a0; --line: #2e3934;
  --accent: #3cbfa6; --accent-ink: #0b1210; --link: #a993ec; --danger: #f07a63;
  --b1: #3cbfa6; --b2: #f08465; --b3: #8e9bf2; --b4: #e2b34a; --b5: #e07fcb; --b6: #6bb8ec;
  --st-idea: #7d8984; --st-rancang: #79a0f0; --st-proses: #f0b24a; --st-siap: #55c47f; --st-hidup: #3cbfa6; --st-parkir: #6f6a61;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 14px; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#app { height: 100%; display: flex; flex-direction: column; }

/* Top bar */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 10px; padding-inline: 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { flex: none; }
.brand small { font-weight: 500; color: var(--ink-2); font-size: 12px; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.tabs button { border: 0; background: transparent; padding: 5px 14px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; max-width: 360px; background: var(--surface-2); border-radius: 9px; padding: 0 10px; }
.search input { border: 0; background: transparent; padding: 7px 0; flex: 1; min-width: 0; outline: none; }
.search .cnt { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.bar .grow { flex: 1 1 0; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 11px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .45; cursor: default; }
.undo-grp { display: inline-flex; gap: 4px; }
.btn.icon { padding: 6px 9px; display: inline-grid; place-items: center; }
.btn.icon:disabled { opacity: .35; }


main { flex: 1; position: relative; min-height: 0; display: flex; }
.view { flex: 1; position: relative; min-width: 0; }

/* Map */
#viewport { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; }
#viewport.panning { cursor: grabbing; }
#stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#stage.smooth { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
#wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.node { position: absolute; display: flex; align-items: center; gap: 7px; padding: 0 4px 0 10px; border-radius: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--bc) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bc) 32%, transparent);
  font-size: 13px; font-weight: 500; white-space: nowrap; user-select: none; overflow: hidden; }
.node:hover { border-color: var(--bc); }
.node.lv1 { font-weight: 600; font-size: 13.5px; border-width: 1.5px; border-color: color-mix(in srgb, var(--bc) 60%, transparent); }
.node.lv0 { background: var(--ink); color: var(--bg); border: 0; padding-left: 18px; font-weight: 700; font-size: 15px; border-radius: 12px; }
.node.lv0 .info { color: var(--bg); }
.node.sel { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow); }
.node.hit { outline: 2px dashed var(--st-proses); outline-offset: 2px; }
.node.dim { opacity: .55; }
.node .t { overflow: hidden; text-overflow: ellipsis; }
.node .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--st-idea); }
.node .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; flex: none; }
.node .info { margin-left: auto; flex: none; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 16px; line-height: 1; display: grid; place-items: center; }
.node .info:hover { background: color-mix(in srgb, var(--bc) 18%, transparent); color: var(--ink); }
.node .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--bc); opacity: .75; }
.st-idea { background: var(--st-idea) !important; } .st-rancang { background: var(--st-rancang) !important; } .st-proses { background: var(--st-proses) !important; }
.st-siap { background: var(--st-siap) !important; } .st-hidup { background: var(--st-hidup) !important; } .st-parkir { background: var(--st-parkir) !important; }
.tog { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--bc); background: var(--surface); color: var(--ink);
  font-family: var(--font-mono); font-size: 10px; line-height: 1; padding: 0; display: grid; place-items: center; }
.tog.closed { background: var(--bc); color: var(--surface); font-weight: 700; }
.tog:hover { transform: scale(1.12); }

.mapctl { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; z-index: 5; }
.mapctl .grp { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); overflow: hidden; }
.mapctl .grp button { border: 0; background: transparent; padding: 7px 11px; font-weight: 600; font-size: 13px; }
.mapctl .grp button:hover { background: var(--surface-2); }
.mapctl .zl { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); padding: 0 6px; display: grid; place-items: center; min-width: 44px; }
.legend { position: absolute; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font-size: 11.5px; color: var(--ink-2); box-shadow: var(--shadow); z-index: 5; max-width: calc(100% - 32px); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend .ln { width: 18px; height: 0; border-top: 1.5px dashed var(--link); border-radius: 0; }
.focusbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 6px 6px 6px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; z-index: 6; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.focusbar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focusbar button { border: 0; background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 12px; white-space: nowrap; }

/* Gantt */
#ganttView { display: flex; flex-direction: column; }
.gbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-block: 10px; padding-inline: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gbar label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.gbar .hint { font-size: 12px; color: var(--ink-2); }
.g-scroll { flex: 1; overflow: auto; position: relative; }
.g-inner { position: relative; min-width: 100%; }
.g-head { position: sticky; top: 0; z-index: 3; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); height: 44px; }
.g-corner { position: sticky; left: 0; z-index: 4; width: var(--lw); flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.g-scale { position: relative; flex: none; height: 100%; }
.g-scale .m { position: absolute; top: 6px; font-size: 12px; font-weight: 700; padding-left: 6px; white-space: nowrap; }
.g-scale .w { position: absolute; bottom: 5px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); transform: translateX(-50%); }
.g-scale .today { position: absolute; bottom: 2px; font-size: 10px; font-weight: 700; color: var(--danger); transform: translateX(-50%); white-space: nowrap; }
.g-rows { position: relative; }
.g-grid { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.g-grid .gl { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.g-grid .gl.wk { border-left-style: dotted; opacity: .7; }
.g-grid .now { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--danger); opacity: .8; }
.g-row { display: flex; height: 34px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.g-row:hover .g-label, .g-row:hover .g-track { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.g-row.sel .g-label { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.g-row.flash .g-track { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.g-label { position: sticky; left: 0; z-index: 2; width: var(--lw); flex: none; display: flex; align-items: center; gap: 6px; background: var(--surface); border-right: 1px solid var(--line); padding-right: 8px; padding-left: calc(8px + var(--dep, 0) * var(--ind, 16px)); cursor: pointer; font-size: 13px; min-width: 0; }
.g-label .tw { width: 18px; height: 18px; flex: none; border: 0; background: transparent; color: var(--ink-2); padding: 0; font-size: 11px; border-radius: 4px; }
.g-label .tw:hover { background: var(--surface-2); }
.g-label .sp { width: 18px; flex: none; }
.g-label .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.g-label .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-label .tt.b { font-weight: 700; }
.g-track { position: relative; flex: none; }
.gb { position: absolute; top: 7px; height: 20px; border-radius: 6px; border: 0; padding: 0; background: color-mix(in srgb, var(--bc) 28%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc) 60%, transparent); cursor: grab; overflow: visible; touch-action: none; }
.gb.dragging { cursor: grabbing; box-shadow: inset 0 0 0 2px var(--bc), var(--shadow); }
.gb .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px 0 0 6px; background: var(--bc); opacity: .85; pointer-events: none; }
.gb .bl { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none; color: var(--ink); }
.gb .bl.out { left: calc(100% + 7px); color: var(--ink-2); font-weight: 500; }
.gb .h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gb .h.l { left: -2px; } .gb .h.r { right: -2px; }
.gsum { position: absolute; top: 14px; height: 6px; background: var(--ink); opacity: .55; border-radius: 1px; pointer-events: none; }
.gsum.under { top: 28px; height: 3px; opacity: .45; }
.gsum.under::before, .gsum.under::after { display: none; }
.gsum::before, .gsum::after { content: ""; position: absolute; top: 0; width: 3px; height: 11px; background: var(--ink); }
.gsum::before { left: 0; } .gsum::after { right: 0; }
.g-empty { padding: 40px 16px; color: var(--ink-2); max-width: 520px; }

/* Detail panel */
.panel { width: 400px; max-width: 100%; flex: none; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; z-index: 10; box-shadow: var(--shadow); }
.p-head { display: flex; align-items: flex-start; gap: 8px; padding: 12px 12px 6px 16px; }
.crumbs { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.crumbs button { border: 0; background: transparent; padding: 0; color: var(--ink-2); font-size: 12px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.crumbs button:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.x { border: 0; background: var(--surface-2); width: 28px; height: 28px; border-radius: 8px; font-size: 17px; line-height: 1; flex: none; }
.p-body > * { flex-shrink: 0; }
.p-body { overflow-y: auto; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
#pTitle { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); font-size: 19px; font-weight: 700; line-height: 1.3; resize: none; background: transparent; text-wrap: balance; }
#pTitle:hover, #pTitle:focus { border-color: var(--line); background: var(--bg); outline: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); display: flex; justify-content: space-between; }
.lbl b { font-family: var(--font-mono); letter-spacing: 0; color: var(--ink); }
.seg { display: flex; flex-wrap: wrap; gap: 5px; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px 4px 8px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.seg button i { width: 8px; height: 8px; border-radius: 50%; }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-body input[type=date], .p-body input[type=url], .p-body input[list], .p-body textarea#pNotes { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--bg); min-width: 0; }
.p-body textarea#pNotes { resize: vertical; line-height: 1.5; min-height: 90px; }
.p-body input[type=range] { width: 100%; accent-color: var(--accent); }
.urlrow { display: flex; gap: 6px; }
.urlrow a { flex: none; align-self: center; font-weight: 600; font-size: 12.5px; color: var(--accent); text-decoration: none; padding: 0 4px; }
.urlrow a[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty::before { content: "Belum bersambung dengan mana-mana nod."; font-size: 12.5px; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; border: 1px dashed var(--link); border-radius: 999px; font-size: 12.5px; overflow: hidden; max-width: 100%; }
.chip button { border: 0; background: transparent; padding: 3px 4px 3px 10px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button.rm { padding: 3px 9px 3px 4px; color: var(--ink-2); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; }
.acts button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; }
.acts button:hover { background: var(--surface-2); }
.ai { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-h { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.ai-h small { font-weight: 500; color: var(--ink-2); }
.ai .acts button { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
#aiOut { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
#aiOut .msg { color: var(--ink-2); font-size: 12.5px; }
#aiOut label { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
#aiOut label input { margin-top: 3px; accent-color: var(--accent); }
#aiOut label b { display: block; font-weight: 600; }
#aiOut label span { color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
#aiOut label em { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.danger { display: flex; flex-direction: column; gap: 8px; }
.danger > button { align-self: flex-start; border: 0; background: transparent; color: var(--danger); font-weight: 600; font-size: 12.5px; padding: 4px 0; }
.confirm { border: 1px solid var(--danger); border-radius: 10px; padding: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.confirm .acts .yes { background: var(--danger); color: #fff; border-color: transparent; }
.meta { font-size: 11.5px; color: var(--ink-2); margin: 0; }

/* Overlays */
.overlay { position: fixed; inset: 0; background: rgba(10,15,12,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.dialog h2 { margin: 0; font-size: 17px; }
.dialog p { margin: 0; color: var(--ink-2); line-height: 1.5; font-size: 13px; }
.dialog textarea { width: 100%; min-height: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: var(--bg); font-family: var(--font-mono); font-size: 12px; }
.dialog .acts { justify-content: flex-end; }
.imp-rep { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.imp-rep input { accent-color: var(--accent); }

.empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 8; background: var(--bg); }
.empty .card { max-width: 440px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.empty h2 { margin: 0; font-size: 20px; }
.empty p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 10px; font-size: 13px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* List view (default on phones) */
#listView { display: flex; flex-direction: column; }
.lbar { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; padding-block: 10px; padding-inline: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.lbar .grow { flex: 1; }
.l-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 96px; -webkit-overflow-scrolling: touch; }
.l-row { position: relative; display: flex; align-items: center; gap: 4px; min-height: 52px; padding-right: 8px; padding-left: calc(6px + var(--dep) * 16px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); background: var(--surface); }
.l-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bc); opacity: .55; }
.l-row.lv0 { background: var(--ink); color: var(--bg); min-height: 56px; }
.l-row.lv0::before { display: none; }
.l-row.lv0 .l-m { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.l-row.lv0 .l-tw { color: var(--bg); }
.l-row.lv1 { background: color-mix(in srgb, var(--bc) 8%, var(--surface)); }
.l-row.lv1 .l-t { font-weight: 700; }
.l-row.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.l-row.hit .l-t { text-decoration: underline wavy var(--st-proses); text-underline-offset: 3px; }
.l-row.flash { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.l-row.dim .l-main { opacity: .6; }
.l-row.done .l-t { color: var(--ink-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
.l-tw, .l-sp { flex: none; width: 32px; height: 40px; }
.l-tw { border: 0; background: transparent; color: var(--ink-2); font-size: 13px; border-radius: 8px; }
.l-tw:active { background: var(--surface-2); }
.l-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin: 0 9px 0 6px; }
.l-ck { flex: none; width: 28px; height: 28px; margin: 0 4px 0 0; border-radius: 50%; border: 2px solid; border-color: var(--st-idea); background: transparent !important; color: transparent; display: grid; place-items: center; padding: 0; position: relative; }
.l-ck::after { content: ""; position: absolute; inset: -8px; }
.l-ck.st-rancang { border-color: var(--st-rancang); } .l-ck.st-proses { border-color: var(--st-proses); } .l-ck.st-hidup { border-color: var(--st-hidup); } .l-ck.st-parkir { border-color: var(--st-parkir); }
.l-ck[aria-pressed="true"] { background: var(--st-siap) !important; border-color: var(--st-siap); color: #fff; }
.l-main { flex: 1; min-width: 0; align-self: stretch; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; border: 0; background: transparent; text-align: left; padding: 8px 4px 8px 6px; color: inherit; }
.l-t { font-size: 15px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.l-row.lv0 .l-t { font-size: 16px; font-weight: 700; }
.l-m { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-m .late { color: var(--danger); font-weight: 700; }
.l-prog { position: absolute; left: 6px; bottom: 5px; height: 3px; max-width: calc(100% - 12px); border-radius: 2px; background: var(--bc); opacity: .7; }
.l-h { margin: 0; position: sticky; top: 0; z-index: 1; padding: 14px 16px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: var(--bg); border-bottom: 1px solid var(--line); }
.l-h span { font-family: var(--font-mono); letter-spacing: 0; margin-left: 4px; }
.l-empty { margin: 0; padding: 32px 16px; color: var(--ink-2); line-height: 1.55; max-width: 520px; }
.l-focus { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--ink); color: var(--bg); font-size: 13px; }
.l-focus b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-focus button { border: 0; background: var(--bg); color: var(--ink); border-radius: 999px; padding: 5px 11px; font-weight: 600; font-size: 12px; }

@media (min-width: 761px) { .l-scroll { padding-inline: max(0px, calc((100% - 920px) / 2)); } .l-row { border-inline: 1px solid color-mix(in srgb, var(--line) 60%, transparent); } }

/* Header pieces that only exist on phones */
.only-sm { display: none !important; }
.more { display: contents; }
.grab { display: none; }

@media (max-width: 760px) {
  :root { --lw: 132px; --ind: 8px; }
  .only-sm { display: inline-grid !important; }
  .hide-sm { display: none; }
  .bar { gap: 8px; padding-block: 8px; padding-inline: 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand { order: 0; font-size: 16px; }
  .brand small { display: none; }
  .bar .grow { display: block; order: 1; flex: 1 1 0; }
  #bSearch { order: 2; } .undo-grp { order: 3; } #bMenu { order: 4; }
  .bar .btn.icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }
  .bar > .tabs { order: 10; flex: 1 1 100%; }
  .bar > .tabs button { flex: 1; padding: 8px 0; font-size: 14px; }
  .search { order: 11; flex: 1 1 100%; max-width: none; display: none; }
  .search input { padding: 10px 0; font-size: 16px; }
  .bar.searching .search { display: flex; }
  .more { display: none; position: absolute; right: 12px; top: 54px; z-index: 30; flex-direction: column; align-items: stretch; gap: 2px; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  .bar.menu-open .more { display: flex; }
  .more .btn { border: 0; text-align: left; padding: 11px 12px; font-size: 14.5px; border-radius: 8px; }
  .more .user { flex-direction: column; align-items: stretch; gap: 2px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
  .more .user img { display: none; }
  .more .user-name { display: block; max-width: none; padding: 6px 12px 2px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
  #bAdd { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25; width: 56px; height: 56px; padding: 0; border-radius: 18px; font-size: 26px; font-weight: 500; line-height: 1; box-shadow: 0 6px 18px rgba(13,122,105,.35), var(--shadow); display: grid; place-items: center; }
  #bAdd .add-txt { display: none; }
  body.p-open #bAdd { display: none; }
  .lbar { padding-inline: 10px; flex-wrap: nowrap; gap: 4px; }
  .lbar .grow { min-width: 0; }
  .lbar .btn.ghost { padding: 8px 5px; font-size: 12.5px; }
  .lbar .tabs button { padding: 7px 10px; font-size: 13px; }
  .mapctl { left: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); gap: 5px; max-width: calc(100% - 92px); }
  .mapctl .grp button { padding: 9px 10px; font-size: 12.5px; }
  .mapctl .zl { min-width: 38px; }
  .gbar { padding-inline: 12px; gap: 8px 10px; }
  .gbar .tabs button { padding: 6px 10px; }
  .g-label { font-size: 12.5px; gap: 4px; }
  .g-row { height: 40px; }
  .gb { top: 9px; height: 22px; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-height: 86%; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; transition: transform .2s ease; touch-action: pan-y; }
  .grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
  .p-head { padding: 8px 10px 4px 16px; touch-action: none; }
  .x { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
  .p-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .p-body input[type=date], .p-body input[type=url], .p-body input[list], .p-body textarea#pNotes { font-size: 16px; padding: 10px; }
  .seg button { padding: 7px 12px 7px 10px; font-size: 13.5px; }
  .acts button { padding: 9px 12px; font-size: 13.5px; }
  .legend { display: none; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* Touch screens: bigger hit areas for small controls; the visible size stays the same. */
@media (pointer: coarse) {
  .tog::before { content: ''; position: absolute; top: -12px; bottom: -12px; left: -2px; right: -12px; }
  .gb .h { width: 22px; }
  .gb .h.l { left: -14px; } .gb .h.r { right: -14px; }
  .mapctl .grp button { min-width: 44px; min-height: 44px; padding-block: 0; }
  #zOut, #zIn { font-size: 18px; }
  .danger > button { min-height: 44px; padding: 10px 0; font-size: 14px; }
  .dialog textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { #stage.smooth { transition: none; } .tog:hover { transform: none; } }
[hidden] { display: none !important; }
body { margin: 0; }
.bar a.btn { text-decoration: none; color: var(--ink); }
#aiOut a { color: var(--accent); font-weight: 600; }
.user { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.user-name { font-size: 13px; font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* Version chip and "Tentang" dialog */
.brand .ver { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; font-weight: 500; border-radius: 999px; padding: 2px 8px; }
.brand .ver:hover { color: var(--ink); }
@media (min-width: 761px) { #bAbout { display: none; } }
.about dl { margin: 0; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.about dl div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 10px; padding: 9px 12px; background: var(--bg); }
.about dt { color: var(--ink-2); font-size: 12.5px; }
.about dd { margin: 0; font-size: 13px; font-weight: 600; }
.about h3 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.about .log { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.about .log li { border-left: 3px solid var(--line); padding-left: 10px; }
.about .log li.now { border-left-color: var(--accent); }
.about .log b { font-family: var(--font-mono); font-size: 12.5px; }
.about .log span { font-size: 12px; color: var(--ink-2); }
.about .log p { margin: 2px 0 0; font-size: 13px; color: var(--ink); }
.about .fine { font-size: 12px; }
@media (max-width: 560px) { .about dl div { grid-template-columns: 1fr; gap: 2px; } }
.about > * { flex-shrink: 0; }
