/* Сильный Apple-слой. Классика в app.css не меняется.
   Киты: macOS 27 (окно, sidebar, сегмент) + iOS 27 (grouped list, liquid glass). */

html[data-ui="apple"] {
  --bg: #1c1c1e;
  --surface: rgba(44, 44, 46, 0.55);
  --surface2: rgba(58, 58, 60, 0.55);
  --border: rgba(255, 255, 255, 0.06);
  --accent: #0a84ff;
  --accent-light: #7ac8ff;
  --brand: #ff375f;
  --brand-hot: #ff2d55;
  --danger: #ff383c;
  --warning: #ffd60a;
  --text: #f5f5f7;
  --text-muted: rgba(235, 235, 245, 0.55);
  --blue: #0a84ff;
  --blue-light: #64d2ff;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --separator: rgba(255, 255, 255, 0.08);
  --fill: rgba(118, 118, 128, 0.24);
  --radius-ctrl: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-sheet: 24px;
  --press-duration: 80ms;
  --overlay-duration: 280ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

html[data-ui="apple"],
html[data-ui="apple"] body {
  font-family: var(--font);
  letter-spacing: -0.016em;
  background: #000;
}

/* Обои, чтобы стекло имело что преломлять (как wallpaper в ките) */
html[data-ui="apple"].authed body {
  background-color: #0b1020;
  background-image:
    radial-gradient(1200px 700px at 8% -10%, rgba(90, 140, 220, 0.55), transparent 58%),
    radial-gradient(900px 640px at 96% 8%, rgba(190, 90, 140, 0.38), transparent 52%),
    radial-gradient(800px 500px at 50% 110%, rgba(40, 90, 160, 0.35), transparent 55%),
    linear-gradient(180deg, #14182a 0%, #07080d 100%);
  background-attachment: fixed;
}

@media (min-width: 901px) {
  html[data-ui="apple"].authed body { padding: 14px; }
  html[data-ui="apple"].authed #app {
    height: calc(100dvh - 28px);
    max-height: calc(100dvh - 28px);
    min-height: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 30px 80px rgba(0, 0, 0, 0.55);
    background: rgba(22, 22, 26, 0.42);
    backdrop-filter: blur(48px) saturate(200%);
    -webkit-backdrop-filter: blur(48px) saturate(200%);
  }
}

/* —— Sidebar = Finder / Settings —— */
html[data-ui="apple"] .sidebar {
  width: 248px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 0.5px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  padding: 10px 10px 8px;
}

html[data-ui="apple"] .sidebar-logo {
  border-bottom: 0;
  margin: 2px 2px 10px;
  padding: 8px 8px 12px;
  gap: 10px;
}

html[data-ui="apple"] .sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
html[data-ui="apple"]:not(.portal-job) .sidebar-logo img {
  box-shadow: none;
}

html[data-ui="apple"] .sidebar-logo h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

html[data-ui="apple"] .sidebar-logo-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.7;
}

html[data-ui="apple"] .nav-group {
  background: none;
  border: 0;
  padding: 0 2px;
  margin-bottom: 16px;
}

html[data-ui="apple"] .nav-group-title {
  text-transform: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2px 10px 6px;
  color: rgba(235, 235, 245, 0.45);
}

html[data-ui="apple"] .nav-item {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 7px 10px;
  gap: 10px;
  color: rgba(245, 245, 247, 0.88);
}

html[data-ui="apple"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-ui="apple"] .nav-item.active {
  background: var(--accent);
  color: #fff;
}

html[data-ui="apple"] .nav-item.active:hover {
  background: #1a8cff;
  color: #fff;
}

html[data-ui="apple"] .nav-badge {
  border-radius: 980px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.28);
}
html[data-ui="apple"] .nav-item.active .nav-badge {
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
}

/* Эмодзи → SF Symbols Regular из Apple kit (iOS/macOS 27 Leading Accessories) */
html[data-ui="apple"] .nav-item .icon {
  font-size: 0 !important;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--glyph) center / 20px 20px no-repeat;
  mask: var(--glyph) center / 20px 20px no-repeat;
}
html[data-ui="apple"] .nav-item[data-page="analytics"] .icon { --glyph: url("/static/icons/sf/analytics.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="prices"] .icon { --glyph: url("/static/icons/sf/prices.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="promotions"] .icon { --glyph: url("/static/icons/sf/promotions.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="ads"] .icon { --glyph: url("/static/icons/sf/ads.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="unit"] .icon { --glyph: url("/static/icons/sf/unit.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="reviews"] .icon { --glyph: url("/static/icons/sf/reviews.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="chats"] .icon { --glyph: url("/static/icons/sf/chats.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="warehouse"] .icon { --glyph: url("/static/icons/sf/warehouse.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="supplies"] .icon { --glyph: url("/static/icons/sf/supplies.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="purchases"] .icon { --glyph: url("/static/icons/sf/purchases.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="nomenclature"] .icon { --glyph: url("/static/icons/sf/nomenclature.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="tariffs"] .icon { --glyph: url("/static/icons/sf/tariffs.png?v=1"); }
html[data-ui="apple"] .nav-item[data-page="settings"] .icon,
html[data-ui="apple"] .nav-item[data-page="finance"] .icon,
html[data-ui="apple"] .nav-item[data-page="guides"] .icon {
  font-size: 15px !important;
  background: none;
  -webkit-mask: none;
  mask: none;
}

html[data-ui="apple"] .sidebar-foot {
  border-top: 0.5px solid var(--separator);
  padding: 8px 2px 4px;
}

html[data-ui="apple"] .sidebar-user,
html[data-ui="apple"] .sidebar-balances {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

html[data-ui="apple"] .sidebar-balances.active,
html[data-ui="apple"] .sidebar-user:hover,
html[data-ui="apple"] .sidebar-balances:hover {
  background: rgba(255, 255, 255, 0.12);
}

html[data-ui="apple"] .user-avatar,
html[data-ui="apple"] .user-avatar.ph,
html[data-ui="apple"] .user-avatar-edit,
html[data-ui="apple"] .user-avatar-action {
  border-radius: 10px;
}

/* —— Контент: плотная панель, не сетка GitHub-карточек —— */
html[data-ui="apple"] .main {
  background: rgba(20, 20, 22, 0.72);
  padding: 0;
}

html[data-ui="apple"] .main > section {
  padding: 0 28px 48px;
}

html[data-ui="apple"] #page-dashboard {
  padding-top: 0;
  --dash-gutter: 28px;
}
html[data-ui="apple"] #page-dashboard::before {
  content: "Обзор";
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -28px 18px;
  padding: 18px 28px 14px;
  background: rgba(20, 20, 22, 0.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

html[data-ui="apple"] .page-header {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -28px 18px;
  padding: 18px 28px 14px;
  background: rgba(20, 20, 22, 0.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

html[data-ui="apple"] .page-header h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

html[data-ui="apple"] .page-header p {
  font-size: 15px;
  letter-spacing: -0.016em;
  max-width: 62ch;
}

html[data-ui="apple"] .page-help-btn {
  width: 32px;
  height: 32px;
  border-radius: 980px;
  background: var(--fill);
}

/* Виджеты KPI */
html[data-ui="apple"] .stats-grid {
  gap: 12px;
  margin-bottom: 18px;
}
html[data-ui="apple"] #dash-stats.stats-grid {
  margin-bottom: 14px;
}
html[data-ui="apple"] .stat-card {
  border: 0;
  border-radius: 22px;
  padding: 18px 20px 16px;
  background: rgba(44, 44, 46, 0.72);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
html[data-ui="apple"] #dash-stats .dash-stats-track .stat-card:hover,
html[data-ui="apple"] #dash-stats .dash-stats-track .stat-card:active,
html[data-ui="apple"] #dash-stats .dash-stats-track .stat-card:focus {
  background: rgba(44, 44, 46, 0.72);
  transform: none;
}
html[data-ui="apple"] .stat-label {
  text-transform: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}
html[data-ui="apple"] .stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
html[data-ui="apple"] .stat-value.green { color: #30d158; }
html[data-ui="apple"] .stat-econ-v.ok,
html[data-ui="apple"] .stat-trend .up,
html[data-ui="apple"] .stat-mp-net.ok { color: #30d158; }
html[data-ui="apple"] .stat-econ-v.bad,
html[data-ui="apple"] .stat-trend .down,
html[data-ui="apple"] .stat-mp-net.bad { color: #ff453a; }
html[data-ui="apple"] .stat-trend .up { background: rgba(48, 209, 88, 0.16); }
html[data-ui="apple"] .stat-trend .down { background: rgba(255, 69, 58, 0.16); }
html[data-ui="apple"] .stat-econ-cell,
html[data-ui="apple"] .stat-trend .row {
  background: rgba(255, 255, 255, 0.06);
}
html[data-ui="apple"] .stat-econ {
  background: rgba(255, 255, 255, 0.08);
}
html[data-ui="apple"] #dash-stats:not(.is-carousel) .stat-details,
html[data-ui="apple"] #dash-stats.is-carousel .stat-details {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-ui="apple"] .of-chip.of-sla.warn {
  color: #ffd60a;
  border-color: rgba(255, 214, 10, 0.45);
  background: rgba(255, 214, 10, 0.12);
}
html[data-ui="apple"] .of-chip.of-sla.danger {
  color: #ff453a;
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.12);
}
html[data-ui="apple"] .of-tile.of-sla-warn { box-shadow: inset 3px 0 0 #ffd60a; }
html[data-ui="apple"] .of-tile.of-sla-danger { box-shadow: inset 3px 0 0 #ff453a; }
html[data-ui="apple"] .of-sla-filter {
  border: 0;
  background: var(--fill);
  border-radius: 10px;
}
html[data-ui="apple"] .of-sla-filter.active {
  color: #ffd60a;
  background: rgba(255, 214, 10, 0.16);
}

html[data-ui="apple"] .fin-kpi {
  border: 0;
  border-radius: 16px;
  background: rgba(44, 44, 46, 0.62);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
html[data-ui="apple"] .fin-kpi-val { letter-spacing: -0.04em; }
html[data-ui="apple"] .fin-kpi-val.pos { color: #30d158; }
html[data-ui="apple"] .fin-kpi-val.neg { color: #ff453a; }
html[data-ui="apple"] .fin-tip {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(235, 235, 245, 0.55);
}
html[data-ui="apple"] .fin-week-badge {
  border-color: rgba(255, 214, 10, 0.45);
  color: #ffd60a;
}
html[data-ui="apple"] .finance-hist-tabs button {
  border: 0;
  background: var(--fill);
  border-radius: 8px;
  color: var(--text-muted);
}
html[data-ui="apple"] .finance-hist-tabs button.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: transparent;
}

html[data-ui="apple"] .card {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(44, 44, 46, 0.62);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  margin-bottom: 18px;
}
html[data-ui="apple"] .card-header {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--separator);
  background: rgba(255, 255, 255, 0.03);
}
html[data-ui="apple"] .card-header h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
html[data-ui="apple"] .card-body { padding: 14px 16px 18px; }

html[data-ui="apple"] .dpc-score-pct {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.05em;
}
html[data-ui="apple"] .dpc-score-pct.is-ok { color: #30d158; }
html[data-ui="apple"] .dpc-score-pct.is-zero { color: #ff453a; }
html[data-ui="apple"] .dpc-score-pct.is-mid { color: #ffd60a; }
html[data-ui="apple"] .dpc-bar {
  border-radius: 10px;
  border-width: 0.5px;
}
html[data-ui="apple"] .dpc-bar-mark { color: #30d158; }
html[data-ui="apple"] .dpc-bar.is-in { box-shadow: inset 2px 0 0 #30d158; }

html[data-ui="apple"] .dash-bottom-row {
  gap: 18px;
  margin-bottom: 18px;
}
html[data-ui="apple"] .dash-bottom-row > .card {
  margin-bottom: 0;
}
html[data-ui="apple"] .drv-kpi {
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
}
html[data-ui="apple"] .drv-kpi-val {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
}
html[data-ui="apple"] .drv-kpi-val.is-ok { color: #30d158; }
html[data-ui="apple"] .drv-kpi-val.is-mid { color: #ffd60a; }
html[data-ui="apple"] .drv-kpi-val.is-low { color: #ff453a; }
html[data-ui="apple"] .drv-star { color: #ffd60a; }
html[data-ui="apple"] .drv-bar {
  background: rgba(255, 255, 255, 0.08);
}
html[data-ui="apple"] .drv-seg.mp-wb { background: #e85ad0; }
html[data-ui="apple"] .drv-seg.mp-ozon { background: #0a84ff; }
html[data-ui="apple"] .drv-seg.mp-ym { background: #ffd60a; }
html[data-ui="apple"] .drv-leg.mp-wb i { background: #e85ad0; }
html[data-ui="apple"] .drv-leg.mp-ozon i { background: #0a84ff; }
html[data-ui="apple"] .drv-leg.mp-ym i { background: #ffd60a; }
html[data-ui="apple"] .drv-delta.is-good { color: #30d158; }
html[data-ui="apple"] .drv-delta.is-bad { color: #ff453a; }

html[data-ui="apple"] .top-articles {
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-radius: 16px;
}

html[data-ui="apple"] .login-card {
  border: 0;
  border-radius: 24px;
  background: rgba(44, 44, 46, 0.78);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}
html[data-ui="apple"] #login-screen,
html[data-ui="apple"] #account-setup-screen {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(90, 140, 220, 0.35), transparent 55%),
    #000;
}
html[data-ui="apple"] .login-logo {
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(255, 45, 85, 0.25);
}
html[data-ui="apple"]:not(.portal-job) .login-logo {
  box-shadow: none;
}
html[data-ui="apple"] .login-logo img { border-radius: 22px; }

/* Кнопки */
html[data-ui="apple"] .btn {
  border-radius: var(--radius-ctrl);
  font-weight: 600;
  letter-spacing: -0.02em;
  min-height: 32px;
}
html[data-ui="apple"] .btn-primary { background: var(--accent); color: #fff; border: 0; }
html[data-ui="apple"] .btn-primary:hover { background: #1a8cff; }
html[data-ui="apple"] .btn-secondary {
  background: var(--fill);
  border: 0;
  color: var(--text);
}

html[data-ui="apple"] .form-group label {
  font-size: 13px;
  font-weight: 600;
}
html[data-ui="apple"] .form-group input:not([type="checkbox"]):not([type="radio"]),
html[data-ui="apple"] .form-group textarea,
html[data-ui="apple"] select:not([multiple]):not([size]),
html[data-ui="apple"] .ue-toolbar input,
html[data-ui="apple"] .ue-toolbar select,
html[data-ui="apple"] .filters input,
html[data-ui="apple"] .filters select,
html[data-ui="apple"] .page-sync-interval {
  border: 0;
  border-radius: 10px;
  background-color: var(--fill);
  min-height: 36px;
}
html[data-ui="apple"] .form-group input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-ui="apple"] select:not([multiple]):not([size]):focus,
html[data-ui="apple"] .ue-toolbar input:focus,
html[data-ui="apple"] .page-sync-interval:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.28);
}

html[data-ui="apple"] .nom-mode-tabs,
html[data-ui="apple"] .seg,
html[data-ui="apple"] .orders-tabs,
html[data-ui="apple"] .chart-tabs {
  gap: 2px;
  border: 0;
  background: var(--fill);
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
}
html[data-ui="apple"] .nom-mode-tabs {
  border-bottom: 0;
  margin-bottom: 16px;
}
html[data-ui="apple"] .settings-tabs { width: 100%; }
html[data-ui="apple"] .nom-mode-tabs button,
html[data-ui="apple"] .seg button,
html[data-ui="apple"] .orders-tabs button,
html[data-ui="apple"] .chart-tabs button {
  border: 0;
  margin: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
html[data-ui="apple"] .nom-mode-tabs button.active,
html[data-ui="apple"] .seg button.active,
html[data-ui="apple"] .orders-tabs button.active,
html[data-ui="apple"] .chart-tabs button.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-bottom-color: transparent;
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

html[data-ui="apple"] .chart-tools .icon-btn,
html[data-ui="apple"] .orders-updated button {
  width: 32px;
  height: 32px;
  border-radius: 980px;
  border: 0;
  background: var(--fill);
  color: var(--text);
}

/* Таблица как grouped list */
html[data-ui="apple"] .table-scroll {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
html[data-ui="apple"] table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
html[data-ui="apple"] th {
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 0.5px solid var(--separator);
  padding: 10px 14px;
  background: transparent;
}
html[data-ui="apple"] td {
  border-bottom: 0.5px solid var(--separator);
  padding: 12px 14px;
  vertical-align: middle;
}
html[data-ui="apple"] tbody tr:last-child td { border-bottom: 0; }
html[data-ui="apple"] tbody tr:hover td { background: rgba(255, 255, 255, 0.05); }

html[data-ui="apple"] .ui-select-menu {
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(30, 30, 32, 0.86);
  backdrop-filter: blur(56px) saturate(200%);
  -webkit-backdrop-filter: blur(56px) saturate(200%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
html[data-ui="apple"] .ui-select-option.is-on {
  background: rgba(10, 132, 255, 0.28);
  color: #cfe9ff;
}
html[data-ui="apple"] .ui-select-option.is-on.is-active,
html[data-ui="apple"] .ui-select-option.is-on:hover {
  background: rgba(10, 132, 255, 0.38);
}
html[data-ui="apple"] .modal,
html[data-ui="apple"] .nom-modal,
html[data-ui="apple"] .ue-art-dropdown {
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sheet);
  background: rgba(30, 30, 32, 0.78);
  backdrop-filter: blur(56px) saturate(200%);
  -webkit-backdrop-filter: blur(56px) saturate(200%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
html[data-ui="apple"] .modal-backdrop,
html[data-ui="apple"] .nom-modal-bg {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
html[data-ui="apple"] .toast {
  border: 0;
  border-radius: 16px;
  background: rgba(30, 30, 32, 0.86);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}

html[data-ui="apple"] .ue-art-filter-btn {
  border: 0;
  border-radius: 10px;
  background: var(--fill);
}
html[data-ui="apple"] .ue-art-filter-btn.active {
  background: rgba(10, 132, 255, 0.28);
  color: #cfe9ff;
}
html[data-ui="apple"] .mp { border-radius: 7px; font-weight: 650; }

html[data-ui="apple"] .ui-theme-pick.on {
  border-color: var(--accent);
  background: rgba(10, 132, 255, 0.16);
}

html[data-ui="apple"] .ue-toolbar,
html[data-ui="apple"] .filters,
html[data-ui="apple"] .page-actions {
  gap: 8px;
}
html[data-ui="apple"] .ue-toolbar .btn-toolbar-primary,
html[data-ui="apple"] .btn-toolbar-primary {
  border: 0;
  background: var(--accent);
  color: #fff;
}
html[data-ui="apple"] .ue-toolbar-primary {
  border-left: 0.5px solid var(--separator);
}
html[data-ui="apple"] .btn:active,
html[data-ui="apple"] .nav-item:active {
  transform: scale(0.97);
}

html[data-ui="apple"] .promo-card {
  border: 0;
  border-radius: 18px;
  background: rgba(44, 44, 46, 0.72);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
}
html[data-ui="apple"] .promo-card:hover {
  border-color: transparent;
  background: rgba(58, 58, 60, 0.82);
}

html[data-ui="apple"] .rq-list-card,
html[data-ui="apple"] .rq-detail-card {
  border-radius: 20px;
}
html[data-ui="apple"] .rq-list {
  gap: 0;
  padding: 4px !important;
}
html[data-ui="apple"] .rq-item {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
}
html[data-ui="apple"] .rq-item.active {
  border: 0;
  background: var(--accent);
  color: #fff;
}
html[data-ui="apple"] .rq-item.active .rq-item-text,
html[data-ui="apple"] .rq-item.active .muted {
  color: rgba(255, 255, 255, 0.78);
}

html[data-ui="apple"] .modal-head,
html[data-ui="apple"] .modal-foot {
  border-color: var(--separator);
  background: transparent;
}
html[data-ui="apple"] .modal-head h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
html[data-ui="apple"] .modal-close {
  width: 28px;
  height: 28px;
  border-radius: 980px;
  background: var(--fill);
}

html[data-ui="apple"] .dev-banner {
  border: 0;
  border-radius: 14px;
  background: rgba(255, 214, 10, 0.12);
  color: #ffd60a;
}
html[data-ui="apple"] .orders-updated {
  color: var(--text-muted);
  font-size: 13px;
}

html[data-ui="apple"] .sidebar-nav,
html[data-ui="apple"] .main {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

html[data-ui="apple"] .settings-card {
  max-width: 640px;
}
html[data-ui="apple"] .settings-layout .settings-card {
  max-width: none;
  width: 100%;
}

@media (max-width: 900px) {
  /* На телефоне обои и полупрозрачный .main дают «стекло» у верхнего края */
  html[data-ui="apple"].authed body {
    background: #000 !important;
    background-image: none !important;
  }
  html[data-ui="apple"] #app,
  html[data-ui="apple"] .main {
    background: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html[data-ui="apple"] .main > section { padding: 0 16px 32px; }
  html[data-ui="apple"] #page-dashboard { --dash-gutter: 16px; }
  html[data-ui="apple"] .page-header { margin: 0 -16px 14px; padding: 12px 16px; }
  html[data-ui="apple"] .page-header h1,
  html[data-ui="apple"] #page-dashboard::before { font-size: 28px; }
  html[data-ui="apple"] #page-dashboard::before {
    margin: 0 -16px 14px;
    padding: 12px 16px;
  }
  html[data-ui="apple"].portal-seller #page-dashboard::before {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: static !important;
  }
  html[data-ui="apple"].portal-seller .sidebar { display: none !important; }
  html[data-ui="apple"].portal-seller.authed,
  html[data-ui="apple"].portal-seller.authed body,
  html[data-ui="apple"].portal-seller.authed #app,
  html[data-ui="apple"].portal-seller.authed .main,
  html[data-ui="apple"].portal-seller.authed .main > section {
    background: #000 !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html[data-ui="apple"].portal-seller .hub-tile {
    background: #2c2c2e;
    border: 0;
  }
  html[data-ui="apple"].portal-seller .hub-tile-ico {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(235, 235, 245, 0.72);
  }
  html[data-ui="apple"].portal-seller .stat-card,
  html[data-ui="apple"].portal-seller .card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #2c2c2e;
  }
  html[data-ui="apple"].portal-seller .page-header {
    position: static;
    background: transparent;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none;
    margin: 0 0 14px;
    padding: 4px 0 0;
  }
  html[data-ui="apple"].portal-seller.authed .main > section {
    padding-bottom: calc(24px + var(--mob-tab-h, 56px) + var(--mob-tab-pad, 28px) + env(safe-area-inset-bottom));
  }
  html[data-ui="apple"].portal-seller.authed .mob-tabbar {
    background: rgba(22, 22, 24, 0.82);
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
  }
  html[data-ui="apple"].portal-seller.authed .mob-tab.is-on { color: var(--accent); }
  html[data-ui="apple"].portal-seller .mob-sheet {
    background: rgba(28, 28, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
  }
  html[data-ui="apple"].portal-seller .mob-sheet-list .nav-item.active {
    background: var(--accent);
    color: #fff;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-ui="apple"] .sidebar,
  html[data-ui="apple"] .card,
  html[data-ui="apple"] .stat-card,
  html[data-ui="apple"] .login-card,
  html[data-ui="apple"] .modal,
  html[data-ui="apple"] .nom-modal,
  html[data-ui="apple"] .page-header,
  html[data-ui="apple"].authed #app {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #1c1c1e;
  }
  html[data-ui="apple"].authed body { background: #000; }
}

@media (min-width: 901px) {
  html[data-ui="apple"].portal-seller .sidebar {
    display: flex !important;
    width: 248px;
  }
  html[data-ui="apple"].portal-seller .mob-tabbar,
  html[data-ui="apple"].portal-seller .mob-sheet-bg,
  html[data-ui="apple"].portal-seller .ptr-ind {
    display: none !important;
  }
}
