/* TBSuperApp — clean agency style */
:root {
  --page: #dcdde0;
  --shell-a: #e2ebe8;
  --shell-b: #f3f4f4;
  --panel: #ffffff;
  --soft: #f6f6f7;
  --soft-2: #efeff1;
  --line: #ececee;
  --line-2: #e2e2e5;
  --ink: #18181b;
  --ink-2: #55555d;
  --ink-3: #9a9aa3;
  --black: #111113;
  --orange: #f59e0b;
  --ok: #3f9f72;
  --bad: #d04545;
  --r-shell: 30px;
  --r-panel: 22px;
  --r: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--page); color: var(--ink); font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i .ck { stroke: #fff; }
.pill.on svg.i .ck { stroke: var(--black); }
.pill svg.i { width: 14px; height: 14px; }

/* ── Shell ── */
.shell {
  height: calc(100vh - 40px); margin: 20px; display: grid; grid-template-columns: 236px 1fr;
  border-radius: var(--r-shell); padding: 10px; gap: 0;
  background: radial-gradient(120% 60% at 0% 0%, var(--shell-a) 0%, var(--shell-b) 55%), var(--shell-b);
  box-shadow: 0 30px 60px -30px rgba(20, 20, 30, .25), 0 0 0 1px rgba(255, 255, 255, .6) inset;
}
.shell.collapsed { grid-template-columns: 72px 1fr; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; padding: 14px 10px 10px 12px; min-height: 0; overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 6px; margin-bottom: 26px; }
.logo { width: 34px; height: 34px; border-radius: 11px; background: var(--black); display: flex; align-items: center; justify-content: center; gap: 2.5px; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.logo span { width: 3px; border-radius: 2px; background: #fff; height: 10px; }
.logo span:nth-child(2) { height: 14px; }
.ghost-btn { border: 0; background: none; padding: 6px; border-radius: 8px; color: var(--ink-2); display: grid; place-items: center; }
.ghost-btn:hover { background: rgba(0, 0, 0, .05); }
.side-label { font-size: 12px; color: var(--ink-3); padding: 0 8px; margin: 4px 0 8px; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; border: 0; background: none; text-align: left; width: 100%; color: var(--ink); font-weight: 500; font-size: 13px; }
.nav-item:hover { background: rgba(255, 255, 255, .55); }
.nav-item.active { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .03); }
.nav-item .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { font-size: 10.5px; color: var(--ink-3); background: rgba(0, 0, 0, .05); border-radius: 5px; padding: 1px 6px; font-weight: 500; }
.count { min-width: 18px; height: 18px; border-radius: 99px; background: var(--black); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 5px; font-weight: 600; }
.busy { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

.account { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(0, 0, 0, .04); margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2b2b31, #55555d); color: #fff; display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }
.account .who { min-width: 0; }
.account .name { font-weight: 600; font-size: 13px; }
.account .role { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }

.shell.collapsed .nm, .shell.collapsed .kbd, .shell.collapsed .side-label, .shell.collapsed .account .who, .shell.collapsed .count { display: none; }
.shell.collapsed .nav-item { justify-content: center; padding: 10px; }
.shell.collapsed .side-top { flex-direction: column; gap: 12px; padding: 0; }

/* ── Content panel ── */
.content { background: var(--panel); border-radius: var(--r-panel); display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.topbar { margin: 12px 12px 0; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; gap: 12px; }
.crumbs { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--ink-3); min-width: 0; }
.crumbs b { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.crumbs .sep { color: var(--ink-3); }
.top-actions { display: flex; gap: 8px; }
.square-btn { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; position: relative; color: var(--ink); }
.square-btn:hover { background: var(--soft); }
.square-btn.has-dot::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }

#main { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }

/* ── Title row ── */
.title-row { display: flex; align-items: center; gap: 14px; padding: 22px 28px 16px 40px; flex-wrap: wrap; }
.title-row h1 { margin: 0 6px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 0; background: var(--soft-2); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pill:hover { background: #e6e6e9; }
.pill.on { background: var(--black); color: #fff; }
.pill .n { opacity: .55; }
.title-row .spacer { flex: 1; }
.select-lite { color: var(--ink-3); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }

.btn { border: 1px solid var(--line-2); background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.dark { background: var(--black); border-color: var(--black); color: #fff; }
.btn.dark:hover { background: #2a2a2e; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .count { background: var(--black); color: #fff; }
.btn.dark .count { background: #fff; color: var(--black); }

.body { padding: 0 28px 28px 40px; display: flex; flex-direction: column; gap: 22px; }
.stat-line { display: flex; gap: 28px; flex-wrap: wrap; padding: 0 28px 18px 40px; color: var(--ink-3); font-size: 12px; }
.stat-line b { color: var(--ink); font-size: 18px; font-weight: 500; display: block; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.h2 { font-size: 12px; color: var(--ink-3); font-weight: 500; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }

/* ── Board (overview) ── */
.board-wrap { border-top: 1px solid var(--line); overflow-x: auto; }
.board { display: grid; grid-template-columns: 76px repeat(var(--cols), minmax(170px, 1fr)); min-width: calc(76px + var(--cols) * 170px); }
.board > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.board > .last { border-right: 0; }
.col-head { text-align: center; padding: 6px 0; font-size: 12px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; }
.col-head.on { background: var(--black); color: #fff; border-color: var(--black) !important; }
.axis { font-size: 12px; color: var(--ink-2); padding: 14px 0 0 18px; border-right: 1px solid var(--line); }
.cell { padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.cell.tall { min-height: 280px; }
.cell.foot { min-height: 72px; flex-direction: row; justify-content: center; align-items: center; gap: 8px; }
.cell.hatch { background: #fafafa; }

.tile { border-radius: 8px; padding: 9px 10px 10px; background: var(--bg); color: var(--fg); position: relative; text-align: left; border: 0; width: 100%; display: block; }
.tile .tt { font-size: 12px; font-weight: 500; padding-right: 22px; line-height: 1.35; }
.tile .ts { font-size: 11.5px; opacity: .75; margin-top: 2px; line-height: 1.35; }
.tile .more { position: absolute; right: 6px; top: 6px; border: 0; background: none; color: inherit; padding: 2px 4px; border-radius: 6px; line-height: 0; }
.tile .more:hover { background: rgba(0, 0, 0, .06); }
.tile .chip-ok { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--ink-2); border-radius: 999px; padding: 2px 9px 2px 5px; font-size: 10.5px; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.tile .chip-ok svg { width: 12px; height: 12px; color: var(--ok); }
.tile.ghost { background: none; border: 1px dashed var(--line-2); color: var(--ink-3); text-align: center; font-size: 12px; }
.tile.ghost:hover { border-color: var(--ink-3); color: var(--ink-2); }
.tile.clickable { cursor: pointer; transition: transform .12s; }
.tile.clickable:hover { transform: translateY(-1px); }
.round { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--bg); color: var(--fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 45%, transparent); }
.round:hover { filter: brightness(.97); }
.round svg { width: 15px; height: 15px; }

/* ── Skill page ── */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tile-grid .tile { min-height: 104px; }
.list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: #fcfcfc; }
.row .sw { width: 10px; height: 34px; border-radius: 4px; background: var(--bg); flex-shrink: 0; }
.row .info { flex: 1; min-width: 0; }
.row .t { font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .d { color: var(--ink-3); font-size: 12px; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .actions { display: flex; gap: 6px; flex-shrink: 0; }
.tag { font-size: 10.5px; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: var(--soft-2); color: var(--ink-2); }
.tag.on { background: #e3f4ea; color: #2f7a55; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--ink-3); }
.empty { padding: 26px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 16px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.panel h4 { margin: 0; font-size: 14px; font-weight: 600; }
.panel p { margin: 0; color: var(--ink-3); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.input { border: 1px solid var(--line-2); background: #fff; border-radius: 10px; padding: 9px 11px; width: 100%; resize: vertical; font-size: 13px; }
.input:focus { outline: 0; border-color: #b9b9c0; box-shadow: 0 0 0 3px rgba(0, 0, 0, .05); }
textarea.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.6; background: var(--soft); }

/* ── Agent chat ── */
.chat { border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-height: 460px; height: calc(100vh - 300px); overflow: hidden; }
.chat-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); min-width: 0; }
.chat-bar .skills { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chat-bar .skills .tag { white-space: nowrap; background: var(--bg); color: var(--fg); }
.log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(#fff, #fcfcfc); }
.msg { max-width: 78%; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: var(--black); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); padding: 12px 16px; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.msg.error { align-self: flex-start; background: #fdeeee; color: var(--bad); padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; }
.steps { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.step { font-size: 12px; color: var(--ink-3); display: flex; gap: 7px; align-items: center; }
.step svg { width: 13px; height: 13px; color: var(--ok); }
.typing { color: var(--ink-3); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.typing::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse .6s infinite alternate; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h2, .md h3, .md h4 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 20px; }
.md pre { background: var(--soft); padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: 12px; }
.md code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: var(--soft-2); padding: 1px 5px; border-radius: 5px; }
.md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; font-size: 12.5px; margin: 8px 0; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { color: var(--ink-3); font-weight: 500; }
.md a { color: #2f6fd6; }
.welcome { margin: auto; text-align: center; max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.welcome .badge-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); color: var(--fg); }
.welcome .badge-ic svg { width: 22px; height: 22px; }
.welcome h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.welcome p { margin: 0; color: var(--ink-3); }
.welcome .pills { justify-content: center; margin-top: 4px; }
.welcome .pill { padding: 7px 14px; text-align: left; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; background: #fff; }
.composer textarea { flex: 1; max-height: 180px; min-height: 40px; border: 0; background: var(--soft); border-radius: 12px; }
.composer textarea:focus { box-shadow: none; background: var(--soft-2); }
.composer .btn { height: 40px; padding: 0 18px; }

/* ── Files ── */
.file-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--fg); flex-shrink: 0; }

/* ── Banner ── */
.banner { border: 1px solid #f3e2bf; background: #fffaf0; border-radius: 16px; padding: 16px 18px; }
.banner h4 { margin: 0 0 4px; font-size: 14px; }
.banner p, .banner ol { margin: 4px 0; color: var(--ink-2); }
.banner code { font-family: ui-monospace, Menlo, monospace; background: #fff; padding: 1px 6px; border-radius: 5px; font-size: 12px; border: 1px solid var(--line); }

/* ── Modal & toast ── */
.modal { position: fixed; inset: 0; background: rgba(20, 20, 25, .28); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 22px; width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .3); }
.modal-head { display: flex; align-items: center; padding: 16px 18px 10px 22px; }
.modal-head h3 { margin: 0; flex: 1; font-size: 16px; font-weight: 500; }
#modalBody { padding: 6px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .left { margin-right: auto; }
.result-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 0; background: none; width: 100%; text-align: left; }
.result-link:hover { background: var(--soft); }
.result-link .sub { color: var(--ink-3); font-size: 12px; margin-left: auto; white-space: nowrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 12.5px; z-index: 20; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .shell, .shell.collapsed { margin: 0; height: auto; min-height: 100vh; border-radius: 0; grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sidebar { padding: 12px 16px 6px; overflow: visible; min-width: 0; }
  .side-top { margin-bottom: 10px; }
  #collapse, .side-label, .account { display: none; }
  nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav-group { flex-direction: row; margin: 0; }
  .nav-item { width: auto; }
  .nav-item .kbd { display: none; }
  .content { border-radius: 20px 20px 0 0; overflow: visible; }
  #main { overflow: visible; }
  .topbar { margin: 10px 10px 0; }
  .title-row { padding: 18px 16px 12px; }
  .stat-line { padding: 0 16px 14px; gap: 18px; }
  .body { padding: 0 16px 20px; }
  .two { grid-template-columns: 1fr; }
  .msg { max-width: 94%; }
  .row { flex-wrap: wrap; }
  .chat { height: 72vh; }
  .crumbs .hide-sm { display: none; }
}

/* ═════════ Modul bisnis (Jadwal, Tugas, Klien, Keuangan, Otomasi, Aktivitas) ═════════ */
.muted { color: var(--ink-3); }
.pad { padding: 14px 0; }
.nowrap { white-space: nowrap; }
.count.soft { background: rgba(0, 0, 0, .07); color: var(--ink-2); }
.dot-alert { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.tag.info { background: #e3eefc; color: #2f5f9e; }
.tag.warn { background: #fdf0d9; color: #8a5f12; }
.tag.bad { background: #fde5e2; color: #a83a2c; }
.tag.muted { background: var(--soft); color: var(--ink-3); }
.btn.xs { padding: 4px 10px; font-size: 11.5px; gap: 5px; }
.btn.xs svg { width: 13px; height: 13px; }
.link { border: 0; background: none; color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px; border-radius: 6px; }
.link:hover { color: var(--ink); background: var(--soft); }
.link svg { width: 13px; height: 13px; }
.as-btn { border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.select-pill { border: 0; background: var(--soft-2); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--ink-2); font-family: inherit; }
.search-pill { display: flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 0 12px; color: var(--ink-3); }
.search-pill input { border: 0; background: none; padding: 7px 0; width: 150px; font-size: 12.5px; outline: 0; }
.note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: #fff8ec; border: 1px solid #f6e5c4; color: var(--ink-2); font-size: 12.5px; }
.note > svg { color: #b7791f; }
.note > span { flex: 1; }
.sub-filter { margin-bottom: 10px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.kpis.five { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { color: var(--ink-3); font-size: 12px; }
.kpi b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b.neg { color: var(--bad); }
.kpi em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.kpi em.up { color: var(--ok); }
.kpi em.down { color: var(--bad); }

.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Chart */
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .tip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-box { position: relative; }
.chart-box svg { display: block; }
.chart-box .ax { font-size: 11px; fill: var(--ink-3); font-family: inherit; font-variant-numeric: tabular-nums; }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); min-width: 170px; z-index: 2; }
.tip b { display: block; margin-bottom: 4px; font-weight: 600; }
.tip div { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip div span { margin-left: auto; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); }
.hb-top b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.hb-track { height: 6px; border-radius: 99px; background: var(--soft-2); margin-top: 4px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; background: #2b2b31; }

/* Agenda & mini rows */
.agenda { display: flex; flex-direction: column; gap: 4px; }
.ag-item { display: flex; align-items: stretch; gap: 10px; border: 0; background: none; text-align: left; padding: 6px 6px; border-radius: 10px; }
.ag-item:hover { background: var(--soft); }
.ag-item.past { opacity: .5; }
.ag-time { width: 40px; font-size: 12px; color: var(--ink-3); padding-top: 1px; font-variant-numeric: tabular-nums; }
.ag-bar { width: 4px; border-radius: 4px; background: var(--fg); }
.ag-text { display: flex; flex-direction: column; min-width: 0; }
.ag-text b { font-weight: 500; }
.ag-text span { font-size: 12px; color: var(--ink-3); }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; }
.mini-row.as-btn:hover { background: var(--soft); }
.mini-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-row .grow small { color: var(--ink-3); font-size: 11.5px; }
.mini-row b { margin-left: auto; font-weight: 500; }
.sw-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--fg); flex-shrink: 0; }

/* Agent cards on overview */
.agent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.agent-card { background: var(--bg); color: var(--fg); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ac-top { display: flex; align-items: center; gap: 10px; }
.ag-ic { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .65); display: grid; place-items: center; }
.ac-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ac-title b { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-title span { font-size: 11.5px; opacity: .8; }
.ac-status { font-size: 12px; min-height: 34px; display: flex; gap: 6px; align-items: flex-start; }
.ac-status .busy { margin-top: 5px; }
.ac-actions { display: flex; gap: 8px; align-items: center; }
.agent-card .round { background: rgba(255, 255, 255, .7); color: var(--fg); box-shadow: none; }

/* Empty hero */
.hero-empty { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 18px; background: linear-gradient(120deg, #ebe4fd, #ddf0fb 50%, #d5f4e3); flex-wrap: wrap; }
.hero-empty h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.hero-empty p { margin: 0; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; gap: 8px; }

/* ── Kalender ── */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.seg-btn { border: 0; background: #fff; padding: 6px 12px; font-size: 12px; font-weight: 500; display: grid; place-items: center; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn:hover { background: var(--soft); }
.seg-btn svg { width: 14px; height: 14px; }
.cal-wrap { border-top: 1px solid var(--line); overflow: auto; flex: 1; min-height: 420px; max-height: calc(100vh - 210px); position: relative; }
.cal { min-width: 820px; }
.cal-row { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.cal-dh { text-align: center; padding: 6px 0; font-size: 12px; color: var(--ink-2); font-weight: 500; border-left: 1px solid var(--line); }
.cal-dh.on { background: var(--black); color: #fff; border-color: var(--black); }
.cal-axis { font-size: 11.5px; color: var(--ink-2); position: relative; }
.cal-axis.small { padding: 8px 0 0 12px; color: var(--ink-3); }
.cal-lane { border-bottom: 1px solid var(--line); min-height: 36px; }
.cal-lc { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.dl-chip { display: flex; align-items: center; gap: 4px; border: 0; border-radius: 6px; background: var(--bg); color: var(--fg); padding: 3px 6px; font-size: 11px; font-weight: 500; text-align: left; min-width: 0; }
.dl-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-chip svg { width: 11px; height: 11px; }
.cal-body { position: relative; }
.cal-axis.hours span { position: absolute; left: 16px; transform: translateY(-50%); margin-top: 1px; }
.cal-axis.hours span:first-child { transform: none; margin-top: 4px; }
.cal-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--line) calc(var(--row) - 1px), var(--line) var(--row)); cursor: copy; }
.wkend { background-color: #fafafa; }
.ev { position: absolute; border-radius: 8px; background: var(--bg); color: var(--fg); padding: 6px 8px; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 2px #fff; }
.ev:hover { filter: brightness(.98); }
.ev .tt { font-size: 12px; font-weight: 500; padding-right: 18px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.ev .ts { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .more { position: absolute; right: 3px; top: 3px; border: 0; background: none; color: inherit; padding: 2px 3px; border-radius: 6px; line-height: 0; }
.ev .chip-ok { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: #fff; color: var(--ink-2); border-radius: 999px; padding: 2px 8px 2px 4px; font-size: 10.5px; font-weight: 500; }
.ev .chip-ok svg { width: 12px; height: 12px; color: var(--ok); }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--black); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--black); }
.now-pill { position: absolute !important; left: auto !important; right: 4px; transform: translateY(-50%) !important; margin: 0 !important; background: var(--black); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 500; z-index: 3; }
.cal-foot { border-top: 1px solid var(--line); }
.cal-fc { border-left: 1px solid var(--line); display: grid; place-items: center; padding: 14px 0; }

/* ── Kanban ── */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; padding: 0 28px 28px 40px; overflow-x: auto; align-items: start; }
.kcol { background: var(--soft); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 240px; transition: background .15s; }
.kcol.over { background: #ececef; box-shadow: inset 0 0 0 2px #d0d0d6; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 8px; font-weight: 500; }
.kcol-head span:first-child { flex: 1; }
.kcol-body { display: flex; flex-direction: column; gap: 8px; }
.k-empty { color: var(--ink-3); font-size: 12px; text-align: center; padding: 20px 0; border: 1px dashed var(--line-2); border-radius: 12px; }
.kcard { background: var(--bg); color: var(--fg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: grab; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.kcard.dragging { opacity: .5; }
.kcard .tt { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.kcard .ts { font-size: 12px; opacity: .85; }
.k-top { display: flex; align-items: center; justify-content: space-between; }
.k-div { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; font-weight: 500; opacity: .9; }
.k-div svg { width: 12px; height: 12px; }
.kcard .more { border: 0; background: none; color: inherit; padding: 2px 4px; border-radius: 6px; line-height: 0; }
.kcard .more:hover { background: rgba(0, 0, 0, .06); }
.k-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.k-dl, .k-pr { font-size: 10.5px; font-weight: 500; background: rgba(255, 255, 255, .75); color: var(--ink-2); border-radius: 999px; padding: 2px 8px; display: inline-flex; gap: 4px; align-items: center; }
.k-dl svg { width: 11px; height: 11px; }
.k-dl.bad { background: #fff; color: var(--bad); }
.k-dl.warn { background: #fff; color: #8a5f12; }
.k-pr.p-tinggi { color: var(--bad); }
.k-agent { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; border: 0; background: #fff; color: var(--ink-2); border-radius: 8px; padding: 6px 8px; text-align: left; }
.k-agent svg { width: 13px; height: 13px; color: var(--ok); }
.k-agent.bad svg { color: var(--bad); }
.k-run { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; font-weight: 500; border: 0; background: var(--black); color: #fff; border-radius: 8px; padding: 6px 8px; }
.k-run svg { width: 13px; height: 13px; }
.k-run:disabled { opacity: .4; cursor: not-allowed; }

/* ── Tabel ── */
.table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11.5px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfc; }
.table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #fbfbfb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.muted { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-ink { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; white-space: nowrap; }
.bad-ink { color: var(--bad); }
.warn-ink { color: #8a5f12; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell b { font-weight: 500; }
.who-cell .sub { color: var(--ink-3); font-size: 11.5px; }
.avatar-sm, .avatar-lg { border-radius: 10px; background: var(--bg); color: var(--fg); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar-lg { width: 48px; height: 48px; font-size: 15px; border-radius: 14px; }

/* Klien detail */
.detail-head { display: flex; gap: 14px; align-items: center; }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-stats div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.mini-stats b { font-weight: 500; font-size: 15px; }
.mini-stats span { font-size: 11.5px; color: var(--ink-3); }
.note-box { background: var(--soft); border-radius: 12px; padding: 10px 12px; color: var(--ink-2); font-size: 12.5px; }
.note-box.pre { white-space: pre-wrap; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qa { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 12.5px; text-align: left; }
.qa:hover { background: var(--soft); }
.qa > svg { color: var(--ink-2); }
.result-box { background: var(--soft); border-radius: 12px; padding: 14px 16px; max-height: 50vh; overflow-y: auto; }

/* Otomasi */
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.auto-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.auto-card.off { background: #fcfcfc; }
.auto-card.off .ac-title b, .auto-card.off .ac-prompt { color: var(--ink-3); }
.auto-card .ac-title span { color: var(--ink-3); opacity: 1; }
.ac-prompt { font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-3); }
.ac-meta span { display: flex; align-items: center; gap: 6px; }
.ac-meta svg { width: 13px; height: 13px; }
.auto-card .ac-actions .spacer { flex: 1; }

/* Switch */
.switch-row { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12.5px; font-weight: 500; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { width: 34px; height: 20px; border-radius: 99px; background: #d9d9de; position: relative; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--black); }
.switch-row input:checked + .switch::after { transform: translateX(14px); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(0, 0, 0, .12); }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .switch-row { align-self: end; padding-bottom: 9px; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9aa3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; padding-right: 30px; }
.money { position: relative; }
.money span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 12.5px; }
.money input { padding-left: 34px; font-variant-numeric: tabular-nums; }
.modal-box.wide { width: min(880px, 100%); }
.result-link.sel { background: var(--soft); }

@media (max-width: 1200px) {

  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .kpis, .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .agent-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kanban { padding: 0 16px 20px; grid-template-columns: repeat(4, minmax(240px, 1fr)); }
  .cal-wrap { max-height: 70vh; }
  .quick, .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .search-pill input { width: 110px; }
}
.chart-empty { display: grid; place-items: center; color: var(--ink-3); font-size: 12.5px; border: 1px dashed var(--line-2); border-radius: 12px; }

/* ── Riwayat percakapan agent ── */
.chat-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; height: calc(100vh - 230px); min-height: 480px; }
.chat-layout.list-hidden { grid-template-columns: minmax(0, 1fr); }
.chat-layout.list-hidden .conv-panel { display: none; }
.chat-layout .chat { height: auto; min-height: 0; }
.conv-panel { border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: #fcfcfc; }
.conv-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; }
.conv-head .spacer { flex: 1; }
.conv-search { margin: 0 10px 8px; background: #fff; border: 1px solid var(--line); }
.conv-search input { width: 100%; }
.conv-items { flex: 1; overflow-y: auto; padding: 0 6px 10px; }
.conv-group { font-size: 11px; color: var(--ink-3); padding: 10px 8px 4px; font-weight: 500; }
.conv-item { display: flex; gap: 8px; padding: 8px 10px; border-radius: 12px; cursor: pointer; align-items: flex-start; outline: 0; }
.conv-item:hover, .conv-item:focus-visible { background: var(--soft-2); }
.conv-item.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .04); }
.conv-item.draft .ci-title { color: var(--ink-2); }
.ci-main { flex: 1; min-width: 0; }
.ci-title { font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ci-title svg { width: 13px; height: 13px; }
.ci-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.ci-time { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.ci-actions { display: none; }
.conv-item:hover .ci-actions, .conv-item.on .ci-actions { display: flex; }
.conv-item:hover .ci-time { display: none; }
.ci-actions .ghost-btn { padding: 3px; }
.ci-actions svg { width: 13px; height: 13px; }
.conv-empty { color: var(--ink-3); font-size: 12px; text-align: center; padding: 24px 8px; }
.conv-title { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 40%; }
.chat-bar .spacer { flex: 1; }
.chat-bar .skills { flex: 0 1 auto; }
.composer textarea:disabled { opacity: .6; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .chat-layout .conv-panel { max-height: 340px; }
  .chat-layout:not(.list-hidden) .chat { display: none; }
  .chat-layout .chat { height: 72vh; }
  .chat-bar .skills { display: none; }
  .conv-title { max-width: none; flex: 1; }
}

/* ═════════ Pengaturan ═════════ */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 0 28px 28px 40px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.set-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 12px; border-radius: 10px; text-align: left; font-weight: 500; color: var(--ink-2); }
.set-item:hover { background: var(--soft); color: var(--ink); }
.set-item.on { background: var(--black); color: #fff; }
.set-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-sec { border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.set-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.set-sec-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.set-sec-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; max-width: 640px; }
svg.i.ok { color: var(--ok); }
.perm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.perm-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.perm-x { width: 16px; text-align: center; color: var(--ink-3); }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.kv > div:first-child { border-top: 0; }
.kv span { color: var(--ink-3); }
.kv b { font-weight: 500; text-align: right; display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.kbd { font-size: 11px; }

/* Agent admin */
.agent-admin { display: flex; flex-direction: column; gap: 8px; }
.aa-card { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.aa-card.off { background: #fbfbfb; }
.aa-card.off .aa-title b, .aa-card.off .aa-desc { color: var(--ink-3); }
.aa-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--fg); flex-shrink: 0; }
.aa-info { flex: 1; min-width: 0; }
.aa-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aa-title b { font-weight: 600; }
.aa-desc { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.aa-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.aa-meta span { font-size: 11px; color: var(--ink-3); background: var(--soft); border-radius: 99px; padding: 1px 8px; }
.aa-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; color: var(--ink-2); }
.pick:hover { border-color: var(--ink-3); }
.pick.on { border-color: var(--black); box-shadow: 0 0 0 2px var(--black) inset; color: var(--ink); }
.pick.swatch span { width: 20px; height: 20px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; }
.check input { accent-color: var(--black); width: 15px; height: 15px; }
.btn.danger-bg { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Upload skill */
.drop { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); background: #fcfcfc; transition: background .15s, border-color .15s; }
.drop > svg { width: 26px; height: 26px; color: var(--ink-3); }
.drop span { color: var(--ink-3); font-size: 12px; }
.drop.over { border-color: var(--black); background: var(--soft); }
.drop label.btn { cursor: pointer; }
.up-list { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.up-head { display: flex; align-items: center; gap: 8px; }
.up-head .spacer { flex: 1; }
.up-file { font-size: 11.5px; padding-left: 24px; }

/* Tim */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.role-card { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.role-card span { font-size: 12px; color: var(--ink-3); }
.role-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rp { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; cursor: pointer; align-items: flex-start; }
.rp:has(input:checked) { border-color: var(--black); box-shadow: 0 0 0 1px var(--black) inset; }
.rp input { accent-color: var(--black); margin-top: 3px; }
.rp span { display: flex; flex-direction: column; gap: 2px; }
.rp small { color: var(--ink-3); font-size: 11.5px; line-height: 1.4; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; }

/* Akses Claude */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-grid .full { grid-column: 1 / -1; }
.mode { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; position: relative; }
.mode input { position: absolute; opacity: 0; }
.mode > b { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.mode > span { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.mode.on { border-color: var(--black); box-shadow: 0 0 0 1px var(--black) inset; }
.addr { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.addr span { font-size: 12px; }
small.muted { font-size: 11.5px; }

/* Akun di sidebar */
.account { padding: 8px 0 0; }
.account-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px; border-radius: 14px; text-align: left; }
.account-btn:hover { background: rgba(255, 255, 255, .6); }
.account-btn > svg { color: var(--ink-3); width: 14px; height: 14px; }
.account-btn .who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.account-btn .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell.collapsed .account-btn > svg { display: none; }

/* Login & undangan */
.auth { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: radial-gradient(120% 70% at 0% 0%, var(--shell-a), var(--page) 60%); }
.auth[hidden] { display: none; }
body.auth-mode .shell { display: none; }
.auth-card { width: min(400px, 100%); background: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .3); }
.auth-card h1 { margin: 6px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.auth-card p { margin: 0; color: var(--ink-2); }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.btn.wide { width: 100%; justify-content: center; padding: 10px 14px; font-size: 13px; }
.auth-err { background: #fdeeee; color: var(--bad); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; }
.small { font-size: 12px; }

@media (max-width: 900px) {
  .settings { grid-template-columns: minmax(0, 1fr); padding: 0 16px 20px; }
  .set-nav { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; }
  .set-item { white-space: nowrap; }
  .perm-list, .mode-grid, .role-pick { grid-template-columns: minmax(0, 1fr); }
  .aa-card { flex-wrap: wrap; }
  .aa-actions { width: 100%; justify-content: flex-end; }
  .set-sec-head { flex-direction: column; }
}

/* ═════════ Branding ═════════ */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-txt b { font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-top { gap: 8px; }
.logo { flex-shrink: 0; }
.logo.has-img { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .04); overflow: hidden; padding: 0; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shell.collapsed .brand-txt { display: none; }
.ok-ink { color: var(--ok); display: inline-flex; align-items: center; gap: 5px; }
.logo-row { display: flex; gap: 16px; align-items: center; }
.logo-prev { width: 76px; height: 76px; border-radius: 18px; background: var(--soft); display: grid; place-items: center; flex-shrink: 0; }
.logo-prev .logo { width: 52px; height: 52px; border-radius: 15px; gap: 4px; }
.logo-prev .logo span { width: 4.5px; height: 15px; }
.logo-prev .logo span:nth-child(2) { height: 21px; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; }
.pick.swatch { padding: 0; }
.pick.swatch span { width: 22px; height: 22px; }
.pick.custom { position: relative; cursor: pointer; overflow: hidden; }
.pick.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.brand-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* Pratinjau */
.bp { display: grid; grid-template-columns: 190px minmax(0, 1fr); border-radius: 20px; padding: 8px; background: radial-gradient(120% 70% at 0% 0%, var(--shell-a) 0%, var(--shell-b) 60%); border: 1px solid var(--line); }
.bp-side { padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.bp-side .brand { margin-bottom: 14px; }
.bp-side .logo { width: 30px; height: 30px; border-radius: 9px; }
.bp-nav { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.bp-nav.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.bp-main { background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bp-row .spacer { flex: 1; }
.bp-row .btn, .bp-row .pill { pointer-events: none; }
.bp-cal { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 11.5px; text-align: center; color: var(--ink-2); }
.bp-cal span { padding: 5px 0; }
.bp-cal span.on { background: var(--black); color: #fff; }
.bp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 900px) {
  .brand-txt span { display: none; }
  .bp { grid-template-columns: minmax(0, 1fr); }
  .bp-side { flex-direction: row; flex-wrap: wrap; }
  .bp-side .brand { width: 100%; margin-bottom: 6px; }
  .logo-row { flex-direction: column; align-items: flex-start; }
}
