:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8f8fb;
  --ink: #17151d;
  --muted: #72707b;
  --muted-2: #9d9aa5;
  --line: #e8e6eb;
  --purple: #7130aa;
  --purple-2: #8f3ac8;
  --purple-soft: #f4ebfb;
  --magenta: #cb2788;
  --green: #17855b;
  --green-soft: #e9f7f1;
  --orange: #b86413;
  --orange-soft: #fff3e7;
  --red: #c43e4d;
  --red-soft: #fff0f2;
  --blue: #2b6cb0;
  --shadow: 0 12px 32px rgba(34, 21, 45, 0.06);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --sidebar: 242px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.app-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  background: linear-gradient(145deg, var(--magenta), var(--purple));
  box-shadow: 0 8px 18px rgba(118, 44, 164, .24);
}
.brand-mark span { display: block; width: 4px; border-radius: 5px; background: #fff; }
.brand-mark span:nth-child(1) { height: 8px; opacity: .72; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .86; }
.brand-mark--large { width: 48px; height: 48px; border-radius: 15px; padding: 11px; gap: 4px; animation: breathe 1.7s ease-in-out infinite; }
.brand-mark--large span { width: 5px; }
@keyframes breathe { 50% { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(118, 44, 164, .28); } }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.08fr) minmax(430px, .92fr); background: #fff; }
.auth-showcase {
  position: relative;
  overflow: hidden;
  padding: 46px clamp(38px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 12% 12%, rgba(238, 81, 180, .42), transparent 29%),
    radial-gradient(circle at 86% 82%, rgba(128, 75, 201, .56), transparent 31%),
    linear-gradient(145deg, #201429 0%, #3a164b 53%, #221127 100%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.auth-showcase::before, .auth-showcase::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.auth-showcase::before { width: 530px; height: 530px; right: -290px; top: 70px; }
.auth-showcase::after { width: 320px; height: 320px; left: -190px; bottom: -130px; }
.auth-brand { position: relative; display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 750; letter-spacing: -.3px; z-index: 1; }
.auth-brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.55); font-size: 10px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; }
.auth-hero { position: relative; z-index: 1; margin: auto 0; max-width: 650px; padding: 60px 0; }
.auth-kicker { display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.76); font-size: 12px; }
.auth-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e455ba; box-shadow: 0 0 0 5px rgba(228,85,186,.12); }
.auth-hero h1 { margin: 24px 0 20px; max-width: 650px; font-size: clamp(42px, 5.2vw, 68px); line-height: .99; letter-spacing: -3.5px; font-weight: 740; }
.auth-hero h1 em { font-style: normal; color: #dd62b9; }
.auth-hero > p { max-width: 530px; margin: 0; color: rgba(255,255,255,.62); font-size: 17px; line-height: 1.65; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.auth-feature { min-height: 112px; padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.auth-feature svg { color: #e65fbc; }
.auth-feature strong { display: block; margin-top: 17px; font-size: 13px; }
.auth-feature span { display: block; margin-top: 4px; color: rgba(255,255,255,.48); font-size: 11px; line-height: 1.4; }
.auth-foot { position: relative; z-index: 1; color: rgba(255,255,255,.35); font-size: 11px; }

.auth-panel { display: grid; place-items: center; padding: 42px clamp(30px, 6vw, 94px); background: #fff; }
.auth-box { width: min(410px, 100%); }
.auth-box h2 { margin: 0 0 9px; font-size: 30px; letter-spacing: -1px; }
.auth-box > p { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 24px; border-radius: 12px; background: var(--surface-soft); }
.auth-switch button { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 650; }
.auth-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(30,20,35,.07); }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { color: #4f4c56; font-size: 12px; font-weight: 650; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-wrap input { width: 100%; padding-left: 40px; }
input, select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #dedce2;
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  transition: .15s ease;
}
input:focus, select:focus { border-color: #a56acb; box-shadow: 0 0 0 3px rgba(122,49,174,.09); }
input::placeholder { color: #b3b0b8; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-submit { width: 100%; margin-top: 7px; justify-content: center; min-height: 46px; }
.auth-note { margin-top: 24px; text-align: center; color: var(--muted-2); font-size: 11px; line-height: 1.5; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 15px 18px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 22px; font-size: 16px; font-weight: 750; letter-spacing: -.35px; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-label { padding: 15px 11px 8px; color: #afabb4; font-size: 9px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #696671; cursor: pointer; text-align: left; font-size: 12px; font-weight: 600; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { color: var(--purple); background: var(--purple-soft); }
.nav-item svg { flex: 0 0 auto; }
.sidebar-spacer { flex: 1; }
.demo-mini { margin: 15px 3px; padding: 14px; border-radius: 14px; background: #f9f4fc; }
.demo-mini strong { display: flex; align-items: center; gap: 7px; color: #5f287f; font-size: 11px; }
.demo-mini p { margin: 6px 0 10px; color: #8a7396; font-size: 10px; line-height: 1.45; }
.demo-mini button { border: 0; padding: 0; color: var(--purple); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 13px 9px 0; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #db4ca8, #7734aa); font-size: 12px; font-weight: 750; }
.user-text { min-width: 0; flex: 1; }
.user-text strong, .user-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text strong { font-size: 11px; }
.user-text span { margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--ink); background: var(--surface-soft); }
.sidebar-user .icon-button { width: 30px; height: 30px; border: 0; }

.main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { height: 67px; padding: 0 clamp(24px, 3.2vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.topbar-path { color: var(--muted); font-size: 11px; }
.topbar-path strong { color: var(--ink); font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.wb-account-switcher { min-height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--purple); background: #fff; }
.wb-account-switcher span { color: var(--muted-2); font-size: 9px; }
.wb-account-switcher select { width: auto; max-width: 190px; min-height: 30px; padding: 4px 24px 4px 3px; border: 0; color: var(--ink); background-color: transparent; font-size: 10px; font-weight: 680; }
.wb-account-switcher select:focus { box-shadow: none; }
.sync-status { display: flex; align-items: center; gap: 6px; margin-right: 6px; color: var(--muted-2); font-size: 10px; }
.sync-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3db887; }
.content { padding: 31px clamp(24px, 3.2vw, 48px) 54px; max-width: 1560px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-head h1 { margin: 0; font-size: 29px; line-height: 1.12; letter-spacing: -1.25px; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.button { min-height: 39px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #4d4952; cursor: pointer; font-size: 11px; font-weight: 680; white-space: nowrap; }
.button:hover { border-color: #d3cfd7; background: #fbfafc; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button--primary { border-color: transparent; color: #fff; background: linear-gradient(120deg, var(--purple), #9a3fbe); box-shadow: 0 7px 16px rgba(112,48,170,.16); }
.button--primary:hover { border-color: transparent; background: linear-gradient(120deg, #65299b, #8c35b1); }
.button--danger { color: var(--red); border-color: #f1dadd; background: #fffafb; }
.button--soft { color: var(--purple); border-color: transparent; background: var(--purple-soft); }
.button--sm { min-height: 32px; padding: 0 10px; font-size: 10px; }
.button.loading { pointer-events: none; color: transparent; position: relative; }
.button.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid #e7d7f0; border-radius: 13px; color: #5c3471; background: #faf4fd; font-size: 11px; }
.demo-banner > div { display: flex; align-items: center; gap: 9px; }
.demo-banner strong { font-weight: 720; }
.demo-banner span { color: #8f749d; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 119px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 2px 3px rgba(30,20,35,.015); }
.metric-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.metric-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--purple); background: var(--purple-soft); }
.metric-value { margin-top: 15px; font-size: 24px; font-weight: 730; letter-spacing: -.7px; }
.metric-foot { margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.metric-foot b { margin-right: 5px; color: var(--green); font-weight: 680; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow); }
.toolbar { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search { position: relative; min-width: 240px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search input { height: 37px; min-height: 37px; padding: 8px 10px 8px 35px; border-color: transparent; background: var(--surface-soft); }
.compact-select { width: auto; min-width: 128px; min-height: 37px; height: 37px; padding: 7px 30px 7px 10px; border-color: var(--line); color: #5f5c65; background: #fff; font-size: 10px; }
.update-time { color: var(--muted-2); font-size: 9px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 43px; padding: 0 14px; color: #9b98a2; background: #fbfbfc; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; font-weight: 720; letter-spacing: .25px; text-transform: uppercase; white-space: nowrap; }
td { height: 67px; padding: 10px 14px; border-bottom: 1px solid #efedf0; color: #504d55; font-size: 11px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fcfbfd; }
tbody tr.selected { background: #fcf7ff; }
.campaign-name { display: flex; align-items: center; gap: 11px; min-width: 240px; }
.campaign-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #eadff0; border-radius: 11px; color: var(--purple); background: #faf5fc; }
.campaign-name strong, .campaign-name-link { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 11px; font-weight: 680; }
.campaign-name-link { text-decoration: none; transition: color .12s ease; }
.campaign-name-link:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.campaign-name small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 680; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.status--active { color: var(--green); background: var(--green-soft); }
.status--active::before { background: #32aa79; box-shadow: 0 0 0 3px rgba(50,170,121,.12); }
.status--paused { color: var(--orange); background: var(--orange-soft); }
.status--paused::before { background: #da8b3d; }
.status--ready { color: var(--blue); background: #edf5fd; }
.status--ready::before { background: #4b8ccf; }
.status--finished, .status--declined, .status--unknown { color: var(--muted); background: #f1f0f3; }
.status--finished::before, .status--declined::before, .status--unknown::before { background: #aaa6b0; }
.budget-cell { min-width: 124px; }
.budget-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.budget-row strong { color: var(--ink); font-size: 10px; }
.progress { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #eeecf0; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--magenta), var(--purple)); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.empty-state { padding: 70px 30px; text-align: center; color: var(--muted); }
.empty-state-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 16px; color: var(--purple); background: var(--purple-soft); }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }
.empty-state p { margin: 0 auto; max-width: 380px; font-size: 11px; line-height: 1.55; }

.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--muted-2); font-size: 10px; }
.breadcrumb button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.breadcrumb button:hover { color: var(--purple); }
.campaign-head { align-items: center; }
.campaign-title-row { display: flex; align-items: center; gap: 11px; }
.campaign-title-row .status { transform: translateY(1px); }
.campaign-meta { display: flex; align-items: center; gap: 13px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.campaign-meta span { display: inline-flex; align-items: center; gap: 5px; }
.campaign-balance-control { min-height: 47px; padding: 6px 12px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.campaign-balance-control > span { display: grid; gap: 2px; color: var(--muted); font-size: 9px; }
.campaign-balance-control small { color: var(--muted-2); font-size: 8px; }
.campaign-balance-control strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.campaign-bid-control { min-height: 47px; padding: 6px 7px 6px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.campaign-bid-control > span { display: grid; gap: 2px; color: var(--muted); font-size: 9px; }
.campaign-bid-control small { color: var(--muted-2); font-size: 8px; }
.campaign-bid-control strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.bid-inline { position: relative; display: inline-flex; align-items: center; border: 1px solid #d8d4dc; border-radius: 9px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.bid-inline:focus-within { border-color: #9e61c5; box-shadow: 0 0 0 3px rgba(122,49,174,.09); }
.bid-inline input { width: 72px; min-height: 32px; height: 32px; padding: 5px 2px 5px 9px; border: 0; border-radius: inherit; box-shadow: none; color: var(--ink); background: transparent; text-align: right; font-size: 11px; font-weight: 680; font-variant-numeric: tabular-nums; }
.bid-inline input:focus { border: 0; box-shadow: none; }
.bid-inline input::placeholder { color: #aaa5af; font-weight: 520; }
.bid-currency { padding: 0 5px 0 3px; color: var(--muted); font-size: 10px; }
.bid-save-status { width: 13px; height: 13px; flex: 0 0 13px; display: grid; place-items: center; margin-right: 5px; color: var(--green); font-size: 11px; font-style: normal; }
.bid-inline.saving { border-color: #c7a5dc; background: #fdfaff; }
.bid-inline.saving .bid-save-status { width: 12px; height: 12px; border: 1.5px solid #ddcce7; border-top-color: var(--purple); border-radius: 50%; animation: spin .7s linear infinite; }
.bid-inline.saved .bid-save-status::after { content: "✓"; font-weight: 750; }
.bid-inline.invalid { border-color: #e56c78; box-shadow: 0 0 0 3px rgba(218,72,85,.08); }
.campaign-bid-field input { width: 82px; }
.tabs { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { position: relative; min-height: 43px; padding: 0 2px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 660; }
.tab.active { color: var(--purple); }
.tab.active::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; border-radius: 2px 2px 0 0; background: var(--purple); }
.tab-count { min-width: 18px; padding: 2px 5px; border-radius: 999px; text-align: center; color: var(--muted); background: #efedf1; font-size: 8px; }
.tab.active .tab-count { color: var(--purple); background: var(--purple-soft); }
.period-controls { display: flex; align-items: center; gap: 7px; }
.campaign-period-controls { flex-wrap: wrap; justify-content: flex-end; }
.period { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.period input { width: 122px; height: 30px; min-height: 30px; padding: 5px 8px; border: 0; border-radius: 8px; color: #5d5962; font-size: 10px; }
.period span { color: var(--muted-2); font-size: 9px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: #f0eef2; }
.segmented button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 650; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(30,20,35,.06); }
.cluster-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cluster-panel { position: relative; padding-bottom: 0; }
.cluster-panel .toolbar { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.cluster-tabs { display: flex; align-items: center; gap: 4px; }
.cluster-tabs button { min-height: 33px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 650; }
.cluster-tabs button.active { color: var(--purple); background: var(--purple-soft); }
.cluster-table th, .cluster-table td { padding-left: 11px; padding-right: 11px; text-align: right; }
.cluster-table th:first-child, .cluster-table td:first-child { width: 44px; padding-left: 15px; padding-right: 5px; text-align: left; }
.cluster-table th:nth-child(2), .cluster-table td:nth-child(2) { min-width: 210px; text-align: left; }
.cluster-name { color: var(--ink); font-weight: 620; }
.cluster-name small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 8px; font-weight: 500; }
.money { color: var(--ink); font-variant-numeric: tabular-nums; }
.cluster-bid-field { margin-left: auto; }
.cluster-bid-field.inherited { border-style: dashed; background: #fbf9fd; }
.checkbox { position: relative; width: 16px; height: 16px; display: inline-grid; place-items: center; }
.checkbox input { position: absolute; inset: 0; width: 100%; min-height: 0; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.checkbox span { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #d4d1d8; border-radius: 5px; background: #fff; transition: .12s ease; }
.checkbox input:checked + span { border-color: var(--purple); background: var(--purple); }
.checkbox input:checked + span::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.not-available { display: inline-grid; place-items: center; width: 16px; height: 16px; color: #c4c0c8; cursor: help; }
.history-notice { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #ddd6fe; border-radius: 10px; background: #f8f7ff; color: #5b5268; font-size: 12px; line-height: 1.5; }
.history-notice svg { flex: 0 0 auto; margin-top: 2px; color: var(--violet); }
.history-notice strong { color: var(--ink); }
.campaign-statistics-notice { border-color: #d7e5f5; background: #f6faff; }
.campaign-statistics-notice svg { color: var(--blue); }
.campaign-statistics-warning { border-color: #f0d7b7; background: #fffaf3; }
.campaign-statistics-warning svg { color: var(--orange); }
.campaign-daily-panel { overflow: hidden; margin-bottom: 18px; }
.campaign-daily-head { min-height: 62px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.campaign-daily-head h3 { margin: 0; font-size: 13px; }
.campaign-daily-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.campaign-daily-head > span { padding: 5px 8px; border-radius: 999px; color: var(--purple); background: var(--purple-soft); font-size: 9px; font-weight: 680; white-space: nowrap; }
.campaign-daily-table th, .campaign-daily-table td { text-align: right; }
.campaign-daily-table th:first-child, .campaign-daily-table td:first-child { text-align: left; }
.campaign-daily-table td { height: 53px; }
.campaign-daily-panel .empty-state { padding: 42px 30px; }
.campaign-daily-loading { min-height: 94px; padding: 28px 18px; display: flex; align-items: flex-start; }
.bulk-bar { position: sticky; bottom: 14px; z-index: 10; width: max-content; max-width: calc(100% - 28px); margin: 14px auto; padding: 7px 8px 7px 13px; display: flex; align-items: center; gap: 13px; border: 1px solid #3d2948; border-radius: 12px; color: #fff; background: rgba(31, 22, 36, .96); box-shadow: 0 12px 28px rgba(26,16,31,.23); font-size: 10px; animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.bulk-bar button { min-height: 31px; border: 0; border-radius: 8px; padding: 0 11px; color: #fff; background: var(--purple-2); cursor: pointer; font-size: 9px; font-weight: 680; }
.bulk-clear { padding: 2px !important; color: #aaa0b0 !important; background: transparent !important; }
.sort-button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-transform: inherit; font: inherit; letter-spacing: inherit; }
.sort-button.active { color: var(--purple); }

.product-sync-line { display: flex; align-items: center; gap: 7px; margin: -8px 0 17px; color: var(--muted); font-size: 9px; }
.product-sync-line svg { color: var(--green); }
.product-warning { border-color: #f0d7b7; background: #fffaf3; }
.product-warning svg { color: var(--orange); }
.marketplace-switch { width: max-content; margin: -7px 0 20px; }
.marketplace-switch button { min-width: 110px; }
.link-button { padding: 0; border: 0; color: var(--purple); background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.product-list-panel { overflow: hidden; }
.product-count { color: var(--muted); font-size: 10px; }
.product-grid { padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 13px; }
.product-card { min-width: 0; overflow: hidden; padding: 0; display: block; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-2px); border-color: #d6c2e3; box-shadow: 0 10px 24px rgba(44,27,54,.08); }
.product-card-media { height: 220px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #faf9fb, #f2f0f4); }
.product-card-image { width: 100%; height: 100%; object-fit: contain; }
.product-image-fallback { color: #b6a8bf; background: linear-gradient(145deg, #faf9fb, #f2f0f4); }
.product-card-body { padding: 13px; display: block; }
.product-card-body strong { display: -webkit-box; min-height: 32px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 11px; line-height: 1.45; }
.product-card-body small { display: block; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-card-body > span { display: block; margin-top: 5px; overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.product-card--skeleton { padding: 12px; cursor: default; }
.product-card--skeleton .product-card-image { height: 200px; margin-bottom: 14px; }
.product-detail-head { display: grid; grid-template-columns: 116px minmax(280px, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 22px; }
.product-detail-media { width: 116px; height: 142px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.product-detail-image { width: 100%; height: 100%; object-fit: contain; }
.product-detail-copy > span { color: var(--purple); font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .7px; }
.product-detail-copy h1 { max-width: 720px; margin: 7px 0 9px; font-size: 25px; line-height: 1.18; letter-spacing: -.8px; }
.product-detail-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.product-period-controls { display: grid; justify-items: end; gap: 7px; }
.product-period-controls small { color: var(--muted-2); font-size: 8px; }
.product-stock-panel { margin-bottom: 17px; padding: 16px 18px; }
.product-stock-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-stock-head h3, .product-chart-head h3 { margin: 0; font-size: 13px; }
.product-stock-head p, .product-chart-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.product-stock-total { min-width: 104px; padding: 8px 11px; border-radius: 10px; background: var(--purple-soft); text-align: right; }
.product-stock-total span { display: block; color: var(--muted); font-size: 8px; }
.product-stock-total strong { display: block; margin-top: 2px; color: var(--purple); font-size: 12px; }
.product-stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.product-stock-item { min-width: 0; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.product-stock-item div { min-width: 0; }
.product-stock-item strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-stock-item span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.product-stock-item b { flex: 0 0 auto; color: var(--green); font-size: 11px; }
.product-stock-empty { min-height: 47px; padding: 11px 13px; display: flex; align-items: center; gap: 8px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 9px; }
.product-stock-empty svg { flex: 0 0 auto; color: var(--orange); }
.product-metrics { margin-bottom: 17px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-metrics .metric-value { font-size: 22px; }
.product-chart-panel { position: relative; margin-bottom: 17px; padding: 17px 18px 11px; overflow: hidden; }
.product-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-chart-legend { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 9px; }
.product-chart-legend span { display: flex; align-items: center; gap: 5px; }
.product-chart-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 999px; }
.product-chart-legend .orders { background: var(--purple); }
.product-chart-legend .sales { background: var(--green); }
.product-chart-wrap { margin-top: 8px; overflow-x: auto; direction: rtl; }
.product-chart-wrap svg { width: 100%; min-width: 620px; display: block; overflow: visible; direction: ltr; }
.product-chart-grid { stroke: #ebe8ed; stroke-width: 1; }
.product-chart-label { fill: var(--muted-2); font-size: 9px; }
.product-chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.product-chart-line--orders { stroke: var(--purple); }
.product-chart-line--sales { stroke: var(--green); }
.product-chart-point { fill: #fff; stroke-width: 2; }
.product-chart-point--orders { stroke: var(--purple); }
.product-chart-point--sales { stroke: var(--green); }
.product-chart-hit { fill: transparent; cursor: pointer; outline: none; }
.product-chart-hit:hover, .product-chart-hit.active, .product-chart-hit:focus-visible { fill: rgba(113, 48, 170, .045); }
.product-chart-tooltip { position: absolute; z-index: 6; min-width: 164px; padding: 10px 11px; display: grid; gap: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: #fff; background: rgba(28, 22, 32, .96); box-shadow: 0 10px 25px rgba(30,20,35,.2); pointer-events: none; animation: chart-tooltip-in .12s ease-out; }
.product-chart-tooltip[hidden] { display: none; }
.product-chart-tooltip strong { padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 10px; }
.product-chart-tooltip span { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 6px; color: #d8d3dc; font-size: 9px; }
.product-chart-tooltip i { width: 7px; height: 7px; border-radius: 50%; }
.product-chart-tooltip i.orders { background: #b86ce3; }
.product-chart-tooltip i.sales { background: #37bd87; }
.product-chart-tooltip b { color: #fff; font-size: 10px; }
@keyframes chart-tooltip-in { from { opacity: 0; transform: translateY(3px); } }
.product-stats-panel { overflow: hidden; }
.product-stats-table th, .product-stats-table td { text-align: right; }
.product-stats-table th:first-child, .product-stats-table td:first-child { text-align: left; }

.schedule-presets { margin-bottom: 15px; padding: 14px 17px; display: grid; grid-template-columns: minmax(230px, 1fr) auto; align-items: center; gap: 9px 18px; }
.schedule-presets-copy { display: flex; align-items: center; gap: 11px; }
.schedule-presets-copy > span { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-soft); }
.schedule-presets-copy strong { display: block; font-size: 11px; }
.schedule-presets-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.schedule-presets-controls { display: flex; align-items: center; gap: 7px; }
.schedule-presets-controls select { width: 210px; min-height: 34px; height: 34px; font-size: 9px; }
.schedule-preset-delete { color: var(--red); }
.schedule-presets-note { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8px; line-height: 1.4; }
.schedule-summary { min-height: 79px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.schedule-toggle { display: flex; align-items: center; gap: 12px; }
.schedule-toggle-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--purple); background: var(--purple-soft); }
.schedule-toggle strong { display: block; font-size: 12px; }
.schedule-toggle p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d8d5dc; cursor: pointer; transition: .18s ease; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: .18s ease; }
.switch input:checked + span { background: var(--purple); }
.switch input:checked + span::after { transform: translateX(16px); }
.schedule-stats { display: flex; align-items: center; gap: 28px; }
.schedule-stat span { display: block; color: var(--muted-2); font-size: 9px; }
.schedule-stat strong { display: block; margin-top: 4px; font-size: 13px; }
.schedule-panel { overflow: hidden; }
.schedule-panel-head { min-height: 67px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.schedule-panel-head h3 { margin: 0; font-size: 13px; }
.schedule-panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.timezone { width: 166px; min-height: 35px; height: 35px; font-size: 10px; }
.schedule-scroll { overflow-x: auto; }
.week-grid { min-width: 1050px; display: grid; grid-template-columns: 48px repeat(7, 1fr); }
.time-head, .day-head { height: 48px; border-bottom: 1px solid var(--line); background: #fcfcfd; }
.day-head { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; border-left: 1px solid var(--line); }
.day-head strong { display: block; font-size: 10px; }
.day-head span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.day-head button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--purple); background: #fff; cursor: pointer; }
.time-axis { position: relative; height: 576px; background: #fcfcfd; }
.time-label { position: absolute; right: 9px; transform: translateY(-5px); color: #aaa6af; font-size: 8px; }
.day-column { position: relative; height: 576px; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 23px, #f0eef2 24px); }
.day-column:hover { background-color: #fdfbfe; }
.interval-card { position: absolute; left: 6px; right: 6px; min-height: 42px; overflow: hidden; padding: 8px 7px; border: 1px solid #ddc2ed; border-left: 3px solid var(--purple-2); border-radius: 9px; color: #5f257e; background: linear-gradient(145deg, #f7ecfc, #f2e5fa); cursor: pointer; text-align: left; box-shadow: 0 4px 10px rgba(92,42,119,.07); }
.interval-card:hover { border-color: #c995e2; filter: saturate(1.08); }
.interval-card strong { display: block; font-size: 9px; white-space: nowrap; }
.interval-card span { display: block; margin-top: 4px; color: #9169a3; font-size: 8px; white-space: nowrap; }
.schedule-foot { min-height: 68px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.schedule-help { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.schedule-help svg { flex: 0 0 auto; color: var(--purple); }
.runtime-line { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.runtime-line i { width: 6px; height: 6px; border-radius: 50%; background: #aaa; }
.runtime-line i.active { background: #30aa78; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 15px; align-items: start; }
.settings-card { padding: 23px; }
.settings-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.settings-card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--purple); background: var(--purple-soft); }
.settings-card-head h2 { margin: 0; font-size: 15px; }
.settings-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.settings-card--accounts { grid-row: span 2; }
.wb-account-list { display: grid; gap: 9px; margin-bottom: 22px; }
.wb-account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fcfbfd; }
.wb-account-row.active { border-color: #d8c2e7; background: #fbf7fd; }
.wb-account-main, .wb-account-actions, .wb-account-title { display: flex; align-items: center; }
.wb-account-main { min-width: 0; gap: 10px; }
.wb-account-main > div { min-width: 0; }
.wb-account-mark { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--purple); background: var(--purple-soft); }
.wb-account-title { gap: 7px; }
.wb-account-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.wb-account-main p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.wb-account-main p b { color: var(--ink); font-weight: 720; }
.marketplace-connection.connected { color: #267d5d; }
.account-active-chip { padding: 3px 6px; border-radius: 999px; color: #237d5b; background: #e6f7ef; font-size: 8px; font-weight: 750; }
.wb-account-actions { flex: 0 0 auto; gap: 6px; }
.wb-account-actions .account-delete { width: 32px; height: 32px; color: var(--red); }
.wb-accounts-empty { padding: 18px; border: 1px dashed #d8d3dc; border-radius: 13px; text-align: center; }
.wb-accounts-empty strong { font-size: 11px; }
.wb-accounts-empty p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.wb-account-form { padding-top: 20px; border-top: 1px solid var(--line); }
.wb-account-form h3 { margin: 0 0 15px; font-size: 12px; }
.token-connected { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px; margin-bottom: 17px; border: 1px solid #cee9dd; border-radius: 13px; background: #f3fbf7; }
.token-connected > div { display: flex; align-items: center; gap: 10px; }
.token-connected svg { color: var(--green); }
.token-connected strong { display: block; font-size: 11px; }
.token-connected span { display: block; margin-top: 3px; color: #6c8e7d; font-size: 9px; }
.token-input input { padding-right: 42px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.token-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.security-list { display: grid; gap: 18px; }
.security-item { display: flex; gap: 11px; }
.security-item svg { flex: 0 0 auto; color: var(--purple); }
.security-item strong { display: block; font-size: 10px; }
.security-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { position: relative; min-height: 30px; padding-left: 39px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--purple); background: var(--purple-soft); font-size: 9px; font-weight: 750; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.inline-loader { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.step a { color: var(--purple); font-weight: 650; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(24,18,27,.48); backdrop-filter: blur(4px); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(440px, 100%); padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(25,14,30,.28); animation: modalIn .18s ease-out; }
.modal--wide { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
@keyframes modalIn { from { transform: translateY(9px) scale(.985); opacity: .6; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 21px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.modal-head .icon-button { width: 31px; height: 31px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-actions .delete-link { margin-right: auto; padding: 0; border: 0; color: var(--red); background: transparent; cursor: pointer; font-size: 10px; font-weight: 650; }
.integration-section { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.integration-section + .integration-section { margin-top: 12px; }
.integration-section h4 { margin: 0 0 14px; font-size: 11px; }
.integration-section h4 span { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
.integration-remove { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--red); cursor: pointer; font-size: 9px; }
.integration-remove input { width: 14px; min-height: 14px; height: 14px; }

.toast-region { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; gap: 9px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 40px)); padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: #fff; background: rgba(28,22,31,.95); box-shadow: 0 12px 30px rgba(24,16,29,.24); font-size: 10px; line-height: 1.45; animation: toastIn .2s ease-out; }
.toast svg { flex: 0 0 auto; color: #d66eb5; }
.toast--success svg { color: #5ed39d; }
.toast--error svg { color: #ff7c89; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

.skeleton { overflow: hidden; position: relative; background: #eeecf0; border-radius: 7px; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-line { height: 12px; width: 130px; }
.skeleton-row td { height: 66px; }

@media (max-width: 1120px) {
  .auth-showcase { padding-left: 42px; padding-right: 42px; }
  .auth-hero h1 { font-size: 48px; }
  .auth-features { grid-template-columns: 1fr; }
  .auth-feature { min-height: auto; display: grid; grid-template-columns: 25px 1fr; column-gap: 10px; }
  .auth-feature strong { margin: 1px 0 0; }
  .auth-feature span { grid-column: 2; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-panel { min-height: 100vh; padding: 30px 24px; }
  .sidebar { inset: auto 12px 12px; width: auto; height: 62px; padding: 7px; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 10px 30px rgba(32,22,37,.14); flex-direction: row; align-items: center; }
  .sidebar-brand, .nav-label, .demo-mini, .sidebar-spacer, .sidebar-user { display: none; }
  .nav-list { display: flex; flex: 1; gap: 4px; }
  .nav-item { min-height: 46px; padding: 0 14px; justify-content: center; }
  .nav-item span { display: none; }
  .main { margin-left: 0; padding-bottom: 84px; }
  .topbar { height: 59px; padding: 0 18px; }
  .wb-account-switcher span, .wb-account-switcher > svg { display: none; }
  .wb-account-switcher select { max-width: 150px; }
  .sync-status { display: none; }
  .content { padding: 24px 16px 40px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 25px; }
  .page-head p { max-width: 440px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search { min-width: 0; flex: 1; }
  .period-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .product-detail-head { grid-template-columns: 100px 1fr; align-items: start; }
  .product-detail-media { width: 100px; height: 124px; }
  .product-period-controls { grid-column: 1 / -1; width: 100%; justify-items: stretch; }
  .product-period-controls small { text-align: right; }
  .product-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-period-controls { align-items: stretch; }
  .period { width: 100%; }
  .period input { flex: 1; width: 0; }
  .schedule-summary { align-items: flex-start; flex-direction: column; }
  .schedule-presets { grid-template-columns: 1fr; }
  .schedule-presets-controls { flex-wrap: wrap; }
  .schedule-presets-note { grid-column: 1; }
  .schedule-stats { width: 100%; justify-content: space-between; }
}

@media (max-width: 560px) {
  .page-head { flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; justify-content: center; }
  .metrics, .cluster-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 105px; padding: 14px; }
  .metric-value { font-size: 20px; }
  .demo-banner { align-items: flex-start; flex-direction: column; }
  .demo-banner .button { width: 100%; justify-content: center; }
  .toolbar-left { flex-wrap: wrap; }
  .compact-select { flex: 1; }
  .campaign-head .page-actions { width: auto; }
  .campaign-head .page-actions { flex-wrap: wrap; }
  .campaign-title-row { flex-wrap: wrap; }
  .campaign-title-row h1 { width: 100%; }
  .campaign-meta { flex-wrap: wrap; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .cluster-tabs { width: 100%; }
  .cluster-tabs button { flex: 1; }
  .schedule-panel-head { align-items: flex-start; flex-direction: column; }
  .timezone { width: 100%; }
  .schedule-foot { align-items: stretch; flex-direction: column; }
  .schedule-foot .button { justify-content: center; }
  .schedule-presets-controls { align-items: stretch; flex-direction: column; }
  .schedule-presets-controls select { width: 100%; }
  .schedule-presets-controls .button { justify-content: center; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .token-actions { flex-direction: column-reverse; }
  .token-actions .button { width: 100%; justify-content: center; }
  .wb-account-row { align-items: flex-start; flex-direction: column; }
  .wb-account-actions { width: 100%; }
  .wb-account-actions .button { flex: 1; justify-content: center; }
  .wb-account-switcher select { max-width: 112px; }
  .marketplace-switch { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 9px; }
  .product-card-media { height: 180px; }
  .product-detail-head { grid-template-columns: 82px 1fr; gap: 13px; }
  .product-detail-media { width: 82px; height: 104px; }
  .product-detail-copy h1 { font-size: 19px; }
  .product-stock-head { align-items: flex-start; }
  .product-stock-grid { grid-template-columns: 1fr; }
  .product-metrics .metric-value { font-size: 18px; }
  .product-chart-panel { padding: 14px 0 9px; }
  .product-chart-head { padding: 0 14px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .product-chart-wrap { padding: 0 10px; }
}
