/* ═══════════════════════════════════════════════════════
   ZUZU — Premium Glass UI  •  Thinking Partner for Business
═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Onest:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Background */
  --bg: #F0EBE3;
  --bg2: #E8E2D8;

  /* Solid Palette */
  --glass: #FDFCFA;
  --glass2: #F5F1EB;
  --glass-border: #D8D1C2;
  --glass-hover: #FFFFFF;
  --glass-dark: #45171B;
  --blur: blur(0px);
  --blur-sm: blur(0px);

  /* Sidebar */
  --sb: #45171B;
  --sb-border: rgba(69,23,27,0.2);
  --sb-text: rgba(255,255,255,0.45);
  --sb-active: rgba(255,255,255,0.15);

  /* Brand */
  --maroon: #45171B;
  --maroon2: #361214;
  --gold: #8B7D6B;
  --gold2: #A89585;

  /* Text */
  --text: #2D2422;
  --text2: #4A3628;
  --text-light: #7A6552;
  --text-muted: #A09080;

  /* Status */
  --green: #2D8B55;
  --green-bg: rgba(45,139,85,0.1);
  --amber: #D4880F;
  --amber-bg: rgba(212,136,15,0.1);
  --red: #C0392B;
  --red-bg: rgba(192,57,43,0.1);
  --blue: #2E86AB;
  --blue-bg: rgba(46,134,171,0.1);

  /* Shadows — flattened for clean SaaS look */
  --sh: 0 1px 3px rgba(0,0,0,0.04);
  --sh-md: 0 2px 8px rgba(0,0,0,0.05);
  --sh-lg: 0 4px 16px rgba(0,0,0,0.08);

  /* Radius — tighter for modern feel */
  --r: 10px;
  --r-sm: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

html, body {
  height: 100%;
  font-family: 'Onest', -apple-system, sans-serif;
  background: #F0EBE3;
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background: #F0EBE3;
}

/* ─── LAYOUT ──────────────────────────────────────────── */
.app { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* ─── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--sb);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width 0.25s ease, min-width 0.25s ease;
}
.sidebar.collapsed { width: 56px; min-width: 56px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sec-t,
.sidebar.collapsed .nbadge,
.sidebar.collapsed .sb-logo-text,
.sidebar.collapsed .u-info { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .u-profile { justify-content: center; padding: 14px 0; }
.sidebar.collapsed .sb-head { padding: 18px 0; justify-content: center; }

.sb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sb-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold), #A89585);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(69,23,27,0.35);
}
.sb-logo-text { line-height: 1.2; }
.sb-logo-text h2 { font-family: 'DM Serif Display', serif; font-size: 17px; color: #fff; font-weight: 400; letter-spacing: 0.3px; }
.sb-logo-text span { font-size: 9.5px; color: rgba(255,255,255,0.28); letter-spacing: 1.5px; text-transform: uppercase; }

.pulse-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px;
  margin: 8px 10px 4px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.pulse-dot {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(69,23,27,0.4);
  animation: pulse-glow 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(69,23,27,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(69,23,27,0); }
}
.pulse-label { font-size: 10.5px; color: rgba(255,255,255,0.5); font-weight: 500; }
.pulse-count { margin-left: auto; font-size: 10px; color: var(--gold); font-weight: 600; }

.sidebar-nav { flex: 1; padding: 8px 10px; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.sec-t {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.18); padding: 18px 10px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--sb-text);
  font-size: 13px; font-weight: 500;
  margin: 2px 0;
  white-space: nowrap;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.82); }
.nav-item.active {
  background: var(--sb-active);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(69,23,27,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 2.5px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}
.nav-item i { flex-shrink: 0; }

.nbadge {
  margin-left: auto;
  background: var(--maroon);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}
.nbadge.gold { background: var(--gold); }

.u-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.u-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--gold), #A89585);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.u-info span { font-size: 12.5px; color: rgba(255,255,255,0.8); font-weight: 600; display: block; }
.u-info small { font-size: 10px; color: rgba(255,255,255,0.3); }

/* ─── MAIN ────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ─── TOPBAR ──────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  height: 52px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
  z-index: 100;
}
.tb-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); display: flex; padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.tb-toggle:hover { background: rgba(0,0,0,0.05); }

.search-box {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  background: var(--glass2);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 0 12px;
  height: 34px;
  transition: border-color 0.15s, background 0.15s;
}
.search-box:focus-within {
  background: var(--glass);
  border-color: rgba(0,0,0,0.12);
}
.search-box input {
  flex: 1; border: none; background: none;
  font-size: 12.5px; color: var(--text);
  font-family: inherit; outline: none;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box i { color: var(--text-muted); flex-shrink: 0; }

.tb-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tb-time { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.tb-btn {
  width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  cursor: pointer; color: var(--text-light); position: relative;
  transition: all 0.15s;
}
.tb-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
/* Hide redundant topbar buttons — keep bell + avatar only */
.tb-btn[title="Preview / Quick View"],
.tb-btn[title="Settings"],
.tb-btn[title="Activity"],
.tb-btn[title="Chat"] { display: none; }
.tb-badge {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px;
  background: var(--red); border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.tb-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--maroon), #6B2A2E);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  cursor: pointer; flex-shrink: 0;
}

/* ─── CONTENT ─────────────────────────────────────────── */
.content {
  flex: 1; overflow-y: auto;
  padding: 28px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.08) transparent;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* ─── PAGES ───────────────────────────────────────────── */
.page { display: none; animation: fadeUp 0.25s ease; }
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── CARD ───────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
}
.card-p { padding: 20px 24px; }

/* ─── PAGE HEADER ─────────────────────────────────────── */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-head h1 { font-family: 'DM Serif Display', serif; font-size: 26px; font-weight: 400; color: var(--text); line-height: 1.2; }
.page-head p { font-size: 13px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.page-head-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* ─── SECTION TITLE ───────────────────────────────────── */
.sec-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 14px;
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.15s;
  font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon2); }
.btn-ghost {
  background: transparent; border: 1px solid rgba(0,0,0,0.1);
  color: var(--text2);
}
.btn-ghost:hover { background: rgba(0,0,0,0.03); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold2); }
.btn-sm { padding: 5px 12px; font-size: 11.5px; }
.btn-icon { padding: 6px; border-radius: 8px; }

/* ─── TODAY PAGE ──────────────────────────────────────── */
.briefing-card {
  padding: 22px 26px;
  margin-bottom: 20px;
  background: var(--glass);
  border: 1px solid rgba(0,0,0,0.06);
}
.briefing-greeting { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--text); line-height: 1.2; margin-bottom: 6px; }
.briefing-summary { font-size: 14px; color: var(--text2); line-height: 1.6; }
.briefing-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.today-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}
.today-left { display: flex; flex-direction: column; gap: 16px; }
.today-right { display: flex; flex-direction: column; gap: 16px; }

.urgent-list { display: flex; flex-direction: column; gap: 6px; }
.urgent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--glass);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s;
}
.urgent-item:hover { background: rgba(0,0,0,0.02); transform: translateX(2px); }
.urgent-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.urgent-icon.red { background: var(--red-bg); color: var(--red); }
.urgent-icon.amber { background: var(--amber-bg); color: var(--amber); }
.urgent-icon.blue { background: var(--blue-bg); color: var(--blue); }
.urgent-icon.green { background: var(--green-bg); color: var(--green); }
.urgent-text { flex: 1; min-width: 0; }
.urgent-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urgent-detail { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.urgent-action { font-size: 11px; color: var(--maroon); font-weight: 600; white-space: nowrap; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-mini {
  padding: 16px 18px;
  text-align: center;
}
.stat-mini-num { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-mini-label { font-size: 11px; color: var(--text-light); margin-top: 4px; font-weight: 500; }
.stat-mini-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ─── CHAT PAGE ───────────────────────────────────────── */
.chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 56px - 48px - 80px);
  min-height: 400px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.msg { display: flex; gap: 10px; max-width: 78%; animation: fadeUp 0.2s ease; }
.msg.user { flex-direction: row-reverse; margin-left: auto; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  margin-top: 2px;
}
.msg.ai .msg-avatar { background: linear-gradient(135deg, var(--maroon), #6B2A2E); color: #fff; }
.msg.user .msg-avatar { background: rgba(0,0,0,0.1); color: var(--text2); }
.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 13.5px; line-height: 1.6; max-width: 100%;
}
.msg.ai .msg-bubble {
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: none; color: var(--text);
  border-bottom-left-radius: 5px;
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--maroon), #5C2225);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.msg-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.msg-action-btn {
  padding: 5px 12px; border-radius: 50px; font-size: 11.5px; font-weight: 600;
  background: rgba(69,23,27,0.08); color: var(--maroon);
  border: 1px solid rgba(69,23,27,0.12); cursor: pointer;
  transition: all 0.15s;
}
.msg-action-btn:hover { background: rgba(69,23,27,0.14); }

.typing span {
  display: inline-block; width: 6px; height: 6px;
  background: var(--text-light); border-radius: 50; margin: 0 2px;
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.chat-input-row {
  padding: 14px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input {
  flex: 1; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13.5px; font-family: inherit;
  background: var(--glass2);
  backdrop-filter: none;
  outline: none; resize: none;
  max-height: 120px; min-height: 40px;
  color: var(--text); transition: border-color 0.15s, background 0.15s;
  line-height: 1.5;
}
.chat-input:focus { border-color: rgba(0,0,0,0.15); background: #fff; }
.chat-send {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--maroon);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
  transition: all 0.15s;
}
.chat-send:hover { opacity: 0.9; }

.chat-suggestions { display: flex; gap: 7px; padding: 0 20px 10px; flex-wrap: wrap; }
.chat-sugg {
  padding: 6px 13px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: var(--glass2); border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer; color: var(--text-light); transition: all 0.15s;
}
.chat-sugg:hover { background: rgba(0,0,0,0.03); color: var(--text); border-color: rgba(0,0,0,0.1); }

/* ─── TASKS ───────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 2px; margin-bottom: 18px; flex-wrap: wrap; }
.ftab {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; color: var(--text-muted);
  background: transparent; border: 1px solid transparent;
  transition: all 0.15s;
}
.ftab:hover { background: rgba(0,0,0,0.03); color: var(--text-light); }
.ftab.active { background: var(--glass); border-color: rgba(0,0,0,0.08); color: var(--text); font-weight: 600; }

.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r);
  margin-bottom: 6px;
  transition: all 0.18s;
}
.task-item:hover { background: rgba(255,255,255,0.78); }
.task-item.done { opacity: 0.55; }
.task-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.15);
  cursor: pointer; flex-shrink: 0;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.task-check:hover { border-color: var(--green); }
.task-check.done { background: var(--green); border-color: var(--green); }
.task-check.done::after { content: '✓'; font-size: 11px; color: #fff; font-weight: 700; }
.task-title { flex: 1; font-size: 13.5px; color: var(--text); font-weight: 500; }
.task-item.done .task-title { text-decoration: line-through; }
.task-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.prio {
  font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.prio.high { background: var(--red-bg); color: var(--red); }
.prio.medium { background: var(--amber-bg); color: var(--amber); }
.prio.low { background: var(--green-bg); color: var(--green); }
.due-date { font-size: 11px; color: var(--text-light); }
.due-date.overdue { color: var(--red); font-weight: 600; }
.assignee { font-size: 11px; color: var(--text-muted); }
.task-del { cursor: pointer; color: var(--text-muted); opacity: 0; transition: opacity 0.15s; padding: 3px; }
.task-item:hover .task-del { opacity: 1; }
.notion-link { color: var(--text-muted); display: flex; }
.notion-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r); margin-bottom: 12px;
  background: rgba(184,134,11,0.06); border: 1px solid rgba(184,134,11,0.12);
  font-size: 12px; color: var(--text-light);
}
.sync-btn {
  margin-left: auto; padding: 5px 12px; border-radius: 50px;
  background: var(--gold); color: #fff; border: none;
  font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.sync-btn:hover { background: var(--gold2); }

/* ─── BUSINESS PAGE ───────────────────────────────────── */
.biz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.lead-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r);
  margin-bottom: 8px;
  transition: all 0.18s;
  cursor: pointer;
}
.lead-item:hover { background: rgba(255,255,255,0.8); }
.lead-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--maroon), #6B2A2E);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.lead-info { flex: 1; min-width: 0; }
.lead-name { font-size: 13px; font-weight: 600; color: var(--text); }
.lead-detail { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.lead-status { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.lead-status.hot { background: var(--red-bg); color: var(--red); }
.lead-status.warm { background: var(--amber-bg); color: var(--amber); }
.lead-status.cold { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.lead-status.converted { background: var(--green-bg); color: var(--green); }

.alert-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r);
  margin-bottom: 8px;
  border: 1px solid;
}
.alert-item.warning { background: var(--amber-bg); border-color: rgba(192,122,16,0.15); }
.alert-item.info { background: var(--blue-bg); border-color: rgba(26,111,172,0.12); }
.alert-item.success { background: var(--green-bg); border-color: rgba(26,140,90,0.12); }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-text .alert-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.alert-text .alert-desc { font-size: 11.5px; color: var(--text-light); margin-top: 2px; line-height: 1.5; }
.alert-time { font-size: 10px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* ─── REPORTS ─────────────────────────────────────────── */
.report-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
.kpi-card { padding: 18px; text-align: center; }
.kpi-num { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-label { font-size: 11.5px; color: var(--text-light); margin-top: 6px; font-weight: 500; }
.kpi-change { font-size: 11px; margin-top: 4px; font-weight: 600; }
.kpi-change.up { color: var(--green); }
.kpi-change.down { color: var(--red); }

.log-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--r);
  margin-bottom: 6px;
}
.log-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.log-title { font-size: 13px; font-weight: 600; color: var(--text); }
.log-detail { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.log-time { font-size: 10.5px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* ─── AGENTS & SKILLS ─────────────────────────────────── */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.agent-card {
  padding: 16px; border-radius: var(--r-lg);
  position: relative; transition: all 0.2s;
}
.agent-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.agent-card-icon { font-size: 22px; margin-bottom: 8px; }
.agent-card h3 { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.agent-card p { font-size: 11px; color: var(--text-light); line-height: 1.5; }
.status-dot {
  position: absolute; top: 12px; right: 12px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(34,192,122,0.2);
}
.status-dot.amber { background: var(--amber); box-shadow: 0 0 0 2px var(--amber-bg); }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.skill-card { padding: 16px; border-radius: var(--r-lg); transition: all 0.2s; }
.skill-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.skill-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.skill-icon { font-size: 20px; }
.skill-title { font-size: 13px; font-weight: 700; color: var(--text); }
.skill-category { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: 1px; }
.skill-desc { font-size: 11.5px; color: var(--text-light); line-height: 1.5; margin-bottom: 10px; }
.skill-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tool {
  font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 500;
  background: rgba(0,0,0,0.05); color: var(--text-light);
}

/* ─── JOURNAL ─────────────────────────────────────────── */
.j-entry { padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 10px; cursor: pointer; transition: all 0.18s; }
.j-entry:hover { box-shadow: var(--sh-lg); transform: translateY(-1px); }
.j-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.j-entry-title { font-size: 14px; font-weight: 700; color: var(--text); }
.j-entry-date { font-size: 11px; color: var(--text-muted); }
.j-entry-preview { font-size: 12.5px; color: var(--text-light); line-height: 1.6; margin-bottom: 8px; }
.j-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.j-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(69,23,27,0.07); color: var(--maroon); font-weight: 500; }

/* ─── SETTINGS ────────────────────────────────────────── */
.integrations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.int-card { padding: 20px; border-radius: var(--r-lg); text-align: center; }
.int-icon { font-size: 28px; margin-bottom: 10px; }
.int-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.int-desc { font-size: 11.5px; color: var(--text-light); margin-bottom: 12px; line-height: 1.5; }
.status-pill {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}
.status-pill.yes { background: var(--green-bg); color: var(--green); }
.status-pill.no { background: rgba(0,0,0,0.06); color: var(--text-muted); }

.auto-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--r-lg); margin-bottom: 10px;
  transition: all 0.18s;
}
.auto-card:hover { box-shadow: var(--sh-lg); }
.auto-icon { font-size: 22px; flex-shrink: 0; }
.auto-info { flex: 1; min-width: 0; }
.auto-info h3 { font-size: 13.5px; font-weight: 700; color: var(--text); }
.auto-info p { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.auto-info small { font-size: 10.5px; color: var(--text-muted); }
.auto-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.toggle {
  width: 36px; height: 20px; border-radius: 20px; border: none;
  background: rgba(0,0,0,0.12); cursor: pointer; position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute;
  left: 3px; top: 3px; width: 14px; height: 14px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(16px); }

/* ─── MODALS ──────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-bg.show { display: flex; }
.modal {
  background: rgba(242,238,232,0.97);
  backdrop-filter: none;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--r-xl);
  padding: 28px;
  width: 100%; max-width: 440px;
  box-shadow: var(--sh-lg);
}
.modal h3 { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; margin-bottom: 4px; }
.modal p { font-size: 12.5px; color: var(--text-light); margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 9px 13px;
  border: 1px solid rgba(0,0,0,0.1); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; color: var(--text);
  background: rgba(255,255,255,0.7); outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus { border-color: rgba(69,23,27,0.3); }

/* ─── JOURNAL EDITOR ──────────────────────────────────── */
.j-editor-wrap {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.j-editor-wrap.show { display: flex; }
.j-editor {
  background: rgba(242,238,232,0.97);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--r-xl); padding: 28px;
  width: 100%; max-width: 560px;
  box-shadow: var(--sh-lg);
}
.j-editor input[type=text] {
  width: 100%; border: none; border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 8px 0; font-size: 20px; font-family: 'DM Serif Display', serif;
  background: none; color: var(--text); margin-bottom: 14px; outline: none;
}
.j-editor textarea {
  width: 100%; height: 200px; border: none; resize: none;
  font-size: 14px; font-family: inherit; color: var(--text2);
  background: none; outline: none; line-height: 1.7;
}

/* ─── EMPTY STATE ─────────────────────────────────────── */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty svg { opacity: 0.3; margin-bottom: 12px; }
.empty h3 { font-size: 15px; font-weight: 600; color: var(--text-light); margin-bottom: 6px; }
.empty p { font-size: 13px; }

/* ─── SKELETON ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ─── CHIPS ───────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 50px; font-size: 11px; font-weight: 600;
}
.chip.online { background: var(--green-bg); color: var(--green); border: 1px solid rgba(26,140,90,0.15); }
.chip.gold { background: rgba(184,134,11,0.1); color: var(--gold); border: 1px solid rgba(184,134,11,0.15); }
.chip.red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(176,32,32,0.12); }
.chip::before { content: '●'; font-size: 7px; }

/* ─── SCROLLABLE SECTION ──────────────────────────────── */
.scroll-x { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ─── ACT ITEM ────────────────────────────────────────── */
.act-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.act-item:last-child { border-bottom: none; }
.act-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.act-icon.task { background: var(--green-bg); color: var(--green); }
.act-icon.chat { background: var(--blue-bg); color: var(--blue); }
.act-icon.automation { background: var(--amber-bg); color: var(--amber); }
.act-icon.memory { background: rgba(69,23,27,0.1); color: var(--maroon); }
.act-icon.ai { background: rgba(69,23,27,0.08); color: var(--maroon); }
.act-text { flex: 1; min-width: 0; }
.act-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.act-detail { font-size: 11px; color: var(--text-light); margin-top: 1px; }
.act-time { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }

/* ─── MOBILE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -232px; top: 0; bottom: 0; transition: left 0.25s ease; z-index: 300; }
  .sidebar.mobile-open { left: 0; }
  .mobile-overlay {
    display: none; position: fixed; inset: 0; z-index: 250;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  }
  .mobile-overlay.show { display: block; }
  .content { padding: 16px; }
  .today-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .biz-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
  .chat-wrap { height: calc(100vh - 56px - 56px - 48px); }
  /* Bottom nav */
  .mobile-nav {
    display: flex !important;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(13,13,13,0.93);
    backdrop-filter: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
  }
  .main { padding-bottom: 56px; }
}
.mobile-nav { display: none; justify-content: space-around; align-items: center; }
.mn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px; cursor: pointer; color: rgba(255,255,255,0.4);
  font-size: 10px; font-weight: 500; transition: color 0.15s;
}
.mn-item.active { color: #fff; }
.mn-item i { flex-shrink: 0; }

/* ─── SUGGESTION ──────────────────────────────────────── */
.suggestion {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r);
  background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.65);
  cursor: pointer; margin-bottom: 7px; transition: all 0.15s;
  font-size: 12.5px; color: var(--text2);
}
.suggestion:hover { background: rgba(255,255,255,0.78); color: var(--maroon); }
.suggestion i { color: var(--gold); flex-shrink: 0; }
.suggestion .arr { margin-left: auto; color: var(--text-muted); }

/* ─── PLANNER / TASKS ─────────────────────────────────── */
.planner-wrap{display:grid;grid-template-columns:280px 1fr;gap:16px;align-items:flex-start}
.planner-left{display:flex;flex-direction:column;gap:12px}
.planner-filters{display:flex;flex-direction:column;gap:4px}
.planner-filter{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:var(--r);cursor:pointer;font-size:13px;font-weight:500;color:var(--text2);background:rgba(255,255,255,0.5);border:1px solid rgba(255,255,255,0.65);transition:all .18s}
.planner-filter:hover{background:rgba(255,255,255,0.8)}
.planner-filter.active{background:rgba(255,255,255,0.85);border-color:rgba(0,0,0,0.1);color:var(--text);box-shadow:var(--sh)}
.planner-filter i{color:var(--text-light);flex-shrink:0}
.planner-filter .pf-count{margin-left:auto;background:rgba(0,0,0,0.07);color:var(--text-light);font-size:11px;font-weight:700;padding:1px 8px;border-radius:20px;min-width:22px;text-align:center}
.clock-card{padding:20px;display:flex;align-items:center;gap:18px}
.clock-face{width:80px;height:80px;border-radius:50%;border:2px solid rgba(0,0,0,0.1);position:relative;flex-shrink:0;background:rgba(255,255,255,0.6)}
.clock-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:5px;height:5px;background:var(--text);border-radius:50%;z-index:3}
.clock-hand{position:absolute;bottom:50%;left:50%;transform-origin:bottom center;border-radius:3px}
.clock-hand.hour{width:2.5px;height:26px;background:var(--text);margin-left:-1.25px}
.clock-hand.minute{width:1.8px;height:32px;background:var(--text);margin-left:-.9px}
.clock-hand.second{width:1px;height:34px;background:var(--maroon);margin-left:-.5px}
.clock-time .clock-big{font-size:24px;font-weight:700;color:var(--text)}
.clock-time .clock-date{font-size:12px;color:var(--text-light);margin-top:3px}
.mini-cal{padding:16px 14px}
.mini-cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.mini-cal-head h4{font-size:13px;font-weight:700;color:var(--text)}
.mini-cal-nav{display:flex;gap:4px}
.mini-cal-nav button{width:26px;height:26px;border:1px solid rgba(0,0,0,0.08);background:rgba(255,255,255,0.6);border-radius:7px;cursor:pointer;color:var(--text2);font-size:13px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.mini-cal-nav button:hover{background:rgba(255,255,255,0.95)}
.mini-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-dow{text-align:center;font-size:9.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;padding:4px 0}
.cal-day{text-align:center;font-size:12px;padding:5px 2px;border-radius:7px;cursor:pointer;color:var(--text2);font-weight:500;transition:all .15s;line-height:1}
.cal-day:hover{background:rgba(255,255,255,0.8)}
.cal-day.today{background:var(--text);color:#fff;font-weight:700}
.cal-day.has-task::after{content:'';display:block;width:4px;height:4px;background:var(--maroon);border-radius:50%;margin:1px auto 0}
.cal-day.other-month{color:var(--text-muted)}
.cal-day.selected:not(.today){background:rgba(69,23,27,0.1);color:var(--maroon)}
.todo-header{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.todo-header h3{font-family:'Instrument Serif',serif;font-size:22px;font-weight:400;color:var(--text)}
.todo-add-input{display:flex;align-items:center;gap:10px;padding:11px 14px;background:rgba(255,255,255,0.55);border:1px dashed rgba(0,0,0,0.12);border-radius:var(--r);margin-bottom:16px;cursor:text}
.todo-add-input input{flex:1;border:none;background:none;font-size:13.5px;font-family:inherit;color:var(--text);outline:none}
.todo-add-input input::placeholder{color:var(--text-muted)}
.add-hint{font-size:11px;color:var(--text-muted);display:flex;align-items:center;gap:4px;white-space:nowrap}
.add-hint kbd{background:rgba(0,0,0,0.07);border-radius:4px;padding:1px 5px;font-size:10px;font-family:inherit}
.task-group{margin-bottom:16px}
.task-group-head{display:flex;align-items:center;gap:8px;padding:6px 0;margin-bottom:6px;cursor:pointer;user-select:none}
.task-group-head .tg-toggle{color:var(--text-muted);transition:transform .2s;display:flex;align-items:center}
.task-group-head.collapsed .tg-toggle{transform:rotate(-90deg)}
.task-group-name{font-size:12.5px;font-weight:700;color:var(--text2)}
.task-group-count{font-size:11px;color:var(--text-muted);font-weight:500}
.task-group-items{display:flex;flex-direction:column;gap:4px}
.task-group-items.collapsed{display:none}
.todo-item{display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(255,255,255,0.55);border:1px solid rgba(255,255,255,0.7);border-radius:var(--r);transition:all .18s;cursor:pointer}
.todo-item:hover{background:rgba(255,255,255,0.82);box-shadow:var(--sh)}
.drag-handle{color:var(--text-muted);opacity:0;cursor:grab;flex-shrink:0;transition:opacity .15s;display:flex;align-items:center}
.todo-item:hover .drag-handle{opacity:1}
.todo-check{width:20px;height:20px;border-radius:50%;border:1.5px solid rgba(0,0,0,0.15);cursor:pointer;flex-shrink:0;transition:all .15s;display:flex;align-items:center;justify-content:center}
.todo-check:hover{border-color:var(--green)}
.todo-check.done{background:var(--green);border-color:var(--green)}
.todo-check.done::after{content:'✓';font-size:11px;color:#fff;font-weight:700}
.todo-title-wrap{flex:1;min-width:0}
.todo-title{font-size:13px;font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.todo-title.done{text-decoration:line-through;color:var(--text-muted)}
.todo-project{font-size:10.5px;color:var(--text-muted);margin-top:1px}
.todo-meta{display:flex;align-items:center;gap:6px;flex-shrink:0}
.todo-item.overdue-item{border-left:2px solid var(--red)}
.todo-item.scheduled-item{border-left:2px solid var(--blue)}
@media(max-width:900px){.planner-wrap{grid-template-columns:1fr}}

/* ═══════════════════════════════════════
   FINANCE PAGE — Special Green Palette
   #0F2A1D · #375534 · #6B9071 · #AEC3B0 · #E3EED4
═══════════════════════════════════════ */
:root {
  --fin-dark: #0F2A1D;
  --fin-mid: #375534;
  --fin-accent: #6B9071;
  --fin-soft: #AEC3B0;
  --fin-light: #E3EED4;
  --fin-income: #1A8C5A;
  --fin-expense: #C0392B;
  --fin-saving: #0F2A1D;
}

/* Page override — when .pg-finance.active, tint the whole content area */
.fin-bg { background: linear-gradient(145deg, #E3EED4 0%, #D6E8C8 50%, #E0ECD0 100%); }

.fin-header { margin-bottom: 24px; }
.fin-header h1 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--fin-dark); font-weight: 400; }
.fin-header p { font-size: 13px; color: var(--fin-accent); margin-top: 3px; }

/* Stat cards */
.fin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.fin-stat {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.9);
  backdrop-filter: none;
}
.fin-stat.dark {
  background: var(--fin-dark);
  border-color: rgba(255,255,255,0.08);
}
.fin-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--fin-accent); margin-bottom: 6px; }
.fin-stat.dark .fin-stat-label { color: var(--fin-soft); }
.fin-stat-value { font-size: 26px; font-weight: 800; color: var(--fin-dark); line-height: 1; }
.fin-stat.dark .fin-stat-value { color: #fff; }
.fin-stat-change { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.fin-stat-change.up { color: var(--fin-income); }
.fin-stat-change.down { color: var(--fin-expense); }
.fin-stat-sub { font-size: 10.5px; color: var(--fin-accent); margin-top: 4px; }
.fin-stat.dark .fin-stat-sub { color: var(--fin-soft); opacity: .7; }

/* Middle charts row */
.fin-mid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: 20px; }

.fin-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.9);
  backdrop-filter: none;
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.fin-card-title { font-size: 14px; font-weight: 700; color: var(--fin-dark); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }

/* Donut chart */
.fin-donut-wrap { display: flex; gap: 24px; align-items: center; }
.fin-donut {
  width: 130px; height: 130px; flex-shrink: 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.fin-donut svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.fin-donut-label { text-align: center; z-index: 1; }
.fin-donut-label div:first-child { font-size: 11px; color: var(--fin-accent); }
.fin-donut-label div:last-child { font-size: 13px; font-weight: 700; color: var(--fin-dark); }
.fin-legend { display: flex; flex-direction: column; gap: 10px; }
.fin-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.fin-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fin-legend-name { flex: 1; color: var(--fin-mid); }
.fin-legend-val { font-weight: 700; color: var(--fin-dark); }
.fin-legend-pct { font-size: 11px; color: var(--fin-accent); min-width: 32px; text-align: right; }

/* Bar chart */
.fin-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.fin-bar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.fin-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: var(--fin-accent);
  transition: background 0.2s;
  cursor: pointer;
  min-height: 4px;
}
.fin-bar:hover { background: var(--fin-mid); }
.fin-bar.income { background: var(--fin-income); }
.fin-bar.expense { background: rgba(192,57,43,0.6); }
.fin-bar-label { font-size: 10px; color: var(--fin-accent); text-align: center; }

/* Transactions */
.fin-tx-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.fin-tx-filters { display: flex; gap: 6px; }
.fin-tx-filter { padding: 5px 13px; border-radius: 50px; font-size: 11.5px; font-weight: 600; cursor: pointer; border: 1px solid rgba(15,42,29,0.15); color: var(--fin-mid); background: rgba(255,255,255,0.6); transition: all .15s; }
.fin-tx-filter.active { background: var(--fin-dark); color: #fff; border-color: var(--fin-dark); }
.fin-tx-search { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 50px; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.08); }
.fin-tx-search input { border: none; background: none; font-size: 12.5px; outline: none; font-family: inherit; color: var(--fin-dark); width: 160px; }

/* Table */
.fin-table { width: 100%; border-collapse: collapse; }
.fin-table th { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--fin-accent); padding: 10px 14px; background: rgba(15,42,29,0.04); border-bottom: 1px solid rgba(15,42,29,0.08); text-align: left; }
.fin-table td { padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 12.5px; color: var(--fin-mid); vertical-align: middle; }
.fin-table tr:hover td { background: rgba(255,255,255,0.5); }
.fin-table tr:last-child td { border-bottom: none; }
.tx-desc { display: flex; align-items: center; gap: 9px; }
.tx-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--fin-soft); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--fin-dark); flex-shrink: 0; }
.tx-name { font-weight: 600; color: var(--fin-dark); font-size: 12.5px; }
.tx-sub { font-size: 10.5px; color: var(--fin-accent); }
.tx-amount.pos { color: var(--fin-income); font-weight: 700; }
.tx-amount.neg { color: var(--fin-expense); font-weight: 700; }
.tx-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 700; }
.tx-status.done { background: rgba(26,140,90,0.1); color: var(--fin-income); }
.tx-status.fail { background: rgba(192,57,43,0.1); color: var(--fin-expense); }
.tx-status.pending { background: rgba(107,144,113,0.15); color: var(--fin-accent); }
.tx-export { display: flex; gap: 5px; }
.tx-export-btn { font-size: 10px; padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(15,42,29,0.15); cursor: pointer; color: var(--fin-mid); background: none; transition: all .15s; font-family: inherit; }
.tx-export-btn:hover { background: var(--fin-dark); color: #fff; border-color: var(--fin-dark); }

/* Sync bar */
.fin-sync-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r); margin-bottom: 16px; background: rgba(15,42,29,0.05); border: 1px solid rgba(15,42,29,0.1); font-size: 12px; color: var(--fin-mid); }
.fin-sync-bar strong { color: var(--fin-dark); }
.fin-sync-btn { margin-left: auto; padding: 5px 14px; border-radius: 50px; background: var(--fin-dark); color: #fff; border: none; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; }
.fin-sync-btn:hover { background: var(--fin-mid); }

/* Quick actions */
.fin-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.fin-quick { padding: 14px 16px; border-radius: var(--r); background: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.9); cursor: pointer; transition: all .18s; text-align: center; }
.fin-quick:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); box-shadow: var(--sh-md); }
.fin-quick-icon { font-size: 22px; margin-bottom: 6px; }
.fin-quick-label { font-size: 12px; font-weight: 700; color: var(--fin-dark); }
.fin-quick-sub { font-size: 10.5px; color: var(--fin-accent); margin-top: 2px; }

@media (max-width: 768px) { .fin-stats { grid-template-columns: 1fr 1fr; } .fin-mid { grid-template-columns: 1fr; } .fin-quick-actions { grid-template-columns: 1fr 1fr; } }

/* ═══ Quick Action Cards (teal) ═══ */
.qa-card {
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: #45171B;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 80px;
  box-shadow: var(--sh-md);
}
.qa-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); opacity: 0.92; }
.qa-icon { flex-shrink: 0; opacity: 0.9; }
.qa-label { font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }

/* ═══ Schedule Timeline ═══ */
.sched-slot { display: flex; gap: 10px; min-height: 52px; position: relative; }
.sched-time { width: 50px; flex-shrink: 0; font-size: 11px; color: var(--text-muted); padding-top: 14px; text-align: right; }
.sched-line { width: 1px; background: rgba(0,0,0,0.08); position: relative; flex-shrink: 0; }
.sched-line::before { content: ''; position: absolute; top: 16px; left: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.12); }
.sched-events { flex: 1; padding: 6px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sched-event {
  padding: 8px 12px; border-radius: 10px; cursor: pointer; transition: all 0.15s;
  border-left: 3px solid; font-size: 12px;
}
.sched-event:hover { transform: translateX(2px); }
.sched-event .se-title { font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-event .se-sub { font-size: 10.5px; opacity: 0.8; }
.sched-event.clr-red { background: rgba(192,57,43,0.08); border-color: #C0392B; color: #8B1515; }
.sched-event.clr-green { background: rgba(26,140,90,0.08); border-color: #1A8C5A; color: #0D5C3A; }
.sched-event.clr-blue { background: rgba(26,111,172,0.08); border-color: #1A6FAC; color: #104570; }
.sched-event.clr-amber { background: rgba(184,134,11,0.08); border-color: #B8860B; color: #6B5000; }
.sched-event.clr-teal { background: rgba(43,122,106,0.08); border-color: #2B7A6A; color: #1A4E42; }
.sched-now-marker { height: 2px; background: var(--maroon); position: relative; margin: 2px 0; border-radius: 1px; }
.sched-now-marker::before {
  content: ''; position: absolute; left: -4px; top: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--maroon);
}
.sched-now-label {
  position: absolute; left: 12px; top: -8px;
  font-size: 9px; font-weight: 700; color: var(--maroon);
  background: rgba(69,23,27,0.08); padding: 1px 6px; border-radius: 4px;
}

@media (max-width: 768px) {
  .qa-card { min-height: 70px; padding: 14px 12px; }
  /* OLD: #pg-today > div:last-child (removed) */
}

/* ── Finance Sub-tabs ── */
.fin-subtabs { display:flex; gap:4px; flex-wrap:wrap; }
.fin-subtab {
  display:flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:50px;
  font-size:12.5px; font-weight:600; cursor:pointer;
  color:var(--fin-mid); background:rgba(255,255,255,0.55);
  border:1px solid rgba(15,42,29,0.1); transition:all .18s;
}
.fin-subtab:hover { background:rgba(255,255,255,0.85); color:var(--fin-dark); }
.fin-subtab.active { background:var(--fin-dark); color:#fff; border-color:var(--fin-dark); }
.fin-subtab i { opacity:.8; }

/* Bar chart (vertical, split income/expense) */
#fin-bars-wrap { background:rgba(15,42,29,0.02); border-radius:8px; padding:8px 4px; gap:4px; }
.fin-bar-grp { display:flex; flex-direction:column; align-items:center; gap:2px; flex:1; height:100%; justify-content:flex-end; }
.fin-bar-inner { display:flex; gap:2px; align-items:flex-end; flex:1; width:100%; }
.fin-bar-v { border-radius:4px 4px 0 0; min-height:4px; transition:height .3s; cursor:pointer; }
.fin-bar-v.inc { background:#375534; }
.fin-bar-v.exp { background:#AEC3B0; }
.fin-bar-v:hover { filter:brightness(1.15); }

/* ── Today page: Stat cards ── */
.today-stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh);
  transition: box-shadow .15s, transform .15s;
}
.today-stat-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.today-stat-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.today-stat-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.today-stat-num { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; }
.today-stat-sub { font-size: 11.5px; color: var(--text-light); }

/* ── Chart card ── */
.chart-card-today {
  background: #F0FAF7;
  border: 1px solid rgba(43,122,106,0.12);
  border-radius: var(--r-lg);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  box-shadow: 0 1px 6px rgba(43,122,106,0.06);
}
.chart-card-title { font-size: 15px; font-weight: 700; color: #1A3C33; margin-bottom: 4px; }
.chart-card-sub { font-size: 12px; color: #5A807A; line-height: 1.5; }
.chart-arrow-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(69,23,27,0.3);
  transition: all .15s;
}
.chart-arrow-btn:hover { background: var(--maroon2); transform: scale(1.08); }

/* ── Schedule header buttons ── */
.sched-hdr-btn {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
  cursor: pointer;
  font-size: 12px;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  transition: all .15s;
}
.sched-hdr-btn:hover { background: rgba(0,0,0,0.07); }
.sched-hdr-btn.active { background: #1A3C33; color: #fff; border-color: #1A3C33; }

/* Schedule event cards — reference style */
.sched-event { border-radius: 12px !important; border-left-width: 4px !important; }
.sched-event .se-title { font-size: 12.5px !important; }
.sched-event .se-sub { display: flex; align-items: center; gap: 4px; }

/* Page height fix for Today */
/* OLD: #pg-today.active { overflow: hidden; } */

@media (max-width: 900px) {
  /* OLD: #pg-today > div { grid-template-columns: 1fr !important; } */
  /* OLD: #pg-today > div > div:last-child (removed) */
  .chart-card-today { min-height: 140px; }
  .today-stat-num { font-size: 28px; }
}

/* ── Lock Screen ── */
.lock-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #F0EBE3;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 9999; display: none;
  align-items: center; justify-content: center;
}
.lock-screen.show { display: flex; }
.lock-card {
  text-align: center; padding: 40px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  display: flex; flex-direction: column; align-items: center;
}
.lock-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: #45171B;
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.lock-name { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 4px; }

/* ── Notification Panel ── */
.notif-panel {
  position: absolute; top: 48px; right: 28px;
  width: 340px; max-height: 420px;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden; display: none; z-index: 100;
}
.notif-panel.show { display: block; }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer; transition: background .15s;
}
.notif-item:hover { background: rgba(0,0,0,0.02); }
.notif-item.unread { background: rgba(43,122,106,0.04); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: #2B7A6A; }
.notif-dot.warning { background: #E67E22; }
.notif-dot.error { background: #C0392B; }
.notif-dot.success { background: #27AE60; }
.notif-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.notif-detail { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.notif-time { font-size: 10px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ── Sidebar Logout ── */
.u-logout {
  margin-left: auto; padding: 6px; border-radius: 8px;
  cursor: pointer; color: var(--text-muted); opacity: .6;
  transition: all .15s;
}
.u-logout:hover { opacity: 1; color: #C0392B; background: rgba(192,57,43,0.08); }
.u-profile { display: flex; align-items: center; gap: 10px; }



/* ═══ WORKSPACE SWITCHER ════════════════════════════ */
.ws-switcher {
  display: flex; align-items: center; gap: 8px;
  margin: 0 10px 4px; padding: 8px 12px;
  border-radius: var(--r-sm); cursor: pointer;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all .15s;
}
.ws-switcher:hover { background: rgba(255,255,255,0.14); }
.sidebar.collapsed .ws-switcher .ws-name,
.sidebar.collapsed .ws-switcher i { display: none; }
.sidebar.collapsed .ws-switcher { justify-content: center; padding: 8px; }
.ws-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4CAF50; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(76,175,80,0.5);
}
.ws-name {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-menu {
  display: none; position: absolute; left: 10px; top: auto;
  width: 210px; background: #fff;
  backdrop-filter: none; border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12); border: 1px solid rgba(0,0,0,0.08);
  z-index: 300; padding: 6px; margin-top: 4px;
}
.ws-menu.show { display: block; }
.ws-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--text);
  transition: background .12s;
}
.ws-menu-item:hover { background: rgba(69,23,27,0.06); }
.ws-menu-item.active { background: rgba(69,23,27,0.1); color: var(--maroon); font-weight: 600; }
.ws-menu-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ws-menu-sep {
  height: 1px; background: rgba(0,0,0,0.06); margin: 4px 8px;
}
.ws-menu-add {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 11.5px; color: var(--text-muted); transition: all .12s;
}
.ws-menu-add:hover { background: rgba(0,0,0,0.04); color: var(--text); }

/* ═══ COMMAND BAR ═══════════════════════════════════ */
.cmd-bar-wrap { display: flex; flex-direction: column; gap: 10px; }
.cmd-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--glass);
  backdrop-filter: none; border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--r-lg); box-shadow: var(--sh);
  transition: all .2s;
}
.cmd-bar:focus-within {
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 0 0 3px rgba(69,23,27,0.06);
}
.cmd-icon { color: var(--gold); flex-shrink: 0; }
.cmd-input {
  flex: 1; border: none; background: none; outline: none;
  font-family: 'Onest', sans-serif; font-size: 14.5px;
  color: var(--text); font-weight: 400;
}
.cmd-input::placeholder { color: var(--text-muted); font-size: 13px; }
.cmd-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: #45171B;
  border: none; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: #fff;
  transition: all .15s; flex-shrink: 0;
}
.cmd-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(69,23,27,0.3); }
.cmd-hints {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 0 4px;
}
.cmd-hint {
  padding: 5px 12px; border-radius: 6px; font-size: 11px;
  font-weight: 500; color: var(--text-muted);
  background: var(--glass2); border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer; transition: all .12s; font-family: 'Onest', sans-serif;
}
.cmd-hint:hover { background: rgba(0,0,0,0.04); color: var(--text); border-color: rgba(0,0,0,0.1); }

/* ═══ PINNED ACTIONS ════════════════════════════════ */
.pins-section { display: flex; flex-direction: column; gap: 8px; }
.pins-header { display: flex; align-items: center; justify-content: space-between; }
.pins-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.pins-edit-btn {
  width: 24px; height: 24px; border-radius: 50%; border: 1px dashed rgba(0,0,0,0.15);
  background: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); transition: all .12s;
}
.pins-edit-btn:hover { background: rgba(69,23,27,0.06); border-color: var(--maroon); color: var(--maroon); }
.pins-row {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
}
.pins-row::-webkit-scrollbar { display: none; }
.pin-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--glass); backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.pin-chip:hover { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); transform: translateY(-1px); }
.pin-chip-icon { font-size: 16px; }
.pin-chip-label { font-size: 12px; font-weight: 500; color: var(--text2); }
.pin-chip-badge {
  font-size: 9px; background: var(--maroon); color: #fff;
  padding: 1px 5px; border-radius: 10px; font-weight: 700;
}

/* Pin browser */
.pin-browser {
  background: var(--glass); backdrop-filter: none;
  border: 1px solid var(--glass-border); border-radius: var(--r);
  padding: 12px;
}
.pin-browser-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.pin-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 11.5px; font-weight: 500;
  color: var(--text-light); transition: all .12s;
  border: 1px solid transparent;
}
.pin-opt:hover { background: #D8D1C2; color: var(--text); }
.pin-opt.pinned { background: #D8D1C2; color: var(--maroon); border-color: #A89585; }
.pin-opt-icon { font-size: 14px; }

/* ═══ RESULT FEED ═══════════════════════════════════ */
.result-feed { display: flex; flex-direction: column; gap: 12px; }
.result-card {
  background: var(--glass); backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.06); border-radius: var(--r-lg);
  overflow: hidden; animation: resultIn .3s ease;
  box-shadow: var(--sh);
}
@keyframes resultIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.result-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.result-ws-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.result-query { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; }
.result-time { font-size: 10px; color: var(--text-muted); }
.result-pin-btn {
  width: 24px; height: 24px; border-radius: 6px; border: none;
  background: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); transition: all .12s;
}
.result-pin-btn:hover { background: rgba(69,23,27,0.06); color: var(--maroon); }
.result-body { padding: 14px 16px; }
.result-body p { font-size: 13px; line-height: 1.7; color: var(--text2); margin-bottom: 8px; }
.result-body pre {
  background: rgba(0,0,0,0.04); padding: 12px; border-radius: var(--r-sm);
  font-size: 12px; overflow-x: auto; font-family: 'Fira Code', monospace;
  line-height: 1.5; color: var(--text);
}
.result-body .result-img {
  width: 100%; max-height: 300px; object-fit: cover;
  border-radius: var(--r-sm); margin: 4px 0;
}
.result-actions {
  display: flex; gap: 6px; padding: 10px 16px 14px;
}
.result-action-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 11px;
  font-weight: 600; border: 1px solid rgba(0,0,0,0.08);
  background: transparent; color: var(--text2);
  cursor: pointer; transition: all .12s; font-family: 'Onest', sans-serif;
}
.result-action-btn:hover { background: rgba(0,0,0,0.03); color: var(--text); }
.result-action-btn.primary {
  background: var(--maroon);
  color: #fff; border-color: transparent;
}
.result-action-btn.primary:hover { opacity: 0.9; }

/* Typing indicator in result */
.result-typing {
  display: flex; align-items: center; gap: 8px;
  padding: 16px; font-size: 12.5px; color: var(--text-muted);
}
.typing-dots { display: flex; gap: 3px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); animation: typingBounce .6s infinite alternate;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { from { opacity: 0.3; transform: translateY(0); } to { opacity: 1; transform: translateY(-3px); } }

/* ═══ RECENT ACTIONS ════════════════════════════════ */
.recents-section { display: flex; flex-direction: column; gap: 8px; }
.recents-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.recents-row::-webkit-scrollbar { display: none; }
.recent-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: #F5F1EB; border: 1px solid #D8D1C2;
  cursor: pointer; transition: all .12s; white-space: nowrap; flex-shrink: 0;
  max-width: 200px;
}
.recent-chip:hover { background: #FDFCFA; }
.recent-chip-text {
  font-size: 11px; color: var(--text-light); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis;
}
.recent-chip-time { font-size: 9px; color: var(--text-muted); flex-shrink: 0; }

/* ─── SETTINGS TABS ────────────────────────────────────── */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--glass2);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r);
  padding: 4px;
}
.stab {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.stab:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.stab.active {
  background: rgba(255,255,255,0.65);
  color: var(--maroon);
  box-shadow: 0 2px 10px rgba(69,23,27,0.08);
  backdrop-filter: none;
}
.stab-badge {
  background: var(--maroon);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}
.stab-panel { display: none; }
.stab-panel.active { display: block; }

/* ─── TODAY PAGE LAYOUT ────────────────────────────────── */
#pg-today.active {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  padding: 0;
}


/* ═══ WHATSAPP PAGE ═══════════════════════════════════════════ */
.wa-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--glass-border);
  margin-bottom: 20px;
  padding: 0 24px;
}
.wa-tab {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.wa-tab:hover { color: var(--text); }
.wa-tab.active {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}
.wa-pane { padding: 0 24px 24px; }

/* Connection card */
.wa-connection-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  max-width: 520px;
}

/* Status bar */
.wa-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 600;
  background: #FEE2E2;
  color: #991B1B;
}
.wa-status-bar.connected { background: #D1FAE5; color: #065F46; }
.wa-status-bar.qr-ready { background: #EFF6FF; color: #1E40AF; }
.wa-status-bar.connecting { background: #FEF9C3; color: #713F12; }

.wa-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #991B1B;
  flex-shrink: 0;
}
.wa-status-bar.connected .wa-status-dot { background: #059669; }
.wa-status-bar.qr-ready .wa-status-dot { background: #2563EB; animation: wa-pulse 1.5s infinite; }
.wa-status-bar.connecting .wa-status-dot { background: #D97706; animation: wa-pulse 1s infinite; }

@keyframes wa-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* QR area */
.wa-qr-area {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.wa-qr-frame {
  width: 260px;
  height: 260px;
  background: #D8D1C2;
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-qr-frame.has-qr {
  border-style: solid;
  border-color: var(--primary);
}
.wa-qr-frame.is-connected {
  border-style: solid;
  border-color: #059669;
  background: #ECFDF5;
}

.wa-spinner {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.wa-spin-ring {
  width: 36px;
  height: 36px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--maroon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.wa-connected-box {
  text-align: center;
  color: #059669;
  font-weight: 700;
  font-size: 15px;
}
.wa-check-icon {
  width: 56px;
  height: 56px;
  background: #D1FAE5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #059669;
  margin: 0 auto 10px;
}

.wa-qr-instructions {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}
.wa-qr-instructions ol {
  padding-left: 18px;
  margin: 0;
}
.wa-qr-instructions li { margin-bottom: 4px; }

/* Action buttons */
.wa-action-btns {
  display: flex;
  gap: 10px;
}

/* DM Card */
.wa-dm-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.wa-dm-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-dm-icon { font-size: 24px; }
.wa-dm-title { font-weight: 700; font-size: 14px; color: var(--text); }
.wa-dm-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.wa-toggle-wrap { position: relative; }
.wa-toggle-input { display: none; }
.wa-toggle-slider {
  display: block;
  width: 44px;
  height: 24px;
  background: #D1D5DB;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.wa-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.wa-toggle-input:checked + .wa-toggle-slider {
  background: #16A34A;
}
.wa-toggle-input:checked + .wa-toggle-slider::after {
  transform: translateX(20px);
}

/* Groups */
.wa-groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.wa-groups-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.wa-groups-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 500px;
  overflow-y: auto;
}
.wa-groups-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--glass);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
}
.wa-group-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: background 0.15s;
}
.wa-group-card:hover { background: var(--glass-hover); }
.wa-group-card.active {
  background: #FDFCFA;
  border-color: var(--primary);
}
.wa-group-info { flex: 1; min-width: 0; }
.wa-group-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-group-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.wa-group-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.wa-group-badge.on { background: #D1FAE5; color: #065F46; }
.wa-group-badge.off { background: #F3F4F6; color: #6B7280; }

.wa-group-actions { display: flex; gap: 6px; align-items: center; }
.wa-group-toggle {
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.15s;
}
.wa-group-toggle.enable {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}
.wa-group-toggle.enable:hover { opacity: 0.85; }
.wa-group-toggle.disable {
  background: transparent;
  color: var(--text-muted);
}
.wa-group-toggle.disable:hover { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }

.wa-group-mode {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
}
.wa-group-mode:hover { background: var(--glass-hover); }

/* WhatsApp modal adjustments */
#wa-modal .wa-tabs { padding: 0; margin: 12px 24px 0; }
#wa-modal .wa-qr-frame { width: 220px; height: 220px; }
#wa-modal .wa-qr-area { gap: 20px; }
#wa-modal .wa-connection-card { padding: 0; border: none; background: none; }
#wa-modal .wa-groups-container { max-height: 300px; }

/* ═══ CHAT CONVERSATION SIDEBAR ═══ */
.chat-sidebar{display:flex;flex-direction:column;width:260px;min-width:260px;border-right:1px solid rgba(0,0,0,0.06);background:#fafaf8;height:100%;overflow:hidden}
.chat-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 14px;border-bottom:1px solid rgba(0,0,0,0.06)}
.chat-sidebar-header h3{margin:0;font-size:13px;font-weight:700;color:var(--text)}
.chat-sidebar-btn{width:32px;height:32px;border-radius:8px;background:rgba(69,23,27,0.08);border:none;color:var(--maroon);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}
.chat-sidebar-btn:hover{background:rgba(69,23,27,0.15);transform:scale(1.05)}
.chat-conversations-list{flex:1;overflow-y:auto;scrollbar-width:thin;padding:8px;display:flex;flex-direction:column;gap:4px}
.conv-item{padding:10px 12px;border-radius:8px;background:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.04);cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:8px;overflow:hidden}
.conv-item:hover{background:rgba(255,255,255,0.8);border-color:rgba(69,23,27,0.15)}
.conv-item.active{background:linear-gradient(135deg,rgba(69,23,27,0.08),rgba(69,23,27,0.04));border-color:rgba(69,23,27,0.25)}
.conv-title{font-size:12px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-preview{font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.conv-meta{font-size:10px;color:rgba(69,23,27,0.5);margin-top:2px}
.conv-delete{width:24px;height:24px;border-radius:6px;background:transparent;border:none;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;opacity:0;transition:all .2s}
.conv-item:hover .conv-delete{opacity:1}
.conv-delete:hover{background:rgba(69,23,27,0.12);color:var(--maroon)}

/* ═══ CHAT HEADER ═══ */
.chat-header{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 24px 14px;border-bottom:1px solid rgba(0,0,0,0.05);background:transparent}
.chat-header h1{margin:0;font-family:'DM Serif Display',serif;font-size:22px;font-weight:400;color:var(--maroon)}
.chat-header p{margin:4px 0 0;font-size:12px;color:var(--text-muted)}

/* ═══ MESSAGE PREVIEW + DOWNLOAD ═══ */
.msg-preview{position:relative}
.msg-preview-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.msg-btn-small{padding:5px 10px;border-radius:6px;background:rgba(69,23,27,0.1);border:1px solid rgba(69,23,27,0.15);color:var(--maroon);font-size:11.5px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all .2s}
.msg-btn-small:hover{background:rgba(69,23,27,0.18);border-color:rgba(69,23,27,0.3);transform:translateY(-1px)}

/* ═══ MESSAGE MODAL ═══ */
.msg-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:9998;padding:20px;animation:fadeIn .2s}
.msg-modal-content{background:#fff;border-radius:16px;max-width:700px;width:100%;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden}
.msg-modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid rgba(0,0,0,0.06)}
.msg-modal-header h3{margin:0;font-size:16px;font-weight:700;color:var(--text)}
.msg-modal-close{width:32px;height:32px;border-radius:8px;background:rgba(69,23,27,0.1);border:none;color:var(--maroon);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}
.msg-modal-close:hover{background:rgba(69,23,27,0.2)}
.msg-modal-body{flex:1;overflow-y:auto;padding:24px;scrollbar-width:thin;font-size:13.5px;line-height:1.7}
.msg-modal-footer{display:flex;gap:12px;padding:14px 24px;border-top:1px solid rgba(0,0,0,0.06);justify-content:flex-end}

/* ═══ MARKDOWN IN MESSAGES ═══ */
.msg-bubble h3{margin:10px 0 4px!important;font-weight:700!important;font-size:1.05em!important}
.msg-bubble strong{font-weight:700}
.msg-bubble code{background:rgba(69,23,27,0.08);padding:2px 5px;border-radius:3px;font-family:monospace;font-size:0.88em}
.msg-bubble pre{background:rgba(0,0,0,0.04);padding:10px;border-radius:8px;border-left:3px solid var(--maroon);overflow-x:auto;font-family:monospace;font-size:0.85em;line-height:1.5;margin:8px 0}
.msg-bubble a{color:var(--maroon);text-decoration:underline}
.msg-bubble p{margin:6px 0;line-height:1.6}
.msg-bubble p:first-child{margin-top:0}
.msg-bubble p:last-child{margin-bottom:0}

/* ═══ RESPONSIVE CHAT ═══ */
@media(max-width:768px){
  .chat-sidebar{display:none}
  .msg{max-width:92%}
  .chat-header{padding:14px 16px 10px}
  .chat-header h1{font-size:18px}
}

/* ═══ EMPTY STATE CARDS (Section A) ═══ */
.empty-state-card{text-align:center;padding:32px 20px;border:2px dashed rgba(0,0,0,0.08);border-radius:16px;background:rgba(255,255,255,0.5)}
.empty-state-card .empty-icon{font-size:32px;margin-bottom:12px}
.empty-state-card .empty-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:6px}
.empty-state-card .empty-desc{font-size:12.5px;color:var(--text-muted);line-height:1.6;max-width:400px;margin:0 auto}
.empty-state-mini{display:flex;align-items:center;gap:10px;padding:16px;border:1px dashed rgba(0,0,0,0.08);border-radius:12px;font-size:12.5px;color:var(--text-muted);line-height:1.5}
.empty-state-mini span{font-size:24px;flex-shrink:0}

/* ═══ AGENT BADGES (Section B/C) ═══ */
.agent-badge{font-size:9px;font-weight:700;padding:3px 10px;border-radius:20px;position:absolute;top:12px;right:12px;letter-spacing:0.3px}
.agent-badge.active{background:rgba(22,163,74,0.12);color:#16A34A;border:1px solid rgba(22,163,74,0.25)}
.agent-badge.coming{background:rgba(0,0,0,0.04);border:1px solid rgba(0,0,0,0.1);color:var(--text-muted)}
.agent-card{position:relative}
.agent-active .status-dot{background:#16A34A!important;box-shadow:0 0 6px rgba(22,163,74,0.4)}
.agent-coming .status-dot{background:#ccc!important;box-shadow:none}
.agent-coming{opacity:0.7}
.agent-coming h3,.agent-coming p{opacity:0.75}

/* ═══════════════════════════════════════════════════════
   SCOPE 1 — UI POLISH: Premium refinements
═══════════════════════════════════════════════════════ */

/* ── Global focus-visible ring (accessibility + polish) ── */
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
.nav-item:focus-visible, .btn:focus-visible, .cmd-hint:focus-visible, .pin-chip:focus-visible {
  outline: 2px solid rgba(69,23,27,0.25);
  outline-offset: 2px;
}

/* ── Card hover polish: consistent lift across all cards ── */
.card { transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--sh-md); }
.urgent-item { transition: all .15s ease; }
.result-card { transition: box-shadow .15s, transform .15s; }
.result-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }

/* ── Button consistency: unified active states ── */
.btn:active { transform: scale(0.97); }
.btn-primary:active { background: #2D0F12; }
.cmd-send:active { transform: scale(0.92); }

/* ── Smoother page transitions ── */
.page { animation: fadeUp 0.2s ease; }
@keyframes slideIn { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:translateX(0); } }

/* ── Selection color ── */
::selection { background: rgba(69,23,27,0.15); color: var(--text); }

/* ── Skeleton loader animation (replaces static grey blocks) ── */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--r);
}
@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Improved toast ── */
.toast-msg {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; border-radius: 10px;
  color: #fff; font-size: 13px; font-weight: 600;
  z-index: 9999; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: toastIn .25s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast-msg.success { background: #1A8C5A; }
.toast-msg.error { background: #8B1A1A; }
.toast-msg.info { background: var(--maroon); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Today page: stat-card sub text links ── */
.today-stat-sub a, .today-stat-sub span[onclick] {
  color: var(--maroon); cursor: pointer; font-weight: 600;
}
.today-stat-sub a:hover, .today-stat-sub span[onclick]:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   SCOPE 2 — CRM / LEAD PIPELINE STYLES
═══════════════════════════════════════════════════════ */

/* ── Pipeline columns ── */
.pipeline-wrap {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 12px; scrollbar-width: thin;
}
.pipeline-col {
  min-width: 220px; flex: 1;
  background: var(--glass2); border-radius: var(--r-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.pipeline-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 2px solid rgba(0,0,0,0.06);
  margin-bottom: 4px;
}
.pipeline-col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted);
}
.pipeline-col-count {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; background: rgba(0,0,0,0.05); color: var(--text-light);
}

/* ── Lead cards ── */
.lead-card {
  background: #fff; border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r); padding: 14px 16px;
  cursor: pointer; transition: all .15s;
  position: relative;
}
.lead-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.lead-card-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.lead-card-source { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.lead-card-value {
  font-size: 12px; font-weight: 700; color: var(--green);
  display: flex; align-items: center; gap: 4px;
}
.lead-card-actions {
  display: flex; gap: 4px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.lead-card-actions .btn { padding: 4px 10px; font-size: 10.5px; }
.lead-card-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px;
}
.lead-card-tag.hot { background: rgba(192,57,43,0.1); color: var(--red); }
.lead-card-tag.warm { background: rgba(212,136,15,0.1); color: var(--amber); }
.lead-card-tag.cold { background: rgba(46,134,171,0.1); color: var(--blue); }

/* ── Pipeline stats bar ── */
.pipeline-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.pipeline-stat {
  background: #fff; border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r); padding: 16px 18px;
  text-align: center; transition: all .15s;
}
.pipeline-stat:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.pipeline-stat-num { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.pipeline-stat-label { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── Add lead form (inline) ── */
.add-lead-inline {
  display: flex; gap: 8px; padding: 14px 16px;
  background: var(--glass); border: 1px dashed rgba(0,0,0,0.1);
  border-radius: var(--r); margin-bottom: 16px;
}
.add-lead-inline input {
  flex: 1; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 7px; padding: 8px 12px;
  font-size: 12.5px; font-family: inherit; outline: none;
  background: #fff; transition: border-color .15s;
}
.add-lead-inline input:focus { border-color: rgba(69,23,27,0.3); }

/* ── Lead capture banner (Today page) ── */
.lead-capture-banner {
  background: linear-gradient(135deg, #45171B 0%, #6B2A2E 100%);
  border-radius: var(--r-lg); padding: 20px 24px;
  color: #fff; display: flex; align-items: center; gap: 16px;
  transition: transform .15s;
}
.lead-capture-banner:hover { transform: translateY(-1px); }
.lead-capture-banner h3 {
  font-family: 'DM Serif Display', serif; font-size: 16px;
  font-weight: 400; margin-bottom: 4px;
}
.lead-capture-banner p { font-size: 12px; opacity: 0.75; line-height: 1.5; }
.lead-capture-banner .btn {
  background: rgba(255,255,255,0.2); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0; white-space: nowrap;
}
.lead-capture-banner .btn:hover { background: rgba(255,255,255,0.3); }

/* ── Conversion funnel mini-chart ── */
.funnel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
}
.funnel-label { font-size: 11px; color: var(--text-muted); width: 80px; text-align: right; }
.funnel-track { flex: 1; height: 8px; background: rgba(0,0,0,0.04); border-radius: 4px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.funnel-count { font-size: 11px; font-weight: 700; color: var(--text); width: 30px; }

/* ── Quick action cards (smart CTAs) ── */
.smart-cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--glass);
  border: 1px solid rgba(0,0,0,0.06); border-radius: var(--r);
  cursor: pointer; transition: all .15s;
}
.smart-cta:hover { background: rgba(0,0,0,0.02); transform: translateX(2px); border-color: rgba(0,0,0,0.1); }
.smart-cta-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.smart-cta-text { flex: 1; }
.smart-cta-title { font-size: 13px; font-weight: 600; color: var(--text); }
.smart-cta-desc { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.smart-cta-arrow { color: var(--text-muted); font-size: 14px; transition: transform .15s; }
.smart-cta:hover .smart-cta-arrow { transform: translateX(3px); color: var(--maroon); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE CRM
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pipeline-wrap { flex-direction: column; }
  .pipeline-col { min-width: 100%; }
  .pipeline-stats { grid-template-columns: repeat(2, 1fr); }
  .lead-capture-banner { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════
   CONNECTION HEALTH & INTEGRATION STATUS
═══════════════════════════════════════════════════════ */

/* ── Connection status strip (Today page) ── */
.conn-strip {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.conn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .15s; border: 1px solid rgba(0,0,0,0.06);
}
.conn-chip:hover { transform: translateY(-1px); box-shadow: var(--sh); }
.conn-chip.ok { background: rgba(22,163,74,0.08); color: #16A34A; border-color: rgba(22,163,74,0.15); }
.conn-chip.warn { background: rgba(212,136,15,0.08); color: #D4880F; border-color: rgba(212,136,15,0.15); }
.conn-chip.off { background: rgba(0,0,0,0.03); color: var(--text-muted); }
.conn-chip-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.conn-chip.ok .conn-chip-dot { background: #16A34A; box-shadow: 0 0 4px rgba(22,163,74,0.4); }
.conn-chip.warn .conn-chip-dot { background: #D4880F; }
.conn-chip.off .conn-chip-dot { background: #ccc; }

/* ── Integration card status (Settings) ── */
.int-card .int-health {
  font-size: 10px; color: var(--text-muted); margin-top: 6px;
}
.int-card .int-health .retry-btn {
  color: var(--maroon); cursor: pointer; font-weight: 600;
  text-decoration: underline; margin-left: 4px;
}
.status-pill {
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; display: inline-block;
}
.status-pill.yes { background: rgba(22,163,74,0.1); color: #16A34A; }
.status-pill.no { background: rgba(0,0,0,0.04); color: var(--text-muted); }
.status-pill.error { background: rgba(192,57,43,0.1); color: var(--red); }

/* Workspace theme accent */
:root { --ws-accent: #9C27B0; }
.ws-menu-item.active { border-left: 3px solid var(--ws-accent) !important; }
.sidebar .nav-link.active { border-right: 3px solid var(--ws-accent); }


/* ═══════════════════════════════════════
   HOME DASHBOARD — NEW BLUEPRINT STYLES
   ═══════════════════════════════════════ */

/* System Bar */
.home-sysbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.home-sysbar-left { display: flex; align-items: center; gap: 14px; }
.home-ws-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,0.05); border-radius: 20px;
  padding: 4px 12px; cursor: pointer;
}
.home-ws-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}
.home-ws-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.home-sysbar-date { font-size: 12px; color: var(--text-muted); }
.home-sysbar-right { display: flex; align-items: center; gap: 8px; }
.home-conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-light); title: attr(data-label);
}
.home-conn-dot.ok { background: var(--green); }
.home-conn-dot.warn { background: var(--amber); }
.home-conn-dot.err { background: var(--red); }

/* Briefing Card */
.briefing-card {
  display: flex; gap: 0;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.briefing-left {
  display: flex; gap: 0;
  padding: 18px 28px;
  border-right: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.briefing-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px; border-right: 1px solid var(--glass-border);
  min-width: 80px;
}
.briefing-stat:last-child { border-right: none; }
.briefing-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 28px; font-weight: 400; color: var(--text);
  line-height: 1.1;
}
.briefing-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; text-align: center; }
.briefing-right {
  flex: 1; padding: 16px 24px;
  display: flex; flex-direction: column; gap: 10px; justify-content: center;
}
.briefing-intel {
  font-size: 13.5px; color: var(--text); line-height: 1.6;
  max-height: 60px; overflow: hidden;
}
.briefing-intel-loading { color: var(--text-muted); font-style: italic; }
.briefing-actions { display: flex; gap: 8px; align-items: center; }
.briefing-cta {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--maroon); color: #fff;
  border: none; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: opacity .15s;
}
.briefing-cta:hover { opacity: 0.88; }
.briefing-cta.ghost {
  background: transparent; color: var(--maroon);
  border: 1px solid var(--maroon);
}

/* Home Body */
.home-body {
  display: grid; grid-template-columns: 1fr 300px;
  flex: 1; min-height: 0; overflow: hidden;
}

/* Task Board */
.home-tasks {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
}
.home-tasks-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.home-tasks-title { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.home-board-filters { display: flex; gap: 4px; flex: 1; }
.board-filter {
  padding: 4px 10px; border-radius: 12px;
  border: 1px solid transparent;
  background: transparent; font-size: 11.5px;
  color: var(--text-muted); cursor: pointer;
  transition: all .15s;
}
.board-filter:hover { background: rgba(0,0,0,0.05); }
.board-filter.active {
  background: var(--maroon); color: #fff; border-color: var(--maroon);
}
.home-task-add-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.05); border: none;
  font-size: 12px; color: var(--text); cursor: pointer;
  flex-shrink: 0; transition: background .15s;
}
.home-task-add-btn:hover { background: rgba(0,0,0,0.1); }

.home-board {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; flex: 1; overflow: hidden;
}
.board-col {
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
}
.board-col:last-child { border-right: none; }
.board-col-header {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 8px; font-size: 11.5px;
  font-weight: 600; color: var(--text-muted);
  flex-shrink: 0; background: rgba(0,0,0,0.02);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.board-col-header.overdue { color: var(--red); }
.board-col-header.today { color: #E67E22; }
.board-col-header.week { color: var(--blue); }
.board-col-count {
  margin-left: auto; background: rgba(0,0,0,0.08);
  border-radius: 10px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 700;
}
.board-col-body {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin;
}
.board-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; transition: box-shadow .15s, transform .1s;
}
.board-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.board-card.overdue { border-left: 3px solid var(--red); }
.board-card.today { border-left: 3px solid #E67E22; }
.board-card.week { border-left: 3px solid var(--blue); }
.board-card-check {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--glass-border);
  flex-shrink: 0; margin-top: 1px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.board-card-check:hover { border-color: var(--maroon); background: rgba(69,23,27,0.05); }
.board-card-body { flex: 1; min-width: 0; }
.board-card-title { font-size: 12.5px; color: var(--text); line-height: 1.35; font-weight: 500; }
.board-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.board-col-empty {
  font-size: 12px; color: var(--text-light);
  text-align: center; padding: 20px 10px; font-style: italic;
}

/* Quick add */
.home-quick-add {
  padding: 8px 14px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.home-quick-add-input {
  width: 100%; padding: 7px 12px;
  border: 1px solid var(--maroon); border-radius: 8px;
  background: var(--glass); font-size: 13px; color: var(--text);
  outline: none;
}

/* Assistant Panel */
.assistant-panel {
  display: flex; flex-direction: column; gap: 0;
  overflow-y: auto; scrollbar-width: thin;
}
.ap-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.ap-section-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.ap-chips { display: flex; flex-direction: column; gap: 5px; }
.ap-chip {
  padding: 7px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.04); border: 1px solid transparent;
  font-size: 12.5px; color: var(--text);
  cursor: pointer; text-align: left;
  transition: all .15s; width: 100%;
}
.ap-chip:hover { background: rgba(69,23,27,0.07); border-color: rgba(69,23,27,0.15); }
.ap-chat-wrap {
  display: flex; gap: 6px; padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ap-chat-input {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--glass-border); border-radius: 8px;
  background: var(--glass); font-size: 13px; color: var(--text);
  outline: none; transition: border-color .15s;
}
.ap-chat-input:focus { border-color: var(--maroon); }
.ap-chat-send {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--maroon); border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .15s;
}
.ap-chat-send:hover { opacity: 0.85; }
.ap-response {
  padding: 10px 16px; font-size: 12.5px;
  color: var(--text); line-height: 1.55;
  border-bottom: 1px solid var(--glass-border);
  max-height: 200px; overflow-y: auto;
  background: rgba(69,23,27,0.03);
}
.ap-memory { display: flex; flex-direction: column; gap: 5px; }
.ap-memory-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text); line-height: 1.4;
  padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.ap-memory-item:last-child { border-bottom: none; }
.ap-memory-bullet {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--maroon); flex-shrink: 0; margin-top: 5px;
}
.ap-memory-empty { font-size: 12px; color: var(--text-light); font-style: italic; }
.ap-memory-add {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center; margin-left: auto;
}
.ap-memory-add:hover { color: var(--maroon); }

/* Signals Strip */
.signals-strip {
  display: flex; gap: 0;
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0; overflow-x: auto;
  scrollbar-width: none;
}
.signals-strip::-webkit-scrollbar { display: none; }
.signal-item {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; cursor: pointer;
  border-right: 1px solid var(--glass-border);
  flex-shrink: 0; transition: background .15s; min-width: 0;
}
.signal-item:hover { background: rgba(0,0,0,0.04); }
.signal-item:last-child { border-right: none; }
.signal-label { font-size: 11.5px; color: var(--text-muted); }
.signal-val {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  margin-left: 4px;
}
.signal-val.alert { color: var(--red); }
.signal-val.warn { color: #E67E22; }
.signal-val.ok { color: var(--green); }

/* Calendar Strip */
.cal-strip {
  background: var(--glass); flex-shrink: 0;
  overflow: hidden;
}
.cal-strip-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px 6px;
}
.cal-strip-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-strip-more {
  font-size: 12px; color: var(--maroon); background: none; border: none;
  cursor: pointer; font-weight: 500;
}
.cal-strip-more:hover { text-decoration: underline; }
.cal-strip-events {
  display: flex; gap: 10px; padding: 0 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.cal-strip-events::-webkit-scrollbar { display: none; }
.cal-strip-event {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass2); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 7px 12px; flex-shrink: 0;
  cursor: pointer; transition: box-shadow .15s;
}
.cal-strip-event:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cal-strip-event-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--maroon); flex-shrink: 0;
}
.cal-strip-event-time { font-size: 11px; color: var(--text-muted); }
.cal-strip-event-title { font-size: 12.5px; color: var(--text); font-weight: 500; }
.cal-strip-empty { font-size: 12px; color: var(--text-light); font-style: italic; padding: 0 4px 4px; }

/* pg-today layout — only when active */
#pg-today.active {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
  height: 100%;
}
#pg-today .home-body { overflow: hidden; }
#pg-today .home-tasks { overflow: hidden; }
#pg-today .board-col-body { scrollbar-width: thin; }
#pg-today .board-col-body::-webkit-scrollbar { width: 4px; }
#pg-today .board-col-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }


/* ── Home Dashboard Mobile Overrides ── */
@media (max-width: 900px) {
  .home-body { grid-template-columns: 1fr !important; }
  .assistant-panel { border-top: 1px solid var(--glass-border); max-height: 300px; }
  .home-board { grid-template-columns: 1fr !important; }
  .board-col { border-right: none !important; border-bottom: 1px solid rgba(0,0,0,0.05); }
  .briefing-card { flex-direction: column !important; }
  .briefing-left { border-right: none !important; border-bottom: 1px solid var(--glass-border); }
  .signals-strip { flex-wrap: wrap; }
}


/* ── n8n automation pills (added by audit fix) ── */
.auto-pill{display:inline-block;font-size:9.5px;letter-spacing:0.5px;padding:2px 6px;border-radius:3px;margin-left:8px;font-weight:700;vertical-align:middle}
.auto-pill.on{background:rgba(140,200,148,0.15);color:#8cc894}
.auto-pill.off{background:rgba(170,170,170,0.15);color:#a9a9a9}
.auto-pill.err{background:rgba(229,124,90,0.18);color:#e57c5a;margin-left:4px}
.auto-section-head{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:var(--text-muted);margin:8px 4px 8px;font-weight:700}
.auto-section-head .muted{color:rgba(255,255,255,0.35);font-weight:500;letter-spacing:0.5px}

/* ── Personal mode body class — softer overall feel (added by audit) ── */
body.ws-personal .topbar { background: linear-gradient(180deg, rgba(168,104,138,0.04), transparent); }
body.ws-personal .pblue { background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(248,238,242,0.6)); border-color: rgba(168,104,138,0.18); box-shadow: 0 4px 20px rgba(168,104,138,0.06); }
body.ws-personal .pblue-line { color: #5d2d3d; font-style: italic; }
body.ws-personal .pblue-card { background: rgba(255,250,252,0.7); border-color: rgba(168,104,138,0.08); }
body.ws-personal .pblue-chip:hover, body.ws-personal .pblue-chip.on { background: linear-gradient(135deg, #c97aaa, #a8688a); }

/* Weekly section header */
.pblue-weekly-section { margin-top: 14px; }
.pblue-weekly-section .pblue-card-t { color: #a8688a; }
