:root {
  --blue: #496ee8;
  --blue-dark: #162342;
  --blue-soft: #edf2ff;
  --ink: #17233f;
  --muted: #748097;
  --line: #e4e9f4;
  --bg: #f5f7fc;
  --white: #fff;
  --green: #22885a;
  --red: #c84e58;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-topline { height: 3px; background: var(--blue); }
.app-shell { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }
.app-nav { min-height: 70px; background: var(--white); border-bottom: 1px solid var(--line); }
.app-nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 24px; }
.app-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; white-space: nowrap; }
.app-brand-logo { display: block; width: 100px; height: auto; }
.app-mark { display: grid; place-items: center; width: 32px; height: 32px; background: var(--blue); color: var(--white); font: 700 13px var(--mono); }
.app-nav-links { display: flex; align-items: center; gap: 24px; color: #5e6b84; font-size: 13px; }
.app-nav-links a:hover { color: var(--blue); }
.app-nav-link-button, .app-primary, .app-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 11px 15px; font-size: 13px; }
.app-primary { background: var(--blue); color: var(--white); }
.app-primary:hover { background: #3d5fd1; }
.app-secondary { border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.app-secondary:hover { border-color: var(--blue); color: var(--blue); }
.app-menu { display: none; border: 0; background: transparent; color: var(--ink); padding: 8px; }
.app-mobile-cart { display: none; align-items: center; justify-content: center; gap: 5px; min-width: 42px; min-height: 38px; padding: 8px 10px; }
.app-eyebrow { color: #8b96ab; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.app-page { padding: 54px 0 90px; }
.app-page-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.app-page-head h1 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.app-page-head p { max-width: 390px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.app-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; padding: 18px 20px; background: var(--blue-dark); color: var(--white); }
.app-banner strong { display: block; margin-bottom: 6px; font-size: 14px; }
.app-banner span { color: #bdc9e3; font-size: 12px; }
.app-banner .app-primary { background: var(--white); color: var(--blue-dark); }
.app-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.app-filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.app-filter { border: 1px solid var(--line); padding: 9px 12px; background: transparent; color: #66738b; font-size: 12px; }
.app-filter.active, .app-filter:hover { border-color: var(--blue); background: var(--blue); color: var(--white); }
.app-count { color: var(--muted); font: 11px var(--mono); white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { display: flex; min-height: 292px; flex-direction: column; padding: 18px; background: var(--white); border: 1px solid #edf0f7; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); border-color: #cbd7fa; box-shadow: 0 12px 28px rgba(31, 55, 112, .08); }
.product-band { height: 7px; margin: -18px -18px 18px; background: linear-gradient(90deg, var(--blue), #98adff); }
.product-category { color: var(--blue); font: 10px var(--mono); }
.product-card h3 { min-height: 47px; margin: 15px 0 8px; font-size: 16px; line-height: 1.5; }
.product-spec { min-height: 42px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.product-benefit { display: inline-flex; width: fit-content; align-items: center; gap: 5px; margin-top: 10px; padding: 5px 7px; background: #edf2ff; color: var(--blue); font-size: 10px; }
.product-benefit svg { width: 12px; height: 12px; }
.product-price { margin-top: auto; padding-top: 17px; color: var(--blue); font: 600 18px var(--mono); }
.product-base { margin-top: 6px; color: #a1aabd; font-size: 11px; }
.product-actions { display: flex; gap: 8px; margin-top: 14px; }
.product-actions button { flex: 1; }
.product-actions .app-secondary, .product-actions .app-primary { padding: 9px 8px; font-size: 11px; }
.cart-drawer { position: fixed; inset: 0; z-index: 40; display: none; background: rgba(13, 24, 48, .44); }
.cart-drawer.open { display: block; }
.cart-panel { position: absolute; top: 0; right: 0; display: flex; width: min(470px, 100%); height: 100%; flex-direction: column; padding: 25px; background: var(--white); box-shadow: -18px 0 45px rgba(20, 38, 78, .12); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-size: 22px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.cart-list { flex: 1; overflow: auto; padding: 15px 0; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eef1f6; }
.cart-row strong { display: block; font-size: 13px; line-height: 1.5; }
.cart-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.cart-row .cart-price { color: var(--blue); font: 600 13px var(--mono); }
.cart-controls { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.cart-controls button { width: 25px; height: 25px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.cart-controls span { min-width: 25px; text-align: center; font: 12px var(--mono); }
.cart-foot { padding-top: 17px; border-top: 1px solid var(--line); }
.cart-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-total span { color: var(--muted); font-size: 12px; }
.cart-total strong { color: var(--blue); font: 600 22px var(--mono); }
.empty-state { padding: 64px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.order-modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(13, 24, 48, .56); }
.order-modal.open { display: grid; }
.order-card { width: min(590px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; background: var(--white); }
.order-card h2 { margin: 10px 0 8px; font-size: 25px; }
.order-card > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.notice { display: none; margin-bottom: 15px; padding: 10px 12px; background: #fff0f0; color: var(--red); font-size: 12px; line-height: 1.6; }
.notice.show { display: block; }
.notice.success { background: #edf8f1; color: var(--green); }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; color: #8b96ab; font: 10px var(--mono); }
.field label em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid #ccd5e7; outline: 0; background: transparent; color: var(--ink); font-size: 13px; border-radius: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--blue); }
.field textarea { min-height: 70px; resize: vertical; }
.order-contact-form { margin-top: 22px; padding: 18px; background: #f8faff; border: 1px solid #e2e8f6; }
.form-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.form-section-heading strong { color: var(--ink); font-size: 14px; }
.form-section-heading span { color: var(--muted); font-size: 10px; line-height: 1.5; text-align: right; }
.order-contact-form .field:last-child { margin-bottom: 0; }
.order-contact-summary { margin-top: 10px; padding: 10px 12px; background: #f7f9ff; border-left: 2px solid var(--blue); }
.order-contact-summary strong, .order-contact-summary span { display: block; }
.order-contact-summary strong { color: var(--ink); font-size: 11px; }
.order-contact-summary span { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.admin-order-contact { margin: 18px 0 8px; padding: 16px; background: #f7f9ff; border: 1px solid #e2e8f6; }
.admin-order-contact dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 0; }
.admin-order-contact dl div { padding: 10px 0; border-bottom: 1px solid #e7ebf4; }
.admin-order-contact dl .wide { grid-column: 1 / -1; }
.admin-order-contact dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.admin-order-contact dd { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.6; }
.admin-order-contact dd a { color: var(--blue); }
.admin-order-contact > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.order-note { margin-top: 16px; padding: 12px 14px; background: #f8f9fc; }
.order-note strong { font-size: 11px; }
.order-note p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.form-actions > * { flex: 1; }
.login-layout { display: grid; min-height: calc(100vh - 73px); grid-template-columns: 1.05fr .95fr; }
.login-visual { position: relative; display: flex; min-height: 700px; flex-direction: column; justify-content: end; overflow: hidden; padding: 70px; background: var(--blue-dark); color: var(--white); }
.login-visual::before { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,35,66,.06), rgba(22,35,66,.9)); content: ""; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; filter: saturate(.65) contrast(1.04); }
.login-visual-content { position: relative; z-index: 1; }
.login-visual h1 { max-width: 580px; margin: 15px 0 18px; font-size: clamp(42px, 6vw, 82px); line-height: 1.02; letter-spacing: -.05em; }
.login-visual p { max-width: 430px; margin: 0; color: #c4cee4; font-size: 14px; line-height: 1.9; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 55px; background: var(--white); }
.login-form-wrap { width: min(400px, 100%); }
.login-form-wrap h2 { margin: 14px 0 10px; font-size: 30px; letter-spacing: -.03em; }
.login-form-wrap > p { margin: 0 0 32px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.login-form .field input { padding: 14px 0; font-size: 15px; }
.login-form .app-primary { width: 100%; margin-top: 10px; padding: 14px; }
.login-note { margin-top: 20px !important; color: #9aa5b8 !important; font-size: 11px !important; }
.login-back { display: inline-flex; align-items: center; gap: 7px; margin-top: 30px; color: var(--blue); font-size: 12px; }
.dashboard { padding: 36px 0 80px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.dashboard-head h1 { margin: 10px 0 0; font-size: 34px; }
.dashboard-head p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-actions { display: flex; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px; }
.metric { padding: 18px; background: var(--white); border: 1px solid var(--line); }
.metric span { color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 12px; color: var(--blue); font: 600 25px var(--mono); }
.dashboard-layout { display: grid; grid-template-columns: 225px 1fr; gap: 18px; align-items: start; }
.side-menu { padding: 10px; background: var(--white); border: 1px solid var(--line); }
.side-menu button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; border-left: 2px solid transparent; padding: 12px 11px; background: transparent; color: #66738b; text-align: left; font-size: 12px; }
.side-menu button.active, .side-menu button:hover { border-left-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.admin-panel { min-width: 0; padding: 24px; background: var(--white); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 21px; }
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 8px; color: #8b96ab; border-bottom: 1px solid var(--line); text-align: left; font: 10px var(--mono); font-weight: 400; }
.data-table td { padding: 14px 8px; border-bottom: 1px solid #eef1f6; color: #4e5c75; font-size: 12px; vertical-align: middle; }
.data-table td:first-child { color: var(--ink); font-weight: 600; }
.data-table .price-cell { color: var(--blue); font: 600 13px var(--mono); }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-actions button { border: 1px solid var(--line); padding: 6px 8px; background: var(--white); color: #62708a; font-size: 11px; }
.table-actions button:hover { border-color: var(--blue); color: var(--blue); }
.pill { display: inline-flex; padding: 4px 7px; background: var(--blue-soft); color: var(--blue); font-size: 10px; white-space: nowrap; }
.pill.green { background: #edf8f1; color: var(--green); }
.pill.gray { background: #f1f3f7; color: #8792a6; }
.admin-modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(13, 24, 48, .52); }
.admin-modal.open { display: grid; }
.admin-modal-card { width: min(600px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 27px; background: var(--white); }
.admin-modal-card h2 { margin: 8px 0 22px; font-size: 24px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 18px; color: #65728a; font-size: 12px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; }
.order-detail { display: grid; gap: 12px; }
.order-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.order-summary div { padding: 12px; background: var(--bg); }
.order-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.order-summary b { font-size: 12px; }
.benefit-detail, .benefit-selection { margin: 20px 0; padding: 15px; background: #f7f9ff; border: 1px solid #dfe7ff; }
.benefit-title { display: flex; align-items: center; gap: 7px; color: var(--blue); font-size: 13px; }
.benefit-title svg { width: 15px; height: 15px; }
.benefit-detail > p, .benefit-note { margin: 8px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.benefit-rule { padding: 10px 0; border-top: 1px solid #e4eaff; }
.benefit-rule b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; }
.benefit-rule > span { display: block; margin-bottom: 6px; color: var(--blue); font-size: 10px; }
.benefit-rule em { display: inline-block; margin: 0 5px 5px 0; padding: 4px 6px; background: var(--white); color: #66738b; font-size: 10px; font-style: normal; }
.benefit-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.benefit-heading strong { display: block; color: var(--ink); font-size: 14px; }
.benefit-heading span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.benefit-heading > b { color: var(--blue); font: 600 15px var(--mono); white-space: nowrap; }
.benefit-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.benefit-option { display: flex; align-items: flex-start; gap: 8px; min-height: 62px; padding: 10px; background: var(--white); border: 1px solid #e2e7f3; cursor: pointer; }
.benefit-option:has(input:checked) { border-color: var(--blue); background: #f1f5ff; }
.benefit-option input { margin-top: 2px; accent-color: var(--blue); }
.benefit-option strong, .benefit-option small { display: block; line-height: 1.5; }
.benefit-option strong { color: var(--ink); font-size: 11px; }
.benefit-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.benefit-option input:disabled:not(:checked) { opacity: .4; }
.benefit-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.benefit-rules span { padding: 4px 6px; background: #eaf0ff; color: #6679b7; font-size: 10px; }
.benefit-empty { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.benefit-empty svg { width: 18px; height: 18px; color: var(--blue); }
.benefit-empty strong, .benefit-empty span { display: block; }
.benefit-empty strong { color: var(--ink); font-size: 12px; }
.benefit-empty span { margin-top: 4px; font-size: 10px; }
.order-benefits { margin-top: 10px; padding: 9px 10px; background: #f2f5ff; color: #66738b; font-size: 10px; line-height: 1.7; }
.order-benefits b { display: block; margin-bottom: 3px; color: var(--blue); }
.order-benefits span { display: block; }
.benefit-admin-note { margin-bottom: 17px; padding: 12px 14px; background: #f5f7fc; color: var(--muted); font-size: 11px; line-height: 1.75; }
.benefit-admin-item { margin-bottom: 7px; }
.benefit-admin-item:last-child { margin-bottom: 0; }
.benefit-admin-item b, .benefit-admin-item span { display: block; }
.benefit-admin-item b { color: var(--ink); font-size: 11px; }
.benefit-admin-item span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.editor-help { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: none; padding: 12px 15px; background: var(--blue); color: var(--white); font-size: 12px; box-shadow: 0 10px 30px rgba(20, 38, 78, .18); }
.toast.show { display: block; }
@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login-visual { padding: 48px; }
  .login-panel { padding: 40px; }
}
@media (max-width: 800px) {
  .app-shell { width: min(100% - 32px, 680px); }
  .app-nav-inner { min-height: 62px; }
  .app-nav { min-height: 62px; }
  .app-nav-links { position: absolute; top: 65px; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 15px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(20, 38, 78, .1); }
  .app-nav-links.open { display: flex; }
  .app-nav-links a, .app-nav-link-button { padding: 12px 0; border-bottom: 1px solid #eef1f6; }
  .app-nav-link-button { justify-content: center; margin-top: 8px; border: 0; }
  .app-mobile-cart { display: inline-flex; margin-left: auto; }
  .app-menu { display: block; }
  .app-page-head, .dashboard-head { display: block; }
  .app-page-head p, .dashboard-head p { margin-top: 16px; }
  .app-banner { align-items: flex-start; flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { display: block; min-height: auto; }
  .login-visual { min-height: 370px; padding: 40px 24px; }
  .login-panel { padding: 52px 24px 70px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .side-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .side-menu button { border-left: 0; border-bottom: 2px solid transparent; padding: 10px 7px; justify-content: center; font-size: 11px; }
  .side-menu button.active, .side-menu button:hover { border-bottom-color: var(--blue); border-left-color: transparent; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-panel { padding: 17px; overflow: hidden; }
  .data-table { min-width: 680px; }
  .table-scroll { overflow-x: auto; }
}
@media (max-width: 500px) {
  .app-page { padding: 38px 0 62px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 255px; }
  .app-toolbar { display: block; }
  .app-count { display: block; margin-top: 13px; }
  .form-actions, .two-fields { grid-template-columns: 1fr; display: grid; }
  .order-summary { grid-template-columns: 1fr; }
  .benefit-options { grid-template-columns: 1fr; }
  .order-card { padding: 22px 17px; }
  .order-contact-form { padding: 14px; }
  .form-section-heading { display: block; }
  .form-section-heading span { display: block; margin-top: 5px; text-align: left; }
  .admin-order-contact dl { grid-template-columns: 1fr; }
  .admin-order-contact dl .wide { grid-column: auto; }
  .side-menu { grid-template-columns: repeat(2, 1fr); }
  .panel-head { align-items: flex-start; flex-direction: column; }
}
