/* Bahasa visual mengikuti referensi medical landing (MYDNA): hijau tua
   bergradien, permukaan lembut kehijauan, sudut besar, tombol pill. */
:root {
  color-scheme: light dark;
  --bg: #f1f5f3;
  --panel: #ffffff;
  --panel-2: #f7faf8;
  --line: #e1e8e4;
  --ink: #0f1f18;
  --muted: #62716a;
  --accent: #0a7c42;
  --accent-ink: #ffffff;
  --mint: #d8f3e6;
  --danger: #b3261e;
  --warn: #a8620a;
  --agent: #5b4bd6;
  --chip: #eef3f0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 40, 28, .04), 0 8px 24px -8px rgba(10, 40, 28, .10);
  --shadow-lg: 0 24px 60px -20px rgba(4, 41, 31, .35);
  --grad: linear-gradient(152deg, #04291f 0%, #075c36 45%, #0e9a6c 100%);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1512;
    --panel: #141e1a;
    --panel-2: #18241f;
    --line: #25332d;
    --ink: #e7efeb;
    --muted: #93a39b;
    --accent: #3ccf85;
    --accent-ink: #04291f;
    --mint: #133427;
    --danger: #f28b82;
    --warn: #e0a458;
    --agent: #a49bf5;
    --chip: #1c2924;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
}
body.locked { overflow: hidden; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", monospace; font-size: .92em; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.015em; }

/* ---- form dasar (dipakai login & app) ---- */
label { display: block; font-size: .78rem; font-weight: 600; margin: .85rem 0 .35rem; color: var(--ink); }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .8rem; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
select:disabled, input:disabled { opacity: .6; }
button {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.5rem; padding: .5rem 1.05rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, filter .15s;
}
button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
button.primary:hover:not(:disabled) { filter: brightness(1.07); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
button.danger:not(.ghost) { background: color-mix(in srgb, var(--danger) 8%, var(--panel)); }
button.ghost { background: transparent; border-color: transparent; }
button.sm { min-height: 2.1rem; padding: .35rem .8rem; font-size: .8rem; }
.i { width: 1.1em; height: 1.1em; flex: none; }

/* ---- login ---- */
/* Dua panel: kiri panel brand (gradien + blob), kanan form.
   Di bawah 900px panel brand menyusut jadi pita header. */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  padding: 3.2rem 3.4rem;
  color: #f2fbf6;
  background: linear-gradient(152deg, #04291f 0%, #075c36 42%, #0e9a6c 100%);
}
/* dua blob lembut supaya gradiennya tidak rata mati */
.auth-visual::before,
.auth-visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.auth-visual::before {
  width: 26rem; height: 26rem; top: -8rem; right: -6rem;
  background: radial-gradient(circle, rgba(120,255,206,.5), transparent 68%);
}
.auth-visual::after {
  width: 22rem; height: 22rem; bottom: -7rem; left: -5rem;
  background: radial-gradient(circle, rgba(83,214,255,.34), transparent 70%);
}
.auth-visual > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.01em; }
.brand .mark {
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border-radius: .7rem; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(6px);
}
.brand .mark svg { width: 1.15rem; height: 1.15rem; }
.brand small { display: block; font-weight: 500; font-size: .72rem; opacity: .7; letter-spacing: .02em; }

.pitch { margin-top: auto; max-width: 30rem; }
.pitch .eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.pitch h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.12; letter-spacing: -.025em; margin: 1rem 0 .8rem; font-weight: 800;
}
.pitch p { margin: 0; font-size: .95rem; line-height: 1.6; color: rgba(242,251,246,.78); }

.flow { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: 1.6rem; }
.flow span {
  font-size: .73rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); white-space: nowrap;
}
.flow span.hot { background: rgba(120,255,206,.2); border-color: rgba(120,255,206,.45); }
.flow i { opacity: .5; font-style: normal; font-size: .8rem; }

.points { display: grid; gap: .9rem; margin-top: 2.2rem; }
.point { display: flex; gap: .75rem; align-items: flex-start; }
.point svg { width: 1.05rem; height: 1.05rem; flex: none; margin-top: .18rem; opacity: .85; }
.point b { display: block; font-size: .87rem; font-weight: 650; }
.point span { font-size: .8rem; color: rgba(242,251,246,.68); line-height: 1.5; }

/* --- sisi form --- */
.auth-form {
  display: grid; place-items: center; padding: 2.5rem 1.5rem;
  background: var(--panel);
}
.auth-card { width: 100%; max-width: 23.5rem; }
.auth-card .badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 600; color: var(--accent);
  padding: .28rem .65rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.auth-card h1 { font-size: 1.65rem; letter-spacing: -.02em; margin: 1rem 0 .3rem; font-weight: 750; }
.auth-card p.sub { margin: 0 0 1.6rem; color: var(--muted); font-size: .87rem; }
.auth-card label { font-weight: 600; color: var(--ink); font-size: .78rem; margin: 0 0 .35rem; }
.auth-card input[type=text], .auth-card input[type=password] {
  padding: .75rem .85rem; border-radius: 10px; margin-bottom: 1rem;
  background: var(--bg); transition: border-color .15s, box-shadow .15s;
}
.auth-card input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field { position: relative; }
.field .peek {
  position: absolute; right: .45rem; top: 1.72rem;
  border: 0; background: none; color: var(--muted);
  padding: .35rem .5rem; font-size: .74rem; font-weight: 600;
}
.field .peek:hover { color: var(--ink); }
.auth-card button.primary {
  width: 100%; border-radius: 999px; padding: .75rem;
  font-weight: 650; letter-spacing: .01em;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.auth-card button.primary:hover:not(:disabled) { filter: brightness(1.06); }
.auth-card .foot {
  margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .77rem; line-height: 1.6;
}
.auth-card .foot code {
  background: var(--chip); border: 1px solid var(--line);
  padding: .05rem .3rem; border-radius: 5px; font-size: .74rem;
}
.hint-caps { display: none; color: var(--warn); font-size: .75rem; margin: -.7rem 0 .9rem; }
.hint-caps.show { display: block; }
.error {
  display: none;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--danger); border-radius: 9px;
  padding: .55rem .75rem; font-size: .82rem; margin-bottom: 1rem;
}
.error.show { display: block; animation: nudge .3s; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { padding: 1.8rem 1.5rem; gap: 1.2rem; }
  .auth-visual .points, .auth-visual .flow { display: none; }
  .pitch { margin-top: 0; }
  .pitch h2 { font-size: 1.5rem; margin: .7rem 0 .4rem; }
  .pitch p { font-size: .85rem; }
  .auth-form { padding: 2rem 1.25rem 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .error.show { animation: none; }
}


/* ======================================================================
   APP
   ====================================================================== */
.shell { min-height: 100vh; display: grid; grid-template-columns: 16.5rem 1fr; }

/* ---- sidebar: panel brand hijau, sama dengan login ---- */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.4rem;
  padding: 1.5rem 1rem 1.2rem; color: #f2fbf6; background: var(--grad);
  isolation: isolate;
}
.side::before {
  content: ''; position: absolute; z-index: -1; width: 18rem; height: 18rem; top: -6rem; right: -8rem;
  border-radius: 50%; filter: blur(60px); background: radial-gradient(circle, rgba(120,255,206,.35), transparent 70%);
  pointer-events: none;
}
.side .brand { text-decoration: none; padding: 0 .5rem; }
.nav { display: grid; gap: .25rem; }
.nav a, .nav button {
  display: flex; align-items: center; gap: .7rem; width: 100%; justify-content: flex-start;
  padding: .65rem .8rem; border-radius: 14px; border: 0; background: transparent;
  color: rgba(242,251,246,.78); text-decoration: none; font-weight: 600; font-size: .88rem; min-height: 0;
}
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.08); color: #fff; border: 0; }
.nav a.on { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.nav em { margin-left: auto; font-style: normal; font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: rgba(255,255,255,.14); }
.nav .i { width: 1.15rem; height: 1.15rem; }

.runner-card {
  margin-top: auto; padding: .9rem; border-radius: 16px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px);
  font-size: .8rem;
}
.rc-head { display: flex; align-items: center; gap: .5rem; font-weight: 650; }
.rc-head b { margin-left: auto; font-size: .78rem; padding: .05rem .5rem; border-radius: 999px; background: rgba(255,255,255,.14); }
.runner-card p { margin: .5rem 0 0; color: rgba(242,251,246,.65); }
.runner-card ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.runner-card li { display: flex; gap: .5rem; align-items: flex-start; line-height: 1.35; }
.runner-card small { color: rgba(242,251,246,.65); }
.side-foot { display: flex; align-items: center; gap: .5rem; padding: 0 .3rem; font-size: .78rem; color: rgba(242,251,246,.7); }
.side-foot .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { color: #fff; }
.side-foot button:hover { background: rgba(255,255,255,.1); }

.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot.on { background: #52e3a0; box-shadow: 0 0 0 3px rgba(82,227,160,.25); }
.dot.off { background: #f0b45b; }

/* ---- main ---- */
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.75rem; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.top .brand.compact { display: none; }
.top-title { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.top p { margin: .1rem 0 0; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runner-pill { display: none; }
.top-actions { display: flex; gap: .5rem; }
.view { padding: 0 1.75rem 3rem; min-width: 0; }

/* ---- hero board ---- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center;
  padding: 1.6rem 1.8rem; border-radius: 24px; color: #f2fbf6; background: var(--grad);
  box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero::before { width: 22rem; height: 22rem; top: -9rem; right: 10%; background: radial-gradient(circle, rgba(120,255,206,.45), transparent 68%); }
.hero::after { width: 16rem; height: 16rem; bottom: -8rem; left: -4rem; background: radial-gradient(circle, rgba(83,214,255,.3), transparent 70%); }
.hero .eyebrow {
  display: inline-flex; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .28rem .7rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.hero h2 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 800; line-height: 1.2; margin: .7rem 0 .45rem; }
.hero p { margin: 0; font-size: .87rem; color: rgba(242,251,246,.78); max-width: 38rem; }
.hero p b { color: #fff; }
.hero-team { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.member {
  display: flex; align-items: center; gap: .55rem; text-decoration: none;
  padding: .4rem .8rem .4rem .4rem; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px);
  font-size: .78rem; line-height: 1.2;
}
.member small { display: block; color: rgba(242,251,246,.65); font-size: .7rem; }
.member.busy { background: rgba(120,255,206,.2); border-color: rgba(120,255,206,.5); }
.member.busy .av { animation: ring-light 1.6s infinite; }
@keyframes ring-light { 0%, 100% { box-shadow: 0 0 0 2px rgba(82,227,160,.9); } 50% { box-shadow: 0 0 0 5px rgba(82,227,160,.2); } }

/* ---- avatar ---- */
.av {
  --c: #0e9a6c;
  width: 2rem; height: 2rem; flex: none; display: inline-grid; place-items: center;
  border-radius: 50%; font-size: .7rem; font-weight: 750; letter-spacing: .02em;
  color: #fff; background: var(--c);
  background-image: linear-gradient(145deg, rgba(255,255,255,.22), transparent 60%);
  box-shadow: 0 0 0 2px var(--panel);
}
.av.xs { width: 1.45rem; height: 1.45rem; font-size: .56rem; }
.av.sm { width: 1.75rem; height: 1.75rem; font-size: .62rem; }
.av.lg { width: 3rem; height: 3rem; font-size: .95rem; border-radius: 16px; }
.hero .av, .side .av, .member .av { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.crew { display: inline-flex; align-items: center; }
.crew .av + .av { margin-left: -.35rem; }
.crew .av.rev { outline: 2px dashed color-mix(in srgb, var(--c) 70%, transparent); outline-offset: 1px; }
.crew-sep { display: inline-flex; color: var(--muted); margin: 0 .2rem; }
.crew-sep .i { width: .8rem; height: .8rem; }

/* ---- tab kolom (mobile) ---- */
.col-tabs { display: none; }

/* ---- board ---- */
.board {
  display: grid; gap: .9rem; margin-top: 1.25rem;
  grid-template-columns: repeat(5, minmax(13rem, 1fr)); align-items: start;
  overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x proximity;
}
.col {
  background: color-mix(in srgb, var(--panel) 55%, transparent); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; min-height: 9rem; scroll-snap-align: start;
}
.col.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.col > h2 {
  font-size: .8rem; font-weight: 700; margin: 0; padding: .9rem 1rem .6rem;
  display: flex; align-items: center; gap: .5rem;
}
.col > h2 .n { margin-left: auto; background: var(--chip); border-radius: 999px; padding: .05rem .5rem; font-size: .72rem; color: var(--muted); }
.cdot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--muted); }
.cdot.todo { background: #8a9a92; }
.cdot.in_progress { background: var(--agent); }
.cdot.in_review { background: #e67700; }
.cdot.finish { background: var(--accent); }
.cdot.archive { background: #adb5b0; }
.col .stack { display: flex; flex-direction: column; gap: .6rem; padding: 0 .6rem .7rem; }
.col .hint { color: var(--muted); font-size: .78rem; padding: 0 1rem 1rem; margin: 0; }

.task {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: .8rem .85rem; cursor: pointer; display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.task:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.task.dragging { opacity: .45; }
.task.running { border-color: color-mix(in srgb, var(--agent) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--agent) 14%, transparent), var(--shadow); }
.task .t { font-size: .9rem; font-weight: 650; line-height: 1.35; }
.task-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .7rem; color: var(--muted); }
.task-top .proj { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem; padding-top: .45rem; border-top: 1px dashed var(--line); }
.task-foot > .chips { justify-content: flex-end; min-width: 0; }

.chips { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .68rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px;
  background: var(--chip); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.chip .i { width: .8rem; height: .8rem; }
.chip.agentic { color: var(--agent); background: color-mix(in srgb, var(--agent) 9%, var(--panel)); border-color: color-mix(in srgb, var(--agent) 30%, transparent); }
.chip.ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.chip.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--panel)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.chip.live { color: var(--agent); background: color-mix(in srgb, var(--agent) 9%, var(--panel)); border-color: color-mix(in srgb, var(--agent) 40%, transparent); }
.chip.live::before { content: ''; width: .4rem; height: .4rem; border-radius: 50%; background: var(--agent); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---- halaman agent ---- */
.explain {
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 1.2rem 1.4rem; border-radius: var(--radius); background: var(--mint);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.explain h3 { margin: 0 0 .3rem; font-size: .95rem; }
.explain p { margin: 0; font-size: .84rem; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); max-width: 46rem; }
.flow-mini { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: .72rem; font-weight: 650; color: var(--muted); }
.flow-mini span { padding: .3rem .65rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.flow-mini span.hot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.flow-mini .i { width: .85rem; height: .85rem; }

.agent-grid, .project-grid { display: grid; gap: 1rem; margin-top: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); }
.agent-card, .project-card {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: .7rem; align-items: stretch;
  padding: 1.15rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer; overflow: hidden; transition: transform .12s, border-color .12s;
  font-weight: 400; font-size: .85rem; min-height: 0;
}
.agent-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.agent-card:hover, .project-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.agent-card.off { opacity: .6; }
.ac-head, .pc-head { display: flex; gap: .8rem; align-items: flex-start; }
.ac-head h3, .pc-head h3 { margin: 0 0 .25rem; font-size: 1rem; }
.agent-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.role { display: inline-flex; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 999px; background: var(--chip); color: var(--muted); margin-right: .25rem; }
.role.worker { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); }
.role.reviewer { background: color-mix(in srgb, #e67700 14%, var(--panel)); color: #b85f00; }
.order { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--chip); padding: .15rem .45rem; border-radius: 8px; }
.ac-foot { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line); font-size: .72rem; color: var(--muted); }
.ac-foot span { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-card.add, .project-card.add {
  align-items: center; justify-content: center; text-align: center; gap: .35rem; min-height: 12rem;
  background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted); border-radius: var(--radius);
}
.agent-card.add::before { display: none; }
.agent-card.add .i, .project-card.add .i { width: 1.8rem; height: 1.8rem; padding: .35rem; border-radius: 50%; background: var(--mint); color: var(--accent); box-sizing: content-box; }
.agent-card.add b, .project-card.add b { color: var(--ink); font-size: .92rem; }
.agent-card.add span, .project-card.add span { font-size: .78rem; }

/* ---- halaman project ---- */
.pc-icon { width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--mint); color: var(--accent); }
.pc-icon.lg { width: 3rem; height: 3rem; border-radius: 16px; }
.pc-icon .i { width: 1.25rem; height: 1.25rem; }
.pc-head code { font-size: .72rem; color: var(--muted); word-break: break-all; }
.pc-git { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .8rem; min-height: 1.6rem; }
.pc-git code { color: var(--muted); font-size: .75rem; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding-top: .7rem; border-top: 1px dashed var(--line); font-size: .72rem; color: var(--muted); }
.pc-stats b { display: block; font-size: 1.1rem; color: var(--ink); font-weight: 750; }

/* ---- drawer & modal ---- */
.scrim {
  position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end;
  background: rgba(4, 24, 17, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .15s ease-out;
}
.scrim.center { align-items: center; justify-content: center; padding: 1rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
@keyframes rise { from { transform: translateY(16px); opacity: .6; } }
.drawer {
  width: min(44rem, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); padding: 1.4rem 1.6rem 3rem; box-shadow: var(--shadow-lg);
  border-radius: 24px 0 0 24px; animation: slide .18s ease-out;
}
.drawer.wide { width: min(52rem, 100%); }
.modal {
  width: min(36rem, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-radius: 24px; padding: 1.4rem 1.5rem; box-shadow: var(--shadow-lg);
  animation: rise .18s ease-out;
}
.drawer-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .6rem; }
.drawer-head h2 { margin: .35rem 0 .15rem; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.modal .drawer-head h2 { margin-top: 0; }
.muted { color: var(--muted); font-size: .82rem; margin: 0; }
.muted .i { vertical-align: -.15em; }
.small { font-size: .76rem; }
.grow { flex: 1; min-width: 0; }
.icon-btn { width: 2.5rem; height: 2.5rem; padding: 0; flex: none; background: var(--chip); border-color: transparent; }
.status-pill { display: inline-flex; font-size: .68rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: var(--chip); color: var(--muted); }
.status-pill.in_progress { background: color-mix(in srgb, var(--agent) 13%, var(--panel)); color: var(--agent); }
.status-pill.in_review { background: color-mix(in srgb, #e67700 14%, var(--panel)); color: #b85f00; }
.status-pill.finish { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); color: var(--accent); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .9rem 0 .3rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 .8rem; }
.section { margin-top: 1.5rem; }
.section > h3, .fold summary h3, .sub-h {
  display: flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 .6rem;
}
.sub-h { margin-top: 1.4rem; }
.fold summary { cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary h3::after { content: '+'; margin-left: auto; font-size: 1rem; }
.fold[open] summary h3::after { content: '−'; }
.alert {
  margin-top: 1rem; padding: .75rem .9rem; border-radius: var(--radius-sm); font-size: .82rem; white-space: pre-wrap; word-break: break-word;
  background: color-mix(in srgb, var(--danger) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger);
}

/* pipeline */
.steps { display: flex; align-items: flex-start; overflow-x: auto; padding: .3rem .1rem .6rem; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; min-width: 5.8rem; flex: none; }
.step b { font-size: .8rem; }
.step small { font-size: .68rem; color: var(--muted); }
.step .av { width: 2.6rem; height: 2.6rem; font-size: .8rem; }
.step.wait .av { filter: grayscale(1); opacity: .45; }
.step.live .av { animation: ring-agent 1.6s infinite; }
@keyframes ring-agent { 0%, 100% { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--agent); } 50% { box-shadow: 0 0 0 3px var(--panel), 0 0 0 9px color-mix(in srgb, var(--agent) 25%, transparent); } }
.step.done .av { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent); }
.step.fail .av { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--danger); }
.step.live small { color: var(--agent); font-weight: 650; }
.step.fail small { color: var(--danger); font-weight: 650; }
.step-sep { flex: 1 0 1.5rem; height: 2px; margin-top: 1.3rem; background: var(--line); border-radius: 2px; }
.step-sep.on { background: var(--accent); }

.verdict { display: flex; gap: .7rem; align-items: center; padding: .7rem .85rem; border-radius: var(--radius-sm); margin-bottom: .6rem; border: 1px solid var(--line); }
.verdict b { display: block; font-size: .86rem; }
.verdict small { color: var(--muted); font-size: .74rem; }
.verdict.ok { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.verdict.warn { background: color-mix(in srgb, var(--warn) 8%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

.result-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .75rem .85rem; font-size: .84rem; white-space: pre-wrap; word-break: break-word; max-height: 20rem; overflow-y: auto;
}
.plan-preview { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .7rem .85rem; border-radius: var(--radius-sm); background: var(--mint); font-size: .8rem; min-height: 3rem; }

.git-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; }
.git-card .row { margin-top: .6rem; }
.git-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .82rem; }
.git-row code { word-break: break-all; }
.commits { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .1rem; }
.commits li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .5rem; font-size: .78rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.commits li:first-child { border-top: 0; }
.commits li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commits small { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.commits code { color: var(--accent); }
.commits li > .i { color: var(--muted); }
.diffstat, .diff {
  margin: .7rem 0 0; padding: .7rem; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  font-size: .72rem; line-height: 1.5; overflow: auto; max-height: 28rem; white-space: pre;
}
.diff .add { color: #0a7c42; background: color-mix(in srgb, #0a7c42 9%, transparent); display: inline-block; min-width: 100%; }
.diff .del { color: #b3261e; background: color-mix(in srgb, #b3261e 8%, transparent); display: inline-block; min-width: 100%; }
.diff .hunk { color: var(--agent); }
.diff .file { font-weight: 700; color: var(--ink); }
.diff .h { color: var(--muted); }
@media (prefers-color-scheme: dark) { .diff .add { color: #5fe0a0; } .diff .del { color: #ff9a92; } }

.pipe { margin-bottom: .8rem; }
.pipe-head { font-size: .72rem; font-weight: 650; color: var(--muted); margin-bottom: .35rem; }
.run-item {
  display: flex; gap: .55rem; align-items: center; width: 100%; justify-content: flex-start; text-align: left;
  font-size: .8rem; font-weight: 500; padding: .45rem .6rem; border-radius: 12px; min-height: 0;
  border: 1px solid var(--line); background: var(--panel-2); margin-bottom: .3rem;
}
.run-item small { color: var(--muted); }
.run-item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 15%, transparent); }
.run-item.static { cursor: default; align-items: flex-start; }
.err-text { color: var(--danger); font-size: .78rem; white-space: pre-wrap; word-break: break-word; }

.suggest { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }
.chip-btn { min-height: 1.9rem; padding: .2rem .7rem; font-size: .74rem; font-weight: 600; background: var(--panel-2); color: var(--muted); }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.mini-tasks { display: grid; gap: .35rem; }
.mini-tasks button { justify-content: flex-start; border-radius: 12px; font-weight: 550; text-align: left; gap: .6rem; }

.seg { display: flex; padding: .2rem; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 2.15rem; border: 0; background: transparent; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.swatches button { width: 2.1rem; height: 2.1rem; min-height: 0; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.swatches button.on { box-shadow: 0 0 0 2px var(--c); }
.toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .85rem; cursor: pointer; min-height: 2.6rem; margin: .5rem 0; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.toggle span::after { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(1.1rem); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.skills-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.skills-head label { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .35rem; }
textarea.skills { min-height: 24rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.6; tab-size: 2; }
.sticky-foot { position: sticky; bottom: -3rem; background: var(--panel); padding: .8rem 0 .2rem; margin-bottom: -.2rem; }
.mobile-only { display: none; }

/* ---- log ---- */
.log {
  background: #0c1713; color: #d6e5dd; border-radius: var(--radius-sm);
  padding: .75rem .85rem; max-height: 26rem; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; line-height: 1.55;
}
.log .ev { padding: .2rem 0; border-bottom: 1px solid rgba(255,255,255,.06); word-break: break-word; }
.log .ev:last-child { border-bottom: 0; }
.log .k { color: #8aa197; }
.log .tool { color: #b5acff; font-weight: 600; }
.log .say { white-space: pre-wrap; }
.log .err { color: #ff9a92; white-space: pre-wrap; }
.log .res { color: #6ee3a8; white-space: pre-wrap; }
.log .empty { color: #8aa197; }
.empty { color: var(--muted); font-size: .82rem; padding: .4rem 0; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; transform: translate(-50%, 1rem);
  max-width: min(32rem, calc(100vw - 2rem)); padding: .7rem 1.1rem; border-radius: 14px;
  background: #0f2a20; color: #eafff4; font-size: .84rem; font-weight: 550; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #5a1410; color: #ffe9e7; }
.tabbar { display: none; }

/* ======================================================================
   TABLET & MOBILE
   ====================================================================== */
@media (max-width: 1023px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: .75rem 1rem; gap: .65rem; padding-top: max(.75rem, env(safe-area-inset-top)); }
  .top .brand.compact { display: flex; color: #fff; }
  .top .brand.compact .mark { background: var(--grad); border: 0; width: 2.3rem; height: 2.3rem; border-radius: 12px; }
  .top h1 { font-size: 1.15rem; }
  .runner-pill {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 700;
    padding: .35rem .65rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  }
  .runner-pill .dot.on { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  .view { padding: 0 1rem calc(6rem + env(safe-area-inset-bottom)); }

  .hero { grid-template-columns: 1fr; padding: 1.2rem; gap: 1rem; border-radius: 20px; }
  .hero p { display: none; }
  .hero h2 { font-size: 1.15rem; margin-top: .55rem; }
  .hero-team { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.2rem; padding: 0 1.2rem .2rem; scrollbar-width: none; }
  .hero-team::-webkit-scrollbar { display: none; }
  .member { flex: none; }

  /* satu kolom selebar layar, geser horizontal; tab di atas untuk lompat */
  .col-tabs {
    display: flex; gap: .4rem; overflow-x: auto; margin: 1rem -1rem 0; padding: 0 1rem .15rem;
    scrollbar-width: none; position: sticky; top: 3.9rem; z-index: 5;
  }
  .col-tabs::-webkit-scrollbar { display: none; }
  .col-tabs button { flex: none; min-height: 2.4rem; font-size: .8rem; background: var(--panel); }
  .col-tabs button em { font-style: normal; font-size: .7rem; padding: 0 .4rem; border-radius: 999px; background: var(--chip); color: var(--muted); }
  .col-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .col-tabs button.on em { background: rgba(255,255,255,.2); color: inherit; }
  .board {
    display: flex; gap: .75rem; margin: .8rem -1rem 0; padding: 0 1rem .5rem;
    scroll-snap-type: x mandatory; scroll-padding: 0 1rem; scrollbar-width: none;
  }
  .board::-webkit-scrollbar { display: none; }
  .col { flex: 0 0 calc(100vw - 2rem); max-width: 30rem; scroll-snap-align: start; min-height: 55vh; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    min-height: 3.1rem; padding: .2rem; border: 0; background: transparent; border-radius: 14px;
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 650;
  }
  .tabbar em { display: none; }
  .tabbar .i { width: 1.35rem; height: 1.35rem; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on .i { background: var(--mint); border-radius: 999px; padding: .15rem .9rem; box-sizing: content-box; }

  .drawer, .drawer.wide { width: 100%; border-radius: 0; padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); padding-top: max(1rem, env(safe-area-inset-top)); animation: rise .2s ease-out; }
  .scrim.center { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); }
  .agent-grid, .project-grid { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }
  .toast { bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .top-actions button span { display: none; }
  .top-actions button { width: 2.6rem; padding: 0; }
  .top p { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .actions button { flex: 1 1 auto; }
  .explain { padding: 1rem; }
  .commits li { grid-template-columns: auto auto 1fr; }
  .commits li small { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
