/* ==========================================================================
   Vinzz Tasking: design system
   Tema terang dan gelap lewat atribut data-theme pada <html> (diatur theme.js).
   ========================================================================== */

:root {
  color-scheme: light;
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #F4F5F8;
  --bg-glow: radial-gradient(1100px 480px at 88% -12%, rgba(99, 102, 241, .08), transparent 62%);
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --surface-3: #F1F3F6;
  --hover: #F2F4F7;
  --active: #EAECF0;
  --border: #E5E7EC;
  --border-2: #D3D8E0;
  --text: #101828;
  --text-2: #475467;
  --text-3: #8F99AB;

  --accent: #5B5BF6;
  --accent-2: #8B5CF6;
  --accent-hover: #4B4BE6;
  --accent-soft: rgba(91, 91, 246, .1);
  --accent-text: #4343D8;
  --on-accent: #FFFFFF;

  --success: #12B76A; --success-soft: rgba(18, 183, 106, .12); --success-text: #067647;
  --warning: #F79009; --warning-soft: rgba(247, 144, 9, .13); --warning-text: #B54708;
  --danger: #F04438;  --danger-soft: rgba(240, 68, 56, .1);   --danger-text: #C4320A;
  --info: #0BA5EC;    --info-soft: rgba(11, 165, 236, .12);   --info-text: #026AA2;
  --violet: #9E77ED;  --violet-soft: rgba(158, 119, 237, .14); --violet-text: #6941C6;
  --neutral-soft: rgba(102, 112, 133, .12); --neutral-text: #475467;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 10px 20px -6px rgba(16, 24, 40, .1), 0 2px 6px -2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .2), 0 8px 16px -8px rgba(16, 24, 40, .08);
  --ring: 0 0 0 4px rgba(91, 91, 246, .16);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --sidebar-w: 268px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --g-line: #EEF0F4;
  --g-line-strong: #E0E3EA;
  --g-weekend: rgba(16, 24, 40, .028);
  --g-hover: rgba(91, 91, 246, .055);
  --g-group: rgba(16, 24, 40, .022);
  --g-link: #A3ABBB;
  --track-mix: 24%;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090D;
  --bg-glow: radial-gradient(1000px 520px at 82% -14%, rgba(124, 124, 255, .13), transparent 62%), radial-gradient(700px 420px at -8% 108%, rgba(168, 85, 247, .06), transparent 60%);
  --surface: #0F1117;
  --surface-2: #12141B;
  --surface-3: #181B23;
  --hover: #171A22;
  --active: #1F232D;
  --border: #1E222B;
  --border-2: #2B303B;
  --text: #ECEEF3;
  --text-2: #A2A9B7;
  --text-3: #687082;

  --accent: #7B7BFF;
  --accent-2: #A78BFA;
  --accent-hover: #8D8DFF;
  --accent-soft: rgba(123, 123, 255, .15);
  --accent-text: #ABABFF;

  --success: #2ED47A; --success-soft: rgba(46, 212, 122, .13); --success-text: #5BE49B;
  --warning: #FDB022; --warning-soft: rgba(253, 176, 34, .13); --warning-text: #FEC84B;
  --danger: #F97066;  --danger-soft: rgba(249, 112, 102, .13); --danger-text: #FDA29B;
  --info: #36BFFA;    --info-soft: rgba(54, 191, 250, .13);    --info-text: #7CD4FD;
  --violet: #B692F6;  --violet-soft: rgba(182, 146, 246, .14); --violet-text: #D6BBFB;
  --neutral-soft: rgba(162, 169, 183, .13); --neutral-text: #B9BFCB;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, .55), 0 2px 6px -2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 56px -12px rgba(0, 0, 0, .7), 0 8px 16px -8px rgba(0, 0, 0, .45);
  --ring: 0 0 0 4px rgba(123, 123, 255, .22);

  --g-line: #171A21;
  --g-line-strong: #222631;
  --g-weekend: rgba(255, 255, 255, .02);
  --g-hover: rgba(123, 123, 255, .07);
  --g-group: rgba(255, 255, 255, .018);
  --g-link: #4B5263;
  --track-mix: 28%;
}

/* ------------------------------------------------------------------ Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { letter-spacing: -.02em; line-height: 1.25; font-weight: 700; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
code { font-family: var(--mono); font-size: .9em; padding: .1em .4em; border-radius: 5px; background: var(--surface-3); }
pre { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; fill: currentColor; flex: none; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block; flex: none; opacity: .8;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* ------------------------------------------------------------------ Buttons */

.btn {
  --btn-h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 14px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; white-space: nowrap; letter-spacing: -.005em;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
  position: relative; user-select: none;
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary {
  color: var(--on-accent); border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(16, 24, 40, .12), 0 0 0 1px color-mix(in srgb, var(--accent) 80%, #000);
}
:root[data-theme="dark"] .btn-primary { background: linear-gradient(180deg, #7676FF, #5F5FF2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px #5353E0, 0 6px 16px -6px rgba(99, 99, 255, .6); }
.btn-primary:hover { background: var(--accent-hover); }
:root[data-theme="dark"] .btn-primary:hover { background: linear-gradient(180deg, #8282FF, #6A6AF7); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { color: #fff; border-color: transparent; background: var(--danger); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 24, 40, .1); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.btn-danger-ghost { color: var(--danger-text); background: transparent; border-color: transparent; box-shadow: none; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { --btn-h: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { --btn-h: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-danger).is-loading::after { border-color: var(--text-2); border-right-color: transparent; }

.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none;
  border-radius: 9px; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.sm .icon { width: 16px; height: 16px; }
.icon-btn.is-active { background: var(--accent-soft); color: var(--accent-text); }
.icon-btn.bordered { border: 1px solid var(--border-2); background: var(--surface); box-shadow: var(--shadow-xs); }
.icon-btn.bordered:hover { background: var(--hover); }

.theme-toggle .icon { display: none; }
:root[data-theme-pref="light"] .theme-toggle .when-light,
:root[data-theme-pref="dark"] .theme-toggle .when-dark,
:root[data-theme-pref="system"] .theme-toggle .when-system,
:root:not([data-theme-pref]) .theme-toggle .when-system { display: block; }

/* ------------------------------------------------------------------ Forms */

.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.grid-2-tight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-label small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.field-hint { font-size: 12.5px; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none; font-size: 14px;
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea { background: var(--surface-2); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--border-2) 60%, var(--text-3)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238F99AB'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 14px;
}
input[type="date"].input { padding-right: 8px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

.input-wrap { position: relative; display: block; }
.input-wrap.has-icon > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; height: 17px; pointer-events: none; }
.input-wrap.has-icon .input { padding-left: 38px; }
.input-wrap.has-action .input { padding-right: 42px; }
.input-action { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; display: grid; place-items: center; color: var(--text-3); border-radius: 7px; }
.input-action:hover { color: var(--text); background: var(--hover); }
.input-action .icon { width: 17px; height: 17px; }
.input-wrap.has-icon:focus-within > .icon { color: var(--accent); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text-2); }
.check input, .check-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-2); background: var(--surface);
  display: grid; place-items: center; flex: none; transition: all .15s; color: transparent;
}
.check-box .icon { width: 12px; height: 12px; }
.check input:checked + .check-box, .check-card input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check input:focus-visible + .check-box, .check-card input:focus-visible + .check-box { box-shadow: var(--ring); }
.check-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; cursor: pointer; position: relative;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); transition: border-color .15s, background .15s;
}
.check-card:hover { border-color: var(--border-2); }
.check-card:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-soft); }
.check-card .check-box { margin-top: 1px; }
.check-card strong { display: block; font-size: 13.5px; font-weight: 600; }
.check-card small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 38px; height: 22px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .2s; flex: none; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 11px; border: 1px solid var(--border); }
.seg button, .seg a {
  height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.seg .icon { width: 16px; height: 16px; }
.seg button:hover, .seg a:hover { color: var(--text); }
.seg .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .seg .is-active { background: var(--active); }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 12.5px; }

/* Pilihan warna */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { width: 28px; height: 28px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s; }
.swatch span .icon { width: 14px; height: 14px; opacity: 0; transition: opacity .15s; }
.swatch:hover span { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch input:checked + span .icon { opacity: 1; }
.swatch input:focus-visible + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

/* Kartu pilihan (radio) */
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.rc-body {
  display: grid; gap: 4px; padding: 12px 14px; height: 100%;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.rc-body .rc-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.rc-body .rc-title .icon { width: 18px; height: 18px; color: var(--text-2); }
.rc-body small { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.radio-card:hover .rc-body { border-color: var(--border-2); }
.radio-card input:checked + .rc-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.radio-card input:checked + .rc-body .rc-title .icon { color: var(--accent-text); }
.radio-card input:focus-visible + .rc-body { box-shadow: var(--ring); }

/* Slider progres */
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row output { min-width: 46px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--v, 0%), var(--surface-3) var(--v, 0%)); outline: none; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: var(--shadow-sm); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }

/* ------------------------------------------------------------------ Surfaces */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head.bordered { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-title .icon { color: var(--text-3); }
.card-sub { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.card-link .icon { width: 15px; height: 15px; transition: transform .15s; }
.card-link:hover .icon { transform: translateX(2px); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--neutral-soft); color: var(--neutral-text);
}
.badge .icon { width: 14px; height: 14px; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.sm { height: 21px; padding: 0 7px; font-size: 11.5px; gap: 5px; }
.b-success { background: var(--success-soft); color: var(--success-text); }
.b-warning { background: var(--warning-soft); color: var(--warning-text); }
.b-danger { background: var(--danger-soft); color: var(--danger-text); }
.b-info { background: var(--info-soft); color: var(--info-text); }
.b-accent { background: var(--accent-soft); color: var(--accent-text); }
.b-violet { background: var(--violet-soft); color: var(--violet-text); }
.b-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-2); color: var(--text-2); }

.stage-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 4px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); font-size: 12.5px; font-weight: 600; max-width: 100%;
}
.stage-chip > .stage-ic { width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.stage-chip > .stage-ic .icon { width: 12px; height: 12px; }
.stage-chip .truncate { min-width: 0; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.45; }
.alert .icon { margin-top: 1px; }
.alert-danger { background: var(--danger-soft); color: var(--danger-text); }
.alert-success { background: var(--success-soft); color: var(--success-text); }
.alert-info { background: var(--info-soft); color: var(--info-text); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); }

.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; min-width: 40px; }
:root[data-theme="dark"] .progress { background: var(--active); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); transition: width .5s var(--ease); }
.progress.lg { height: 8px; }
.progress-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.progress-row b { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--surface-3); }
:root[data-theme="dark"] .ring .ring-track { stroke: var(--active); }
.ring .ring-bar { stroke: var(--c, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.ring b { position: absolute; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring.lg b { font-size: 15px; }

.avatar {
  --av: #6366F1;
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .01em;
  background: linear-gradient(135deg, color-mix(in srgb, var(--av) 80%, #fff), var(--av));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

.color-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }

.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 10px; }
.empty-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 6px;
  background: var(--accent-soft); color: var(--accent-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty h1, .empty h3 { font-size: 17px; }
.empty h1 { font-size: 22px; }
.empty p { color: var(--text-2); max-width: 440px; }
.empty .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--hover), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tabel */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3);
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.is-link { cursor: pointer; }
.table tbody tr.is-link:hover { background: var(--surface-2); }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }

/* Menu dropdown */
.menu {
  position: fixed; z-index: 120; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: pop .14s var(--ease);
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text); text-align: left;
}
.menu-item .icon { width: 17px; height: 17px; color: var(--text-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item.danger { color: var(--danger-text); }
.menu-item.danger .icon { color: currentColor; }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* Modal */
dialog.modal {
  border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  background: var(--surface); color: var(--text); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
dialog.modal:not([open]) { display: none; }
dialog.modal > form { display: contents; }
dialog.modal[open] { animation: pop .2s var(--ease); }
dialog.modal.lg { width: min(720px, calc(100vw - 24px)); }
dialog.modal.sm { width: min(420px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(9, 11, 18, .48); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 4px; }
.modal-head .modal-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.modal-head .modal-ic .icon { width: 22px; height: 22px; }
.modal-head .modal-ic.danger { background: var(--danger-soft); color: var(--danger-text); }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.modal-head .icon-btn { margin: -4px -6px 0 auto; }
.modal-body { padding: 18px 22px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-foot .spacer { flex: 1; }
.modal-error { margin-bottom: 14px; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 12px; min-width: 240px; max-width: 380px;
  background: var(--text); color: var(--bg); border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 500; pointer-events: none; animation: pop .2s var(--ease);
}
:root[data-theme="dark"] .toast { background: #20232D; color: var(--text); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-2); }
.toast .icon { width: 19px; height: 19px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all .2s; }

/* ------------------------------------------------------------------ App shell */

.app-page { background: var(--bg); }
.shell {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, var(--sb-bg) calc(var(--sidebar-w) - 1px), var(--border) 0 var(--sidebar-w), transparent 0);
}
:root { --sb-bg: var(--surface); }
:root[data-theme="dark"] { --sb-bg: #0B0C11; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px 12px; border-right: 1px solid var(--border); background: var(--surface); z-index: 60;
}
:root[data-theme="dark"] .sidebar { background: #0B0C11; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.sb-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(109, 106, 254, .35)); }
.sb-brand-text { display: grid; min-width: 0; line-height: 1.2; }
.sb-brand-text b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.sb-brand-text small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-close { display: none; }
.sb-nav { display: grid; gap: 2px; }
.sb-nav a {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: background .15s, color .15s;
}
.sb-nav a .icon { width: 19px; height: 19px; }
.sb-nav a:hover { background: var(--hover); color: var(--text); }
.sb-nav a.is-active { background: var(--accent-soft); color: var(--accent-text); }
.sb-nav a.is-active .icon { color: var(--accent); }
.sb-count { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--text-3); background: var(--surface-3); padding: 1px 7px; border-radius: 99px; }
.sb-nav a.is-active .sb-count { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.sb-section { margin-top: 14px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sb-section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 10px; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.sb-projects { overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1px; padding-bottom: 8px; scrollbar-width: thin; }
.sb-projects a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--text-2);
}
.sb-projects a:hover { background: var(--hover); color: var(--text); }
.sb-projects a.is-active { background: var(--hover); color: var(--text); font-weight: 600; }
.sb-projects a .sb-pct { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sb-projects .sb-empty { padding: 8px 10px; color: var(--text-3); font-size: 12.5px; }
.sb-foot { border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 6px; }
.sb-public { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.sb-public:hover { background: var(--hover); color: var(--text); }
.sb-public .sb-ext { margin-left: auto; width: 15px; height: 15px; color: var(--text-3); }
.sb-user { display: flex; align-items: center; gap: 2px; }
.sb-user form { margin: 0; }
.sb-user-btn { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 10px; text-align: left; }
.sb-user-btn:hover { background: var(--hover); }
.sb-user-text { display: grid; min-width: 0; line-height: 1.25; }
.sb-user-text b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-text small { font-size: 11.5px; color: var(--text-3); }
.sb-overlay { display: none; }

.main { min-width: 0; background-image: var(--bg-glow); background-repeat: no-repeat; }
.topbar { display: none; }
.view { padding: 28px 32px 48px; max-width: 1600px; margin: 0 auto; animation: fade-up .25s var(--ease); }
.boot-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); padding: 120px 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; flex-wrap: wrap; }
.ph-main { min-width: 0; flex: 1 1 320px; }
.ph-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 8px; font-weight: 500; }
.ph-crumbs a:hover { color: var(--text); }
.ph-crumbs .icon { width: 13px; height: 13px; }
.ph-title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 12px; }
.ph-sub { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.ph-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; margin-bottom: -1px;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s;
}
.tab .icon { width: 17px; height: 17px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tab .tab-count { font-size: 11.5px; color: var(--text-3); background: var(--surface-3); border-radius: 99px; padding: 0 7px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; flex: 0 1 300px; min-width: 200px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 36px; height: 38px; }

.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
.stack { display: grid; gap: 20px; }

/* ------------------------------------------------------------------ Dashboard */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { padding: 18px 18px 16px; display: grid; gap: 14px; align-content: start; position: relative; overflow: hidden; }
.kpi::after {
  content: ''; position: absolute; inset: auto -40px -60px auto; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%); pointer-events: none;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent);
}
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }

.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--border); min-width: 0; transition: background .12s; }
.list-item:first-child { border-top: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
button.list-item { width: 100%; text-align: left; }
.li-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.li-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-meta { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; min-width: 0; flex-wrap: wrap; }
.li-meta .icon { width: 14px; height: 14px; }

.date-block {
  width: 46px; height: 50px; border-radius: 12px; display: grid; place-content: center; text-align: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--border); line-height: 1.05;
}
.date-block b { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.date-block small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-3); letter-spacing: .05em; }
.date-block.is-late { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.date-block.is-late small { color: currentColor; opacity: .8; }
.date-block.is-today { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

.ms-diamond { width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: var(--c); flex: none; }

.activity { display: grid; padding: 6px 20px 14px; }
.act-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.act-item:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 38px; bottom: -8px; width: 1.5px; background: var(--border); }
.act-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.act-text b { color: var(--text); font-weight: 600; }
.act-project { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.act-time { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.lifecycle { display: grid; gap: 14px; }
.lc-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.lc-bar span { background: var(--c); min-width: 6px; }
.lc-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.lc-legend div { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.lc-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Website cards */

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard {
  position: relative; display: grid; gap: 16px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent)); }
.pcard:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard-top { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.proj-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c)); color: #fff;
  font-weight: 800; font-size: 15px; letter-spacing: -.02em; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--c) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.proj-avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.proj-avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.pcard-name { min-width: 0; flex: 1; display: grid; gap: 2px; }
.pcard-name h3 { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-name span { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vis-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.vis-icon .icon { width: 15px; height: 15px; }
.vis-icon.is-public { color: var(--success-text); background: var(--success-soft); border-color: transparent; }
.vis-icon.is-unlisted { color: var(--info-text); background: var(--info-soft); border-color: transparent; }
.pcard-mid { display: grid; gap: 10px; }
.pcard-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-2); min-width: 0; }
.pcard-foot .icon { width: 15px; height: 15px; }
.meta-inline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pcard-new {
  display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 220px; border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-lg); color: var(--text-2); font-weight: 600; transition: border-color .15s, color .15s, background .15s;
}
.pcard-new:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pcard-new .empty-icon { margin: 0; width: 48px; height: 48px; border-radius: 14px; }
.pcard-new .empty-icon .icon { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ Detail website */

.proj-head { display: flex; gap: 16px; align-items: center; min-width: 0; }
.proj-head-text { min-width: 0; display: grid; gap: 6px; }
.proj-meta { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.proj-meta a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-text); font-weight: 600; }
.proj-meta a:hover { text-decoration: underline; }
.proj-meta .icon { width: 15px; height: 15px; }
.proj-meta > span { display: inline-flex; align-items: center; gap: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; background: var(--border); }
.stat { padding: 16px 18px; display: flex; align-items: center; gap: 14px; min-width: 0; background: var(--surface); }
.stat-text { min-width: 0; display: grid; gap: 3px; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { font-size: 12.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }

.stepper { display: flex; overflow-x: auto; padding: 18px 20px 16px; gap: 0; scrollbar-width: thin; }
.step { flex: 1 0 128px; display: grid; justify-items: center; text-align: center; gap: 6px; position: relative; padding: 0 6px; }
.step::before {
  content: ''; position: absolute; top: 19px; right: 50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.step:first-child::before { display: none; }
.step.is-done::before, .step.is-active::before, .step.is-late::before { background: linear-gradient(90deg, var(--prev, var(--c)), var(--c)); }
.step-node {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border: 2px solid var(--border-2); color: var(--text-3); transition: transform .15s;
}
.step-node .icon { width: 19px; height: 19px; }
.step.is-done .step-node { background: var(--c); border-color: var(--c); color: #fff; }
.step.is-active .step-node { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); animation: pulse-ring 1.8s infinite; }
.step.is-late .step-node { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.step button.step-node:hover { transform: scale(1.06); }
.step-label { font-size: 13px; font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-date { font-size: 12px; color: var(--text-3); }
.step-pct { font-size: 11.5px; font-weight: 700; color: var(--text-2); }

.gantt-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gantt-toolbar .spacer { flex: 1; }
.legend { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 8px; border-radius: 3px; background: var(--c); display: inline-block; }
.legend i.lg-ms { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; }
.legend i.lg-today { width: 2px; height: 12px; background: var(--danger); border-radius: 1px; }
.legend i.lg-dep { width: 18px; height: 2px; background: var(--g-link); border-radius: 0; }

.task-table .t-title { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.task-table .t-title button { text-align: left; font-weight: 600; }
.task-table .t-title button:hover { color: var(--accent-text); }
.task-table .phase-row td { background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }
.task-table .phase-row .ph-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-table .phase-row .ph-name { font-weight: 700; font-size: 14px; }
.task-table tr.is-done .t-title button { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.task-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.task-check:hover { border-color: var(--success); }
.task-check.is-on { background: var(--success); border-color: var(--success); color: #fff; }
.task-check .icon { width: 13px; height: 13px; }
.row-actions { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .15s; }
tr:hover .row-actions, .row-actions:focus-within { opacity: 1; }
.add-row td { padding: 8px 16px; }
.add-row button { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-weight: 600; font-size: 13px; padding: 4px 6px; border-radius: 7px; }
.add-row button:hover { color: var(--accent-text); background: var(--accent-soft); }
.add-row .icon { width: 15px; height: 15px; }

.dep-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; display: grid; gap: 1px; }
.dep-list .check { width: 100%; padding: 7px 8px; border-radius: 7px; color: var(--text); }
.dep-list .check:hover { background: var(--hover); }
.dep-list .dep-phase { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 8px 8px 4px; }
.dep-list .dep-empty { padding: 10px; color: var(--text-3); font-size: 13px; }

.stage-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.stage-picker label { position: relative; cursor: pointer; }
.stage-picker input { position: absolute; opacity: 0; pointer-events: none; }
.stage-picker span {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; transition: all .15s; height: 100%;
}
.stage-picker span i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); flex: none; }
.stage-picker span i .icon { width: 14px; height: 14px; }
.stage-picker label:hover span { border-color: var(--border-2); }
.stage-picker input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); box-shadow: 0 0 0 1px var(--c); }
.stage-picker input:focus-visible + span { box-shadow: var(--ring); }

.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick label { position: relative; cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick .badge { height: 30px; padding: 0 12px; font-size: 12.5px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s, opacity .15s; opacity: .62; }
.chip-pick label:hover .badge { opacity: .9; }
.chip-pick input:checked + .badge { opacity: 1; box-shadow: inset 0 0 0 1.5px currentColor; }
.chip-pick input:focus-visible + .badge { box-shadow: var(--ring); }
.link-btn { color: var(--accent-text); font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.t-proj { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.share-link { display: flex; gap: 8px; }
.share-link .input { font-family: var(--mono); font-size: 12.5px; }
.info-list { display: grid; gap: 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.info-list > div:first-child { border-top: 0; }
.info-list dt { color: var(--text-2); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; }

/* ------------------------------------------------------------------ Gantt */

.gantt {
  --row-h: 40px; --head-h: 58px; --side-w: 300px;
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); overflow: hidden; isolation: isolate;
}
.gantt-wrap { min-width: 0; }
.gantt-wrap.is-full {
  position: fixed; inset: 12px; z-index: 150; display: flex; flex-direction: column; padding: 14px 16px 10px;
  background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}
.gantt-wrap.is-full .gantt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gantt-wrap.is-full .g-scroll, .gantt.is-full .g-scroll { max-height: none; flex: 1; }
.gantt-wrap.is-full .field-hint { display: none; }
.gantt.is-full { position: fixed; inset: 12px; z-index: 150; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
body.has-full-gantt { overflow: hidden; }
body.has-full-gantt::after { content: ''; position: fixed; inset: 0; background: rgba(9, 11, 18, .5); z-index: 140; backdrop-filter: blur(2px); }
.g-scroll { overflow: auto; max-height: var(--gantt-h, 68vh); position: relative; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.g-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.g-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; border: 3px solid var(--surface); }
.g-scroll::-webkit-scrollbar-corner { background: var(--surface); }
.g-grid { display: grid; grid-template-columns: var(--side-w) var(--chart-w); grid-template-rows: var(--head-h) auto; width: max-content; min-width: 100%; }

.g-corner {
  position: sticky; top: 0; left: 0; z-index: 6; background: var(--surface);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 0 12px 9px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3);
}
.g-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); height: var(--head-h); }
.g-htop, .g-hbot { position: relative; }
.g-htop { height: 26px; border-bottom: 1px solid var(--g-line); }
.g-hbot { height: calc(var(--head-h) - 27px); }
.g-hcell { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--g-line); display: flex; align-items: center; overflow: hidden; }
.g-htop .g-hcell { border-left-color: var(--g-line-strong); }
.g-htop .g-hcell span {
  position: sticky; left: calc(var(--side-w) + 10px); padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap;
}
.g-hbot .g-hcell { justify-content: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; flex-direction: column; line-height: 1.1; gap: 2px; }
.g-hbot .g-hcell small { font-size: 9.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.g-hbot .g-hcell.is-weekend { color: var(--text-3); background: var(--g-weekend); }
.g-hbot .g-hcell.is-today { color: var(--danger-text); font-weight: 700; background: color-mix(in srgb, var(--danger) 7%, transparent); }
.g-hbot .g-hcell.is-today b { background: var(--danger); color: #fff; border-radius: 6px; padding: 1px 5px; }
.g-hbot .g-hcell.is-today small { color: var(--danger-text); }
.g-hbot .g-hcell b { font-weight: 700; }

.g-side { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--border); }
.g-resize { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: col-resize; z-index: 7; }
.g-resize::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.g-resize:hover::after, .g-resize.is-active::after { background: var(--accent); }
.g-srow {
  height: var(--row-h); display: flex; align-items: center; gap: 8px; padding: 0 10px 0 calc(8px + var(--depth, 0) * 20px);
  border-bottom: 1px solid var(--g-line); min-width: 0; transition: background .1s;
}
.g-srow.is-group { background: var(--g-group); }
.g-srow.is-hover { background: var(--g-hover); }
.g-caret { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--text-3); flex: none; transition: transform .15s, background .15s; }
.g-caret:hover { background: var(--hover); color: var(--text); }
.g-caret .icon { width: 13px; height: 13px; }
.g-caret.is-collapsed { transform: rotate(-90deg); }
.g-caret-sp { width: 22px; flex: none; }
.g-sicon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.g-sicon .icon { width: 13px; height: 13px; }
.g-sicon.is-proj { background: var(--c); color: #fff; font-size: 10px; font-weight: 800; }
.g-sicon.is-task::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.g-sicon.is-ms { background: transparent; }
.g-sicon.is-ms::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }
.g-sname { flex: 1; min-width: 0; display: grid; text-align: left; line-height: 1.25; }
.g-sname b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-srow.is-group .g-sname b { font-weight: 700; }
.g-srow.d0.is-group .g-sname b { font-size: 13.5px; }
.g-sname small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.g-sname:hover b { color: var(--accent-text); }
.g-spct { font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.g-spct.is-done { color: var(--success-text); }
.g-sadd { opacity: 0; }
.g-srow:hover .g-sadd, .g-sadd:focus-visible { opacity: 1; }
.g-srow.is-done .g-sname b { color: var(--text-2); }

.g-chart { position: relative; }
.g-bg { position: absolute; inset: 0; pointer-events: none; }
.g-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--g-line); }
.g-vline.is-major { background: var(--g-line-strong); }
.g-weekend { position: absolute; top: 0; bottom: 0; background: var(--g-weekend); }
.g-rowbg { position: absolute; left: 0; right: 0; height: var(--row-h); border-bottom: 1px solid var(--g-line); transition: background .1s; }
.g-rowbg.is-group { background: var(--g-group); }
.g-rowbg.is-hover { background: var(--g-hover); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--danger); z-index: 3; pointer-events: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent); }
.g-today::before { content: ''; position: absolute; top: -1px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.g-links { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.g-links path { fill: none; stroke: var(--g-link); stroke-width: 1.5; transition: stroke .15s, opacity .15s; }
.g-links path.is-hl { stroke: var(--accent); stroke-width: 2; }
.g-links .g-arrow { fill: var(--g-link); }
.g-links .g-arrow-hl { fill: var(--accent); }

.g-bar {
  position: absolute; z-index: 2; border-radius: 7px; height: 22px; margin-top: -11px;
  background: color-mix(in srgb, var(--c) var(--track-mix), var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
  transition: box-shadow .15s, filter .15s; touch-action: auto;
}
.g-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.g-bar.is-full .g-fill { right: 0; }
.g-task.is-late { box-shadow: inset 0 0 0 1.5px var(--danger); }
.g-task .g-check { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #fff; opacity: .95; }
.g-phase { height: 14px; margin-top: -7px; border-radius: 5px; }
.g-phase::before, .g-phase::after {
  content: ''; position: absolute; bottom: -5px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--c);
}
.g-phase::before { left: 0; border-left-width: 0; }
.g-phase::after { right: 0; border-right-width: 0; }
.g-proj { height: 20px; margin-top: -10px; border-radius: 6px; background: transparent; box-shadow: none; overflow: hidden; display: flex; }
.g-seg { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--c) var(--track-mix), var(--surface)); overflow: hidden; }
.g-seg + .g-seg { border-left: 2px solid var(--surface); }
.g-seg .g-fill { border-radius: 0; }

.g-editable .g-bar.is-editable { cursor: grab; }
.g-editable .g-bar.is-editable:hover { filter: brightness(1.04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent), 0 4px 12px -4px color-mix(in srgb, var(--c) 60%, transparent); }
.g-bar.is-dragging { cursor: grabbing !important; z-index: 8; box-shadow: 0 0 0 2px var(--accent), 0 10px 22px -6px rgba(0, 0, 0, .35) !important; }
.g-bar:not(.is-editable), .g-ms:not(.is-editable) { cursor: pointer; }
.g-h { position: absolute; top: -3px; bottom: -3px; width: 10px; cursor: ew-resize; z-index: 3; display: none; }
.g-h::after { content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 12px; margin: -6px 0 0 -2px; border-radius: 2px; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, #000 10%); }
.g-h-l { left: -5px; }
.g-h-r { right: -5px; }
.g-editable .g-bar.is-editable:hover .g-h, .g-bar.is-dragging .g-h { display: block; }
.g-phase .g-h { top: -6px; bottom: -6px; }

.g-ms {
  position: absolute; z-index: 2; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg);
  border-radius: 3px; background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--c); transition: transform .15s;
}
.g-ms.is-done { background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 2px 8px -2px color-mix(in srgb, var(--c) 70%, transparent); }
.g-ms.is-late { box-shadow: inset 0 0 0 2.5px var(--danger); }
.g-ms:hover { transform: rotate(45deg) scale(1.15); }
.g-editable .g-ms.is-editable { cursor: grab; }

.g-label {
  position: absolute; z-index: 2; margin-top: -9px; height: 18px; line-height: 18px; white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.g-label b { font-weight: 700; color: var(--text); }
.g-label.is-group { font-weight: 700; color: var(--text); }
.g-label .g-lpct { color: var(--text-3); font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.g-label.is-late .g-lpct { color: var(--danger-text); }

.g-tip, .g-dragtip {
  position: fixed; z-index: 160; pointer-events: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 12.5px;
}
.g-tip { width: 260px; padding: 12px 14px; display: grid; gap: 8px; animation: pop .12s var(--ease); }
.g-tip-head { display: flex; align-items: flex-start; gap: 9px; }
.g-tip-head i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-top: 4px; flex: none; }
.g-tip-head i.ms { transform: rotate(45deg); border-radius: 2px; }
.g-tip-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.g-tip-sub { color: var(--text-3); font-size: 12px; }
.g-tip dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; }
.g-tip dt { color: var(--text-3); }
.g-tip dd { margin: 0; text-align: right; font-weight: 600; }
.g-dragtip { padding: 6px 10px; font-weight: 600; white-space: nowrap; background: var(--text); color: var(--bg); border: 0; }
:root[data-theme="dark"] .g-dragtip { background: #262A35; color: var(--text); }

.g-empty { padding: 56px 20px; }

/* ------------------------------------------------------------------ Timeline (vertikal) */

.tl { display: grid; gap: 28px; }
.tl-proj { display: grid; gap: 18px; }
.tl-proj-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.tl-proj-head .tl-ph-text { flex: 1; min-width: 200px; display: grid; gap: 3px; }
.tl-proj-head h3 { font-size: 16px; }
.tl-proj-head .tl-ph-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-phase { --c: var(--accent); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 16px; position: relative; padding-bottom: 22px; }
.tl-phase::before {
  content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px;
  background: var(--border);
}
.tl-phase.is-done::before { background: color-mix(in srgb, var(--c) 70%, transparent); }
.tl-phase.is-active::before { background: linear-gradient(180deg, var(--c), var(--border)); }
.tl-phase:last-child { padding-bottom: 0; }
.tl-phase:last-child::before { bottom: 12px; }
.tl-node {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border: 2px solid var(--border-2); color: var(--text-3);
}
.tl-node .icon { width: 21px; height: 21px; }
.tl-phase.is-done .tl-node { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 18px -8px var(--c); }
.tl-phase.is-active .tl-node { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); animation: pulse-ring 1.8s infinite; }
.tl-phase.is-late .tl-node { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.tl-card { padding: 16px 18px; display: grid; gap: 12px; margin-bottom: 4px; }
.tl-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-stage { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.tl-card h4 { font-size: 16px; margin-top: 3px; }
.tl-card h4 button { text-align: left; }
.tl-card h4 button:hover { color: var(--accent-text); }
.tl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 12.5px; }
.tl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tl-meta .icon { width: 15px; height: 15px; }
.tl-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.tl-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.tl-item:last-child { border-bottom: 0; padding-bottom: 0; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--surface); justify-self: center; }
.tl-item.is-done .tl-dot { background: var(--c); border-color: var(--c); }
.tl-item.is-active .tl-dot { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.tl-item.is-late .tl-dot { border-color: var(--danger); background: var(--danger-soft); }
.tl-item.is-ms .tl-dot { border-radius: 2px; transform: rotate(45deg); width: 11px; height: 11px; }
.tl-item-main { min-width: 0; display: grid; gap: 2px; }
.tl-item-title { font-weight: 600; font-size: 13.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.tl-item-title:hover { color: var(--accent-text); }
.tl-item.is-done .tl-item-title { color: var(--text-2); }
.tl-item-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.tl-item-side { display: flex; align-items: center; gap: 10px; }
.tl-item-side .progress { width: 64px; flex: none; }
.tl-today {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--danger-text); font-size: 12px; font-weight: 700; list-style: none;
}
.tl-today::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); margin-left: 6px; flex: none; }
.tl-today::after { content: ''; flex: 1; height: 1.5px; background: linear-gradient(90deg, var(--danger), transparent); opacity: .6; }
.tl-gap-today { margin: -6px 0 16px 10px; }

/* ------------------------------------------------------------------ Auth (masuk & setup) */

.auth-page { min-height: 100vh; }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 36px; padding: 40px 48px; color: #E9EAF4;
  background:
    radial-gradient(700px 420px at 15% 0%, rgba(124, 92, 255, .45), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, rgba(56, 189, 248, .22), transparent 60%),
    linear-gradient(160deg, #0E0F1A, #090A12 60%);
}
.auth-art::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 30%, #000 20%, transparent 75%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; position: relative; }
.auth-copy { position: relative; display: grid; gap: 14px; max-width: 520px; margin-top: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow .icon { width: 16px; height: 16px; }
.auth-art .eyebrow { color: #B4B2FF; }
.auth-copy h2 { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.035em; color: #fff; }
.auth-copy p { color: #A7AAC0; font-size: 15px; }
.auth-preview {
  --ap-label: 118px;
  position: relative; border-radius: 18px; padding: 16px 18px 18px; margin-bottom: auto;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.ap-head { display: grid; grid-template-columns: repeat(4, 1fr); margin-left: var(--ap-label); font-size: 11px; font-weight: 700; color: #8D90AA; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.ap-body { position: relative; }
.ap-row { display: grid; grid-template-columns: var(--ap-label) 1fr; align-items: center; height: 36px; border-bottom: 1px solid rgba(255, 255, 255, .05); animation: fade-up .5s var(--ease) both; animation-delay: var(--d); }
.ap-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #C9CBE0; white-space: nowrap; }
.ap-label i { width: 8px; height: 8px; border-radius: 3px; }
.ap-track { position: relative; height: 100%; }
.ap-bar { position: absolute; top: 50%; height: 16px; margin-top: -8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 30%, #12131D); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); overflow: hidden; }
.ap-bar s { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c)); animation: grow 1.2s var(--ease) both .4s; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.ap-ms { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--c); }
.ap-today { position: absolute; top: -10px; bottom: 0; width: 2px; background: #F97066; box-shadow: 0 0 12px rgba(249, 112, 102, .6); }
.auth-foot { position: relative; color: #6F7390; font-size: 12.5px; }

.auth-main { position: relative; display: grid; place-items: center; padding: 40px 24px; background-image: var(--bg-glow); }
.auth-top { position: absolute; top: 18px; right: 18px; }
.auth-card { width: min(460px, 100%); display: grid; gap: 22px; animation: fade-up .35s var(--ease); }
.auth-card-head { display: grid; gap: 8px; }
.auth-card-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
.auth-card-head p { color: var(--text-2); font-size: 14.5px; }
.auth-step { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.auth-step .icon { width: 15px; height: 15px; }
.auth-alt { display: flex; justify-content: center; padding-top: 4px; }
.auth-alt a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.auth-alt a:hover { color: var(--accent-text); }
.auth-alt .icon { width: 17px; height: 17px; }
.db-chip { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.db-chip .icon { color: var(--accent-text); }
.db-chip .muted { font-size: 12px; flex-basis: 100%; padding-left: 28px; }
.db-help { display: grid; gap: 12px; font-size: 13.5px; color: var(--text-2); }

/* ------------------------------------------------------------------ Halaman publik */

.public-page { background: var(--bg); background-image: var(--bg-glow); background-repeat: no-repeat; min-height: 100vh; display: flex; flex-direction: column; }
.pub-top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.pub-top-inner { max-width: 1440px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pub-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; min-width: 0; }
.pub-brand .logo-mark { width: 32px; height: 32px; }
.pub-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-top-actions { display: flex; align-items: center; gap: 10px; }
.pub-updated { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.pub-updated .icon { width: 15px; height: 15px; color: var(--text-3); }
.pub-main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 40px 28px 56px; display: grid; gap: 24px; align-content: start; }
.pub-hero { display: grid; gap: 12px; justify-items: start; animation: fade-up .4s var(--ease); }
.pub-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; max-width: 900px; }
.pub-hero p { color: var(--text-2); font-size: 16px; max-width: 720px; }
.pub-site { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--accent-text); font-size: 14px; }
.pub-site .icon { width: 16px; height: 16px; }
.pub-site:hover { text-decoration: underline; }
.pub-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; width: 100%; margin-top: 12px; }
.pub-stat { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.pub-stat .kpi-icon { width: 38px; height: 38px; border-radius: 11px; }
.pub-stat .kpi-icon .icon { width: 20px; height: 20px; }
.pub-stat b { font-size: 20px; font-weight: 800; letter-spacing: -.03em; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pub-stat span { font-size: 12.5px; color: var(--text-2); }
.pub-stat .stat-text { min-width: 0; }
.pub-stat .stat-text b.sm { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-controls { display: grid; gap: 14px; position: sticky; top: 57px; z-index: 20; padding: 12px 0; margin: -12px 0; background: linear-gradient(var(--bg) 80%, transparent); }
.pub-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pub-projects { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pub-projects::-webkit-scrollbar { display: none; }
.pub-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 10px; border-radius: 99px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-xs);
  transition: border-color .15s, color .15s, background .15s;
}
.pub-chip:hover { color: var(--text); border-color: var(--border-2); }
.pub-chip.is-active { color: var(--text); border-color: var(--c, var(--accent)); box-shadow: 0 0 0 1px var(--c, var(--accent)); }
.pub-chip .pc-pct { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pub-chip .icon { width: 16px; height: 16px; }
.pub-view { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-content { animation: fade-up .3s var(--ease); min-width: 0; }
.pub-empty { margin-top: 8px; }
.pub-foot { max-width: 1440px; width: 100%; margin: 0 auto; padding: 22px 28px 32px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; border-top: 1px solid var(--border); }
.pub-foot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border-2); }
.pub-notfound { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* ------------------------------------------------------------------ Responsif */

@media (max-width: 1180px) {
  .grid-3-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform .25s var(--ease); box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sb-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(9, 11, 18, .45); backdrop-filter: blur(2px); }
  .sb-close { display: inline-grid; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 58px; padding: 0 12px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border);
  }
  .topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
  .topbar-brand .logo-mark { width: 28px; height: 28px; }
  .view { padding: 20px 16px 40px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .ph-title { font-size: 22px; }
  .page-head { margin-bottom: 18px; }
  .ph-actions { width: 100%; }
  .ph-actions .btn { flex: 1; }
  .ph-actions .icon-btn { flex: none; }
  .form-grid, .grid-2-tight { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi-value { font-size: 24px; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 10px; }
  .kpi-icon .icon { width: 19px; height: 19px; }
  .card-head { padding: 14px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .list-item { padding: 12px 16px; }
  .activity { padding: 4px 16px 12px; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 14px; gap: 10px; }
  .stat .kpi-icon { display: none; }
  .stat:last-child:nth-child(odd), .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .g-corner span + span { display: none; }
  .g-srow { padding-left: calc(6px + var(--depth, 0) * 10px); gap: 6px; }
  .g-srow:not(.is-group) .g-sicon { display: none; }
  .g-caret-sp { width: 8px; }
  .hide-sm { display: none; }
  .gantt-toolbar { gap: 8px; }

  .gantt { --side-w: 158px; --row-h: 38px; }
  .g-spct { display: none; }
  .g-sname small { display: none; }
  .gantt-toolbar .seg { order: 3; width: 100%; justify-content: space-between; }
  .gantt-toolbar .seg button { flex: 1; justify-content: center; }
  .search { flex: 1 1 100%; }
  .modal-body { padding: 16px 18px; }
  .modal-head { padding: 18px 18px 4px; }
  .modal-foot { padding: 12px 18px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
  .toast { max-width: none; }
  .tl-phase { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .tl-phase::before { left: 17px; top: 36px; }
  .tl-node { width: 36px; height: 36px; border-radius: 11px; }
  .tl-node .icon { width: 18px; height: 18px; }
  .tl-card { padding: 14px; }
  .tl-item { grid-template-columns: 18px minmax(0, 1fr); }
  .tl-item-side { grid-column: 2; }
  .pub-top-inner { padding: 10px 16px; }
  .pub-main { padding: 24px 16px 40px; gap: 18px; }
  .pub-updated span { display: none; }
  .pub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pub-stat { padding: 12px; gap: 10px; }
  .pub-stat .kpi-icon { display: none; }
  .pub-controls { top: 53px; }
  .pub-foot { padding: 18px 16px 28px; }
  .table td, .table th { padding-left: 12px; padding-right: 12px; }
  .auth-main { padding: 72px 18px 32px; place-items: start center; }
  .auth-card-head h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .pub-top, .pub-controls, .gantt-toolbar, .ph-actions { display: none !important; }
  .shell { display: block; }
  .g-scroll { max-height: none !important; overflow: visible; }
}
