/* לשכה — AI team mockup. Warm atelier, not generic AI. */
:root {
  --ink: #1a1510;
  --ink-soft: #5a5148;
  --muted: #8a8076;
  --paper: #f3ede4;
  --paper-2: #e8e0d4;
  --surface: #faf7f2;
  --card: #fffcf8;
  --line: #ddd4c8;
  --line-strong: #cfc5b7;
  --clay: #c4622d;
  --clay-dark: #9a4320;
  --clay-soft: #f6e6dc;
  --sage: #3f5c4a;
  --sage-soft: #e4ede7;
  --sand: #efe6d6;
  --gold: #9a7640;
  --gold-soft: #f5ebda;
  --alert: #9a3b2f;
  --alert-soft: #f8e6e3;
  --watch: #8a5a20;
  --watch-soft: #f5ead8;
  --wa: #3e6b52;
  --wa-soft: #e3eee7;
  --sidebar: #211c18;
  --sidebar-text: #f3ede4;
  --sidebar-muted: #b7aea3;
  --sidebar-line: #3a332c;
  --sidebar-hover: #2c2621;
  --shadow: 0 1px 2px rgba(26, 21, 16, 0.04), 0 8px 24px rgba(26, 21, 16, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Assistant", "Helvetica Neue", Arial, sans-serif;
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --space: 16px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
}
body { overflow-x: hidden; }

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }

/* Preview bar — for browsing the mockup */
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  padding: 0 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
}
.preview-bar strong { font-weight: 600; }
.preview-bar .muted { color: #cfc5b7; }
.preview-switch { display: flex; gap: 4px; }
.preview-switch a {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  color: #cfc5b7;
}
.preview-switch a.is-active {
  background: #3a332c;
  color: #fffcf8;
}

/* App shell */
.app {
  display: flex;
  min-height: calc(100vh - 40px);
  align-items: stretch;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.sidebar {
  width: 260px;
  flex: 0 0 260px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  min-height: calc(100vh - 40px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--sidebar-line);
  margin-bottom: 18px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1.4px solid var(--paper);
  display: grid;
  place-items: center;
  flex: 0 0 32px;
}
.brand-mark span {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
  color: var(--clay);
  font-weight: 700;
}
.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}
.brand-sub {
  display: block;
  margin-top: 3px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--sidebar-muted);
  font-weight: 500;
}

.client-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--sidebar-hover);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  flex: 0 0 36px;
  letter-spacing: 0;
}
.avatar-lg { width: 48px; height: 48px; font-size: 16px; flex-basis: 48px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; flex-basis: 28px; }
.av-clay { background: var(--clay-soft); color: var(--clay-dark); }
.av-sage { background: var(--sage-soft); color: var(--sage); }
.av-sand { background: var(--sand); color: var(--gold); }
.av-ink { background: #3a332c; color: var(--paper); }
.av-gold { background: var(--gold-soft); color: var(--gold); }
.client-chip .who { font-size: 14px; font-weight: 600; }
.client-chip .role { font-size: 12px; color: var(--sidebar-muted); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav a svg, .nav-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 18px;
}
.nav a:hover, .nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.nav a.is-active {
  background: #2c2621;
  color: var(--sidebar-text);
}
.nav a.is-active svg { stroke: var(--clay); }

.sidebar-foot {
  border-top: 1px solid var(--sidebar-line);
  padding-top: 14px;
  margin-top: 16px;
}
.usage-mini .label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sidebar-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.usage-mini .label b { color: var(--sidebar-text); font-weight: 600; }

.meter {
  display: flex;
  gap: 3px;
  height: 8px;
}
.meter i {
  flex: 1;
  border-radius: 2px;
  background: var(--paper-2);
}
.meter i.on { background: var(--clay); }
.meter i.warn { background: var(--gold); }
.meter i.alert { background: var(--alert); }
.meter.dark i { background: #3a332c; }
.meter.dark i.on { background: #e08a5a; }
.meter.dark i.warn { background: #d4a85a; }
.meter.dark i.alert { background: #d26a5c; }

.menu-btn, .nav-backdrop { display: none; }

/* Main */
.main {
  flex: 1;
  min-width: 0;
  padding: 28px 36px 48px;
  background: var(--paper);
}

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px 20px;
  margin-bottom: 20px;
  min-width: 0;
}
.page-titles { min-width: 0; }
.page-head .menu-btn { display: none; }
.page-head h1 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
}
.page-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.page-sub {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}

.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--wa-soft);
  color: var(--wa);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wa-pill svg { width: 14px; height: 14px; }
.wa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 0 0 3px rgba(62, 107, 82, 0.18);
}

.head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Cards & layout */
.grid-2, .grid-3, .grid-home, .workspace, .leads-layout, .profile-grid, .card, .main, .app {
  min-width: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-home {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.card-head h2 {
  font-size: 18px;
  font-weight: 600;
}
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Team cards */
.team-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  min-height: 200px;
}
.team-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.team-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}
.team-role {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 2px;
}
.presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  margin-top: 8px;
}
.presence::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}
.team-last {
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.team-last span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.team-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}
.btn:hover { background: #2c2621; }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--sand); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: #314839; }
.btn-danger {
  background: transparent;
  color: var(--alert);
  border-color: #e4c4bf;
}
.btn-danger:hover { background: var(--alert-soft); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-off {
  opacity: 0.55;
  pointer-events: none;
}

/* Usage banner */
.usage-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.usage-copy h2 { font-size: 20px; margin-bottom: 4px; }
.usage-copy p { color: var(--ink-soft); font-size: 14px; }
.usage-banner .meter { width: min(320px, 100%); height: 10px; flex: 0 0 auto; }
.usage-count {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.usage-count span { color: var(--muted); font-size: 16px; font-weight: 500; font-family: var(--font); }

/* Activity */
.activity { list-style: none; padding: 0; margin: 0; }
.activity li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity li:last-child { border-bottom: 0; padding-bottom: 0; }
.activity li:first-child { padding-top: 0; }
.activity .when {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.activity .what { font-size: 14.5px; }
.activity .what b { font-weight: 600; }
.channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--wa);
  margin-inline-start: 6px;
  white-space: nowrap;
}
.channel-tag svg, .wa-pill svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.composer .btn svg { transform: scaleX(-1); }

/* Approvals list */
.approve-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.approve-item:first-child { padding-top: 0; }
.approve-item:last-child { border-bottom: 0; padding-bottom: 0; }
.approve-item h3 { font-family: var(--font); font-size: 15px; font-weight: 600; }
.approve-item p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.approve-item .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-wait { background: var(--gold-soft); color: var(--watch); }
.badge-ok { background: var(--sage-soft); color: var(--sage); }
.badge-new { background: var(--clay-soft); color: var(--clay-dark); }
.badge-work { background: #e8eef5; color: #38516a; }
.badge-done { background: var(--paper-2); color: var(--ink-soft); }
.badge-alert { background: var(--alert-soft); color: var(--alert); }
.badge-change { background: #efe8f4; color: #6a4478; }

/* Workspace split */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  min-height: calc(100vh - 180px);
}
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 640px;
  height: calc(100vh - 156px);
  max-height: 860px;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.chat-head h2 { font-size: 18px; }
.chat-note {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.thread {
  flex: 1;
  overflow: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, #f7f2ea 0%, var(--card) 80px);
}
.msg {
  max-width: 86%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg-client { align-self: flex-start; }
.msg-agent { align-self: flex-end; }
.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  padding: 0 4px;
}
.msg-client .msg-meta { justify-content: flex-start; }
.msg-agent .msg-meta { justify-content: flex-end; }
.bubble {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.65;
  border: 1px solid transparent;
}
.msg-client .bubble {
  background: var(--card);
  border-color: var(--line);
  border-start-start-radius: 4px;
  color: var(--ink);
}
.msg-agent .bubble {
  background: #2a241f;
  color: #f7f2ea;
  border-start-end-radius: 4px;
}
.bubble ol, .bubble ul {
  margin: 8px 0 0;
  padding-inline-start: 20px;
}
.bubble li { margin: 4px 0; }
.bubble p + p { margin-top: 8px; }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
}
.composer textarea {
  flex: 1;
  resize: none;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 12px;
  background: var(--surface);
  outline: none;
}
.composer textarea:focus { border-color: var(--ink-soft); }

.side-stack { display: flex; flex-direction: column; gap: 16px; }
.memory-list, .doc-list, .plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.memory-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.memory-list li:first-child { padding-top: 0; }
.memory-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.icon-btn {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 32px;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.deliverable-mini {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.deliverable-mini:first-child { padding-top: 0; }
.deliverable-mini:last-child { border-bottom: 0; }
.deliverable-mini h3 { font-family: var(--font); font-size: 14.5px; font-weight: 600; }
.deliverable-mini p { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.deliverable-mini .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* Leads */
.leads-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.lead-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  min-width: 0;
}
.lead-row:last-child { border-bottom: 0; }
.lead-row:hover { background: var(--surface); }
.lead-row.is-selected {
  background: var(--clay-soft);
}
.lead-main { flex: 1; min-width: 0; }
.lead-name { font-weight: 600; font-size: 15px; }
.lead-snip { font-size: 13px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-meta { font-size: 12px; color: var(--muted); font-weight: 500; text-align: start; white-space: nowrap; }
.suggested {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14.5px;
  line-height: 1.65;
  margin-top: 12px;
}
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }

/* Knowledge */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field .value, .field-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.6;
}
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.doc-item:first-child { padding-top: 0; }
.doc-item:last-child { border-bottom: 0; padding-bottom: 0; }
.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--sand);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  font-size: 11px;
  font-weight: 700;
}
.doc-item h3 { font-family: var(--font); font-size: 14.5px; font-weight: 600; }
.doc-item p { font-size: 12px; color: var(--muted); }

/* Deliverables page */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-chip {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
}
.filter-chip.is-on, .filter-chip:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.deliv-card { padding: 20px 22px; }
.deliv-card + .deliv-card { margin-top: 12px; }
.deliv-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.deliv-card h2 { font-family: var(--font); font-size: 17px; font-weight: 600; }
.deliv-card .excerpt {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.deliv-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Admin */
.kpi {
  padding: 18px 20px;
}
.kpi .num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 6px;
}
.kpi .hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.table-wrap { overflow-x: auto; max-width: 100%; }
.client-cards { display: none; }
.client-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.client-card:first-child { padding-top: 0; }
.client-card:last-child { border-bottom: 0; padding-bottom: 0; }
.client-card .client-cell { margin-bottom: 10px; }
.client-card .kv { grid-template-columns: 96px 1fr; }
.hide-mobile { display: block; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.data th {
  text-align: start;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
}
table.data td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: 0; }
.client-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-cmp {
  width: 120px;
  height: 8px;
  background: var(--paper-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-cmp span {
  display: block;
  height: 100%;
  background: var(--sage);
  border-radius: 4px;
}
.bar-cmp.watch span { background: var(--gold); }
.bar-cmp.alert span { background: var(--alert); }

.alert-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.alert-row:last-child { border-bottom: 0; padding-bottom: 0; }
.alert-row:first-child { padding-top: 0; }
.alert-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex: 0 0 8px;
  background: var(--alert);
}
.alert-mark.watch { background: var(--gold); }
.alert-mark.wait { background: var(--clay); }

.linkish {
  color: var(--clay-dark);
  font-weight: 600;
  font-size: 13px;
}
.linkish:hover { text-decoration: underline; }

.stack-mobile { display: none; }

/* Admin sidebar tweak: lighter label */
.admin-note {
  font-size: 12px;
  color: var(--sidebar-muted);
  padding: 0 10px 12px;
  line-height: 1.45;
}

hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr 300px; }
  .main { padding: 24px 22px 40px; }
  .page-head h1 { font-size: 28px; }
}

@media (max-width: 900px) {
  .menu-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    border-radius: 8px;
    flex: 0 0 40px;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .page-head {
    grid-template-columns: 40px 1fr;
    align-items: center;
    margin-bottom: 18px;
  }
  .page-head .menu-btn { display: grid; }
  .page-titles { grid-column: 1 / -1; grid-row: 2; }
  .head-meta { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .menu-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 40px 0 0 0;
    background: rgba(26, 21, 16, 0.45);
    z-index: 60;
  }
  .sidebar {
    position: fixed;
    top: 40px;
    right: 0;
    bottom: 0;
    z-index: 70;
    transform: translateX(110%);
    transition: transform 0.2s ease, visibility 0.2s ease;
    min-height: 0;
    height: calc(100vh - 40px);
    overflow: auto;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-toggle:checked ~ .app .sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-toggle:checked ~ .app .nav-backdrop { display: block; }
  .main { padding: 16px 16px 40px; }
  .page-head h1 { font-size: 24px; }
  .grid-2, .grid-3, .grid-home, .workspace, .leads-layout, .profile-grid {
    grid-template-columns: 1fr;
  }
  .chat-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .thread { min-height: 360px; }
  .usage-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .usage-banner .meter { width: 100%; }
  .preview-bar { padding: 0 12px; }
  .preview-bar .hide-sm { display: none; }
  table.data { min-width: 640px; }
  .stack-mobile, .client-cards { display: block; }
  .hide-mobile { display: none; }
  .lead-meta { white-space: normal; }
  .kv { grid-template-columns: 88px 1fr; }
}

@media (max-width: 420px) {
  .btn { height: 42px; }
  .team-name { font-size: 20px; }
  .kpi .num { font-size: 26px; }
}
