/* app/css/base.css — basis-CSS van de CAZT OS-schil. Kloon van Remy OS (coach-os/dashboard/index.html L11-946),
   alleen de kleuren omgezet naar de CAZT-tokens (BUILD_CAZT_OS.md). theme.css komt hier als laatste overheen. */
:root {
  /* Remy Ettema / Optimaal Gezond huisstijl: bosgroen + schortgeel op cream */
  --bg-canvas: #F4F2EE;
  --bg-sidebar: #100E0C;         /* donkere bosgroen sidebar (signatuur) */
  --bg-card: #FFFFFF;
  --border-soft: #E4DDD2;
  --shadow-card: 0 1px 3px rgba(22,21,20,0.06);
  --text-primary: #161514;       /* bosgroen ink */
  --text-secondary: #4A453F;
  --text-tertiary: var(--mu);
  --accent-primary: #161514;     /* primaire fill = bosgroen (witte tekst leest) */
  --accent-light: #F6DCCD;       /* pale schortgeel tint (achtergronden) */
  --accent-mid: #E2561F;         /* schortgeel = signatuur-accent */
  --accent-yellow: #E2561F;
  --status-live: #10B981;
  --status-warn: #B7791F;
  --status-error: #B4331A;
  --status-info: #5B6B73;
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
body { min-height: 100vh; overflow-x: hidden; }
::selection { background: var(--accent-light); color: var(--accent-primary); }
a { color: inherit; text-decoration: none; }

/* ===== Layout ===== */
.app {
  display: grid; grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 24px 16px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  overflow-y: auto; z-index: 50;
}
.sidebar::-webkit-scrollbar { width: 0; }

.brand {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-primary);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.brand-stack { display: flex; flex-direction: column; gap: 0; line-height: 1; padding-top: 2px; }
.brand-name {
  font-weight: 700; font-size: 17px; letter-spacing: 0.02em;
  color: var(--text-primary);
}
.brand-sub {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--text-secondary); margin-top: 4px;
}

.online-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 4px 10px; border-radius: 999px;
  background: #ECFDF5; border: 1px solid #D1FAE5; width: fit-content;
  margin-left: 8px;
}
.online-pill .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--status-live); animation: pulseDot 2s ease-in-out infinite;
}
.online-pill .label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #059669;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.nav-section { margin-top: 24px; }
.nav-section:first-of-type { margin-top: 28px; }
.nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-tertiary); padding: 0 12px 10px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 1px 0; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: background 160ms ease, color 160ms ease;
}
.nav-item:hover { color: var(--text-primary); background: #F3F4F6; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.7; }
.nav-item.active {
  color: var(--accent-primary); background: var(--accent-light);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent-primary);
}
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--status-error);
  color: #fff; font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto; line-height: 1;
}

.sidebar-footer {
  margin-top: auto; padding: 12px 8px;
  border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-footer .nav-item { font-size: 13px; color: var(--text-tertiary); }
.sidebar-footer .nav-item:hover { color: var(--text-secondary); }

/* ===== Remy Ettema re-skin (donkere bosgroen sidebar, schortgeel accent) ===== */
.sidebar { border-right-color: rgba(244,242,238,.08); }
.sidebar .brand { border-bottom-color: rgba(244,242,238,.12); }
.sidebar .brand-mark { background: var(--accent-yellow); }
.sidebar .brand-mark svg { color: #100E0C; }
.sidebar .brand-name { color: #F4F2EE; }
.sidebar .brand-sub { color: #BDB6AD; }
.sidebar .nav-label { color: var(--on-dark-mu); }
.sidebar .nav-item { color: #CFC9C1; }
.sidebar .nav-item:hover { color: #FFFFFF; background: rgba(244,242,238,.07); }
.sidebar .nav-item.active { color: #100E0C; background: var(--accent-yellow); font-weight: 600; }
.sidebar .nav-item.active svg { color: #100E0C; opacity: 1; }
.sidebar .nav-item.active::before { background: transparent; }
.sidebar .sidebar-footer .nav-item.active { color: #100E0C; }
.sidebar-footer { border-top-color: rgba(244,242,238,.12); }
.sidebar-footer .nav-item { color: var(--on-dark-mu); }
.sidebar-footer .nav-item:hover { color: #CFC9C1; }
.online-pill { background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.30); }
.online-pill .label { color: #6EE7B7; }
/* elegante serif-koppen + schortgele signatuur-CTA */
.page-header h1 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.btn-primary { background: var(--accent-yellow); color: #100E0C; font-weight: 600; }
.btn-primary:hover { opacity: 1; filter: brightness(1.05); }
.sidebar .avatar { background: linear-gradient(135deg,#241D16,var(--accent-yellow)); color: #100E0C; }
.sidebar .avatar-row { border-top-color: rgba(244,242,238,.12); }
.sidebar .avatar-row .who .n { color: #F4F2EE; }
.sidebar .avatar-row .who .r { color: var(--on-dark-mu); }

.avatar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 0; margin-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), #A78BFA);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #fff;
}
.avatar-row .who { display: flex; flex-direction: column; line-height: 1.3; }
.avatar-row .who .n { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.avatar-row .who .r { font-size: 11px; color: var(--text-tertiary); font-family: 'JetBrains Mono'; }

/* ===== Main content ===== */
.main { padding: 28px 36px 80px; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.breadcrumb {
  font-size: 11px; color: var(--text-tertiary);
  font-family: 'JetBrains Mono'; font-weight: 400;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.breadcrumb .sep { color: var(--border-soft); margin: 0 8px; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
}
.page-header h1 {
  font-size: 34px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text-primary);
}
.page-header .subtitle {
  font-family: var(--serif); font-style: italic;
  font-size: 20px; color: var(--text-secondary); margin-top: 4px;
}
.page-header .right { text-align: right; flex-shrink: 0; }
.page-header .date { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.page-header .updated {
  font-family: 'JetBrains Mono'; font-size: 12px;
  color: var(--text-tertiary); margin-top: 2px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  transition: box-shadow 200ms ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ===== KPI Row ===== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-card { position: relative; }
.kpi-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 12px;
}
.kpi-value {
  font-family: 'JetBrains Mono', monospace; font-weight: 500;
  font-size: 32px; line-height: 1; letter-spacing: -0.02em;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.kpi-value.accent { color: var(--accent-primary); }
.kpi-sub {
  font-size: 12px; color: var(--text-tertiary); margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
}
.kpi-sub .green { color: var(--status-live); font-weight: 600; }
.kpi-sub .red { color: var(--status-error); font-weight: 600; }
.kpi-sub .mono { font-family: 'JetBrains Mono'; }

/* Progress bar */
.progress-bar {
  margin-top: 14px; height: 4px; border-radius: 999px;
  background: #F3F4F6; overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-primary), #A78BFA);
  transition: width 600ms ease;
}
.progress-label {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11px; font-family: 'JetBrains Mono'; color: var(--text-tertiary);
}
.progress-label .pct { color: var(--accent-primary); font-weight: 500; }

/* ===== Grid layouts ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ===== Section headers ===== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.section-title .count {
  font-family: 'JetBrains Mono'; font-size: 11px;
  color: var(--text-tertiary); font-weight: 400; text-transform: none;
}

/* ===== Tables ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-tertiary); padding: 0 12px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.data-table td {
  padding: 12px; font-size: 14px; color: var(--text-primary);
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFC; }
.data-table .mono { font-family: 'JetBrains Mono'; font-size: 13px; }

/* ===== Status pills ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.pill.green { background: #ECFDF5; color: #059669; }
.pill.yellow { background: #FFFBEB; color: #D97706; }
.pill.red { background: #FEF2F2; color: #DC2626; }
.pill.blue { background: #EFF6FF; color: #2563EB; }
.pill.violet { background: var(--accent-light); color: var(--accent-primary); }
.pill.gray { background: #F3F4F6; color: var(--text-secondary); }

/* ===== Priority dots ===== */
.prio-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.prio-dot.high { background: var(--status-error); }

/* ===== AI Coach Agent ===== */
.agent-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; height: calc(100vh - 180px); min-height: 500px; }
.agent-sidebar { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.agent-chat-area { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.agent-chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.agent-chat-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.agent-chat-header .agent-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--status-live); animation: pulseDot 2s ease-in-out infinite; }
.agent-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.agent-messages::-webkit-scrollbar { width: 4px; }
.agent-messages::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 999px; }
.agent-msg { max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.6; }
.agent-msg.bot { align-self: flex-start; background: #F3F4F6; color: var(--text-primary); border-bottom-left-radius: 4px; }
.agent-msg.user { align-self: flex-end; background: var(--accent-primary); color: #fff; border-bottom-right-radius: 4px; }
.agent-msg .msg-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; opacity: 0.6; }
.agent-msg.bot .msg-label { color: var(--accent-primary); opacity: 1; }
.agent-msg h4 { font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.agent-msg ul, .agent-msg ol { margin: 6px 0 6px 18px; }
.agent-msg li { margin-bottom: 4px; }
.agent-msg code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; font-family: var(--mono, 'JetBrains Mono'); font-size: 13px; }
.agent-msg.user code { background: rgba(255,255,255,0.2); }
.agent-input-area { padding: 16px 20px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; flex-shrink: 0; }
.agent-input { flex: 1; border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-family: var(--sans); resize: none; outline: none; min-height: 42px; max-height: 120px; transition: border-color 150ms; }
.agent-input:focus { border-color: var(--accent-primary); }
.agent-send-btn { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-primary); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; transition: background 150ms, transform 150ms; flex-shrink: 0; }
.agent-send-btn:hover { background: #6D28D9; transform: scale(1.05); }
.agent-send-btn:disabled { background: #D1D5DB; cursor: not-allowed; transform: none; }
.agent-send-btn svg { width: 18px; height: 18px; }

/* Client selector */
.client-select-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }
.client-select-card .section-title { margin-bottom: 12px; }
.client-list { display: flex; flex-direction: column; gap: 4px; }
.client-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 150ms; }
.client-item:hover { background: #F3F4F6; }
.client-item.active { background: var(--accent-light); }
.client-item .cl-avatar { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-primary), #A78BFA); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0; }
.client-item.active .cl-avatar { background: linear-gradient(135deg, #6D28D9, var(--accent-primary)); }
.client-item .cl-name { font-size: 13px; font-weight: 500; }
.client-item .cl-status { font-size: 11px; color: var(--text-tertiary); }

/* Quick actions */
.quick-actions { display: flex; flex-direction: column; gap: 6px; }
.quick-action-btn { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-soft); cursor: pointer; transition: all 150ms; text-align: left; font-family: var(--sans); }
.quick-action-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: var(--accent-light); }
.quick-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.quick-action-btn:hover svg { opacity: 1; }

/* Lab upload */
.lab-upload-zone { border: 2px dashed var(--border-soft); border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; transition: all 150ms; }
.lab-upload-zone:hover { border-color: var(--accent-primary); background: var(--accent-light); }
.lab-upload-zone svg { width: 24px; height: 24px; color: var(--text-tertiary); margin-bottom: 8px; }
.lab-upload-zone p { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.lab-upload-zone .upload-title { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* Treatment plan card */
.plan-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 16px; }
.plan-card .plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.plan-card .plan-title { font-size: 13px; font-weight: 600; }
.plan-card .plan-date { font-size: 11px; font-family: 'JetBrains Mono'; color: var(--text-tertiary); }
.plan-card .plan-phase { font-size: 12px; color: var(--text-secondary); }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; padding: 8px 0; }
.typing-indicator span { width: 6px; height: 6px; border-radius: 999px; background: var(--text-tertiary); animation: typeBounce 1.4s ease-in-out infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typeBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* Lab results table in chat */
.lab-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.lab-table th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
.lab-table td { padding: 6px 8px; border-bottom: 1px solid #F3F4F6; }
.lab-table .lab-low { color: #2563EB; font-weight: 600; }
.lab-table .lab-high { color: #DC2626; font-weight: 600; }
.lab-table .lab-optimal { color: #059669; font-weight: 600; }
.lab-table .lab-flag { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.lab-table .lab-flag.flag-low { background: #EFF6FF; color: #2563EB; }
.lab-table .lab-flag.flag-high { background: #FEF2F2; color: #DC2626; }
.lab-table .lab-flag.flag-ok { background: #ECFDF5; color: #059669; }

@media (max-width: 900px) {
  .agent-layout { grid-template-columns: 1fr; height: auto; }
  .agent-sidebar { max-height: 300px; overflow-y: auto; }
  .agent-chat-area { min-height: 500px; }
}
.prio-dot.medium { background: var(--status-warn); }
.prio-dot.low { background: var(--status-live); }

/* ===== Category tags ===== */
.cat-tag {
  font-size: 11px; font-weight: 500; padding: 2px 8px;
  border-radius: 6px; letter-spacing: 0.02em;
}
.cat-tag.client { background: #EDE9FE; color: #7C3AED; }
.cat-tag.content { background: #DBEAFE; color: #2563EB; }
.cat-tag.admin { background: #F3F4F6; color: #6B7280; }
.cat-tag.followup { background: #FEF3C7; color: #D97706; }

/* ===== Checkbox ===== */
.task-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border-soft); background: #fff;
  cursor: pointer; display: grid; place-items: center;
  transition: all 150ms ease; flex: none;
}
.task-check:hover { border-color: var(--accent-primary); }
.task-check.checked {
  background: var(--accent-primary); border-color: var(--accent-primary);
}
.task-check.checked::after {
  content: '✓'; color: #fff; font-size: 12px; font-weight: 700;
}

/* ===== Filter pills ===== */
.filter-pills { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-pill {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-soft); background: #fff;
  color: var(--text-secondary); cursor: pointer;
  transition: all 150ms ease;
}
.filter-pill:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.filter-pill.active {
  background: var(--accent-primary); color: #fff;
  border-color: var(--accent-primary);
}

/* ===== Task cards ===== */
.task-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft); background: #fff;
  margin-bottom: 8px; transition: box-shadow 150ms ease;
}
.task-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.task-card .task-body { flex: 1; min-width: 0; }
.task-card .task-title { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.task-card .task-meta {
  font-size: 12px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 8px;
}
.task-card.done { opacity: 0.5; }
.task-card.done .task-title { text-decoration: line-through; color: var(--text-tertiary); }
.task-card.overdue { border-left: 3px solid #EF4444; }

/* Priority pills */
.prio-pill {
  font-size: 11px; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap;
}
.prio-pill.high { background: #FEF2F2; color: #EF4444; }
.prio-pill.normal { background: #FFFBEB; color: #F59E0B; }
.prio-pill.low { background: #F3F4F6; color: #9CA3AF; }

/* Category pills */
.cat-pill {
  font-size: 11px; font-weight: 500; padding: 2px 10px;
  border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap;
}
.cat-pill.client { background: #EFF6FF; color: #3B82F6; }
.cat-pill.content { background: #F5F3FF; color: #7C3AED; }
.cat-pill.admin { background: #F3F4F6; color: #6B7280; }
.cat-pill.followup { background: #ECFDF5; color: #10B981; }

/* Overdue label */
.overdue-label {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #FEF2F2; color: #EF4444;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}

/* Task delete btn */
.task-delete-btn {
  font-size: 16px; cursor: pointer; color: var(--text-tertiary);
  padding: 4px 6px; border: none; background: none; border-radius: 6px;
  transition: all 150ms; line-height: 1; font-family: Barlow, sans-serif;
}
.task-delete-btn:hover { color: #EF4444; background: #FEF2F2; }

/* Task due date */
.task-due {
  font-size: 12px; color: var(--text-tertiary); white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; letter-spacing: -0.02em;
}

/* ===== Activity feed ===== */
.feed-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #F3F4F6;
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: none; font-size: 14px;
}
.feed-icon.lead { background: #DBEAFE; }
.feed-icon.booking { background: #ECFDF5; }
.feed-icon.social { background: #FEF3C7; }
.feed-icon.payment { background: #EDE9FE; }
.feed-icon.content { background: #FCE7F3; }
.feed-body { flex: 1; }
.feed-body .feed-text { font-size: 14px; color: var(--text-primary); }
.feed-body .feed-text strong { font-weight: 600; }
.feed-body .feed-time { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; font-family: 'JetBrains Mono'; }

/* ===== Calendar ===== */
.cal-toggle { display: flex; gap: 0; margin-bottom: 20px; }
.cal-toggle button {
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-soft); background: #fff;
  color: var(--text-secondary); cursor: pointer;
  font-family: var(--sans);
  transition: all 150ms ease;
}
.cal-toggle button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cal-toggle button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.cal-toggle button.active {
  background: var(--accent-primary); color: #fff;
  border-color: var(--accent-primary);
}

.cal-grid { display: grid; grid-template-columns: 80px 1fr; gap: 0; }
.cal-time {
  font-family: 'JetBrains Mono'; font-size: 12px;
  color: var(--text-tertiary); padding: 12px 12px 12px 0; text-align: right;
  border-top: 1px solid #F3F4F6;
}
.cal-slot {
  padding: 8px 12px; border-top: 1px solid #F3F4F6;
  min-height: 52px;
}
.cal-event {
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  border-left: 3px solid;
}
.cal-event.discovery { background: #EFF6FF; border-color: #3B82F6; color: #1E40AF; }
.cal-event.oneone { background: var(--accent-light); border-color: var(--accent-primary); color: #5B21B6; }
.cal-event.group { background: #ECFDF5; border-color: #10B981; color: #065F46; }
.cal-event.other { background: #F3F4F6; border-color: #9CA3AF; color: #374151; }
.cal-event .cal-event-name { font-weight: 600; }
.cal-event .cal-event-type { font-size: 11px; opacity: 0.8; margin-top: 2px; }

/* Month grid */
.cal-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-month-nav h2 { font-size: 18px; font-weight: 600; margin: 0; text-transform: capitalize; }
.cal-month-nav button { background: none; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); width: 36px; height: 36px; font-size: 18px; cursor: pointer; color: var(--text-secondary); transition: all 150ms ease; display: flex; align-items: center; justify-content: center; }
.cal-month-nav button:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.cal-month-grid .cal-weekday { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.cal-month-grid .cal-day { min-height: 60px; padding: 6px; border: 1px solid #F3F4F6; border-top: none; border-left: none; cursor: pointer; transition: background 150ms ease; position: relative; }
.cal-month-grid .cal-day:nth-child(7n+8) { border-left: 1px solid #F3F4F6; }
.cal-month-grid .cal-day:hover { background: #FAFAFA; }
.cal-month-grid .cal-day.today { background: var(--accent-light); }
.cal-month-grid .cal-day.selected { background: var(--accent-light); outline: 2px solid var(--accent-primary); outline-offset: -2px; border-radius: 4px; }
.cal-month-grid .cal-day.outside { opacity: 0.35; }
.cal-month-grid .cal-day .day-num { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.cal-month-grid .cal-day.today .day-num { color: var(--accent-primary); font-weight: 700; }
.cal-month-grid .cal-day .day-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-month-grid .cal-day .day-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-month-grid .cal-day .day-dot.discovery { background: #3B82F6; }
.cal-month-grid .cal-day .day-dot.oneone { background: var(--accent-primary); }
.cal-month-grid .cal-day .day-dot.group { background: #10B981; }
.cal-month-grid .cal-day .day-dot.other { background: #9CA3AF; }
.cal-day-detail { margin-top: 0; }
.cal-day-detail .day-detail-header { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.cal-day-detail .day-detail-header .btn-add-event { width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--accent-primary); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; line-height: 1; transition: background 150ms ease; }
.cal-day-detail .day-detail-header .btn-add-event:hover { background: var(--accent-secondary); }
.cal-event-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-event-item .btn-delete-event { background: none; border: none; color: #EF4444; cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px; opacity: 0.6; transition: opacity 150ms ease; }
.cal-event-item .btn-delete-event:hover { opacity: 1; background: #FEE2E2; }
.pill.blue { background: rgba(59,130,246,0.12); color: #3B82F6; }
.pill.violet { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.pill.green { background: rgba(16,185,129,0.12); color: #10B981; }
.pill.gray { background: rgba(156,163,175,0.15); color: #6B7280; }
.pill.source-local { border: 1px dashed var(--accent-primary); }
.cal-day-detail .event-source-tag { font-size: 9px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; margin-left: 4px; }

/* ===== Funnel ===== */
.funnel { display: flex; gap: 0; margin-bottom: 24px; align-items: stretch; }
.funnel-step {
  flex: 1; text-align: center; padding: 20px 12px;
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border-soft);
}
.funnel-step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.funnel-step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.funnel-step:not(:first-child) { border-left: 0; }
.funnel-step .funnel-val {
  font-family: 'JetBrains Mono'; font-size: 28px; font-weight: 500;
  color: var(--accent-primary); margin-bottom: 4px;
}
.funnel-step .funnel-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.funnel-step .funnel-pct {
  font-family: 'JetBrains Mono'; font-size: 11px;
  color: var(--text-tertiary); margin-top: 6px;
}
.funnel-arrow {
  display: flex; align-items: center; color: var(--text-tertiary); font-size: 18px;
  padding: 0 2px;
}

/* ===== Bar chart (CSS only) ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 0 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-col .bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: var(--accent-primary);
  transition: height 600ms ease;
  min-width: 20px;
}
.bar-col .bar-label { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
.bar-col .bar-val {
  font-family: 'JetBrains Mono'; font-size: 11px;
  color: var(--text-secondary); font-weight: 500;
}

/* ===== Content pipeline ===== */
.pipeline { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 24px; }
.pipeline-stage {
  min-width: 160px; flex: 1;
  background: #F9FAFB; border-radius: var(--radius-sm);
  padding: 14px;
}
.pipeline-stage-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.pipeline-stage-head .badge {
  background: var(--accent-light); color: var(--accent-primary);
  font-size: 10px; padding: 2px 6px; border-radius: 999px; font-weight: 600;
}
.pipeline-item {
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 13px; color: var(--text-primary);
}
.pipeline-item .pi-type { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ===== Platform tabs ===== */
.platform-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border-soft); }
.platform-tab {
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--text-tertiary); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 150ms ease;
}
.platform-tab:hover { color: var(--text-primary); }
.platform-tab.active { color: var(--accent-primary); border-color: var(--accent-primary); font-weight: 600; }

/* ===== Client accordion ===== */
.client-row { cursor: pointer; }
.client-row:hover td { background: #F9FAFB; }
.client-detail {
  display: none; background: #FAFBFC;
}
.client-detail.open { display: table-row; }
.client-detail td {
  padding: 16px 24px; background: #FAFBFC;
  border-bottom: 1px solid var(--border-soft);
}
.client-detail-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.client-detail-inner h4 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px;
}
.client-detail-inner p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.client-detail-inner ul { list-style: none; padding: 0; }
.client-detail-inner li {
  font-size: 13px; color: var(--text-secondary); padding: 4px 0;
  border-bottom: 1px solid #F3F4F6;
}
.client-detail-inner li:last-child { border-bottom: none; }

/* ===== Search ===== */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--border-soft);
  font-size: 14px; transition: border-color 150ms ease;
}
.search-bar:focus-within { border-color: var(--accent-primary); }
.search-bar input {
  border: none; outline: none; background: transparent; flex: 1;
  font-family: var(--sans); font-size: 14px; color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar svg { width: 16px; height: 16px; color: var(--text-tertiary); flex: none; }

/* ===== Inline add ===== */
.inline-add {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border-soft); color: var(--text-tertiary);
  cursor: pointer; font-size: 14px; transition: all 150ms ease;
  margin-top: 4px;
}
.inline-add:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: var(--accent-light); }

/* ===== Calendar sidebar list ===== */
.upcoming-list { list-style: none; }
.upcoming-list li {
  padding: 10px 0; border-bottom: 1px solid #F3F4F6;
  display: flex; flex-direction: column; gap: 2px;
}
.upcoming-list li:last-child { border-bottom: none; }
.upcoming-list .up-time { font-family: 'JetBrains Mono'; font-size: 12px; color: var(--accent-primary); font-weight: 500; }
.upcoming-list .up-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.upcoming-list .up-type { font-size: 12px; color: var(--text-tertiary); }

/* ===== External link button ===== */
.ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--accent-light); color: var(--accent-primary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 150ms ease; border: none;
}
.ext-link:hover { background: var(--accent-mid); }

/* ===== Fade in ===== */
.fade-in { animation: fadeIn 300ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== Responsive ===== */
.mobile-toggle {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 100;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card); cursor: pointer;
  align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 20px; height: 20px; color: var(--text-primary); }

@media (max-width: 1280px) {
  .main { padding: 24px 24px 60px; }
  .kpi-row { gap: 12px; }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -280px; width: 280px;
    transition: left 300ms ease; z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }
  .sidebar.open { left: 0; }
  .mobile-toggle { display: flex; }
  /* T5: kruimelpad niet onder de menuknop laten vallen */
  .breadcrumb { padding-left: 52px; min-height: 40px; display: flex; align-items: center; }
  .two-col { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .funnel { flex-wrap: wrap; }
  .funnel-step { min-width: calc(50% - 6px); }
  .funnel-arrow { display: none; }
}

@media (max-width: 640px) {
  .main { padding: 16px 16px 60px; }
  .page-header h1 { font-size: 26px; }
  .page-header .subtitle { font-size: 16px; }
  .kpi-row, .kpi-row.cols-3 { grid-template-columns: 1fr; }
  .kpi-value { font-size: 28px; }
  .pipeline { flex-direction: column; }
  .pipeline-stage { min-width: auto; }
  .bar-chart { height: 140px; gap: 4px; padding: 0; }
  .bar-col .bar-val { font-size: 9px; letter-spacing: -0.3px; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 8px; }
  .client-detail-inner { grid-template-columns: 1fr; }
}
/* Klantentabel als kaarten op de telefoon (T1): niets valt meer buiten beeld */
@media (max-width: 640px) {
  #clientTable thead { display: none; }
  #clientTable, #clientTable tbody { display: block; width: 100%; }
  #clientTable tr.client-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
  #clientTable tr.client-row td { display: block; padding: 0 !important; border: 0; white-space: normal !important; }
  #clientTable tr.client-row td.ct-name { flex: 1; min-width: 0; font-size: 15px; }
  #clientTable tr.client-row td.ct-email { flex-basis: 100%; overflow-wrap: anywhere; }
  #clientTable tr.client-row td.ct-portal { flex-basis: 100%; }
  #clientTable tr.client-row td.ct-acts { margin-left: auto; }
  #clientTable tr.client-detail.open { display: block; }
  #clientTable tr.client-detail.open td { display: block; }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.3); z-index: 90;
}
.sidebar-overlay.show { display: block; }

/* ===== Buttons ===== */
.btn-primary {
  padding: 10px 20px; background: var(--accent-primary); color: #fff;
  border: none; border-radius: var(--radius-sm); font-family: var(--sans); font-size: 14px;
  font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-sm {
  padding: 5px 10px; background: var(--bg-canvas); color: var(--text-secondary);
  border: 1px solid var(--border-soft); border-radius: 8px; font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.btn-sm:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.input { padding: 9px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text-primary); background: #fff; margin-top: 4px; }
.input:focus { outline: none; border-color: var(--accent-primary); }

/* ===== Modal ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1000; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); padding: 32px;
  width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative; animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 8px; border: none; background: var(--bg-canvas); cursor: pointer;
  display: grid; place-items: center; color: var(--text-tertiary); font-size: 18px;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--border-soft); color: var(--text-primary); }
.modal h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-field { margin-bottom: 16px; }
.modal-field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 6px;
}
.modal-field input, .modal-field select, .modal-field textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm); font-family: var(--sans); font-size: 14px;
  color: var(--text-primary); background: var(--bg-canvas);
  outline: none; transition: border-color 0.2s;
}
.modal-field input:focus, .modal-field select:focus, .modal-field textarea:focus {
  border-color: var(--accent-primary);
}
.modal-field textarea { min-height: 70px; resize: vertical; }
.modal-field input::placeholder { color: var(--text-tertiary); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.modal-actions .btn-cancel {
  padding: 10px 20px; background: var(--bg-canvas); color: var(--text-secondary);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 14px; font-weight: 500; cursor: pointer;
}
.modal-actions .btn-cancel:hover { background: var(--border-soft); }
.modal-success { color: var(--status-live); font-size: 13px; font-weight: 500; margin-top: 12px; display: none; }

/* ===== AI AGENT CHAT ===== */
.agent-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; height: calc(100vh - 140px); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: #fff; }
.agent-clients { border-right: 1px solid var(--border-soft); overflow-y: auto; background: #FAFBFC; }
.agent-clients-head { padding: 14px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); border-bottom: 1px solid var(--border-soft); }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #F3F4F6; transition: background 150ms; }
.ac-item:hover { background: #F3F4F6; }
.ac-item.active { background: var(--accent-light); }
.ac-item .ac-av { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-primary), #A78BFA); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; flex: none; }
.ac-item .ac-info { min-width: 0; }
.ac-item .ac-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item .ac-sub { font-size: 11px; color: var(--text-tertiary); }

.agent-main { display: flex; flex-direction: column; }
.agent-header { padding: 12px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; background: #fff; flex: none; }
.agent-header .ah-left { display: flex; align-items: center; gap: 10px; }
.agent-header .ah-name { font-size: 15px; font-weight: 600; }
.agent-header .ah-badge { font-family: 'JetBrains Mono'; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: #ECFDF5; color: #059669; }
.agent-header .ah-actions { display: flex; gap: 6px; }
.agent-header .ah-btn { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--border-soft); background: #fff; color: var(--text-secondary); cursor: pointer; font-family: var(--sans); transition: all 150ms; }
.agent-header .ah-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.agent-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-canvas); }
.a-msg { max-width: 82%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.65; }
.a-msg.ai { background: #fff; border: 1px solid var(--border-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.a-msg.ai .a-label { font-size: 11px; font-weight: 600; color: var(--accent-primary); margin-bottom: 6px; }
.a-msg.user { background: var(--accent-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.a-msg.system { background: #FEF3C7; border: 1px solid #FDE68A; align-self: center; text-align: center; font-size: 12px; color: #92400E; border-radius: 8px; padding: 8px 14px; max-width: 90%; }
.a-msg strong { font-weight: 600; }
.a-msg h4 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: var(--accent-primary); }
.a-msg ul, .a-msg ol { margin: 4px 0 4px 18px; }
.a-msg li { margin: 3px 0; }
.a-msg .val-high { color: #DC2626; font-weight: 600; font-family: 'JetBrains Mono'; font-size: 13px; }
.a-msg .val-low { color: #2563EB; font-weight: 600; font-family: 'JetBrains Mono'; font-size: 13px; }
.a-msg .val-ok { color: #059669; font-weight: 600; font-family: 'JetBrains Mono'; font-size: 13px; }
.a-msg .plan-phase { background: var(--accent-light); padding: 10px 14px; border-radius: 8px; margin: 8px 0; }
.a-msg .plan-phase strong { color: var(--accent-primary); }

.agent-quick { padding: 10px 20px; display: flex; gap: 6px; flex-wrap: wrap; background: var(--bg-canvas); border-top: 1px solid #F3F4F6; flex: none; }
.aq-btn { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--border-soft); background: #fff; color: var(--text-secondary); cursor: pointer; font-family: var(--sans); transition: all 150ms; }
.aq-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: var(--accent-light); }

.agent-input { padding: 14px 20px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; background: #fff; flex: none; }
.agent-input textarea { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border-soft); border-radius: 10px; font-family: var(--sans); font-size: 14px; color: var(--text-primary); background: var(--bg-canvas); outline: none; resize: none; min-height: 40px; max-height: 100px; }
.agent-input textarea:focus { border-color: var(--accent-primary); }
.agent-input textarea::placeholder { color: var(--text-tertiary); }
.agent-input button { padding: 10px 18px; border-radius: 10px; background: var(--accent-primary); color: #fff; border: none; font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; transition: background 150ms; flex: none; }
.agent-input button:hover { background: #6D28D9; }

.a-typing { display: inline-flex; gap: 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; border-bottom-left-radius: 4px; align-self: flex-start; }
.a-typing span { width: 6px; height: 6px; border-radius: 999px; background: var(--text-tertiary); }
.a-typing span:nth-child(1) { animation: aDot 1.4s ease-in-out infinite; }
.a-typing span:nth-child(2) { animation: aDot 1.4s ease-in-out 0.2s infinite; }
.a-typing span:nth-child(3) { animation: aDot 1.4s ease-in-out 0.4s infinite; }
@keyframes aDot { 0%,60%,100% { opacity:.3; transform:translateY(0); } 30% { opacity:1; transform:translateY(-3px); } }

@media (max-width: 768px) {
  .agent-layout { grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .agent-clients { display: none; }
  .cal-month-grid .cal-day { min-height: 44px; padding: 4px; }
  .cal-month-grid .cal-day .day-num { font-size: 11px; }
  .cal-month-nav h2 { font-size: 15px; }
}

/* ===== Watermark ===== */
.watermark {
  position: fixed; bottom: 12px; right: 16px;
  font-family: 'JetBrains Mono'; font-size: 10px;
  color: var(--text-tertiary); opacity: 0.5;
  letter-spacing: 0.06em; z-index: 10;
}
