/* Mockup Agen AI Asuransi Umum. Fictional data, blank branding. */
:root {
  color-scheme: light;
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f4;
  --border: #e4e7ed;
  --border-strong: #d3d8e1;
  --text: #151a26;
  --text-2: #4f5668;
  --muted: #858c9c;
  --primary: #3445cf;
  --primary-hover: #2a39b3;
  --primary-soft: #eceefd;
  --primary-ink: #ffffff;
  --success: #0b7a47;
  --success-soft: #e5f5ec;
  --warning: #9a5b00;
  --warning-soft: #fff3db;
  --danger: #c0312f;
  --danger-soft: #fdeceb;
  --info: #1f6fb2;
  --info-soft: #e6f1fb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);
  --radius: 12px;
  --radius-sm: 8px;
  /* chat (own colours, not a copy of any messenger) */
  --chat-head: #232a4d;
  --chat-head-ink: #ffffff;
  --chat-bg: #ecebe6;
  --chat-in: #ffffff;
  --chat-out: #dde2ff;
  --chat-ink: #151a26;
  --chat-meta: #6b7183;
  --device: #10131c;
  /* charts (validated reference palette) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #e9ebf0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1017;
    --surface: #151922;
    --surface-2: #1a1f2a;
    --surface-3: #202634;
    --border: #252b38;
    --border-strong: #323a4a;
    --text: #e7e9ef;
    --text-2: #a9afbd;
    --muted: #7b8293;
    --primary: #7f8cff;
    --primary-hover: #9aa4ff;
    --primary-soft: #232a52;
    --primary-ink: #0d1017;
    --success: #4cc68a;
    --success-soft: #12301f;
    --warning: #f0b44c;
    --warning-soft: #33270f;
    --danger: #f07a77;
    --danger-soft: #3a1818;
    --info: #6cb3ef;
    --info-soft: #132a3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
    --chat-head: #1b2140;
    --chat-bg: #0f1219;
    --chat-in: #1e2330;
    --chat-out: #2a3170;
    --chat-ink: #e7e9ef;
    --chat-meta: #9097a8;
    --device: #000000;
    --series-1: #3987e5;
    --series-2: #d95926;
    --grid: #232937;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1017;
  --surface: #151922;
  --surface-2: #1a1f2a;
  --surface-3: #202634;
  --border: #252b38;
  --border-strong: #323a4a;
  --text: #e7e9ef;
  --text-2: #a9afbd;
  --muted: #7b8293;
  --primary: #7f8cff;
  --primary-hover: #9aa4ff;
  --primary-soft: #232a52;
  --primary-ink: #0d1017;
  --success: #4cc68a;
  --success-soft: #12301f;
  --warning: #f0b44c;
  --warning-soft: #33270f;
  --danger: #f07a77;
  --danger-soft: #3a1818;
  --info: #6cb3ef;
  --info-soft: #132a3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
  --chat-head: #1b2140;
  --chat-bg: #0f1219;
  --chat-in: #1e2330;
  --chat-out: #2a3170;
  --chat-ink: #e7e9ef;
  --chat-meta: #9097a8;
  --device: #000000;
  --series-1: #3987e5;
  --series-2: #d95926;
  --grid: #232937;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- buttons, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 36px; padding: 0; justify-content: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-primary { background: var(--primary-soft); color: var(--primary); }
.b-success { background: var(--success-soft); color: var(--success); }
.b-warning { background: var(--warning-soft); color: var(--warning); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-info { background: var(--info-soft); color: var(--info); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); min-height: 56px; }
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.card-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.45; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.note .icon { margin-top: 1px; }
.note.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.note.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.note.primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.note b { font-weight: 700; }

/* ---------- grid helpers ---------- */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.mono, .t td .badge { white-space: nowrap; }
.t tr.sel td { background: var(--primary-soft); }
.t .strong { font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); min-width: 220px; font-size: 13px; }
.select { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; color: var(--text-2); font-weight: 500; }

/* key-value list (detail card) */
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0; font-size: 13px; }
.kv dt { color: var(--muted); padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px dashed var(--border); font-weight: 600; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* ---------- console shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; height: 68px; border-bottom: 1px solid var(--border); }
.logo-ph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px dashed var(--border-strong); color: var(--muted); font-size: 8.5px; font-weight: 700; letter-spacing: .02em; flex: none; }
.brand .name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.brand .name small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--primary); color: var(--primary-ink); }
.nav a .count { margin-left: auto; font-size: 11.5px; background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 0 7px; line-height: 19px; }
.nav a.active .count { background: rgba(255, 255, 255, .22); color: var(--primary-ink); }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .search { flex: 0 1 340px; }
.topbar .spacer { flex: 1; }
.user { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12.5px; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.user .who { line-height: 1.25; font-size: 13px; font-weight: 600; }
.user .who small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.content { padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foot { padding: 0 28px 24px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.menu-btn { display: none; }
.scrim { display: none; }

/* KPI tiles */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.kpi .meta { font-size: 12px; color: var(--muted); }
.kpi .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: inherit; fill: var(--muted); font-size: 11px; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .lbl { fill: var(--text-2); font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; display: none; min-width: 120px; }
.tip b { display: block; margin-bottom: 2px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b"; gap: 5px 10px; align-items: center; font-size: 13px; padding: 7px 0; }
.hbar > span:first-child { grid-area: l; color: var(--text-2); }
.hbar .track { grid-area: b; }
.hbar .track { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-3); position: relative; }
.hbar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--series-1); }
.hbar .v { grid-area: v; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- hub ---------- */
.hub { max-width: 1180px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 28px; }
.hub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.hub-head h1 { font-size: 28px; letter-spacing: -.02em; max-width: 640px; line-height: 1.2; }
.hub-head p { color: var(--text-2); max-width: 620px; margin-top: 8px; }
.screen-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; }
.screen-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--text); }
.screen-item:hover { background: var(--surface-2); text-decoration: none; }
.screen-item .num { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 7px; height: fit-content; }
.screen-item h4 { font-size: 14px; margin-bottom: 3px; }
.screen-item p { font-size: 12.5px; color: var(--text-2); }

/* ---------- customer (chat) layout ---------- */
.cust { max-width: 1180px; margin: 0 auto; padding: 28px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 32px; align-items: start; }
.cust-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; }
.cust-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.cust-nav a { padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.cust-nav a.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.cust-nav a:hover { text-decoration: none; }
.cust h1 { font-size: 24px; letter-spacing: -.02em; line-height: 1.25; }
.cust .lead { color: var(--text-2); margin-top: 6px; font-size: 14.5px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.steps h4 { font-size: 13.5px; margin-bottom: 2px; }
.steps p { font-size: 13px; color: var(--text-2); }
.steps .role { display: inline-block; margin-top: 6px; }

.phone-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.channel-tag { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.phone { width: 390px; height: 800px; border-radius: 46px; background: var(--device); padding: 11px; box-shadow: var(--shadow-lg); position: relative; }
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; background: var(--chat-bg); }
.phone.full { height: auto; }
.phone.full .screen { height: auto; }
.phone.full .chat-body { overflow: visible; flex: none; }
.statusbar { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; font-size: 12.5px; font-weight: 700; background: var(--chat-head); color: var(--chat-head-ink); }
.statusbar .sig { display: flex; gap: 5px; align-items: center; }
.statusbar .sig i { width: 16px; height: 9px; border-radius: 2px; border: 1.5px solid currentColor; display: inline-block; }
.chat-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; background: var(--chat-head); color: var(--chat-head-ink); }
.chat-head .logo-ph { border-color: rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .8); width: 36px; height: 36px; border-radius: 50%; font-size: 8px; }
.chat-head .t { line-height: 1.25; flex: 1; min-width: 0; }
.chat-head .t b { font-size: 14.5px; display: flex; align-items: center; gap: 5px; }
.chat-head .t small { font-size: 11.5px; opacity: .75; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 10px 14px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.chat-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 14px; background: var(--chat-bg); }
.chat-foot .inp { flex: 1; height: 40px; border-radius: 20px; background: var(--chat-in); color: var(--chat-meta); display: flex; align-items: center; padding: 0 14px; font-size: 13.5px; }
.chat-foot .mic { width: 40px; height: 40px; border-radius: 50%; background: var(--chat-head); color: #fff; display: grid; place-items: center; }
.day { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--chat-meta); background: var(--chat-in); border-radius: 7px; padding: 3px 10px; margin: 4px 0; }
.sys { align-self: center; max-width: 92%; text-align: center; font-size: 11.5px; color: var(--chat-meta); background: color-mix(in srgb, var(--chat-in) 70%, transparent); border-radius: 8px; padding: 5px 10px; margin: 3px 0; }
.msg { max-width: 84%; padding: 7px 10px 6px; border-radius: 12px; font-size: 13.5px; line-height: 1.42; color: var(--chat-ink); position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.msg.in { align-self: flex-start; background: var(--chat-in); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--chat-out); border-top-right-radius: 4px; }
.msg .meta { display: block; text-align: right; font-size: 10.5px; color: var(--chat-meta); margin-top: 2px; }
.msg .agent { display: block; font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.msg p + p { margin-top: 6px; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg .src { margin-top: 7px; padding: 6px 8px; border-radius: 7px; background: color-mix(in srgb, var(--chat-in) 75%, transparent); border-left: 3px solid var(--primary); font-size: 11.5px; color: var(--chat-meta); display: flex; gap: 6px; }
.msg.out .src { background: color-mix(in srgb, #ffffff 55%, transparent); }
:root[data-theme="dark"] .msg.out .src { background: rgba(0, 0, 0, .2); }
.msg .tag-tpl { font-size: 10.5px; font-weight: 700; color: var(--chat-meta); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 3px; }
.quick { align-self: flex-end; display: flex; flex-direction: column; gap: 5px; width: 84%; }
.quick span { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--chat-out); color: var(--primary); border-radius: 10px; padding: 8px; font-weight: 600; font-size: 13px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.verified { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 8px; background: var(--success-soft); color: var(--success); font-size: 12px; margin-top: 4px; }
.linkcard { margin-top: 7px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, #ffffff 60%, transparent); border: 1px solid rgba(0, 0, 0, .06); }
.linkcard .lh { padding: 8px 10px; font-size: 12.5px; }
.linkcard .lh b { display: block; }
.linkcard .lh small { color: var(--chat-meta); }
.linkcard .lb { padding: 8px 10px; text-align: center; font-weight: 700; color: var(--primary); border-top: 1px solid rgba(0, 0, 0, .06); font-size: 13px; }
:root[data-theme="dark"] .linkcard { background: rgba(0, 0, 0, .2); border-color: rgba(255, 255, 255, .08); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 9px; overflow: hidden; margin-bottom: 4px; }
.photos svg, .photo svg { display: block; width: 100%; height: auto; }
.msg.media { padding: 4px 4px 5px; }
.msg.media .cap { padding: 3px 6px 0; }
.checklist { list-style: none; margin: 7px 0 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
.checklist li { display: flex; gap: 7px; align-items: flex-start; }
.ck { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center; margin-top: 1px; }
.ck.ok { background: var(--success); color: #fff; }
.ck.wait { border: 1.5px solid var(--warning); }
.ck.no { background: var(--danger); color: #fff; }
.ck.opt { border: 1.5px dashed var(--chat-meta); }
.ck .icon { width: 10px; height: 10px; stroke-width: 3; }
.ocr { margin-top: 7px; border-radius: 8px; background: color-mix(in srgb, #ffffff 60%, transparent); padding: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 6px; }
:root[data-theme="dark"] .ocr { background: rgba(0, 0, 0, .2); }
.ocr .r { display: flex; justify-content: space-between; gap: 8px; }
.ocr .r span:first-child { color: var(--chat-meta); }
.ocr .bad { color: var(--danger); font-weight: 700; }
.ocr .good { color: var(--success); font-weight: 700; }
.triage { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--warning-soft); color: var(--warning); margin-top: 6px; }
.voice { display: flex; align-items: center; gap: 9px; min-width: 230px; }
.voice .play { width: 32px; height: 32px; border-radius: 50%; background: var(--chat-head); color: #fff; display: grid; place-items: center; flex: none; }
.voice .wave { flex: 1; height: 26px; display: flex; align-items: center; gap: 2px; }
.voice .wave i { flex: 1; background: var(--chat-meta); opacity: .55; border-radius: 2px; }
.transcript { margin-top: 6px; padding: 7px 8px; border-radius: 7px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.transcript b { color: var(--text); font-size: 11px; display: block; margin-bottom: 2px; }
.payment { margin-top: 7px; border-radius: 9px; background: color-mix(in srgb, #ffffff 60%, transparent); padding: 10px; font-size: 12.5px; }
:root[data-theme="dark"] .payment { background: rgba(0, 0, 0, .2); }
.payment .amt { font-size: 18px; font-weight: 700; margin: 2px 0 6px; }

/* ---------- console specifics ---------- */
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; height: calc(100vh - 68px - 24px - 88px); min-height: 640px; overflow: hidden; }
.inbox > div { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.inbox .col-list { border-right: 1px solid var(--border); }
.inbox .col-copilot { border-left: 1px solid var(--border); background: var(--surface-2); }
.col-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.conv-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.conv-item .body { min-width: 0; flex: 1; }
.conv-item .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.conv-item .top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .top small { color: var(--muted); white-space: nowrap; font-size: 11.5px; }
.conv-item .snip { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 6px; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); min-height: 64px; }
.thread-head .t { flex: 1; min-width: 0; line-height: 1.3; }
.thread-head .t b { font-size: 14px; }
.thread-head .t small { display: block; color: var(--muted); font-size: 12px; }
.thread { background: var(--surface-2); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.thread .msg { max-width: 78%; }
.thread .msg.in { background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.thread .msg.out { background: var(--primary-soft); box-shadow: none; }
.thread .sys { background: var(--surface-3); color: var(--text-2); }
.reply-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.reply-bar .inp { flex: 1; height: 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 13px; }
.cop-sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cop-sec:last-child { border-bottom: 0; }
.cop-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.cop-sec p { font-size: 13px; color: var(--text); }
.draft { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.srcs { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.srcs span { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.todo li { display: flex; gap: 8px; align-items: flex-start; }
.box { width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 4px; flex: none; margin-top: 2px; }

.claim-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.claim-head .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.claim-head h1 { font-size: 20px; }
.claim-head .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; align-items: center; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery .photo { border-radius: 9px; overflow: hidden; border: 1px solid var(--border); }
.gallery figcaption { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.reasons li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.reasons .n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--warning-soft); color: var(--warning); }
.reasons .n.i { background: var(--surface-3); color: var(--text-2); }
.reasons b { display: block; }
.reasons span { color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.bad::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.timeline time { color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare .photo { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); position: relative; }
.compare .tag { position: absolute; top: 8px; left: 8px; }
.compare h4 { font-size: 13.5px; margin: 10px 0 4px; }
.flow { display: flex; flex-direction: column; gap: 0; }
.flow .st { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; font-size: 13px; }
.flow .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.flow .done .dot { background: var(--success-soft); color: var(--success); }
.flow .now .dot { background: var(--warning-soft); color: var(--warning); }
.flow small { display: block; color: var(--muted); font-size: 12px; }
.map svg { width: 100%; height: auto; display: block; }
.area { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.area:last-child { border-bottom: 0; }
.area small { color: var(--muted); grid-column: 1 / -1; font-size: 12px; }
.preview-bubble { background: var(--chat-bg); border-radius: 10px; padding: 12px; }
.preview-bubble .msg { max-width: 100%; }
.toggle { width: 38px; height: 22px; border-radius: 11px; background: var(--primary); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.toggle.off { background: var(--border-strong); }
.toggle.off::after { right: auto; left: 3px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tabs a { padding: 12px 12px; font-weight: 600; font-size: 13px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; width: 80px; }
.spark i { flex: 1; background: var(--series-1); border-radius: 2px 2px 0 0; min-height: 2px; }
.demo-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 600; }
textarea.fake { width: 100%; min-height: 64px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: 9px 11px; font: inherit; font-size: 13px; resize: vertical; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 60; display: none; }

/* demo controls (hidden in screenshots) */
.demo-ctl { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-lg); align-items: center; }
.demo-ctl span { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.shot .demo-ctl { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .inbox { grid-template-columns: 270px minmax(0, 1fr) 320px; }
  .g-main-side { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 260px minmax(0, 1fr); height: auto; }
  .inbox .col-copilot { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
  .cust { grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
  .user .who { display: none; }
  .content { padding: 18px 16px 24px; }
  .foot { padding: 0 16px 20px; }
  .g-2, .g-3, .g-main-side { grid-template-columns: minmax(0, 1fr); }
  .cust { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 32px; }
  .cust-side { position: static; order: 2; }
  .phone-col { order: 1; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox .col-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 280px; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .hub { padding: 24px 16px 40px; }
  .hub-head h1 { font-size: 23px; }
  .phone { width: 100%; max-width: 390px; height: 720px; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .phone .screen { border-radius: 14px; border: 1px solid var(--border); }
  .kpi .value { font-size: 22px; }
  .page-head h1 { font-size: 19px; }
  .t th, .t td { padding: 10px 14px; }
  .card-head, .card-body, .toolbar { padding-left: 14px; padding-right: 14px; }
  .search { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- fixes after screenshot review ---- */
/* customer's own phone: customer on the right, insurer on the left */
.phone .msg.in { align-self: flex-end; background: var(--chat-out); border-top-left-radius: 12px; border-top-right-radius: 4px; }
.phone .msg.out { align-self: flex-start; background: var(--chat-in); border-top-right-radius: 12px; border-top-left-radius: 4px; }
.phone .quick { align-self: flex-start; }
.phone .quick span { background: var(--chat-in); }
.phone .msg.out .src, .phone .msg.out .ocr, .phone .msg.out .payment, .phone .msg.out .linkcard { background: var(--surface-2); }
.phone .msg.in .transcript { background: color-mix(in srgb, #ffffff 55%, transparent); }
:root[data-theme="dark"] .phone .msg.in .transcript { background: rgba(0, 0, 0, .2); }
.preview-bubble .msg.out { background: var(--chat-in); }
.preview-bubble .msg.out .src { background: var(--surface-2); }
/* sidebar column background reaches the bottom in long pages */
.shell { background: linear-gradient(90deg, var(--surface) 0 251px, var(--border) 251px 252px, transparent 252px); }
.sidebar { border-right: 0; }
.tabs a { white-space: nowrap; }
.inbox .tabs a { padding: 12px 8px; }
@media (max-width: 900px) { .shell { background: none; } .sidebar { border-right: 1px solid var(--border); } }
@media (max-width: 640px) { .table-wrap .t { min-width: 600px; } }

/* "Menu utama" button on every screen (for presentations) */
.btn-home { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn-home:hover { background: var(--primary-soft); color: var(--primary-hover); }
@media (max-width: 380px) { .topbar .btn-home span { display: none; } .topbar .btn-home { width: 36px; padding: 0; justify-content: center; } }
