/* ============================================================
   Ozon Ads — Apple-inspired UI
   Palette:
     bg        #F5F5F7   surface  #FFFFFF
     ink       #1D1D1F   muted    #6E6E73
     blue      #0066CC   green    #34C759   red  #FF3B30
   Font: SF Pro / -apple-system fallback to Inter
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F5F5F7;
  --surface:   #FFFFFF;
  --surface-2: #FBFBFD;
  --ink:       #1D1D1F;
  --muted:     #6E6E73;
  --line:      #D2D2D7;
  --line-soft: #E8E8ED;
  --blue:      #0066CC;
  --blue-soft: #E1EEFD;
  --green:     #34C759;
  --green-soft:#E2F7E8;
  --orange:    #FF9500;
  --red:       #FF3B30;
  --red-soft:  #FFE4E2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ============ Top Nav ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #0066CC 0%, #5AC8FA 100%);
  box-shadow: 0 2px 6px rgba(0,102,204,0.3);
}
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px;
  font-size: 14px; color: var(--muted);
  border-radius: 8px;
  transition: all 0.18s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--ink); background: var(--surface-2); font-weight: 500; }
.nav-menu, .nav-finance-menu { position: relative; }
.nav-trigger, .nav-finance-trigger { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.nav-trigger span, .nav-finance-trigger span { font-size: 10px; color: var(--muted); transition: transform .16s ease; }
.nav-submenu, .nav-finance-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 220;
  min-width: 230px; padding: 7px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.11);
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu,
.nav-finance-menu:hover .nav-finance-dropdown,
.nav-finance-menu:focus-within .nav-finance-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu:hover .nav-trigger span,
.nav-menu:focus-within .nav-trigger span,
.nav-finance-menu:hover .nav-finance-trigger span,
.nav-finance-menu:focus-within .nav-finance-trigger span { transform: rotate(180deg); }
.nav-option, .nav-finance-option { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.nav-option:hover, .nav-option.active,
.nav-finance-option:hover, .nav-finance-option.active { background: var(--surface-2); }
.nav-option strong, .nav-finance-option strong { font-size: 13px; font-weight: 600; }
.nav-option small, .nav-finance-option small { font-size: 11px; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.badge {
  padding: 3px 10px; font-size: 11px; font-weight: 500;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line-soft); border-radius: 999px;
}

/* User menu in topbar */
.nav-right { position: relative; }
.nav-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  cursor: pointer;
  font: inherit; font-size: 13px;
  color: var(--ink);
  transition: all 0.18s ease;
}
.nav-user:hover { background: white; border-color: var(--line); }
.nav-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #0066CC, #5AC8FA);
  color: white; font-weight: 600; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-user-name { font-weight: 500; }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: white; border-radius: 12px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  overflow: hidden;
  z-index: 200;
}
.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s;
}
.nav-dropdown-item:hover { background: var(--surface-2); }
[x-cloak] { display: none !important; }

/* ============ Layout ============ */
.main {
  max-width: 1280px; margin: 0 auto;
  padding: 40px 32px 80px;
  min-height: calc(100vh - 64px - 60px);
}
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 24px 32px; text-align: center;
  font-size: 12px; color: var(--muted);
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--blue); }

/* ============ Headings ============ */
.page-header { margin-bottom: 32px; }
.page-title {
  font-size: 40px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.1; margin-bottom: 8px;
}
.page-sub { font-size: 17px; color: var(--muted); }
.section-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  margin: 32px 0 16px;
}

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}
.card-hero {
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* KPI cards */
.kpi-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 32px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-label {
  font-size: 13px; color: var(--muted);
  font-weight: 500; text-transform: none;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 4px;
}
.kpi-unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500;
  padding: 2px 8px; border-radius: 6px;
}
.kpi-delta.up   { color: var(--green); background: var(--green-soft); }
.kpi-delta.down { color: var(--red); background: var(--red-soft); }

/* ============ Store grid ============ */
.store-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.store-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.18s ease;
  cursor: pointer;
}
.store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.store-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.store-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.store-tag {
  font-size: 11px; padding: 2px 8px;
  background: var(--blue-soft); color: var(--blue);
  border-radius: 999px; font-weight: 500;
}
.store-tag.warn { background: var(--red-soft); color: var(--red); }
.store-tag.idle { background: var(--surface-2); color: var(--muted); }
.store-metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 16px; margin-top: 12px;
}
.store-metric .label { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.store-metric .val { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* ============ Tables ============ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
table.data th, table.data td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
table.data th {
  background: var(--surface-2);
  font-weight: 500; color: var(--muted);
  font-size: 12px; text-transform: none;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data th.num { text-align: right; }
.cell-danger { color: var(--red); font-weight: 600; }
.cell-warn   { color: var(--orange); font-weight: 600; }
.cell-good   { color: var(--green); font-weight: 600; }

/* ============ Controls ============ */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  background: var(--ink); color: white;
  border: none; border-radius: 999px;
  cursor: pointer; transition: all 0.18s ease;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost {
  background: transparent; color: var(--blue); border: none;
}
.btn-ghost:hover { background: var(--blue-soft); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #d92e25; }

.select, .input {
  padding: 9px 14px; font-family: var(--font); font-size: 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color 0.18s;
}
.select:focus, .input:focus { border-color: var(--blue); }

.tab-group { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tab {
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  border-radius: 7px; transition: all 0.18s;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ============ Charts ============ */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.chart-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 320px; }

/* ============ Status / Misc ============ */
.alert-banner {
  background: var(--red-soft); color: var(--red);
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; margin-bottom: 16px;
}
.alert-banner.info { background: var(--blue-soft); color: var(--blue); }
.alert-banner.warn { background: #FFF4E0; color: #B96A00; }

.empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 15px;
}
.loading {
  text-align: center; padding: 40px; color: var(--muted); font-size: 14px;
}

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--line-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  transition: all 0.18s;
}
.upload-zone.dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-icon { font-size: 40px; opacity: 0.4; margin-bottom: 12px; }

/* Form grid */
.form-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.form-field label {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 6px; font-weight: 500;
}
.form-field input, .form-field select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: var(--font);
}

/* Responsive */
@media (max-width: 768px) {
  .topbar-inner { padding: 12px 16px; }
  .nav-links { gap: 0; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .main { padding: 24px 16px 60px; }
  .page-title { font-size: 28px; }
  .kpi-value { font-size: 24px; }
}

/* ============ CPC grouped details ============ */
.detail-count {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.strong { font-weight: 600; }
.cpc-table-wrap { overflow: auto !important; }
.cpc-product-table {
  min-width: 1320px;
  table-layout: fixed;
}
.cpc-product-table > thead > tr > th,
.cpc-product-table > tbody > tr.cpc-product-row > td {
  white-space: nowrap;
  vertical-align: middle;
}
.cpc-product-table > thead > tr > th:nth-child(1),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(1) { width: 46px; }
.cpc-product-table > thead > tr > th:nth-child(2),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(2) { width: 112px; }
.cpc-product-table > thead > tr > th:nth-child(3),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(3) { width: 124px; overflow: hidden; text-overflow: ellipsis; }
.cpc-product-table > thead > tr > th:nth-child(4),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(4) { width: 60px; }
.cpc-product-table > thead > tr > th:nth-child(5),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(5) { width: 118px; }
.cpc-product-table > thead > tr > th:nth-child(6),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(6) { width: 72px; }
.cpc-product-table > thead > tr > th:nth-child(7),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(7) { width: 104px; }
.cpc-product-table > thead > tr > th:nth-child(8),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(8) { width: 88px; }
.cpc-product-table > thead > tr > th:nth-child(9),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(9) { width: 72px; }
.cpc-product-table > thead > tr > th:nth-child(10),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(10) { width: 96px; }
.cpc-product-table > thead > tr > th:nth-child(11),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(11) { width: 74px; }
.cpc-product-table > thead > tr > th:nth-child(12),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(12) { width: 118px; }
.cpc-product-table > thead > tr > th:nth-child(13),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(13) { width: 92px; }
.cpc-product-table > thead > tr > th:nth-child(14),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(14) { width: 110px; }
.cpc-product-table > thead > tr > th:nth-child(15),
.cpc-product-table > tbody > tr.cpc-product-row > td:nth-child(15) { width: 92px; }
.toggle-col { text-align: center !important; }
.icon-toggle, .date-toggle {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 24px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cpc-product-group + .cpc-product-group .cpc-product-row td { border-top: 1px solid var(--line-soft); }
.cpc-product-row { cursor: pointer; }
.cpc-product-row td { background: var(--surface); }
.cpc-product-row:hover td { background: var(--surface-2); }
.cpc-expanded-row > td {
  background: #FAFAFC;
  padding: 0 !important;
  white-space: normal;
}
.cpc-date-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px 64px;
  overflow-x: auto;
}
.cpc-date-block {
  min-width: 1120px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.cpc-date-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 96px 112px 58px 100px 82px 96px 122px 98px 120px 88px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.cpc-date-row:hover { background: var(--surface-2); }
.cpc-date-row > span {
  min-width: 0;
  white-space: nowrap;
}
.cpc-date-row .status-pill { justify-self: start; }
.cpc-date-row .date-metric {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cpc-date-row strong {
  color: var(--ink);
  font-weight: 600;
}
.date-main { font-weight: 600; }
.cpc-campaign-list {
  border-top: 1px solid var(--line-soft);
  overflow-x: auto;
}
.compact-data {
  min-width: 1180px;
  table-layout: fixed;
}
.compact-data th, .compact-data td {
  padding: 10px 12px !important;
  font-size: 12px;
  white-space: nowrap;
}
.compact-data th:nth-child(2), .compact-data td:nth-child(2) { width: 160px; }
.compact-data td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill.running { color: var(--green); background: var(--green-soft); }
.status-pill.mixed { color: var(--blue); background: var(--blue-soft); }
.status-pill.pending { color: #8A5A00; background: #FFF4E0; }
.status-pill.off { color: var(--red); background: var(--red-soft); }
.status-pill.unknown, .status-pill.raw { color: var(--muted); background: var(--surface-2); border-color: var(--line-soft); }

@media (max-width: 900px) {
  .cpc-product-table { min-width: 1240px; }
  .cpc-date-list { padding-left: 18px; }
  .cpc-date-block { min-width: 1040px; }
  .cpc-date-row {
    grid-template-columns: 24px 96px 112px 58px 92px 76px 88px 112px 90px 110px 82px;
    gap: 8px;
  }
}

/* ============ iOS visual system refresh ============ */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --ink: #1c1c1e;
  --muted: #6c6c70;
  --line: rgba(60, 60, 67, .22);
  --line-soft: rgba(60, 60, 67, .11);
  --blue: #007aff;
  --blue-soft: #e8f2ff;
  --green: #34c759;
  --green-soft: #e8f8ed;
  --orange: #ff9500;
  --red: #ff3b30;
  --red-soft: #ffebe9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.03), 0 3px 12px rgba(0,0,0,.035);
  --shadow: 0 8px 30px rgba(0,0,0,.07);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
}

html, body { background: var(--bg); }
body {
  min-height: 100vh;
  background-image: radial-gradient(circle at 50% -180px, rgba(255,255,255,.92), transparent 520px);
}
button, input, select, textarea { font-family: var(--font); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }

.topbar {
  background: rgba(248,248,250,.78);
  border-bottom-color: rgba(60,60,67,.12);
  box-shadow: 0 1px 18px rgba(0,0,0,.025);
}
.topbar-inner { max-width: 1440px; min-height: 64px; padding: 10px 28px; gap: 22px; }
.logo-dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, #31a8ff, #0066e6 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 5px 14px rgba(0,122,255,.24);
}
.brand-name { font-size: 16px; font-weight: 650; }
.nav-links {
  align-items: center; gap: 2px; padding: 4px;
  border-radius: 13px; background: rgba(118,118,128,.08);
}
.nav-link { padding: 7px 12px; border-radius: 10px; font-size: 13px; }
.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.nav-link.active {
  color: var(--blue); background: #fff; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.09), 0 1px 1px rgba(0,0,0,.04);
}
.nav-submenu, .nav-finance-dropdown, .nav-dropdown {
  border-color: rgba(60,60,67,.13); border-radius: 16px;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 18px 55px rgba(0,0,0,.14);
}
.nav-option, .nav-finance-option, .nav-dropdown-item { border-radius: 11px; }
.nav-user { background: rgba(255,255,255,.78); border-color: rgba(60,60,67,.13); box-shadow: var(--shadow-sm); }
.nav-user:hover { border-color: rgba(0,122,255,.28); box-shadow: 0 5px 18px rgba(0,0,0,.07); }
.nav-user-avatar { background: linear-gradient(145deg,#38aaff,#007aff); }

.main { max-width: 1440px; }
.card, .kpi, .store-card, .chart-card, .table-wrap {
  border-color: rgba(60,60,67,.1);
  box-shadow: var(--shadow-sm);
}
.card, .kpi, .store-card, .chart-card { background: rgba(255,255,255,.94); }
.kpi:hover, .store-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
table.data th { background: rgba(118,118,128,.055); color: #707078; }
table.data tbody tr { transition: background .14s ease; }
table.data tbody tr:hover { background: rgba(0,122,255,.035); }

.btn {
  min-height: 36px; padding: 8px 16px; border-radius: 11px;
  background: var(--blue); font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,122,255,.16);
}
.btn:hover { background: #0874df; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-secondary { background: rgba(255,255,255,.9); color: var(--blue); border-color: rgba(60,60,67,.18); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--blue); box-shadow: none; }
.btn-danger { background: var(--red); }
.select, .input, .form-field input, .form-field select {
  min-height: 38px; border-color: rgba(60,60,67,.18); border-radius: 11px;
  background: rgba(255,255,255,.9); box-shadow: inset 0 1px 1px rgba(0,0,0,.02);
}
.select:focus, .input:focus, .form-field input:focus, .form-field select:focus {
  border-color: rgba(0,122,255,.65); box-shadow: 0 0 0 3px rgba(0,122,255,.12); outline: none;
}
.tab-group { padding: 3px; border-radius: 11px; background: rgba(118,118,128,.12); }
.tab { border-radius: 9px; }
.tab.active { color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.status-pill, .badge { border-color: rgba(60,60,67,.08); }

@media (max-width: 1100px) {
  .topbar-inner { align-items: flex-start; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
  .nav-link { flex: 0 0 auto; }
}
