/* =====================================================================
   White Scale ERP — sistem desain mengikuti company profile whitescale:
   latar off-white, garis tipis, Inter untuk teks, label & tombol Plus Jakarta Sans, satu aksen ungu (#6e54ff). Tersedia tema terang & gelap.
   ===================================================================== */

/* Font sama dengan company profile: Inter (teks) + Plus Jakarta Sans (menu, tombol, label).
   Disimpan di public/fonts agar tetap tampil walau offline / Google Fonts diblokir. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }


@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/pjs-latin-wght.woff2") format("woff2-variations"), url("../fonts/pjs-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/pjs-latin-ext-wght.woff2") format("woff2-variations"), url("../fonts/pjs-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #fbfaf9;
  --card: #f4f3f1;
  --card-hover: #efedea;
  --white: #ffffff;
  --line: rgba(20, 20, 20, 0.09);
  --line-strong: rgba(20, 20, 20, 0.16);
  --ink: #141414;
  --ink-soft: #26262b;
  --muted: #6c6c7c;
  --brand: #6e54ff;
  --brand-hover: #5f45f0;
  --brand-text: #5a3ff5;
  --brand-tint: #f1efff;
  --brand-tint-2: #e5deff;
  --title: #1a1b2e;

  /* logo */
  --lm-1: #e5deff; --lm-2: #c4adff; --lm-3: #8a5cfd; --lm-4: #3d16a7;
  --lw-white: #1e0a4f; --lw-scale: #5b2ee0; --lw-tag: #4c4170;

  /* status & data */
  --ok: #0f7a3d; --ok-tint: #e3f5ea;
  --warn: #946000; --warn-tint: #fdf2d8;
  --danger: #c4302b; --danger-tint: #fdecec;
  --info: #1d63c9; --info-tint: #e7f0fc;
  --st-todo: #9c9ba6; --st-progress: #2a78d6; --st-review: #6e54ff; --st-done: #1a9a5a;
  --s-in: #6e54ff; --s-out: #eb6834;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(48, 24, 160, 0.06);
  --shadow-lg: 0 0 0 1px var(--line), 0 18px 48px rgba(48, 24, 160, 0.16);
  --glow-a: rgba(110, 84, 255, 0.16);
  --glow-b: rgba(255, 161, 161, 0.16);

  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* skala teks: kecil → besar */
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 16px; --fs-lg: 18px;
  --ui: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --sidebar: 264px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tema gelap — palet "dark band" company profile */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e100f; --card: #161817; --card-hover: #1c1f1d; --white: #141615;
    --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
    --ink: #f3f3f5; --ink-soft: #dcdce4; --muted: #9d9db2; --title: #f3f3f5;
    --brand: #7b63ff; --brand-hover: #8a75ff; --brand-text: #a596ff; --brand-tint: #1e1a38; --brand-tint-2: #2a2350;
    --lm-1: #2a2350; --lm-2: #4a3a99; --lm-3: #8a5cfd; --lm-4: #c4adff;
    --lw-white: #f3f1ff; --lw-scale: #a596ff; --lw-tag: #a59fc4;
    --ok: #4cc985; --ok-tint: #12291d; --warn: #e7b04a; --warn-tint: #2c2412;
    --danger: #f17373; --danger-tint: #2e1716; --info: #6aa8f5; --info-tint: #13223a;
    --st-todo: #7c7b88; --st-progress: #3987e5; --st-review: #8a72ff; --st-done: #2fb873;
    --s-in: #8a72ff; --s-out: #d95926;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 0 0 1px var(--line), 0 18px 48px rgba(0, 0, 0, 0.6);
    --glow-a: rgba(110, 84, 255, 0.18); --glow-b: rgba(255, 161, 161, 0.07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e100f; --card: #161817; --card-hover: #1c1f1d; --white: #141615;
  --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f3f3f5; --ink-soft: #dcdce4; --muted: #9d9db2; --title: #f3f3f5;
  --brand: #7b63ff; --brand-hover: #8a75ff; --brand-text: #a596ff; --brand-tint: #1e1a38; --brand-tint-2: #2a2350;
  --lm-1: #2a2350; --lm-2: #4a3a99; --lm-3: #8a5cfd; --lm-4: #c4adff;
  --lw-white: #f3f1ff; --lw-scale: #a596ff; --lw-tag: #a59fc4;
  --ok: #4cc985; --ok-tint: #12291d; --warn: #e7b04a; --warn-tint: #2c2412;
  --danger: #f17373; --danger-tint: #2e1716; --info: #6aa8f5; --info-tint: #13223a;
  --st-todo: #7c7b88; --st-progress: #3987e5; --st-review: #8a72ff; --st-done: #2fb873;
  --s-in: #8a72ff; --s-out: #d95926;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 0 0 1px var(--line), 0 18px 48px rgba(0, 0, 0, 0.6);
  --glow-a: rgba(110, 84, 255, 0.18); --glow-b: rgba(255, 161, 161, 0.07);
}

/* ---------- dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.6; font-synthesis: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; }
.skip:focus { left: 8px; background: var(--white); padding: 8px 12px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- tipografi ---------- */
.label { font-family: var(--ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-text); }
.mono { font-family: var(--ui); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.h-page { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.25rem); letter-spacing: -0.035em; line-height: 1.1; color: var(--title); }
.h-section { font-size: 1.125rem; letter-spacing: -0.02em; font-weight: 500; }
.lead { font-size: var(--fs-md); color: var(--muted); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.num, .amount, time { font-variant-numeric: tabular-nums; }
.text-danger { color: var(--danger) !important; }
.text-ok { color: var(--ok) !important; }
.text-in { color: var(--ok); }
.text-out { color: var(--danger); }
.pre { white-space: pre-wrap; }
.block { display: block; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { flex: none; }
.lm-1 { fill: var(--lm-1); } .lm-2 { fill: var(--lm-2); } .lm-3 { fill: var(--lm-3); } .lm-4 { fill: var(--lm-4); }
.logo-text { display: grid; line-height: 1; }
.logo-word { font-weight: 800; font-size: 19px; letter-spacing: -0.04em; white-space: nowrap; }
.lw-white { color: var(--lw-white); }
.lw-scale { color: var(--lw-scale); }
.logo-tag { margin-top: 5px; font-size: 7.6px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--lw-tag); white-space: nowrap; }
.logo-sm .logo-word { font-size: 16px; }
.logo-sm .logo-tag { font-size: 6.4px; }
.logo-lg { gap: 14px; }
.logo-lg .logo-word { font-size: 28px; }
.logo-lg .logo-tag { font-size: 10px; margin-top: 7px; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  font-family: var(--ui); font-size: 13px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(48, 24, 160, 0.3); }
.btn-brand:hover { background: var(--brand-hover); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--card); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--card); color: var(--brand-text); }
.btn-danger { background: var(--white); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger-tint); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn .icon { flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--card); color: var(--brand-text); }
.inline-form { display: inline-flex; margin: 0; }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: none; }
}

/* ---------- kerangka aplikasi ---------- */
body.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); border-right: 1px solid var(--line); z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; height: 72px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 14px 16px; }
.nav-group { font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 8px; }
.sidebar-nav ul { display: grid; gap: 2px; }
.sidebar-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-soft);
  transition: color 160ms ease, background-color 160ms ease;
}
.sidebar-nav a .icon { color: var(--muted); transition: color 160ms ease, transform 200ms var(--ease-out); }
.sidebar-nav a:hover { color: var(--ink); background: var(--card); }
.sidebar-nav a:hover .icon { color: var(--ink-soft); }
/* Menu aktif: latar ungu lembut, teks & ikon ungu, plus penanda tegak di tepi kiri sidebar */
.sidebar-nav a.active {
  color: var(--brand-text); font-weight: 600;
  background: linear-gradient(90deg, var(--brand-tint) 0%, color-mix(in srgb, var(--brand-tint) 55%, transparent) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent);
}
.sidebar-nav a.active .icon { color: var(--brand); }
.sidebar-nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand); box-shadow: 0 0 10px color-mix(in srgb, var(--brand) 55%, transparent);
}
.sidebar-nav a:focus-visible { outline-offset: -2px; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.user-chip:hover { background: var(--card); }
.user-chip-text { display: grid; min-width: 0; line-height: 1.3; }
.user-chip-text strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-crumb { flex: 0 1 auto; min-width: 0; max-width: 46%; font-size: 14px; font-weight: 500; color: var(--muted); }
.topbar-crumb ol { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; min-width: 0; }
.topbar-crumb li { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.topbar-crumb li + li::before { content: "/"; margin: 0 8px; color: var(--line-strong); flex: none; }
.topbar-crumb li > * { overflow: hidden; text-overflow: ellipsis; }
.topbar-crumb li:not(:last-child) { flex: none; }
.topbar-crumb a { color: var(--muted); transition: color 140ms ease; }
.topbar-crumb a:hover { color: var(--brand-text); }
.topbar-crumb li[aria-current] { color: var(--ink); font-weight: 600; }
.gsearch { position: relative; flex: 1 1 360px; max-width: 520px; margin: 0 auto; }
.gsearch > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gsearch input { height: 40px; padding: 0 38px 0 38px; border-radius: 999px; background: var(--white); }
.gsearch input::-webkit-search-cancel-button { display: none; }
.gsearch-key { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 11px var(--ui); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.gsearch:focus-within .gsearch-key { display: none; }
.gsearch-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 520px); overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.gs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 4px; font: 600 11px var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gs-head a { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--brand-text); font-size: 12px; }
.gs-head a:hover { text-decoration: underline; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); }
.gs-item.is-active, .gs-item:hover { background: var(--brand-tint); }

.gs-text { display: grid; min-width: 0; line-height: 1.3; }
.gs-text strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-note { padding: 18px 12px; text-align: center; font-size: 13.5px; color: var(--muted); }
.filter-select .select-caret { right: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar-actions form { display: flex; }
.menu-btn, .topbar-logo { display: none; }
.content { position: relative; padding: 32px 32px 64px; display: grid; gap: 24px; align-content: start; outline: none; min-width: 0; }
.content > * { position: relative; min-width: 0; }
.content-glow {
  position: absolute !important; inset: 0 0 auto; height: 280px; pointer-events: none;
  background: radial-gradient(45% 100% at 30% 0%, var(--glow-a), transparent 72%), radial-gradient(35% 90% at 85% 0%, var(--glow-b), transparent 72%);
}
.scrim { display: none; }

/* ---------- header halaman ---------- */
.page-head {
  display: grid; gap: 14px; padding: 22px 24px; border-radius: 16px;
  background: linear-gradient(135deg, var(--white) 0%, color-mix(in srgb, var(--brand-tint) 55%, var(--white)) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.page-head .label {
  display: inline-flex; align-items: center; width: fit-content; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--brand-tint); font-size: 11.5px; letter-spacing: 0.04em;
}
.back-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.back-link:hover { color: var(--brand-text); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-head-text { display: grid; gap: 8px; min-width: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- kartu & panel ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.015em; }
.card-head .sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--brand-text); }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-body { padding: 18px 22px; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.span-2 { grid-column: span 2; }

/* statistik (gaya "facts" company profile) */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; gap: 8px; padding: 20px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out); }
a.stat:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-family: var(--ui); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-tint); color: var(--brand-text); }
.stat-value { white-space: nowrap; font-size: clamp(1.25rem, 0.9rem + 0.9vw, 1.625rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: var(--fs-sm); color: var(--muted); }
.stat.tone-in .stat-icon { background: color-mix(in srgb, var(--s-in) 14%, transparent); color: var(--s-in); }
.stat.tone-out .stat-icon { background: color-mix(in srgb, var(--s-out) 14%, transparent); color: var(--s-out); }
.stat.tone-warn .stat-hint { color: var(--danger); }
.stat.tone-warn .stat-icon { background: var(--danger-tint); color: var(--danger); }
.stat.tone-ok .stat-hint { color: var(--ok); }

/* beban kerja per orang (halaman Tugas) */
.workload { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.wl-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color 160ms ease; }
.wl-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.wl-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.wl-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.wl-text strong { font-size: 14.5px; font-weight: 600; }
.wl-text small { font-size: 12.5px; color: var(--muted); }
.wl-load { display: grid; text-align: right; line-height: 1.2; }
.wl-load b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.wl-load small { font-size: 11px; color: var(--muted); }

/* ---------- badge, progress, avatar ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; white-space: nowrap;
  background: var(--card); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.b-client-active, .b-project-done, .b-task-done, .b-invoice-paid, .b-tx-income { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.b-client-lead, .b-project-on_hold, .b-priority-high { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
.b-project-active, .b-task-in_progress, .b-invoice-sent { background: var(--info-tint); color: var(--info); border-color: transparent; }
.b-task-review, .b-project-planning, .b-role-owner, .b-role-manager { background: var(--brand-tint); color: var(--brand-text); border-color: transparent; }
.b-invoice-overdue, .b-priority-urgent, .b-tx-expense { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.b-project-cancelled, .b-invoice-cancelled, .b-client-inactive { text-decoration: line-through; color: var(--muted); }
.b-priority-low .dot, .b-priority-medium .dot { opacity: 0.6; }

.progress-wrap { display: inline-flex; align-items: center; gap: 10px; width: 100%; min-width: 100px; }
.progress { flex: 1; height: 6px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.progress-num { font-size: var(--fs-xs); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2ch; text-align: right; }
.progress-lg .progress { height: 10px; }
.progress-warn .progress > span { background: var(--danger); }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-text); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px var(--white);
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-empty { background: var(--card); color: var(--muted); }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* ---------- filter & pencarian ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink-soft);
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand-text); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--card); color: var(--muted); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.active .chip-count { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.seg a, .seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; border: 0; background: transparent; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 500; color: var(--muted);
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* filter tugas per orang */
.people { display: flex; gap: 8px; flex-wrap: wrap; }
.person {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px 0 6px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line-strong); color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 500;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.person:hover { border-color: var(--brand); color: var(--ink); }
.person .person-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--muted); }
.person .avatar { box-shadow: none; }
.person.active { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-text); font-weight: 600; box-shadow: 0 0 0 1px var(--brand); }
.person.active .person-icon { background: var(--white); color: var(--brand); }
.person.active .chip-count { background: var(--brand); color: #fff; }

/* ---------- tabel / daftar ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.table th {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.01em; color: var(--muted);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 120ms ease; }
.table tbody tr:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.table .r, .table th.r { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table tfoot td { background: var(--card); border-top: 1px solid var(--line); font-weight: 500; }
.cell-main { display: grid; gap: 2px; min-width: 0; }
.cell-main a, .cell-title { font-weight: 500; color: var(--ink); }
.cell-main a:hover { color: var(--brand-text); }
.cell-sub { font-size: var(--fs-sm); color: var(--muted); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.table-compact td { padding: 11px 16px; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.is-inactive td { opacity: 0.55; }
.tx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.tx-dot.income { background: var(--s-in); }
.tx-dot.expense { background: var(--s-out); }
.pagination-wrap { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pager { display: flex; gap: 6px; }

/* daftar sederhana */
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; transition: background-color 120ms ease; }
a.list-item:hover { background: var(--card); }
.list-item .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list-item strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { font-size: var(--fs-sm); color: var(--muted); }
.list-item .meta { display: grid; justify-items: end; gap: 4px; flex: none; }
.list-item .w-prog { width: 150px; flex: none; }

.activity { display: grid; }
.activity li { display: flex; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity .ttl { font-size: 14px; }
.activity small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }

/* ---------- kosong ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty-mark { opacity: 0.55; margin-bottom: 6px; }
.empty-title { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; }
.empty-text { color: var(--muted); max-width: 46ch; font-size: var(--fs-sm); line-height: 1.55; }
.empty-action { margin-top: 10px; }

/* ---------- formulir ---------- */
.form { display: grid; gap: 20px; }
.form-section { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 20px 40px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-section-info { display: grid; gap: 8px; align-content: start; }
.form-section-info .muted { font-size: var(--fs-sm); line-height: 1.55; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); font-size: var(--fs-xs); font-weight: 600; }
.form-section-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-content: start; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
.field > label { display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field .req { color: var(--danger); }
.field .opt { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; margin-left: auto; }
.field-help { font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.field-error { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--danger); }
input, select, textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 12px; height: 44px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--card); color: var(--muted); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); padding: 0; }
input[type="color"] { padding: 4px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.input { position: relative; display: flex; align-items: stretch; }
.input.has-prefix input { padding-left: 48px; }
.input.has-suffix input { padding-right: 48px; }
.input.has-icon input { padding-left: 40px; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.affix { position: absolute; top: 1px; bottom: 1px; display: grid; place-items: center; padding: 0 12px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.affix.prefix { left: 1px; border-right: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.affix.suffix { right: 1px; }
button.affix { background: none; border: 0; cursor: pointer; }
button.affix:hover { color: var(--brand-text); }
.select { position: relative; }
.ui-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.ui-select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 40px; padding: 0 12px 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  font: 500 14px var(--ui); text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ui-select-btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); }
.ui-select-btn:focus-visible, .ui-select-btn[aria-expanded="true"] { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.ui-select-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ui-select-btn.is-placeholder { color: var(--muted); }
.ui-select-btn .icon { flex: none; color: var(--muted); transition: transform 160ms ease; }
.ui-select-btn[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--brand-text); }
.ui-select-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-table .ui-select-btn { height: 36px; min-width: 120px; font-size: 13px; }
.ai-table .select { min-width: 120px; }
.ui-panel { position: fixed; z-index: 200; overflow-y: auto; padding: 6px; display: grid; gap: 2px; align-content: start; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); animation: ui-pop 140ms cubic-bezier(0.16, 1, 0.3, 1); }
.ui-panel[hidden] { display: none; }
.ui-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 13.5px var(--ui); text-align: left; cursor: pointer; }
.ui-opt:hover, .ui-opt.is-hover { background: var(--card); }
.ui-opt .icon { visibility: hidden; flex: none; color: var(--brand-text); }
.ui-opt.is-selected { background: var(--brand-tint); color: var(--brand-text); font-weight: 600; }
.ui-opt.is-selected .icon { visibility: visible; }
.ui-opt:disabled { opacity: 0.45; cursor: not-allowed; }
@keyframes ui-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.select select { appearance: none; padding-right: 36px; cursor: pointer; }
.ui-select-btn ~ .select-caret { display: none; }
.select-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.form-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.form-actions .spacer { flex: 1; }
.form-actions .hint { font-size: 13px; color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.alert .icon { flex: none; margin-top: 2px; }
.alert-error { background: var(--danger-tint); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.alert-info { background: var(--brand-tint); color: var(--ink-soft); border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.alert-info .icon { color: var(--brand-text); }
.alert-warn { background: var(--warn-tint); color: var(--warn); }

/* pilihan visual (radio sebagai kartu) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.choice:hover { border-color: var(--brand); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice strong { display: block; font-size: 14px; font-weight: 500; }
.choice small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.choice .swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.choice .g-status { margin-top: 5px; }
.color-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.color-choices .choice { padding: 8px; border-radius: 50%; }
.color-choices .choice .swatch { width: 22px; height: 22px; margin: 0; }

/* item invoice */
.items { display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 170px 150px 40px; gap: 10px; align-items: center; }
.item-head { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.item-total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.totals { display: grid; gap: 8px; margin-left: auto; width: min(340px, 100%); padding-top: 8px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-soft); }
.totals .grand { border-top: 1px solid var(--line-strong); padding-top: 10px; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }

/* ---------- toast & dialog ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 12px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in 280ms var(--ease-out); transition: opacity 400ms ease, transform 400ms ease;
}
.toast-error { background: var(--danger); color: #fff; }
.toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.dialog-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(14, 16, 15, 0.45); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; animation: fade 160ms ease-out; }
.dialog { width: min(440px, 100%); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px; display: grid; gap: 16px; animation: pop 220ms var(--ease-out); }
.dialog h2 { font-size: 1.25rem; }
.dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-tint); color: var(--danger); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- dashboard ---------- */
.greet { display: grid; gap: 6px; }
.greet .h-page em { font-style: normal; color: var(--brand-text); }

/* ---------- proyek ---------- */
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.project-card { position: relative; display: grid; gap: 14px; padding: 20px 22px; overflow: hidden; transition: border-color 160ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease; }
.project-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pc, var(--brand)); }
.project-card:hover { border-color: color-mix(in srgb, var(--pc, var(--brand)) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pc-title { font-size: 1.125rem; letter-spacing: -0.02em; }
.pc-client { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.pc-progress .progress > span { background: var(--pc, var(--brand)); }
.pc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-meta dt { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.pc-meta dd { margin: 3px 0 0; font-size: 14px; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.summary-strip > div { padding: 16px 22px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip dt { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.summary-strip dd { margin: 0; font-weight: 500; }
.project-hero { position: relative; overflow: hidden; }
.project-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pc, var(--brand)); }
.project-hero .ph-top { display: grid; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand-text); border-bottom-color: var(--brand); }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kcol { display: flex; flex-direction: column; gap: 10px; min-height: 260px; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px dashed transparent; transition: background-color 140ms ease, border-color 140ms ease; }
.kcol.drop { border-color: var(--brand); background: var(--brand-tint); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.kcol-head .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--white); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.kcol-hint { font-size: 12.5px; color: var(--muted); padding: 0 4px; margin-top: -6px; }
.kcards { display: grid; gap: 10px; align-content: start; flex: 1; }
.kcard { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color 140ms ease, box-shadow 140ms ease, transform 160ms var(--ease-out); }
.kcard:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: 0.45; transform: rotate(1.5deg); }
.kcard.is-overdue { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.kcard-title { font-weight: 500; line-height: 1.4; font-size: 14.5px; letter-spacing: -0.01em; }
.kcard-project { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.kcard-project i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kcard-top, .kcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kcard-due { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.kcard-due.late { color: var(--danger); }
.kempty { font-size: 13px; color: var(--muted); text-align: center; padding: 24px 8px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.g-status { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--st, var(--st-todo)); }
.st-todo { --st: var(--st-todo); } .st-in_progress { --st: var(--st-progress); } .st-review { --st: var(--st-review); } .st-done { --st: var(--st-done); }
.g-status.is-overdue-key { background: transparent; box-shadow: inset 0 0 0 2px var(--danger); }

/* ---------- gantt ---------- */
.gantt-card { overflow: hidden; }
.gantt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.g-stat { display: grid; gap: 4px; padding: 14px 18px; background: var(--white); border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: background 140ms ease; }
.g-stat:hover { background: var(--card); }
.g-stat.is-on { background: var(--brand-tint); }
.g-stat-label { display: flex; align-items: center; gap: 7px; font: 500 12.5px var(--ui); color: var(--muted); }
.g-stat-value { font: 600 24px/1.1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.g-stat-value small { font: 500 13px var(--ui); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.g-stat-sub { font: 400 12px/1.35 var(--ui); color: var(--muted); }
.g-stat-bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.g-stat-bar i { display: block; height: 100%; background: var(--st-done); border-radius: inherit; }
.g-stat.is-danger .g-stat-value { color: var(--danger); }
.gantt-toolbar { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.gantt-toolbar .seg button { height: 28px; }
.g-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-field { position: relative; display: block; }
.g-field .select { width: 100%; }
.g-field .ui-select-btn { height: 36px; min-width: 170px; padding-left: 12px; font-size: 13px; }
.ui-select-tag { font-weight: 500; color: var(--muted); margin-right: 7px; }
.ui-select-tag::after { content: ':'; }
.g-spacer { flex: 1; }
.g-nav { display: flex; gap: 6px; align-items: center; }
.gantt-toolbar .btn-sm, .g-nav .btn-sm { height: 34px; }
.gantt-status { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.gantt-status strong { color: var(--ink); font-weight: 600; }
.gantt-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gantt-hint { display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--card); }
.gantt-scroll { position: relative; overflow: auto; max-height: calc(100vh - 370px); min-height: 280px; outline: none; }
.gantt { position: relative; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; height: 58px; background: var(--card); border-bottom: 1px solid var(--line); }
.g-head-label { align-items: flex-end !important; padding-bottom: 10px !important; background: var(--card) !important; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.g-head-track { position: relative; }
.g-hrow { position: relative; height: 29px; }
.g-hcell { position: absolute; top: 0; height: 29px; line-height: 29px; padding-left: 8px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.g-hrow:first-child .g-hcell { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.g-day { padding: 0; text-align: center; font-size: 11px; }
.g-day.weekend { background: color-mix(in srgb, var(--line) 50%, transparent); }
.g-body { position: relative; }
.g-grid { position: absolute; top: 0; pointer-events: none; }
.g-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.g-weekend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--line) 45%, transparent); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--brand); z-index: 3; }
.g-today span { position: sticky; top: 64px; display: inline-block; transform: translateX(-50%); padding: 2px 7px; border-radius: 4px; background: var(--brand); color: #fff; font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.g-row { position: absolute; left: 0; right: 0; height: 44px; display: flex; border-bottom: 1px solid var(--line); }
.g-row:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.g-row-project { background: var(--card); }
.g-label { position: sticky; left: 0; z-index: 5; width: var(--gl, 300px); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--white); border-right: 1px solid var(--line); overflow: hidden; }
.g-row-project .g-label { background: var(--card); }
.g-label-task { padding-left: 38px; }
.g-name { display: grid; min-width: 0; line-height: 1.25; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.g-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name strong { font-weight: 500; font-size: 14px; }
.g-name span { font-size: 13.5px; }
.g-name small { font-size: 11.5px; color: var(--muted); }
.g-name:hover strong, .g-name:hover span { color: var(--brand-text); }
.g-toggle { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 4px; padding: 0; }
.g-toggle:hover { background: var(--white); color: var(--ink); }
.g-toggle svg { transition: transform 160ms ease; }
.g-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.g-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-track { position: relative; height: 100%; }
.g-bar { position: absolute; top: 12px; height: 20px; border-radius: 6px; z-index: 2; overflow: hidden; touch-action: none;
  background: color-mix(in srgb, var(--st, var(--st-todo)) 22%, var(--white)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st, var(--st-todo)) 70%, transparent); }
.g-bar .g-fill { position: absolute; inset: 0 auto 0 0; background: var(--st, var(--st-todo)); }
.g-bar.is-overdue { outline: 2px solid var(--danger); outline-offset: 1px; }
.g-bar.is-editable { cursor: grab; }
.g-bar.dragging { cursor: grabbing; box-shadow: var(--shadow-lg); opacity: 0.92; }
.g-bar-project { top: 16px; height: 12px; border-radius: 4px; box-shadow: none; background: color-mix(in srgb, var(--pc, var(--brand)) 22%, var(--white)); }
.g-bar-project .g-fill { background: var(--pc, var(--brand)); }
.g-handle { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 1; }
.g-handle-l { left: 0; } .g-handle-r { right: 0; }
.g-bar.is-editable:hover .g-handle { background: rgba(255, 255, 255, 0.4); }
.g-bar-label { position: absolute; top: 14px; font-size: 11.5px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.g-unscheduled { position: sticky; left: calc(var(--gl, 300px) + 16px); font-size: 12.5px; color: var(--muted); font-style: italic; line-height: 44px; }
.g-arrows { position: absolute; top: 0; pointer-events: none; z-index: 1; overflow: visible; }
.g-dep { fill: none; stroke: var(--muted); stroke-opacity: 0.7; stroke-width: 1.4; }
.g-dep.late { stroke: var(--danger); stroke-dasharray: 4 3; }
.g-arrow-head { fill: var(--muted); }
.g-arrow-head.late { fill: var(--danger); }
.g-tip { position: absolute; z-index: 10; max-width: 300px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.45; white-space: pre-line; pointer-events: none; box-shadow: var(--shadow-lg); }
.g-loading { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- grafik ---------- */
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch-i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.s-in { background: var(--s-in); fill: var(--s-in); }
.s-out { background: var(--s-out); fill: var(--s-out); }
.chart-plot { position: relative; }
.chart-plot svg { display: block; overflow: visible; }
.chart .grid-line { stroke: var(--line); }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .hit { fill: transparent; }
.chart .bar-group.hover .hit { fill: var(--card); }
.chart-tip { position: absolute; z-index: 3; min-width: 200px; padding: 10px 12px; border-radius: 8px; background: var(--white); box-shadow: var(--shadow-lg); font-size: 12.5px; pointer-events: none; }
.chart-tip div { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--ink-soft); }
.chart-tip b { margin-left: auto; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-table { margin-top: 10px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.cat-list { display: grid; gap: 14px; }
.cat-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cat-row strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.cat-bar { height: 6px; border-radius: 99px; background: var(--card); margin: 6px 0 3px; overflow: hidden; }
.cat-bar span { display: block; height: 100%; border-radius: 99px; }

/* ---------- invoice dokumen ---------- */
.invoice-doc { max-width: 880px; padding: 40px; display: grid; gap: 28px; position: relative; overflow: hidden; }
.invoice-doc::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--lm-4), var(--lm-3), var(--lm-2)); }
.inv-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.inv-title { text-align: right; display: grid; gap: 6px; justify-items: end; }
.inv-title h2 { font-family: var(--ui); font-size: 22px; letter-spacing: 0.2em; font-weight: 600; }
.inv-parties { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inv-parties .to { display: grid; gap: 3px; }
.inv-parties .to strong { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.inv-notes { padding-top: 16px; border-top: 1px solid var(--line); white-space: pre-wrap; font-size: 14px; }
.status-steps { display: flex; gap: 0; flex-wrap: wrap; }
.status-steps li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.status-steps li + li::before { content: ""; width: 28px; height: 1px; background: var(--line-strong); margin: 0 10px; }
.status-steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; }
.status-steps .done { color: var(--ink); }
.status-steps .done .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.status-steps .current { color: var(--brand-text); }
.status-steps .current .n { border-color: var(--brand); color: var(--brand-text); }

/* ---------- login ---------- */
body.login-page { background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr); }
.login-stage { position: relative; overflow: hidden; border-right: 1px solid var(--line); display: flex; background: var(--bg); }
.login-stage .glow { position: absolute; inset: 0 0 auto; height: 420px; background: radial-gradient(45% 100% at 40% 0%, rgba(110, 84, 255, 0.22), transparent 72%), radial-gradient(35% 90% at 82% 0%, rgba(255, 161, 161, 0.22), transparent 72%); }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login-stage-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; width: 100%; padding: 40px clamp(24px, 5vw, 64px); }
.login-pitch { display: grid; gap: 18px; max-width: 34rem; padding: 4vh 0; }
.login-pitch .lead { font-size: 17px; max-width: 46ch; }
.login-title { font-size: clamp(2.25rem, 1.2rem + 2.8vw, 3.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.04; color: var(--title); }
.sheen {
  background-image: linear-gradient(100deg, transparent 0%, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%, transparent 100%), linear-gradient(95deg, #5a3ff5 10%, #8b5cf6 55%, #e879a8 100%);
  background-size: 260% 100%, 100% 100%; background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: sheen 4s linear infinite;
}
@keyframes sheen { 0% { background-position: 100% 0, 0 0; } 50%, 100% { background-position: 0 0, 0 0; } }
.login-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--white) 80%, transparent); backdrop-filter: blur(6px); overflow: hidden; }
.login-features li { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.login-features li:nth-child(odd) { border-right: 1px solid var(--line); }
.login-features li:nth-last-child(-n + 2) { border-bottom: 0; }
.login-features strong { display: block; font-weight: 500; font-size: 14.5px; }
.login-features small { display: block; font-size: 12.5px; color: var(--muted); }
.lf-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--white); color: var(--brand-text); box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(48, 24, 160, 0.1); }
.login-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 24px; }
.login-theme { position: absolute; top: 20px; right: 20px; border-color: var(--line); background: var(--white); }
.login-card { width: min(400px, 100%); display: grid; gap: 18px; }
.login-card-logo { margin-bottom: 8px; }
.login-card-head { display: grid; gap: 6px; }
.login-help { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.login-foot { color: var(--muted); font-size: 10.5px; }
.login-stage-logo { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .login-pitch, .login-features, .login-card { animation: rise 900ms var(--ease-expo) both; }
  .login-features { animation-delay: 150ms; }
  .login-card { animation-delay: 80ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .sheen { animation: none; }
  .hl-dot { display: none; }
}

/* ---------- responsif ---------- */
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .login { grid-template-columns: 1fr; }
  .login-stage { border-right: 0; border-bottom: 1px solid var(--line); min-height: auto; }
  .login-stage-inner { gap: 28px; padding: 28px 24px 32px; }
  .login-pitch { padding: 0; }
  .login-panel { padding: 40px 20px 32px; }
  .login-panel { order: -1; min-height: auto; }
  .login-stage-logo { display: none; }
  .login-stage .login-features { display: none; }
}
@media (max-width: 960px) {
  body.app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform 240ms var(--ease-out); box-shadow: var(--shadow-lg); background: var(--bg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(14, 16, 15, 0.4); }
  .menu-btn, .topbar-logo { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 8px; }
  .content { padding: 22px 16px 56px; gap: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-crumb { display: none; }
  .gsearch { max-width: none; }
  .gsearch-key { display: none; }
  .span-2 { grid-column: auto; }
  .form-section { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .hide-sm { display: none !important; }
  .search { max-width: none; flex-basis: 100%; }
  .kanban { grid-template-columns: repeat(4, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .item-desc { grid-column: 1 / -1; }
  .item-head { display: none; }
  .invoice-doc { padding: 24px 20px; }
  .gantt-legend { margin-left: 0; }
  /* tabel menjadi kartu di layar kecil */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-size: var(--fs-xs); font-weight: 500; color: var(--muted); text-align: left; flex: none; }
  .table-cards td.td-main { display: block; text-align: left; padding-bottom: 8px; }
  .table-cards td.td-main::before { display: none; }
  .table-cards td.r { text-align: right; }
  .table-cards .row-actions { justify-content: flex-end; }
  .table-cards tfoot { display: block; }
  .table-cards tfoot tr { display: flex; justify-content: space-between; }
  .table-cards tfoot td { width: auto; }
}
@media (max-width: 560px) {
  .form-section-body { grid-template-columns: 1fr; }
  .login-features { grid-template-columns: 1fr; }
  .login-features li:nth-child(odd) { border-right: 0; }
  .login-features li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .list-item .w-prog { width: 90px; }
  .stat { padding: 16px; }
  .stat-value { font-size: 1.25rem; }
}

/* ---------- cetak ---------- */
@media print {
  .sidebar, .topbar, .no-print, .toasts, .content-glow, .page-head .page-actions, .back-link { display: none !important; }
  body.app { display: block; background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
  .invoice-doc { max-width: none; padding: 0; }
}
.inline-form:has(.btn-block) { display: flex; }
a.text-link, .text-link { color: var(--brand-text); }
a.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- notulen meeting ---------- */
.b-meeting-done { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.b-meeting-recording { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.b-meeting-recording .dot { animation: rec-pulse 1.4s ease-in-out infinite; }
.b-meeting-processing, .b-meeting-summarizing { background: var(--brand-tint); color: var(--brand-text); border-color: transparent; }
.b-meeting-failed { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
@keyframes rec-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .b-meeting-recording .dot { animation: none; } }

.mt-icon { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--brand-tint); color: var(--brand-text); }
.date-range { display: inline-flex; align-items: center; gap: 6px; }
.date-range input { width: 150px; }

.meeting-progress { display: grid; gap: 14px; }
.minutes-summary { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); }
.minutes-list { list-style: none; margin: 0; padding: 8px 0; }
.minutes-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 22px; line-height: 1.5; }
.minutes-list .icon { flex: none; margin-top: 3px; }
.minutes-topics { display: grid; gap: 18px; }
.minutes-topics h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.minutes-topics ul { list-style: disc; margin: 0; padding-left: 20px; display: grid; gap: 4px; line-height: 1.55; color: var(--ink-soft); }
.minutes-topics li::marker { color: var(--brand); }

.transcript > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.transcript > summary::-webkit-details-marker { display: none; }
.transcript > summary:hover { color: var(--brand-text); }
.transcript > summary .icon { transform: rotate(-90deg); transition: transform 160ms ease; }
.transcript[open] > summary .icon { transform: none; }
.transcript-list { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--line); max-height: 640px; overflow-y: auto; }
.transcript-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 22px; }
.transcript-list li + li { border-top: 1px solid var(--line); }
.transcript-list time { color: var(--muted); padding-top: 2px; }
.transcript-list strong { display: block; font-size: 13px; font-weight: 600; color: var(--brand-text); margin-bottom: 2px; }
.transcript-list p { margin: 0; line-height: 1.55; }

textarea.mono-input { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.file-input { height: auto; padding: 10px 12px; cursor: pointer; }
.file-input::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
code.cmd { display: block; margin: 8px 0 4px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; overflow-x: auto; white-space: nowrap; color: var(--ink); }
.mono-plain { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.alert.full { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .date-range { width: 100%; }
  .date-range input { flex: 1; width: auto; }
  .transcript-list li { grid-template-columns: 52px minmax(0, 1fr); padding: 10px 16px; }
  .minutes-list li { padding: 8px 16px; }
}
.wa-form { display: grid; gap: 14px; max-width: 560px; margin-bottom: 12px; }
.wa-status { display: grid; gap: 10px; justify-items: start; }

/* ---------- buat jadwal dengan AI ---------- */
.ai-table input, .ai-table select { height: 34px; font-size: 13px; padding: 0 8px; min-width: 0; }
.ai-table td:nth-child(2) input { min-width: 220px; }
.ai-table td:nth-child(3) select, .ai-table td:nth-child(4) select { min-width: 110px; }
.ai-table td:nth-child(8) select { min-width: 150px; max-width: 200px; }
.ai-table input[type="date"] { min-width: 132px; }
.ai-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 22px; border-top: 1px solid var(--line); }
.ai-total { margin-left: auto; font-size: 13.5px; font-weight: 600; }
.ai-project { border-bottom: 1px solid var(--line); }
@media (max-width: 960px) { .ai-project { grid-template-columns: 1fr !important; } }
