:root {
  --ink: #123047;
  --muted: #61798a;
  --line: #d8e8ee;
  --surface: #ffffff;
  --soft: #eff8fa;
  --navy: #0c5f83;
  --navy-dark: #084663;
  --cyan: #18a7b5;
  --cyan-dark: #0d7f8e;
  --cyan-soft: #e6f8fa;
  --success: #137650;
  --danger: #b52b2b;
  --shadow: 0 18px 52px rgba(17, 79, 103, .09);
  --shadow-small: 0 8px 24px rgba(17, 79, 103, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; background: #f3f9fb; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 0%, rgba(24,167,181,.10), transparent 27rem), radial-gradient(circle at 92% 8%, rgba(12,95,131,.07), transparent 24rem), #f3f9fb; font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--cyan-dark); }
img { display: block; max-width: 100%; }

.site-header { position: sticky; top: 0; z-index: 40; height: 70px; display: flex; align-items: center; gap: 22px; padding: 0 max(24px, calc((100vw - 1380px) / 2)); background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(178,214,224,.72); box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 8px 30px rgba(18,81,105,.035); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); min-width: max-content; }
.brand:hover { color: var(--ink); }
.brand-avatar { width: 40px; height: 40px; flex: 0 0 40px; border: 2px solid white; border-radius: 50%; object-fit: cover; object-position: center; box-shadow: 0 0 0 1px rgba(12,95,131,.16), 0 7px 18px rgba(12,95,131,.16); }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { letter-spacing: .01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.desktop-nav a { padding: 10px 13px; border-radius: 10px; color: #435366; font-size: 14px; font-weight: 700; }
.desktop-nav a:hover { background: var(--cyan-soft); color: var(--navy); }
.account-chip { padding: 5px 11px; border-left: 1px solid var(--line); }
.account-chip span, .account-chip small { display: block; line-height: 1.25; }
.account-chip span { font-size: 13px; font-weight: 700; }
.account-chip small { color: var(--muted); font-size: 11px; }
.logout-form { margin: 0; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.page-shell { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 90px; }

.flash-stack { position: fixed; z-index: 100; top: 82px; left: 50%; width: min(520px, calc(100% - 28px)); transform: translateX(-50%); display: grid; gap: 8px; }
.flash { padding: 13px 16px; border-radius: 12px; color: white; box-shadow: var(--shadow); font-weight: 700; }
.flash-success { background: var(--success); }
.flash-error { background: var(--danger); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--cyan-dark); font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 99px; background: var(--cyan); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.18; letter-spacing: -.03em; }
.page-heading p { margin: 9px 0 0; color: var(--muted); }
.compact-heading { align-items: center; }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.primary-button, .secondary-button, .small-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 11px; padding: 10px 18px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
.primary-button { color: white; background: var(--navy); border-color: var(--navy); box-shadow: 0 8px 18px rgba(12,95,131,.18); }
.primary-button:hover { color: white; background: var(--navy-dark); border-color: var(--navy-dark); box-shadow: 0 10px 22px rgba(8,70,99,.22); }
.secondary-button { color: var(--navy); background: white; border-color: #b7d5df; }
.secondary-button:hover { color: var(--navy-dark); background: var(--cyan-soft); border-color: var(--cyan); }
.primary-button:active, .secondary-button:active, .small-button:active { transform: translateY(1px) scale(.99); }
.wide { width: 100%; }
.small-button { min-height: 36px; padding: 6px 10px; border-color: var(--line); color: var(--navy); background: white; }
.small-button:hover { background: var(--cyan-soft); border-color: #9bd1d8; }

.auth-shell { display: grid; place-items: center; min-height: calc(100vh - 70px); padding-top: 30px; }
.auth-card { position: relative; width: min(460px, 100%); padding: clamp(25px, 5vw, 42px); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--navy), var(--cyan)); }
.auth-card-wide { width: min(570px, 100%); }
.auth-intro h1 { margin: 0; font-size: 31px; line-height: 1.2; }
.auth-intro p { margin: 10px 0 25px; color: var(--muted); }
.stack-form { display: grid; gap: 17px; }
.stack-form label > span, .field-grid label > span, .form-section label > span, .filter-bar label > span, .inline-filter label > span { display: block; margin-bottom: 7px; color: #3b4b5d; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #bfd5dd; border-radius: 10px; padding: 10px 12px; color: var(--ink); background: white; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
input:hover, select:hover, textarea:hover { border-color: #91bac7; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(24,167,181,.14); }
label small { display: block; margin-top: 5px; color: var(--muted); }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); }
.choice-fieldset { margin: 0; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 8px; color: #3b4b5d; font-size: 13px; font-weight: 800; }
.level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { display: grid; place-items: center; min-height: 48px; border: 1px solid #bfd5dd; border-radius: 10px; cursor: pointer; font-weight: 700; transition: border-color .15s ease, background-color .15s ease; }
.choice-card input:checked + span { color: var(--navy-dark); background: var(--cyan-soft); border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; min-height: 130px; padding: 22px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.stat-card::after { content: ""; position: absolute; top: 0; left: 22px; width: 42px; height: 3px; border-radius: 0 0 3px 3px; background: var(--cyan); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card strong { display: inline-block; margin-top: 8px; font-size: 38px; line-height: 1; color: var(--navy); }
.stat-card small { margin-left: 4px; color: var(--muted); }
.table-card, .form-section, .confirm-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.table-card { overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.responsive-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 12px 15px; color: #4f6d7e; background: #f0f8fa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 15px; border-bottom: 1px solid #eaf2f5; vertical-align: top; }
.data-table tbody tr:hover { background: #f8fcfd; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.wide-cell { min-width: 230px; max-width: 430px; }
.row-actions, .admin-actions { display: flex; align-items: center; gap: 10px; }
.row-actions form, .admin-actions form { margin: 0; }
.row-actions button, .catalog-admin-actions button { padding: 0; border: 0; color: var(--danger); background: none; cursor: pointer; }
.cell-note { display: block; color: var(--muted); }
.table-link { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.empty-cell, .empty-inline { padding: 32px !important; color: var(--muted); text-align: center; }
.status-pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pill.active { color: #11623d; background: #ddf4e9; }
.status-pill.inactive { color: #8d2929; background: #f9dfdf; }
.reset-form { display: flex; gap: 6px; }
.reset-form input { width: 130px; min-height: 36px; padding: 6px 8px; }

.empty-state { display: grid; justify-items: center; padding: 70px 24px; border: 1px dashed #a9ccd6; border-radius: 20px; background: rgba(255,255,255,.76); text-align: center; }
.empty-state h1, .empty-state h2 { margin: 10px 0 2px; }
.empty-state p { margin: 5px 0 22px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: white; background: var(--navy); box-shadow: inset 0 -4px 0 var(--cyan), 0 10px 24px rgba(12,95,131,.18); font-size: 30px; font-weight: 300; }

.history-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 18px; align-items: start; }
.date-list { display: grid; gap: 7px; }
.date-item { display: block; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.82); transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.date-item:hover { transform: translateY(-1px); border-color: #a7ced8; background: white; }
.date-item strong, .date-item span { display: block; }
.date-item span { color: var(--muted); font-size: 12px; }
.date-item.active { color: var(--navy-dark); background: var(--cyan-soft); border-color: var(--cyan); box-shadow: 0 6px 18px rgba(24,167,181,.11); }
.muted { color: var(--muted); }

.order-builder { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 62px minmax(0,1fr); overflow: hidden; }
.step-number { display: grid; place-items: start center; padding-top: 24px; color: white; background: var(--navy); box-shadow: inset -4px 0 0 var(--cyan); font-size: 21px; font-weight: 900; }
.form-section-body { min-width: 0; padding: 4px 22px 24px; }
.field-grid { display: grid; gap: 15px; }
.two-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
.arrival-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(210px, 1fr); gap: 15px; margin-top: 15px; align-items: end; }
.switch-card { display: flex; align-items: center; gap: 11px; min-height: 71px; padding: 12px 14px; border: 1px solid #bfd5dd; border-radius: 11px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.switch-card:hover { border-color: #91bac7; background: #f8fcfd; }
.switch-card input { width: 21px; min-height: 21px; accent-color: var(--cyan-dark); }
.switch-card span, .switch-card strong, .switch-card small { display: block; }
.switch-card small { margin: 2px 0 0; }
.loading-card { padding: 22px; border: 1px dashed #a9ccd6; border-radius: 13px; color: var(--muted); background: #f8fcfd; text-align: center; }
.package-list { display: grid; gap: 16px; }
.package-card { overflow: hidden; border: 1px solid #c7dfe6; border-radius: 14px; background: #fbfefe; }
.package-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #edf8fa; border-bottom: 1px solid #d4e8ee; }
.package-header h3 { margin: 0; font-size: 17px; }
.remove-package { border: 0; color: var(--danger); background: transparent; cursor: pointer; font-weight: 700; }
.package-body { display: grid; gap: 17px; padding: 16px; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); padding: 4px; border-radius: 11px; background: #e5f2f5; }
.segmented button { min-height: 43px; border: 0; border-radius: 8px; color: #536f7e; background: transparent; cursor: pointer; font-weight: 800; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.segmented button.active { color: var(--navy-dark); background: white; box-shadow: 0 3px 10px rgba(12,95,131,.10); }
.picker-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.picker-label small { color: var(--muted); font-weight: 400; }
.button-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px,1fr)); gap: 8px; }
.option-button { min-height: 46px; padding: 8px 10px; border: 1px solid #bfd5dd; border-radius: 10px; color: #405a69; background: white; cursor: pointer; font-weight: 700; transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease; }
.option-button:hover { border-color: #87bec9; background: #f5fbfc; }
.option-button:active { transform: scale(.99); }
.option-button.active { color: var(--navy-dark); background: var(--cyan-soft); border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
.catalog-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; margin-bottom: 10px; }
.catalog-toolbar input { min-height: 42px; }
.selected-summary { padding: 9px 11px; border-radius: 9px; color: var(--navy-dark); background: var(--cyan-soft); border: 1px solid #c8ebee; font-size: 13px; font-weight: 700; }
.visual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px,1fr)); gap: 9px; max-height: 410px; overflow: auto; padding: 2px; }
.product-card { position: relative; display: grid; grid-template-rows: 102px auto; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #d0e1e7; border-radius: 11px; color: var(--ink); background: white; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-2px); border-color: #82bdc8; box-shadow: 0 8px 20px rgba(17,79,103,.10); }
.product-card.active { border-color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan), 0 8px 22px rgba(24,167,181,.12); }
.product-image { display: grid; place-items: center; width: 100%; height: 102px; overflow: hidden; color: #78909c; background: #eaf3f6; font-size: 12px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-copy { min-width: 0; padding: 9px; }
.product-copy strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-price { display: block; margin-top: 5px; color: var(--cyan-dark); font-size: 13px; }
.selection-count { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 5px; border-radius: 999px; color: white; background: var(--cyan-dark); box-shadow: 0 4px 12px rgba(13,127,142,.22); font-size: 11px; font-weight: 900; }
.category-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; }
.category-tabs button { min-width: max-content; }
.package-preview { padding: 12px 14px; border-left: 4px solid var(--cyan); border-radius: 8px; background: #eefafb; }
.package-preview small, .package-preview strong { display: block; }
.package-preview small { color: var(--muted); }
.package-preview strong { margin-top: 3px; }
.package-money { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.package-money span { display: block; padding: 10px 12px; border: 1px solid #cce8ec; border-radius: 10px; background: #f2fbfc; }
.package-money small, .package-money strong { display: block; }
.package-money small { color: var(--muted); font-size: 11px; }
.package-money strong { margin-top: 2px; color: var(--navy-dark); }
.review-list { display: grid; gap: 8px; }
.review-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfefe; }
.review-index { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: var(--navy); font-weight: 800; }
.review-row strong, .review-row small { display: block; }
.review-row small { color: var(--muted); }
.row-quantity { color: var(--muted); font-size: 12px; }
.sticky-submit { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.sticky-submit span { color: var(--muted); font-weight: 700; }
.simple-editor { display: block; padding: 25px; }

.filter-bar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-small); }
.filter-bar label { min-width: 190px; }
.inline-filter label { min-width: 190px; }
.catalog-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 13px; }
.catalog-admin-card { display: grid; grid-template-rows: 155px auto auto; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 6px 18px rgba(17,79,103,.045); }
.catalog-admin-card.disabled { opacity: .52; }
.catalog-admin-image { display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #eaf3f6; }
.catalog-admin-image img { width: 100%; height: 100%; object-fit: cover; }
.catalog-admin-body { padding: 13px; }
.catalog-admin-body h2 { margin: 5px 0 2px; font-size: 16px; }
.catalog-admin-body p, .catalog-admin-body small { margin: 0; color: var(--muted); }
.category-tag { color: var(--cyan-dark); font-size: 11px; font-weight: 800; }
.catalog-admin-actions { display: flex; justify-content: space-between; padding: 10px 13px; border-top: 1px solid var(--line); }
.confirm-card { width: min(760px,100%); padding: 24px; }
.confirm-card h2 { margin-top: 0; }
.confirm-card li { margin: 8px 0; }
.mobile-nav { display: none; }
.commission-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.commission-stats article { padding: 17px 18px; border: 1px solid #c8e4e9; border-radius: 14px; background: linear-gradient(145deg,#fff,#eefafb); box-shadow: var(--shadow-small); }
.commission-stats small, .commission-stats strong, .commission-stats span { display: block; }
.commission-stats small, .commission-stats span { color: var(--muted); }
.commission-stats strong { margin: 4px 0; color: var(--navy-dark); font-size: 22px; }
.money-cell span, .money-cell strong { display: block; white-space: nowrap; }
.money-cell strong { margin-top: 3px; color: var(--navy-dark); }
.money-cell .markup-profit { color: #087aa0; font-weight: 800; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,35,56,.64); backdrop-filter: blur(8px); }
.payment-modal { position: relative; width: min(480px,100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: 22px; background: white; box-shadow: 0 28px 70px rgba(3,30,48,.28); text-align: center; }
.payment-modal h2 { margin: 7px 0 3px; color: var(--navy-dark); }
.modal-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: #edf5f7; cursor: pointer; font-size: 23px; }
.payment-breakdown { display: flex; justify-content: center; gap: 16px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.payment-qr { display: block; width: min(300px,100%); margin: 10px auto; border: 1px solid var(--line); border-radius: 16px; }
.payment-tip { color: var(--muted); font-size: 12px; }
.pricing-admin-form { display: grid; gap: 16px; }
.pricing-section { padding: 0 20px 20px; }
.rule-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.compact-rules { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 12px; }
.rule-card { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f8fcfd; }
.rule-card label span, .price-rule > span { font-size: 12px; font-weight: 700; }
.price-rule-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 10px; }
.price-rule { display: grid; gap: 7px; align-content: start; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfefe; }
.price-rule div { display: flex; align-items: center; gap: 7px; }
.price-rule input { min-width: 0; }
.price-rule small { color: var(--muted); }
.pricing-save { position: sticky; bottom: 10px; z-index: 12; display: flex; justify-content: flex-end; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.commission-user-form { display: grid; gap: 7px; min-width: 230px; }
.commission-user-form label span { display: block; color: var(--muted); font-size: 11px; }
.checkbox-line { display: flex !important; align-items: center; gap: 6px; font-size: 12px; }
.checkbox-line input { width: auto; min-height: auto; }
.void-form { display: grid; gap: 5px; min-width: 130px; }
.void-form input { min-height: 34px; padding: 6px 8px; }
.voided-row { opacity: .58; background: #f4f5f6; }
.share-store-card { display: grid; gap: 20px; margin-bottom: 22px; padding: 24px; border: 1px solid #bfe1e8; border-radius: 18px; background: linear-gradient(140deg,#fafdfe 0%,#eaf9fb 100%); box-shadow: var(--shadow-small); }
.share-store-card h2 { margin: 6px 0 4px; color: var(--navy-dark); font-size: 23px; }
.share-store-card p { margin: 0; color: var(--muted); }
.share-link-box { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: end; }
.share-link-box label span { display: block; margin-bottom: 7px; color: #3b4b5d; font-size: 13px; font-weight: 800; }
.share-link-box input { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 13px; }
.share-store-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 15px; border-top: 1px solid #cae6eb; }
.share-store-footer a { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.share-store-footer a strong { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; color: white; background: var(--cyan-dark); font-size: 11px; }
.share-store-footer form { margin: 0; }
.share-store-footer button { padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.selection-import-card { display: grid; grid-template-columns: minmax(190px,.7fr) minmax(260px,1.3fr) auto; gap: 18px; align-items: end; margin-bottom: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-small); }
.selection-import-card h2 { margin: 0 0 4px; font-size: 18px; }
.selection-import-card p { margin: 0; color: var(--muted); font-size: 13px; }
.selection-import-card textarea { min-height: 92px; }
.selection-list { display: grid; gap: 16px; }
.selection-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-small); }
.selection-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #f8fcfd; }
.selection-card > header h2 { margin: 9px 0 2px; color: var(--navy-dark); font-size: 22px; }
.selection-card > header p { margin: 0; color: var(--muted); font-size: 12px; }
.selection-total { display: grid; justify-items: end; color: var(--navy-dark); white-space: nowrap; }
.selection-total small, .selection-total span { color: var(--muted); font-size: 11px; }
.selection-total strong { font-size: 25px; }
.selection-customer-grid { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(150px,.7fr) minmax(260px,1.6fr); gap: 12px; padding: 18px 22px 0; }
.selection-customer-grid p { margin: 0; padding: 12px 14px; border: 1px solid #dcebef; border-radius: 11px; background: #fbfefe; }
.selection-customer-grid span, .selection-customer-grid strong { display: block; }
.selection-customer-grid span { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.selection-address strong { line-height: 1.55; }
.selection-packages { display: grid; gap: 8px; padding: 16px 22px 20px; }
.selection-packages > div { display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 11px; align-items: start; padding: 12px; border-radius: 11px; background: #eef8fa; }
.selection-packages > div > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: white; background: var(--navy); font-weight: 800; }
.selection-packages p { margin: 0; }
.selection-packages strong, .selection-packages small { display: block; }
.selection-packages small { margin-top: 4px; color: var(--muted); }
.selection-card > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fbfefe; }
.selection-card > footer form { margin: 0; }
.selection-converted, .selection-rejected { opacity: .72; }
.pricing-explainer { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.pricing-explainer article { padding: 18px; border: 1px solid #c8e4e9; border-radius: 14px; background: linear-gradient(145deg,#fff,#eefafb); box-shadow: var(--shadow-small); }
.pricing-explainer small, .pricing-explainer strong { display: block; }
.pricing-explainer small { margin-bottom: 5px; color: var(--cyan-dark); font-weight: 900; }
.store-price-list { display: grid; gap: 12px; padding: 0 22px 22px; }
.store-price-row { display: grid; grid-template-columns: minmax(260px,1fr) minmax(430px,1.2fr); gap: 22px; align-items: center; padding: 18px; border: 1px solid #d7e9ed; border-radius: 14px; background: #fbfefe; scroll-margin-top: 90px; }
.store-price-copy span { color: var(--cyan-dark); font-size: 11px; font-weight: 900; }
.store-price-copy h3 { margin: 3px 0; color: var(--navy-dark); font-size: 17px; }
.store-price-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.store-price-form { display: grid; grid-template-columns: minmax(150px,1fr) auto auto; gap: 9px; align-items: end; }
.store-price-form label { display: grid; gap: 5px; }
.store-price-form label span { color: var(--muted); font-size: 11px; font-weight: 800; }
.store-price-form input { width: 100%; min-height: 44px; }
.store-price-form button { min-height: 44px; white-space: nowrap; }
.locked-price-card { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-small); }
.locked-price-card summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; cursor: pointer; list-style: none; }
.locked-price-card summary::-webkit-details-marker { display: none; }
.locked-price-card summary span, .locked-price-card summary strong, .locked-price-card summary small { display: block; }
.locked-price-card summary small { margin-top: 2px; color: var(--muted); }
.locked-price-card summary b { color: var(--cyan-dark); }
.locked-price-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding: 0 22px 22px; }
.locked-price-grid p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 11px 13px; border-radius: 10px; background: #eef8fa; }
.locked-price-grid span { color: var(--muted); font-size: 12px; }
.locked-price-grid strong { color: var(--navy-dark); white-space: nowrap; }

@media (max-width: 900px) {
  .desktop-nav, .account-chip, .logout-form { display: none; }
  .site-header { height: 62px; padding: 0 16px; }
  .page-shell { width: min(100% - 24px, 760px); padding: 22px 0 92px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .heading-actions { width: 100%; }
  .heading-actions > * { flex: 1; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .commission-stats, .rule-grid, .pricing-explainer { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .store-price-row { grid-template-columns: 1fr; }
  .locked-price-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-layout { grid-template-columns: 1fr; }
  .date-list { display: flex; overflow-x: auto; }
  .date-item { min-width: 165px; }
  .form-section { grid-template-columns: 45px minmax(0,1fr); }
  .step-number { font-size: 17px; }
  .form-section-body { padding: 2px 14px 18px; }
  .section-heading { padding: 16px 0; align-items: flex-start; flex-direction: column; }
  .section-heading .secondary-button { width: 100%; }
  .two-columns, .arrival-row { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; min-height: 66px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 26px rgba(17,79,103,.07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .mobile-nav a { display: grid; place-items: center; min-width: 76px; min-height: 44px; border-radius: 12px; color: #526173; font-size: 13px; font-weight: 800; }
  .mobile-nav .mobile-primary { color: white; background: var(--navy); box-shadow: 0 7px 18px rgba(12,95,131,.20); }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .data-table td { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; padding: 6px 0; border: 0; max-width: none; min-width: 0; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .data-table .empty-cell { display: block; }
  .row-actions, .admin-actions { align-items: flex-start; }
  .reset-form { flex-wrap: wrap; }
  .reset-form input { width: min(180px,100%); }
  .share-link-box, .selection-import-card { grid-template-columns: 1fr; align-items: stretch; }
  .share-link-box .primary-button, .share-link-box .secondary-button { width: 100%; }
  .selection-customer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .selection-address { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .brand-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 10px; }
  .page-heading h1 { font-size: 27px; }
  .level-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 105px; padding: 17px; }
  .stat-card strong { font-size: 31px; }
  .primary-button, .secondary-button { width: 100%; }
  .heading-actions { display: grid; grid-template-columns: 1fr; }
  .form-section { grid-template-columns: 1fr; }
  .step-number { display: none; }
  .form-section-body { padding: 2px 13px 16px; }
  .package-body { padding: 12px; }
  .visual-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 360px; }
  .product-card { grid-template-rows: 92px auto; }
  .product-image { height: 92px; }
  .review-row { grid-template-columns: 30px minmax(0,1fr); }
  .row-quantity { grid-column: 2; }
  .sticky-submit { position: sticky; bottom: 63px; z-index: 20; margin-inline: -13px; padding: 12px 13px; background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(17,79,103,.055); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .sticky-submit .primary-button { width: auto; }
  .catalog-admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .commission-stats, .rule-grid, .compact-rules, .package-money, .pricing-explainer, .locked-price-grid { grid-template-columns: 1fr; }
  .store-price-list { padding: 0 14px 14px; }
  .store-price-row { padding: 14px; }
  .store-price-form { grid-template-columns: 1fr; }
  .store-price-form button { width: 100%; }
  .locked-price-card summary { align-items: flex-start; flex-direction: column; }
  .catalog-admin-card { grid-template-rows: 118px auto auto; }
  .catalog-admin-body { padding: 9px; }
  .catalog-admin-body h2 { font-size: 13px; }
  .share-store-card { padding: 18px; }
  .share-store-footer, .selection-card > header, .selection-card > footer { align-items: stretch; flex-direction: column; }
  .selection-customer-grid { grid-template-columns: 1fr; padding: 14px 14px 0; }
  .selection-address { grid-column: auto; }
  .selection-packages { padding: 12px 14px 16px; }
  .selection-card > footer { padding: 14px; }
  .selection-card > footer form, .selection-card > footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header, .mobile-nav, .sticky-submit { background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
