/* KAWORK
   Layout: sidebar abu ala macOS + kanvas putih; halaman database penuh lebar, halaman kartu kolom tengah 760px.
   Tipe: SF Pro (perangkat Apple), Plus Jakarta Sans sebagai cadangan. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #ffffff;
  --side: #f5f5f7;
  --surface: #ffffff;
  --elev: #ffffff;
  --sunken: #f5f5f7;
  --fill: rgba(120, 120, 128, .13);
  --fill-2: rgba(120, 120, 128, .08);
  --fill-3: rgba(120, 120, 128, .05);
  --line: rgba(0, 0, 0, .08);
  --line-2: rgba(0, 0, 0, .14);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, .11);
  --on-accent: #ffffff;
  --red: #ff3b30;
  --red-text: #d70015;
  --green: #34c759;
  --green-text: #1f7d38;
  --orange: #ff9500;
  --orange-text: #b85000;
  --scrim: rgba(0, 0, 0, .28);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lift: 0 0 0 1px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .10);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, .07), 0 12px 32px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  --today: #ff3b30;

  /* warna tag */
  --t-gray-bg: rgba(120, 120, 128, .14); --t-gray-fg: #3a3a3c;
  --t-brown-bg: #f2e8de; --t-brown-fg: #7a4a22;
  --t-orange-bg: #ffead6; --t-orange-fg: #b04a00;
  --t-yellow-bg: #fff3bf; --t-yellow-fg: #7f5a00;
  --t-green-bg: #dcf3e1; --t-green-fg: #1c7433;
  --t-blue-bg: #ddedff; --t-blue-fg: #0055ad;
  --t-purple-bg: #ece3ff; --t-purple-fg: #6431c4;
  --t-pink-bg: #ffe1ee; --t-pink-fg: #ad2166;
  --t-red-bg: #ffdfdc; --t-red-fg: #c0120a;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --side-w: 264px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e; --side: #161618; --surface: #1c1c1e; --elev: #2c2c2e; --sunken: #111113;
    --fill: rgba(120, 120, 128, .26); --fill-2: rgba(120, 120, 128, .17); --fill-3: rgba(120, 120, 128, .10);
    --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #7c7c81;
    --accent: #2997ff; --accent-hover: #47a6ff; --accent-soft: rgba(41, 151, 255, .18); --on-accent: #ffffff;
    --red-text: #ff6961; --green-text: #4ade80; --orange-text: #ffb340;
    --scrim: rgba(0, 0, 0, .55);
    --shadow-1: none;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, .08);
    --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 28px rgba(0, 0, 0, .5);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .1), 0 16px 40px rgba(0, 0, 0, .6);
    --today: #ff453a;
    --t-gray-bg: rgba(120, 120, 128, .3); --t-gray-fg: #d8d8dc;
    --t-brown-bg: #3f3024; --t-brown-fg: #e0b993;
    --t-orange-bg: #4a2c10; --t-orange-fg: #ffb26b;
    --t-yellow-bg: #463a14; --t-yellow-fg: #ffd95a;
    --t-green-bg: #163d22; --t-green-fg: #72e08f;
    --t-blue-bg: #0f2f52; --t-blue-fg: #86c2ff;
    --t-purple-bg: #33224f; --t-purple-fg: #c9aaff;
    --t-pink-bg: #4b1d34; --t-pink-fg: #ff9fc9;
    --t-red-bg: #4e1c1a; --t-red-fg: #ff8f87;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1c1e; --side: #161618; --surface: #1c1c1e; --elev: #2c2c2e; --sunken: #111113;
  --fill: rgba(120, 120, 128, .26); --fill-2: rgba(120, 120, 128, .17); --fill-3: rgba(120, 120, 128, .10);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #7c7c81;
  --accent: #2997ff; --accent-hover: #47a6ff; --accent-soft: rgba(41, 151, 255, .18); --on-accent: #ffffff;
  --red-text: #ff6961; --green-text: #4ade80; --orange-text: #ffb340;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: none;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, .08);
  --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 28px rgba(0, 0, 0, .5);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .1), 0 16px 40px rgba(0, 0, 0, .6);
  --today: #ff453a;
  --t-gray-bg: rgba(120, 120, 128, .3); --t-gray-fg: #d8d8dc;
  --t-brown-bg: #3f3024; --t-brown-fg: #e0b993;
  --t-orange-bg: #4a2c10; --t-orange-fg: #ffb26b;
  --t-yellow-bg: #463a14; --t-yellow-fg: #ffd95a;
  --t-green-bg: #163d22; --t-green-fg: #72e08f;
  --t-blue-bg: #0f2f52; --t-blue-fg: #86c2ff;
  --t-purple-bg: #33224f; --t-purple-fg: #c9aaff;
  --t-pink-bg: #4b1d34; --t-pink-fg: #ff9fc9;
  --t-red-bg: #4e1c1a; --t-red-fg: #ff8f87;
  color-scheme: dark;
}

/* ---------- dasar ---------- */
* { box-sizing: border-box; }
html, body, #kw-root { height: 100%; }
#kw-root > .lp, #kw-root > .auth { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font); letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- tombol & field ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 980px; border: 0;
  background: var(--fill); color: var(--text); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); box-shadow: none; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: var(--red-text); box-shadow: none; }
.btn.plain { background: transparent; color: var(--accent); padding: 0 8px; }
.btn.plain:hover { background: var(--accent-soft); box-shadow: none; }
.btn.lg { height: 44px; padding: 0 24px; font-size: 16px; }
.btn.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

.ib {
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ib:hover { background: var(--fill-2); color: var(--text); }
.ib svg { width: 18px; height: 18px; }
.ib.sm { width: 24px; height: 24px; border-radius: 6px; }
.ib.sm svg { width: 15px; height: 15px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .lbl { font-size: 12px; font-weight: 600; color: var(--text-2); }
.in, .sel, .ta {
  width: 100%; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid transparent; background: var(--fill-2); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ta { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.sel { appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.in:focus, .sel:focus, .ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.in::placeholder, .ta::placeholder { color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-3); }
.err { color: var(--red-text); font-size: 13px; }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill-2); gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--elev); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.seg button svg { width: 16px; height: 16px; }

.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: 0;
}
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.stack { display: inline-flex; }
.stack .avatar { box-shadow: 0 0 0 2px var(--bg); }
.stack .avatar + .avatar { margin-left: -6px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: var(--t-gray-bg); color: var(--t-gray-fg);
}
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tag.c-gray { background: var(--t-gray-bg); color: var(--t-gray-fg); }
.tag.c-brown { background: var(--t-brown-bg); color: var(--t-brown-fg); }
.tag.c-orange { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.tag.c-yellow { background: var(--t-yellow-bg); color: var(--t-yellow-fg); }
.tag.c-green { background: var(--t-green-bg); color: var(--t-green-fg); }
.tag.c-blue { background: var(--t-blue-bg); color: var(--t-blue-fg); }
.tag.c-purple { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.tag.c-pink { background: var(--t-pink-bg); color: var(--t-pink-fg); }
.tag.c-red { background: var(--t-red-bg); color: var(--t-red-fg); }
.tag.status { border-radius: 980px; padding: 0 9px 0 7px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.swatch.c-gray { background: var(--t-gray-fg); } .swatch.c-brown { background: var(--t-brown-fg); }
.swatch.c-orange { background: var(--t-orange-fg); } .swatch.c-yellow { background: var(--t-yellow-fg); }
.swatch.c-green { background: var(--t-green-fg); } .swatch.c-blue { background: var(--t-blue-fg); }
.swatch.c-purple { background: var(--t-purple-fg); } .swatch.c-pink { background: var(--t-pink-fg); }
.swatch.c-red { background: var(--t-red-fg); }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 980px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill.jalan { background: var(--t-blue-bg); color: var(--t-blue-fg); }
.pill.ajuan { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.pill.revisi { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.pill.selesai { background: var(--t-green-bg); color: var(--t-green-fg); }
.pill.help { background: var(--t-red-bg); color: var(--t-red-fg); }
.pill.gray { background: var(--t-gray-bg); color: var(--t-gray-fg); }

/* ---------- popover, menu, toast ---------- */
.pop {
  position: fixed; z-index: 60; min-width: 220px; max-width: min(340px, calc(100vw - 24px)); max-height: min(440px, calc(100vh - 24px));
  overflow: auto; background: var(--elev); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px;
  animation: popIn .14s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop h6 { margin: 6px 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: none; }
.pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.pop .pad { padding: 6px 8px; display: flex; flex-direction: column; gap: 8px; }
.mi {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; padding: 4px 8px; border: 0;
  background: transparent; border-radius: 7px; text-align: left; font-size: 13.5px; color: var(--text);
}
.mi:hover, .mi.hot { background: var(--accent); color: var(--on-accent); }
.mi:hover .faint, .mi.hot .faint, .mi:hover .muted, .mi.hot .muted { color: inherit; opacity: .8; }
.mi svg { width: 18px; height: 18px; }
.mi.danger { color: var(--red-text); }
.mi.danger:hover { background: var(--red); color: #fff; }
.mi .kbd { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.mi .check { margin-left: auto; color: var(--accent); }
.mi:hover .check { color: inherit; }
.mi .desc { display: block; font-size: 11.5px; color: var(--text-3); }

.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(29, 29, 31, .92); color: #f5f5f7; padding: 10px 16px; border-radius: 980px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: toastIn .2s ease-out; pointer-events: auto; max-width: calc(100vw - 32px);
}
.toast.bad { background: #c0120a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.confirm { padding: 10px; display: flex; flex-direction: column; gap: 10px; max-width: 290px; }
.confirm p { margin: 0; font-size: 13.5px; }
.confirm .row { justify-content: flex-end; }

/* ---------- landing ---------- */
.lp { min-height: 100%; background: var(--bg); }
.lp-nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: 52px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.lp-nav .in-wrap { max-width: 1080px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 12px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font: 800 17px/1 var(--font-display); letter-spacing: .02em; color: var(--text); }
.wordmark .mark { width: 26px; height: 26px; }
.lp-wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.lp-hero { text-align: center; padding-block: 72px 36px; }
.lp-hero .eyebrow { font-size: 15px; font-weight: 600; color: var(--orange-text); margin-bottom: 14px; }
.lp-hero h1 { font: 700 clamp(40px, 7.4vw, 76px)/1.04 var(--font-display); letter-spacing: -.035em; margin: 0 auto; max-width: 14ch; text-wrap: balance; }
.lp-hero p { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.45; color: var(--text-2); max-width: 36em; margin: 20px auto 30px; text-wrap: balance; }
.lp-hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-shot { margin: 30px auto 0; max-width: 980px; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .16), 0 0 0 1px var(--line); background: var(--surface); }
.win-bar { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--side); border-bottom: 1px solid var(--line); }
.win-bar i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.win-bar .t { margin-left: 12px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.lp-shot .shot-body { padding: 22px 22px 26px; overflow: hidden; }
.lp-shot .shot-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lp-shot .shot-title b { font: 700 22px/1.2 var(--font-display); letter-spacing: -.02em; }
.lp-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-block: 80px 40px; }
.feat { background: var(--sunken); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.feat .ficon { width: 44px; height: 44px; }
.feat h3 { margin: 6px 0 0; font: 700 24px/1.15 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.feat p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.lp-ws { padding-block: 30px 70px; text-align: center; }
.lp-ws h2 { font: 700 clamp(28px, 4.4vw, 44px)/1.1 var(--font-display); letter-spacing: -.03em; margin: 0 0 26px; text-wrap: balance; }
.lp-logos { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 980px; background: var(--sunken); font-weight: 600; font-size: 14.5px; }
.lp-foot { border-top: 1px solid var(--line); padding-block: 24px 40px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- login & setup ---------- */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; padding-block: 40px; background: var(--sunken);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 22px; padding: 34px 30px 28px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 16px; }
.auth-card .mark { width: 54px; height: 54px; margin: 0 auto 2px; }
.auth-card h1 { margin: 0; text-align: center; font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; }
.auth-card .sub { margin: -8px 0 4px; text-align: center; color: var(--text-2); font-size: 14px; }
.auth-card .btn.primary { height: 40px; font-size: 15px; }
.auth-back { text-align: center; font-size: 13px; }
.demo-box { background: var(--fill-3); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.demo-box b { font-size: 12px; color: var(--text-2); }
.demo-accts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100%; }
.side {
  background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0;
  padding: 10px 10px 10px max(10px, env(safe-area-inset-left, 0px));
}
.side-top { display: flex; align-items: center; gap: 8px; padding: 6px 6px 10px; }
.side-search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin: 0 2px 8px; border-radius: 8px;
  background: var(--fill-2); color: var(--text-3); border: 0; width: calc(100% - 4px); font-size: 13.5px;
}
.side-search:hover { color: var(--text-2); background: var(--fill); }
.side-search svg { width: 15px; height: 15px; }
.side-search kbd { margin-left: auto; font: 11px var(--font); color: var(--text-3); }
.side-scroll { flex: 1; overflow: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.side-sec { margin-top: 14px; }
.side-sec > .h { display: flex; align-items: center; padding: 0 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.nav {
  display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text);
  font-size: 14px; border: 0; background: transparent; width: 100%; text-align: left; text-decoration: none !important;
}
.nav:hover { background: var(--fill-2); }
.nav.on { background: var(--fill); font-weight: 600; }
.nav .ico { width: 20px; height: 20px; }
.nav .ws-logo { width: 20px; height: 20px; border-radius: 5px; }
.nav .badge { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nav .badge.hot { background: var(--red); color: #fff; padding: 0 6px; border-radius: 980px; height: 18px; display: inline-flex; align-items: center; }
.nav .twist { width: 18px; height: 18px; margin-left: -4px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); transition: transform .15s; }
.nav .twist.open { transform: rotate(90deg); }
.nav .twist:hover { background: var(--fill); }
.nav .twist svg { width: 12px; height: 12px; }
.nav.sub { height: 29px; padding-left: 34px; font-size: 13.5px; color: var(--text-2); }
.nav.sub.on { color: var(--text); }
.nav.sub .ico { width: 16px; height: 16px; }
.side-me { display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.side-me .nm { font-weight: 600; font-size: 13.5px; }
.side-me .rl { font-size: 12px; color: var(--text-3); }
.demo-flag { margin: 4px 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--t-yellow-bg); color: var(--t-yellow-fg); font-size: 12px; line-height: 1.4; }

.main { min-width: 0; min-height: 0; overflow: auto; position: relative; background: var(--bg); }
.topbar { display: none; }
.page { max-width: 1120px; margin: 0 auto; padding: 34px max(28px, env(safe-area-inset-right, 0px)) 80px max(28px, env(safe-area-inset-left, 0px)); }
.page.wide { max-width: none; padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: max(48px, env(safe-area-inset-right, 0px)); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); min-height: 28px; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { background: var(--fill-2); color: var(--text); text-decoration: none; }
.crumbs .sep { color: var(--text-3); }
.crumbs img, .crumbs .ws-logo { width: 16px; height: 16px; border-radius: 4px; }
.h-large { font: 700 34px/1.15 var(--font-display); letter-spacing: -.028em; margin: 6px 0 4px; text-wrap: balance; }
.h-sub { color: var(--text-2); font-size: 15px; margin: 0; }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.head > div:first-child { flex: 1 1 300px; min-width: 0; }
.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.sec-h h2 { margin: 0; font: 700 20px/1.2 var(--font-display); letter-spacing: -.018em; }
.sec-h .cnt { color: var(--text-3); font-size: 14px; font-weight: 500; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.card.pad { padding: 18px; }
.empty { padding: 28px 18px; text-align: center; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 40px; height: 40px; }
.empty b { color: var(--text); font-size: 15px; }

/* ---------- beranda ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--sunken); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .k { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.stat .v { font: 700 28px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .v.bad { color: var(--red-text); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 48px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li .t { font-weight: 500; min-width: 0; }
.li .m { font-size: 12.5px; color: var(--text-2); }
.li.link { cursor: pointer; }
.li.link:hover { background: var(--fill-3); }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ws-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none !important; transition: box-shadow .2s, transform .2s; min-width: 0; }
.ws-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.ws-card .top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-card .nm { font-weight: 600; font-size: 15px; }
.ws-card .meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.ws-logo { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.ws-logo.glyph { display: inline-flex; align-items: center; justify-content: center; box-shadow: none; }
.ws-logo.glyph svg { width: 70%; height: 70%; }
.feed .li { align-items: flex-start; }
.feed .what { font-size: 13.5px; line-height: 1.4; min-width: 0; }
.feed .what b { font-weight: 600; }
.feed .when { font-size: 12px; color: var(--text-3); white-space: nowrap; margin-left: auto; padding-left: 8px; }

/* ---------- workspace ---------- */
.ws-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 24px; }
.ws-head .ws-logo { width: 64px; height: 64px; border-radius: 16px; }
.ws-head .txt { flex: 1; min-width: 200px; }
.ws-head .h-large { margin: 0; }
.ws-head .acts { display: flex; align-items: center; gap: 10px; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.db-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none !important; min-width: 0; transition: box-shadow .2s, transform .2s; }
.db-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.db-card .ico { width: 34px; height: 34px; }
.db-card .nm { font-weight: 600; font-size: 15px; }
.db-card .meta { font-size: 12.5px; color: var(--text-2); }
.db-card.new { align-items: flex-start; justify-content: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text-2); border: 0; text-align: left; font-size: 14px; }
.db-card.new svg { width: 18px; height: 18px; }
.db-card.new:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.tpl button { text-align: left; border: 0; border-radius: 14px; padding: 14px; background: var(--sunken); display: flex; flex-direction: column; gap: 6px; }
.tpl button:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tpl b { font-size: 14px; }
.tpl span { font-size: 12.5px; color: var(--text-2); }
.brief-box { white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.share { width: 340px; }
.share .who { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.share .who:hover { background: var(--fill-3); }
.share .who .t { flex: 1; min-width: 0; }
.share .who .n { font-weight: 600; font-size: 13.5px; }
.share .who .s { font-size: 12px; color: var(--text-3); }

/* ---------- database ---------- */
.db-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }
.db-head .ico { width: 40px; height: 40px; }
.db-title { flex: 1; min-width: 0; font: 700 34px/1.15 var(--font-display); letter-spacing: -.028em; border: 0; outline: none; background: transparent; padding: 2px 4px; margin-left: -4px; border-radius: 8px; }
.db-title:hover { background: var(--fill-3); }
.db-title:focus { background: var(--fill-2); }
.db-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 10px 0 8px; margin-bottom: 14px; position: sticky; top: 0; background: var(--bg); z-index: 6; }
.views { display: flex; align-items: center; gap: 2px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.views::-webkit-scrollbar { display: none; }
.vtab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.vtab:hover { background: var(--fill-2); color: var(--text); }
.vtab.on { color: var(--text); background: var(--fill); }
.vtab svg { width: 16px; height: 16px; }
.tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tools .btn.sm { border-radius: 8px; }
.tool { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tool:hover { background: var(--fill-2); color: var(--text); }
.tool.act { color: var(--accent); }
.tool svg { width: 15px; height: 15px; }
.search-in { height: 28px; width: 170px; border-radius: 8px; border: 0; background: var(--fill-2); padding: 0 10px; outline: none; font-size: 13px; }
.search-in:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 10px; border-radius: 980px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 500; border: 0; }
.fchip .x { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.fchip .x:hover { background: var(--accent); color: #fff; }
.fchip .x svg { width: 11px; height: 11px; }

/* tabel */
.tbl-wrap { overflow-x: auto; margin: 0 calc(-1 * max(48px, env(safe-area-inset-left, 0px))); padding: 0 max(48px, env(safe-area-inset-left, 0px)) 8px; }
.dbt { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13.5px; }
.dbt th, .dbt td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: left; vertical-align: middle; height: 36px; }
.dbt th:last-child, .dbt td:last-child { border-right: 0; }
.dbt thead th { border-top: 1px solid var(--line); position: relative; user-select: none; }
.dbt .hcell { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; color: var(--text-2); font-weight: 500; font-size: 13px; border: 0; background: transparent; width: 100%; text-align: left; white-space: nowrap; }
.dbt .hcell:hover { background: var(--fill-3); }
.dbt .hcell svg { width: 15px; height: 15px; opacity: .85; }
.dbt th.drag-over { box-shadow: inset 3px 0 0 var(--accent); }
.dbt .rs { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; }
.dbt .rs:hover, .dbt .rs.on { background: var(--accent); opacity: .5; }
.dbt .addcol { width: 44px; min-width: 44px; }
.dbt .addcol button { width: 100%; height: 34px; border: 0; background: transparent; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.dbt .addcol button:hover { background: var(--fill-3); color: var(--text); }
.dbt .addcol svg { width: 16px; height: 16px; }
.dbt tbody tr:hover td { background: var(--fill-3); }
.dbt td.c-title { position: relative; min-width: 260px; }
.dbt .grip { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); width: 22px; height: 24px; border-radius: 5px; border: 0; background: transparent; color: var(--text-3); opacity: 0; cursor: grab; display: flex; align-items: center; justify-content: center; }
.dbt tr:hover .grip { opacity: 1; }
.dbt .grip:hover { background: var(--fill-2); }
.dbt .grip svg { width: 14px; height: 14px; }
.dbt tr.dragging td { opacity: .35; }
.dbt tr.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.dbt tr.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.cell { display: flex; align-items: center; gap: 5px; min-height: 35px; padding: 4px 9px; width: 100%; min-width: 0; border: 0; background: transparent; text-align: left; overflow: hidden; }
button.cell:hover { background: var(--fill-3); }
.cell.wrap { flex-wrap: wrap; }
.cell .faint { font-size: 13px; }
.cin { width: 100%; height: 35px; border: 0; background: transparent; padding: 0 9px; outline: none; font-size: 13.5px; }
.cin:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); border-radius: 3px; }
.cin.date { color: var(--text); }
.cin.date::-webkit-calendar-picker-indicator { opacity: .5; }
.t-title { display: flex; align-items: center; gap: 6px; padding-right: 6px; }
.t-title .cin { font-weight: 500; }
.open-btn { opacity: 0; flex-shrink: 0; height: 24px; padding: 0 8px; border-radius: 6px; border: 0; background: var(--elev); box-shadow: var(--shadow-card); color: var(--text-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.open-btn svg { width: 12px; height: 12px; }
.dbt tr:hover .open-btn, .open-btn:focus { opacity: 1; }
.open-btn:hover { color: var(--text); }
.chk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; padding: 0; }
.chk.on { background: var(--accent); border-color: var(--accent); }
.chk svg { width: 12px; height: 12px; }
.newrow { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 9px; color: var(--text-3); border: 0; background: transparent; width: 100%; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.newrow:hover { background: var(--fill-3); color: var(--text); }
.newrow svg { width: 15px; height: 15px; }
.tfoot { font-size: 12.5px; color: var(--text-3); padding: 8px 9px; }
.link-cell { color: var(--accent); }
.person { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }

/* board */
.board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 16px; margin: 0 calc(-1 * max(48px, env(safe-area-inset-left, 0px))); padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: 48px; scroll-snap-type: x proximity; }
.col { width: 284px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; border-radius: 14px; padding: 8px; background: var(--fill-3); scroll-snap-align: start; }
.col.over { background: var(--accent-soft); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.col-h .n { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.col-h .ib { margin-left: auto; }
.kcard { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer; transition: box-shadow .15s; display: block; text-align: left; width: 100%; border: 0; padding: 0; color: var(--text); }
.kcard:hover { box-shadow: var(--shadow-lift); }
.kcard.dragging { opacity: .4; }
.kcard .cv { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--fill-2); }
.kcard .kb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.kcard .kt { font-weight: 600; font-size: 14px; line-height: 1.35; }
.kcard .kp { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.kcard .kmeta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.kcard .kmeta svg { width: 13px; height: 13px; }
.kdate { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; color: var(--text-2); background: var(--fill-2); white-space: nowrap; }
.kdate svg { width: 12px; height: 12px; }
.kdate.late { color: var(--red-text); background: var(--t-red-bg); }
.drop-line { height: 3px; border-radius: 3px; background: var(--accent); margin: -2px 2px; }
.col-add { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 8px; border: 0; background: transparent; color: var(--text-3); font-size: 13.5px; }
.col-add:hover { background: var(--fill-2); color: var(--text); }
.col-add svg { width: 15px; height: 15px; }
.quick { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card), 0 0 0 2px var(--accent-soft); padding: 4px; }
.quick input { width: 100%; height: 34px; border: 0; outline: none; background: transparent; padding: 0 8px; font-weight: 600; }

/* kalender */
.cal-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-bar .mo { font: 700 22px/1.2 var(--font-display); letter-spacing: -.02em; min-width: 190px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0; }
.cal .dow { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px 10px; text-align: right; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cal .day.out { background: var(--fill-3); }
.cal .day.out .dn { color: var(--text-3); }
.cal .day.over { background: var(--accent-soft); }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .dn { align-self: flex-end; font-size: 13px; font-weight: 500; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cal .day.today .dn { background: var(--today); color: #fff; font-weight: 700; }
.cal .add-day { position: absolute; left: 6px; top: 6px; opacity: 0; }
.cal .day:hover .add-day { opacity: 1; }
.cev { display: flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 500; border: 0; text-align: left; width: 100%; background: var(--fill-2); color: var(--text); cursor: pointer; overflow: hidden; }
.cev .bar { width: 3px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.cev .ell { flex: 1; }
.cev:hover { background: var(--fill); }
.cev.done { color: var(--text-3); text-decoration: line-through; }
.cev.dragging { opacity: .4; }
.more { font-size: 11.5px; color: var(--text-2); padding: 0 6px; border: 0; background: transparent; text-align: left; }
.day-panel { margin-top: 16px; }

/* galeri */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gcard { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; border: 0; padding: 0; text-align: left; color: var(--text); }
.gcard:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.gcard .cv { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--fill-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.gcard .cv svg { width: 34px; height: 34px; opacity: .6; }
.gcard .gb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.gcard .gt { font-weight: 600; font-size: 14.5px; }
.gcard.new { align-items: center; justify-content: center; min-height: 200px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text-2); gap: 6px; flex-direction: row; font-size: 14px; }
.gcard.new:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.gcard.new svg { width: 18px; height: 18px; }

/* ---------- halaman kartu ---------- */
.item-top { display: flex; align-items: center; gap: 8px; padding: 10px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; z-index: 8; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.item-top .save { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.cover { position: relative; height: 270px; background: var(--fill-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .cv-acts { position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); bottom: 14px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.cover:hover .cv-acts, .cover:focus-within .cv-acts { opacity: 1; }
.cover .cv-acts .btn { background: rgba(255, 255, 255, .88); color: #1d1d1f; backdrop-filter: blur(10px); }
.doc { max-width: 760px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right, 0px)) 140px max(24px, env(safe-area-inset-left, 0px)); }
.doc-pre { height: 40px; display: flex; align-items: flex-end; gap: 6px; opacity: 0; transition: opacity .15s; }
.doc:hover .doc-pre, .doc-pre:focus-within { opacity: 1; }
.doc-title { font: 700 40px/1.15 var(--font-display); letter-spacing: -.03em; outline: none; margin: 6px 0 18px; word-break: break-word; }
.doc-title:empty::before { content: attr(data-ph); color: var(--text-3); }
.props { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.prow { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; min-height: 36px; border-radius: 8px; }
.prow .pn { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13.5px; padding: 0 8px; height: 34px; border: 0; background: transparent; border-radius: 8px; text-align: left; min-width: 0; }
.prow .pn:hover { background: var(--fill-2); }
.prow .pn svg { width: 16px; height: 16px; opacity: .85; }
.prow .pv { min-width: 0; border-radius: 8px; }
.prow .pv:hover { background: var(--fill-3); }
.prow .pv .cell, .prow .pv .cin { min-height: 34px; }
.add-prop { align-self: flex-start; margin-top: 4px; }
.meta-line { font-size: 12.5px; color: var(--text-3); margin: 0 0 14px; }

/* editor blok */
.blocks { position: relative; padding-left: 2px; }
.blk { position: relative; display: flex; align-items: flex-start; gap: 6px; padding: 1px 0; border-radius: 6px; }
.blk.drop-before::before, .blk.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); border-radius: 3px; }
.blk.drop-before::before { top: -2px; }
.blk.drop-after::after { bottom: -2px; }
.blk.dragging { opacity: .35; }
.gut { position: absolute; left: -54px; top: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.blk:hover .gut, .blk:focus-within .gut { opacity: 1; }
.blk.h1 .gut { top: 24px; } .blk.h2 .gut { top: 17px; } .blk.h3 .gut { top: 10px; } .blk.todo .gut, .blk.bullet .gut, .blk.number .gut { top: 4px; }
.gut button { width: 24px; height: 24px; border-radius: 5px; border: 0; background: transparent; color: var(--text-3); display: flex; align-items: center; justify-content: center; padding: 0; }
.gut button:hover { background: var(--fill-2); color: var(--text-2); }
.gut .bgrip { cursor: grab; }
.gut svg { width: 15px; height: 15px; }
.ed { flex: 1; min-width: 0; outline: none; font-size: 16px; line-height: 1.6; padding: 3px 2px; white-space: pre-wrap; word-break: break-word; }
.ed:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.ed:not(:focus):empty::before { content: ""; }
.blk.first .ed:not(:focus):empty::before { content: attr(data-ph); }
.blk.h1 .ed { font: 700 28px/1.25 var(--font-display); letter-spacing: -.022em; margin-top: 18px; }
.blk.h2 .ed { font: 700 22px/1.3 var(--font-display); letter-spacing: -.018em; margin-top: 14px; }
.blk.h3 .ed { font: 600 18px/1.35 var(--font-display); margin-top: 8px; }
.blk.quote .ed { border-left: 3px solid var(--text); padding-left: 14px; }
.blk .lead { width: 22px; flex-shrink: 0; text-align: center; font-size: 16px; line-height: 1.6; padding-top: 3px; color: var(--text); font-variant-numeric: tabular-nums; }
.blk.bullet .lead::before { content: "•"; font-size: 20px; line-height: 1.3; }
.blk.todo .lead { padding-top: 6px; display: flex; justify-content: center; }
.blk.todo.done .ed { color: var(--text-3); text-decoration: line-through; }
.blk.divider { padding: 10px 0; }
.blk.divider hr { flex: 1; border: 0; border-top: 1px solid var(--line-2); margin: 0; }
.ed a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ed code { font-family: var(--mono); font-size: .88em; background: var(--fill-2); padding: 1px 5px; border-radius: 5px; color: var(--red-text); }
.media { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.media img { border-radius: 10px; max-height: 520px; object-fit: contain; background: var(--fill-3); }
.media .cap { font-size: 13.5px; color: var(--text-2); outline: none; padding: 2px; min-height: 22px; }
.media .cap:empty::before { content: "Tulis keterangan…"; color: var(--text-3); }
.media .up { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; background: var(--fill-2); color: var(--text-2); flex-wrap: wrap; }
.media .up svg { width: 22px; height: 22px; }
.bm { display: flex; align-items: stretch; border-radius: 12px; box-shadow: var(--shadow-card); overflow: hidden; min-height: 96px; background: var(--surface); color: var(--text); text-decoration: none !important; }
.bm:hover { box-shadow: var(--shadow-lift); }
.bm .bt { flex: 1; min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.bm .bt .tt { font-weight: 600; font-size: 14.5px; outline: none; }
.bm .bt .dd { font-size: 13px; color: var(--text-2); outline: none; line-height: 1.45; }
.bm .bt .dd:empty::before { content: "Tambah deskripsi…"; color: var(--text-3); }
.bm .bt .uu { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; margin-top: auto; }
.bm .bt .uu svg { width: 13px; height: 13px; }
.bm .bi { width: 30%; max-width: 220px; object-fit: cover; background: var(--fill-2); }
.add-blk { margin-top: 10px; color: var(--text-3); }
.slash { width: 300px; }
.slash .mi .ico-b { width: 38px; height: 38px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text); font-weight: 700; font-size: 13px; }
.slash .mi .ico-b svg { width: 22px; height: 22px; }
.slash .mi:hover .ico-b, .slash .mi.hot .ico-b { color: var(--text); }
.history { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; }
.history h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }

/* ---------- tugas ---------- */
.task-add { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; padding: 14px; }
.tgroup + .tgroup { margin-top: 22px; }
.tgroup h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.tgroup h3.bad { color: var(--red-text); }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border-top: 1px solid var(--line); min-width: 0; }
.trow:first-child { border-top: 0; }
.trow .ttl { font-weight: 500; flex: 1; min-width: 0; }
.trow .ttl > input { width: 100%; border: 0; background: transparent; outline: none; font-weight: 500; padding: 4px 6px; margin-left: -6px; border-radius: 6px; }
.trow .ttl > input:focus { background: var(--fill-2); }
.trow .tm { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.trow .ta-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.trow .ws-logo { width: 22px; height: 22px; border-radius: 6px; }
.ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.ring:hover { border-color: var(--accent); }
.ring.done { background: var(--green); border-color: var(--green); }
.ring.wait { border-color: var(--t-purple-fg); border-style: dashed; }
.ring svg { width: 13px; height: 13px; }
.tnote { padding: 0 14px 14px 48px; display: flex; flex-direction: column; gap: 8px; }
.tnote .rv { font-size: 13px; background: var(--t-orange-bg); color: var(--t-orange-fg); border-radius: 10px; padding: 8px 12px; }
.date-in { border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; padding: 2px 4px; border-radius: 6px; }
.date-in:hover { background: var(--fill-2); }
.date-in.late { color: var(--red-text); font-weight: 600; }

/* ---------- admin ---------- */
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tr.open td { background: var(--fill-3); }
.ptable .pnm { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.ptable .pnm b { display: block; font-weight: 600; }
.ptable .pnm > div > span { font-size: 12px; color: var(--text-3); }
.tbl-scroll { overflow-x: auto; }
.edit-user { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 4px 0 6px; }
.ws-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-tg { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 5px; border-radius: 980px; border: 0; background: var(--fill-2); color: var(--text-2); font-size: 13px; font-weight: 500; }
.ws-tg img, .ws-tg .ws-logo { width: 20px; height: 20px; border-radius: 50%; }
.ws-tg.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.new-user { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.act-day { margin-top: 22px; }
.act-day h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); font-weight: 600; position: sticky; top: 0; background: var(--bg); padding: 6px 0; z-index: 2; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .sel { width: auto; min-width: 150px; height: 32px; }
.per-person { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pp { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pp .top { display: flex; align-items: center; gap: 10px; }
.pp .nums { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.pp .nums b { display: block; font: 700 20px/1.1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot-off { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; opacity: .5; }

/* ---------- asisten ---------- */
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ai-step { display: grid; grid-template-columns: minmax(0, 1fr) 150px 30px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ai-step:first-child { border-top: 0; }
.ai-raw { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; background: var(--fill-2); border-radius: 10px; padding: 10px; max-height: 200px; overflow: auto; }

/* ---------- cari (palet) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; padding-left: 16px; padding-right: 16px; animation: fadeIn .12s; }
@keyframes fadeIn { from { opacity: 0; } }
.palette { width: 100%; max-width: 620px; background: var(--elev); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette input { width: 100%; height: 56px; border: 0; outline: none; background: transparent; padding: 0 20px; font-size: 18px; border-bottom: 1px solid var(--line); }
.palette .res { max-height: 54vh; overflow: auto; padding: 6px; }
.palette .mi { min-height: 40px; }
.palette .mi img, .palette .mi .ws-logo { width: 20px; height: 20px; border-radius: 5px; }

/* ---------- HP & tablet ---------- */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-grid { grid-template-columns: minmax(0, 1fr); }
  .task-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-add .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: none;
  }
  .app.nav-open .side { transform: none; box-shadow: var(--shadow-pop); }
  .side-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 45; }
  .topbar {
    display: flex; align-items: center; gap: 6px; height: 50px; position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
    padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
  .topbar .tt { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; text-align: center; }
  .page { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
  .page.wide { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tbl-wrap { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 0 max(16px, env(safe-area-inset-left, 0px)) 8px; }
  .board { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; }
  .col { width: 82vw; max-width: 300px; }
  .h-large, .db-title { font-size: 28px; }
  .doc-title { font-size: 30px; }
  .lp-feats { grid-template-columns: minmax(0, 1fr); padding-block: 48px 24px; }
  .lp-hero { padding-block: 44px 20px; }
  .cover { height: 190px; }
  .cover .cv-acts { opacity: 1; }
  .gut { display: none; }
  .prow { grid-template-columns: 120px minmax(0, 1fr); }
  .cal .day { min-height: 74px; padding: 3px; }
  .cal .cev { display: none; }
  .cal .dots { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
  .cal .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
  .cal .dow { text-align: center; padding: 6px 2px; }
  .cal .dn { align-self: center; }
  .cal .add-day { display: none; }
  .search-in { width: auto; flex: 1; min-width: 0; }
  .tools { width: 100%; margin-left: 0; }
  .db-bar { top: 50px; }
  .item-top { top: 50px; }
  .tools .lbl-t { display: none; }
  .ai-step { grid-template-columns: minmax(0, 1fr) 130px 30px; }
  .trow { flex-wrap: wrap; }
  .trow .ttl { flex-basis: calc(100% - 40px); }
  .trow .ta-acts { width: 100%; justify-content: flex-start; padding-left: 34px; }
  .tnote { padding-left: 14px; }
  .open-btn { opacity: 1; }
  .dbt .grip { display: none; }
}
@media (min-width: 861px) { .cal .dots { display: none; } .side-scrim { display: none; } }
@media (max-width: 520px) {
  .stat-row { gap: 8px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 24px; }
  .task-add { grid-template-columns: minmax(0, 1fr); }
  .ws-head .ws-logo { width: 52px; height: 52px; }
  .bm .bi { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
