:root {
  --navy: #16356e;
  --navy-2: #10284f;
  --blue: #2f6fe8;
  --ink: #14233d;
  --muted: #667892;
  --line: #e4ebf5;
  --bg: #f4f7fb;
  --card: #fff;
  --green: #1f8a4c;
  --red: #c43b3b;
  --amber: #b26a12;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button {
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
button:active { transform: scale(0.97); }
button:focus-visible { outline: 2px solid rgba(47, 111, 232, .45); outline-offset: 2px; }
.hidden { display: none !important; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--navy);
}
.login-card {
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border-radius: 16px;
  padding: 28px;
}
.login-card h1 { margin: 16px 0 4px; }
.login-card p { margin: 0 0 16px; color: var(--muted); }
.login-card label, #user-form label { display: block; font-size: 13px; margin: 12px 0 6px; }
.login-card input, #user-form input, #user-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.login-card button { margin-top: 14px; width: 100%; }
.error { color: var(--red); min-height: 1.2em; }
#user-error:empty { display: none; margin: 0; min-height: 0; }

html, body { height: 100%; }
.shell { display: flex; height: 100vh; overflow: hidden; }
.side {
  width: 240px;
  height: 100vh;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand { padding: 20px 16px 12px; }
.brand img { height: 32px; display: block; }
.brand span { display: block; margin-top: 10px; font-size: 13px; opacity: .75; }
.side nav { display: flex; flex-direction: column; padding: 8px; gap: 4px; }
.side nav button {
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
}
.side nav button.active, .side nav button:hover { background: rgba(255,255,255,.12); }
.side-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.section-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 12px 14px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
}
.section-switch a {
  text-align: center;
  text-decoration: none;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 4px;
  border-radius: 9px;
}
.section-switch a.active {
  background: #fff;
  color: var(--navy);
}
.section-switch a:hover:not(.active) { color: #fff; }
.brand-switch {
  display: inline-flex;
  margin-left: 16px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.brand-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.brand-switch button.active { background: var(--navy); color: #fff; }
.side-user { padding: 4px 8px 8px; font-size: 13px; color: rgba(255,255,255,.65); }
.logout {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.88);
  text-align: left;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.logout::before { content: "↪"; opacity: .8; }
.logout:hover, .logout:focus { background: rgba(255,255,255,.12); color: #fff; outline: none; }
.logout:active { background: rgba(255,255,255,.2); }
.main { flex: 1; min-width: 0; min-height: 0; height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.mode-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: #eef3fb;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
}
.mode-pill.on { color: #0d5c32; background: #e5f6ec; border-color: #9ed4b0; }
.mode-pill.off { color: #6b7280; background: #f3f4f6; border-color: #e5e7eb; }
.mode-pill.dry { color: #8a5a00; background: #fff6e5; border-color: #f0d29a; }
.content { padding: 24px; }

.now-card { margin-top: 12px; }
.now-card h2 { margin: 0 0 14px; }
.sending-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #f7f9fd 0%, #fff 70%);
}
.sending-panel.on {
  border-color: #b7e0c5;
  background: linear-gradient(135deg, #eef9f2 0%, #fff 65%);
}
.sending-panel.off {
  border-color: #e5e7eb;
  background: linear-gradient(135deg, #f6f7f9 0%, #fff 65%);
}
.sending-copy { min-width: 0; }
.sending-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.sending-panel.on .sending-kicker { color: #1f8a4c; }
.sending-panel.off .sending-kicker { color: #6b7280; }
.sending-copy strong {
  display: block;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 4px;
}
.sending-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.sending-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.switch.disabled { cursor: default; opacity: .7; }
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.switch-track {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cfd8e6;
  border: 1px solid #b8c5d8;
  position: relative;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: inset 0 1px 2px rgba(16, 40, 79, .08);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 40, 79, .22);
  transition: transform .18s ease;
}
.switch input:checked + .switch-track {
  background: #2f9d5c;
  border-color: #248a4d;
  box-shadow: inset 0 1px 2px rgba(16, 80, 40, .12);
}
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track {
  outline: 2px solid rgba(47, 111, 232, .45);
  outline-offset: 2px;
}
.switch-caption {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}
.sending-panel.on .switch-caption { color: #176b3a; }
.now-meta { margin: 12px 0 0; }

.toasts {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(16, 40, 79, .14);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  animation: toast-in .2s ease;
  border-left: 3px solid var(--blue);
}
.toast.ok { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast.bad { border-left-color: var(--red); }
.toast-out { animation: toast-out .18s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px); }
}
.confirm-card .confirm-text {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.confirm-actions .ghost,
.confirm-actions .primary {
  min-width: 110px;
  width: auto;
  margin-top: 0;
}
.confirm-actions .primary.danger {
  background: var(--red);
  box-shadow: none;
}
@media (max-width: 640px) {
  .sending-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .sending-control { align-items: flex-start; }
}

.hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.hero h1 { margin: 0 0 6px; font-size: 22px; color: var(--navy); }
.hero p { margin: 0; color: var(--muted); }
.period-wrap { position: relative; }
.pills button.pill-excel { color: var(--navy); }
.pills button.pill-excel:hover { color: var(--blue); }
.range-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: min(320px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(16, 40, 79, .16);
  animation: rise .16s ease;
}
.range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.range-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.range-fields input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font-weight: 500;
}
.range-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.range-actions .ghost,
.range-actions .primary {
  min-width: 96px;
  margin-top: 0;
  width: auto;
}
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button, .ghost, .primary, .line-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
}
.line-btn {
  background: #fff;
  color: var(--navy);
  border: 1px solid #d5e0f0;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(16, 40, 79, .04);
}
.line-btn:hover { background: #f4f7fb; border-color: #c5d4ea; }
.line-unfreeze {
  color: var(--green);
  border-color: #c6e6d2;
  background: #f3faf6;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
}
.line-unfreeze:hover { background: #e7f6ec; border-color: #9ed4b0; color: #176b3a; }
.user-del { color: var(--red); border-color: #f3d0d0; }
.user-del:hover { background: #fff5f5; }
.pills {
  background: #eef3fb;
  padding: 4px;
  border-radius: 999px;
  gap: 2px;
}
.pills button { background: transparent; color: var(--muted); font-weight: 600; }
.pills button:hover { color: var(--ink); }
.pills button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(16, 40, 79, .12); }
.primary {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(47, 111, 232, .28);
}
.primary:hover { background: #245fdb; }
.ghost { background: #eef3fb; color: var(--ink); }
.danger { background: #fdecec; color: var(--red); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  font-weight: 600;
}
.choice button:hover { border-color: #b9ccee; }
.choice button.active {
  border-color: var(--blue);
  background: #eef4ff;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.modal-card .access-group {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.modal-card .access-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.modal-card .access-group .access-row + .access-row { border-top: 1px solid var(--line); }
.modal-card .access-row:hover { background: #f7faff; }
.modal-card .access-row:has(input:checked) { background: #f3f7ff; }
.modal-card .access-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.modal-card .tick {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #c5d4e8;
  background: #fff;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
}
.modal-card .access-row:has(input:checked) .tick {
  background: var(--blue);
  border-color: var(--blue);
}
.modal-card .tick svg {
  display: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal-card .access-row:has(input:checked) .tick svg { display: block; }
#user-form label.access-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0 12px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
#user-form label.access-row .tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#user-form label.access-row .access-name {
  display: block;
  flex: 1;
  margin: 0;
  line-height: 1.2;
}
.field-label { display: block; font-size: 13px; margin: 12px 0 6px; color: var(--ink); }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.kpi, .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16, 40, 79, .04);
}
.kpi b { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
.kpi span, .note { color: var(--muted); font-size: 13px; }
.kpi.accent b { color: var(--blue); }
.kpi.good b { color: var(--green); }
.kpi.tg b { color: #229ed9; }
.kpi.bad b { color: var(--red); }

.spend-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-top: 10px; }
.spend { margin-top: 0; }
.status-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pick {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit;
}
.status-pick b { font-size: 14px; }
.status-pick.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.spend-note { margin: 8px 2px 0; }
.spend-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spend-row b { display: block; font-size: 22px; letter-spacing: -0.03em; color: var(--navy); }
.spend-row span { color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr); gap: 10px; margin-top: 10px; align-items: start; }
.grid2 > *, .kpis, .kpi, .card, .hero { min-width: 0; max-width: 100%; }
.card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.bars {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 176px;
  border-bottom: 1px solid var(--line);
  padding-top: 28px;
  overflow: visible;
}
.bar-col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 6px;
}
.bar-stack {
  width: 84%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 120px;
}
.bar {
  position: relative;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  border-radius: 4px 4px 1px 1px;
  min-height: 0;
  transition: filter .12s ease;
}
.bar.empty {
  background: transparent !important;
  pointer-events: none;
}
.bar.email { background: var(--blue); }
.bar.waba { background: var(--green); }
.bar.telegram { background: #229ed9; }
.bar.closed { background: #b7c3d6; }
.bar:not(.empty):hover { filter: brightness(.9); }
.bar-col small {
  display: block;
  height: 16px;
  line-height: 16px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}
.chart-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 5;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: #16356e;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(16, 40, 79, .2);
  pointer-events: none;
}
.bar:hover .chart-tip { display: block; }
.chart-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #16356e;
}
.legend { display: flex; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.email { background: var(--blue); }
.dot.waba { background: var(--green); }
.dot.telegram { background: #229ed9; }
.dot.closed { background: #b7c3d6; }

.split { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr.click { cursor: pointer; }
tr.click:hover { background: #f7faff; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef3fb;
  font-size: 12px;
}
.tag.good { background: #e5f6ec; color: #0d5c32; }
.tag.warn { background: #fff4e5; color: var(--amber); }
.tag.bad { background: #fdecec; color: var(--red); }

.review-cell { width: 72px; }
.review {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.review-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.review-btn:hover { background: #f7faff; color: var(--ink); }
.review-btn.yes.on { background: #e5f6ec; border-color: #b7e4c7; color: #0d5c32; }
.review-btn.no.on { background: #fdecec; border-color: #f5c2c2; color: var(--red); }

.toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-wrap { position: relative; flex: 1; }
.toolbar input, .search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 36px 10px 12px;
  background: #fff;
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}
.search-clear:hover { background: #eef3fb; color: var(--ink); }
.search-clear:active { transform: translateY(-50%) scale(0.92); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.pager-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  min-width: 36px;
  padding: 6px 10px;
  cursor: pointer;
}
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-gap { color: var(--muted); padding: 6px 2px; }
.pager-note { margin: 12px 0 0; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow: auto;
}
.modal:not(.hidden) { animation: fade .16s ease; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 40, 79, .4); }
.modal-card {
  position: relative;
  width: min(440px, calc(100% - 32px));
  margin: 0;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 4px 22px 18px;
  box-shadow: 0 24px 60px rgba(16, 40, 79, .22);
  animation: rise .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 4px;
}
.modal-card header button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.modal-card label { display: block; font-size: 13px; margin: 10px 0 4px; }
.modal-card input, .modal-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
}
.modal-card .primary { width: 100%; margin-top: 12px; }
#new-role { display: none; }

.drawer { position: fixed; inset: 0; z-index: 20; }
.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 40, 79, .35);
  opacity: 0;
  transition: opacity .22s ease;
}
.drawer.show .backdrop { opacity: 1; }
.panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(28px);
  transition: transform .24s cubic-bezier(.2, .7, .2, 1);
  box-shadow: -12px 0 32px rgba(16, 40, 79, .12);
}
.drawer.show .panel { transform: translateX(0); }
.panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel header button {
  border: 0;
  background: #f4f7fb;
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
}
.panel header button:hover { background: #e7eef8; }
#drawer-body { padding: 18px; overflow: auto; }
.meta { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; margin-bottom: 16px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.bubble {
  background: #eef4ff;
  border: 1px solid #d5e3fb;
  border-radius: 14px 14px 4px 14px;
  padding: 12px 14px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.recent { margin-top: 12px; }
a { color: var(--blue); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; height: auto; overflow: visible; }
  .side { width: 100%; height: auto; flex-direction: row; align-items: center; }
  .main { height: auto; }
  .side nav { flex-direction: row; flex: 1; }
  .brand span, .logout { display: none; }
  .kpis, .spend-row { grid-template-columns: 1fr 1fr; }
  .spend-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
}
