/* =========================================================
   Kantor AI — tema gelap premium
   ========================================================= */
:root {
  --bg: #090b11;
  --bg2: #0d1018;
  --panel: #12161f;
  --panel2: #171c27;
  --panel3: #1d2330;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --text: #e8ebf2;
  --muted: #8a93a6;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4f8bff 50%, #22d3ee 100%);
  --ok: #22c55e;
  --warn: #f59e0b;
  --orange: #fb923c;
  --err: #ef4444;
  --gold: #f5c542;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .25);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --topbar-h: 62px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { scrollbar-gutter: stable; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 92, 255, .12), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(34, 211, 238, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(124, 92, 255, .35); }
a { color: var(--accent2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.err-text, .danger-text { color: #f87171 !important; }
.gold-text { color: var(--gold); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .09); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .16); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Buttons & inputs ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--panel3); color: var(--text); cursor: pointer; font-weight: 550; font-size: 13px;
  transition: background .18s var(--ease), border-color .18s, transform .12s, box-shadow .18s, opacity .18s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: #252c3b; border-color: rgba(255, 255, 255, .18); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -8px rgba(124, 92, 255, .7); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 24px -8px rgba(124, 92, 255, .9); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.btn.danger { background: rgba(239, 68, 68, .15); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.btn.danger:hover { background: rgba(239, 68, 68, .25); }
.btn.gold { background: linear-gradient(135deg, #f5c542, #e0a21b); color: #1a1405; border-color: transparent; }
.btn.gold:hover { filter: brightness(1.07); }
.btn.warn { background: rgba(251, 146, 60, .16); border-color: rgba(251, 146, 60, .5); color: #fdba74; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; color: var(--accent2); cursor: pointer; padding: 0; text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line2); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 14px; border-radius: 7px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line2);
  border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(124, 92, 255, .7); box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); background-color: #0f131c; }
textarea { resize: vertical; min-height: 40px; line-height: 1.5; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 12.5px; }
textarea.playbook { min-height: 280px; }
select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }
input[type=range] { padding: 0; accent-color: var(--accent); background: transparent; border: 0; box-shadow: none; }
input[type=color] { padding: 2px; width: 44px; height: 36px; cursor: pointer; flex: none; }
input[type=file] { padding: 7px; font-size: 12px; }

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  background: rgba(9, 11, 17, .78); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: -2px; }
.tabs { display: flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; transition: all .18s var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--panel3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2), 0 4px 14px -6px rgba(124, 92, 255, .6); }
.biz-select { position: relative; display: flex; align-items: center; --c: var(--accent); }
.biz-select .biz-dot { position: absolute; left: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); pointer-events: none; }
.biz-select select { padding: 7px 30px 7px 28px; min-width: 170px; max-width: 240px; background-color: var(--panel); font-weight: 600; font-size: 13px; }
.stats { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 4px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
.stat b { color: var(--text); }
.stat i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.stat.ok i { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.6s infinite; }
.stat.warn i { background: var(--warn); }
.stat.err i { background: var(--err); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.live.on i { background: var(--ok); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: ring 2s infinite; }
.inbox-btn { position: relative; width: 38px; height: 38px; }
.inbox-btn.has-items { color: var(--gold); border-color: rgba(245, 197, 66, .4); }
.badge-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.badge-count.warn { background: var(--orange); }
.owner-btn { --c: var(--gold); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 2px solid var(--c); background: radial-gradient(circle at 30% 30%, #fff6, transparent 60%), var(--c); color: #1a1405; font-weight: 800; box-shadow: 0 0 16px -2px var(--c); transition: transform .15s; }
.owner-btn:hover { transform: scale(1.06); }

/* ---------------- Layout ---------------- */
main { padding: 18px; max-width: 1680px; margin: 0 auto; }
.tab-panel { display: none; animation: fadeUp .3s var(--ease); }
.tab-panel.active { display: block; }
.sub-panel { display: none; animation: fadeUp .25s var(--ease); }
.sub-panel.active { display: block; }
.subtabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs button { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; position: relative; white-space: nowrap; transition: color .15s; }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { color: var(--text); }
.subtabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 21px; }
.sec-head p { margin-top: 3px; font-size: 13px; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select { width: auto; min-width: 140px; }
.search { position: relative; flex: 1 1 240px; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 34px; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: #c9cfdb; }
.chip.accent { background: rgba(124, 92, 255, .14); border-color: rgba(124, 92, 255, .35); color: #c4b5fd; }
.chip-label { font-size: 11px; color: var(--muted); margin-right: 2px; }
.badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #cbd2de; letter-spacing: .02em; text-transform: uppercase; vertical-align: middle; }
.badge.gold { background: rgba(245, 197, 66, .15); color: var(--gold); }
.badge.type-openai { background: rgba(34, 197, 94, .14); color: #86efac; }
.badge.type-anthropic { background: rgba(251, 146, 60, .14); color: #fdba74; }
.badge.type-http { background: rgba(34, 211, 238, .14); color: #67e8f9; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: middle; }

/* Avatar */
.av { --c: var(--accent); display: inline-grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), transparent 55%), var(--c); font-weight: 750; flex: none; letter-spacing: .02em; box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .25); }
.av-xs { width: 18px; height: 18px; font-size: 8px; }
.av.av-dark { box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .25), 0 0 0 1.5px rgba(255, 255, 255, .55); }
.av.av-light { box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .15), 0 0 0 1px rgba(0, 0, 0, .35); }
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-md { width: 36px; height: 36px; font-size: 13px; }
.av-lg { width: 46px; height: 46px; font-size: 16px; }
.av-xl { width: 64px; height: 64px; font-size: 22px; }
.av-wrap { position: relative; flex: none; }
.st-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--panel2); background: #6b7280; }
.st-dot.s-working { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.4s infinite; }
.st-dot.s-error { background: var(--err); }
.st-dot.s-queued { background: var(--warn); }
.st-dot.s-relax { background: #94a3b8; }
.st-dot.s-rest { background: #60a5fa; }
.st-dot.s-sleep { background: #6366f1; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #aeb6c6; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.s-working, .pill.t-running, .pill.t-planning, .pill.t-synthesizing { background: rgba(34, 197, 94, .13); color: #4ade80; }
.pill.s-working::before, .pill.t-running::before, .pill.t-planning::before, .pill.t-synthesizing::before { animation: pulse 1.3s infinite; }
.pill.s-error, .pill.t-error { background: rgba(239, 68, 68, .14); color: #f87171; }
.pill.s-queued, .pill.t-queued, .pill.t-pending { background: rgba(148, 163, 184, .12); color: #cbd5e1; }
.pill.s-queued { color: #fbbf24; background: rgba(245, 158, 11, .12); }
.pill.s-rest { background: rgba(96, 165, 250, .13); color: #93c5fd; }
.pill.s-sleep { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
.pill.t-done { background: rgba(34, 211, 238, .12); color: #67e8f9; }
.pill.t-awaiting_approval { background: rgba(245, 197, 66, .15); color: var(--gold); }
.pill.t-rejected { background: rgba(239, 68, 68, .14); color: #fca5a5; }
.pill.t-skill_gap { background: rgba(251, 146, 60, .16); color: var(--orange); }

/* Stars & skill badges */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.star { color: rgba(255, 255, 255, .18); font-style: normal; font-size: 11px; line-height: 1; }
.star.on { color: var(--gold); }
.stars.interactive .star { background: none; border: 0; padding: 0 1px; cursor: pointer; font-size: 16px; transition: transform .1s; }
.stars.interactive .star:hover { transform: scale(1.2); }
.skill-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.skill-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .28); color: #d4ccff; }
.skill-badge.sm { font-size: 11px; padding: 1px 7px; }
.skill-badge.more { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--muted); }

/* ---------------- Onboarding ---------------- */
.onboard { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 18px; align-items: center; padding: 18px 20px; margin-bottom: 16px; border-radius: var(--radius); border: 1px solid rgba(124, 92, 255, .3); background: linear-gradient(120deg, rgba(124, 92, 255, .14), rgba(34, 211, 238, .06) 60%, transparent), var(--panel); box-shadow: var(--shadow); }
.onboard-intro h3 { font-size: 17px; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.onboard-steps li { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); opacity: .7; transition: all .2s; }
.onboard-steps li.current { opacity: 1; border-color: rgba(124, 92, 255, .5); background: rgba(124, 92, 255, .1); box-shadow: 0 0 0 3px rgba(124, 92, 255, .1); }
.onboard-steps li.done { opacity: .85; }
.onboard-steps li b { display: block; font-size: 13px; }
.onboard-steps li small { display: block; color: var(--muted); font-size: 11.5px; }
.ob-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--panel3); border: 1px solid var(--line2); }
.done .ob-num { background: var(--ok); color: #052e12; border-color: transparent; }
.current .ob-num { background: var(--grad); color: #fff; border-color: transparent; }
.ob-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- Office ---------------- */
.office-layout { display: grid; grid-template-columns: 1fr 320px; gap: 14px; height: calc(100vh - var(--topbar-h) - 36px); min-height: 520px; transition: grid-template-columns .3s var(--ease); }
.office-onboard:not(:empty) + .office-layout { height: calc(100vh - var(--topbar-h) - 36px - 150px); }
.office-layout.feed-collapsed { grid-template-columns: 1fr 44px; }
.office-stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #070910; box-shadow: var(--shadow); min-height: 400px; }
.office3d { position: absolute; inset: 0; }
.office-fallback { position: absolute; inset: 0; padding: 30px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.fallback-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.fallback-list .person { position: relative; }
.fallback-list .st-dot { position: static; margin-left: auto; border-color: var(--panel); }
.feed-card { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feed-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.feed-head h3 { font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ring 2s infinite; }
.feed { flex: 1; overflow-y: auto; padding: 8px; }
.feed-item { display: flex; gap: 9px; padding: 8px; border-radius: 10px; animation: fadeUp .3s var(--ease); }
.feed-item:hover { background: rgba(255, 255, 255, .03); }
.feed-item.error .feed-text { color: #fca5a5; }
.feed-av { background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.feed-av.sys { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel3); font-size: 11px; color: var(--muted); }
.feed-top { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.feed-text { font-size: 12.5px; color: #c8cede; word-break: break-word; }
.feed-empty { padding: 16px; text-align: center; }
.feed-collapsed .feed-card .feed, .feed-collapsed .feed-card h3 { display: none; }
.feed-collapsed #feedToggle { transform: rotate(180deg); }
.feed-collapsed .feed-head { justify-content: center; padding: 10px 4px; border: 0; }

/* ---------------- Employees ---------------- */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.emp-card { position: relative; display: flex; flex-direction: column; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.emp-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.emp-card.selected { border-color: rgba(124, 92, 255, .6); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15), var(--shadow); }
.emp-card.s-working { border-color: rgba(34, 197, 94, .35); }
.emp-card.s-working::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(400px 120px at 0 0, rgba(34, 197, 94, .08), transparent); }
.emp-card.s-error { border-color: rgba(239, 68, 68, .35); }
.emp-card.s-sleep { opacity: .88; }
.emp-check { position: absolute; top: 12px; right: 12px; opacity: .35; transition: opacity .15s; }
.emp-card:hover .emp-check, .emp-check:checked { opacity: 1; }
.emp-top { display: flex; gap: 12px; align-items: center; padding-right: 22px; }
.emp-id { flex: 1; min-width: 0; }
.emp-id h3 { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.emp-id p { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-activity { margin-top: 10px; font-size: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(34, 197, 94, .08); color: #86efac; border: 1px solid rgba(34, 197, 94, .2); }
.emp-activity.s-error { background: rgba(239, 68, 68, .08); color: #fca5a5; border-color: rgba(239, 68, 68, .25); }
.emp-activity.s-queued { background: rgba(245, 158, 11, .08); color: #fcd34d; border-color: rgba(245, 158, 11, .25); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 12px 0 0; }
.meta div { min-width: 0; }
.meta dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.meta dd { margin: 1px 0 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); transition: all .2s; }
.bulk-bar.active { border-color: rgba(124, 92, 255, .5); background: rgba(124, 92, 255, .1); position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 10; backdrop-filter: blur(8px); }
.bulk-count { font-size: 12.5px; font-weight: 600; }
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 18px; flex-wrap: wrap; align-items: center; }

/* ---------------- Org ---------------- */
.org-tree { position: relative; }
.owner-card { --c: var(--gold); display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 60%), var(--panel); box-shadow: 0 10px 40px -18px var(--c), var(--shadow); }
.owner-badge { --c: var(--gold); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 850; color: #1a1405; background: radial-gradient(circle at 30% 30%, #fff8, transparent 55%), var(--c); box-shadow: 0 0 0 3px rgba(0, 0, 0, .3), 0 0 24px -2px var(--c); flex: none; position: relative; }
.owner-card .owner-badge::before { content: ""; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 26px; height: 13px; background: var(--c); clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.crown { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--c); }
.owner-card h3 { font-size: 19px; }
.org-children { margin-left: 28px; padding-left: 24px; border-left: 2px solid rgba(245, 197, 66, .2); padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.org-biz { --c: var(--accent); position: relative; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.org-biz::before { content: ""; position: absolute; left: -26px; top: 30px; width: 24px; height: 2px; background: rgba(245, 197, 66, .2); }
.org-biz-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.org-biz-head h3 { font-size: 16px; }
.biz-mark { width: 12px; height: 38px; border-radius: 6px; background: var(--c); box-shadow: 0 0 16px -2px var(--c); flex: none; }
.biz-mark.gold { background: var(--gold); }
.label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }
.org-leaders { margin-bottom: 12px; }
.people-row { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.person:hover { background: rgba(255, 255, 255, .08); border-color: var(--line2); }
.person b { display: block; font-size: 12.5px; }
.person small { display: block; font-size: 11px; color: var(--muted); }
.div-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.div-card { --c: var(--accent); padding: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--c); box-shadow: none; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--panel2)), var(--panel2)); }
.div-card header { display: flex; gap: 8px; align-items: flex-start; }
.div-card h4 { font-size: 14px; }
.div-card header p { font-size: 12px; color: var(--muted); }
.div-card header > div { flex: 1; min-width: 0; }
.div-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; background: var(--c); flex: none; }
.mini-actions { display: flex; gap: 3px; opacity: .5; transition: opacity .15s; }
.div-card:hover .mini-actions { opacity: 1; }
.av-stack { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.av-btn { padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: transform .15s; }
.av-btn:hover { transform: translateY(-2px) scale(1.08); }
.av-btn.st-working { border-color: var(--ok); }
.av-btn.st-error { border-color: var(--err); }
.av-btn.st-sleep { opacity: .65; }
.av-more { font-size: 12px; color: var(--muted); padding: 0 6px; }
.org-loose { margin-top: 12px; }

/* ---------------- Pipelines ---------------- */
.pipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.pipe-card { display: flex; flex-direction: column; gap: 10px; }
.pipe-card h3 { font-size: 15px; }
.pipe-card .desc { font-size: 12.5px; color: #c3c9d6; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); margin-bottom: 4px; }
.flow-step { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: rgba(124, 92, 255, .14); color: #d4ccff; border: 1px solid rgba(124, 92, 255, .3); }
.flow-step.t-qc { background: rgba(245, 158, 11, .12); color: #fcd34d; border-color: rgba(245, 158, 11, .35); }
.flow-step.t-approval { background: rgba(245, 197, 66, .14); color: var(--gold); border-color: rgba(245, 197, 66, .4); }
.flow-arrow { color: var(--muted); font-size: 12px; }
.stages-head { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.stages-head h3 { font-size: 14px; }
.stage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stage { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.stage.t-qc { border-left-color: var(--warn); }
.stage.t-approval { border-left-color: var(--gold); }
.stage-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel3); font-weight: 800; font-size: 12px; flex: none; }
.stage-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stage-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stage-row > input, .stage-row > select { flex: 1 1 160px; width: auto; }
.stage-tools { display: flex; gap: 4px; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.inline select, .inline input { width: auto; }
.inline input[type=number] { width: 70px; }

/* ---------------- Skills ---------------- */
.skill-cat { margin-bottom: 22px; }
.cat-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #c9cfdb; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.skill-body { display: block; width: 100%; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; width: 100%; }
.skill-grid > .skill-card { min-width: 0; width: auto; max-width: none; margin: 0; }
.skill-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.skill-card h4 { font-size: 14px; }
.skill-card .desc { font-size: 12.5px; color: #c3c9d6; }
.skill-meta { margin-top: 4px; }
.skill-view h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lib-split { display: grid; grid-template-columns: minmax(280px, 1fr) 1.3fr; gap: 14px; height: min(60vh, 560px); }
.lib-list { overflow-y: auto; padding-right: 4px; }
.lib-preview { overflow-y: auto; padding: 14px 16px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.lib-preview h3 { font-size: 16px; margin-bottom: 2px; }
.lib-cat h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 0 6px; }
.lib-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.lib-item:hover { background: rgba(255, 255, 255, .04); }
.lib-item.active { background: rgba(124, 92, 255, .1); border-color: rgba(124, 92, 255, .35); }
.lib-item.owned { opacity: .6; }
.lib-item input { margin-top: 3px; }
.lib-item b { font-size: 13px; }

/* ---------------- Providers / MCP ---------------- */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.prov-card, .mcp-card { display: flex; flex-direction: column; gap: 4px; }
.prov-card header, .mcp-card header { display: flex; gap: 12px; align-items: center; }
.prov-card h3, .mcp-card h3 { font-size: 15px; }
.prov-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--grad); color: #fff; flex: none; }
.prov-logo.mcp { background: linear-gradient(135deg, #0ea5e9, #22c55e); font-size: 11px; }
.tools-box { margin-top: 8px; max-height: 260px; overflow: auto; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); padding: 8px; }
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li { display: flex; flex-direction: column; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tool-list li:last-child { border-bottom: 0; }
.test-result { margin-top: 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; word-break: break-word; }
.test-result.ok { background: rgba(34, 197, 94, .1); color: #86efac; border: 1px solid rgba(34, 197, 94, .25); }
.test-result.fail { background: rgba(239, 68, 68, .1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .25); }
.test-result.pending { background: rgba(124, 92, 255, .1); color: #c4b5fd; border: 1px solid rgba(124, 92, 255, .25); }

/* ---------------- Tasks ---------------- */
.tasks-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.tasks-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - 30px); }
.task-form { display: flex; flex-direction: column; gap: 10px; }
.mode-seg { width: 100%; }
.mode-seg label { flex: 1; }
.team-pick { display: flex; flex-wrap: wrap; gap: 5px; max-height: 130px; overflow-y: auto; padding: 2px; }
.chip-check { cursor: pointer; }
.chip-check input { display: none; }
.chip-check > span { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: all .15s; }
.chip-check > input:checked + span { background: rgba(124, 92, 255, .2); border-color: rgba(124, 92, 255, .6); color: #fff; }
.mgr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; }
.form-warn { font-size: 12.5px; padding: 9px 11px; border-radius: 10px; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .3); color: #fcd34d; }
.task-list-card { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 12px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 0 4px; }
.list-head h3 { font-size: 14px; }
.list-head select { width: auto; padding-top: 5px; padding-bottom: 5px; font-size: 12px; }
.task-list { overflow-y: auto; display: flex; flex-direction: column; gap: 3px; min-height: 80px; }
.task-item { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.task-item:hover { background: rgba(255, 255, 255, .04); }
.task-item.active { background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .35); }
.ti-status { width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex: none; }
.t-running .ti-status, .t-planning .ti-status, .t-synthesizing .ti-status { background: var(--ok); animation: pulse 1.3s infinite; }
.t-done .ti-status { background: var(--accent2); }
.t-error .ti-status { background: var(--err); }
.t-awaiting_approval .ti-status { background: var(--gold); animation: pulse 1.6s infinite; }
.ti-main { flex: 1; min-width: 0; }
.ti-main b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-main small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind { display: inline-block; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; background: rgba(124, 92, 255, .15); color: #c4b5fd; margin-right: 3px; }
.kind.pipe { background: rgba(34, 211, 238, .13); color: #67e8f9; }
.task-detail { min-height: 520px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.detail-head h2 { font-size: 20px; margin: 4px 0 2px; }
.detail-kicker { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.detail-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.phase-bar { display: flex; gap: 4px; }
.phase { flex: 1; text-align: center; font-size: 11px; font-weight: 650; color: var(--muted); padding: 6px 4px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); position: relative; overflow: hidden; }
.phase.done { color: #67e8f9; background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .25); }
.phase.current { color: #fff; border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .18); }
.phase.current::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent); animation: shimmer 1.6s infinite; }
details > summary { cursor: pointer; list-style: none; user-select: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "\25B8"; display: inline-block; margin-right: 6px; transition: transform .2s; color: var(--muted); }
details[open] > summary::before { transform: rotate(90deg); }
.mini-det { border-radius: 10px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); padding: 8px 12px; }
.mini-det > summary { font-size: 12.5px; font-weight: 600; color: #c9cfdb; }
.mini-det[open] > summary { margin-bottom: 8px; }
.mini-det.result { border-color: rgba(34, 211, 238, .2); }
.logs-det > summary { font-size: 13px; font-weight: 650; }
.planning-box { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 12px; border: 1px dashed rgba(124, 92, 255, .4); background: rgba(124, 92, 255, .06); color: #c4b5fd; }
.plan-head { display: flex; flex-direction: column; gap: 6px; }
.plan-summary { padding: 12px 14px; border-radius: 12px; background: rgba(124, 92, 255, .07); border: 1px solid rgba(124, 92, 255, .2); }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad); border-radius: 6px; transition: width .5s var(--ease); }
.sub-grid, .stage-list-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.stage-list-view { grid-template-columns: 1fr; }
.sub-card, .stage-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid #475569; transition: border-color .3s; min-width: 0; }
.sub-card.t-running, .stage-card.t-running { border-left-color: var(--ok); box-shadow: 0 0 0 1px rgba(34, 197, 94, .15), 0 0 24px -12px var(--ok); }
.sub-card.t-done, .stage-card.t-done { border-left-color: var(--accent2); }
.sub-card.t-error, .stage-card.t-error, .stage-card.t-rejected { border-left-color: var(--err); }
.sub-card.t-skill_gap, .stage-card.t-skill_gap { border-left-color: var(--orange); background: linear-gradient(90deg, rgba(251, 146, 60, .06), transparent 50%), var(--bg2); }
.stage-card.t-awaiting_approval { border-left-color: var(--gold); box-shadow: 0 0 24px -14px var(--gold); }
.sub-head { display: flex; align-items: center; gap: 8px; }
.sub-head b { font-size: 13.5px; }
.sub-num { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--panel3); border-radius: 6px; padding: 1px 6px; }
.sub-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.emp-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px 2px 3px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; }
.emp-chip:hover { border-color: var(--line2); background: rgba(255, 255, 255, .08); }
.emp-chip.gold { color: var(--gold); border-color: rgba(245, 197, 66, .4); padding-left: 9px; cursor: default; }
.deps { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.dep { padding: 0 5px; border-radius: 5px; background: rgba(255, 255, 255, .06); font-weight: 700; color: #cbd5e1; }
.dep.ok { background: rgba(34, 211, 238, .14); color: #67e8f9; }
.err-box { font-size: 12.5px; padding: 8px 11px; border-radius: 9px; background: rgba(239, 68, 68, .09); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .25); word-break: break-word; }
.note-box { font-size: 12.5px; padding: 8px 11px; border-radius: 9px; background: rgba(34, 211, 238, .07); color: #a5f3fc; border: 1px solid rgba(34, 211, 238, .2); }
.gap-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; padding: 9px 11px; border-radius: 9px; background: rgba(251, 146, 60, .09); color: #fdba74; border: 1px solid rgba(251, 146, 60, .35); }
.approve-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: rgba(245, 197, 66, .09); color: #fde68a; border: 1px solid rgba(245, 197, 66, .35); }
.child-det { border-radius: 10px; border: 1px dashed rgba(124, 92, 255, .35); padding: 8px 10px; background: rgba(124, 92, 255, .04); }
.child-det > summary { font-size: 12.5px; font-weight: 600; }
.child-sum { display: inline-flex; align-items: center; gap: 6px; }
.child-task { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.child-task .sub-grid { grid-template-columns: 1fr; }
.log-box { max-height: 260px; overflow-y: auto; font-family: var(--mono); font-size: 12px; background: #06080d; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.log-line { display: flex; gap: 8px; padding: 2px 0; animation: fadeIn .3s; }
.log-time { color: #5b6477; flex: none; }
.log-who { color: #a78bfa; flex: none; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-text { color: #cbd5e1; word-break: break-word; }
.final-report { border-radius: 14px; padding: 18px 20px; background: linear-gradient(180deg, rgba(34, 211, 238, .06), transparent 120px), var(--bg2); border: 1px solid rgba(34, 211, 238, .25); }
.fr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fr-head h3 { font-size: 16px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stepper { display: flex; align-items: flex-start; overflow-x: auto; padding: 8px 4px 4px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; text-align: center; flex: none; }
.step-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--panel3); border: 2px solid var(--line2); color: var(--muted); transition: all .3s; }
.step-label { font-size: 12px; font-weight: 600; color: #c9cfdb; max-width: 110px; }
.step-att { font-size: 10.5px; color: #fca5a5; font-weight: 700; }
.step.s-running .step-dot { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); animation: ring 1.8s infinite; }
.step.s-done .step-dot { background: var(--accent2); border-color: var(--accent2); color: #032a30; }
.step.s-error .step-dot, .step.s-rejected .step-dot { background: rgba(239, 68, 68, .2); border-color: var(--err); color: #fca5a5; }
.step.s-awaiting_approval .step-dot { background: rgba(245, 197, 66, .2); border-color: var(--gold); color: var(--gold); animation: pulse 1.6s infinite; }
.step.s-skill_gap .step-dot { background: rgba(251, 146, 60, .2); border-color: var(--orange); color: var(--orange); }
.step-line { flex: 1 0 24px; height: 2px; margin-top: 17px; background: var(--line2); border-radius: 2px; }
.step-line.done { background: var(--accent2); }
.badge.type { text-transform: none; }

/* ---------------- Inbox ---------------- */
.tabs-seg { margin-bottom: 12px; }
.tabs-seg button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 0; background: transparent; padding: 7px 14px; cursor: pointer; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.tabs-seg button.on { background: var(--panel3); color: var(--text); }
.cnt { display: inline-block; font-size: 11px; line-height: 16px; min-width: 18px; text-align: center; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); margin-left: 0; }
.tabs-seg button.on .cnt { background: rgba(124, 92, 255, .3); color: #e9e4ff; }
.inbox-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.inbox-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.inbox-item b { display: block; font-size: 13.5px; }
.inbox-item small { display: block; }
.inbox-item.gold { border-left: 3px solid var(--gold); }
.inbox-item.warn { border-left: 3px solid var(--orange); }
.approval h3 { font-size: 17px; margin-bottom: 8px; }
.approval h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.review-box { max-height: 300px; overflow-y: auto; padding: 12px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.plan-review { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------------- Chat panel ---------------- */
.chat-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: min(460px, 100vw); z-index: 60; display: flex; flex-direction: column; background: rgba(13, 16, 24, .97); backdrop-filter: blur(16px); border-left: 1px solid var(--line2); box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .7); transform: translateX(105%); transition: transform .32s var(--ease); }
.chat-panel.open { transform: none; }
.chat-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.chat-id { flex: 1; min-width: 0; }
.chat-id h3 { font-size: 16px; }
.chat-id > p { font-size: 12.5px; color: var(--muted); }
.chat-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px !important; }
.chat-activity { margin-top: 6px !important; font-size: 12px !important; color: #86efac !important; }
.chat-tools { display: flex; gap: 4px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; }
.chat-msgs { display: flex; flex-direction: column; gap: 12px; }
.chat-empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.msg { display: flex; gap: 8px; max-width: 100%; animation: fadeUp .25s var(--ease); }
.msg.user { justify-content: flex-end; }
.msg-av { flex: none; padding-top: 2px; }
.msg-bubble { max-width: 85%; min-width: 0; padding: 10px 13px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); }
.msg.user .msg-bubble { background: linear-gradient(135deg, rgba(124, 92, 255, .9), rgba(79, 139, 255, .85)); border-color: transparent; color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .msg-bubble { border-bottom-left-radius: 4px; }
.msg.failed .msg-bubble { background: rgba(239, 68, 68, .25); }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 10.5px; opacity: .6; margin-top: 4px; text-align: right; }
.typing .msg-bubble { display: flex; align-items: center; gap: 10px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.tool-events { margin-top: 8px; font-size: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.tool-events > summary { color: #a5b4fc; font-weight: 600; }
.tool-ev { margin-top: 8px; padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.tool-name { color: #67e8f9; font-weight: 700; margin-bottom: 4px; }
.tool-sec span { font-size: 10.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.tool-sec pre { margin: 2px 0 6px; max-height: 180px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11.5px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { resize: none; max-height: 180px; }
.chat-input .btn { height: 40px; width: 44px; padding: 0; }

/* ---------------- Markdown ---------------- */
.md { font-size: 13.5px; line-height: 1.65; word-break: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 1.1em 0 .45em; }
.md h1 { font-size: 1.45em; } .md h2 { font-size: 1.28em; } .md h3 { font-size: 1.12em; } .md h4, .md h5, .md h6 { font-size: 1em; }
.md p { margin: .55em 0; }
.md ul, .md ol { margin: .5em 0; padding-left: 1.4em; }
.md li { margin: .2em 0; }
.md li.md-check { list-style: none; margin-left: -1.2em; }
.md-box { display: inline-block; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.md-box.on { background: var(--ok); border-color: var(--ok); }
.md code { background: rgba(255, 255, 255, .08); padding: .1em .4em; border-radius: 5px; font-size: .88em; }
.md pre.md-code { position: relative; background: #06080d; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: .7em 0; }
.md pre.md-code code { background: none; padding: 0; font-size: 12.5px; line-height: 1.55; white-space: pre; }
.md-lang { position: absolute; top: 6px; right: 10px; font-size: 10px; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.md blockquote { margin: .6em 0; padding: .3em 1em; border-left: 3px solid var(--accent); background: rgba(124, 92, 255, .06); border-radius: 0 8px 8px 0; color: #c9cfdb; }
.md hr { border: 0; height: 1px; background: var(--line2); margin: 1.2em 0; }
.md a { color: var(--accent2); }
.md-table { overflow-x: auto; margin: .7em 0; }
.md table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--line2); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: rgba(255, 255, 255, .05); font-weight: 650; }
.md tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
.md.small { font-size: 12.5px; }
.msg.user .md code { background: rgba(0, 0, 0, .2); }

/* ---------------- Modal ---------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 5, 10, .6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.modal-backdrop.open { opacity: 1; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 18px; background: linear-gradient(180deg, #181d29, #12161f); border: 1px solid var(--line2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(124, 92, 255, .08); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease); }
.modal-backdrop.open .modal { transform: none; }
.modal.sm { width: min(440px, 100%); }
.modal.lg { width: min(920px, 100%); height: auto; min-height: 0; max-height: min(90vh, calc(100vh - 40px)); overflow: auto; border-radius: 18px; display: flex; }
.modal { max-height: min(90vh, calc(100vh - 40px)); overflow: auto; }
.modal-body { flex: 1 1 auto; min-height: 0; }
.modal.xl { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 16px 20px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); position: sticky; bottom: -18px; background: #13171f; padding-bottom: 4px; }
.confirm-msg { font-size: 14px; line-height: 1.6; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.form-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: #c9cfdb; }
.hint { font-size: 11.5px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.row2.r-1-3 { grid-template-columns: 110px 1fr; }
.row2.r-auto { grid-template-columns: 1fr auto; align-items: center; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.input-group { display: flex; gap: 6px; }
.adv { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: rgba(0, 0, 0, .15); }
.adv > summary { font-size: 12.5px; font-weight: 600; color: #c9cfdb; }
.adv[open] { display: flex; flex-direction: column; gap: 10px; }
.adv[open] > summary { margin-bottom: 2px; }
fieldset.http-fields { border: 1px solid rgba(34, 211, 238, .25); border-radius: 10px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; background: rgba(34, 211, 238, .04); margin: 0; }
fieldset legend { font-size: 12px; font-weight: 700; color: #67e8f9; padding: 0 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check.big { align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); margin-top: 4px; }
.check.big input { margin-top: 3px; }
.check.big b { display: block; font-size: 13px; }
.check.big small { display: block; font-size: 11.5px; color: var(--muted); }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; padding: 8px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); gap: 2px; }
.seg label { cursor: pointer; }
.seg input { display: none; }
.seg label > span { display: block; text-align: center; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .15s; }
.seg input:checked + span { background: var(--panel3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.color-field { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); background: var(--c); cursor: pointer; padding: 0; transition: transform .12s; }
.swatch:hover { transform: scale(1.15); }
.skill-picker { max-height: 300px; overflow-y: auto; padding: 6px 8px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.sp-cat-name { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 4px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 7px; }
.sp-row.on { background: rgba(124, 92, 255, .1); }
.sp-row:not(.on) .stars { opacity: .35; }
.sp-row .check span { font-size: 12.5px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tpl-card { cursor: pointer; }
.tpl-card input { display: none; }
.tpl-inner { height: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); transition: all .18s; }
.tpl-inner h3 { font-size: 14.5px; margin-bottom: 4px; }
.tpl-inner p { font-size: 12.5px; color: var(--muted); }
.tpl-card input:checked + .tpl-inner { border-color: rgba(124, 92, 255, .7); background: rgba(124, 92, 255, .1); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.emp-opts.disabled { opacity: .45; pointer-events: none; }
.owner-hero { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: rgba(245, 197, 66, .07); border: 1px solid rgba(245, 197, 66, .25); }
.owner-hero .owner-badge { width: 46px; height: 46px; font-size: 19px; }
.loading-block { display: flex; align-items: center; gap: 10px; padding: 24px; color: var(--muted); justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }

/* Empty states */
.empty { grid-column: 1 / -1; text-align: center; padding: 44px 20px; border-radius: var(--radius); border: 1px dashed var(--line2); background: rgba(255, 255, 255, .015); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--muted); max-width: 460px; font-size: 13px; }
.empty.small { padding: 22px 16px; }
.empty-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 255, .8); margin-bottom: 4px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------------- Toasts ---------------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: min(420px, calc(100vw - 36px)); padding: 11px 12px 11px 14px; border-radius: 12px; background: rgba(23, 28, 39, .97); border: 1px solid var(--line2); box-shadow: var(--shadow); backdrop-filter: blur(10px); animation: toastIn .3s var(--ease); font-size: 13px; }
.toast.out { animation: toastOut .25s forwards; }
.toast-ic { flex: none; margin-top: 1px; }
.toast.error { border-color: rgba(239, 68, 68, .45); } .toast.error .toast-ic { color: #f87171; }
.toast.success { border-color: rgba(34, 197, 94, .4); } .toast.success .toast-ic { color: #4ade80; }
.toast.info { border-color: rgba(34, 211, 238, .4); } .toast.info .toast-ic { color: #67e8f9; }
.toast-msg { flex: 1; word-break: break-word; }
.toast-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }

/* ---------------- Animations ---------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .stats { display: none; }
}
@media (max-width: 1100px) {
  .tasks-layout { grid-template-columns: 1fr; }
  .tasks-side { position: static; max-height: none; }
  .task-list { max-height: 360px; }
  .onboard { grid-template-columns: 1fr; }
  .onboard-steps { grid-template-columns: repeat(2, 1fr); }
  .office-layout { grid-template-columns: 1fr; height: auto; }
  .office-stage { height: 70vh; }
  .feed-card { max-height: 320px; }
  .office-layout.feed-collapsed { grid-template-columns: 1fr; }
  .lib-split { grid-template-columns: 1fr; height: auto; }
  .lib-list, .lib-preview { max-height: 45vh; }
}
@media (max-width: 860px) {
  .topbar { gap: 8px; padding: 0 10px; flex-wrap: nowrap; }
  .brand div { display: none; }
  .biz-select select { min-width: 0; max-width: 150px; }
  #btnHire { display: none; }
  .live span { display: none; }
  main { padding: 12px; }
  .form-cols, .row2 { grid-template-columns: 1fr; }
  .row4 { grid-template-columns: repeat(2, 1fr); }
  .emp-grid, .pipe-grid, .prov-grid { grid-template-columns: 1fr; }
  .org-children { margin-left: 10px; padding-left: 14px; }
  .modal-backdrop { padding: 8px; }
  .chat-panel { width: 100vw; }
}
@media (max-width: 520px) {
  .onboard-steps { grid-template-columns: 1fr; }
  .tabs button { padding: 6px 10px; }
}

/* Industri */
.tpl-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ind-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--ind, var(--accent)); color: #fff; flex: none; }
.ind-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ind-label { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--ind, var(--accent)); }
.ind-content { --ind: #f472b6; }
.ind-software { --ind: #60a5fa; }
.ind-construction { --ind: #f59e0b; }
.ind-seo { --ind: #34d399; }
.ind-general { --ind: #a78bfa; }
.pill.s-eat { background: rgba(251, 146, 60, .14); color: #fdba74; }
.st-dot.s-eat { background: var(--orange); }
.av-btn.st-eat { opacity: .85; }

/* Profil & pembelajaran */
.prof-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.stat-card { padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); text-align: center; }
.stat-card b { display: block; font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card span { font-size: 11px; color: var(--muted); }
.stat-card.warn b { background: none; color: var(--warn); }
.stat-card.err b { background: none; color: #f87171; }
.prof-h { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; }
.prof-h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.skill-levels { display: flex; flex-direction: column; gap: 6px; }
.sl-row { display: grid; grid-template-columns: 1fr auto 180px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.sl-name b { display: block; font-size: 13px; }
.sl-name small { font-size: 11px; }
.sl-prog { display: flex; align-items: center; gap: 8px; }
.sl-prog .progress { flex: 1; }
.lesson-add { display: grid; grid-template-columns: 160px 1fr 1.4fr auto; gap: 6px; margin-bottom: 10px; }
.lesson-list { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }
.lesson { padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.lesson.inactive { opacity: .5; border-left-color: var(--muted); }
.lesson-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lesson-mistake { font-size: 12.5px; color: #fca5a5; margin-top: 6px; }
.lesson-mistake span { color: var(--muted); }
.lesson-rule { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.lesson-actions { display: flex; gap: 4px; margin-top: 6px; }
.badge.src-qc_reject { background: rgba(245, 158, 11, .15); color: #fcd34d; }
.badge.src-owner_reject, .badge.src-owner_feedback { background: rgba(245, 197, 66, .15); color: var(--gold); }
.badge.src-error, .badge.src-skill_mismatch { background: rgba(239, 68, 68, .15); color: #fca5a5; }
.badge.src-chat_feedback { background: rgba(34, 211, 238, .13); color: #67e8f9; }
.switch { position: relative; width: 34px; height: 19px; flex: none; cursor: pointer; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #cbd5e1; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(15px); background: #fff; }
.fb-btns { display: inline-flex; gap: 2px; margin-left: 8px; vertical-align: middle; }
.fb-btn { background: none; border: 0; padding: 2px 4px; border-radius: 6px; cursor: pointer; color: var(--muted); opacity: .6; transition: all .15s; }
.fb-btn:hover { opacity: 1; background: rgba(255, 255, 255, .06); color: var(--text); }
.fb-btn.on { opacity: 1; color: var(--ok); }
.fb-btn.down.on { color: #f87171; }
.fb-form { display: flex; gap: 6px; margin-top: 8px; }
.fb-form input { padding: 6px 9px; font-size: 12.5px; }
.inbox-item.sop { border-left: 3px solid var(--accent); align-items: flex-start; }
.inbox-item.err { border-left: 3px solid var(--err); }
.col-btns { display: flex; flex-direction: column; gap: 6px; }
.feed-item.levelup .feed-text { color: var(--gold); font-weight: 700; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } .sl-row, .lesson-add { grid-template-columns: 1fr; } }
.feed-item.lesson .feed-text { color: #a5b4fc; }

/* UPDATE 12: media, model, biaya, HQ */
.hq-btn span { margin-left: 2px; }
.media-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.media-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--line2); background: #06080d; }
.media-item.audio { display: flex; flex-direction: column; gap: 4px; padding: 8px; width: min(360px, 100%); }
.media-item.audio audio { width: 100%; height: 36px; }
.media-link { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.media-item.video video { display: block; max-width: min(480px, 100%); max-height: 320px; }
.media-item.image img { display: block; max-width: 240px; max-height: 240px; object-fit: cover; transition: transform .2s; }
.media-item.image:hover img { transform: scale(1.03); }
.mcp-fields { border: 1px solid rgba(124, 92, 255, .3); border-radius: 10px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; background: rgba(124, 92, 255, .05); margin: 0; }
.mcp-fields legend { font-size: 12px; font-weight: 700; color: #c4b5fd; padding: 0 6px; }
.rec-box { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(124, 92, 255, .07); border: 1px dashed rgba(124, 92, 255, .35); }
.rec-title { font-size: 12px; color: #c4b5fd; font-weight: 600; margin-right: 2px; }
.rec-pick { cursor: pointer; }
.rec-pick small { color: var(--muted); }
.card-title { font-size: 14px; margin-bottom: 12px; }
.model-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.rec-list { display: flex; flex-direction: column; gap: 6px; }
.rec-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); flex-wrap: wrap; }
.rec-rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.score-chip { font-weight: 800; color: var(--gold); font-size: 13px; }
.bench-form { margin-bottom: 12px; }
.bench-models { max-height: 170px; }
.bench-list { display: flex; flex-direction: column; gap: 10px; }
.bench-card { padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.bench-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 40px; gap: 8px; align-items: center; font-size: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; display: flex; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 6px; transition: width .6s var(--ease); }
.bar-val { text-align: right; font-weight: 700; }
.model-table-card { margin-bottom: 14px; }
.model-prov h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 12px 0 8px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.model-card { padding: 11px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mc-tiers { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.mc-tiers .cost { color: var(--gold); letter-spacing: 1px; }
.mc-tiers .speed { color: var(--accent2); letter-spacing: 1px; }
.cost-stats { grid-template-columns: repeat(5, 1fr); margin-bottom: 14px; }
.day-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 6px; }
.day-col { flex: 1; min-width: 10px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.day-bar { width: 100%; max-width: 34px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--grad); }
.day-col span { font-size: 10px; color: var(--muted); }
.legend-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.legend-sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-sq.in, .bar-fill.in { background: #7c5cff; }
.legend-sq.out, .bar-fill.out { background: #22d3ee; }
.bar-fill.in, .bar-fill.out { border-radius: 0; }
.cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.usage-table { display: flex; flex-direction: column; gap: 6px; }
.u-row { display: grid; grid-template-columns: minmax(100px, 170px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.u-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-val { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.inbox-tools { display: flex; gap: 6px; margin-bottom: 4px; }
.inbox-item.hr { border-left: 3px solid var(--accent2); }
@media (max-width: 1100px) { .model-layout, .cost-grid { grid-template-columns: 1fr; } .cost-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .hq-btn span { display: none; } }

/* Auth */
body.auth-mode > header, body.auth-mode > main { filter: blur(6px); pointer-events: none; }
.auth-screen { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 500px at 30% 20%, rgba(124, 92, 255, .25), transparent 60%), radial-gradient(700px 500px at 80% 90%, rgba(34, 211, 238, .15), transparent 60%), rgba(6, 8, 13, .92); backdrop-filter: blur(10px); animation: fadeIn .3s; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 20px; background: linear-gradient(180deg, #181d29, #12161f); border: 1px solid var(--line2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(124, 92, 255, .12); }
.auth-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.auth-brand h1 { font-size: 22px; }
.auth-brand p { font-size: 13px; }
.row-btns.left { justify-content: flex-start; margin-top: 0; }
.sec-actions select { width: auto; }
.cost-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.kind.hq { background: rgba(245, 197, 66, .15); color: var(--gold); }
.sub-panel > .err-box { margin-bottom: 12px; }


/* ---- QA fixes: chat panel reflow / overlay ---- */
main { transition: padding-right .32s var(--ease); }
.chat-backdrop { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 59; background: rgba(3, 5, 10, .55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
@media (min-width: 1100px) {
  body.chat-open main { padding-right: calc(min(460px, 100vw) + 18px); }
  /* Tab Kantor: chat jadi overlay agar lebar canvas 3D tidak berubah. */
  body.chat-open[data-tab="office"] main { padding-right: 18px; }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 1099.98px) {
  body.chat-open .chat-backdrop { opacity: 1; pointer-events: auto; }
}

/* ---- QA fixes: mode toggle (button, aria-pressed) ---- */
.seg button.seg-btn { display: block; text-align: center; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; transition: all .15s; }
.seg button.seg-btn[aria-pressed="true"] { background: var(--panel3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.seg button.seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- UPDATE 14: Catatan Kantor, OB, cleanup, QC badge ---- */
.journal-toolbar { flex-wrap: wrap; align-items: center; }
.journal-list { display: flex; flex-direction: column; gap: 10px; }
.journal-entry { padding: 14px 16px; border-left: 3px solid var(--line2); }
.journal-entry.t-notulen { border-left-color: #7c5cff; }
.journal-entry.t-daily { border-left-color: #22d3ee; }
.journal-entry.t-housekeeping { border-left-color: #7dd3fc; }
.je-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.je-title { font-size: 14px; min-width: 0; }
.je-meta { margin-top: 4px; }
.je-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.journal-entry .card-actions { padding-top: 8px; }
.badge.ob { background: rgba(125, 211, 252, .16); color: #7dd3fc; border: 1px solid rgba(125, 211, 252, .4); margin-left: 4px; }
.badge.qc-pass { background: rgba(34, 197, 94, .15); color: #86efac; border: 1px solid rgba(34, 197, 94, .4); font-size: 11px; vertical-align: middle; }
.feed-item.journal .feed-text { color: #7dd3fc; }
.inbox-item.cleanup { border-left: 3px solid #7dd3fc; }
.cleanup-list { margin: 6px 0 4px 18px; color: #c8cede; display: grid; gap: 2px; }
.inbox-sub { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inbox-item.ob-note { display: block; }
.inbox-item.ob-note summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.inbox-item.ob-note .review-box { margin-top: 8px; }
.tabs-seg { flex-wrap: wrap; }
.chip.rec-pick.cheap { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); color: #bbf7d0; cursor: pointer; }
.cheap-box { margin-top: -4px; }

/* ---- UPDATE 15: Sosmed ---- */
.plat-badge { --pc: #94a3b8; display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 45%, transparent); flex: none; }
.social-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.social-acc { display: flex; flex-direction: column; gap: 6px; }
.social-acc.off { opacity: .6; }
.ok-text { color: #86efac; }
.warn-text { color: #fdba74; }
.social-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 12px; align-items: start; }
.social-queue.single { grid-template-columns: 1fr; }
.social-post { display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--line2); }
.social-post.s-awaiting_approval { border-left-color: var(--gold); }
.social-post.s-scheduled { border-left-color: #22d3ee; }
.social-post.s-published { border-left-color: var(--ok); }
.social-post.s-failed, .social-post.s-partial { border-left-color: var(--err); }
.social-post.s-cancelled { opacity: .65; }
.sp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-plats { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sp-acc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #c8cede; }
.sp-when { text-align: right; }
.sp-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.sp-tabs button { background: none; border: 1px solid transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 7px; cursor: pointer; }
.sp-tabs button[aria-selected="true"] { color: var(--text); background: var(--panel3); border-color: var(--line2); }
.sp-preview { display: flex; flex-direction: column; gap: 6px; }
.sp-caption { font-size: 13px; max-height: 220px; overflow: auto; }
.sp-media-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-media { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); background: #000; display: block; }
.sp-media.audio { width: 100%; max-height: 40px; background: none; border: 0; }
.sp-results { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line); }
.sp-res { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.sp-res.ok { color: #bbf7d0; }
.sp-res.err { color: #fecaca; }
.sp-per-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sp-per-plat { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sp-per-plat legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 0 4px; }
.cal-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-title { font-size: 15px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { min-height: 104px; padding: 5px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: border-color .15s, background .15s; }
.cal-grid.week .cal-day { min-height: 320px; }
.cal-day.out { opacity: .45; }
.cal-day.today { border-color: rgba(124, 92, 255, .6); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .3); }
.cal-day.drop { border-color: var(--ok); background: rgba(34, 197, 94, .08); }
.cal-date { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cal-post { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; padding: 3px 5px; border-radius: 6px; font: inherit; font-size: 11px; text-align: left; color: #d6dbe6; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; }
.cal-post[draggable="true"] { cursor: grab; }
.cal-post.s-awaiting_approval { border-color: rgba(245, 197, 66, .5); }
.cal-post.s-scheduled { border-color: rgba(34, 211, 238, .45); }
.cal-post.s-published { border-color: rgba(34, 197, 94, .5); }
.cal-post.s-failed, .cal-post.s-partial { border-color: rgba(239, 68, 68, .55); }
.cal-post.s-cancelled { opacity: .5; text-decoration: line-through; }
.cal-time { color: var(--muted); flex: none; }
.cal-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-unscheduled { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
@media (max-width: 760px) { .cal-day { min-height: 70px; } .cal-cap { display: none; } }

/* ---- UPDATE 15b: rekomendasi akun, manual, upload media ---- */
.social-rec { margin-bottom: 14px; }
.social-rec summary { cursor: pointer; }
.social-rec-steps { margin-top: 10px; }
.social-rec-steps .ob-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sp-res.manual { color: #fde68a; }
.pkg-media { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.media-tools { margin-top: 6px; }
.upload-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px 56px auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); }
.upload-row progress { width: 100%; height: 6px; accent-color: var(--accent); }
.upload-row.ok { border-color: rgba(34, 197, 94, .4); }
.upload-row.err { border-color: rgba(239, 68, 68, .5); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-search { width: 100%; margin-bottom: 10px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 55vh; overflow: auto; }
.mp-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; min-width: 0; }
.mp-item.on { border-color: rgba(124, 92, 255, .7); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .4); }
.mp-item input { position: absolute; top: 8px; left: 8px; }
.mp-thumb { display: grid; place-items: center; height: 96px; border-radius: 7px; overflow: hidden; background: #000; }
.mp-thumb img, .mp-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mp-ic { font-size: 30px; color: var(--muted); }
.mp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- UPDATE 15c: TikTok automation ---- */
.badge.needs-check { background: rgba(251, 146, 60, .16); color: #fdba74; border: 1px solid rgba(251, 146, 60, .45); font-size: 11px; }
.auth-tagline { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #c4b5fd; margin: 2px 0 6px; }

/* ---- Stasiun Posting ---- */
.warn-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: rgba(245, 197, 66, .1); border: 1px solid rgba(245, 197, 66, .45); color: #fde68a; font-size: 13px; }
.warn-banner code { background: rgba(0, 0, 0, .3); padding: 1px 6px; border-radius: 5px; }
.sec-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-subhead h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; margin-bottom: 12px; }
.station-card { display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--line2); }
.station-card.on { border-left-color: var(--ok); }
.station-card.off { border-left-color: var(--err); opacity: .85; }
.station-card .st-dot { position: static; width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.station-guide { margin-bottom: 12px; }
.station-guide summary { cursor: pointer; }
.station-guide ol { margin: 8px 0 0 18px; display: grid; gap: 4px; }
.table-wrap { overflow-x: auto; }
.job-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.job-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.job-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.job-table progress { width: 90px; height: 6px; accent-color: var(--accent); }
.pill.uncertain { background: rgba(245, 197, 66, .18); color: #fde68a; }
.job-table tr.job-uncertain td { background: rgba(245, 197, 66, .05); }
