/* ============================================================
   Agent A — widgets (Shadow base + dashboard additions)
   ============================================================ */

/* ---- inline SVG peso sign (font-independent ₱) ---- */
.peso-mk { display: inline-block; width: 0.6em; height: 0.74em; vertical-align: -0.04em; margin-right: 0.03em; flex: none; }
.money { white-space: nowrap; }

/* donut center label as an HTML overlay (so it can hold the SVG peso) */
.donut-wrap { position: relative; display: inline-flex; flex: none; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--text); pointer-events: none; }

/* ---- dashboard flow layout ---- */
.dash { display: flex; flex-direction: column; gap: 16px; }
.statrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .statrow { grid-template-columns: repeat(2, 1fr); } .grid2 { grid-template-columns: 1fr; } }

/* ---- KPI / stat cards ---- */
.kpi-card { padding: 15px 17px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, hsl(258 40% 14% / 0.5), hsl(257 42% 9% / 0.6)); position: relative; transition: 0.15s; }
.kpi-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: hsl(263 60% 50% / 0.16); color: var(--accent); }
.kpi-card .live { padding: 3px 8px; font-size: 10px; }
.kpi-label { margin-top: 13px; }
.kpi-val { font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin-top: 5px; line-height: 1; }
.kpi-val.neg { color: var(--destructive); }
.kpi-val.sm { font-size: 22px; }
.kpi-meta { font-size: 11.5px; color: var(--faint); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
/* red "follow ups due today" stat */
.kpi-card.alert { border-color: hsl(0 84% 62% / 0.4); background: hsl(0 60% 24% / 0.18); }
.kpi-card.alert .kpi-ico { background: hsl(0 84% 62% / 0.18); color: var(--destructive); }
.kpi-card.alert .kpi-val { color: var(--destructive); }
.kpi-card.alert .live { color: var(--destructive); border-color: hsl(0 84% 62% / 0.35); background: hsl(0 84% 62% / 0.12); }
.kpi-card.alert .live .pulse { background: var(--destructive); animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 hsl(0 84% 62% / 0.5); } 70% { box-shadow: 0 0 0 7px hsl(0 84% 62% / 0); } }

/* ---- Pipeline funnel ---- */
.pipe-grid { display: flex; gap: 9px; }
.pipe-stage { flex: 1; padding: 12px 12px 13px; border-radius: var(--r); border: 1px solid var(--border);
  background: hsl(258 38% 12% / 0.45); transition: 0.15s; cursor: pointer; position: relative; overflow: hidden; }
.pipe-stage:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pipe-stage .ps-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--primary); opacity: 0.7; }
.pipe-stage .ps-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; }
.pipe-stage .ps-count { font-family: var(--display); font-size: 26px; font-weight: 700; margin-top: 6px; }
.pipe-stage.active .ps-count { color: var(--primary-glow); }
.pipe-stage.zero .ps-count { color: var(--faint); }
.pipe-stage .ps-due { margin-top: 4px; font-size: 10.5px; font-weight: 700; color: var(--destructive); }
.funnel { display: flex; height: 9px; border-radius: 99px; overflow: hidden; margin: 14px 0 4px; background: hsl(258 30% 18% / 0.5); }
.funnel i { height: 100%; }
.funnel-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 11.5px; color: var(--dim); }
.funnel-legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }

/* ---- follow-up alert banner ---- */
.fu-banner { display: flex; align-items: center; gap: 13px; padding: 14px 18px; border-radius: var(--r-lg);
  border: 1px solid hsl(0 84% 62% / 0.55); background: hsl(0 62% 30% / 0.42); }
.fu-banner .fb-ico { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: hsl(0 84% 62% / 0.28); color: hsl(0 90% 86%); }
.fu-banner .fb-txt { flex: 1; min-width: 0; }
.fu-banner .fb-txt b { font-family: var(--display); font-size: 14px; color: hsl(0 92% 92%); }
.fu-banner .fb-list { font-size: 12.5px; color: hsl(0 75% 88%); margin-top: 3px; }
.fu-banner .link-btn { border-color: hsl(0 84% 62% / 0.6); color: hsl(0 92% 92%); }
html.light .fu-banner { background: hsl(0 75% 96%); border-color: hsl(0 84% 62% / 0.45); }
html.light .fu-banner .fb-txt b { color: hsl(0 72% 42%); }
html.light .fu-banner .fb-list { color: hsl(0 45% 50%); }
html.light .fu-banner .link-btn { color: hsl(0 72% 45%); }

/* ---- Money snapshot ---- */
.money-net { display: flex; align-items: baseline; gap: 10px; }
.money-net .amt { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.money-net .amt.neg { color: var(--destructive); }
.money-net .chg { font-size: 12px; font-weight: 600; }
.io-bar { display: flex; height: 30px; border-radius: var(--r-sm); overflow: hidden; margin: 14px 0 8px; background: hsl(258 30% 18% / 0.5); }
.io-bar .seg { display: flex; align-items: center; padding: 0 11px; font-size: 12px; font-weight: 700; color: white; white-space: nowrap; }
.io-bar .income { background: linear-gradient(90deg, hsl(152 60% 38%), hsl(152 70% 46%)); }
.io-bar .expense { background: linear-gradient(90deg, hsl(0 65% 48%), hsl(0 75% 56%)); justify-content: flex-end; }
.io-legend { display: flex; gap: 18px; font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.io-legend b { color: var(--text); font-family: var(--display); }
.cat-mini { display: flex; flex-direction: column; gap: 9px; }
.cat-mini .row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; }
.cat-mini .cname { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-mini .ctrack { height: 7px; border-radius: 99px; background: hsl(258 30% 18% / 0.6); overflow: hidden; }
.cat-mini .ctrack i { display: block; height: 100%; border-radius: 99px; }
.cat-mini .camt { font-family: var(--display); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 10px; }
.cat-head .mono-label { margin: 0; }
.cat-head .top3 { font-size: 10.5px; color: var(--accent); font-weight: 700; letter-spacing: 0.06em; }
.budget-line { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.budget-line .bl-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; }
.budget-line .bl-top b { font-family: var(--display); }
.budget-track { height: 8px; border-radius: 99px; background: hsl(258 30% 18% / 0.6); overflow: hidden; }
.budget-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ---- Pending tasks ---- */
.task-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.task { display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px; border-radius: var(--r);
  border: 1px solid var(--border); background: hsl(258 38% 12% / 0.45); cursor: pointer; transition: 0.15s; }
.task:hover { border-color: var(--border-2); background: hsl(258 40% 15% / 0.55); }
.task.done { opacity: 0.5; }
.task.done .task-nm { text-decoration: line-through; }
.task-main { flex: 1; min-width: 0; }
.task-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.task-nm { font-size: 13.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.prio { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.prio.urgent { color: var(--destructive); background: hsl(0 84% 62% / 0.15); border: 1px solid hsl(0 84% 62% / 0.35); }
.prio.high { color: var(--primary-glow); background: hsl(263 84% 65% / 0.15); border: 1px solid hsl(263 70% 60% / 0.4); }
.prio.normal { color: var(--dim); background: hsl(258 30% 30% / 0.4); border: 1px solid var(--border); }
.task-due { font-size: 11px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.task-due.over { color: var(--destructive); font-weight: 600; }
.chk { width: 24px; height: 24px; border-radius: 8px; flex: none; border: 1.8px solid var(--border-2);
  display: grid; place-items: center; color: transparent; transition: 0.14s; background: hsl(258 30% 16% / 0.4); }
.chk:hover { border-color: var(--accent); }
.chk.on { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; color: white; }
.chk svg { width: 14px; height: 14px; }

/* ---- Recent activity ---- */
.act { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); cursor: pointer; transition: 0.14s; }
.act:hover { background: hsl(263 40% 24% / 0.3); }
.act + .act { border-top: 1px solid var(--border); }
.act-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 15px; }
.act-mid { flex: 1; min-width: 0; }
.act-nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-meta { font-size: 11px; color: var(--faint); display: flex; gap: 7px; align-items: center; margin-top: 2px; }
.act-tag { padding: 1px 7px; border-radius: 99px; background: hsl(258 30% 26% / 0.5); font-size: 10px; }
.act-amt { font-family: var(--display); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-amt.neg { color: hsl(0 75% 70%); } .act-amt.pos { color: var(--success); }

/* ---- compact list sections (Gmail/Calendar/Workout/Clients/Interviews) ---- */
.sec-row { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: hsl(258 38% 12% / 0.4); }
.sec-row + .sec-row { margin-top: 8px; }
.sec-row .sr-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: hsl(263 60% 50% / 0.14); color: var(--accent); font-size: 15px; }
.sec-row .sr-mid { flex: 1; min-width: 0; }
.sec-row .sr-nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-row .sr-sub { font-size: 11px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-row .sr-right { font-size: 11px; color: var(--dim); text-align: right; flex: none; }
.badge { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.badge.green { color: var(--success); background: hsl(152 70% 48% / 0.14); border: 1px solid hsl(152 70% 48% / 0.35); }
.badge.red { color: var(--destructive); background: hsl(0 84% 62% / 0.14); border: 1px solid hsl(0 84% 62% / 0.35); }
.badge.violet { color: var(--primary-glow); background: hsl(263 84% 65% / 0.15); border: 1px solid hsl(263 70% 60% / 0.4); }
.badge.day { color: var(--warning); background: hsl(38 92% 60% / 0.14); border: 1px solid hsl(38 92% 60% / 0.35); }
.badge.amber { color: var(--warning); background: hsl(38 92% 60% / 0.16); border: 1px solid hsl(38 92% 60% / 0.4); }
.field + .hint, .hint { font-size: 11.5px; color: var(--faint); margin: -4px 0 10px; }


/* Cid — transparent walking companion along the bottom lane */
.walker { position: fixed; bottom: max(8px, env(safe-area-inset-bottom, 0px)); left: 280px; z-index: 38; cursor: pointer; user-select: none; transition: left 12s cubic-bezier(0.42, 0, 0.58, 1); }
.walker.reacting { transition: none; }
.walker.turning { transition: none; }
.walker .walker-body { position: relative; width: 84px; height: 92px; display: grid; place-items: end center; }
.walker .walker-body::before { content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); width: 74px; height: 26px; border-radius: 50%; z-index: -1; background: radial-gradient(50% 60% at 50% 60%, hsl(263 70% 60% / 0.4), transparent 75%); }
html.light .walker .walker-body::before { background: radial-gradient(50% 60% at 50% 60%, hsl(252 25% 25% / 0.22), transparent 75%); }
.walker .walker-img { width: 84px; height: 92px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 3px 5px rgb(0 0 0 / 0.45)); -webkit-user-drag: none; animation: walk-bob 0.5s ease-in-out infinite; }
.walker .walker-body.face-l { transform: none; }       /* art faces LEFT by default: natural when walking left */
.walker .walker-body.face-r { transform: scaleX(-1); } /* mirror so he faces RIGHT when walking right (no moonwalk) */
.walker.busy .walker-img { animation-duration: 0.34s; }
.walker.reacting .walker-img { animation: none; filter: drop-shadow(0 0 10px hsl(263 90% 65% / 0.9)); }
.walker.turning .walker-img { animation: walk-settle 0.78s ease-out; }
/* gentle waddle: bob + slight sway sells a walk cycle on a still frame */
@keyframes walk-bob { 0%,100% { transform: translateY(0) rotate(-1.6deg); } 50% { transform: translateY(-3px) rotate(1.6deg); } }
/* on the turn pause he stands still and levels out */
@keyframes walk-settle { from { transform: translateY(-2px) rotate(1.2deg); } to { transform: translateY(0) rotate(0); } }
.walker .walker-x { position: absolute; top: -6px; right: -2px; z-index: 2; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); background: var(--card-2); color: var(--dim); font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
html.light .walker .walker-x { background: #fff; }
.walker .walker-tip { position: absolute; bottom: 94px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 600; color: var(--dim); background: var(--card-2); border: 1px solid var(--border); border-radius: 99px; padding: 2px 9px; }
html.light .walker .walker-tip { background: #fff; }
.walker .walker-tip.alert { color: #fff; background: hsl(263 70% 52%); border-color: hsl(263 80% 65%); font-weight: 700; }
@media (max-width: 640px) { .walker .walker-body, .walker .walker-img { width: 66px; height: 74px; } }
@media (prefers-reduced-motion: reduce) { .walker .walker-img { animation: none; } }.flash { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--r);
  border: 1px solid hsl(263 70% 60% / 0.4); background: hsl(263 60% 30% / 0.22); color: var(--primary-glow);
  font-size: 13px; font-weight: 600; cursor: pointer; animation: fabIn 0.2s ease; }
html.light .flash { background: hsl(263 70% 92%); color: hsl(263 60% 40%); }

/* connect-google placeholder */
.connect-cta { text-align: center; padding: 14px 12px; color: var(--dim); }
.connect-cta .cc-ico { width: 38px; height: 38px; border-radius: 11px; margin: 0 auto 9px; display: grid; place-items: center;
  background: hsl(263 60% 50% / 0.14); color: var(--accent); }
.connect-cta p { font-size: 12px; margin-bottom: 10px; line-height: 1.45; }

/* workout rings */
.wk-top { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.wk-streak { font-family: var(--display); font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, var(--warning), var(--destructive)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wk-streak-l { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.wk-today { margin-left: auto; }

/* ---- floating action button ---- */
.fab-wrap { position: fixed; right: 26px; bottom: 26px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 480px) { .fab-wrap { right: 16px; bottom: 16px; } }
.fab-menu { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.fab-item { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--card-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: fabIn 0.18s ease; }
.fab-item:hover { border-color: var(--accent); }
@keyframes fabIn { from { opacity: 0; transform: translateY(6px); } }
.fab { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: var(--glow); transition: 0.18s; }
.fab:hover { filter: brightness(1.08); transform: scale(1.04); }
.fab.open { transform: rotate(45deg); }

/* ---- applications page ---- */
.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-row button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; color: var(--dim); }
.filter-row button.on { background: hsl(263 84% 58% / 0.2); border-color: var(--accent); color: var(--primary-glow); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.app-card { padding: 14px 15px; border-radius: var(--r); border: 1px solid var(--border); background: hsl(258 38% 12% / 0.45); transition: 0.15s; }
.app-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.app-card.due-today { border-color: hsl(0 84% 62% / 0.5); background: hsl(0 60% 24% / 0.16); }
.app-card .ac-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.app-card .ac-co { font-family: var(--display); font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.app-card .ac-title { font-size: 12.5px; color: var(--dim); }
.app-card .ac-meta { font-size: 11px; color: var(--faint); margin-top: 9px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stage-pill { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px;
  color: var(--primary-glow); background: hsl(263 84% 65% / 0.15); border: 1px solid hsl(263 70% 60% / 0.4); }

/* ============================================================
   PHASE 3 — charts, board, calendar, heatmap, expenses app, compact dash
   ============================================================ */

/* masonry dashboard — cards pack tight with no row-height gaps */
.masonry { column-count: 3; column-gap: 13px; }
.masonry > * { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; margin: 0 0 13px; display: block; width: 100%; }
@media (max-width: 1250px) { .masonry { column-count: 2; } }
@media (max-width: 820px) { .masonry { column-count: 1; } }
.dash-head-block { margin-bottom: 13px; }

/* compact dashboard grid */
.dash-tight { display: grid; grid-template-columns: repeat(12, 1fr); gap: 13px; align-items: start; }
.dash-tight .col-12 { grid-column: span 12; }
.dash-tight .col-8 { grid-column: span 8; }
.dash-tight .col-7 { grid-column: span 7; }
.dash-tight .col-6 { grid-column: span 6; }
.dash-tight .col-5 { grid-column: span 5; }
.dash-tight .col-4 { grid-column: span 4; }
.dash-tight .col-3 { grid-column: span 3; }
@media (max-width: 1150px) { .dash-tight { grid-template-columns: repeat(6, 1fr); } .dash-tight [class*="col-"] { grid-column: span 6; } }
.glass.tight .card-head { padding: 12px 15px 0; }
.glass.tight .card-body { padding: 11px 15px 13px; }
.glass.tight h2 { font-size: 14px; }

/* compact stat strip */
.statstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
@media (max-width: 860px) { .statstrip { grid-template-columns: repeat(2, 1fr); gap: 11px; } }
.statmini { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: var(--r);
  border: 1px solid var(--border); background: linear-gradient(180deg, hsl(258 40% 14% / 0.5), hsl(257 42% 9% / 0.6)); }
html.light .statmini { background: linear-gradient(180deg, #fff, hsl(250 40% 98%)); }
.statmini .sm-ico { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: hsl(263 60% 50% / 0.16); color: var(--accent); }
.statmini .sm-v { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1; }
.statmini .sm-l { font-size: 11px; color: var(--faint); margin-top: 3px; }
.statmini.alert { border-color: hsl(0 84% 62% / 0.42); background: hsl(0 60% 24% / 0.16); }
.statmini.alert .sm-ico { background: hsl(0 84% 62% / 0.18); color: var(--destructive); }
.statmini.alert .sm-v { color: var(--destructive); }

/* mini list rows (compact) */
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.mini-row + .mini-row { border-top: 1px solid var(--border); }
.mini-row .mr-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.mini-row .mr-mid { flex: 1; min-width: 0; }
.mini-row .mr-nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .mr-sub { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .mr-right { font-size: 11.5px; color: var(--dim); flex: none; font-weight: 600; }

/* Dr Berg health-knowledge list (expandable, searchable, shows all) */
.berg-list { display: flex; flex-direction: column; gap: 6px; max-height: 440px; overflow-y: auto; }
.berg-item { border-radius: var(--r-sm); }
.berg-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 9px;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: hsl(258 38% 12% / 0.4); transition: 0.14s; }
html.light .berg-row { background: hsl(250 40% 98%); }
.berg-row:hover { border-color: var(--border-2); }
.berg-ico { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: hsl(38 92% 60% / 0.16); color: var(--warning); }
.berg-mid { flex: 1; min-width: 0; }
.berg-nm { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.berg-date { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.berg-caret { color: var(--faint); font-size: 17px; line-height: 1; flex: none; transition: transform 0.18s; }
.berg-caret.on { transform: rotate(90deg); color: var(--accent); }
.berg-brief { font-size: 12px; color: var(--dim); line-height: 1.55; padding: 9px 11px 4px 47px; }
.berg-link { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; }
.berg-link:hover { text-decoration: underline; }

/* email category groups (Emails page) */
.eml-group { margin-bottom: 12px; }
.eml-group.muted { opacity: 0.6; }
.eml-group-h { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; }
.eml-group-h .eml-gdot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.eml-group-h .eml-gname { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--dim); }
.eml-group-h .eml-gn { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--faint); }

/* full inbox page: toolbar, tabs, big rows */
.eml-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.eml-toolbar .exp-search { flex: 1; margin: 0; }
.chip-toggle { padding: 9px 15px; border-radius: 99px; border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; color: var(--dim); white-space: nowrap; flex: none; }
.chip-toggle.on { background: hsl(263 84% 58% / 0.2); border-color: var(--accent); color: var(--primary-glow); }
.eml-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.eml-tab { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.eml-tab:hover { color: var(--text); border-color: var(--accent); }
.eml-tab.on { background: linear-gradient(100deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.eml-tab .eml-tabn { font-size: 10.5px; font-weight: 700; opacity: 0.8; }
.eml-list { display: flex; flex-direction: column; gap: 2px; }
.eml-row { display: flex; gap: 12px; padding: 12px 12px; border-radius: var(--r-sm); text-decoration: none; color: inherit; align-items: flex-start; }
.eml-row:hover { background: hsl(258 40% 60% / 0.07); }
.eml-row + .eml-row { border-top: 1px solid var(--border); }
.eml-av { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.eml-mid { flex: 1; min-width: 0; }
.eml-r1 { display: flex; align-items: center; gap: 8px; }
.eml-from { font-size: 13px; font-weight: 600; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eml-from.unread { color: var(--text); font-weight: 700; }
.eml-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); flex: none; }
.eml-cat { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 99px; border: 1px solid; opacity: 0.85; flex: none; }
.eml-time { font-size: 11.5px; color: var(--faint); flex: none; }
.eml-subj { font-size: 13.5px; color: var(--dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eml-subj.unread { color: var(--text); font-weight: 600; }
.eml-snip { font-size: 12px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-row-link { text-decoration: none; color: inherit; display: block; border-radius: var(--r-sm); }
.cal-row-link:hover { background: hsl(258 40% 60% / 0.07); }
@media (max-width: 560px) { .eml-cat { display: none; } .eml-toolbar { flex-wrap: wrap; } }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
/* height (not scaleY) so the rounded top caps don't squash; ~7 bars, animates on data refresh only */
.bar-fill { width: 100%; max-width: 26px; border-radius: 5px 5px 0 0; min-height: 2px; transition: height 0.3s; } /* impeccable-disable-line layout-transition */
.bar-x { font-size: 9.5px; color: var(--faint); }
.donut-row { display: flex; align-items: center; gap: 16px; }
.donut-legend { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.donut-legend .dl { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.donut-legend .dl { min-width: 0; }
.donut-legend .dl .dot { width: 9px; height: 9px; }
.donut-legend .dl .dlv { margin-left: auto; padding-left: 8px; font-weight: 700; font-family: var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* phones: stack the donut over a single-column legend so amounts never clip off-screen */
@media (max-width: 560px) {
  .donut-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .donut-legend { grid-template-columns: 1fr; gap: 9px; }
}
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring-meta b { display: block; font-family: var(--display); font-size: 16px; font-weight: 700; }
.ring-meta span { font-size: 12px; color: var(--faint); }
.legend-2 { display: flex; gap: 16px; font-size: 12px; color: var(--dim); margin-top: 8px; }
.legend-2 span { display: inline-flex; align-items: center; gap: 6px; }
.insight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .insight-row { grid-template-columns: 1fr; } }
.insight { padding: 11px 13px; border-radius: var(--r); border: 1px solid var(--border); background: hsl(258 38% 12% / 0.4); }
html.light .insight { background: hsl(250 40% 98%); }
.insight .in-l { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; }
.insight .in-v { font-family: var(--display); font-weight: 700; font-size: 15px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight .in-s { font-size: 11px; color: var(--faint); margin-top: 2px; }

/* workout heatmap */
.heat { display: flex; gap: 4px; }
.heat-col { display: flex; flex-direction: column; gap: 4px; }
.heat-cell { width: 14px; height: 14px; border-radius: 4px; background: var(--track); }
.heat-cell.on { background: linear-gradient(135deg, var(--warning), var(--destructive)); }
.heat-cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-cell.future { opacity: 0.35; }

/* month calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-family: var(--display); font-size: 13.5px; font-weight: 700; }
.cal-nav { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border-2); color: var(--dim); font-size: 16px; line-height: 1; }
.cal-nav:hover { color: var(--text); border-color: var(--accent); }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 10px; color: var(--faint); font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-day { aspect-ratio: 1; border-radius: 8px; border: 1px solid transparent; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--dim); position: relative; }
.cal-day.empty { border: none; }
.cal-day.has { color: var(--text); border-color: var(--border); cursor: pointer; }
.cal-day.has:hover { border-color: var(--accent); }
.cal-day.today { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; }
.cal .cd-n { line-height: 1; }
.cal .cd-dots { display: flex; gap: 2px; align-items: center; }
/* Kind classes are prefixed cd-*. They used to be the bare kind name, which collided with
   .task above (the task list CARD: padding 12px 13px plus a border) and rendered a day with
   a task due as a 28x26 amber blob instead of a 4px dot. box-sizing is border-box here, so
   padding from ANY selector inflates the box. flex/padding/border are pinned below so the
   next accidental collision cannot resize it again. */
.cal .cd-dot { width: 4px; height: 4px; flex: none; padding: 0; border: 0;
  border-radius: 99px; background: var(--accent); }
.cal .cd-dot.cd-event { background: var(--accent); }
.cal .cd-dot.cd-class { background: hsl(190 92% 48%); }
.cal .cd-dot.cd-followup { background: var(--destructive); }
.cal .cd-dot.cd-task { background: var(--warning); }
.cal.compact .cal-day { font-size: 11px; border-radius: 6px; }
.cal .cd-dot.cd-workout { background: hsl(25 90% 58%); }
/* calendar split: month grid + day details */
.cal-split { display: flex; gap: 16px; align-items: flex-start; }
.cal-split .cal { flex: 0 0 auto; width: 270px; }
.cal-split .cal-details { flex: 1; min-width: 0; }
@media (max-width: 760px) { .cal-split { flex-direction: column; } .cal-split .cal { width: 100%; } }

/* big month grid: real event names inside each day cell */
.cal.big .cal-grid { gap: 6px; }
.cal.big .cal-day { aspect-ratio: auto; min-height: 96px; min-width: 0; overflow: hidden; align-items: stretch; justify-content: flex-start; padding: 6px 6px 5px; gap: 4px; }
.cal.big .cal-day.empty { min-height: 0; border: none; }
.cal.big .cd-n { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.cal.big .cal-day.has .cd-n { color: var(--text); }
.cal.big .cal-day.today { background: hsl(263 84% 62% / 0.16); border-color: var(--accent); color: var(--text); font-weight: 400; }
.cal.big .cal-day.today .cd-n { color: var(--primary-glow); font-weight: 700; }
.cal.big .cd-evs { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; }
.cal.big .cd-ev { font-size: 10.5px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text);
  background: hsl(258 40% 60% / 0.16); border-left: 2px solid var(--accent); } /* impeccable-disable-line side-tab -- border colour encodes the event type (event/followup/task), not decoration */
.cal.big .cd-ev b { font-weight: 700; opacity: 0.9; }
.cal.big .cd-ev.cd-class { background: hsl(190 92% 48% / 0.15); border-left-color: hsl(190 92% 48%); }
.cal.big .cd-ev.cd-followup { background: hsl(0 75% 60% / 0.13); border-left-color: var(--destructive); }
.cal.big .cd-ev.cd-task { background: hsl(38 92% 55% / 0.13); border-left-color: var(--warning); }
.cal.big .cd-more { font-size: 9.5px; color: var(--faint); font-weight: 600; padding-left: 3px; }
html.light .cal.big .cd-ev { background: hsl(258 40% 50% / 0.1); }
.cal-day-detail { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
.cal-dd-h { display: flex; align-items: center; justify-content: space-between; }
@media (max-width: 560px) { .cal.big .cal-day { min-height: 74px; } .cal.big .cd-ev { font-size: 9.5px; } }

/* applications kanban board */
.board-search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: hsl(258 38% 10% / 0.4); max-width: 420px; }
html.light .board-search { background: hsl(250 40% 97%); }
.board-search svg { color: var(--dim); flex: none; }
.board-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  color: var(--text); font-size: 13px; }
.board-search input::placeholder { color: var(--dim); }
.bs-clear { flex: none; border: none; background: transparent; color: var(--dim); cursor: pointer;
  font-size: 18px; line-height: 1; padding: 0 2px; }
.bs-clear:hover { color: var(--text); }
.bs-count { flex: none; font-size: 11px; color: var(--dim); white-space: nowrap; }
.board-wrap { overflow-x: auto; padding-bottom: 10px; }
.board { display: flex; gap: 12px; min-width: min-content; }
.board-col { width: 240px; flex: none; display: flex; flex-direction: column; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: hsl(258 38% 10% / 0.4); max-height: 70vh; }
html.light .board-col { background: hsl(250 40% 97%); }
.board-col.drop { border-color: var(--accent); background: hsl(263 60% 30% / 0.22); }
.bc-head { display: flex; align-items: center; gap: 8px; padding: 12px 13px; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.bc-head .bc-dot { width: 9px; height: 9px; border-radius: 99px; }
.bc-head .bc-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; flex: 1; }
.bc-head .bc-n { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--dim); }
.bc-body { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.bc-empty { font-size: 12px; color: var(--faint); text-align: center; padding: 16px 0; }
.bcard { padding: 11px 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--card-2); cursor: grab; transition: 0.12s; }
html.light .bcard { background: #fff; }
.bcard:hover { border-color: var(--border-2); }
.bcard.dragging { opacity: 0.4; }
.bcard { cursor: pointer; }
.bcard .bk-co { font-family: var(--display); font-size: 13.5px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bcard .bk-co .badge { text-transform: none; letter-spacing: 0; }
.bcard .bk-contact { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.bcard .bk-title { font-size: 12px; color: var(--dim); margin-top: 2px; }
.bcard .bk-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 10.5px; color: var(--faint); }
.bcard .bk-plat { padding: 1px 7px; border-radius: 99px; background: hsl(263 60% 50% / 0.16); color: var(--accent); font-weight: 700; }

/* expenses app */
.exp-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.exp-bar .exp-tabs { margin-bottom: 0; }
.period-nav { display: flex; align-items: center; gap: 8px; }
.period-nav b { font-family: var(--display); font-size: 14px; font-weight: 700; min-width: 132px; text-align: center; }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-nav:disabled:hover { color: var(--dim); border-color: var(--border-2); }
.period-now { font-size: 12px; font-weight: 600; color: var(--dim); padding: 6px 11px; border-radius: 99px; border: 1px solid var(--border-2); }
.period-now:hover { color: var(--text); border-color: var(--accent); }
.gran-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; border: 1px solid var(--border-2); background: hsl(258 36% 12% / 0.5); align-self: flex-start; }
html.light .gran-toggle { background: hsl(250 40% 97%); }
.gran-toggle button { padding: 6px 15px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.gran-toggle button.on { background: linear-gradient(100deg, var(--primary), var(--accent)); color: #fff; box-shadow: var(--glow); }
.donut-legend .dl .dl-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.exp-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; border: 1px solid var(--border-2); background: hsl(258 36% 12% / 0.5); margin-bottom: 16px; }
html.light .exp-tabs { background: hsl(250 40% 97%); }
.exp-tabs button { padding: 8px 18px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--dim); }
.exp-tabs button.on { background: linear-gradient(100deg, var(--primary), var(--accent)); color: #fff; box-shadow: var(--glow); }
.exp-search { width: 100%; background: hsl(258 36% 8% / 0.6); border: 1px solid var(--border-2); border-radius: var(--r);
  padding: 12px 14px; color: var(--text); font-size: 14px; outline: none; margin-bottom: 12px; }
html.light .exp-search { background: #fff; }
.exp-search:focus { border-color: var(--accent); }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--border); background: hsl(258 38% 12% / 0.4); }
html.light .cat-tile { background: #fff; }
.cat-tile .ct-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; flex: none; }
.cat-tile .ct-nm { font-size: 13.5px; font-weight: 600; }
.cat-tile .ct-amt { font-family: var(--display); font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.txn-date-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 700; margin: 14px 0 6px; }

/* ============================================================
   DRAWER / MODAL  (from Shadow design)
   ============================================================ */
.scrim { position: fixed; inset: 0; background: hsl(252 60% 3% / 0.62); backdrop-filter: blur(4px);
  display: flex; justify-content: flex-end; z-index: 50; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: 440px; max-width: 92vw; height: 100%; background: var(--card);
  border-left: 1px solid var(--border-2); box-shadow: -24px 0 70px -30px black; display: flex; flex-direction: column;
  animation: slide 0.24s cubic-bezier(.2,.7,.3,1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0.4; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head .dh-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: hsl(263 60% 50% / 0.16); color: var(--accent); }
.drawer-head h3 { font-family: var(--display); font-size: 18px; font-weight: 700; flex: 1; }
.x-btn { width: 34px; height: 34px; border-radius: 9px; background: hsl(258 30% 20% / 0.5); color: var(--dim); display: grid; place-items: center; }
.x-btn:hover { color: var(--text); }
.drawer-body { flex: 1; overflow: auto; padding: 20px 22px; }

/* Draft writer drawer (follow-up messages) */
.draft-sub { font-size: 12px; color: var(--faint); margin-bottom: 12px; }
.draft-text { width: 100%; resize: vertical; min-height: 280px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg); font: inherit; font-size: 13.5px;
  line-height: 1.55; white-space: pre-wrap; }
.draft-text:focus { outline: none; border-color: var(--accent); }
.draft-err { font-size: 12px; color: var(--destructive); margin-top: 8px; }
.draft-actions { display: flex; gap: 10px; margin-top: 14px; }
.draft-actions .qa-btn { flex: 1; justify-content: center; }
.bcard .bk-draft { width: 100%; justify-content: center; margin-top: 9px; }
.bcard .bk-actions { display: flex; gap: 6px; margin-top: 9px; align-items: center; }
.bcard .bk-actions .bk-draft { width: auto; flex: 1; margin-top: 0; }
.bcard .bk-actions .qa-btn.sm.sent { flex: none; justify-content: center; }
.bk-scheduled { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--success); white-space: nowrap; }
.bcard.just-sent { border-color: var(--success); box-shadow: 0 0 0 1px var(--success), 0 0 16px hsl(152 70% 48% / 0.4); }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; background: hsl(258 36% 8% / 0.7); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: 11px 13px; color: var(--text); font-size: 14px; outline: none; }
html.light .field input, html.light .field select, html.light .field textarea { background: hsl(250 40% 98%); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.chip-pick { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-pick button { padding: 8px 13px; border-radius: 99px; border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; color: var(--dim); }
.chip-pick button.on { background: hsl(263 84% 58% / 0.2); border-color: var(--accent); color: var(--primary-glow); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn { flex: 1; padding: 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; border: 1px solid var(--border-2); color: var(--text); }
.btn.primary { background: linear-gradient(100deg, var(--primary), var(--accent)); border-color: transparent; box-shadow: var(--glow); color: white; }
.btn.danger { color: var(--destructive); border-color: hsl(0 84% 62% / 0.4); flex: 0 0 auto; padding: 12px 16px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* ---- Agent A chat drawer ---- */
.chat-msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 84%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: hsl(258 36% 16% / 0.7); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
html.light .msg.bot { background: hsl(250 40% 96%); }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border-bottom-right-radius: 4px; }
.chat-input { display: flex; gap: 9px; padding: 16px 18px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; background: hsl(258 36% 8% / 0.7); border: 1px solid var(--border-2); border-radius: var(--r); padding: 12px 14px; color: var(--text); font-size: 14px; outline: none; }
html.light .chat-input input { background: hsl(250 40% 98%); }
.chat-input input:focus { border-color: var(--accent); }
.chat-send { width: 46px; border-radius: var(--r); background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; box-shadow: var(--glow); color: white; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chat-suggest button { font-size: 12px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border-2); color: var(--dim); }
.chat-suggest button:hover { color: var(--text); border-color: var(--accent); }

.detail-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.detail-row .k { color: var(--faint); }
.detail-row .v { font-weight: 600; }
.empty { text-align: center; color: var(--faint); font-size: 13px; padding: 24px; }

/* ---- Job Leads (OLJ inbox) ---- */
.lead-list { display: flex; flex-direction: column; gap: 10px; }
.lead-list.faded { margin-top: 10px; opacity: 0.6; }
.lead-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--border); background: var(--card-2); transition: 0.15s; }
.lead-row:hover { border-color: var(--border-2); }
.lead-row.done { opacity: 0.65; }
.lead-main { min-width: 0; flex: 1; }
.lead-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.lead-fit { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 99px; border: 1px solid currentColor; }
.lead-pts { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px;
  color: hsl(263 84% 72%); background: hsl(263 84% 62% / 0.14); border: 1px solid hsl(263 84% 62% / 0.4); white-space: nowrap; }
.lead-free { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px;
  color: hsl(152 70% 55%); background: hsl(152 70% 45% / 0.14); border: 1px solid hsl(152 70% 45% / 0.45); white-space: nowrap; }
.lead-match { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px;
  border: 1px solid currentColor; white-space: nowrap; }
.lead-match-why { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.35; }
.lead-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.lead-tag.ok { color: var(--success); background: hsl(152 70% 48% / 0.14); border: 1px solid hsl(152 70% 48% / 0.35); }
.lead-tag.muted { color: var(--dim); background: var(--card-3); border: 1px solid var(--border); }
.lead-when { font-size: 11px; color: var(--faint); margin-left: auto; }
.lead-title { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; color: var(--text);
  text-decoration: none; line-height: 1.35; }
.lead-title:hover { color: var(--primary-glow); }
.lead-title svg { flex: none; opacity: 0.5; }
.lead-why { font-size: 12.5px; color: var(--faint); margin-top: 4px; line-height: 1.4; }
.lead-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 11.5px; color: var(--dim); font-weight: 600; }
.lead-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.lead-actions .qa-btn { justify-content: center; }
/* job-leads triage board cards */
.board-hint { font-size: 12px; color: var(--dim); margin-bottom: 11px; }
.lead-card .lc-title { margin-top: 3px; font-size: 13px; line-height: 1.3; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lc-actions .qa-btn.sm { padding: 5px 9px; }
.lead-ask { font-size: 11px; font-weight: 600; color: var(--dim); text-align: center; margin-bottom: 1px; }
.qa-btn.sm { padding: 6px 10px; font-size: 12px; }
.qa-btn.sm.sent { color: var(--success); border-color: hsl(152 70% 48% / 0.4); }
.qa-btn.sm.sent:hover { background: hsl(152 70% 48% / 0.12); border-color: var(--success); }
.qa-btn.ghost { color: var(--faint); }
.lead-section { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--dim); margin: 18px 0 9px; }
.lead-section:first-child { margin-top: 2px; }
.empty.sm { padding: 12px 4px; font-size: 13px; }
/* conversion panel */
.conv-note { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.conv-block { margin-bottom: 14px; }
.conv-block:last-of-type { margin-bottom: 6px; }
.conv-block .mono-label { margin-bottom: 7px; }
.conv-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr 0.8fr; align-items: center;
  gap: 8px; padding: 7px 4px; border-top: 1px solid var(--border); font-size: 12.5px; }
.conv-name { font-weight: 600; }
.conv-cell { color: var(--dim); white-space: nowrap; }
.conv-cell b { color: var(--text); }
.conv-foot { font-size: 11px; color: var(--dim); opacity: 0.8; }
@media (max-width: 640px) {
  .conv-row { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .conv-name { grid-column: 1 / -1; }
}
.lead-toggle { display: inline-block; margin-top: 14px; cursor: pointer; background: none; border: none; }
.lead-mini { display: flex; align-items: center; gap: 9px; padding: 9px 4px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-size: 13px; }
.lead-mini:last-child { border-bottom: none; }
.lead-mini:hover .lead-mini-title { color: var(--primary-glow); }
.lead-mini-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-mini svg { flex: none; opacity: 0.45; }
.lead-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.lead-dot.strong { background: hsl(152 70% 48%); }
.lead-dot.maybe { background: hsl(38 92% 55%); }

/* ---- smooth interactions + refresh spin ---- */
@keyframes aaspin { to { transform: rotate(360deg); } }
.icon-btn.spin svg { animation: aaspin 0.8s linear infinite; }
.icon-btn:disabled { opacity: 0.7; cursor: default; }
.task { transition: opacity 0.34s ease, transform 0.34s ease, background 0.15s, border-color 0.15s; }
.task.leaving { opacity: 0; transform: translateX(16px) scale(0.97); pointer-events: none; }
.chk { transition: background 0.2s, border-color 0.2s, transform 0.18s; }
.chk.on { animation: chkpop 0.3s ease; }
@keyframes chkpop { 0% { transform: scale(0.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
.lead-row { transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.15s ease; }
.lead-row.leaving { opacity: 0; transform: translateX(16px) scale(0.98); pointer-events: none; }

/* ===== AI Updates (X feed) ===== */
.xf-row { display: flex; gap: 11px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--border-2);
  background: hsl(258 40% 17% / 0.85); text-decoration: none; color: inherit; transition: 0.15s; align-items: flex-start; }
html.light .xf-row { background: #fff; border-color: hsl(258 25% 86%); box-shadow: 0 1px 3px hsl(258 30% 20% / 0.08); }
.xf-row + .xf-row { margin-top: 9px; }
.xf-row:hover { border-color: var(--accent); transform: translateY(-1px); }
html.light .xf-row:hover { border-color: var(--accent); }
.xf-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px; }
.xf-mid { flex: 1; min-width: 0; }
.xf-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.2; }
.xf-nm { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.xf-handle { font-size: 11.5px; color: var(--faint); }
.xf-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  color: var(--accent); background: hsl(258 60% 60% / 0.14); border-radius: 99px; padding: 1.5px 7px; }
.xf-time { font-size: 11.5px; color: var(--faint); }
.xf-text { font-size: 12.5px; color: var(--text); margin-top: 4px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.xf-text.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xf-meta { display: flex; gap: 14px; font-size: 11px; color: var(--faint); margin-top: 7px; }

/* UDM School page */
.udm-day + .udm-day { margin-top: 4px; }
.udm-idcard { text-align: center; padding: 6px 0 4px; }
.udm-qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; line-height: 0; }
.udm-qr img, .udm-qr canvas { display: block; }

/* UDM subjects + teacher overviews */
.udm-teacher + .udm-teacher { border-top: 1px solid var(--border); padding-top: 2px; }
.udm-over { font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.udm-subj { padding: 12px 0; }
.udm-subj + .udm-subj { border-top: 1px solid var(--border); }
.udm-subj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.udm-subj-head .mr-nm { font-weight: 600; }
.udm-items { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.udm-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.udm-item-t { flex: 1; }
.udm-kind { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; color: var(--accent); border: 1px solid var(--border-2); flex: none; }
