﻿:root {
  --bg: #f3f1ec;
  --bg-2: #ebe7de;
  --surface: #fffcf7;
  --ink: #161513;
  --muted: #6f6b64;
  --line: #e6e1d8;
  --line-2: #efebe3;
  --blue: #1d4ed8;
  --blue-soft: #eef3ff;
  --green: #0f7a4a;
  --green-soft: #e8f6ee;
  --red: #c2412d;
  --red-soft: #fbecea;
  --gold: #9a7b3c;
  --shadow: 0 1px 1px rgba(22,21,19,.04), 0 8px 24px rgba(22,21,19,.05);
  --shadow-lg: 0 1px 1px rgba(22,21,19,.04), 0 18px 40px rgba(22,21,19,.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 80% -10%, rgba(29,78,216,.07), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(154,123,60,.06), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -.015em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 40;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.03em; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px 1fr;
}

/* Sidebar */
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 12px 10px 12px;
  background: rgba(250,249,246,.78);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 6px 10px; }
.logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: #f6f1e8;
  display: grid; place-items: center; font-size: 13px;
  box-shadow: 0 6px 12px rgba(22,21,19,.16);
}
.brand b { display: block; font-size: 13px; font-weight: 800; letter-spacing: -.03em; }
.brand small { color: var(--muted); font-size: 10.5px; font-weight: 600; }
.ws {
  display: flex; align-items: center; gap: 8px;
  margin: 0 2px 10px; padding: 8px 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow);
}
.ws .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(180deg, #2a2824, #161513); color: #f6f1e8;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
}
.ws b { display: block; font-size: 12px; font-weight: 750; }
.ws small { color: var(--muted); font-size: 10.5px; display: flex; align-items: center; gap: 5px; }
.live { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
.lbl {
  margin: 8px 10px 4px; font-size: 10px; font-weight: 800;
  color: #a39e94; letter-spacing: .12em; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 9px; margin: 1px 2px; border-radius: 8px;
  color: #5c5852; font-weight: 600; font-size: 13px;
}
.nav a i { width: 15px; text-align: center; font-size: 14px; color: #8a857c; }
.nav a:hover { background: rgba(22,21,19,.04); color: var(--ink); }
.nav a.on { background: var(--ink); color: #f6f1e8; font-weight: 700; }
.nav a.on i { color: #f6f1e8; }
.nav .badge {
  margin-left: auto; font-size: 10.5px; font-weight: 750; color: #6f6b64;
  background: #efebe3; padding: 1px 6px; border-radius: 99px;
}
.nav a.on .badge { background: rgba(246,241,232,.16); color: #f6f1e8; }
.side-user {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 11px; border: 1px solid transparent;
}
.side-user:hover { background: var(--surface); border-color: var(--line); }
.side-user b { display: block; font-size: 12.5px; font-weight: 750; }
.side-user small { color: var(--muted); font-size: 11px; }

/* Main */
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 10px 18px;
  background: rgba(243,241,236,.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.search {
  flex: 1; min-width: 180px; height: 36px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: #a39e94; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  overflow: hidden;
}
.search i { flex-shrink: 0; font-size: 14px; line-height: 1; color: #a39e94; }
.search:focus-within { border-color: #c9c2b4; box-shadow: 0 0 0 3px rgba(22,21,19,.06); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); font-weight: 500; }
.kbd {
  flex-shrink: 0; font-size: 10px; font-weight: 700; color: #a39e94;
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.switch { display: flex; padding: 2px; background: #ebe7de; border-radius: 9px; }
.switch a {
  height: 28px; padding: 0 10px; border-radius: 7px;
  font-size: 12px; font-weight: 750; color: var(--muted); display: grid; place-items: center;
}
.switch a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(22,21,19,.08); }
.ghost, .primary, .icon-btn {
  height: 36px; border-radius: 10px; font-size: 12.5px; font-weight: 750;
  white-space: nowrap; flex-shrink: 0; overflow: visible; line-height: 1;
}
.ghost {
  padding: 0 12px; background: var(--surface); border: 1px solid var(--line); color: #3d3a35;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.ghost:hover { background: #fff; }
.primary {
  padding: 0 14px; background: var(--ink); border: 1px solid var(--ink); color: #f6f1e8;
  box-shadow: 0 6px 14px rgba(22,21,19,.14);
  display: inline-flex; align-items: center; justify-content: center;
}
.primary:hover { background: #2a2824; }
.icon-btn {
  width: 36px; padding: 0; border: 1px solid var(--line); background: var(--surface); color: #3d3a35;
  display: grid; place-items: center; position: relative; flex-shrink: 0;
}
.icon-btn .ping {
  position: absolute; top: 6px; right: 7px; width: 6px; height: 6px;
  background: var(--blue); border-radius: 50%; border: 2px solid var(--surface);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
}

.page { padding: 14px 18px 22px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.kicker { margin: 0 0 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #a39e94; }
.head h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); padding: 2px; border-radius: 9px; box-shadow: var(--shadow); }
.seg button {
  height: 26px; padding: 0 10px; border: 0; background: transparent;
  border-radius: 7px; font-size: 12px; font-weight: 750; color: var(--muted);
}
.seg button.on { background: var(--ink); color: #f6f1e8; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 0;
}
.card-h h2 { margin: 0; font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.card-h span, .quiet { color: var(--muted); font-size: 12px; font-weight: 600; }
.card-h a.quiet:hover { color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.kpi { padding: 12px 14px; transition: transform .18s ease, box-shadow .18s ease; }
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.kpi .row { display: flex; justify-content: space-between; align-items: flex-start; }
.ico-well {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
}
.kpi span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.kpi b { display: block; margin-top: 6px; font-size: 22px; font-weight: 400; line-height: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  height: 20px; padding: 0 7px; border-radius: 99px;
  font-size: 11px; font-weight: 750; background: var(--green-soft); color: var(--green);
}
.chip.down { background: var(--red-soft); color: var(--red); }

.hero { margin-bottom: 10px; overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 16px 0; }
.hero-top .k { color: var(--muted); font-size: 12px; font-weight: 650; }
.hero-top .v { font-size: 28px; line-height: 1; margin-top: 2px; }
.hero-top .delta { color: var(--green); font-size: 12.5px; font-weight: 750; margin-top: 4px; }
.chart { height: 132px; padding: 2px 6px 0; }
.chart svg { width: 100%; height: 100%; display: block; }
.axis { display: flex; justify-content: space-between; padding: 2px 16px 12px; color: #a39e94; font-size: 11px; font-weight: 650; }

.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; margin-bottom: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 10px; }

.pipe { padding: 8px 14px 12px; }
.mix { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--bg); margin: 10px 0 6px; }
.mix i { display: block; height: 100%; }
.conv {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-2);
}
.conv b { font-size: 13px; }
.conv span { color: var(--muted); font-size: 12px; font-weight: 600; }
.stages { display: flex; flex-direction: column; }
.st {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--line-2);
}
.st:last-child { border-bottom: 0; }
.st .sw { width: 7px; height: 7px; border-radius: 50%; }
.st b { font-weight: 650; color: #3d3a35; }
.st .c { font-weight: 800; }
.st .p { color: var(--muted); width: 38px; text-align: right; font-weight: 650; }

.src { display: grid; grid-template-columns: 28px 1fr 56px 40px; gap: 9px; align-items: center; padding: 8px 14px; }
.src + .src { border-top: 1px solid var(--line-2); }
.src:hover { background: #faf8f3; }
.ico {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 13px;
}
.bar { height: 4px; background: var(--bg); border-radius: 99px; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.src .pct { color: var(--muted); text-align: right; font-weight: 650; }

.map-wrap { padding: 6px 12px 4px; }
.map {
  height: 108px; border-radius: 11px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #f7f4ee, #ece7dc);
  border: 1px solid var(--line-2);
}
.map svg { width: 100%; height: 100%; }
.locs { padding: 0 14px 10px; }
.loc { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line-2); font-weight: 650; }
.loc span { color: var(--muted); }

.insight { padding: 10px 12px 12px; }
.feature {
  padding: 12px; border-radius: 11px;
  background: linear-gradient(#fffcf7, #fffcf7) padding-box,
              linear-gradient(135deg, #161513, #9a7b3c) border-box;
  border: 1px solid transparent;
}
.feature .tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.feature b { display: block; font-size: 13.5px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.02em; }
.feature p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.feature .actions, .feature .row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px;
  align-items: center;
  margin: 0 !important;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}
.feature .actions > *, .feature .row > * {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.mini { padding: 8px 2px 0; }
.mini + .mini { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 8px; }
.mini span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #a39e94; }
.mini b { display: block; margin: 2px 0 1px; font-weight: 750; }
.mini p { margin: 0; color: var(--muted); font-size: 12px; }

.feed { padding: 2px 12px 10px; }
.item { display: flex; gap: 9px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.item:first-child { border-top: 0; }
.item .t {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0; font-size: 13px;
}
.t.wa { background: #e9f8ef; color: #128C7E; }
.t.call { background: var(--blue-soft); color: var(--blue); }
.t.mail { background: #f4eee4; color: var(--gold); }
.t.note { background: #f3f1ec; color: #5c5852; }
.item b { display: block; font-weight: 700; }
.item small { color: var(--muted); }

.team { padding: 2px 12px 10px; }
.agent { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.agent:first-child { border-top: 0; }
.agent .rank { width: 16px; color: #a39e94; font-size: 11px; font-weight: 800; }
.agent img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.agent .who { flex: 1; }
.agent b { display: block; font-weight: 750; }
.agent small { color: var(--muted); }
.agent .m { text-align: right; font-weight: 800; }
.agent .m small { display: block; color: var(--green); font-weight: 750; }

.deal { padding: 10px 14px; border-top: 1px solid var(--line-2); }
.deal:first-of-type { border-top: 0; }
.deal .r { display: flex; justify-content: space-between; font-weight: 750; }
.deal small { color: var(--muted); }
.pbar { height: 4px; background: var(--bg); border-radius: 99px; margin-top: 7px; }
.pbar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

.tasks {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px;
}
.tasks .s { display: flex; gap: 18px; flex-wrap: wrap; color: #3d3a35; font-weight: 650; }
.tasks .s b { font-weight: 800; }
.tasks a { color: var(--ink); font-weight: 800; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .kpis, .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .kpis, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .head h1 { font-size: 22px; }
  .top { padding: 10px 12px; }
  .page { padding: 12px 12px 20px; }
}

/* Beat Bootstrap + leftover CRM CSS so Lumen actually wins */
body, body.crm-body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 80% -10%, rgba(29,78,216,.07), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(154,123,60,.06), transparent 50%),
    var(--bg) !important;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Inter, sans-serif !important;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -.015em;
}
body.crm-body::before { z-index: 40; }
.app, .crm-app {
  min-height: 100vh;
  display: grid !important;
  grid-template-columns: 212px 1fr !important;
  background: transparent !important;
}
.side, .crm-sidebar {
  width: 212px;
  background: rgba(250,249,246,.78) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line) !important;
  padding: 12px 10px;
}
.side .nav, .crm-nav, .crm-sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
.side .nav a, .crm-nav a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px !important;
  margin: 1px 2px;
  border-radius: 8px;
  color: #5c5852 !important;
  font-weight: 600;
  font-size: 13px;
  background: transparent !important;
}
.side .nav a i, .crm-nav a i { color: #8a857c !important; width: 15px; }
.side .nav a:hover, .crm-nav a:hover { background: rgba(22,21,19,.04) !important; color: var(--ink) !important; }
.side .nav a.on, .side .nav a.active, .crm-nav a.active, .crm-nav a.on {
  background: var(--ink) !important;
  color: #f6f1e8 !important;
  font-weight: 700;
}
.side .nav a.on i, .side .nav a.active i, .crm-nav a.active i { color: #f6f1e8 !important; }
.side .nav .badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 750;
  color: #6f6b64 !important;
  background: #efebe3 !important;
  padding: 1px 6px;
  border-radius: 99px;
}
.kpis {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 10px;
}
.grid-2 { display: grid !important; grid-template-columns: 1.15fr .85fr !important; gap: 10px !important; }
.grid-3 { display: grid !important; grid-template-columns: 1fr 1.08fr 1fr !important; gap: 10px !important; }
.card, .card-crm, article.card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow) !important;
  --bs-card-bg: var(--surface);
  --bs-card-border-color: var(--line);
}
.kpi .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 !important;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}
.kpi .row > * {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  flex: unset !important;
}
.kpi .chip {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 7px !important;
  border-radius: 99px !important;
  border: 0 !important;
  font-size: 11px;
  font-weight: 750;
  background: var(--green-soft) !important;
  color: var(--green) !important;
}
.kpi .chip.down { background: var(--red-soft) !important; color: var(--red) !important; }
.row > .btn, .row > .primary, .row > .ghost, .row > a.primary, .row > a.ghost,
.row > button.primary, .row > button.ghost {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.primary, .btn-primary, .btn-yellow, a.btn-primary, button.btn-primary,
a.primary, button.primary {
  height: 36px;
  min-height: 36px;
  padding: 0 14px !important;
  background: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  color: #f6f1e8 !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  box-shadow: 0 6px 14px rgba(22,21,19,.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  overflow: visible;
  line-height: 1;
}
.primary:hover, .btn-primary:hover, .btn-yellow:hover {
  background: #2a2824 !important;
  border-color: #2a2824 !important;
  color: #f6f1e8 !important;
}
.ghost, .btn-outline-soft, .btn-outline-primary,
a.ghost, button.ghost {
  height: 36px;
  min-height: 36px;
  padding: 0 12px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: #3d3a35 !important;
  border-radius: 10px !important;
  font-weight: 750 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  overflow: visible;
  line-height: 1;
}
.ghost:hover, .btn-outline-soft:hover { background: #fff !important; color: var(--ink) !important; }
.icon-btn, .ghost.mobile-toggle, .btn.btn-close {
  padding: 0 !important;
  width: 36px;
  min-width: 36px;
}
.crm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 0;
  margin-bottom: 12px;
}
.page .head { padding: 0; margin-bottom: 12px; }
form.search { margin: 0; }
.seg a {
  height: 26px; padding: 0 10px; border: 0; background: transparent;
  border-radius: 7px; font-size: 12px; font-weight: 750; color: var(--muted);
  display: grid; place-items: center; text-decoration: none;
}
.seg a.on { background: var(--ink); color: #f6f1e8; }
.src .src-ico { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.btn-sm, .btn-sm.btn-primary, .btn-sm.primary, .btn-sm.btn-outline-soft {
  height: 32px;
  min-height: 32px;
  padding: 0 12px !important;
  font-size: 12px !important;
}
.feature .actions .primary, .feature .actions .ghost,
.feature .row .primary, .feature .row .ghost {
  height: 32px;
  min-height: 32px;
  padding: 0 14px !important;
  width: auto !important;
  flex: 0 0 auto !important;
}
.crm-title, .head h1, h1.serif {
  font-family: "Instrument Serif", Georgia, serif !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
}
.crm-content { padding: 12px 18px 22px; }
.crm-footer { display: none; }
.form-control, .form-select {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink);
  border-radius: 10px;
}
.form-control:focus, .form-select:focus {
  border-color: #c9c2b4 !important;
  box-shadow: 0 0 0 3px rgba(22,21,19,.06) !important;
}
.table-crm thead th { color: var(--muted); border-bottom-color: var(--line); }
.table-crm tbody td { border-bottom-color: var(--line-2); }
.table-crm tbody tr:hover { background: #faf8f3; }
.tabs-bar a.active, .tabs-bar .nav-link.active {
  color: var(--ink) !important;
  border-bottom-color: var(--ink) !important;
}
.settings-page { --set-accent: var(--ink); --set-soft: var(--line-2); --set-ink: var(--ink); }
.mobile-toggle { display: none; }
.crm-actions .chip, .filters-bar .chip {
  display: inline-flex !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: #3d3a35 !important;
  font-size: 12.5px;
  font-weight: 600;
}
.date-range,
.crm-actions .date-range,
.filters-bar .date-range {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px 0 12px !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: #3d3a35 !important;
  overflow: hidden;
}
.date-range input[type="date"],
.date-range .form-control,
.crm-actions .date-range .form-control,
.filters-bar .date-range .form-control {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 34px !important;
  min-height: 0 !important;
  width: 118px !important;
  flex: 0 0 118px;
  padding: 0 2px !important;
  border-radius: 0 !important;
  font-size: 12.5px !important;
  font-weight: 650;
  color: var(--ink) !important;
  -webkit-appearance: none;
  appearance: none;
}
.date-range input[type="date"]:focus,
.date-range .form-control:focus {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.date-range input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .45;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
label.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
@media (max-width: 1180px) {
  .app, .crm-app { grid-template-columns: 1fr !important; }
  .side, .crm-sidebar { display: none; }
  .side.open, .crm-sidebar.open {
    display: flex !important;
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    z-index: 1050;
    transform: none;
  }
  .top .mobile-toggle, .crm-chrome .mobile-toggle { display: grid !important; }
  .kpis, .grid-2, .grid-3 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 760px) {
  .kpis, .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
}
