/*
 * SAMP CRM — Linear-inspired visual system
 * A calm, dense application shell that preserves SAMP's product identity.
 */

:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --app-bg: #101113;
  --sidebar-bg: #0d0e10;
  --panel: #141517;
  --panel-2: #191a1d;
  --panel-3: #1e1f23;
  --border: #24262b;
  --border-2: #34363d;
  --fg: #f2f3f5;
  --fg-2: #b7bac1;
  --fg-3: #858991;
  --fg-4: #5f636b;
  --blue: #7179e8;
  --accent: #7179e8;
  --accent-soft: rgba(113, 121, 232, .13);
  --green: #38b894;
  --green-bg: rgba(56, 184, 148, .1);
  --amber: #e7b75f;
  --amber-bg: rgba(231, 183, 95, .1);
  --red: #e66b73;
  --red-bg: rgba(230, 107, 115, .1);
  --radius-control: 7px;
  --radius-panel: 12px;
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, .025) inset,
    0 4px 12px rgba(0, 0, 0, .14);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 255, 255, .035);
}

html,
body {
  min-height: 100%;
  background: var(--app-bg) !important;
}

body {
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -.008em;
}

body::before {
  display: none !important;
}

::selection {
  color: #fff;
  background: rgba(113, 121, 232, .42);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #34363d transparent;
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #303238;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

/* Application frame */
.app {
  position: relative;
  isolation: isolate;
  background: var(--app-bg);
}

.side {
  width: 248px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 26%),
    var(--sidebar-bg) !important;
  border-right: 1px solid #202227 !important;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .012);
  transition: width .2s ease;
}

.main {
  margin-left: 248px !important;
  width: calc(100% - 248px) !important;
  min-height: 100vh;
  background: transparent;
  transition: margin-left .2s ease, width .2s ease;
}

.sidebar-compact-toggle {
  position: absolute;
  z-index: 4;
  top: 62px;
  right: -12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid #2b2d33;
  border-radius: 50%;
  color: #9a9ea6;
  background: #17181b;
  box-shadow: 0 5px 14px rgba(0,0,0,.3);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.sidebar-compact-toggle:hover { color: #f0f1f2; border-color: #3b3e45; background: #202125; }
.sidebar-compact-toggle:focus-visible { outline: 2px solid #777fe4; outline-offset: 2px; }
.sidebar-compact-toggle svg { width: 14px; height: 14px; }

@media (min-width: 769px) {
  body.sidebar-compact .side { width: 68px !important; }
  body.sidebar-compact .main { margin-left: 68px !important; width: calc(100% - 68px) !important; }
  .side.is-compact .side-top { padding: 9px 5px !important; gap: 3px !important; }
  .side.is-compact .workspace-switcher { width: 28px; min-width: 28px; flex: 0 0 28px; justify-content: center; padding: 0 4px; }
  .side.is-compact .workspace-switcher .nm,
  .side.is-compact .workspace-chevron { display: none; }
  .side.is-compact .sidebar-create { width: 27px; }
  .side.is-compact > .search { display: none; }
  .side.is-compact .nav { padding: 8px 11px 14px !important; }
  .side.is-compact .nav-group-label { height: 13px; padding: 6px 8px; font-size: 0; }
  .side.is-compact .nav-group-label::after { content: ""; width: 100%; height: 1px; background: rgba(255,255,255,.055); }
  .side.is-compact .nav button { width: 44px; min-height: 40px; justify-content: center; margin-bottom: 2px !important; padding: 0 !important; gap: 0 !important; }
  .side.is-compact .nav button > span,
  .side.is-compact .nav button > i { display: none !important; }
  .side.is-compact .nav button svg { width: 18px !important; height: 18px !important; }
  .side.is-compact .nav button.on::before { left: -7px; top: 9px; bottom: 9px; }
  .side.is-compact .side-bot { display: grid; width: 44px; height: 44px; margin: 0 auto 8px; padding: 0 !important; place-items: center; }
  .side.is-compact .side-bot > div:first-child { display: grid !important; margin: 0 !important; place-items: center; }
  .side.is-compact .side-bot > div:first-child svg { width: 15px; height: 15px; }
  .side.is-compact .side-bot span,
  .side.is-compact .side-bot > div:not(:first-child) { display: none !important; }
}

/* Workspace switcher */
.side-top {
  min-height: 52px;
  padding: 9px 10px !important;
  gap: 6px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
}

.workspace-switcher {
  min-width: 0;
  height: 34px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  color: var(--fg);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background-color .16s ease;
}

.workspace-switcher:hover { background: rgba(255, 255, 255, .05); }
.workspace-switcher .brand-mark {
  width: 20px !important;
  height: 20px !important;
  border-radius: 6px !important;
  border-color: rgba(255, 255, 255, .18) !important;
  box-shadow: 0 1px 7px rgba(0, 0, 0, .35);
}
.workspace-switcher .nm {
  flex: 1;
  min-width: 0;
  color: #e8e9eb;
  font-size: 13.5px !important;
  font-weight: 530 !important;
  text-align: left;
}
.workspace-chevron { width: 13px; height: 13px; color: var(--fg-4); }

.sidebar-create {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--fg-3);
  background: transparent;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.sidebar-create:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.sidebar-create svg { width: 15px; height: 15px; }

.side > .search {
  margin: 10px 10px 7px !important;
}

.search input,
.field input,
.field select,
.field textarea,
.thread-f input,
.addtask input,
.pipe-filter-item select,
.pipe-filter-item input {
  color: var(--fg) !important;
  background: #111214 !important;
  border-color: #282a30 !important;
  border-radius: var(--radius-control) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .018) inset;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

@media (min-width: 769px) {
  .search input,
  .field input,
  .field select,
  .field textarea,
  .thread-f input,
  .addtask input,
  .pipe-filter-item select,
  .pipe-filter-item input {
    font-size: 12.5px !important;
  }
}

.search input { height: 32px; padding-right: 48px !important; }
.search::after {
  content: "Ctrl K";
  position: absolute;
  right: 7px;
  top: 6px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #2b2d32;
  border-radius: 5px;
  color: #676b73;
  background: #17181b;
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  pointer-events: none;
}
.toolbar .search::after { content: "/"; min-width: 20px; justify-content: center; }

.search input:hover,
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #34373e !important; }

.search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.thread-f input:focus,
.addtask input:focus {
  outline: none !important;
  border-color: #5e65bd !important;
  box-shadow: 0 0 0 3px rgba(113, 121, 232, .12) !important;
}

/* Sidebar navigation */
.nav {
  padding: 5px 8px 14px !important;
}

.nav-group-label {
  display: flex;
  align-items: center;
  height: 25px;
  padding: 5px 10px 3px;
  color: #555962;
  font-size: 10px;
  font-weight: 560;
  letter-spacing: .055em;
  text-transform: uppercase;
  user-select: none;
}

.nav-sep { display: none !important; }
.nav button {
  position: relative;
  min-height: 31px;
  margin: 0 0 1px !important;
  padding: 6px 9px !important;
  gap: 9px !important;
  color: #8d9199 !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 440 !important;
  line-height: 18px;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease !important;
}
.nav button:hover {
  color: #d1d3d7 !important;
  background: rgba(255, 255, 255, .035) !important;
}
.nav button.on {
  color: #f0f1f2 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .055)) !important;
  border-color: rgba(255, 255, 255, .045) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset;
}
.nav button.on::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: #777fe4;
  box-shadow: 0 0 12px rgba(113, 121, 232, .34);
}
.nav button svg {
  width: 15px !important;
  height: 15px !important;
  color: #747881;
  stroke-width: 1.65 !important;
}
.nav button:hover svg,
.nav button.on svg { color: #c7c9cf; }
.nav button i,
.ai-badge {
  color: #9a9ea6 !important;
  background: #1a1b1f !important;
  border: 1px solid #2b2d33 !important;
  box-shadow: none !important;
}

.side-bot {
  margin: 0 8px 8px;
  padding: 10px 10px !important;
  border: 1px solid rgba(255, 255, 255, .045) !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
  color: var(--fg-4) !important;
}

/* Top chrome */
.topbar {
  height: 48px !important;
  padding: 0 18px !important;
  border-bottom-color: #24262a !important;
  background: #101113 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .012);
}
.topbar h1 { color: #62666e !important; font-size: 12.5px !important; }
.topbar h1::before {
  content: "SAMP Dental  /";
  margin-right: 7px;
  color: #5e626a;
  font-weight: 430;
}
.topbar h1 b { color: #dcdde0 !important; font-weight: 530 !important; }
.top-actions { gap: 7px !important; }
.session-user { color: #686c74 !important; font-size: 11.5px !important; }
#btn-top-ai {
  color: #b9bcc3 !important;
  background: #17181b !important;
  border-color: #2b2d33 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset !important;
}
#btn-top-ai:hover { color: #e8e9eb !important; background: #1d1e22 !important; filter: none; }
#btn-top-ai .ai-badge {
  color: #8e929a !important;
  background: #101113 !important;
  border: 1px solid #2b2d33 !important;
}

.toolbar {
  min-height: 49px;
  padding: 8px 18px !important;
  border-bottom-color: #222429 !important;
  background: rgba(14, 15, 17, .58);
}

/* Controls */
.btn {
  min-height: 30px;
  padding: 5px 11px !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: var(--radius-control) !important;
  color: #17181a !important;
  background: linear-gradient(180deg, #f5f5f6, #dedfe2) !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .32), 0 1px 0 rgba(255, 255, 255, .48) inset;
  font-size: 12px !important;
  font-weight: 560 !important;
  transition: filter .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease !important;
}
.btn:hover { filter: brightness(1.07); }
.btn.sec,
.mini,
.q-btns button,
.zone-tab-btn,
.ai-tab-btn,
.strat-btn-copy {
  color: #b4b7be !important;
  background: #17181b !important;
  border-color: #2a2c31 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset !important;
}
.btn.sec:hover,
.mini:hover,
.q-btns button:hover,
.zone-tab-btn:hover,
.ai-tab-btn:hover,
.strat-btn-copy:hover {
  color: #e7e8ea !important;
  background: #1d1e22 !important;
  border-color: #383a42 !important;
  filter: none;
}
.btn.dgr { color: var(--red) !important; background: var(--red-bg) !important; border-color: rgba(230, 107, 115, .26) !important; }
.btn:focus-visible,
.nav button:focus-visible,
.chip:focus-visible,
.sidebar-create:focus-visible,
.sidebar-compact-toggle:focus-visible,
.workspace-switcher:focus-visible {
  outline: 2px solid #737be6 !important;
  outline-offset: 2px !important;
}

/* View canvas */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 24px 72px !important;
}
.view.on { animation: view-in .18s ease-out both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.lbl {
  margin: 0 0 8px 2px !important;
  color: #858992 !important;
  font-size: 11px !important;
  font-weight: 530 !important;
  letter-spacing: .035em;
}

.panel,
.kpis,
.inbox,
.strat-card,
.zone-card,
.criteria-box,
.kb-card,
.auth-card,
.date-nav-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 42%),
    var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--shadow-panel) !important;
}

.panel-h,
.thread-h,
.kb-card-h,
.ai-header {
  min-height: 52px;
  padding: 12px 15px !important;
  border-color: #25272c !important;
}
.panel-h h2,
.thread-h h3,
.kb-card-h b { color: #e4e5e7; font-size: 13px !important; font-weight: 550 !important; }
.panel-h p,
.thread-h p { color: #747880 !important; font-size: 11.5px !important; }
.panel-b { padding: 15px !important; }
.panel-f,
.addtask,
.thread-f,
.mbox-f,
.ai-footer {
  color: #71757d !important;
  background: rgba(8, 9, 10, .32) !important;
  border-color: #25272c !important;
}

/* Hero and KPI hierarchy */
.date-nav-bar {
  min-height: 48px;
  padding: 8px 10px !important;
  margin-bottom: 14px !important;
}
.hoy-hero {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 22px 26px !important;
  margin-bottom: 24px !important;
  background:
    radial-gradient(70% 150% at 0% 0%, rgba(113, 121, 232, .1), transparent 62%),
    linear-gradient(135deg, #16171a, #121315 70%) !important;
  border: 1px solid #282a2f !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 60px rgba(0, 0, 0, .18) !important;
}
.hoy-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -180px;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .012), 0 0 0 78px rgba(255, 255, 255, .008);
  pointer-events: none;
}
.hoy-hero h2 { color: #f1f2f3 !important; font-size: 18px !important; font-weight: 580 !important; }
.hoy-hero p { color: #7f838b !important; }
.hoy-hero .meta { gap: 24px !important; }
.hoy-hero .meta b { color: #dedfe2 !important; font-size: 14px !important; font-weight: 560 !important; }
.ring { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .25)); }

.kpis { overflow: hidden; }
.kpi {
  min-height: 106px;
  padding: 16px !important;
  border-color: #25272c !important;
  background: transparent;
}
.kpi:hover { background: rgba(255, 255, 255, .015); }
.kpi .l { color: #7f838b !important; font-size: 11px !important; font-weight: 520; }
.kpi .v { color: #edeef0 !important; font-size: 26px !important; font-weight: 570 !important; font-variant-numeric: tabular-nums; }
.kpi .s { color: #62666e !important; }

/* Lists and operational rows */
.task,
.idea,
.conv,
.crit-item {
  border-color: #222429 !important;
  transition: background-color .14s ease, border-color .14s ease !important;
}
.task:hover,
.idea:hover,
.conv:hover { background: rgba(255, 255, 255, .022) !important; }
.task .tx,
.idea-t b,
.conv-t b { color: #dfe0e3 !important; }
.cbox { background: #0e0f11 !important; border-color: #2b2d32 !important; border-radius: 5px !important; }
.cbox.on { background: var(--accent) !important; border-color: var(--accent) !important; }

table { font-size: 12.5px !important; }
th {
  height: 36px;
  color: #737780 !important;
  border-color: #25272c !important;
  font-size: 10.5px !important;
  font-weight: 540 !important;
  letter-spacing: .035em;
  text-transform: uppercase;
}
td {
  height: 45px;
  color: #aeb1b8 !important;
  border-color: #222429 !important;
}
tbody tr { transition: background-color .14s ease; }
tbody tr:hover { background: rgba(255, 255, 255, .018); }
td.k { color: #e2e3e5 !important; }

.badge,
.chip,
.lead-chip,
.lead-chip-pill,
.strat-tag,
.zone-card-badge,
.kb-cat {
  border-radius: 999px !important;
  box-shadow: none !important;
}
.badge.n,
.chip,
.lead-chip,
.lead-chip-pill { color: #8d9199 !important; background: #191a1d !important; border-color: #2b2d32 !important; }
.badge.g { color: #62c8aa !important; background: var(--green-bg) !important; border-color: rgba(56, 184, 148, .25) !important; }
.badge.a { color: #e7bd6e !important; background: var(--amber-bg) !important; border-color: rgba(231, 183, 95, .25) !important; }
.badge.r { color: #eb7f86 !important; background: var(--red-bg) !important; border-color: rgba(230, 107, 115, .25) !important; }
.chip.on,
.zone-tab-btn.on,
.ai-tab-btn.on {
  color: #e7e8eb !important;
  background: #24262b !important;
  border-color: #3b3e46 !important;
}

/* Pipeline */
.board { gap: 10px !important; }
.col {
  background: #111214 !important;
  border-color: #23252a !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .018) inset;
}
.lead {
  background: #17181b !important;
  border-color: #282a30 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .022) inset !important;
  transform: none !important;
}
.lead:hover {
  background: #1b1c20 !important;
  border-color: #3a3c43 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24) !important;
  transform: translateY(-1px) !important;
}
.act-icon-btn,
.lead-stage-select-box { background: #1b1c20 !important; border-color: #2e3036 !important; }

/* Pipeline cards: quiet at a glance, actionable on inspection */
.board {
  grid-template-columns: repeat(6, minmax(292px, 1fr)) !important;
  align-items: start;
}
.pipe-col {
  min-height: 420px !important;
  padding: 10px !important;
}
.pipe-col .col-h {
  min-height: 32px;
  margin: 0 2px 10px !important;
  padding: 0 2px 9px !important;
  border-color: #23252a !important;
}
.pipe-col .col-h span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c4c7ce !important;
  font-size: 12px !important;
  font-weight: 560 !important;
}
.pipe-col .col-h span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #686c75;
  box-shadow: 0 0 0 3px rgba(104, 108, 117, .1);
}
.pipe-col-contacted .col-h span::before { background: #d6a85b; box-shadow: 0 0 0 3px rgba(214, 168, 91, .1); }
.pipe-col-replied .col-h span::before,
.pipe-col-demo .col-h span::before { background: #5fc3a5; box-shadow: 0 0 0 3px rgba(95, 195, 165, .1); }
.pipe-col-proposal .col-h span::before { background: #8189ef; box-shadow: 0 0 0 3px rgba(129, 137, 239, .1); }
.pipe-col-won .col-h span::before { background: #6ec88c; box-shadow: 0 0 0 3px rgba(110, 200, 140, .1); }

.pipeline-card {
  position: relative;
  gap: 0 !important;
  margin-bottom: 9px !important;
  padding: 0 !important;
  overflow: hidden;
  cursor: pointer;
}
.pipeline-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: #686c75;
  opacity: .8;
}
.pipeline-card.stage-contacted::before { background: #d6a85b; }
.pipeline-card.stage-replied::before,
.pipeline-card.stage-demo::before { background: #5fc3a5; }
.pipeline-card.stage-proposal::before { background: #8189ef; }
.pipeline-card.stage-won::before { background: #6ec88c; }
.pipeline-card.stage-replied {
  border-color: rgba(95, 195, 165, .3) !important;
  background: linear-gradient(180deg, rgba(39, 82, 69, .09), #17181b 38%) !important;
}
.lead-header-line,
.lead-identity,
.lead-context,
.lead-next,
.lead-reply,
.lead-card-actions,
.pipeline-card .lead-footer {
  margin-left: 13px;
  margin-right: 13px;
}
.lead-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0 10px;
  border-bottom: 1px solid #24262b;
}
.lead-code,
.lead-activity {
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: .035em;
  color: #777b84;
}
.lead-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 600;
  color: #a8abb2;
}
.lead-code i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.lead-activity {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-contacted .lead-code { color: #d6a85b; }
.stage-replied .lead-code,
.stage-demo .lead-code { color: #5fc3a5; }
.stage-proposal .lead-code { color: #8189ef; }
.stage-won .lead-code { color: #6ec88c; }

.lead-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 13px;
}
.lead-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #30323a;
  border-radius: 9px;
  background: linear-gradient(145deg, #292b31, #1d1e22);
  color: #d8dae0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
}
.lead-person { min-width: 0; }
.pipeline-card .lead-n {
  overflow: hidden;
  color: #eff0f2 !important;
  font-size: 13px !important;
  font-weight: 610 !important;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pipeline-card .lead-doc {
  margin-top: 2px;
  overflow: hidden;
  color: #8c9099 !important;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-context {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 11px 0 12px;
}
.lead-context span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: #7f838c;
  font-size: 10.5px;
}
.lead-context svg,
.lead-action svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}
.lead-reply {
  position: relative;
  margin-top: 0;
  margin-bottom: 11px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(95, 195, 165, .18);
  border-radius: 7px;
  background: rgba(95, 195, 165, .055);
  color: #b9d8ce;
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.45;
}
.lead-next {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  padding: 9px 10px;
  border: 1px solid #292b31;
  border-radius: 7px;
  background: #131416;
}
.lead-next span {
  grid-column: 1 / -1;
  color: #70747d;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.lead-next strong {
  overflow: hidden;
  color: #dfe1e5;
  font-size: 11px;
  font-weight: 570;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-next small {
  color: #8b8f98;
  font-size: 9.5px;
  white-space: nowrap;
}
.stage-contacted .lead-next { border-color: rgba(214, 168, 91, .2); background: rgba(214, 168, 91, .04); }
.stage-replied .lead-next { border-color: rgba(95, 195, 165, .22); background: rgba(95, 195, 165, .05); }

.lead-card-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px !important;
  margin-top: 11px !important;
  padding: 0 0 11px !important;
  border: 0 !important;
}
.lead-action {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #2d3036;
  border-radius: 6px;
  background: #1b1c20;
  color: #b7bac1;
  font: inherit;
  font-size: 10.5px;
  font-weight: 540;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.lead-action:hover,
.lead-action:focus-visible { color: #f0f1f3; background: #23252a; border-color: #41444c; }
.lead-action:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lead-action.wa { color: #75cbae; }
.pipeline-card .lead-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0 !important;
  padding: 10px 0 11px;
  border-top: 1px solid #24262b !important;
}
.lead-value { min-width: 0; color: #6ec39e; font-size: 10px; white-space: nowrap; }
.lead-value b { font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 600; }
.lead-value small { color: #6f737b; font-size: 9px; }
.pipeline-card .lead-stage-select-box {
  min-width: 104px;
  max-width: 132px;
  height: 27px;
  padding: 0 24px 0 8px !important;
  color: #aeb1b8 !important;
  border-radius: 6px !important;
  font-family: inherit;
  font-size: 9.5px !important;
  cursor: pointer;
}
.col-empty {
  display: flex;
  min-height: 180px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #5f636b !important;
}
.col-empty b { color: #7f838c; font-size: 11px; font-weight: 550; }
.col-empty span { max-width: 150px; font-size: 10px; line-height: 1.4; }

@media (max-width: 700px) {
  .pipe-col { flex-basis: 86vw !important; min-width: 86vw !important; max-width: 86vw !important; }
  .lead-action { min-height: 44px; font-size: 12px; }
  .pipeline-card .lead-stage-select-box { min-height: 40px; font-size: 11px !important; }
}

/* Chat and AI surfaces */
.conv-list { border-color: #25272c !important; }
.conv { content-visibility: auto; contain-intrinsic-size: auto 76px; }
.pipeline-card { content-visibility: auto; contain-intrinsic-size: auto 220px; }
.zone-card { content-visibility: auto; contain-intrinsic-size: auto 180px; }
.conv.on { background: rgba(113, 121, 232, .09) !important; box-shadow: 2px 0 0 #7179e8 inset; }
.msg.them,
.msg.me { background: #1a1b1f !important; border-color: #2b2d33 !important; }
.msg.bot { background: rgba(113, 121, 232, .1) !important; border-color: rgba(113, 121, 232, .22) !important; }
.ai-drawer {
  background: #111214 !important;
  border-color: #2a2c31 !important;
  box-shadow: var(--shadow-float) !important;
}
.ai-fab {
  color: #17181a !important;
  background: linear-gradient(180deg, #f5f5f6, #dedfe2) !important;
  border-color: rgba(255, 255, 255, .78) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .4) !important;
}
.ai-msg.bot .ai-bubble { background: #191a1e !important; border-color: #2a2c32 !important; }
.ai-msg.user .ai-bubble { background: rgba(113, 121, 232, .14) !important; border-color: rgba(113, 121, 232, .28) !important; }
.ai-input-wrap { background: #17181b !important; border-color: #2c2e34 !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.ai-input-wrap:focus-within { border-color: #6068c8 !important; box-shadow: 0 0 0 3px rgba(113, 121, 232, .1) !important; }

/* Modal and auth */
.modal { background: rgba(3, 4, 5, .74) !important; backdrop-filter: blur(10px) !important; }
.mbox {
  background: #141517 !important;
  border-color: #34363d !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-float) !important;
}
.mbox-h,
.mbox-f { border-color: #282a30 !important; }
.toast { color: #e9eaec !important; background: #25272c !important; border: 1px solid #3a3d44; box-shadow: var(--shadow-float); }
#auth-gate {
  background:
    radial-gradient(55% 58% at 50% 0%, rgba(113, 121, 232, .15), transparent 76%),
    #0b0c0e !important;
}
.auth-card { box-shadow: var(--shadow-float) !important; }

/* Responsive */
@media (max-width: 1100px) {
  .content { padding-inline: 18px !important; }
  .session-user { display: none; }
}

@media (max-width: 768px) {
  body::before { inset-left: 0; }
  .main { margin-left: 0 !important; width: 100% !important; min-width: 0 !important; }
  .side { background: #0d0e10 !important; }
  .side-top { min-height: 54px; }
  .sidebar-compact-toggle { display: none; }
  .nav-group-label { display: flex !important; }
  .nav button.on {
    color: #f0f1f2 !important;
    background: rgba(255, 255, 255, .075) !important;
  }
  .topbar { padding: 0 12px !important; }
  .topbar h1::before { display: none; }
  .toolbar { padding: 8px 12px !important; }
  .content { padding: 14px 12px 86px !important; }
  .hoy-hero { padding: 20px 16px !important; }
  .hoy-hero .meta { justify-content: center; gap: 14px 20px !important; }
  .panel-h { align-items: flex-start !important; }
  .search::after { display: none; }
}

/* Menú corto: las vistas que viven dentro de otra sección se abren desde sus pestañas */
.nav button.nav-oculto,
.duplicado-oculto { display: none !important; }

.seccion-tabs {
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 3px;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.seccion-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  color: var(--fg-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}
.seccion-tabs button:hover { color: var(--fg-2); }
.seccion-tabs button.on {
  color: var(--fg);
  background: var(--panel-3);
  border-color: var(--border-2);
}
.seccion-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seccion-contador {
  min-width: 18px;
  padding: 0 5px;
  color: #aab0f5;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.seccion-contador[hidden] { display: none; }

.seccion-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 14px; }
.seccion-cabecera > .seccion-tabs { margin: 0; }

@media (max-width: 768px) {
  .seccion-tabs { width: 100%; margin-bottom: 14px; }
  .seccion-cabecera > .seccion-tabs { margin: 0; }
  .seccion-tabs button { flex: 1 0 auto; justify-content: center; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
