/* ANVI CRM — дизайн-система. Фирменные цвета: терракота #C1502F, графит-коричневый #2B211B, крем #FBF3E9, светло-бежевый #F5F3EF */
:root {
  --brand: #C1502F;
  --brand-dark: #2B211B;
  --brand-cream: #FBF3E9;
  --brand-beige: #F5F3EF;

  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #FBF3E9;
  --surface-3: #F1EAE0;
  --border: #E6DDD2;
  --text: #2B211B;
  --muted: #7C6F66;
  --faint: #A89C92;
  --accent: #C1502F;
  --accent-hover: #A8432A;
  --accent-soft: #F7E3DA;
  --accent-text: #FFFFFF;
  --success: #2E8B57;
  --success-soft: #E1F2E7;
  --warning: #B7791F;
  --warning-soft: #FBEFD6;
  --danger: #C53030;
  --danger-soft: #FBE0DE;
  --info: #5B5FC7;
  --info-soft: #E6E6FA;
  --grid: #EDE5DB;
  --shadow: 0 1px 2px rgba(43, 33, 27, .05), 0 4px 16px rgba(43, 33, 27, .05);
  --sidebar-bg: #2B211B;
  --sidebar-text: #E9DFD4;
  --sidebar-muted: #9C8E83;
  --sidebar-active: rgba(193, 80, 47, .18);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #120E0C;
  --surface: #1B1613;
  --surface-2: #231C18;
  --surface-3: #2C241F;
  --border: #33291F;
  --text: #F4ECE3;
  --muted: #A3968C;
  --faint: #6F645C;
  --accent: #D2582F;
  --accent-hover: #E0663C;
  --accent-soft: rgba(210, 88, 47, .16);
  --accent-text: #FFFFFF;
  --success: #4CC38A;
  --success-soft: rgba(76, 195, 138, .14);
  --warning: #E8B04B;
  --warning-soft: rgba(232, 176, 75, .14);
  --danger: #F0645F;
  --danger-soft: rgba(240, 100, 95, .14);
  --info: #8B8FF5;
  --info-soft: rgba(139, 143, 245, .15);
  --grid: #2A221D;
  --shadow: none;
  --sidebar-bg: #0E0B09;
  --sidebar-text: #E9DFD4;
  --sidebar-muted: #85786E;
  --sidebar-active: rgba(210, 88, 47, .16);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Manrope', 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo-word { font-weight: 900; letter-spacing: 4px; font-size: 20px; line-height: 1; color: var(--brand-cream); }
.logo-word::after { content: ''; display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--brand); margin-top: 6px; }
.logo-sub { font-size: 11px; color: var(--sidebar-muted); margin-top: 2px; letter-spacing: .3px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--sidebar-muted); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-weight: 600; font-size: 14px; transition: background .15s;
}
.nav a:hover { background: rgba(255,255,255,.05); }
.nav a.active { background: var(--sidebar-active); color: #fff; }
.nav a.active svg { color: var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--sidebar-muted); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--brand); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 12px; color: var(--sidebar-muted); }
.sidebar-foot b { color: var(--sidebar-text); display: block; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  border-bottom: 1px solid var(--border); background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 420px; position: relative; }
.search input {
  width: 100%; padding: 9px 12px 9px 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); outline: none;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--faint); }
.topbar .spacer { flex: 1; }
.select {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; position: relative;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-dark); color: var(--brand-cream); font-weight: 800; font-size: 13px; flex: none;
}
:root[data-theme="dark"] .avatar { background: var(--surface-3); }
.menu-btn { display: none; }

.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.card-head .hint { color: var(--muted); font-size: 12px; }

.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.kpi .label svg { width: 16px; color: var(--faint); }
.kpi .value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.kpi .value.accent { color: var(--accent); }
.kpi .foot { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 700; font-size: 12px; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.progress.ok > i { background: var(--success); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--muted);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { background: var(--success-soft); color: var(--success); }
.b-orange { background: var(--accent-soft); color: var(--accent); }
.b-yellow { background: var(--warning-soft); color: var(--warning); }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-blue { background: var(--info-soft); color: var(--info); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: none;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.cell-main { font-weight: 700; }
.cell-sub { font-size: 12px; color: var(--muted); }
.neg { color: var(--danger); font-weight: 700; }
.pos { color: var(--success); font-weight: 700; }
.muted { color: var(--muted); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 12px;
  font-weight: 700; font-size: 12px; cursor: pointer; color: var(--muted);
}
.chip.on { background: var(--brand-dark); color: var(--brand-cream); border-color: var(--brand-dark); }
:root[data-theme="dark"] .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip span { opacity: .7; margin-left: 4px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; padding-bottom: 0; }
.li:first-child { padding-top: 0; }
.li .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.li .ic svg { width: 17px; height: 17px; }
.li .body { flex: 1; min-width: 0; }
.li .t { font-weight: 700; }
.li .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Status tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); }
.tile .n { font-size: 24px; font-weight: 800; }
.tile .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile .bar { height: 4px; border-radius: 99px; margin-top: 10px; }

/* ---------- Charts ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--faint); font-size: 11px; font-family: inherit; }
.chart .gridline { stroke: var(--grid); stroke-dasharray: 3 4; }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover { opacity: .75; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tooltip {
  position: fixed; pointer-events: none; z-index: 100; background: var(--brand-dark); color: var(--brand-cream);
  padding: 8px 11px; border-radius: 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transition: opacity .1s;
}
:root[data-theme="dark"] .tooltip { background: #2E2520; border: 1px solid var(--border); }
.tooltip b { display: block; margin-bottom: 2px; }

.gauge-wrap { display: flex; align-items: center; gap: 20px; }
.gauge { position: relative; width: 150px; flex: none; text-align: center; }
.gauge .gv { position: absolute; left: 0; right: 0; top: 46px; font-size: 28px; font-weight: 800; }
.gauge .gl { font-size: 12px; color: var(--muted); margin-top: -6px; }

.cat-row { margin-bottom: 14px; }
.cat-row:last-child { margin-bottom: 0; }
.cat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.cat-top b { font-weight: 800; }
.cat-pct { font-size: 11px; color: var(--faint); text-align: right; margin-top: 3px; }

/* ---------- Detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13px; margin-bottom: 10px; cursor: pointer; }
.back svg { width: 16px; }
.hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero .big-av { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: var(--accent-soft); color: var(--accent); flex: none; }
.hero h1 { margin: 0; font-size: 24px; font-weight: 800; }
.props { display: grid; grid-template-columns: 140px 1fr; gap: 9px 12px; font-size: 13px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; font-weight: 600; min-width: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo {
  aspect-ratio: 4/3; border-radius: 10px; background: var(--surface-3); border: 1px dashed var(--border);
  display: grid; place-items: center; font-size: 11px; color: var(--faint); text-align: center; padding: 4px;
}
.photo.ok { border-style: solid; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); color: var(--muted); }
.photo svg { width: 22px; height: 22px; display: block; margin: 0 auto 4px; color: var(--faint); }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl { position: relative; padding-bottom: 14px; }
.tl::before { content: ''; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl .d { font-size: 12px; color: var(--muted); }

.score { display: flex; align-items: center; gap: 10px; }
.score-ring { width: 54px; height: 54px; flex: none; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 10px; min-height: 200px; }
.col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; padding: 4px 6px 10px; font-size: 13px; }
.col-head span { color: var(--muted); font-weight: 700; }
.ticket {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow);
}
.ticket:hover { border-color: var(--accent); }
.ticket .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ticket .ttl { font-weight: 700; margin-bottom: 8px; }
.ticket .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }

/* ---------- Map ---------- */
.map { position: relative; height: 460px; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.map svg { width: 100%; height: 100%; display: block; }
.pin { cursor: pointer; }
.pin circle.halo { animation: pulse 2s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0% { opacity: .5; transform: scale(1);} 100% { opacity: 0; transform: scale(2.6);} }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 14, 10, .55); z-index: 50; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps div { flex: 1; }
.steps i { display: block; height: 4px; border-radius: 99px; background: var(--surface-3); }
.steps div.on i { background: var(--accent); }
.steps span { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 700; }
.steps div.on span { color: var(--text); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.opt { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.opt:hover { border-color: var(--faint); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .t { font-weight: 800; }
.opt .s { font-size: 12px; color: var(--muted); }
.code-inputs { display: flex; gap: 10px; justify-content: center; margin: 14px 0; }
.code-inputs input { width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 800; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.success-big { text-align: center; padding: 18px 0 6px; }
.success-big .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 12px; }
.success-big .ok svg { width: 32px; height: 32px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--brand-dark); color: var(--brand-cream); padding: 12px 18px; border-radius: 12px; font-weight: 700;
  z-index: 200; transition: all .25s; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; gap: 8px; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; color: #6FD39B; }

.empty { text-align: center; color: var(--muted); padding: 30px; }
.note { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border); }
.switch { width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { left: 18px; }

/* ---------- Бот курьера (макет телефона) ---------- */
.bot-layout { display: grid; grid-template-columns: 320px 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.phone { border: 10px solid #0B0908; border-radius: 38px; background: #0E1621; overflow: hidden; height: 640px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.phone-top { display: flex; gap: 10px; align-items: center; padding: 14px 14px 12px; background: #17212B; color: #fff; }
.phone-top b { display: block; font-size: 14px; }
.phone-top span { font-size: 12px; color: #7F91A4; }
.bot-av { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-dark); display: grid; place-items: center; flex: none; }
.bot-av svg { width: 20px; height: 20px; }
.chat { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; background: #0E1621; }
.msg { max-width: 82%; padding: 7px 10px 16px; border-radius: 14px; font-size: 13px; line-height: 1.4; color: #fff; position: relative; }
.msg i { position: absolute; right: 9px; bottom: 3px; font-size: 10px; font-style: normal; color: rgba(255,255,255,.45); }
.msg.in { background: #182533; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: #2B5278; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .ph { width: 160px; height: 90px; border-radius: 10px; background: #3A6A96; display: grid; place-items: center; font-size: 11px; color: #cfe; margin-bottom: 6px; }
.kb { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.kb-row { display: flex; gap: 4px; }
.kb-row span { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; background: rgba(42, 60, 80, .9); color: #fff; font-size: 12px; font-weight: 600; }
.mini { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--brand-beige); color: var(--brand-dark); }
.mini-card { background: #fff; border-radius: 16px; padding: 14px; }
.mini-card span { font-size: 12px; color: #7C6F66; display: block; }
.mini-card b { font-size: 22px; font-weight: 800; display: block; }
.mini-card small { font-size: 12px; color: #7C6F66; }
.mini-card.accent { background: var(--brand); color: #fff; }
.mini-card.accent span, .mini-card.accent small { color: rgba(255,255,255,.8); }
.mini-card .progress { background: #EFE7DD; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-grid div { background: #fff; border-radius: 14px; padding: 12px 6px; text-align: center; font-size: 12px; font-weight: 700; }
.mini-grid svg { width: 22px; height: 22px; color: var(--brand); display: block; margin: 0 auto 6px; }
.mini-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #F1EAE0; font-size: 13px; }
.mini-row b { font-size: 13px; display: inline; }
@media (max-width: 1200px) { .bot-layout { grid-template-columns: repeat(2, minmax(0, 320px)); } .bot-info { grid-column: 1 / -1; } }
@media (max-width: 720px) { .bot-layout { grid-template-columns: 1fr; justify-items: center; } .phone { width: 100%; max-width: 320px; } .bot-info { width: 100%; } }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 40px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .search { display: none; }
  .hide-sm { display: none !important; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 21px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 22px; }
  .props { grid-template-columns: 110px 1fr; }
  .gauge-wrap { flex-direction: column; align-items: stretch; }
  .gauge { margin: 0 auto; }
}
