:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #e5e9f0;
  --line-strong: #dbe1e9;
  --text: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #315ee7;
  --primary-dark: #274dca;
  --primary-soft: #eef2ff;
  --violet: #6c5ce7;
  --success: #0f9f6e;
  --success-soft: #d9f8eb;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  --sidebar-width: 255px;
  --topbar-height: 56px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }

.app-shell { display: flex; width: 100vw; height: 100vh; overflow: hidden; }

.sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 var(--sidebar-width);
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #fff;
  transition: width .24s ease, flex-basis .24s ease;
}

.brand {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--topbar-height);
  padding: 0 20px;
  border: 0;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.brand-mark { position: relative; width: 27px; height: 27px; margin-right: 11px; flex: 0 0 auto; }
.brand-mark i { position: absolute; display: block; border-radius: 4px 10px 4px 10px; }
.brand-mark i:first-child { inset: 0 8px 8px 0; background: linear-gradient(145deg, #2764ef, #4b7af6); }
.brand-mark i:last-child { inset: 8px 0 0 8px; background: linear-gradient(145deg, #8c73ef, #405ff1); opacity: .95; }
.brand-text { font-size: 16px; font-weight: 750; letter-spacing: .1px; white-space: nowrap; }

.shop-switch-wrap { padding: 21px 16px 13px; border-bottom: 1px solid var(--line); }
.shop-switch {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.02);
  cursor: pointer;
  transition: border .18s ease, box-shadow .18s ease;
}
.shop-switch:hover, .shop-switch[aria-expanded="true"] { border-color: #aab8e8; box-shadow: 0 0 0 3px rgba(49,94,231,.08); }
.shop-switch .flag { font-size: 25px; line-height: 1; margin-right: 9px; }
.shop-switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.shop-switch svg { width: 16px; height: 16px; margin-left: auto; color: #64748b; }

.side-nav { padding: 5px 12px 12px; overflow-y: auto; scrollbar-width: thin; }
.side-nav-bottom { margin-top: auto; padding-top: 9px; padding-bottom: 10px; border-top: 1px solid var(--line); overflow: visible; }
.nav-section { margin-top: 14px; }
.nav-heading { height: 28px; padding: 0 4px; color: #64748b; font-size: 12px; line-height: 28px; white-space: nowrap; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 43px;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.nav-item:hover { background: #f5f7fb; color: #1e293b; }
.nav-item.active { background: #f0efff; color: #5b57de; font-weight: 600; }
.nav-item svg { flex: 0 0 auto; width: 18px; height: 18px; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item em { margin-left: auto; color: #ef4d5e; font-size: 11px; font-style: normal; white-space: nowrap; }

.workspace { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.topbar {
  position: relative;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  flex: 0 0 var(--topbar-height);
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.topbar-left, .topbar-right { display: flex; align-items: center; }
.topbar-left { gap: 13px; min-width: 0; }
.topbar-left h1 { margin: 0; overflow: hidden; color: #172033; font-size: 17px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { height: 100%; gap: 15px; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.icon-button:hover { background: #f3f5f9; color: var(--primary); }
.icon-button.bordered { border: 1px solid var(--line-strong); background: #fff; color: #64748b; }
.text-button { height: 34px; padding: 0 4px; border: 0; background: none; color: #334155; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: var(--primary); }
.trial-pill { height: 29px; padding: 0 12px; border: 1px solid #d9d5ff; border-radius: 999px; background: #f7f5ff; color: #6557d7; font-weight: 600; cursor: pointer; }
.trial-pill:hover { background: #efeaff; }
.top-divider { width: 1px; height: 22px; background: var(--line); }
.avatar-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: linear-gradient(145deg, #8270ed, #5d52db); color: #fff; font-size: 19px; cursor: pointer; box-shadow: 0 5px 13px rgba(83,74,198,.22); }
.avatar-button:hover { transform: translateY(-1px); }

.product-link { display: flex; align-items: center; gap: 7px; color: #172033; text-decoration: none; }
.product-link .product-logo { display: inline-grid; width: 18px; height: 18px; place-items: center; color: #3c68e7; font-size: 22px; font-weight: 800; transform: rotate(-15deg); }
.product-link span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.product-link b { font-size: 12px; letter-spacing: -.2px; white-space: nowrap; }
.product-link sup { color: #3264e8; font-size: 7px; }
.product-link small { margin-top: 3px; color: #334155; font-size: 8px; white-space: nowrap; }
.sparkboost .product-logo { color: #8559ef; }

.main-content { flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
.page { min-height: 100%; padding: 27px 26px 40px; }
.page-heading { margin-bottom: 18px; }
.page-heading h2 { margin: 0 0 6px; font-size: 20px; font-weight: 720; letter-spacing: -.25px; }
.page-heading p { margin: 0; color: #7b8797; font-size: 14px; }

.quota-card { height: 96px; padding: 17px 20px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.quota-card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.quota-line { color: #374151; font-size: 14px; }
.quota-track { width: 220px; height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e7eaf0; }
.quota-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5949db, #6659e9); transition: width .35s ease; }

.toolbar { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.search-field { position: relative; width: 190px; }
.search-field input {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #334155;
  transition: border .16s ease, box-shadow .16s ease;
}
.search-field input::placeholder { color: #8995a7; }
.search-field input:focus { border-color: #6b73e7; box-shadow: 0 0 0 3px rgba(99,102,241,.09); }
.search-field svg { position: absolute; top: 10px; right: 11px; width: 16px; height: 16px; color: #98a4b5; pointer-events: none; }
.filter-select { position: relative; min-width: 130px; height: 38px; }
.filter-select select {
  width: 100%;
  height: 100%;
  appearance: none;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.filter-select select:focus { border-color: #6b73e7; box-shadow: 0 0 0 3px rgba(99,102,241,.09); }
.filter-select svg { position: absolute; top: 11px; right: 10px; width: 15px; height: 15px; color: #94a3b8; pointer-events: none; }
.primary-button, .secondary-button, .ghost-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 7px;
  padding: 0 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .16s ease, border .16s ease, transform .16s ease;
}
.primary-button { border: 1px solid var(--primary); background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(49,94,231,.14); }
.primary-button:hover { border-color: var(--primary-dark); background: var(--primary-dark); transform: translateY(-1px); }
.secondary-button { border: 1px solid #dcdff0; background: #f6f6fc; color: #565bd5; }
.secondary-button:hover { border-color: #c4c8ed; background: #f0effc; }
.ghost-button { border: 1px solid var(--line-strong); background: #fff; color: #475569; }
.ghost-button:hover { border-color: #b9c2d0; background: #f8fafc; }
.danger-button { border: 1px solid #ef4444; background: #ef4444; color: #fff; }
.danger-button:hover { background: #dc2626; }
.primary-button svg, .secondary-button svg, .ghost-button svg { width: 16px; height: 16px; }
.toolbar .primary-button { margin-left: auto; }

.table-card { margin-top: 15px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.shop-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.shop-table th { height: 47px; padding: 0 16px; background: #fbfcfd; color: #64748b; font-weight: 500; text-align: left; }
.shop-table td { height: 86px; padding: 11px 16px; border-top: 1px solid #edf0f4; color: #3c4657; vertical-align: middle; }
.shop-table th:nth-child(1) { width: 34%; }
.shop-table th:nth-child(2) { width: 15%; }
.shop-table th:nth-child(3) { width: 15%; }
.shop-table th:nth-child(4) { width: 18%; }
.shop-table th:nth-child(5) { width: 18%; text-align: right; }
.shop-table td:last-child { text-align: right; }
.shop-info { display: flex; align-items: center; min-width: 0; }
.shop-avatar { display: grid; width: 37px; height: 37px; margin-right: 12px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: linear-gradient(145deg,#efdcfb,#d5b5f5); color: #fff; font-weight: 650; }
.shop-copy { min-width: 0; }
.shop-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shop-name { overflow: hidden; color: #1f2937; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.shop-country { color: #536174; font-size: 12px; white-space: nowrap; }
.shop-meta { margin-top: 6px; overflow: hidden; color: #7d8999; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--success-soft); color: #26775f; font-size: 12px; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #1b8e67; }
.table-action { height: 31px; padding: 0 11px; border: 1px solid #d7daf0; border-radius: 6px; background: #f8f7ff; color: #5c5ed5; cursor: pointer; }
.table-action:hover { border-color: #b9bced; background: #efefff; }
.empty-row td { height: 160px; text-align: center !important; }
.empty-state { display: flex; align-items: center; justify-content: center; flex-direction: column; color: #98a2b3; }
.empty-state-icon { position: relative; width: 54px; height: 38px; margin-bottom: 11px; border: 1px solid #dfe4eb; border-radius: 6px; background: #f8fafc; }
.empty-state-icon::before { content: ""; position: absolute; top: -9px; left: 9px; width: 32px; height: 13px; border: 1px solid #dfe4eb; border-bottom: 0; border-radius: 6px 6px 0 0; background: #fbfcfd; }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 17px; color: #64748b; }
.pagination button { display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #8b96a7; cursor: pointer; }
.pagination button.current { border-color: var(--primary); background: var(--primary); color: #fff; }
.pagination button:disabled { background: #f2f5f8; color: #c6ced8; cursor: not-allowed; }
.pagination select { height: 36px; margin-left: 3px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff; color: #64748b; }

.popover-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.popover {
  position: fixed;
  z-index: 41;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15,23,42,.14);
  animation: pop-in .14s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.shop-popover { width: 295px; padding: 11px; }
.popover-search { position: relative; }
.popover-search input { width: 100%; height: 36px; padding: 0 34px 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; }
.popover-search input:focus { border-color: #6974e7; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.popover-search svg { position: absolute; top: 10px; right: 10px; width: 16px; height: 16px; color: #94a3b8; }
.shop-option { display: flex; align-items: center; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 8px; background: #f8f9ff; cursor: pointer; text-align: left; }
.shop-option:hover { background: #eef1ff; }
.mini-avatar { display: grid; width: 34px; height: 34px; margin-right: 9px; place-items: center; border-radius: 7px; background: #e4ccf7; color: #fff; font-weight: 650; }
.shop-option-copy { display: flex; min-width: 0; flex-direction: column; }
.shop-option-copy b { font-size: 13px; }
.shop-option-copy small { color: #8290a2; font-size: 11px; }
.popover-footer-link { display: flex; justify-content: flex-end; margin-top: 9px; padding: 7px 3px 2px; border: 0; background: none; color: #5a5fd4; cursor: pointer; }
.language-popover { width: 185px; padding: 7px; }
.language-option { display: flex; align-items: center; width: 100%; height: 37px; gap: 9px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; }
.language-option:hover, .language-option.selected { background: #f2f3ff; color: #5356c9; }
.profile-popover { width: 245px; padding: 13px; }
.profile-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#8270ed,#5d52db); color: #fff; font-size: 20px; }
.profile-copy { display: flex; flex-direction: column; }
.profile-copy b { font-size: 13px; }
.profile-copy small { margin-top: 3px; color: #8490a1; }
.profile-menu { padding-top: 8px; }
.profile-menu button { display: flex; align-items: center; width: 100%; height: 37px; gap: 10px; padding: 0 9px; border: 0; border-radius: 7px; background: none; color: #475569; cursor: pointer; }
.profile-menu button:hover { background: #f5f7fb; }
.profile-menu button.danger-link { color: #e54b4b; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(17,24,39,.5); animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: modal-in .18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-lg { width: min(100%, 820px); }
.modal-xl { width: min(100%, 980px); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 27px 28px 0; }
.modal-title h3 { margin: 0; font-size: 18px; }
.modal-title p { margin: 8px 0 0; color: #738092; line-height: 1.8; }
.modal-close { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #98a2b3; cursor: pointer; }
.modal-close:hover { background: #f4f5f7; color: #475569; }
.modal-body { padding: 22px 28px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 0 28px 28px; }
.form-label { display: block; margin-bottom: 8px; color: #263143; font-size: 13px; font-weight: 650; }
.required { color: #ef4444; }
.modal-select { position: relative; }
.modal-select select { width: 100%; height: 41px; appearance: none; padding: 0 36px 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; background: #fff; }
.modal-select svg { position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; color: #94a3b8; pointer-events: none; }
.info-box { display: flex; align-items: flex-start; gap: 8px; margin-top: 17px; padding: 12px 14px; border: 1px solid #c4daf9; border-radius: 7px; background: #f1f7ff; color: #41648e; font-size: 12px; line-height: 1.7; }
.info-box svg { width: 16px; height: 16px; margin-top: 1px; flex: 0 0 auto; }

.guide-modal { width: min(100%, 850px); overflow: hidden; }
.guide-layout { display: grid; grid-template-columns: 235px 1fr; min-height: 450px; }
.guide-sidebar { padding: 26px 16px; border-right: 1px solid var(--line); background: #fbfcff; }
.guide-sidebar h3 { margin: 0 10px 17px; font-size: 18px; }
.guide-tab { display: flex; align-items: center; width: 100%; height: 43px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #536174; cursor: pointer; text-align: left; }
.guide-tab:hover, .guide-tab.active { background: #eeefff; color: #5557ce; font-weight: 600; }
.guide-link { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 11px 12px; border-top: 1px solid var(--line); color: #5458cf; text-decoration: none; }
.guide-content { position: relative; display: grid; min-width: 0; padding: 28px; place-items: center; background: linear-gradient(145deg,#171b2e,#2d3453); color: #fff; }
.video-preview { width: 100%; max-width: 520px; text-align: center; }
.video-frame { position: relative; display: grid; aspect-ratio: 16/9; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: radial-gradient(circle at 65% 30%,rgba(90,94,225,.62),transparent 34%), linear-gradient(135deg,#17233a,#171828); }
.video-frame::before { content: "PROBOOST.AI"; position: absolute; top: 20px; left: 22px; color: rgba(255,255,255,.8); font-size: 18px; font-weight: 750; }
.play-button { display: grid; width: 62px; height: 62px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #525be0; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.play-button:hover { transform: scale(1.04); }
.play-button svg { width: 26px; height: 26px; }
.video-preview h4 { margin: 18px 0 5px; font-size: 18px; }
.video-preview p { margin: 0; color: rgba(255,255,255,.66); }
.guide-close { position: absolute; top: 12px; right: 12px; z-index: 2; color: rgba(255,255,255,.7); }
.guide-close:hover { background: rgba(255,255,255,.1); color: #fff; }

.task-table { width: 100%; border-collapse: collapse; }
.task-table th { padding: 12px; background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 550; text-align: left; }
.task-table td { height: 100px; padding: 12px; border-top: 1px solid var(--line); color: #94a3b8; text-align: center; }

.placeholder-page { display: grid; min-height: calc(100vh - var(--topbar-height) - 54px); place-items: center; }
.placeholder-card { width: min(620px,100%); padding: 46px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; box-shadow: 0 10px 35px rgba(15,23,42,.04); }
.placeholder-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 18px; place-items: center; border-radius: 16px; background: var(--primary-soft); color: #5c5fd4; }
.placeholder-icon svg { width: 29px; height: 29px; }
.placeholder-card h2 { margin: 0 0 10px; font-size: 24px; }
.placeholder-card p { margin: 0 auto 22px; max-width: 430px; color: #718096; line-height: 1.8; }

.toast-root { position: fixed; z-index: 100; right: 22px; top: 72px; display: flex; width: min(360px, calc(100vw - 44px)); flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid #dfe4eb; border-radius: 10px; background: #fff; color: #334155; box-shadow: 0 12px 30px rgba(15,23,42,.13); animation: toast-in .22s ease-out; }
.toast.success svg { color: #14936a; }
.toast.info svg { color: #416fdc; }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.sidebar.collapsed { width: 74px; flex-basis: 74px; }
.sidebar.collapsed .brand { justify-content: center; padding: 0; }
.sidebar.collapsed .brand-mark { margin-right: 0; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .shop-switch-name,
.sidebar.collapsed .shop-switch svg,
.sidebar.collapsed .nav-heading,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-item em { display: none; }
.sidebar.collapsed .shop-switch-wrap { padding: 21px 12px 13px; }
.sidebar.collapsed .shop-switch { justify-content: center; padding: 0; }
.sidebar.collapsed .shop-switch .flag { margin-right: 0; }
.sidebar.collapsed .side-nav { padding-right: 9px; padding-left: 9px; }
.sidebar.collapsed .nav-section { margin-top: 8px; }
.sidebar.collapsed .nav-item { justify-content: center; gap: 0; padding: 0; }

@media (max-width: 1180px) {
  .product-link { display: none; }
  .page { padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 850px) {
  body { overflow: auto; }
  .app-shell { min-height: 100vh; height: auto; overflow: visible; }
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 10px 0 30px rgba(15,23,42,.12); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { width: var(--sidebar-width); flex-basis: var(--sidebar-width); }
  .sidebar.collapsed .brand { justify-content: flex-start; padding: 0 20px; }
  .sidebar.collapsed .brand-mark { margin-right: 11px; }
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .shop-switch-name,
  .sidebar.collapsed .shop-switch svg,
  .sidebar.collapsed .nav-heading,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .nav-item em { display: initial; }
  .sidebar.collapsed .shop-switch-wrap { padding: 21px 16px 13px; }
  .sidebar.collapsed .shop-switch { justify-content: flex-start; padding: 0 12px; }
  .sidebar.collapsed .shop-switch .flag { margin-right: 9px; }
  .sidebar.collapsed .side-nav { padding-right: 12px; padding-left: 12px; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; gap: 12px; padding: 0 12px; }
  .workspace { width: 100%; }
  .topbar { position: sticky; top: 0; }
  .topbar-right { gap: 7px; }
  .topbar-right .text-button, .trial-pill, .top-divider { display: none; }
  .main-content { overflow: visible; }
  .page { padding: 22px 14px 35px; }
  .toolbar { flex-wrap: wrap; }
  .search-field { width: calc(50% - 5px); }
  .filter-select { width: calc(50% - 5px); }
  .toolbar .primary-button { width: 100%; margin-left: 0; }
  .table-card { overflow-x: auto; }
  .shop-table { min-width: 830px; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .topbar { padding: 0 10px; }
  .topbar-left { gap: 8px; }
  .topbar-left h1 { font-size: 15px; }
  .topbar-right .icon-button:nth-of-type(1) { display: none; }
  .page-heading h2 { font-size: 18px; }
  .quota-track { width: 100%; }
  .search-field, .filter-select { width: 100%; }
  .pagination { flex-wrap: wrap; }
  .modal-backdrop { padding: 10px; }
  .modal-header { padding: 22px 20px 0; }
  .modal-body { padding: 19px 20px; }
  .modal-footer { padding: 0 20px 22px; }
  .placeholder-card { padding: 34px 22px; }
}

/* Complete admin demo pages */
.heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.content-card { margin-top: 16px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.content-card h3 { margin: 0 0 5px; color: #1f2937; font-size: 15px; }
.content-card p { margin: 0; color: #7b8797; line-height: 1.6; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.card-head .selection-count, .selection-count { padding: 6px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 650; white-space: nowrap; }
.flush { margin-top: 0; }
.table-section { padding-bottom: 14px; }
.wide-scroll { overflow-x: auto; }

.steps { display: flex; align-items: center; max-width: 760px; margin: 8px auto 22px; }
.step { position: relative; display: flex; align-items: center; flex: 1; gap: 9px; color: #9aa5b4; }
.step:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 17px; left: 42px; right: 12px; height: 1px; background: #dde3eb; }
.step span { position: relative; z-index: 1; display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #d8dfe8; border-radius: 50%; background: #fff; font-size: 12px; }
.step span svg { width: 15px; height: 15px; }
.step b { position: relative; z-index: 1; padding-right: 10px; background: var(--bg); font-size: 13px; font-weight: 650; white-space: nowrap; }
.step.active { color: var(--primary); }
.step.active span { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(49,94,231,.1); }
.step.done { color: #4f65ca; }
.step.done span { border-color: #8395e5; background: #eef2ff; }
.step.done::after { background: #9aa9e8; }
.wizard-page .content-card { min-height: 360px; }
.wizard-footer { position: sticky; z-index: 5; bottom: -40px; display: flex; align-items: center; gap: 10px; margin: 18px -26px -40px; padding: 14px 26px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(15,23,42,.05); backdrop-filter: blur(10px); }
.wizard-footer span { flex: 1; }

.inline-form, .filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.commission-row { margin: 4px 0 16px; padding: 12px; border: 1px solid #e4e8f0; border-radius: 8px; background: #fafbfc; }
.commission-row label { color: #536174; font-size: 12px; }
.commission-row input { width: 76px; height: 34px; margin-left: 6px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 6px; outline: none; }
.grow { width: min(320px, 100%); flex: 1 1 220px; }
.compact-field { display: flex; min-width: 145px; flex-direction: column; gap: 6px; color: #667386; font-size: 12px; }
.compact-field select, .compact-field input { height: 39px; padding: 0 32px 0 11px; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; background: #fff; color: #374151; }
.compact-field input { padding-right: 11px; }
.filter-bar.multi .grow { max-width: 300px; }
.filter-note { align-self: center; color: #8793a3; font-size: 12px; }

.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { height: 46px; padding: 0 13px; background: #fafbfc; color: #687588; font-size: 12px; font-weight: 550; text-align: left; }
.data-table td { min-height: 62px; padding: 12px 13px; border-top: 1px solid #edf0f4; color: #465264; vertical-align: middle; }
.data-table td > b, .data-table td > small { display: block; }
.data-table td > b { color: #273244; font-size: 13px; }
.data-table td > small { margin-top: 5px; color: #8894a4; font-size: 11px; }
.data-table tbody tr:hover { background: #fbfcff; }
.table-checkbox { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.product-cell, .creator-cell { display: flex; align-items: center; gap: 10px; }
.product-cell > span:first-child { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: #f2f5fa; font-size: 20px; }
.creator-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#ede6ff,#d7e3ff); color: #5d61c9; font-size: 11px; font-weight: 750; }
.creator-avatar.large { width: 64px; height: 64px; font-size: 16px; }
.creator-cell > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.creator-cell small { color: #8995a4; font-size: 11px; }
.creator-table { min-width: 1180px; }
.sample-table { min-width: 1280px; }
.task-list { min-width: 1180px; }
.link-button { padding: 3px 4px; border: 0; background: none; color: #4e62d1; cursor: pointer; font-size: 12px; }
.link-button:hover { color: #2f46b5; text-decoration: underline; }
.danger-text { color: #df4b52; }
.danger-text:hover { color: #c8333b; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.row-actions.vertical { align-items: flex-start; flex-direction: column; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 170px; white-space: normal; }
.tags span { padding: 3px 7px; border-radius: 999px; background: #f0f3fa; color: #5c687a; font-size: 10px; }

.state-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.state-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state-pill.success { background: #e1f7ee; color: #18805d; }
.state-pill.primary { background: #e9efff; color: #4265d6; }
.state-pill.warning { background: #fff3d9; color: #a5670d; }
.state-pill.danger { background: #ffe8e8; color: #c7424a; }
.state-pill.neutral { background: #eff2f5; color: #687588; }

.sub-tabs, .period-tabs, .status-tabs { display: flex; align-items: center; gap: 3px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sub-tabs.wrap { flex-wrap: wrap; }
.sub-tabs > button, .period-tabs button, .status-tabs button { position: relative; height: 40px; padding: 0 14px; border: 0; background: transparent; color: #657285; cursor: pointer; }
.sub-tabs > button::after, .status-tabs button::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: transparent; }
.sub-tabs > button.active, .period-tabs button.active, .status-tabs button.active { color: var(--primary); font-weight: 650; }
.sub-tabs > button.active::after, .status-tabs button.active::after { background: var(--primary); }
.sub-tabs > span { flex: 1; }
.sub-tabs label { display: flex; align-items: center; gap: 7px; margin-left: auto; color: #768294; font-size: 12px; }
.sub-tabs select { height: 31px; border: 1px solid var(--line-strong); border-radius: 6px; }
.period-tabs { width: fit-content; padding: 3px; border: 0; border-radius: 8px; background: #f1f4f8; }
.period-tabs button { height: 32px; border-radius: 6px; }
.period-tabs button.active { background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.status-tabs { margin-top: 18px; }
.status-tabs button span { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #f0f3f7; font-size: 10px; }

.form-card { max-width: 980px; margin-right: auto; margin-left: auto; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-field { display: flex; position: relative; flex-direction: column; gap: 8px; color: #536174; font-size: 12px; }
.form-field > span { color: #364152; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; background: #fff; color: #253044; }
.form-field input, .form-field select { height: 41px; padding: 0 12px; }
.form-field textarea { min-height: 90px; padding: 11px 12px; resize: vertical; line-height: 1.65; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .compact-field select:focus, .commission-row input:focus { border-color: #7887df; box-shadow: 0 0 0 3px rgba(49,94,231,.08); }
.form-field > small { align-self: flex-end; color: #96a0ad; }
.summary-strip { display: flex; gap: 30px; margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: #f6f8fc; color: #687588; }
.summary-strip b { color: #334155; }

.message-builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 22px; }
.message-builder-head > div:last-child { display: flex; gap: 7px; }
.message-builder { display: grid; gap: 12px; margin-top: 14px; }
.message-block { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; background: #fafbfc; }
.message-block-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #f4f6f9; }
.message-block-head button { display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 5px; background: none; color: #8b96a6; cursor: pointer; }
.message-block textarea { width: 100%; min-height: 110px; padding: 12px; border: 0; outline: none; resize: vertical; }
.editor-tools { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-top: 1px solid var(--line); color: #96a0ad; font-size: 11px; }
.upload-box { display: grid; width: calc(100% - 24px); min-height: 112px; margin: 12px; place-items: center; border: 1px dashed #bec7d5; border-radius: 8px; background: #fff; color: #69758a; cursor: pointer; }
.picked-product { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 23px; }
.picked-product span { display: flex; flex: 1; flex-direction: column; gap: 3px; font-size: 12px; }
.picked-product small { color: #8b96a6; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.metric-card { min-width: 0; padding: 15px; border: 1px solid #e8ebf1; border-radius: 9px; background: linear-gradient(145deg,#fff,#fafbff); }
.metric-card span, .metric-card small { display: block; color: #7b8798; font-size: 11px; }
.metric-card strong { display: block; margin: 8px 0 5px; color: #1f2a3d; font-size: 23px; }
.metric-card small { color: #31906e; }
.progress-cell > span { display: block; width: 100px; height: 5px; overflow: hidden; border-radius: 999px; background: #e7eaf0; }
.progress-cell i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress-cell small { display: block; margin-top: 6px; color: #8995a4; font-size: 10px; }
.bulk-bar { position: sticky; z-index: 4; bottom: 0; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 12px; border: 1px solid #dfe4ec; border-radius: 9px; background: rgba(255,255,255,.96); box-shadow: 0 8px 25px rgba(15,23,42,.08); backdrop-filter: blur(8px); }
.bulk-bar > span { flex: 1; color: #687588; }
.bulk-bar b { color: var(--primary); }

.sync-banner, .warning-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 13px 16px; border: 1px solid #ccdbf3; border-radius: 9px; background: #f2f7ff; color: #486486; }
.sync-banner > div { display: flex; flex-direction: column; gap: 4px; }
.sync-banner span { font-size: 12px; }
.warning-banner { justify-content: flex-start; border-color: #f0d49b; background: #fff9eb; color: #8a631f; }
.warning-banner svg { flex: 0 0 auto; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.feature-card { display: flex; min-height: 144px; gap: 13px; padding: 17px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; cursor: pointer; text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover { transform: translateY(-2px); border-color: #bfc8e7; box-shadow: 0 10px 28px rgba(15,23,42,.07); }
.feature-card > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.feature-card b { color: #263144; }
.feature-card small { margin-top: 7px; color: #7d8999; line-height: 1.55; }
.feature-card em { margin-top: auto; padding-top: 10px; color: #5365cf; font-size: 11px; font-style: normal; }
.feature-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #f0f2ff; color: #5964d5; font-size: 18px; }
.option-list { display: grid; gap: 8px; margin-bottom: 15px; }
.option-list label { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.option-list input { accent-color: var(--primary); }
.invitation-options label span { display: flex; flex-direction: column; gap: 3px; }
.invitation-options small { color: #8793a3; }

.market-search { display: flex; gap: 9px; margin-bottom: 10px; }
.condition-chips { display: flex; align-items: center; min-height: 37px; gap: 7px; margin: 12px 0; padding: 7px 9px; border-radius: 7px; background: #f8fafc; color: #8a95a4; font-size: 11px; }
.condition-chips button, .tag-suggestions button { padding: 5px 9px; border: 1px solid #dce2ec; border-radius: 999px; background: #fff; color: #5d697c; cursor: pointer; }
.creator-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 14px; }
.creator-layout.full { display: block; }
.creator-layout > .content-card { margin-top: 0; min-width: 0; }
.group-panel { overflow: hidden; align-self: start; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.group-head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.group-head button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 6px; background: #f3f5fa; color: #5b68ce; cursor: pointer; }
.group-panel > button { display: flex; align-items: center; width: 100%; height: 42px; padding: 0 14px; border: 0; background: #fff; color: #5d697b; cursor: pointer; text-align: left; }
.group-panel > button:hover, .group-panel > button.active { background: #f2f3ff; color: #565ac8; }
.group-panel > button em { margin-left: auto; color: #929dac; font-size: 11px; font-style: normal; }
.creator-detail-head { display: flex; align-items: center; gap: 14px; }
.creator-detail-head p { margin: 8px 0 0; color: #7b8797; }
.detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.detail-metrics > div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.detail-metrics span, .detail-metrics b { display: block; }
.detail-metrics span { color: #8793a3; font-size: 11px; }
.detail-metrics b { margin-top: 5px; color: #2d3748; }
.tag-suggestions, .select-actions { display: flex; gap: 7px; margin-top: 10px; }

.member-quota { margin-bottom: 16px; }
.button-badge { display: inline-grid; min-width: 18px; height: 18px; margin-left: 5px; place-items: center; border-radius: 999px; background: #eef1f7; font-size: 10px; }
.pending-list { display: grid; gap: 10px; }
.pending-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.pending-list article > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.pending-list span { color: #8591a0; font-size: 11px; }
.empty-panel { display: grid; min-height: 150px; place-items: center; border: 1px dashed #d8dee7; border-radius: 9px; color: #919cab; }
.side-drawer { position: fixed; top: 0; right: 0; width: min(520px,100%); max-height: 100vh; height: 100vh; border-radius: 0; animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }

.plan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,400px)); gap: 16px; }
.plan-card { position: relative; padding: 25px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fff; }
.plan-card.current { border-color: #8794e3; box-shadow: 0 10px 35px rgba(49,94,231,.09); }
.plan-label { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef1ff; color: #5263ca; font-size: 11px; }
.plan-card h3 { margin: 16px 0 8px; font-size: 20px; }
.plan-card strong { font-size: 34px; }
.plan-card strong small { color: #7b8797; font-size: 12px; }
.plan-card ul { min-height: 130px; padding-left: 20px; color: #5f6b7c; line-height: 2; }
.profile-settings { max-width: 880px; }
.profile-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-hero > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#8270ed,#5d52db); color: #fff; font-weight: 750; }
.profile-hero > div { flex: 1; }
.profile-hero h3 { margin: 0; }
.profile-hero p { margin-top: 4px; }
.settings-actions { display: flex; gap: 9px; margin-top: 20px; }
.guide-checklist { display: grid; gap: 9px; }
.guide-checklist button { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; text-align: left; }
.guide-checklist button:hover { border-color: #bfc8e7; background: #fafbff; }
.guide-checklist span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #eef1ff; color: #5865cc; }
.guide-checklist em { color: #8c97a6; font-size: 11px; font-style: normal; }

@media (max-width: 1350px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(140px,1fr)); }
  .feature-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .creator-layout { grid-template-columns: 1fr; }
  .group-panel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .group-head { grid-column: 1 / -1; }
  .form-grid.two { grid-template-columns: 1fr; }
  .detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .heading-row, .card-head, .message-builder-head { align-items: stretch; flex-direction: column; }
  .heading-actions { justify-content: flex-start; }
  .steps { align-items: flex-start; flex-direction: column; gap: 9px; }
  .step { width: 100%; }
  .step::after { display: none; }
  .step b { background: transparent; }
  .wizard-footer { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .metric-grid, .feature-grid, .plan-grid { grid-template-columns: 1fr; }
  .summary-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sub-tabs { overflow-x: auto; }
  .sub-tabs > button { flex: 0 0 auto; }
  .bulk-bar { align-items: stretch; flex-direction: column; }
  .bulk-bar > span { flex: auto; }
  .guide-checklist button { grid-template-columns: 34px 1fr; }
  .guide-checklist em { grid-column: 2; }
}
