@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bd-bg: #f3eeea;
  --bd-bg-soft: #f8f5f1;
  --bd-surface: #ffffff;
  --bd-surface-muted: #faf9f7;
  --bd-text-primary: #20201e;
  --bd-text-secondary: #77746f;
  --bd-text-tertiary: #9a9791;
  --bd-border: rgba(32, 32, 30, 0.08);
  --bd-border-strong: rgba(32, 32, 30, 0.14);
  --bd-lime: #d8f260;
  --bd-lime-hover: #c8e94e;
  --bd-lime-text: #253000;
  --bd-lavender: #e4d9fa;
  --bd-mint: #cfeedb;
  --bd-peach: #f4cbb9;
  --bd-sky: #ceddf7;
  --bd-yellow: #f3e8a7;
  --bd-cream: #f0e7d7;
  --bd-success: #6fae80;
  --bd-warning: #d49b47;
  --bd-danger: #d66f70;
  --bd-info: #779dd3;
  --bd-radius-sm: 10px;
  --bd-radius-md: 14px;
  --bd-radius-lg: 18px;
  --bd-radius-xl: 24px;
  --bd-shadow-card: 0 2px 12px rgba(49, 43, 35, 0.04);
  --bd-shadow-floating: 0 14px 36px rgba(49, 43, 35, 0.08);

  --bg: var(--bd-bg);
  --bg-elev: var(--bd-surface);
  --bg-soft: var(--bd-bg-soft);
  --line: var(--bd-border);
  --text: var(--bd-text-primary);
  --muted: var(--bd-text-secondary);
  --accent: var(--bd-lime);
  --accent-2: var(--bd-cream);
  --danger: var(--bd-danger);
  --ok: var(--bd-success);
  --warn: var(--bd-warning);
  --shadow: var(--bd-shadow-floating);
  --radius: var(--bd-radius-lg);
  --tab: 64px;
  --fs: 15px;
  --fs-sm: 13px;
  --fs-xs: 12px;
  --fs-lg: 20px;
  --fs-xl: 28px;
  --title: 17px;
  --sidebar-w: 236px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bd-bg: #0e1210;
  --bd-bg-soft: #151a17;
  --bd-surface: #1b211d;
  --bd-surface-muted: #141915;
  --bd-text-primary: #eef3ea;
  --bd-text-secondary: #9aa89a;
  --bd-text-tertiary: #6f7b70;
  --bd-border: rgba(216, 242, 96, 0.08);
  --bd-border-strong: rgba(238, 243, 234, 0.14);
  --bd-lime: #d8f260;
  --bd-lime-hover: #e4ff7a;
  --bd-lime-text: #1a2200;
  --bd-lavender: #3a3350;
  --bd-mint: #24382c;
  --bd-peach: #3d2c28;
  --bd-sky: #243344;
  --bd-yellow: #35301c;
  --bd-cream: #2a2e24;
  --bd-shadow-card: 0 2px 16px rgba(0, 0, 0, 0.28);
  --bd-shadow-floating: 0 16px 40px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bd-bg);
  color: var(--bd-text-primary);
  font-family: "Manrope", "Inter", "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs);
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: var(--fs); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: var(--fs-sm); }
.fine { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.error { color: var(--danger); min-height: 1.2em; font-size: var(--fs-sm); }

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: var(--bd-bg);
}
.login-card {
  width: min(400px, 100%);
  background: var(--bd-surface);
  border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius-xl);
  padding: 32px 24px 24px;
  box-shadow: var(--bd-shadow-card);
  text-align: center;
}
h1 { font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.03em; }
.pin-dots { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.pin-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--bd-border-strong);
}
.pin-dots span.on { background: var(--bd-lime); border-color: var(--bd-lime); }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 16px;
}
.pin-pad button {
  height: 56px; min-height: 44px; border-radius: var(--bd-radius-md);
  border: 1px solid var(--bd-border);
  background: var(--bd-bg-soft);
  color: var(--text);
  font-size: 20px; font-weight: 600;
}

.app {
  min-height: 100dvh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "top" "main";
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
  width: 100%;
}
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
  min-height: calc(56px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--bd-border);
  background: color-mix(in srgb, var(--bd-surface) 88%, transparent);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 5;
}
.topbar strong { font-size: 13px; letter-spacing: 0.04em; font-weight: 700; }
#page-title { font-size: 13px; margin-left: 8px; color: var(--muted); font-weight: 500; }
.top-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.sidebar { display: none !important; }
.content {
  grid-area: main;
  padding: 20px 20px calc(var(--tab) + 12px + env(safe-area-inset-bottom));
  max-width: 1120px;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
}
.tabbar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: calc(var(--tab) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bd-surface) 94%, transparent);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--bd-border);
  padding: 6px 8px env(safe-area-inset-bottom, 0px);
  gap: 4px;
  z-index: 20;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: flex-start;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .nav-btn {
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 600;
  gap: 2px;
  padding: 6px 10px;
  width: auto;
  min-width: 72px;
  min-height: 52px;
  border-radius: 12px;
}
.tabbar .nav-btn span { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar .nav-btn svg { width: 20px; height: 20px; }
.brand {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px 18px; text-decoration: none; color: inherit;
}
.brand b { font-size: 18px; font-weight: 800; letter-spacing: -0.04em; }
.brand span { font-size: 12px; color: var(--muted); font-weight: 500; }
#sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.nav-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  min-height: 44px;
  border: 0; background: transparent; color: var(--text);
  border-radius: var(--bd-radius-md); text-align: left; cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: background 180ms ease, transform 100ms ease;
}
.nav-btn:hover { background: var(--bd-bg-soft); }
.nav-btn.active { background: var(--bd-lime); color: var(--bd-lime-text); }
.nav-btn:focus-visible { outline: 2px solid var(--bd-lime-text); outline-offset: 2px; }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; margin: 0; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 0 8px; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips label { margin: 0; flex: 0 0 auto; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bd-surface); border: 1px solid var(--bd-border); cursor: pointer;
}
.chips input:checked + span { background: var(--bd-lime); color: var(--bd-lime-text); border-color: transparent; }

.kpi-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi {
  border-radius: var(--bd-radius-lg);
  padding: 18px;
  border: 1px solid var(--bd-border);
  box-shadow: var(--bd-shadow-card);
  min-width: 0;
  animation: card-in 200ms ease both;
}
.kpi h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--bd-text-secondary); }
.kpi .num { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; margin-top: 6px; }
.kpi.hero .num { font-size: 40px; }
.kpi p { margin: 6px 0 0; font-size: 12px; color: var(--bd-text-secondary); }
.tone-peach { background: var(--bd-peach); border-color: transparent; }
.tone-mint { background: var(--bd-mint); border-color: transparent; }
.tone-yellow { background: var(--bd-yellow); border-color: transparent; }
.tone-sky { background: var(--bd-sky); border-color: transparent; }
.tone-lavender { background: var(--bd-lavender); border-color: transparent; }
.tone-cream { background: var(--bd-cream); border-color: transparent; }
.tone-white { background: var(--bd-surface); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.card, .acc {
  background: var(--bd-surface);
  border: 1px solid var(--bd-border);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
  box-shadow: var(--bd-shadow-card);
}
.card h3, .acc summary {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--text);
  font-weight: 700;
}
.acc { padding: 0; overflow: hidden; }
.acc summary {
  list-style: none; cursor: pointer; padding: 16px 18px; margin: 0;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "▾"; color: var(--muted); }
.acc[open] summary::after { content: "▴"; }
.acc .acc-body { padding: 0 18px 18px; }
.card .num { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.split-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; align-items: start; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover { background: var(--bg-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(32,32,30,0.08); }
.dot.green { background: #cfeedb; }
.dot.yellow { background: #f3e8a7; }
.dot.red { background: #f4cbb9; }
html[data-theme="dark"] .dot.green { background: #6fae80; }
html[data-theme="dark"] .dot.yellow { background: #d49b47; }
html[data-theme="dark"] .dot.red { background: #d66f70; }

.btn, .text-btn, .icon-btn {
  cursor: pointer; border-radius: var(--bd-radius-md); border: 1px solid var(--bd-border);
  background: var(--bd-surface); color: var(--text); font-weight: 600;
  transition: transform 100ms ease, background 180ms ease, box-shadow 180ms ease;
}
.btn:hover, .icon-btn:hover { box-shadow: var(--bd-shadow-card); }
.btn:active, .icon-btn:active { transform: scale(0.98); }
.btn:focus-visible, .icon-btn:focus-visible, .nav-btn:focus-visible { outline: 2px solid var(--bd-lime-text); outline-offset: 2px; }
.btn { padding: 10px 16px; font-size: var(--fs-sm); min-height: 44px; }
.btn.primary { background: var(--bd-lime); color: var(--bd-lime-text); border: 0; }
.btn.primary:hover { background: var(--bd-lime-hover); }
.btn.ghost { width: 100%; padding: 12px; background: transparent; }
.btn.tiny { padding: 8px 12px; font-size: var(--fs-xs); min-height: 36px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; }
.text-btn { padding: 8px 12px; background: transparent; font-size: var(--fs-sm); min-height: 44px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: stretch; }
.row > * { min-width: 0; }
.seg {
  display: flex; flex-wrap: wrap; gap: 6px; background: var(--bd-bg-soft);
  padding: 4px; border-radius: 14px; border: 1px solid var(--bd-border);
}
.seg label { margin: 0; }
.seg input { display: none; }
.seg span {
  display: inline-block; padding: 8px 12px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.seg input:checked + span { background: var(--bd-lime); color: var(--bd-lime-text); }
input, textarea, select {
  width: 100%;
  background: var(--bd-bg-soft);
  color: var(--text);
  border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius-md);
  padding: 11px 12px;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid color-mix(in srgb, var(--bd-lime) 70%, transparent);
  border-color: transparent;
}
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: var(--fs-xs); color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.switch { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: var(--fs-sm); min-height: 44px; }
.switch input { width: 18px; height: 18px; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: min(92%, 520px);
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.bubble.admin { align-self: flex-end; background: var(--bd-mint); }
.progress {
  height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden;
}
.progress > i { display: block; height: 100%; width: 0; background: var(--bd-lime); }
.toast {
  position: fixed; bottom: calc(var(--tab) + env(safe-area-inset-bottom) + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--bd-surface); border: 1px solid var(--bd-border);
  padding: 12px 16px; border-radius: 14px; z-index: 20;
  font-size: var(--fs-sm); max-width: 90%;
  box-shadow: var(--bd-shadow-floating);
  animation: card-in 180ms ease both;
}
.chart { display: flex; align-items: flex-end; gap: 4px; height: 88px; margin-top: 8px; }
.chart b { flex: 1; background: var(--bd-peach); border-radius: 4px 4px 0 0; min-height: 2px; }
.tg-phone {
  width: min(340px, 100%);
  margin: 8px auto 0;
  background: #1e1e1e;
  border-radius: 36px;
  padding: 10px 10px 16px;
  box-shadow: var(--bd-shadow-card);
  border: 3px solid #2c2c2c;
}
.tg-notch {
  width: 108px; height: 22px; margin: 4px auto 8px;
  background: #111; border-radius: 16px;
}
.tg-head {
  background: #17212b; color: #fff; border-radius: 12px 12px 0 0;
  padding: 10px 12px 8px; text-align: center; font-size: 14px; font-weight: 600;
}
.tg-head span { display: block; font-size: 11px; color: #8b9aab; font-weight: 500; }
.tg-chat {
  background: #0e1621; min-height: 220px; padding: 12px 10px 14px;
  border-radius: 0 0 12px 12px;
}
.tg-in {
  max-width: 88%; background: #182533; color: #e8f0f8;
  border-radius: 12px 12px 12px 4px; padding: 8px 10px;
  font-size: 14px; line-height: 1.4; white-space: pre-wrap;
}
.tg-kb { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.tg-kb button {
  width: 100%; border: 0; background: #182533; color: #6ab2f2;
  border-radius: 8px; padding: 9px 10px; font-size: 14px; font-weight: 500;
}
.overlay {
  position: fixed; inset: 0; background: rgba(32, 32, 30, 0.35); z-index: 30;
  display: grid; place-items: end center; padding: 0;
}
.overlay.center { place-items: center; padding: 16px; }
.overlay.hidden { display: none !important; }
.sheet {
  width: min(480px, 100%);
  background: var(--bd-surface);
  border-radius: 24px 24px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: var(--bd-shadow-floating);
  animation: sheet-in 220ms ease both;
}
.sheet h3 { margin: 8px 12px 12px; }
.audience { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.aud-row {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  font-size: var(--fs-sm); min-height: 44px;
}
.aud-row.is-blocked { opacity: 0.55; }
.aud-row input { width: 18px; height: 18px; }
.native-set {
  background: var(--bd-bg-soft);
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
}
.native-set .seg { margin: 8px 10px 12px; border: 0; background: var(--bd-surface); }
.native-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs);
  font-weight: 600;
  min-height: 44px;
}
.native-row:last-child { border-bottom: 0; }
.native-row .step { width: 88px; text-align: center; margin: 0; padding: 8px; }
.ios-switch {
  position: relative; width: 36px; height: 22px; margin: 2px 0 0;
  flex-shrink: 0; display: block;
}
.ios-switch input { opacity: 0; width: 36px; height: 22px; margin: 0; position: absolute; inset: 0; cursor: pointer; z-index: 1; }
.ios-switch i {
  position: absolute; inset: 0; background: #d4d0c8; border-radius: 99px; transition: .2s; pointer-events: none;
}
html[data-theme="dark"] .ios-switch i { background: #39393d; }
.ios-switch i::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.ios-switch input:checked + i { background: var(--ok); }
.ios-switch input:checked + i::after { transform: translateX(14px); }
.content, .table td, .card, .acc { overflow-wrap: anywhere; }
select { max-width: 100%; }
.overlay .card { width: min(440px, 100%); max-height: 90dvh; overflow: auto; }

.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bell-wrap { position: relative; }
.bell-dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--bg-elev);
}
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 86vw);
  max-height: min(70dvh, 480px); overflow: auto; z-index: 12;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 8px;
}
.bell-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: inherit; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: inherit;
  min-height: 44px;
}
.bell-item.unread { background: var(--bg-soft); }
.bell-item b { display: block; font-size: var(--fs-sm); }
.bell-item span { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.nset-label {
  font-size: var(--fs-xs); color: var(--muted); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 16px 2px 8px;
}
.nr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 1px; }
.nr-text b { font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -0.02em; }
.nr-text span { font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 400; }
.n-rest.is-off { opacity: 0.38; pointer-events: none; }
.quiet-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 14px 14px; }
.quiet-times label { margin-top: 0; }
.quiet-times input { padding: 8px 10px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; cursor: pointer;
  min-height: 112px; margin: 8px 0; padding: 18px 14px;
  border: 1.5px dashed color-mix(in srgb, var(--bd-text-primary) 18%, var(--bd-border));
  border-radius: 16px; background: var(--bd-bg-soft);
}
.dropzone.over { border-style: solid; background: var(--bd-cream); }
.dropzone b { font-size: var(--fs-sm); }
.dz-ico { font-size: 22px; line-height: 1; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 8px 12px; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--line); color: var(--bd-lime-text); font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none;
}
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px;
  align-items: center; padding: 14px 16px;
  background: var(--bd-bg-soft); border: 1px solid var(--bd-border); border-radius: 16px;
}
.item-card.is-open { align-items: stretch; }
.item-card .item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prod-card { grid-template-columns: minmax(0, 1fr) auto; }
.prod-price {
  font-size: 22px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--text);
}
.prod-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.icon-action {
  width: 40px; height: 40px; min-height: 40px; padding: 0;
  display: grid; place-items: center; border-radius: 12px;
}
.icon-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-bar > * { flex: 1 1 140px; min-width: 0; }
.card-editor { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--bd-border); }
.add-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; border: 1.5px dashed var(--bd-border-strong);
  background: transparent; color: var(--text); font-weight: 700;
}
.sla-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 12px; }
.sla-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.revenue-card { background: var(--bd-peach); border-color: transparent; }
.revenue-card h3 { color: var(--text); }
.revenue-card .num { font-size: 32px; }
.form-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; background: var(--bg-soft); margin-bottom: 10px;
  font-size: var(--fs-sm); font-weight: 600;
}
.empty {
  text-align: center; padding: 28px 16px; color: var(--muted);
}
.skel {
  height: 88px; border-radius: var(--bd-radius-lg);
  background: linear-gradient(90deg, var(--bd-bg-soft), var(--bd-cream), var(--bd-bg-soft));
  background-size: 200% 100%;
  animation: skel 1.2s ease infinite;
}
.tg-live { position: sticky; top: 72px; }

@keyframes page-in { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0.5; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (hover: hover) {
  .card:hover, .kpi:hover { box-shadow: var(--bd-shadow-floating); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-hero { grid-template-columns: 1fr 1fr; }
  .split-2 { grid-template-columns: 1fr; }
  .tg-live { position: static; }
}

@media (max-width: 860px) {
  .content { padding: 16px 16px calc(var(--tab) + 10px + env(safe-area-inset-bottom)); }
  .row .btn { flex: 1 1 140px; }
  .topbar strong { display: none; }
  #page-title { display: block; margin-left: 0; font-size: 18px; font-weight: 700; color: var(--text); }
  .topbar > div:first-child { min-width: 0; }
  .bell-panel { right: -8px; }
  .page-head h1 { font-size: 24px; }
  .kpi-hero, .kpi-grid { grid-template-columns: 1fr; }
  .kpi.hero .num { font-size: 34px; }
  h1 { font-size: 24px; }
}
