:root {
  --bg: #111111;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --ink: #f7faf8;
  --muted: #9aa6a0;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #0FA958;
  --accent-strong: #18d978;
  --accent-soft: rgba(15, 169, 88, 0.16);
  --green: #0FA958;
  --green-soft: rgba(15, 169, 88, 0.16);
  --amber: #f4b64a;
  --amber-soft: rgba(244, 182, 74, 0.15);
  --red: #ff5f6d;
  --red-soft: rgba(255, 95, 109, 0.15);
  --blue: #65a7ff;
  --blue-soft: rgba(101, 167, 255, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --glow: 0 0 36px rgba(15, 169, 88, 0.22);
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-color: rgba(15, 169, 88, 0.55) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(17, 17, 17, 0.9);
  border-radius: 999px;
  background: rgba(15, 169, 88, 0.58);
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: #111111;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(15, 169, 88, 0.82);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: #111111;
}

.login-panel,
.card,
.modal-panel,
.store-profile,
.sidebar-note,
.row,
.pipeline-column,
.lead-card,
.mini-metric,
.mini-stock,
.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.login-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.login-brand {
  margin-bottom: 26px;
}

.login-product {
  display: grid;
  gap: 10px;
  margin: -8px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.login-product h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-product p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-hint {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-form,
.demo-logins,
.auth-switch {
  display: grid;
  gap: 12px;
}

.demo-logins {
  margin-top: 18px;
}

.auth-switch {
  margin-top: 12px;
}

.form-error,
.form-success {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.form-error {
  color: var(--red);
}

.form-success {
  color: var(--accent-strong);
}

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(15, 169, 88, 0.34);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(20, 24, 22, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 800;
}

.app-toast.error {
  border-color: rgba(255, 95, 109, 0.48);
  color: #ffd7dc;
}

.app-toast.success {
  color: var(--accent-strong);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  overflow: auto;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(28px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(15, 169, 88, 0.42);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 169, 88, 0.95), rgba(15, 169, 88, 0.38));
  color: #ffffff;
  font-size: 19px;
  font-weight: 950;
  box-shadow: var(--glow);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.card h3,
.row p,
.row strong {
  margin: 0;
}

.brand h1 {
  font-size: 23px;
  font-weight: 850;
}

.brand p,
.topbar p,
.card p,
.muted,
.store-profile p,
.sidebar-note p {
  color: var(--muted);
}

.brand p {
  margin-top: 4px;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(15, 169, 88, 0.32);
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 169, 88, 0.16), rgba(255, 255, 255, 0.055));
}

.sidebar-note p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.store-profile {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.store-profile small {
  color: var(--accent-strong);
  font-weight: 850;
}

.store-profile strong {
  font-size: 18px;
}

.store-profile p {
  font-size: 13px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 34px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(22px);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.topbar h2 {
  font-size: 34px;
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button,
.channel-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  border-color: rgba(15, 169, 88, 0.58);
  background: linear-gradient(135deg, #0FA958, #13c96b);
  color: #03140b;
  box-shadow: var(--glow);
}

.ghost-button,
.channel-button,
.icon-button {
  background: rgba(255, 255, 255, 0.06);
}

.danger-button {
  border-color: rgba(255, 95, 109, 0.38);
  background: var(--red-soft);
  color: #ffd7dc;
}

.primary-button:hover,
.ghost-button:hover,
.channel-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 169, 88, 0.52);
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 24px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: surfaceIn 220ms ease both;
}

@keyframes surfaceIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.kpi-grid {
  margin-top: 18px;
}

.two-column {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  margin-top: 18px;
}

.three-column {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.card {
  min-width: 0;
  padding: 20px;
}

.card h3 {
  font-size: 18px;
  font-weight: 820;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  border: 1px solid rgba(15, 169, 88, 0.24);
  border-radius: 8px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 169, 88, 0.18), rgba(255, 255, 255, 0.065));
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(28px);
}

.hero-card h3 {
  margin: 12px 0 10px;
  font-size: 38px;
  line-height: 1.05;
}

.hero-card p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(15, 169, 88, 0.42);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-orbit {
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.26);
}

.hero-orbit small,
.metric small,
.mini-metric small,
.client-kpis small,
.signal-grid small,
.cashflow-day small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.hero-orbit strong {
  font-size: 40px;
}

.hero-orbit span {
  color: var(--accent-strong);
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 31px;
  line-height: 1.05;
}

.hero-metric strong {
  font-size: 36px;
}

.executive-card {
  display: grid;
  gap: 16px;
}

.premium-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.premium-bar {
  display: grid;
  grid-template-rows: minmax(90px, 1fr) auto;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.premium-bar span {
  align-self: end;
  min-height: 8px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 24px rgba(15, 169, 88, 0.35);
}

.premium-bar small {
  font-size: 11px;
}

.signal-grid,
.client-kpis,
.compact-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signal-grid div,
.client-kpis div,
.mini-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.signal-grid strong,
.client-kpis strong,
.mini-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.segment-board {
  display: grid;
  gap: 12px;
}

.segment-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.segment-row span,
.segment-row strong {
  font-weight: 850;
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.premium-row {
  border-color: rgba(15, 169, 88, 0.2);
}

.row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(15, 169, 88, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.green {
  background: var(--green-soft);
  color: #76ffb2;
}

.badge.amber {
  border-color: rgba(244, 182, 74, 0.34);
  background: var(--amber-soft);
  color: #ffd98d;
}

.badge.red {
  border-color: rgba(255, 95, 109, 0.34);
  background: var(--red-soft);
  color: #ffb9c0;
}

.badge.blue {
  border-color: rgba(101, 167, 255, 0.34);
  background: var(--blue-soft);
  color: #b8d8ff;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input,
input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(15, 169, 88, 0.64);
  box-shadow: 0 0 0 3px rgba(15, 169, 88, 0.12);
}

select option {
  background: #111111;
  color: var(--ink);
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.client-card {
  display: grid;
  gap: 14px;
}

.premium-client {
  border-color: rgba(15, 169, 88, 0.18);
}

.client-head,
.passport-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.client-head h3 {
  margin-top: 10px;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.client-actions,
.channel-actions,
.passport-actions,
.table-actions,
.return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 0;
}

.channel-button.whatsapp {
  border-color: rgba(15, 169, 88, 0.34);
  background: var(--green-soft);
  color: #9affc2;
}

.channel-button.instagram {
  border-color: rgba(244, 182, 74, 0.28);
  background: var(--amber-soft);
  color: #ffd98d;
}

.channel-button.map {
  border-color: rgba(101, 167, 255, 0.34);
  background: var(--blue-soft);
  color: #b8d8ff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.message-box,
.telegram-preview {
  border: 1px solid rgba(15, 169, 88, 0.18);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 13px;
  background: rgba(15, 169, 88, 0.08);
  color: #dcebe3;
  line-height: 1.55;
}

.premium-message {
  background: rgba(255, 255, 255, 0.045);
}

.lost-money-card {
  border-color: rgba(255, 95, 109, 0.24);
  background: linear-gradient(180deg, rgba(255, 95, 109, 0.1), rgba(255, 255, 255, 0.045));
}

.telegram-card {
  border-color: rgba(15, 169, 88, 0.28);
  background: linear-gradient(145deg, rgba(15, 169, 88, 0.13), rgba(255, 255, 255, 0.055));
}

.telegram-preview {
  font-weight: 750;
}

.finance-command,
.delivery-map-card,
.inventory-intelligence {
  margin-top: 18px;
}

.cashflow-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.cashflow-day {
  display: grid;
  gap: 8px;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.cashflow-day p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px rgba(15, 169, 88, 0.35);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-column {
  min-width: 230px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.pipeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lead-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.lead-card + .lead-card {
  margin-top: 10px;
}

.lead-card h3,
.lead-card p {
  margin: 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 118px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.muted-day {
  opacity: 0.58;
}

.today-day {
  border-color: rgba(15, 169, 88, 0.62);
  box-shadow: inset 0 0 0 1px rgba(15, 169, 88, 0.38);
}

.calendar-event {
  margin-top: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.calendar-event.delivery {
  background: var(--blue-soft);
  color: #b8d8ff;
}

.delivery-map {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(0, 0, 0, 0.28);
  background-size: 40px 40px;
}

.map-pin {
  position: absolute;
  display: grid;
  gap: 6px;
  transform: translate(-50%, -50%);
}

.map-pin span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #03140b;
  font-weight: 950;
  box-shadow: var(--glow);
}

.map-pin small {
  width: max-content;
  max-width: 140px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.54);
  color: var(--ink);
  font-size: 11px;
}

.map-pin.done span {
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink);
}

.route-index {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #03140b;
  font-weight: 950;
}

.order-photo {
  display: block;
  width: min(220px, 100%);
  max-height: 160px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
}

.smart-stock-card.critical {
  border-color: rgba(255, 95, 109, 0.36);
}

.passport-card {
  background: linear-gradient(180deg, rgba(15, 169, 88, 0.1), rgba(255, 255, 255, 0.055));
}

.passport-hero {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.passport-hero p {
  margin-top: 4px;
}

.bloom-ai-panel {
  display: grid;
  gap: 14px;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-head {
  margin-bottom: 8px;
}

.compact-head h4 {
  margin: 0;
  font-size: 15px;
}

.order-stock-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 169, 88, 0.08);
}

.order-lines {
  display: grid;
  gap: 8px;
}

.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 8px;
}

.mini-stock {
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.mini-stock.low {
  border-color: rgba(255, 95, 109, 0.38);
}

.mini-stock p {
  margin: 6px 0 10px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal-panel h3 {
  margin: 0 52px 18px 0;
  font-size: 22px;
}

.passport-actions {
  margin: -6px 52px 16px 0;
}

.passport-history {
  margin-top: 16px;
}

.mini-table {
  min-width: 620px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .stats-grid,
  .two-column,
  .three-column,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .pipeline {
    grid-template-columns: repeat(5, minmax(230px, 260px));
  }

  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .topbar h2 {
    font-size: 29px;
  }

  .hero-card h3 {
    font-size: 30px;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions button {
    flex: 1 1 120px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .order-line,
  .row,
  .client-head,
  .signal-grid,
  .client-kpis,
  .compact-stats {
    grid-template-columns: 1fr;
  }

  .return-actions {
    justify-content: flex-start;
  }

  .calendar-day {
    min-height: 104px;
  }
}


/* Автодополнение клиента в форме заказа */
.client-ac-wrap {
  position: relative;
}

.client-ac-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card, #1e1e1e);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 999;
  max-height: 220px;
  overflow-y: auto;
}

.client-ac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--border, #2a2a2a);
}

.client-ac-item:last-child {
  border-bottom: none;
}

.client-ac-item:hover {
  background: var(--hover, #2a2a2a);
}

/* Карта доставки — Leaflet маркеры */
.map-courier-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.map-courier-pin span {
  background: #27ae60;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
  margin-top: 2px;
}

.map-base-pin {
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

#deliveryLeafletMap .leaflet-control-attribution {
  font-size: 10px;
  opacity: 0.6;
}

/* ===== Виджет таймера подписки ===== */
.sub-timer-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .2s;
  white-space: nowrap;
}
.sub-timer-widget:hover { border-color: #27ae60; }
.sub-timer-widget.warning { border-color: #f39c12; background: #1e1500; }
.sub-timer-widget.critical { border-color: #e74c3c; background: #1e0a0a; animation: subPulse 1.5s infinite; }
@keyframes subPulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.sub-timer-dot { width: 7px; height: 7px; border-radius: 50%; background: #27ae60; flex-shrink: 0; }
.sub-timer-dot.warning { background: #f39c12; }
.sub-timer-dot.critical { background: #e74c3c; }
.sub-timer-label { color: #888; }
.sub-timer-value { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .3px; }

/* ===== CSS SVG Анимированные иконки ===== */

/* Базовые SVG иконки */
.anim-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Пульсирующая зелёная точка (онлайн/активно) */
.icon-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #27ae60;
  box-shadow: 0 0 0 0 rgba(39,174,96,.4);
  animation: iconPulseAnim 1.8s ease-in-out infinite;
}
@keyframes iconPulseAnim {
  0%   { box-shadow: 0 0 0 0 rgba(39,174,96,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(39,174,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(39,174,96,0); }
}

/* Спиннер загрузки */
.icon-spin {
  width: 16px; height: 16px;
  border: 2px solid #333; border-top-color: #27ae60;
  border-radius: 50%;
  animation: iconSpinAnim .8s linear infinite;
}
@keyframes iconSpinAnim { to { transform: rotate(360deg); } }

/* Покачивание (уведомления, колокол) */
@keyframes iconRingAnim {
  0%,100% { transform: rotate(0); }
  10%,30%,50%,70%,90% { transform: rotate(-8deg); }
  20%,40%,60%,80%    { transform: rotate(8deg); }
}

/* Прыжок (новый заказ, статус) */
@keyframes iconBounceAnim {
  0%,100% { transform: translateY(0); }
  40%     { transform: translateY(-6px); }
  60%     { transform: translateY(-3px); }
}

/* Появление (fade + scale) */
@keyframes iconPopAnim {
  0%   { opacity: 0; transform: scale(.6); }
  80%  { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Плавное мигание (предупреждение) */
@keyframes iconBlinkAnim {
  0%,100% { opacity: 1; }
  50%     { opacity: .3; }
}

/* Иконка "галочка" SVG */
.svg-check {
  display: inline-block;
  width: 16px; height: 16px;
  animation: iconPopAnim .35s ease both;
}
.svg-check::before {
  content: "";
  display: block; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327ae60' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Иконка "замок" */
.svg-lock::before {
  content: "";
  display: inline-block; width: 14px; height: 14px; vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e74c3c' stroke-width='2.5' stroke-linecap='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Навигационные иконки (SVG перед текстом) */
.nav-item[data-view="dashboard"]::before  { content: ""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="orders"]::before     { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 01-8 0'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="clients"]::before    { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="delivery"]::before   { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="inventory"]::before  { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="analytics"]::before  { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="finance"]::before    { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="calendar"]::before   { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="reminders"]::before  { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 01-3.46 0'/%3E%3C/svg%3E") center/contain no-repeat; animation: iconRingAnim 3s ease-in-out infinite; }
.nav-item[data-view="pricing"]::before    { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="staff"]::before      { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat; }
.nav-item[data-view="settings"]::before   { content:""; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:middle; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z'/%3E%3C/svg%3E") center/contain no-repeat; animation: iconSpinAnim 8s linear infinite paused; }
.nav-item[data-view="settings"]:hover::before { animation-play-state: running; }

/* Статусные бейджи с иконкой */
.badge.green::before { content:""; display:inline-block; width:8px; height:8px; background:#27ae60; border-radius:50%; margin-right:5px; vertical-align:middle; animation:iconPulseAnim 2s ease-in-out infinite; }
.badge.red::before   { content:""; display:inline-block; width:8px; height:8px; background:#e74c3c; border-radius:50%; margin-right:5px; vertical-align:middle; animation:iconBlinkAnim 1.2s ease-in-out infinite; }
.badge.amber::before { content:""; display:inline-block; width:8px; height:8px; background:#f39c12; border-radius:50%; margin-right:5px; vertical-align:middle; }
.badge.blue::before  { content:""; display:inline-block; width:8px; height:8px; background:#3498db; border-radius:50%; margin-right:5px; vertical-align:middle; }

/* Анимация появления карточек */
.card { animation: cardAppear .25s ease both; }
@keyframes cardAppear {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Метрики — счётчик анимация */
.metric-value { display:block; animation: metricPop .4s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes metricPop {
  from { opacity:0; transform:scale(.7) translateY(4px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* Кнопка primary — эффект нажатия */
.primary-button:active { transform: scale(.96); }
.ghost-button:active   { transform: scale(.96); }

/* ===== CSS SVG АНИМИРОВАННЫЕ ИКОНКИ ===== */

/* Базовые SVG иконки через data-uri — встраиваются как псевдоэлементы */
:root {
  --icon-size: 18px;
}

/* ---- Анимированные бейджи статусов ---- */
.badge {
  position: relative;
  overflow: hidden;
}
.badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: badgeShine 2.5s infinite;
}
@keyframes badgeShine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Пульсирующая зелёная точка "Live" ---- */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #27ae60;
  position: relative;
  flex-shrink: 0;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #27ae60;
  animation: livePing 1.4s ease-out infinite;
}
@keyframes livePing {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ---- Анимированные nav-item иконки ---- */
.nav-item[data-view="dashboard"]::before    { content: "⌂"; }
.nav-item[data-view="clients"]::before      { content: "👤"; }
.nav-item[data-view="orders"]::before       { content: "🛍"; }
.nav-item[data-view="reminders"]::before    { content: "🔔"; }
.nav-item[data-view="loyalty"]::before      { content: "💎"; }
.nav-item[data-view="channels"]::before     { content: "📡"; }
.nav-item[data-view="returns"]::before      { content: "↩"; }
.nav-item[data-view="leads"]::before        { content: "🎯"; }
.nav-item[data-view="finance"]::before      { content: "💰"; }
.nav-item[data-view="analytics"]::before    { content: "📊"; }
.nav-item[data-view="calendar"]::before     { content: "📅"; }
.nav-item[data-view="delivery"]::before     { content: "🛵"; }
.nav-item[data-view="inventory"]::before    { content: "📦"; }
.nav-item[data-view="staff"]::before        { content: "👥"; }
.nav-item[data-view="settings"]::before     { content: "⚙"; }
.nav-item[data-view="pricing"]::before      { content: "💳"; }
.nav-item[data-view="superadmin"]::before   { content: ""; } /* уже есть ⚙️ */
.nav-item[data-view="trash"]::before        { content: "🗑"; }

.nav-item::before {
  margin-right: 6px;
  font-size: 14px;
  display: inline-block;
  transition: transform .2s ease;
}
.nav-item:hover::before {
  transform: scale(1.3) rotate(-5deg);
}
.nav-item.active::before {
  animation: navIconBounce .4s ease;
}
@keyframes navIconBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4) rotate(-8deg); }
  70%  { transform: scale(.9) rotate(4deg); }
  100% { transform: scale(1); }
}

/* ---- Анимация карточек метрик (появление) ---- */
.card {
  animation: cardFadeIn .3s ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Кнопки — ripple эффект ---- */
.primary-button, .ghost-button {
  position: relative;
  overflow: hidden;
}
.primary-button::after, .ghost-button::after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}
.primary-button:active::after, .ghost-button:active::after {
  animation: ripple .4s ease-out forwards;
}
@keyframes ripple {
  0%   { inset: 50% 50%; transform: translate(-50%,-50%) scale(0); opacity: .5; }
  100% { inset: -50%; transform: translate(0,0) scale(1); opacity: 0; }
}

/* ---- SVG иконки статусов заказов ---- */
.order-status-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.order-status-icon svg {
  flex-shrink: 0;
  animation: iconPop .3s ease both;
}
@keyframes iconPop {
  0%   { transform: scale(0) rotate(-20deg); }
  70%  { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---- Иконка нового заказа — пульс ---- */
.badge.blue { position: relative; }
.badge.blue::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid #3b82f6;
  animation: badgePulse 1.8s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.06); }
}

/* ---- Иконка склада — бокс ---- */
.inventory-icon {
  display: inline-block;
  animation: inventoryWiggle 3s ease-in-out infinite;
}
@keyframes inventoryWiggle {
  0%, 90%, 100% { transform: rotate(0); }
  92% { transform: rotate(-8deg); }
  96% { transform: rotate(8deg); }
}

/* ---- Курьер едет (карта) ---- */
.courier-riding {
  display: inline-block;
  animation: courierRide .5s ease-in-out infinite alternate;
}
@keyframes courierRide {
  from { transform: translateY(0) rotate(-2deg); }
  to   { transform: translateY(-3px) rotate(2deg); }
}

/* ---- Таймер подписки — бьющийся пульс ---- */
.sub-timer-widget .sub-timer-value {
  animation: timerTick 1s steps(1) infinite;
}
@keyframes timerTick {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .75; }
}

/* ---- Успешные тосты — появление ---- */
.toast {
  animation: toastSlide .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes toastSlide {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ---- Загрузка данных — скелетон ---- */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 6px;
  color: transparent !important;
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Фаворит/звезда — спин при добавлении ---- */
.star-icon { display: inline-block; }
.star-icon.active { animation: starSpin .4s ease both; color: #f39c12; }
@keyframes starSpin {
  0%   { transform: scale(0) rotate(-180deg); }
  70%  { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---- Уведомление — shake ---- */
.notify-shake {
  animation: shake .4s ease both;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-2deg); }
  40% { transform: translateX(6px) rotate(2deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---- Метрики дашборда — счётчик ---- */
.metric-value {
  display: inline-block;
  animation: metricCount .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes metricCount {
  from { transform: translateY(10px) scale(.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- Floating action кнопки ---- */
#addOrder, #addClient {
  animation: fabPop .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes fabPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ---- Модальное окно — появление ---- */
#modal .modal-content, #modal > div {
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes modalIn {
  from { transform: scale(.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---- View переключение ---- */
.view.active {
  animation: viewIn .2s ease both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
