:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: #18233a;
  background: #f5f7fb;
  --navy: #141d35;
  --navy-soft: #202c49;
  --accent: #594fd2;
  --accent-hover: #483dbc;
  --accent-soft: #f0efff;
  --text: #18233a;
  --muted: #5f6b82;
  --muted-light: #65718a;
  --line: #e5eaf2;
  --surface: #fff;
  --shadow: 0 12px 36px rgba(26, 41, 76, .045);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, .mapping-dialog, .combo-menu, .table-wrap, .mapping-list, .account-sku-list { scrollbar-width: thin; scrollbar-color: #aaa3d5 transparent; }
@supports selector(::-webkit-scrollbar) {
  html, .mapping-dialog, .combo-menu, .table-wrap, .mapping-list, .account-sku-list { scrollbar-width: auto; scrollbar-color: auto; }
}
html::-webkit-scrollbar, .mapping-dialog::-webkit-scrollbar, .combo-menu::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .mapping-list::-webkit-scrollbar, .account-sku-list::-webkit-scrollbar { width: 9px; height: 9px; }
html::-webkit-scrollbar-track, .mapping-dialog::-webkit-scrollbar-track, .combo-menu::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .mapping-list::-webkit-scrollbar-track, .account-sku-list::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb, .mapping-dialog::-webkit-scrollbar-thumb, .combo-menu::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .mapping-list::-webkit-scrollbar-thumb, .account-sku-list::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #aaa3d5; background-clip: padding-box; }
html::-webkit-scrollbar-thumb:hover, .mapping-dialog::-webkit-scrollbar-thumb:hover, .combo-menu::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover, .mapping-list::-webkit-scrollbar-thumb:hover, .account-sku-list::-webkit-scrollbar-thumb:hover { background-color: #8178c8; }
html::-webkit-scrollbar-button, .mapping-dialog::-webkit-scrollbar-button, .combo-menu::-webkit-scrollbar-button, .table-wrap::-webkit-scrollbar-button, .mapping-list::-webkit-scrollbar-button, .account-sku-list::-webkit-scrollbar-button { display: none !important; width: 0 !important; height: 0 !important; -webkit-appearance: none; appearance: none; }
body { min-width: 0; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
svg { flex: 0 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); }
p { line-height: 1.55; }
:focus-visible { outline: 3px solid #aaa4f4; outline-offset: 3px; }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
}
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }

.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 640px;
  padding: 28px 16px 20px;
  background: var(--navy);
  color: #dce4fa;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #847af8, #5c51d9);
  box-shadow: 0 9px 20px rgba(66, 59, 184, .25);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
}
.brand-copy { min-width: 0; }
.brand-copy strong, .login-brand strong { display: block; color: #fff; font-size: .98rem; letter-spacing: -.035em; }
.brand-copy small, .login-brand small { display: block; margin-top: 3px; color: #9caacd; font-size: .59rem; font-weight: 700; letter-spacing: .15em; }
.sidebar-caption { margin: 49px 19px 12px; color: #8493b8; font-size: .63rem; font-weight: 800; letter-spacing: .14em; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #aebbd7;
  font-size: .86rem;
  font-weight: 600;
  transition: background .16s, color .16s, border-color .16s;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-nav a.active { border-color: rgba(185, 179, 255, .15); background: #30355f; color: #fff; }
.nav-icon, .button-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav a.active .nav-icon { color: #b8b1ff; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .11); }
.sidebar-account { display: flex; align-items: center; gap: 10px; padding: 0 10px 13px; }
.account-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #303b5c; color: #e8e9ff; font-size: .7rem; font-weight: 800; }
.sidebar-account strong { display: block; color: #f5f7ff; font-size: .75rem; }
.sidebar-account small { display: block; margin-top: 3px; color: #8f9dbc; font-size: .65rem; }
.logout-button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: #b3bed6; font-size: .83rem; font-weight: 600; text-align: left; }
.logout-button:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.content-shell { min-width: 0; }
.main-content { max-width: 1500px; min-width: 0; margin: 0 auto; padding: 42px 48px 24px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 38px; }
.topbar h1 { margin: 7px 0 7px; font-size: clamp(1.9rem, 2.3vw, 2.35rem); font-weight: 750; letter-spacing: -.055em; line-height: 1.15; }
.topbar p { max-width: 650px; margin: 0; color: var(--muted); font-size: .9rem; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 5px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; max-width: 100%; padding: 5px 11px; border: 1px solid #dedbf8; border-radius: 999px; background: #f1f0ff; color: #554ac0; font-size: .7rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { border-color: #cdebdc; background: #e9f8f0; color: #197c57; }
button.primary, button.secondary, .small-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border-radius: 10px; font-size: .81rem; font-weight: 750; line-height: 1.2; transition: background .16s, color .16s, border-color .16s, transform .16s; }
button.primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(89, 79, 210, .17); }
button.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); transform: translateY(-1px); }
button.secondary { border: 1px solid #dbe2ec; background: #fff; color: #34415c; }
button.secondary:hover:not(:disabled) { border-color: #aca5eb; background: #f8f7ff; color: var(--accent-hover); }
.button-icon { width: 16px; height: 16px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-heading h2 { margin: 0 0 3px; font-size: 1.17rem; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.section-meta { color: var(--muted-light); font-size: .74rem; white-space: nowrap; }
.section-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.processing-health { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #dbe2ec; border-radius: 11px; background: #fff; color: #40506b; font-size: .79rem; line-height: 1.5; }
.processing-health.warning { border-color: #f0d5bd; background: #fff8ef; color: #835018; }
.processing-health:empty { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.stat, .panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.stat { position: relative; min-height: 154px; padding: 23px 22px; overflow: hidden; }
.stat::after { content: ""; position: absolute; top: 25px; right: 22px; width: 10px; height: 10px; border-radius: 3px; background: var(--stat-color); box-shadow: 0 0 0 7px var(--stat-bg); }
.stat-new { --stat-color: #7869dd; --stat-bg: #f0edff; }
.stat-progress { --stat-color: #d79b3d; --stat-bg: #fff4df; }
.stat-done { --stat-color: #3caa76; --stat-bg: #e9f8ef; }
.stat-review { --stat-color: #d98172; --stat-bg: #fff0ed; }
.stat-label { display: block; padding-right: 23px; color: #65718a; font-size: .78rem; font-weight: 700; }
.stat strong { display: block; margin: 14px 0 3px; font-size: 2.05rem; font-variant-numeric: tabular-nums; letter-spacing: -.06em; line-height: 1; }
.stat small { color: var(--muted-light); font-size: .72rem; }
.earnings-section { margin: 0 0 28px; }
.earnings-section .section-heading { margin-bottom: 16px; }
.earnings-link { color: var(--accent); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.earnings-link:hover { color: var(--accent-hover); text-decoration: underline; }
.earnings-link span { margin-left: 5px; }
.earnings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.earnings-card { display: flex; flex-direction: column; min-width: 0; min-height: 135px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.earnings-card > span { color: #5f6b82; font-size: .77rem; font-weight: 700; }
.earnings-card strong { margin: 15px 0 6px; font-size: clamp(1.35rem, 2vw, 1.9rem); font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
.earnings-card small { margin-top: auto; color: var(--muted-light); font-size: .71rem; }
.earnings-profit { border-color: #dcd7fa; background: #f8f7ff; }
.earnings-profit strong { color: #4e45b8; }
.earnings-footnote { margin: 11px 1px 0; color: var(--muted-light); font-size: .72rem; line-height: 1.5; }
.earnings-footnote:empty { display: none; }
.earnings-report { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); scroll-margin-top: 22px; }
.earnings-report .earnings-card { min-height: 130px; box-shadow: none; background: #fcfdff; }
.earnings-report .earnings-profit { background: #f8f7ff; }
.earnings-heading { align-items: end; }
.earnings-heading h2 { margin-top: 5px; }
.earnings-range { flex: 0 0 185px; width: 185px; }
.earnings-range > label { margin-bottom: 7px; font-size: .71rem; }
.earnings-range .category-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; left: 0; margin: 0; box-shadow: 0 16px 35px rgba(25, 34, 70, .14); }
.earnings-detail { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: #53617a; font-size: .74rem; font-weight: 650; }
.earnings-detail #earnings-updated { margin-left: auto; color: var(--muted-light); font-weight: 500; }
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.panel { min-width: 0; padding: 25px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.panel-head h2 { margin: 5px 0 0; font-size: 1.16rem; letter-spacing: -.035em; }
.panel > p { max-width: 620px; margin-bottom: 18px; color: var(--muted); font-size: .81rem; }
.panel-note { margin-top: 23px; padding-top: 16px; border-top: 1px solid #edf0f6; color: var(--muted-light); font-size: .73rem; line-height: 1.5; }
.connection { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 53px; border-bottom: 1px solid #edf0f6; font-size: .82rem; }
.connection > span { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.connection strong { color: #4e5d78; font-size: .72rem; text-align: right; }
.connection-dot { display: inline-block; width: 9px; height: 9px; border: 2px solid #6f69cf; border-radius: 50%; background: #f3f1ff; }
.connection:nth-last-child(2) { border-bottom: 0; }

.table-panel { padding: 0; overflow: hidden; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; text-align: left; }
.orders-table { min-width: 1080px; }
.orders-table th, .orders-table td { padding-right: 13px; padding-left: 13px; }
.orders-table th:first-child, .orders-table td:first-child { min-width: 102px; white-space: nowrap; }
.orders-table th:nth-child(4), .orders-table td:nth-child(4) { min-width: 125px; white-space: nowrap; }
thead { background: #f9fafe; }
th { padding: 16px 19px; border-bottom: 1px solid var(--line); color: #5f6b82; font-size: .66rem; font-weight: 800; letter-spacing: .085em; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px 19px; border-bottom: 1px solid #edf0f6; color: #4d5b75; font-size: .78rem; line-height: 1.5; vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcff; }
td.cell-main { color: #26334d; font-weight: 700; }
td.order-time { min-width: 142px; white-space: nowrap; }
.order-time strong { display: block; color: #26334d; font-size: .78rem; font-weight: 700; }
.order-time span { display: block; }
.order-time small { display: block; margin-top: 2px; color: var(--muted-light); font-size: .7rem; }
.table-product { display: block; min-width: 0; }
.table-product strong { display: block; color: #26334d; font-size: .79rem; font-weight: 750; }
.table-product small { display: block; margin-top: 3px; color: var(--muted-light); font-size: .7rem; font-weight: 500; }
.table-product a { display: inline-block; margin-top: 4px; color: var(--accent); font-size: .7rem; font-weight: 700; }
.table-product a:hover { text-decoration: underline; }
td.note { max-width: 260px; color: #65718a; font-size: .75rem; }
td.note .order-delivery-check { display: block; margin-top: 6px; color: #34435f; font-weight: 650; white-space: normal; }
td.actions-cell { white-space: nowrap; }
td.actions-cell .small-button + .small-button { margin-left: 6px; }
td.empty-message { padding: 40px 19px; color: var(--muted); text-align: center; }
.status { display: inline-flex; align-items: center; padding: 6px 10px; border: 1px solid #e3e7ee; border-radius: 999px; background: #f3f5f9; color: #637088; font-size: .7rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.status.done { border-color: #caeadb; background: #eaf8f0; color: #1d805a; }
.status.pending, .status.delivering, .status.digi_success, .status.account_reserved, .status.account_delivering { border-color: #f3e3bd; background: #fff6e4; color: #9a6c20; }
.status.manual { border-color: #f1d3cf; background: #fff0ed; color: #b85f51; }
.status.new { border-color: #dcd9fa; background: #f1f0ff; color: #6258bf; }
.small-button { min-height: 34px; padding: 7px 10px; border: 1px solid #dfdcfa; background: #f3f1ff; color: #564bc2; font-size: .73rem; white-space: nowrap; }
.small-button:hover { border-color: #bcb5ee; background: #eae7ff; }
.product-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 13px; min-height: 70px; padding: 12px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: .77rem; }
.product-pagination[hidden] { display: none; }
.product-pagination .secondary { min-height: 36px; padding: 8px 12px; font-size: .73rem; }
.product-search { margin: 0 0 18px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.product-search > label { display: block; margin-bottom: 9px; font-size: .79rem; }
.product-search-controls { display: flex; flex-wrap: wrap; gap: 9px; }
.search-input { position: relative; flex: 1 1 260px; min-width: 0; }
.search-input input { padding-left: 42px; }
.search-input .field-icon { position: absolute; z-index: 1; top: 50%; left: 14px; width: 18px; height: 18px; color: #8190a7; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transform: translateY(-50%); pointer-events: none; transition: color .16s; }
.search-input:focus-within .field-icon { color: var(--accent); }
.product-search-controls button { flex: 0 0 auto; }
.product-search-controls button[hidden] { display: none; }
.product-search > p { margin: 9px 0 0; color: var(--muted); font-size: .74rem; }
.product-search > p:empty { display: none; }
.catalog-status { margin: -4px 0 15px; color: var(--muted); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.dialog-sync-note { margin: 0 0 13px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.catalog-status:empty { display: none; }

.mapping-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); align-items: start; gap: 18px; }
.mapping-form { padding: 28px; }
.mapping-form .panel-head { margin-bottom: 0; }
.form-section { min-width: 0; padding: 24px 0 26px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 1px solid var(--line); }
.form-section-title { display: flex; align-items: center; gap: 11px; margin: 0 0 17px; color: var(--text); font-size: .95rem; font-weight: 750; line-height: 1.35; letter-spacing: -.02em; }
.step-number { display: inline-grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: 0; }
.form-section > p { margin: -7px 0 18px; color: var(--muted); font-size: .76rem; }
.form-grid { display: grid; gap: 17px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px; }
.destination-note { min-width: 0; padding: 11px 13px; border: 1px solid #ddd9f7; border-radius: 9px; background: #f8f7ff; }
.destination-note strong { display: block; color: #4338a7; font-size: .74rem; }
.destination-note p { margin: 5px 0 0; color: #59667f; font-size: .7rem; line-height: 1.45; }
label { display: grid; gap: 8px; color: #36435c; font-size: .78rem; font-weight: 700; }
label small { color: var(--muted-light); font-size: .7rem; font-weight: 450; line-height: 1.45; }
input, select, textarea { width: 100%; min-width: 0; min-height: 45px; padding: 10px 13px; border: 1px solid #d8e0ec; border-radius: 10px; outline: none; background-color: #fbfcff; color: var(--text); font-size: .79rem; font-weight: 500; transition: border-color .16s, background-color .16s; }
input::placeholder { color: #8390a4; opacity: 1; }
input:not([type="checkbox"]):hover, select:hover, textarea:hover { border-color: #aebbd0; background-color: #fff; }
input:not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; background-color: #fff; box-shadow: none; }
input:not([type="checkbox"]):focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[readonly] { background-color: #f5f7fb; color: #52617a; }
select { appearance: none; padding-right: 41px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366748c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; cursor: pointer; }
select option { background: #fff; color: var(--text); }
.category-field { display: grid; gap: 8px; min-width: 0; }
.category-field > label { display: block; }
.category-control { position: relative; min-width: 0; }
.category-native[hidden] { display: none; }
.category-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid #d8e0ec; border-radius: 10px; outline: none; background: #fbfcff; color: var(--text); font-size: .79rem; font-weight: 500; text-align: left; transition: border-color .16s, background-color .16s; }
.category-trigger:hover { border-color: #aebbd0; background: #fff; }
.category-trigger:focus-visible, .category-control.is-open .category-trigger { border-color: var(--accent); outline: none; background: #fff; }
.category-trigger svg { width: 17px; height: 17px; fill: none; stroke: #66748c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s; }
.category-control.is-open .category-trigger svg { transform: rotate(180deg); stroke: var(--accent); }
.category-menu { position: relative; margin-top: 5px; padding: 4px; border: 1px solid #d8d3f5; border-radius: 10px; background: #fff; }
.category-menu[hidden] { display: none; }
.category-option { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 8px 11px; border-radius: 7px; color: #34415c; font-size: .78rem; font-weight: 550; cursor: pointer; }
.category-option:hover, .category-option.is-active { background: #f1efff; color: var(--accent-hover); }
.category-option[aria-selected="true"] { color: var(--accent); font-weight: 750; }
.category-option[aria-selected="true"]::after { content: "✓"; margin-left: 12px; font-size: .86rem; }
.catalog-field { display: grid; gap: 8px; min-width: 0; color: #36435c; font-size: .78rem; font-weight: 700; }
.catalog-field > label { display: block; }
.catalog-field > small { color: var(--muted-light); font-size: .7rem; font-weight: 450; line-height: 1.45; }
.combo-control { position: relative; display: flex; align-items: center; min-width: 0; min-height: 45px; border: 1px solid #d8e0ec; border-radius: 10px; background: #fbfcff; transition: border-color .16s, background-color .16s; }
.combo-control:hover { border-color: #aebbd0; background: #fff; }
.combo-control:focus-within, .combo-control.is-open { border-color: var(--accent); background: #fff; box-shadow: none; }
.combo-control input:not([type="checkbox"]) { flex: 1; width: 100%; min-height: 43px; padding-right: 8px; border: 0; outline: 0; background: transparent; box-shadow: none; }
.combo-control input:not([type="checkbox"]):hover, .combo-control input:not([type="checkbox"]):focus { border: 0; outline: 0; background: transparent; box-shadow: none; }
.combo-toggle { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; margin-right: 5px; padding: 0; border: 0; border-radius: 7px; background: #f1f3f9; color: #687891; transition: background .16s, color .16s; }
.combo-toggle:hover, .combo-control.is-open .combo-toggle { background: #eceafd; color: var(--accent); }
.combo-toggle:focus-visible { outline: none; }
.combo-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s; }
.combo-control.is-open .combo-toggle svg { transform: rotate(180deg); }
.combo-menu { position: absolute; z-index: 30; top: calc(100% + 7px); right: 0; left: 0; max-height: 280px; padding: 5px; overflow-y: auto; border: 1px solid #dce1ee; border-radius: 11px; background: #fff; box-shadow: 0 16px 38px rgba(25, 34, 70, .16); }
.combo-menu[hidden] { display: none; }
.combo-option { display: grid; gap: 3px; padding: 10px 11px; border-radius: 8px; color: #26334d; cursor: pointer; }
.combo-option + .combo-option { margin-top: 2px; }
.combo-option:hover, .combo-option.is-active { background: #f2f0ff; }
.combo-option-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; min-width: 0; font-size: .76rem; line-height: 1.4; }
.combo-option-title strong { flex: 0 0 auto; color: #4e45b8; font-weight: 800; }
.combo-option-title span { min-width: 0; overflow-wrap: anywhere; font-weight: 650; }
.combo-option small, .combo-more, .combo-empty { color: #69778e; font-size: .69rem; font-weight: 450; line-height: 1.45; }
.combo-more, .combo-empty { padding: 10px 11px; }
.checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 49px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; color: #4c5870; font-size: .73rem; font-weight: 600; line-height: 1.4; cursor: pointer; transition: border-color .16s, background-color .16s; }
.checkbox:hover, .checkbox:focus-within { border-color: #c4bff2; background: #f8f7ff; }
.checkbox input { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.checkbox-featured { grid-column: 1 / -1; border-color: #d9d4fb; background: #f7f6ff; color: #4137a7; font-weight: 750; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 24px; }
.form-actions p { margin: 0; color: var(--muted-light); font-size: .72rem; }
.mapping-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.mapping-preview { margin: 0 0 22px; padding: 18px; border: 1px solid #e2defa; border-radius: 12px; background: #faf9ff; }
.mapping-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mapping-preview-head strong { display: block; color: #313055; font-size: .8rem; }
.mapping-preview-head small { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.mapping-preview-head .secondary { flex: 0 0 auto; min-height: 34px; padding: 7px 10px; font-size: .7rem; }
.mapping-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mapping-preview-grid > div { min-width: 0; padding: 11px 12px; border: 1px solid #e6e4f3; border-radius: 9px; background: #fff; }
.mapping-preview-grid span { display: block; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.mapping-preview-grid strong { display: block; margin-top: 6px; color: var(--text); font-size: .86rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mapping-preview-grid .mapping-preview-target { border-color: #d5cff9; background: #f2f0ff; }
.mapping-preview-target strong { color: #4f45b9; }
.mapping-preview > p { margin: 12px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.modal-open { overflow: hidden; }
.mapping-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0 28px 28px;
  overflow: auto;
  border: 1px solid #e3e6f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 24, 48, .25);
  color: var(--text);
  font: inherit;
}
.mapping-dialog::backdrop { background: rgba(13, 22, 43, .62); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 28px 0 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 5px 0 4px; font-size: 1.35rem; letter-spacing: -.04em; }
.dialog-head p { margin: 0; color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
.dialog-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #5d6b82; transition: border-color .16s, background-color .16s, color .16s; }
.dialog-close:hover { border-color: #bcb5ee; background: #f5f3ff; color: var(--accent); }
.dialog-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dialog-form { padding: 0; }
.dialog-form .form-section:first-child { padding-top: 22px; }
.dialog-catalog { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dialog-catalog .catalog-status { flex: 1 1 210px; margin: 0; }
.dialog-form-status { margin: 18px 0 0; color: #ad4b43; font-size: .78rem; font-weight: 650; }
.dialog-form-status:empty { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 23px; }
.dialog-actions button { min-width: 128px; }
.brand-credit { border-bottom: 1px solid rgba(195, 191, 255, .55); transition: color .16s, border-color .16s; }
.brand-credit:hover { color: #fff; border-color: #fff; }
.mapping-panel { position: sticky; top: 26px; display: flex; flex-direction: column; max-height: min(var(--mapping-form-height, 1200px), calc(100dvh - 52px)); padding: 25px; }
.mapping-panel > .panel-head, .mapping-panel > p, .mapping-panel > .help-box { flex: 0 0 auto; }
.mapping-list { display: grid; flex: 0 1 auto; min-height: 0; gap: 10px; align-content: start; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; }
[data-vendor-field][hidden], [data-account-field][hidden], [data-vendor-catalog][hidden], [data-voucher-rule][hidden] { display: none !important; }
[data-account-field] a, .account-stock-form label a { color: var(--accent); font-weight: 700; }
[data-account-field] a:hover, .account-stock-form label a:hover { text-decoration: underline; }
.accounts-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); align-items: start; gap: 18px; }
.account-stock-form, .account-stock-summary { padding: 25px; }
.account-stock-form textarea { min-height: 250px; resize: vertical; line-height: 1.6; }
.account-stock-form textarea::placeholder { color: #8390a4; opacity: 1; }
.account-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.account-form-actions button { min-height: 43px; }
.account-form-actions span { color: var(--muted); font-size: .76rem; }
.account-sku-list { display: grid; gap: 9px; max-height: 550px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.account-sku-card { display: grid; gap: 9px; width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); text-align: left; }
.account-sku-card:hover, .account-sku-card.is-selected { border-color: #aea6ed; background: #f9f8ff; }
.account-sku-card strong { font-size: .79rem; overflow-wrap: anywhere; }
.account-sku-card small { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.account-sku-counts { display: flex; flex-wrap: wrap; gap: 7px; }
.account-sku-counts span { padding: 5px 8px; border-radius: 7px; background: #f1f3fa; color: #52617a; font-size: .69rem; font-weight: 650; }
.account-sku-counts span:first-child { background: #ebf8f0; color: #21805d; }
.account-items-panel { margin-top: 18px; }
.account-items-heading { padding: 23px 25px 10px; }
.account-items-heading h2 { margin: 5px 0 5px; font-size: 1.13rem; }
.account-items-heading p, .account-items-note { margin: 0; color: var(--muted); font-size: .75rem; }
.account-items-note { padding: 12px 25px 20px; border-top: 1px solid var(--line); }
.account-items-note:empty { display: none; }
.account-items-table td a { color: var(--accent); font-weight: 700; }
.account-items-table .status.available { border-color: #caeadb; background: #eaf8f0; color: #1d805a; }
.account-items-table .status.reserved { border-color: #f3e3bd; background: #fff6e4; color: #9a6c20; }
.mapping-item { display: block; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); font: inherit; text-align: left; }
.mapping-item:hover, .mapping-item:focus-visible { border-color: #b6aeef; background: #fcfbff; }
.mapping-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mapping-item-head strong { min-width: 0; overflow-wrap: anywhere; font-size: .78rem; }
.mapping-item-details { display: block; margin-top: 10px; color: var(--muted); font-size: .71rem; line-height: 1.5; overflow-wrap: anywhere; }
.help-box { margin-top: 22px; padding: 17px; border: 1px solid #e7e4fa; border-radius: 11px; background: #f8f7ff; }
.help-box strong { font-size: .76rem; }
.help-box p { margin: 7px 0 0; color: #65718a; font-size: .73rem; line-height: 1.55; }
.site-footer { margin: 43px 0 0; color: #65718a; font-size: .7rem; }
.site-footer span { padding: 0 5px; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 11px; background: #1c2945; box-shadow: 0 14px 35px rgba(17, 29, 55, .23); color: #fff; font-size: .78rem; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: radial-gradient(circle at 8% 8%, #e9e7ff, transparent 26%), #f5f7fb; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .93fr); width: min(100%, 980px); min-height: 594px; border: 1px solid #dfe4ee; border-radius: 24px; background: #fff; box-shadow: 0 25px 80px rgba(32, 46, 83, .1); overflow: hidden; }
.login-intro { position: relative; display: flex; flex-direction: column; padding: 36px 42px; overflow: hidden; background: linear-gradient(150deg, #17223f, #222856 80%, #32306c); color: #fff; }
.login-intro::before, .login-intro::after { content: ""; position: absolute; width: 310px; height: 310px; border: 1px solid rgba(190, 182, 255, .16); border-radius: 50%; pointer-events: none; }
.login-intro::before { right: -145px; bottom: -155px; box-shadow: 0 0 0 55px rgba(172, 166, 255, .035), 0 0 0 110px rgba(172, 166, 255, .035); }
.login-intro::after { top: 90px; left: -270px; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand strong { font-size: 1.03rem; }
.intro-content { position: relative; z-index: 1; margin: auto 0; padding-bottom: 20px; }
.intro-content .eyebrow { color: #c3bfff; }
.intro-content h1 { margin: 17px 0 17px; color: #fff; font-size: clamp(2.3rem, 4vw, 3.3rem); letter-spacing: -.06em; line-height: 1.08; }
.intro-content p { max-width: 340px; margin: 0; color: #c5cce4; font-size: .93rem; }
.intro-foot { position: relative; z-index: 1; color: #a7b2d2; font-size: .72rem; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 56px; }
.login-card-inner { width: 100%; max-width: 370px; margin: auto; }
.login-card h2 { margin: 8px 0 8px; font-size: 1.82rem; letter-spacing: -.05em; }
.login-card .muted { margin-bottom: 29px; font-size: .84rem; }
.login-card form { display: grid; gap: 10px; }
.login-card form label:not(:first-child) { margin-top: 9px; }
.login-card input { min-height: 46px; }
.login-card .full { justify-content: space-between; width: 100%; min-height: 46px; margin-top: 15px; }
.form-message { min-height: 19px; margin: 13px 0 0; color: #be584f; font-size: .75rem; }
.login-foot { margin: 0; color: #65718a; font-size: .7rem; text-align: center; }

@media (max-width: 1250px) {
  .main-content { padding: 36px 30px 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapping-layout { grid-template-columns: minmax(0, 1fr); }
  .mapping-panel { position: static; }
  .accounts-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 218px minmax(0, 1fr); }
  .sidebar { padding-right: 11px; padding-left: 11px; }
  .main-content { padding: 32px 24px 22px; }
  .two-col { grid-template-columns: 1fr; }
  .topbar { gap: 12px; }
  .earnings-grid { gap: 10px; }
  .earnings-card { padding: 17px; }
}
@media (max-width: 780px) {
  .shell { display: block; }
  .sidebar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 8px; width: 100%; height: auto; min-height: 0; padding: 14px 17px 0; }
  .sidebar-brand { padding: 0; }
  .sidebar-caption, .sidebar-account { display: none; }
  .sidebar-nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding-bottom: 14px; }
  .sidebar-nav a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sidebar-nav a { min-width: 0; min-height: 44px; gap: 9px; padding: 0 11px; font-size: .77rem; white-space: nowrap; }
  .sidebar-nav .nav-icon { width: 17px; height: 17px; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; }
  .logout-button { width: auto; min-height: 44px; padding: 0 11px; }
  .logout-button .nav-icon { width: 17px; height: 17px; }
  .main-content { padding: 28px 20px 22px; }
  .topbar { margin-bottom: 29px; }
}
@media (max-width: 620px) {
  .topbar { display: block; }
  .topbar h1 { font-size: 1.82rem; }
  .topbar p { font-size: .82rem; }
  .top-actions { justify-content: flex-start; padding-top: 17px; }
  .section-heading { display: block; }
  .section-heading .section-actions, .section-heading > button { margin-top: 15px; }
  .section-actions { justify-content: flex-start; }
  .section-meta { display: block; margin-top: 9px; white-space: normal; }
  .earnings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earnings-profit { grid-column: 1 / -1; }
  .earnings-report { padding: 17px; }
  .earnings-heading { display: flex; flex-wrap: wrap; }
  .earnings-range { flex: 0 0 100%; width: 100%; margin-top: 4px; }
  .earnings-card { min-height: 121px; padding: 16px; }
  .earnings-card strong { font-size: 1.45rem; }
  .earnings-detail #earnings-updated { width: 100%; margin-left: 0; }
  .stats { gap: 10px; }
  .stat { min-height: 135px; padding: 18px; }
  .stat strong { font-size: 1.8rem; }
  .stat-label { font-size: .72rem; }
  .stat small { font-size: .68rem; }
  .panel { padding: 20px; }
  .table-panel { padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; width: 100%; min-width: 0; }
  .orders-table { min-width: 0; }
  .orders-table td:first-child, .orders-table td:nth-child(4) { min-width: 0; white-space: normal; }
  .orders-table td.order-time > div { text-align: right; }
  thead { display: none; }
  tbody { display: grid; gap: 11px; }
  tbody tr { display: block; padding: 6px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
  tbody tr:hover { background: #fff; }
  td { display: grid; grid-template-columns: minmax(84px, .45fr) minmax(0, 1fr); align-items: start; gap: 11px; padding: 10px 0; border-bottom: 1px solid #edf0f6; text-align: right; }
  .orders-table td { padding: 10px 0; }
  tbody tr:last-child td { border-bottom: 1px solid #edf0f6; }
  td:last-child { border-bottom: 0 !important; }
  td[data-label]::before { content: attr(data-label); color: #5f6b82; font-size: .68rem; font-weight: 700; line-height: 1.5; text-align: left; }
  td.cell-main { font-size: .8rem; }
  td.note { max-width: none; }
  td.actions-cell { display: block; padding-top: 13px; text-align: right; }
  td.actions-cell::before { display: none; }
  td.actions-cell:empty { display: none; }
  td .status { justify-self: end; }
  td.empty-message { display: block; padding: 24px 2px; border: 0 !important; text-align: center; }
  .product-pagination { flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .product-pagination span { order: -1; width: 100%; text-align: center; }
  .product-search { padding: 15px; }
  .product-search-controls .search-input { flex-basis: 100%; }
  .product-search-controls button { flex: 1 1 calc(50% - 5px); }
  .form-row, .checkbox-list { grid-template-columns: 1fr; }
  .checkbox-featured { grid-column: 1; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary { width: 100%; }
  .mapping-actions { display: grid; grid-template-columns: 1fr; }
  .mapping-actions button { width: 100%; }
  .mapping-preview-head { flex-direction: column; }
  .mapping-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 0 20px 20px; border-radius: 14px; }
  .dialog-head { padding-top: 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .login-body { padding: 18px; }
  .login-shell { display: block; min-height: 0; }
  .login-intro { min-height: 205px; padding: 25px 28px; }
  .login-brand .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .intro-content { margin: 24px 0 0; padding: 0; }
  .intro-content h1 { margin: 9px 0 0; font-size: 1.75rem; }
  .intro-content p, .intro-foot { display: none; }
  .login-card { padding: 30px 28px 25px; }
  .login-card h2 { font-size: 1.6rem; }
  .login-foot { margin-top: 20px; }
}
@media (max-width: 390px) {
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .sidebar-nav a { gap: 8px; padding-right: 8px; padding-left: 8px; font-size: .73rem; }
  .brand-copy strong { font-size: .88rem; }
  .brand-copy small { font-size: .52rem; }
  .logout-button { gap: 5px; padding: 0 6px; font-size: .72rem; }
  .main-content { padding-right: 15px; padding-left: 15px; }
  .stat { padding: 15px; }
  .earnings-grid { grid-template-columns: 1fr; }
  .earnings-profit { grid-column: auto; }
  .earnings-card { min-height: 108px; }
  .stat::after { top: 19px; right: 18px; width: 8px; height: 8px; }
  .mapping-form { padding: 20px; }
  .dialog-form { padding: 0; }
}
@media (max-width: 360px) {
  .connection { align-items: flex-start; flex-direction: column; gap: 5px; padding: 10px 0; }
  .connection strong { padding-left: 19px; text-align: left; }
  .mapping-preview-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
