@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f7f5f2;
  --surface: #fffefc;
  --surface-soft: #f3f0ec;
  --surface-warm: #fff8f4;
  --sidebar: #191918;
  --sidebar-soft: #252523;
  --text: #191918;
  --text-secondary: #6f6b67;
  --text-muted: #96918c;
  --line: #e8e2dc;
  --line-strong: #d9d1c9;
  --accent: #ff4b38;
  --accent-dark: #d93627;
  --accent-soft: #fff0eb;
  --success: #367a46;
  --success-soft: #edf7ef;
  --warning: #a36419;
  --warning-soft: #fff5e6;
  --danger: #be352d;
  --danger-soft: #fff0ee;
  --info: #356c9f;
  --info-soft: #edf5fb;
  --shadow: 0 18px 55px rgba(76, 59, 46, .12);
  --sidebar-width: 242px;
  --topbar-height: 76px;
  --context-width: 318px;
  --radius: 14px;
  --radius-small: 9px;
  font-family: "Manrope", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { background: var(--page); color: var(--text); overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.is-hidden { display: none !important; }

/* Phosphor uses a font glyph inside ::before. Normalizing both boxes keeps
   every icon optically centered in cards, controls and compact mobile rows. */
.ph {
  width: 1em;
  height: 1em;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  line-height: 1;
  vertical-align: middle;
}
.ph::before { display: block; line-height: 1; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(255, 75, 56, .28);
  outline-offset: 2px;
}

.loading-view,
.login-view {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.loading-view { gap: 20px; align-content: center; }
.loading-logo { width: 178px; user-select: none; -webkit-user-drag: none; }
.loading-track { width: 180px; height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.loading-track span {
  display: block;
  width: 46%;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  animation: loading 1.1s ease-in-out infinite alternate;
}
@keyframes loading { from { transform: translateX(-15%); } to { transform: translateX(135%); } }

.login-view {
  grid-template-columns: minmax(280px, 460px) minmax(360px, 480px);
  gap: 9vw;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 75, 56, .11), transparent 25%),
    linear-gradient(135deg, #f7f5f2, #fffefa);
}
.login-brand { align-self: center; }
.login-brand img { width: 260px; display: block; user-select: none; -webkit-user-drag: none; }
.login-brand > span { display: block; width: 44px; height: 2px; margin: 28px 0 20px; background: var(--accent); }
.login-brand strong { display: block; font-size: 22px; font-weight: 650; }
.login-card {
  width: 100%;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 252, .94);
  box-shadow: var(--shadow);
}
.login-heading { margin-bottom: 28px; }
.login-heading p { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 750; }
.login-heading h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.04em; }
.login-heading span { color: var(--text-secondary); font-size: 14px; }

.field { display: grid; gap: 8px; margin-bottom: 17px; color: var(--text-secondary); font-size: 13px; font-weight: 650; }
.field input,
.field textarea,
.field select,
.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 56, .11);
  outline: none;
}
.password-field { position: relative; display: block; }
.password-field input { padding-right: 46px; }
.password-field .icon-button { position: absolute; top: 4px; right: 4px; }
.remember-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
}
.remember-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-error {
  margin: 0 0 16px;
  padding: 11px 12px;
  border-radius: var(--radius-small);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.button,
.icon-button,
.profile-button,
.date-button {
  border: 0;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.button:active,
.icon-button:active,
.profile-button:active,
.date-button:active { transform: scale(.98); }
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.button-ghost { background: transparent; color: var(--text-secondary); }
.button-ghost:hover { background: var(--surface-soft); color: var(--text); }
.button-danger { background: var(--danger-soft); color: var(--danger); }
.button-small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button-full { width: 100%; }
.terminal-group-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--text-secondary);
  font-size: 19px;
}
.icon-button:hover { background: var(--surface-soft); color: var(--text); }

.app-shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
.sidebar {
  position: relative;
  z-index: 40;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  overflow: hidden;
  background: var(--sidebar);
  color: #f5f3ef;
}
.sidebar-brand { display: flex; align-items: center; min-height: 44px; padding: 2px 9px 17px; }
.sidebar-brand img {
  width: 116px;
  filter: brightness(0) invert(1);
  user-select: none;
  -webkit-user-drag: none;
}
.main-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #403e3b transparent;
}
.nav-group-label {
  display: block;
  padding: 14px 12px 7px;
  color: #77736e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aaa7a2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 580;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.nav-item i { width: 18px; font-size: 17px; text-align: center; }
.nav-item:hover { background: #242321; color: #fff; }
.nav-item.is-active { background: rgba(255, 75, 56, .17); color: #ff7b6d; }
.nav-item.is-disabled { opacity: .48; }
.nav-item .external { margin-left: auto; font-size: 13px; }
.sidebar-bottom { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid #302f2d; }
.restaurant-picker { display: grid; gap: 7px; }
.restaurant-picker label { color: #77736e; font-size: 10px; font-weight: 720; }
.select-dark { position: relative; display: flex; align-items: center; }
.select-dark > i { position: absolute; left: 10px; z-index: 1; color: #9b9893; }
.select-dark select {
  width: 100%;
  height: 40px;
  padding: 7px 26px 7px 32px;
  border: 1px solid #393735;
  border-radius: 8px;
  background: #222220;
  color: #efede9;
  font-size: 11px;
  appearance: none;
}
.sidebar-add {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed #46433f;
  border-radius: 8px;
  background: transparent;
  color: #aaa7a2;
  cursor: pointer;
  font-size: 10px;
}
.sidebar-add:hover { color: #fff; border-color: #7b746d; }
.plan-card {
  padding: 11px;
  border: 1px solid rgba(255, 75, 56, .48);
  border-radius: 9px;
  background: rgba(255, 75, 56, .07);
}
.plan-card strong { display: block; margin-bottom: 3px; font-size: 11px; }
.plan-card span { color: #9d9994; font-size: 9px; }
.plan-card .plan-paid { color: #63c879; font-weight: 750; }
.plan-card button {
  float: right;
  margin-top: -23px;
  border: 0;
  background: transparent;
  color: #ff7769;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.workspace { min-width: 0; height: 100dvh; display: grid; grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.topbar {
  position: relative;
  z-index: 25;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 242, .92);
  backdrop-filter: blur(15px);
}
.page-heading { min-width: 0; margin-right: auto; }
.page-heading h1 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.page-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.date-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
}
.profile-wrap { position: relative; }
.profile-button {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 5px;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 680;
}
.profile-button:hover { background: var(--surface-soft); }
.profile-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
}
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 208px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.profile-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}
.profile-menu button:hover { background: var(--surface-soft); }
.profile-menu .danger { color: var(--danger); }
.mobile-menu { display: none; }

.content-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}
.main-content {
  min-width: 0;
  overflow: auto;
  padding: 24px 28px 40px;
  scroll-behavior: smooth;
}

.page-stack { width: 100%; min-width: 0; display: grid; gap: 18px; max-width: 1420px; margin: 0 auto; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}
.metric-card,
.panel,
.empty-state,
.action-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.metric-card { min-height: 112px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 15px; align-items: center; padding: 18px; }
.metric-card > .metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.metric-card > div > strong { display: block; margin-top: 3px; font-size: 21px; letter-spacing: -.035em; }
.metric-card > div > span { display: block; color: var(--text-muted); font-size: 10px; }
.metric-card > div > small { color: var(--success); font-size: 9px; font-weight: 750; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .85fr); gap: 14px; }
.panel { overflow: hidden; }
.panel-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.restaurant-logo img { width: 100%; height: 100%; object-fit: cover; }
.point-list { display: grid; }
.point-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr) auto 34px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.point-row:last-child { border-bottom: 0; }
.point-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 19px; }
.point-flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.compact-empty { min-height: 250px; border: 0; }
.notice-card { display: flex; align-items: flex-start; gap: 15px; padding: 16px 18px; border: 1px solid #cfe1ef; border-radius: var(--radius); background: var(--info-soft); }
.notice-card > i { color: var(--info); font-size: 23px; }
.notice-card strong { display: block; margin-bottom: 4px; font-size: 12px; }
.notice-card p { margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.55; }
.zone-row { display: grid; grid-template-columns: 18px minmax(260px, 1fr) auto 32px 32px; }
.zone-swatch { width: 13px; height: 42px; border-radius: 5px; background: var(--zone-color); }
.danger-action { color: var(--danger); }
.category-accordion-list { width: 100%; min-width: 0; max-width: 100%; display: grid; overflow: hidden; }
.category-accordion { width: 100%; min-width: 0; max-width: 100%; border-bottom: 1px solid var(--line); }
.category-accordion:last-child { border-bottom: 0; }
.category-accordion summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; cursor: pointer; list-style: none; background: var(--surface); font-size: 11px; }
.category-accordion summary::-webkit-details-marker { display: none; }
.category-accordion summary > span { display: flex; align-items: center; gap: 9px; }
.category-accordion summary > span:last-child { color: var(--text-muted); }
.category-accordion summary i { transition: transform .18s ease; }
.category-accordion[open] summary i { transform: rotate(90deg); }
.category-accordion .product-cell .muted { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-tabs { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); justify-self: start; }
.section-tabs a { padding: 8px 12px; border-radius: 7px; color: var(--text-secondary); font-size: 10px; font-weight: 750; }
.section-tabs a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.banner-admin-list { display: grid; gap: 9px; }
.banner-admin-card { min-height: 76px; display: grid; grid-template-columns: 120px minmax(180px,1fr) auto 34px 34px; align-items: center; gap: 12px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.banner-admin-preview { width: 120px; aspect-ratio: 16 / 5; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: var(--banner-bg); color: #fff; }
.banner-admin-card.vertical .banner-admin-preview { width: 52px; aspect-ratio: 3 / 4; justify-self: center; }
.banner-admin-preview img { width: 100%; height: 100%; object-fit: cover; }
.banner-admin-copy { min-width: 0; display: grid; gap: 3px; }
.banner-admin-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.banner-admin-copy span { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.empty-inline { padding: 25px; color: var(--text-muted); text-align: center; font-size: 11px; }
.promotion-actions { display: flex; gap: 6px; margin-top: 12px; }
.site-setting-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.brand-assets, .asset-upload-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.brand-asset { min-height: 110px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--accent); font-size: 33px; overflow: hidden; }
.brand-asset img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; }
.brand-asset small { color: var(--text-muted); font-size: 9px; }
.form-hint { margin: 0; padding: 12px; border-radius: 8px; background: var(--surface-soft); color: var(--text-secondary); font-size: 10px; line-height: 1.6; }
.panel-header > div { min-width: 0; margin-right: auto; }
.panel-header h2 { margin: 0; font-size: 14px; }
.panel-header p { margin: 3px 0 0; color: var(--text-muted); font-size: 10px; }
.panel-body { padding: 17px; }
.panel-body-flush { padding: 0; }
.panel-footer { padding: 11px 17px; border-top: 1px solid var(--line); background: #fcfaf7; }

.chart-wrap { min-height: 240px; display: grid; align-items: end; }
.chart {
  width: 100%;
  min-height: 220px;
  overflow: visible;
}
.chart-grid-line { stroke: #eee8e2; stroke-width: 1; }
.chart-area { fill: url("#chartFill"); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart-label { fill: var(--text-muted); font-size: 9px; font-family: Manrope, sans-serif; }
.bar-chart { height: 220px; display: flex; align-items: end; gap: 10px; padding-top: 16px; }
.bar-column { min-width: 0; flex: 1; display: grid; gap: 6px; justify-items: center; }
.bar-column span {
  width: min(34px, 75%);
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--accent), #ff887b);
}
.bar-column small { color: var(--text-muted); font-size: 9px; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.category-accordion .table-wrap { display: block; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.category-accordion .data-table { min-width: 880px; }
.category-accordion .data-table th:first-child,
.category-accordion .data-table td:first-child { min-width: 310px; }
.data-table th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: #fcfaf7;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 11px 13px; border-bottom: 1px solid #f0ebe6; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdf9f6; }
.data-table .name-cell { font-weight: 690; }
.data-table .muted { color: var(--text-muted); }
.table-action {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  color: var(--text-secondary);
}
.table-action:hover { background: var(--surface-soft); color: var(--text); }

.status,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 730;
  white-space: nowrap;
}
.status-success { background: var(--success-soft); color: var(--success); }
.status-warning { background: var(--warning-soft); color: var(--warning); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.status-info { background: var(--info-soft); color: var(--info); }
.status-accent { background: var(--accent-soft); color: var(--accent-dark); }

.credential-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.credential-note i { font-size: 22px; }
.credential-note div { display: grid; gap: 2px; }
.credential-note span { color: var(--text-muted); font-size: 12px; }
.credential-note.is-ready { border-color: rgba(41, 157, 100, .28); background: var(--success-soft); color: var(--success); }
.credential-note.is-warning { border-color: rgba(213, 148, 27, .28); background: var(--warning-soft); color: var(--warning); }

.list-stack { display: grid; }
.list-row { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 18px;
}
.list-copy { min-width: 0; flex: 1; }
.list-copy strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-copy span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; }

.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 42px;
  text-align: center;
}
.empty-state > div { max-width: 420px; }
.empty-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.empty-state p { margin: 0 auto 18px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }

.onboarding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.action-card { display: flex; align-items: center; gap: 16px; padding: 18px; }
.action-card i { font-size: 24px; color: var(--accent); }
.action-card div { min-width: 0; flex: 1; }
.action-card strong { display: block; font-size: 12px; }
.action-card span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; line-height: 1.45; }

.home-page { gap: 22px; }
.home-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.home-actions::-webkit-scrollbar,
.home-news-track::-webkit-scrollbar,
.knowledge-track::-webkit-scrollbar { display: none; }
.home-action-button {
  min-width: 190px;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 9px 13px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}
.home-action-button > i:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--action-color, var(--accent)) 11%, white);
  color: var(--action-color, var(--accent));
  font-size: 17px;
}
.home-action-button > span { overflow: hidden; font-size: 11px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.home-action-button > i:last-child { color: var(--text-muted); font-size: 15px; }
.home-action-button:hover { border-color: rgba(255,75,56,.42); }
.home-content-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.home-section-heading {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.home-section-heading > div { min-width: 0; flex: 1; }
.home-section-heading span { display: block; margin-bottom: 4px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.home-section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.home-section-heading > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 19px;
}
.home-news-track,
.knowledge-track {
  display: flex;
  gap: 12px;
  padding: 16px 18px 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.home-news-card {
  position: relative;
  min-height: 205px;
  flex: 0 0 min(355px, 78vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg,#201f1d,#34312e);
  color: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}
.home-news-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.home-news-card > *:not(.home-news-image) { position: relative; z-index: 2; }
.home-news-card.has-image::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,18,17,.9), rgba(20,18,17,.38));
}
.home-news-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-news-card.tone-2 { background: linear-gradient(145deg,#a83429,#ff5a45); }
.home-news-card.tone-3 { background: linear-gradient(145deg,#3f3028,#7b5843); }
.home-news-date { color: rgba(255,255,255,.68); font-size: 9px; }
.home-news-card > strong { max-width: 280px; margin-top: 21px; font-size: 18px; line-height: 1.2; letter-spacing: -.03em; }
.home-news-card > p { max-width: 295px; margin: 8px 0 16px; color: rgba(255,255,255,.74); font-size: 10px; line-height: 1.55; }
.home-card-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-size: 10px; font-weight: 780; }
.knowledge-button {
  min-height: 84px;
  flex: 0 0 min(330px, 78vw);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}
.knowledge-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.knowledge-button > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.knowledge-button strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-button small { display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: 9px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.knowledge-button > i { color: var(--text-muted); }
.knowledge-button:hover { border-color: rgba(255,75,56,.42); }
.home-article-body { display: grid; gap: 18px; color: var(--text-secondary); }
.home-article-body img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; }
.home-article-body .button { justify-self: start; }
.home-article-body p { margin: 0; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.billing-documents { display: grid; }
.billing-document { min-height: 72px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.billing-document:last-child { border-bottom: 0; }
.billing-document > i { color: var(--text-muted); font-size: 17px; }
.billing-document[href]:hover .list-copy strong { color: var(--accent-dark); }
.billing-document-status { padding: 6px 9px; border-radius: 999px; background: color-mix(in srgb, var(--document-status) 11%, white); color: var(--document-status); font-size: 9px; font-weight: 800; white-space: nowrap; }
.plan-card .plan-awaiting-payment, .plan-card .plan-overdue { color: #f0a54a; }
.plan-card .plan-paused, .plan-card .plan-cancelled { color: #ff7769; }
.billing-empty { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--text-secondary); font-size: 11px; text-align: center; }
.billing-empty .empty-icon { margin: 0 0 4px; }

@media (max-width: 720px) {
  .billing-document { grid-template-columns: 38px minmax(0,1fr); }
  .billing-document-status, .billing-document .button { grid-column: 2; justify-self: start; }
}

.context-title { margin-bottom: 16px; }
.context-title h2 { margin: 0; font-size: 14px; }
.context-title p { margin: 5px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
.context-section { padding: 15px 0; border-top: 1px solid var(--line); }
.context-section h3 { margin: 0 0 10px; font-size: 10px; }
.context-nav { display: grid; gap: 5px; }
.context-nav button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}
.context-nav button:hover,
.context-nav button.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.context-stat { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 10px; }
.context-stat span { color: var(--text-muted); }
.context-stat strong { text-align: right; }
.progress-row { margin-top: 11px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-secondary); font-size: 9px; }
.progress-line { height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.review-list { display: grid; gap: 10px; }
.review-card { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.review-head { display: flex; gap: 13px; align-items: center; }
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 800;
}
.review-head div { flex: 1; min-width: 0; }
.review-head strong { display: block; font-size: 11px; }
.review-head span { color: var(--text-muted); font-size: 9px; }
.stars { color: #e6a327; letter-spacing: 1px; font-size: 11px; }
.review-card p { margin: 12px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.review-reply { margin-top: 12px; padding: 11px; border-radius: 9px; background: var(--surface-soft); font-size: 10px; line-height: 1.5; }
.review-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.review-actions:empty { display: none; }

.heatmap { display: grid; grid-template-columns: 72px repeat(6, minmax(46px, 1fr)); gap: 5px; align-items: center; }
.heatmap-label { color: var(--text-muted); font-size: 9px; }
.heatmap-cell {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 75, 56, calc(.05 + var(--load) * .007));
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
}

.restaurant-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 17px; align-items: center; padding: 18px; }
.restaurant-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
}
.restaurant-card h2 { margin: 0 0 4px; font-size: 15px; }
.restaurant-card p { margin: 0; color: var(--text-muted); font-size: 10px; }

.product-cell { display: flex; align-items: center; gap: 13px; }
.product-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface-soft);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-muted); font-size: 18px; }
.product-cell > div { min-width: 0; display: grid; justify-items: start; gap: 3px; }
.variant-membership {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 420px;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popular-product-mark { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 3px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); font-size: 8px; font-weight: 800; vertical-align: middle; }
.variant-group-list { display: grid; gap: 8px; }
.variant-group-card {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto 32px;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.variant-group-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 18px; }
.variant-group-copy { min-width: 0; display: grid; gap: 7px; }
.variant-group-copy > strong { font-size: 11px; }
.variant-chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.variant-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; background: var(--surface-soft); font-size: 8px; }
.variant-chip b { font-weight: 750; }
.variant-chip small { color: var(--text-muted); font-size: inherit; }
.variant-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; font-size: 10px; }
.variant-picker-head span { color: var(--text-muted); }
.variant-product-picker { display: grid; gap: 7px; }
.variant-product-row {
  display: grid;
  grid-template-columns: minmax(230px,1.2fr) minmax(150px,.8fr) 76px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.variant-product-row.is-selected { border-color: rgba(255,75,56,.42); background: var(--accent-soft); }
.variant-product-check { min-width: 0; display: grid; grid-template-columns: 18px 42px minmax(0,1fr); align-items: center; gap: 9px; cursor: pointer; }
.variant-product-check > input, .variant-primary input { accent-color: var(--accent); }
.variant-product-check span { min-width: 0; display: grid; gap: 3px; }
.variant-product-check strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.variant-product-check small { color: var(--text-muted); font-size: 8px; }
.variant-label-field { margin: 0; }
.variant-label-field span { font-size: 8px; }
.variant-label-field input { min-height: 34px; padding: 8px 9px; }
.variant-primary { display: grid; justify-items: center; gap: 4px; color: var(--text-muted); font-size: 8px; cursor: pointer; }
.variant-primary input { width: 17px; height: 17px; }

.promotion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.promotion-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.promotion-cover {
  min-height: 100px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 78% 15%, rgba(255,255,255,.42), transparent 28%),
    linear-gradient(135deg, var(--accent), #ff887b);
  color: #fff;
  font-size: 26px;
}
.promotion-body { padding: 14px; }
.promotion-body h3 { margin: 0 0 5px; font-size: 12px; }
.promotion-body p { margin: 0 0 11px; min-height: 30px; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.promotion-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

.site-builder { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(420px, 1.28fr); gap: 14px; }
.site-template-field { display: grid; gap: 9px; margin-bottom: 16px; }
.site-template-field > span { color: var(--text-muted); font-size: 10px; font-weight: 750; }
.site-template-grid { display: grid; grid-template-columns: repeat(5,minmax(82px,1fr)); gap: 8px; }
.site-template-option { min-width: 0; display: grid; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.site-template-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,75,56,.1); }
.site-template-option input { position: absolute; opacity: 0; pointer-events: none; }
.site-template-option > strong { overflow: hidden; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.site-template-preview { height: 58px; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: 1.7fr 1fr; gap: 3px; padding: 6px; overflow: hidden; border-radius: 7px; background: #f4f1ed; }
.site-template-preview i { display: block; border-radius: 3px; background: #fff; }
.site-template-preview i:first-child { grid-column: 1/-1; background: #252321; }
.site-template-option.standard-2 .site-template-preview { background: #fffdf7; }
.site-template-option.standard-2 .site-template-preview i:first-child { background: #21201e; box-shadow: inset 0 -5px #f3b91e; }
.site-template-option.standard-3 .site-template-preview { background: #fff; }
.site-template-option.standard-3 .site-template-preview i:first-child { background: #f3c7a8; }
.site-template-option.standard-3 .site-template-preview i { border: 1px solid #f36b2c; }
.site-template-option.black .site-template-preview { background: #121313; }
.site-template-option.black .site-template-preview i:first-child { background: #262421; box-shadow: inset 0 -6px #ef3f25; }
.site-template-option.black .site-template-preview i { background: #252525; }
.site-template-option.premium .site-template-preview { background: #edf5f8; }
.site-template-option.premium .site-template-preview i:first-child { background: #d5e5ec; box-shadow: inset 0 -5px #ef6b5c; }
.site-template-option.premium .site-template-preview i { background: #fff; }
.site-controls { padding: 16px; }
.site-preview-shell { padding: 10px; background: #e9e5df; }
.preview-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 12px; }
.preview-toolbar div { display: grid; gap: 2px; }
.preview-toolbar strong { font-size: 10px; }
.preview-toolbar span { color: var(--text-muted); font-size: 8px; }
.preview-toolbar a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: #fff; }
.live-site-preview { width: 100%; height: 610px; display: block; border: 0; border-radius: 11px; background: #fff; box-shadow: 0 8px 25px rgba(63,48,38,.13); }
.site-preview {
  min-height: 520px;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(63, 48, 38, .13);
}
.site-preview-head { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 0 18px; border-bottom: 1px solid #eee; }
.site-preview-logo { font-size: 14px; font-weight: 800; }
.site-preview-head nav { margin-left: auto; display: flex; gap: 14px; color: #777; font-size: 8px; }
.site-preview-cart { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; }
.site-preview-hero { min-height: 135px; display: flex; align-items: end; padding: 20px; background: linear-gradient(120deg, #20201f, #4c423a); color: #fff; }
.site-preview-hero h3 { max-width: 280px; margin: 0; font-size: 21px; line-height: 1.05; }
.site-preview-categories { display: flex; gap: 7px; padding: 14px 16px; overflow: hidden; }
.site-preview-categories span { padding: 6px 9px; border-radius: 7px; background: #f4f1ed; font-size: 7px; white-space: nowrap; }
.site-preview-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px 18px; }
.site-preview-product { min-width: 0; }
.site-preview-product div { aspect-ratio: 1.18; border-radius: 8px; background: #f1eee9; overflow: hidden; }
.site-preview-product img { width: 100%; height: 100%; object-fit: cover; }
.site-preview-product strong { display: block; margin-top: 6px; font-size: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.site-preview-product span { color: var(--accent); font-size: 7px; font-weight: 800; }

.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.integration-card { min-height: 155px; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.integration-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-soft); color: var(--accent); font-size: 21px; font-weight: 800; }
.integration-card h3 { margin: 12px 0 4px; font-size: 12px; }
.integration-card p { margin: 0 0 14px; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.integration-card footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.notification-channel-status { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.notification-channel { margin-bottom: 13px; padding: 0 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.notification-channel .field { margin-bottom: 0; }

.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.settings-tabs { padding: 12px; border-right: 1px solid var(--line); }
.settings-tabs button {
  width: 100%;
  min-height: 38px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}
.settings-tabs button.is-active,
.settings-tabs button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.settings-form { padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
.form-section { margin-bottom: 20px; }
.form-section h3 { margin: 0 0 12px; font-size: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row div strong { display: block; font-size: 10px; }
.switch-row div span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.switch-row.is-disabled { opacity: .62; }
.working-hours-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 13px; }
.branch-schedule {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.branch-schedule + .branch-schedule { margin-top: 10px; }
.branch-schedule > summary {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}
.branch-schedule > summary::-webkit-details-marker { display: none; }
.branch-schedule-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.branch-schedule-title > span:last-child { min-width: 0; display: grid; gap: 3px; }
.branch-schedule-title strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.branch-schedule-title small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.branch-schedule-state { display: flex; align-items: center; gap: 8px; }
.branch-schedule-state > .ph { color: var(--text-muted); transition: transform .18s ease; }
.branch-schedule[open] .branch-schedule-state > .ph { transform: rotate(180deg); }
.branch-schedule > .working-hours-grid { padding: 14px 14px 0; border-top: 1px solid var(--line); background: #fcfaf7; }
.manual-stop-row { color: var(--danger); }
.call-center-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.call-center-card { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.call-center-card > header { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.call-center-card > header > div { min-width: 0; }
.call-center-card h3 { margin: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.call-center-card header div > span { display: block; margin-top: 3px; overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.call-center-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 19px; }
.call-center-meta { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 9px; }
.call-center-meta > span:first-child { color: var(--text-muted); }
.call-center-restaurants { display: flex; flex-wrap: wrap; gap: 5px; }
.call-center-restaurants > span { padding: 5px 7px; border-radius: 7px; background: var(--surface-soft); color: var(--text-secondary); font-size: 8px; font-weight: 700; }
.call-center-empty { margin: 0; color: var(--text-muted); font-size: 9px; }
.call-center-card > footer { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 2px; }
.call-center-picker { display: grid; gap: 6px; max-height: 290px; overflow: auto; }
.call-center-picker > label { min-height: 52px; display: flex; align-items: center; gap: 13px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.call-center-picker input { width: 17px; height: 17px; accent-color: var(--accent); }
.call-center-picker span { min-width: 0; display: grid; gap: 3px; }
.call-center-picker strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.call-center-picker small { color: var(--text-muted); font-size: 8px; }
.sticky-save { position: sticky; z-index: 4; bottom: 0; display: flex; justify-content: flex-end; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.load-point-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.load-point-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px 0; }
.load-point-card > header > div { display: flex; align-items: center; gap: 12px; }
.load-point-card h2 { margin: 0; font-size: 12px; }
.availability-details { position: relative; width: max-content; }
.availability-details > summary { cursor: pointer; list-style: none; }
.availability-details > summary::-webkit-details-marker { display: none; }
.availability-popover { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; width: 260px; display: none; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 16px 40px rgba(39,31,25,.16); }
.availability-details[open] .availability-popover, .availability-details:hover .availability-popover { display: grid; }
.availability-popover > span { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 1px 7px; align-items: center; padding: 7px; border-radius: 7px; }
.availability-popover > span:hover { background: var(--surface-soft); }
.availability-popover i { grid-row: 1 / 3; font-size: 17px; color: var(--green); }
.availability-popover .ph-x-circle { color: var(--red); }
.availability-popover strong { font-size: 9px; }
.availability-popover small { color: var(--text-muted); font-size: 8px; }

.analytics-page { gap: 16px; }
.analytics-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  overflow: visible;
}
.analytics-filters > .field { width: 170px; margin: 0; }
.analytics-filters > .button { margin-left: auto; }
.analytics-filter-scope {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 4px;
}
.analytics-filter-scope > div { min-width: 0; display: grid; gap: 3px; }
.analytics-filter-scope small { color: var(--text-muted); font-size: 9px; }
.analytics-filter-scope strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-scope-icon,
.analytics-kpi-icon {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 19px;
}
.analytics-custom-dates { display: flex; gap: 10px; }
.analytics-custom-dates > .field { width: 150px; margin: 0; }
.analytics-kpi-grid { display: grid; gap: 10px; }
.analytics-kpi-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-kpi-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-kpi {
  position: relative;
  min-width: 0;
  min-height: 108px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.analytics-kpi-copy { min-width: 0; display: grid; gap: 3px; }
.analytics-kpi-copy > span { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-kpi-copy > strong { overflow: hidden; font-size: 19px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.analytics-kpi-copy > small { color: var(--text-muted); font-size: 8px; }
.analytics-change {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 760;
}
.analytics-change.is-up { background: var(--success-soft); color: var(--success); }
.analytics-change.is-down { background: var(--danger-soft); color: var(--danger); }
.analytics-change.is-flat { background: var(--surface-soft); color: var(--text-muted); }
.analytics-chart-panel { overflow: hidden; }
.analytics-metric-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.analytics-metric-switch button {
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 9px;
  font-weight: 730;
}
.analytics-metric-switch button.is-active { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 4px rgba(45, 34, 26, .08); }
.analytics-chart-summary { display: flex; align-items: center; gap: 28px; padding: 17px 18px 0; }
.analytics-chart-summary > div { display: grid; grid-template-columns: 9px auto; gap: 2px 7px; align-items: center; }
.analytics-chart-summary small { color: var(--text-muted); font-size: 8px; }
.analytics-chart-summary strong { grid-column: 2; font-size: 16px; }
.analytics-chart-summary > .analytics-change { position: static; margin-left: auto; }
.analytics-legend-dot { width: 8px; height: 8px; grid-row: 1 / 3; border-radius: 99px; background: var(--accent); }
.analytics-legend-dot.is-previous { background: #a8a39e; }
.analytics-chart-scroll { width: 100%; min-width: 0; overflow-x: auto; padding: 4px 10px 8px; }
.analytics-chart { width: 100%; min-width: 650px; height: auto; display: block; }
.analytics-chart-grid { stroke: #ede8e2; stroke-width: 1; }
.analytics-chart-axis { fill: var(--text-muted); font: 8px Manrope, sans-serif; }
.analytics-chart-area { fill: url("#analyticsAreaFill"); }
.analytics-chart-current { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.analytics-chart-previous { fill: none; stroke: #a8a39e; stroke-width: 1.7; stroke-dasharray: 5 5; stroke-linecap: round; stroke-linejoin: round; }
.analytics-chart-point { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.analytics-highlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.analytics-highlight { min-height: 86px; display: flex; align-items: center; gap: 15px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, var(--surface), var(--surface-warm)); }
.analytics-highlight > span { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 19px; }
.analytics-highlight > div { min-width: 0; display: grid; gap: 3px; }
.analytics-highlight small { color: var(--text-muted); font-size: 8px; }
.analytics-highlight strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-highlight em { min-height: 12px; color: var(--text-secondary); font-size: 8px; font-style: normal; }
.analytics-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.analytics-bars { display: grid; gap: 13px; }
.analytics-bar { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 6px 10px; align-items: center; }
.analytics-bar > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
.analytics-bar span, .analytics-bar strong { font-size: 9px; }
.analytics-bar strong { font-weight: 700; }
.analytics-bar-track { height: 6px; display: block; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.analytics-bar-track i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff8578); }
.analytics-bar small { color: var(--text-muted); font-size: 8px; text-align: right; }
.analytics-empty { min-height: 90px; display: grid; place-items: center; padding: 22px; color: var(--text-muted); font-size: 10px; text-align: center; }
.analytics-table-wrap { overscroll-behavior-inline: contain; }
.analytics-table { min-width: 640px; }
.analytics-page > .panel:last-child .analytics-table { min-width: 1050px; }
.analytics-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: inherit; white-space: nowrap; }
.analytics-sort i { opacity: .36; font-size: 10px; }
.analytics-sort.is-active { color: var(--accent-dark); }
.analytics-sort.is-active i { opacity: 1; }
.analytics-cell-note { display: block; margin-top: 3px; color: var(--text-muted); font-size: 8px; font-weight: 500; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 22, 20, .48);
  backdrop-filter: blur(4px);
}
.modal {
  position: fixed;
  z-index: 90;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(40, 31, 25, .28);
}
.modal-header { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-header > div { min-width: 0; flex: 1; }
.modal-header h2 { margin: 0; font-size: 16px; }
.modal-header p { margin: 4px 0 0; color: var(--text-muted); font-size: 10px; }
.modal-body { overflow-y: auto; padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.5;
  animation: toast-in .2s ease-out;
}
.toast i { margin-top: 1px; color: var(--success); font-size: 17px; }
.toast.is-error i { color: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.skeleton {
  min-height: 16px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(90deg, #eee9e3, #faf7f3, #eee9e3);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.sidebar-backdrop { display: none; }

@media (max-width: 1240px) {
  :root { --context-width: 278px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .analytics-kpi-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-builder { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .context-panel { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .site-setting-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  body { overflow: hidden; }
  .login-view { grid-template-columns: 1fr; gap: 28px; }
  .login-brand { text-align: center; }
  .login-brand img { width: 190px; margin: 0 auto; }
  .login-brand > span { margin: 20px auto 14px; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(292px, calc(100vw - 48px));
    transform: translateX(-102%);
    transition: transform .22s cubic-bezier(.16, 1, .3, 1);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    border: 0;
    background: rgba(20, 19, 18, .45);
  }
  .workspace { height: 100dvh; }
  .topbar { padding: 0 13px; }
  .mobile-menu { display: inline-grid; }
  .date-button,
  .topbar-actions > .icon-button { display: none; }
  .profile-button > span:not(.profile-mark),
  .profile-button > .ph-caret-down { display: none; }
  .main-content { overflow-x: hidden; padding: 16px 14px 32px; }
  .page-heading h1 { font-size: 17px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { min-height: 100px; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .metric-icon { width: 34px; height: 34px; font-size: 17px; }
  .metric-card strong { font-size: 17px; }
  .home-actions { margin: 0 -14px; padding: 0 14px 3px; }
  .home-content-section { margin: 0; }
  .home-news-track, .knowledge-track { padding: 14px; }
  .home-news-card { flex-basis: min(320px, calc(100vw - 58px)); }
  .knowledge-button { flex-basis: min(310px, calc(100vw - 58px)); }
  .onboarding-grid,
  .promotion-grid,
  .integration-grid,
  .call-center-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .working-hours-grid, .load-point-grid { grid-template-columns: 1fr; }
  .analytics-filters { align-items: stretch; flex-wrap: wrap; }
  .analytics-filter-scope { width: 100%; }
  .analytics-filters > .field { width: calc(50% - 6px); }
  .analytics-custom-dates { width: 100%; }
  .analytics-custom-dates > .field { width: 50%; }
  .analytics-filters > .button { width: 100%; margin-left: 0; }
  .analytics-kpi-primary, .analytics-kpi-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-two-column { grid-template-columns: 1fr; }
  .analytics-chart-panel .panel-header { align-items: flex-start; flex-wrap: wrap; }
  .analytics-metric-switch { width: 100%; overflow-x: auto; }
  .analytics-metric-switch button { flex: 1 0 auto; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-tabs button { width: auto; white-space: nowrap; }
  .heatmap { grid-template-columns: 58px repeat(6, minmax(34px, 1fr)); gap: 3px; }
  .heatmap-cell { min-height: 38px; }
  .site-preview-products { grid-template-columns: repeat(2, 1fr); }
  .point-row { grid-template-columns: 40px minmax(0,1fr) 34px; }
  .point-flags { grid-column: 2 / -1; justify-content: flex-start; }
  .banner-admin-card { grid-template-columns: 76px minmax(0,1fr) 32px 32px; }
  .banner-admin-preview { width: 76px; }
  .banner-admin-card > .status { grid-column: 2 / -1; justify-self: start; }
  .variant-product-row { grid-template-columns: minmax(0,1fr) 120px 66px; }
  .analytics-table-wrap { overflow-x: scroll; touch-action: pan-x pan-y; }
  .category-accordion .table-wrap { overflow-x: scroll; touch-action: pan-x pan-y; }
  .category-accordion .table-wrap::-webkit-scrollbar { height: 5px; }
  .category-accordion .table-wrap::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--line-strong); }
}

@media (max-width: 520px) {
  .login-view { padding: 18px; }
  .login-card { padding: 24px 20px; }
  .login-brand { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 92px; padding: 13px; }
  .analytics-highlight-grid { grid-template-columns: 1fr; }
  .analytics-kpi { min-height: 102px; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 12px; }
  .analytics-kpi-icon { width: 34px; height: 34px; font-size: 16px; }
  .analytics-kpi-copy > strong { font-size: 16px; }
  .analytics-chart-summary { gap: 14px; flex-wrap: wrap; }
  .analytics-chart-summary > .analytics-change { margin-left: 0; }
  .panel-header { align-items: flex-start; flex-wrap: wrap; }
  .panel-header .button { width: 100%; }
  .restaurant-card { grid-template-columns: 44px 1fr; }
  .restaurant-card > .button { grid-column: 1 / -1; }
  .site-preview, .live-site-preview { min-height: 420px; height: 70dvh; }
  .site-template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .modal-actions { display: grid; }
  .home-section-heading { min-height: 66px; padding: 13px 14px; }
  .home-section-heading h2 { font-size: 16px; }
  .home-news-card { min-height: 190px; padding: 17px; }
  .home-news-card > strong { margin-top: 17px; font-size: 17px; }
  .home-action-button { min-width: 176px; }
  .variant-group-card { grid-template-columns: 38px minmax(0,1fr) 32px; }
  .variant-group-card > .button { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .variant-product-row { grid-template-columns: minmax(0,1fr) 58px; }
  .variant-label-field { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .analytics-kpi-primary, .analytics-kpi-secondary { grid-template-columns: 1fr; }
  .analytics-kpi { min-height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
