:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #18212b;
  --muted: #697480;
  --line: #dfe4e8;
  --brand: #1769e0;
  --brand-dark: #0f4fae;
  --brand-soft: #eaf2ff;
  --green: #12845b;
  --green-soft: #e4f5ee;
  --amber: #a86805;
  --amber-soft: #fff2d8;
  --red: #c53939;
  --red-soft: #fdeaea;
  --cyan: #177e89;
  --yellow: #f0ad2c;
  --sidebar: #171c22;
  --sidebar-hover: #252c34;
  --shadow: 0 8px 24px rgba(24, 33, 43, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.18);
  outline-offset: 2px;
}

.btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 13px;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.btn:hover { border-color: #99bce9; color: var(--brand); }
.btn.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: var(--surface-soft); }
.btn.large { min-height: 44px; padding-inline: 22px; font-weight: 700; }
.text-btn, .table-actions button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--brand);
}
.danger-text { color: var(--red) !important; }
.icon-btn, .mobile-menu, .sidebar-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.field { min-width: 0; }
.field label { display: block; color: #4f5c68; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select,
.store-search input, .catalog-head input, .query-hero input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus {
  border-color: #7eaae5;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
.subtle { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; }
.badge.success { color: #0f6d4b; background: var(--green-soft); }
.badge.warning { color: #875604; background: var(--amber-soft); }
.badge.danger { color: #a72e2e; background: var(--red-soft); }

/* Client */
.client-header {
  height: 68px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.client-head-inner { max-width: 1220px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 30px; }
.client-brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; flex-shrink: 0; }
.client-brand img { width: 36px; height: 36px; border-radius: 6px; }
.client-nav { display: flex; align-items: stretch; height: 100%; gap: 4px; }
.client-nav a { min-width: 78px; padding: 0 13px; display: grid; place-items: center; color: #4e5965; border-bottom: 2px solid transparent; }
.client-nav a:hover, .client-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.client-account { margin-left: auto; display: flex; align-items: center; gap: 15px; white-space: nowrap; }
.client-account > a:first-child { color: #465360; font-weight: 700; }
.admin-entry { border-left: 1px solid var(--line); padding-left: 15px; color: var(--brand); font-weight: 700; }
.mobile-menu { display: none; }
.client-main { min-height: calc(100vh - 68px); }
.notice-strip { max-width: 1220px; margin: 14px auto 0; padding: 10px 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; border: 1px solid #f0d08f; background: #fff9e9; border-radius: 6px; color: #6f520e; }
.notice-strip > span { background: var(--yellow); color: #231b08; padding: 2px 7px; border-radius: 4px; font-size: 12px; font-weight: 800; }
.notice-strip div { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notice-strip a { color: var(--brand); }
.banner-rail { max-width: 1220px; margin: 14px auto 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); grid-auto-rows: 118px; gap: 10px; }
.banner-rail a { position: relative; overflow: hidden; border-radius: 6px; background-color: #203445; background-size: cover; background-position: center; }
.banner-rail a:first-child { grid-row: span 2; }
.banner-rail span { position: absolute; left: 16px; bottom: 14px; max-width: calc(100% - 32px); padding: 5px 9px; border-radius: 4px; background: rgba(17, 28, 38, .82); color: #fff; font-weight: 700; }
.store-hero {
  max-width: 1220px;
  min-height: 360px;
  margin: 14px auto 0;
  padding: 54px 58px;
  background: #172b3c;
  color: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: center;
  overflow: hidden;
}
.hero-copy h1 { margin: 10px 0 12px; font-size: 40px; line-height: 1.15; letter-spacing: 0; }
.hero-copy > p { max-width: 640px; color: #c8d7e4; font-size: 17px; }
.eyebrow { color: #85b7f3; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.store-search { max-width: 610px; display: grid; grid-template-columns: 1fr 88px; margin-top: 24px; }
.store-search input { border-radius: 6px 0 0 6px; min-height: 48px; border-color: #fff; }
.store-search button, .catalog-head form button, .query-hero form button {
  border: 1px solid var(--yellow); background: var(--yellow); color: #1d2024; border-radius: 0 6px 6px 0; font-weight: 800;
}
.hero-points { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 20px; color: #b9c9d7; }
.hero-points span::before { content: "✓"; color: #5bd7a7; margin-right: 6px; }
.hero-status { background: #fff; color: var(--text); border-radius: 8px; padding: 24px; display: grid; grid-template-columns: 72px 1fr; gap: 17px; align-items: center; box-shadow: 0 18px 40px rgba(0, 0, 0, .24); }
.hero-status img { width: 72px; border-radius: 8px; }
.hero-status span, .hero-status small { display: block; color: var(--muted); }
.hero-status strong { display: block; margin: 4px 0; font-size: 18px; }
.account-shortcuts { max-width: 1220px; margin: 14px auto 0; padding: 16px 18px; display: grid; grid-template-columns: minmax(230px, 1.6fr) repeat(8, minmax(72px, .7fr)); gap: 6px; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.account-shortcuts > div { display: grid; align-content: center; border-right: 1px solid var(--line); }
.account-shortcuts > div span, .account-shortcuts > div strong { display: block; }
.account-shortcuts > div span { color: var(--muted); font-size: 12px; }
.account-shortcuts > a { min-height: 50px; display: grid; place-items: center; border-radius: 5px; color: #4c5965; }
.account-shortcuts > a:hover { color: var(--brand); background: var(--brand-soft); }
.store-section { max-width: 1220px; margin: 42px auto; padding: 0 20px; }
.category-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: 30px; }
.category-rail button { min-width: 0; min-height: 72px; padding: 11px; border: 0; border-right: 1px solid var(--line); background: #fff; text-align: left; }
.category-rail button:last-child { border-right: 0; }
.category-rail button:hover, .category-rail button.active { background: var(--brand-soft); color: var(--brand); }
.category-rail b, .category-rail small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-rail small { margin-top: 4px; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; margin-bottom: 3px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head > a { color: var(--brand); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-visual { height: 170px; display: grid; place-items: center; align-content: center; gap: 6px; overflow: hidden; color: #fff; }
.product-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-visual > span { font-size: 36px; font-weight: 850; }
.product-visual > small { opacity: .82; }
.tone-0 { background: #1c6e8c; } .tone-1 { background: #206a5d; } .tone-2 { background: #c17728; } .tone-3 { background: #5751a6; } .tone-4 { background: #b54848; }
.product-card-body { padding: 15px; }
.product-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.product-title { display: block; min-height: 48px; margin: 8px 0 5px; font-size: 16px; font-weight: 750; }
.product-card p { height: 42px; color: var(--muted); font-size: 13px; margin-bottom: 12px; overflow: hidden; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.product-bottom strong { color: var(--red); font-size: 21px; }
.buy-link { color: var(--brand); font-weight: 700; }
.process-band { max-width: 1220px; margin: 52px auto; padding: 26px 28px; background: #fff; border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.process-band > div { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 0 20px; border-right: 1px solid var(--line); }
.process-band > div:last-child { border-right: 0; }
.process-band b { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.process-band strong, .process-band span { display: block; }
.process-band span { color: var(--muted); font-size: 12px; }
.client-footer { margin-top: 58px; background: #20252b; color: #d4d8dc; }
.footer-inner { max-width: 1220px; margin: auto; padding: 36px 20px; display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 38px; }
.footer-inner strong { color: #fff; }
.footer-inner p { margin: 7px 0; color: #aeb6be; }
.footer-inner a:hover, .copyright a:hover { color: #fff; text-decoration: underline; }
.copyright { border-top: 1px solid #353c43; padding: 14px 20px; text-align: center; color: #8e989f; }

.catalog-head { max-width: 1220px; margin: 0 auto; padding: 48px 20px 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; }
.catalog-head h1 { margin: 7px 0 0; font-size: 34px; }
.catalog-head form { width: min(500px, 100%); display: grid; grid-template-columns: 1fr 80px; }
.catalog-head input { border-radius: 6px 0 0 6px; }
.catalog-section { margin-top: 0; }
.product-detail { max-width: 1220px; margin: 30px auto; padding: 0 20px; display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 44px; }
.detail-media { min-width: 0; }
.product-visual.large { width: 100%; height: 430px; border-radius: 8px; }
.product-visual.large > span { font-size: 66px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-badges span { padding: 5px 9px; background: #fff; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; margin-bottom: 20px; }
.detail-main h1 { font-size: 30px; margin-bottom: 10px; }
.detail-description { color: var(--muted); font-size: 15px; }
.detail-price { display: flex; align-items: baseline; gap: 8px; background: #fff3ed; padding: 16px; border-left: 3px solid var(--red); margin: 20px 0; }
.detail-price small, .detail-price span { color: var(--muted); }
.detail-price strong { color: var(--red); font-size: 29px; }
.product-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 22px; border: 1px solid var(--line); border-radius: 6px; }
.product-spec div { padding: 10px 12px; display: grid; grid-template-columns: 80px 1fr; gap: 8px; border-bottom: 1px solid var(--line); }
.product-spec div:nth-last-child(-n+2) { border-bottom: 0; }
.product-spec dt { color: var(--muted); }
.product-spec dd { margin: 0; }
.purchase-form { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: grid; gap: 14px; }
.purchase-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 4px; }
.purchase-total span { color: var(--muted); }
.detail-info { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.detail-copy { max-width: 820px; color: #4f5963; }
.query-hero { background: #172b3c; color: #fff; padding: 62px 20px; text-align: center; }
.query-hero h1 { font-size: 34px; margin: 9px 0; }
.query-hero p { color: #c4d1dc; }
.query-hero form { width: min(660px, 100%); margin: 24px auto 0; display: grid; grid-template-columns: 1fr 106px; }
.query-hero input { min-height: 48px; border-radius: 6px 0 0 6px; }
.query-results { min-height: 300px; }
.order-result-list { display: grid; gap: 14px; }
.order-result { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 18px; }
.order-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.order-result-head strong, .order-result-head span { display: block; }
.order-result-head span { color: var(--muted); font-size: 12px; }
.order-result-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.5fr 1fr; gap: 24px; padding: 16px 0; }
.order-result-grid > div { min-width: 0; }
.order-result-grid small, .order-result-grid b, .order-result-grid span { display: block; overflow-wrap: anywhere; }
.order-result-grid small { color: var(--muted); margin-bottom: 5px; }
.order-result-grid span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.order-result-actions { display: flex; justify-content: flex-end; gap: 8px; }
.account-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 24px; }
.account-head h1 { font-size: 32px; margin: 7px 0; }
.help-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.help-nav { position: sticky; top: 92px; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 8px; }
.help-nav a { display: block; padding: 10px 12px; border-radius: 4px; }
.help-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.help-content { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 32px; }
.help-content section { padding: 10px 0 26px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.help-content section:last-child { border-bottom: 0; }
.help-content h1 { font-size: 32px; margin-top: 7px; }
.help-content li { margin: 8px 0; }
.help-content details { border-top: 1px solid var(--line); padding: 12px 0; }
.help-content summary { cursor: pointer; font-weight: 700; }
.service-cta { margin-bottom: 12px; }
.legal-page { max-width: 960px; }
.legal-page > header { padding: 32px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: #eef5ff; }
.legal-page > header h1 { margin: 8px 0; font-size: 32px; }
.legal-page > header p { max-width: 720px; margin-bottom: 8px; color: #506071; }
.legal-page > header small { color: var(--muted); }
.legal-content { padding: 10px 32px 20px; border: 1px solid var(--line); background: #fff; }
.legal-content section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.legal-content section:last-child { border-bottom: 0; }
.legal-content h2 { margin-bottom: 8px; font-size: 18px; }
.legal-content p { margin: 0; color: #4f5c68; }
.legal-content a, .legal-contact a, .legal-consent a { color: var(--brand); text-decoration: underline; }
.legal-contact { display: flex; justify-content: space-between; gap: 18px; padding: 18px 32px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--surface-soft); }

/* Admin */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar); color: #cbd1d6; }
.admin-brand { height: 68px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid #2e353c; color: #fff; }
.admin-brand img { width: 36px; height: 36px; border-radius: 6px; }
.admin-brand strong, .admin-brand span { display: block; max-width: 148px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.admin-brand span { color: #8f99a2; font-size: 11px; }
.admin-sidebar nav { padding: 10px; }
.admin-nav-group { margin-bottom: 8px; }
.admin-nav-label { padding: 9px 11px 5px; color: #75808a; font-size: 11px; }
.admin-nav-group a { display: flex; align-items: center; gap: 11px; min-height: 39px; padding: 8px 11px; border-radius: 5px; color: #bdc5cc; }
.admin-nav-group a > span { width: 19px; height: 19px; display: grid; place-items: center; background: #30373e; border-radius: 4px; font-size: 11px; color: #aab5bf; }
.admin-nav-group a:hover, .admin-nav-group a.active { background: var(--sidebar-hover); color: #fff; }
.admin-nav-group a.active { box-shadow: inset 3px 0 var(--brand); }
.admin-nav-group a.active > span { color: #fff; background: var(--brand); }
.sidebar-foot { padding: 14px 18px 20px; display: grid; gap: 11px; border-top: 1px solid #2e353c; font-size: 12px; }
.sidebar-foot > a { color: #9ebfea; }
.admin-main { min-width: 0; }
.admin-top { height: 68px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.admin-top h1 { margin: 0; font-size: 20px; }
.admin-top p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.admin-top-actions { margin-left: auto; display: flex; gap: 8px; }
.sidebar-toggle { display: none; }
.admin-content { padding: 22px 24px 40px; max-width: 1640px; }
.admin-panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 16px; }
.panel-head h2 { font-size: 17px; margin: 0 0 2px; }
.panel-head p { color: var(--muted); margin: 0; font-size: 12px; }
.panel-head > a { color: var(--brand); }
.panel-actions, .table-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { min-width: 0; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 6px; border-top: 3px solid var(--brand); }
.metric-card:nth-child(2) { border-top-color: var(--yellow); }
.metric-card:nth-child(3) { border-top-color: var(--green); }
.metric-card:nth-child(4) { border-top-color: var(--cyan); }
.metric-card:nth-child(5) { border-top-color: #775da8; }
.metric-card span, .metric-card small, .metric-card strong { display: block; }
.metric-card span { color: var(--muted); font-size: 12px; }
.metric-card strong { margin: 6px 0 3px; font-size: 25px; }
.metric-card small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.dashboard-grid .wide { grid-column: span 1; }
.runtime-card { display: grid; gap: 9px; }
.runtime-card > strong { font-size: 30px; }
.runtime-card > strong small { color: var(--muted); font-size: 14px; }
.runtime-card p { margin: 0; }
.connection-list { display: grid; }
.connection-list > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.connection-list > div:last-child { border-bottom: 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.data-table { width: 100%; min-width: 960px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--surface-soft); color: #5d6873; font-size: 12px; white-space: nowrap; }
.data-table td > b, .data-table td > small { display: block; }
.data-table td > small { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.order-table { min-width: 1260px; }
.table-actions { min-width: 130px; gap: 5px 12px; }
.progress { width: 100%; max-width: 220px; height: 7px; background: #e4e8eb; border-radius: 999px; overflow: hidden; margin: 4px 0; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.progress.large { height: 11px; max-width: none; }
.filter-bar { display: grid; grid-template-columns: 170px minmax(220px, 420px) auto auto; gap: 9px; margin-bottom: 14px; align-items: center; }
.product-cell { display: grid; grid-template-columns: 54px minmax(150px, 1fr); gap: 10px; align-items: center; }
.product-cell .product-visual { width: 54px; height: 54px; border-radius: 5px; }
.product-cell .product-visual span { font-size: 15px; }
.product-cell .product-visual small { display: none; }
.product-cell b, .product-cell small { display: block; }
.product-cell small { color: var(--muted); }
.admin-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-two > .full { grid-column: 1 / -1; }
.integration-block dl { margin: 0 0 16px; }
.integration-block dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.integration-block dt { color: var(--muted); }
.integration-block dd { margin: 0; overflow-wrap: anywhere; }
.secret-box { margin-top: 14px; padding: 13px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid #9fd3bc; background: var(--green-soft); border-radius: 6px; }
.secret-box code { overflow-wrap: anywhere; }
.notice-admin-list { display: grid; }
.notice-admin-list > div { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice-admin-list > div:last-child { border-bottom: 0; }
.notice-admin-list p { margin: 4px 0; color: var(--muted); }
.notice-admin-list small { color: var(--muted); }
.notice-admin-list > div > div:last-child { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.announcement-list { display: grid; gap: 12px; }
.announcement-list article { padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.announcement-list article > div { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.announcement-list article > div span { color: var(--brand); font-weight: 700; }
.announcement-list h2 { margin: 10px 0 5px; font-size: 18px; }
.announcement-list p { margin: 0; color: #56616c; white-space: pre-wrap; }
.auth-page { max-width: 1100px; margin: 54px auto; padding: 0 20px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(540px, 1.2fr); gap: 42px; align-items: start; }
.auth-intro { padding: 36px 6px; }
.auth-intro h1 { margin: 10px 0; font-size: 35px; }
.auth-intro p, .auth-intro li { color: var(--muted); }
.auth-intro ul { padding-left: 20px; }
.auth-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.auth-forms form, .member-form { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.auth-forms h2 { margin-bottom: 2px; font-size: 19px; }
.captcha-field { display: grid; grid-template-columns: minmax(0, 1fr) 150px 36px; gap: 8px; align-items: center; }
.captcha-field img { width: 150px; height: 46px; border: 1px solid var(--line); border-radius: 6px; background: #f4f6f8; }
.legal-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--muted); font-size: 12px; }
.legal-consent input { width: 16px; height: 16px; margin: 2px 0 0; }
.admin-login-page { min-height: 100vh; padding: 32px 18px; display: grid; place-items: center; background: #eef2f4; }
.admin-login-panel { width: min(100%, 420px); padding: 30px; border: 1px solid #d6dde2; border-top: 4px solid var(--brand); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.admin-login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }
.admin-login-brand img { width: 42px; height: 42px; object-fit: contain; }
.admin-login-brand strong, .admin-login-brand span { display: block; }
.admin-login-brand strong { font-size: 18px; }
.admin-login-brand span { color: var(--muted); font-size: 12px; }
.admin-login-heading { margin-bottom: 22px; }
.admin-login-heading span { color: var(--brand); font-size: 12px; font-weight: 700; }
.admin-login-heading h1 { margin: 4px 0 0; font-size: 26px; }
.admin-login-panel form { display: grid; gap: 16px; }
.admin-login-panel form .btn { min-height: 44px; margin-top: 2px; }
.admin-login-error { padding: 10px 12px; border: 1px solid #efb5b5; border-radius: 6px; color: var(--red); background: var(--red-soft); }
.admin-login-back { display: block; margin-top: 20px; color: var(--muted); text-align: center; font-size: 12px; }
.auth-gate { max-width: 620px; padding: 54px 30px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.auth-gate p { color: var(--muted); }
.member-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.member-metrics > div { padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 6px; background: #fff; }
.member-metrics > div:nth-child(2) { border-top-color: var(--green); }
.member-metrics > div:nth-child(3) { border-top-color: var(--yellow); }
.member-metrics > div:nth-child(4) { border-top-color: var(--cyan); }
.member-metrics span, .member-metrics strong, .member-metrics a { display: block; }
.member-metrics span { color: var(--muted); font-size: 12px; }
.member-metrics strong { margin: 5px 0; font-size: 22px; }
.member-metrics a { color: var(--brand); font-size: 12px; }
.narrow-page { max-width: 760px; }
.narrow-page .section-head > strong { font-size: 24px; }
.payment-closed { padding: 36px 22px; border: 1px solid var(--line); background: #fff; text-align: center; }
.payment-closed h2 { margin: 0 0 8px; }
.payment-closed p { margin: 0 0 20px; color: var(--muted); }
.manual-payment { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 24px; align-items: center; padding: 22px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.manual-payment img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.manual-payment h2 { margin: 6px 0; }
.manual-payment p { margin: 6px 0; color: var(--muted); }
.manual-payment span { display: block; color: var(--muted); }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-title-row h1 { margin-right: auto; }
.level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.level-grid article { padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 6px; background: #fff; }
.level-grid article:nth-child(2) { border-top-color: var(--yellow); }
.level-grid article:nth-child(3) { border-top-color: var(--green); }
.level-grid h2 { margin-bottom: 6px; font-size: 19px; }
.level-grid p { margin: 0; color: var(--muted); }
.upgrade-form { max-width: 620px; }
.service-dock { position: fixed; right: 16px; top: 42%; z-index: 18; display: grid; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.service-dock a, .service-dock button { width: 54px; min-height: 46px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: #53606c; font-size: 12px; display: grid; place-items: center; }
.service-dock > :last-child { border-bottom: 0; }
.service-dock a:hover, .service-dock button:hover { color: var(--brand); background: var(--brand-soft); }
.record-summary { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.record-summary div { padding: 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.record-summary dt { color: var(--muted); font-size: 12px; }
.record-summary dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; }
.money-in { color: var(--green); font-weight: 700; }
.money-out { color: var(--red); font-weight: 700; }
.control-list { display: grid; gap: 14px; }
.control-list article { border: 1px solid var(--line); border-radius: 6px; padding: 17px; background: var(--surface-soft); }
.control-list article.task-disabled { opacity: .72; }
.task-filter { display: grid; grid-template-columns: minmax(260px, 1fr) 180px auto auto; gap: 10px; margin-bottom: 14px; }
.task-filter input, .task-filter select { min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 8px 11px; }
.task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.control-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.control-head h3 { margin: 8px 0 2px; }
.control-head p { margin: 0; color: var(--muted); font-size: 12px; }
.control-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.control-metrics > div { background: #fff; border: 1px solid var(--line); padding: 10px; border-radius: 5px; }
.control-metrics span, .control-metrics strong { display: block; }
.control-metrics span { color: var(--muted); font-size: 12px; }
.control-metrics strong { margin-top: 4px; overflow-wrap: anywhere; }
.control-rule { color: var(--muted); margin: 11px 0 0; font-size: 12px; }
.timeline { display: grid; }
.timeline > div { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 9px; padding: 0 0 15px; }
.timeline > div::before { content: ""; position: absolute; left: 6px; top: 13px; bottom: 0; width: 1px; background: var(--line); }
.timeline > div:last-child::before { display: none; }
.timeline-dot { width: 13px; height: 13px; border: 3px solid var(--brand-soft); background: var(--brand); border-radius: 50%; margin-top: 3px; z-index: 1; }
.timeline-dot.success { background: var(--green); border-color: var(--green-soft); }
.timeline-dot.warning { background: var(--amber); border-color: var(--amber-soft); }
.timeline-dot.danger { background: var(--red); border-color: var(--red-soft); }
.timeline b, .timeline p, .timeline small { display: block; }
.timeline p { margin: 1px 0; }
.timeline small { color: var(--muted); }
.screen-head { padding: 26px 28px; margin-bottom: 16px; background: #172b3c; color: #fff; border-radius: 6px; display: flex; justify-content: space-between; align-items: flex-end; }
.screen-head h1 { margin: 8px 0 4px; }
.screen-head p { color: #bdcad5; margin: 0; }
.screen-clock { font-size: 16px; color: #d6e1e9; }
.screen-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.screen-metrics > div { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--cyan); padding: 16px; border-radius: 6px; }
.screen-metrics span, .screen-metrics strong { display: block; }
.screen-metrics span { color: var(--muted); }
.screen-metrics strong { font-size: 28px; margin-top: 5px; }
.screen-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr); gap: 16px; }
.big-bars { display: grid; gap: 18px; }
.big-bars > div > div:first-child { display: flex; justify-content: space-between; gap: 20px; }
.big-bars small { color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(12, 18, 24, .55); }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(0, 0, 0, .24); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 20px; }
.modal-form { display: grid; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.summary-line { display: flex; justify-content: space-between; gap: 14px; padding: 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.qr-wrap { display: grid; place-items: center; gap: 18px; text-align: center; }
.qr-wrap img { display: block; width: min(340px, 100%); height: auto; max-height: 58vh; object-fit: contain; border: 1px solid var(--line); padding: 12px; border-radius: 6px; }
.qr-wrap p { margin: 10px 0 2px; }
.qr-wrap small { color: var(--muted); }

@media (max-width: 640px) {
  .manual-payment { grid-template-columns: 1fr; }
  .manual-payment img { width: min(260px, 100%); margin: 0 auto; }
}
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: min(420px, calc(100vw - 30px)); background: #20262d; color: #fff; padding: 12px 15px; border-radius: 6px; box-shadow: var(--shadow); display: none; }
.toast.show { display: block; }
.toast.error { background: var(--red); }
.empty { min-height: 130px; padding: 28px; border: 1px dashed #c9d0d6; border-radius: 6px; background: var(--surface-soft); display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--muted); }
.loading-page { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.loading-page.error { color: var(--red); }
.is-busy { cursor: progress; }

@media (max-width: 1280px) {
  .client-head-inner, .store-hero, .notice-strip, .banner-rail, .process-band { margin-left: 20px; margin-right: 20px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .control-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .client-header { height: 60px; }
  .client-head-inner { margin: 0; padding: 0 14px; gap: 12px; }
  .client-nav { display: none; position: absolute; left: 0; right: 0; top: 60px; height: auto; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .client-nav-open .client-nav { display: grid; }
  .client-nav a { min-height: 42px; display: flex; border: 0; border-radius: 5px; }
  .client-nav a.active { background: var(--brand-soft); }
  .client-account { margin-left: auto; gap: 9px; }
  .client-account > a:first-child { display: none; }
  .admin-entry { padding-left: 0; border-left: 0; font-size: 12px; }
  .mobile-menu { display: grid; }
  .store-hero { grid-template-columns: 1fr; padding: 40px; gap: 26px; }
  .banner-rail { grid-template-columns: 1fr 1fr; grid-auto-rows: 110px; }
  .hero-status { max-width: 440px; }
  .category-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-rail button:nth-child(3n) { border-right: 0; }
  .category-rail button { border-bottom: 1px solid var(--line); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-shortcuts { margin-left: 20px; margin-right: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .account-shortcuts > div { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-intro { padding: 0; }
  .member-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-grid { grid-template-columns: 1fr; }
  .service-dock { display: none; }
  .process-band { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .process-band > div:nth-child(2) { border-right: 0; }
  .product-detail { grid-template-columns: 1fr; }
  .product-visual.large { height: 360px; }
  .order-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: -248px; top: 0; width: 232px; z-index: 40; transition: left .2s ease; box-shadow: 8px 0 24px rgba(0, 0, 0, .2); }
  .sidebar-open .admin-sidebar { left: 0; }
  .sidebar-toggle { display: grid; }
  .admin-top { position: sticky; padding: 0 14px; }
  .admin-content { padding: 16px; }
  .dashboard-grid, .admin-two, .screen-grid { grid-template-columns: 1fr; }
  .admin-two > .full { grid-column: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .client-brand span { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .notice-strip { margin: 10px; grid-template-columns: auto 1fr; }
  .banner-rail { margin: 10px; grid-template-columns: 1fr; grid-auto-rows: 140px; }
  .banner-rail a:first-child { grid-row: auto; }
  .notice-strip a { display: none; }
  .store-hero { margin: 10px; min-height: 0; padding: 30px 20px; border-radius: 6px; }
  .hero-copy h1 { font-size: 30px; }
  .hero-copy > p { font-size: 14px; }
  .hero-status { grid-template-columns: 58px 1fr; padding: 17px; }
  .hero-status img { width: 58px; }
  .store-section { margin: 28px auto; padding: 0 12px; }
  .account-shortcuts { margin: 10px; padding: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-shortcuts > a { min-height: 44px; font-size: 12px; }
  .auth-page { margin: 30px auto; padding: 0 12px; gap: 22px; }
  .auth-intro h1 { font-size: 28px; }
  .auth-forms { grid-template-columns: 1fr; }
  .captcha-field { grid-template-columns: minmax(0, 1fr) 118px 36px; }
  .captcha-field img { width: 118px; }
  .task-filter { grid-template-columns: 1fr; }
  .task-actions { justify-content: flex-start; }
  .member-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .detail-title-row { align-items: stretch; flex-direction: column; }
  .category-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-rail button:nth-child(3n) { border-right: 1px solid var(--line); }
  .category-rail button:nth-child(2n) { border-right: 0; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
  .product-card > a { min-height: 176px; display: block; }
  .product-card > a .product-visual { height: 100%; min-height: 176px; }
  .product-card p { height: 39px; }
  .product-title { min-height: 0; }
  .process-band { margin: 30px 12px; padding: 20px 12px; grid-template-columns: 1fr; }
  .process-band > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .process-band > div:last-child { border-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 28px 16px; }
  .catalog-head { padding: 30px 12px 20px; display: grid; }
  .catalog-head h1 { font-size: 29px; }
  .product-detail { margin: 18px auto; padding: 0 12px; gap: 24px; }
  .product-visual.large { height: 300px; }
  .detail-main h1 { font-size: 25px; }
  .product-spec { grid-template-columns: 1fr; }
  .product-spec div { border-bottom: 1px solid var(--line) !important; }
  .product-spec div:last-child { border-bottom: 0 !important; }
  .purchase-total { align-items: stretch; flex-direction: column; }
  .query-hero { padding: 42px 12px; }
  .query-hero h1 { font-size: 27px; }
  .query-hero form { grid-template-columns: 1fr; gap: 8px; }
  .query-hero input, .query-hero form button { border-radius: 6px; min-height: 46px; }
  .order-result-grid { grid-template-columns: 1fr; gap: 14px; }
  .order-result-actions { justify-content: stretch; flex-wrap: wrap; }
  .order-result-actions .btn { flex: 1; }
  .account-head { align-items: flex-start; flex-direction: column; }
  .help-layout { grid-template-columns: 1fr; gap: 16px; }
  .help-nav { position: static; display: flex; overflow-x: auto; }
  .help-nav a { white-space: nowrap; }
  .help-content { padding: 20px; }
  .legal-page > header, .legal-content, .legal-contact { padding-left: 20px; padding-right: 20px; }
  .legal-page > header h1 { font-size: 27px; }
  .legal-contact { align-items: flex-start; flex-direction: column; }
  .admin-top { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 10px; }
  .admin-top p { display: none; }
  .admin-top-actions { width: 100%; margin-left: 50px; }
  .admin-top-actions .btn { flex: 1; }
  .admin-content { padding: 12px; }
  .metric-grid, .screen-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card, .screen-metrics > div { padding: 13px; }
  .metric-card strong, .screen-metrics strong { font-size: 22px; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .panel-actions { width: 100%; }
  .panel-actions .btn { flex: 1; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar input { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .control-head { flex-direction: column; }
  .control-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-head { align-items: flex-start; flex-direction: column; gap: 14px; padding: 20px; }
  .secret-box { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal-card { max-height: 92vh; border-radius: 8px 8px 0 0; }
  .toast { right: 15px; bottom: 15px; }
}

/* Reference-compatible commerce shell. The branding and artwork stay original. */
.client-app { background: #eef1ff; }
.client-header { height: 88px; position: relative; background: #fff; border-bottom-color: #f1c8c8; box-shadow: 0 2px 7px rgba(37, 48, 88, .07); }
.client-head-inner { width: min(1300px, calc(100% - 40px)); max-width: none; padding: 0; gap: 28px; }
.client-brand { min-width: 190px; color: #dd4b50; font-size: 19px; }
.client-brand img { width: 48px; height: 48px; border-radius: 8px; }
.client-nav { gap: 8px; }
.client-nav a { min-width: 88px; padding: 0 14px; color: #202020; font-size: 17px; font-weight: 700; border-bottom-width: 3px; }
.client-nav a:hover, .client-nav a.active { color: #df5156; border-bottom-color: #df5156; }
.header-search { width: 220px; height: 38px; margin-left: auto; display: grid; grid-template-columns: 1fr 40px; }
.header-search input { min-width: 0; border: 1px solid #eb7d80; border-right: 0; border-radius: 6px 0 0 6px; padding: 0 11px; color: #4f5562; }
.header-search button { border: 1px solid #eb7d80; border-left: 0; border-radius: 0 6px 6px 0; background: #fff; color: #e45559; font-size: 24px; }
.client-main { min-height: calc(100vh - 88px); }
.reference-home { width: min(1300px, calc(100% - 40px)); margin: 16px auto 0; padding-bottom: 18px; }
.reference-top { height: 350px; display: grid; grid-template-columns: minmax(0, 2.03fr) minmax(340px, 1fr); gap: 14px; }
.reference-banner { position: relative; overflow: hidden; background: #fff; border-radius: 8px; border: 1px solid #e8eaff; }
.banner-brand { position: absolute; left: 27px; top: 22px; z-index: 2; display: flex; align-items: center; gap: 8px; color: #d94f55; font-size: 16px; }
.banner-brand img { width: 32px; height: 32px; border-radius: 6px; }
.banner-copy { position: relative; z-index: 2; height: 100%; display: grid; place-items: center; align-content: center; padding: 54px 60px 35px; text-align: center; }
.banner-copy > span { color: #7180a4; font-weight: 700; }
.banner-copy h1 { margin: 10px 0 14px; color: #11151d; font-size: 39px; line-height: 1.2; font-weight: 900; }
.banner-copy p { padding: 10px 24px; border: 1px solid #eef0f4; border-radius: 26px; background: #fff; color: #5b6069; box-shadow: 0 5px 20px rgba(31, 39, 62, .07); }
.banner-copy > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.banner-copy b { min-width: 86px; padding: 9px 12px; border: 1px solid #e4e7ee; border-radius: 7px; color: #46536c; background: #fff; font-size: 13px; }
.banner-copy b:nth-child(2) { color: #197c69; }
.banner-copy b:nth-child(3) { color: #d45459; }
.banner-copy b:nth-child(4) { color: #7b5bab; }
.banner-ribbon { position: absolute; left: -5%; right: -5%; bottom: -90px; height: 145px; background: #e34e53; transform: rotate(5deg); opacity: .96; }
.banner-ribbon::after { content: ""; position: absolute; left: 15%; right: -5%; top: -20px; height: 24px; background: #ffd8da; }
.reference-account { display: grid; grid-template-rows: 98px 68px 1fr; gap: 12px; min-width: 0; }
.account-welcome, .account-level, .account-grid { background: #fff; border-radius: 8px; border: 1px solid #eaebf8; }
.account-welcome { display: flex; align-items: center; gap: 14px; padding: 18px 22px; }
.account-welcome img { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #eceef4; }
.account-welcome span, .account-welcome strong { display: block; }
.account-welcome span { color: #5b6477; }
.account-welcome strong { margin-top: 5px; font-size: 13px; color: #939aaa; }
.account-level { display: flex; align-items: center; justify-content: center; gap: 17px; }
.account-level a { color: #485468; font-weight: 700; }
.account-level span { color: #d9585c; }
.account-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 11px 12px 8px; }
.account-grid a { min-width: 0; display: grid; place-items: center; align-content: center; gap: 2px; color: #566175; font-size: 12px; border-radius: 5px; }
.account-grid a:hover { background: #f4f6ff; color: #dc4d52; }
.account-grid b { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: #5b9ee8; border-radius: 7px; font-size: 13px; }
.account-grid a:nth-child(2) b { background: #55bc91; }
.account-grid a:nth-child(3) b { background: #efa844; }
.account-grid a:nth-child(4) b { background: #d39c4b; }
.account-grid a:nth-child(5) b { background: #7184d8; }
.account-grid a:nth-child(6) b { background: #d86c8c; }
.account-grid a:nth-child(7) b { background: #6fafa8; }
.account-grid a:nth-child(8) b { background: #7d879b; }
.reference-notice { min-height: 50px; margin-top: 14px; padding: 0 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: #fff; border: 1px solid #e5e7f5; border-radius: 6px; }
.reference-notice strong { color: #4998de; font-size: 16px; padding-right: 18px; border-right: 1px solid #dfe2ea; }
.reference-notice span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #505867; }
.reference-notice a { color: #9aa0ad; }
.reference-recommend { height: 170px; margin-top: 14px; display: grid; grid-template-columns: 170px minmax(0, 1fr); overflow: hidden; border-radius: 7px; background: #fff; border: 1px solid #e9e9f4; }
.recommend-title { display: grid; align-content: center; justify-items: center; background: #ffd9e0; color: #cf4458; }
.recommend-title h2 { margin: 0; font-size: 23px; }
.recommend-title p { margin: 5px 0 14px; }
.recommend-title a { padding: 7px 18px; color: #fff; background: #e95058; border-radius: 20px; font-size: 12px; }
.recommend-list { min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; }
.compact-product { min-width: 0; padding: 18px 10px; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; border-right: 1px solid #edf0f3; }
.compact-product .product-visual { width: 64px; height: 76px; min-height: 0; border-radius: 3px; }
.compact-product .product-visual span { font-size: 18px; }
.compact-product .product-visual small { font-size: 10px; }
.compact-product div span, .compact-product div strong { display: block; }
.compact-product div span { height: 42px; overflow: hidden; color: #404858; line-height: 21px; }
.compact-product div strong { margin-top: 8px; color: #e24d59; font-size: 17px; }
.compact-product em { display: none; }
.reference-category { margin-top: 24px; }
.reference-category-head { height: 45px; display: flex; align-items: center; justify-content: space-between; }
.reference-category-head h2 { margin: 0; padding-left: 15px; border-left: 5px solid #ee5960; font-size: 23px; }
.reference-category-head a { color: #7c8493; }
.reference-category-head a span { font-size: 19px; }
.reference-category-products { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.reference-category-card { min-width: 0; height: 96px; padding: 14px; display: grid; grid-template-columns: 75px minmax(0, 1fr); align-items: center; gap: 12px; background: #fff; border-radius: 8px; border: 1px solid #e6e8f2; }
.reference-category-card .product-visual { width: 75px; height: 64px; border-radius: 4px; }
.reference-category-card .product-visual span { font-size: 19px; }
.reference-category-card .product-visual small { display: none; }
.reference-category-card strong, .reference-category-card span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reference-category-card strong { color: #323946; }
.reference-category-card span { margin-top: 6px; color: #969da9; font-size: 12px; }
.reference-runtime { margin-top: 28px; padding: 18px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: center; gap: 24px; background: #fff; border: 1px solid #e4e6f0; border-radius: 7px; }
.reference-runtime span, .reference-runtime strong { display: block; }
.reference-runtime span { color: #929aa8; font-size: 12px; }
.reference-runtime strong { margin-top: 3px; }
.reference-runtime a { padding: 9px 17px; color: #fff; background: #df5156; border-radius: 5px; }

/* Reference-compatible admin shell. */
.admin-shell { grid-template-columns: 195px minmax(0, 1fr); background: #fff; }
.admin-sidebar { background: #252525; color: #c9c9c9; }
.admin-brand { height: 51px; padding: 0 18px; border-bottom-color: #383838; }
.admin-brand img { width: 32px; height: 32px; border-radius: 2px; }
.admin-brand strong { font-size: 13px; }
.admin-brand span { display: none; }
.admin-sidebar nav { padding: 7px 0; }
.admin-nav-group { margin: 0; }
.admin-nav-parent { width: 100%; min-height: 52px; padding: 0 20px; border: 0; border-radius: 0; display: flex; align-items: center; gap: 13px; background: transparent; color: #c7c7c7; text-align: left; }
.admin-nav-parent > span { width: 20px; height: 20px; display: grid; place-items: center; color: #a7a7a7; font-size: 11px; }
.admin-nav-parent i { margin-left: auto; color: #818181; font-style: normal; transition: transform .16s ease; }
.admin-nav-group.open .admin-nav-parent i { transform: rotate(180deg); }
.admin-nav-parent:hover, .admin-nav-parent.active { color: #fff; background: #303030; }
.admin-nav-children { display: none; background: #202020; }
.admin-nav-group.open .admin-nav-children { display: block; }
.admin-nav-children a { min-height: 46px; padding: 0 20px 0 72px; display: flex; align-items: center; color: #b8b8b8; }
.admin-nav-children a:hover, .admin-nav-children a.active { color: #efcdae; background: #1f2d3d; }
.admin-nav-children a.active { box-shadow: none; }
.sidebar-foot { border-top-color: #383838; }
.admin-top { height: 51px; padding: 0 17px; background: #fff; }
.admin-breadcrumb { display: flex; align-items: center; gap: 11px; color: #60636a; }
.admin-breadcrumb i { color: #c5c7cb; font-style: normal; }
.admin-breadcrumb b { color: #b6bac1; font-weight: 400; }
.admin-top-actions { gap: 5px; }
.top-icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: #fff; color: #747a84; font-size: 18px; }
.top-icon-button:hover { color: var(--brand); background: #f5f7fa; }
.top-text-button { min-height: 34px; padding: 0 10px; border: 0; background: #fff; color: #747a84; }
.top-text-button:hover { color: var(--red); background: var(--red-soft); }
.admin-content { max-width: none; padding: 20px 22px 36px; background: #fff; }
.admin-panel { border-color: #e3e5e8; border-radius: 2px; box-shadow: none; }
.order-workbench { padding: 0; border: 0; }
.reference-order-filters { display: grid; gap: 17px; margin-bottom: 18px; }
.filter-row { display: grid; gap: 10px; }
.filter-row.primary-row { grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(180px, 1fr); }
.filter-row.secondary-row { grid-template-columns: repeat(5, minmax(140px, 1fr)) 70px 70px; }
.reference-order-filters input, .reference-order-filters select { width: 100%; min-width: 0; height: 33px; padding: 0 13px; border: 1px solid #dfe3e8; border-radius: 3px; background: #fff; color: #6f7580; }
.filter-search, .filter-reset { height: 33px; border: 0; border-radius: 3px; color: #fff; background: #409eff; }
.filter-reset { color: #606266; background: #f3f5f7; border: 1px solid #dcdfe6; }
.reference-batch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.reference-batch-actions button { min-width: 80px; height: 33px; border: 0; border-radius: 3px; background: #8bc0ef; color: #fff; }
.reference-batch-actions button:first-child { background: #409eff; }
.table-scroll { border-color: #e5e7ea; border-radius: 0; }
.reference-order-table { min-width: 1780px; table-layout: auto; font-size: 12px; }
.reference-order-table th, .reference-order-table td { height: 48px; padding: 9px 10px; text-align: center; vertical-align: middle; border-right: 1px solid #e8eaed; }
.reference-order-table th { height: 49px; background: #eef0f4; color: #444951; font-size: 13px; }
.reference-order-table td small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-order-table .order-param { color: #52a5df; }
.reference-order-table .amount-cell { color: #df5c65; font-weight: 700; }
.reference-order-table .table-actions { min-width: 170px; justify-content: center; }
.compact-order-view .reference-order-table th, .compact-order-view .reference-order-table td { height: 38px; padding-block: 5px; }

@media (max-width: 1100px) {
  .client-header { height: 66px; }
  .client-head-inner { width: 100%; padding: 0 16px; }
  .client-brand { min-width: 0; }
  .client-brand img { width: 40px; height: 40px; }
  .client-nav { top: 66px; }
  .header-search { display: none; }
  .reference-home { width: calc(100% - 24px); margin-top: 12px; }
  .reference-top { height: auto; grid-template-columns: 1fr; }
  .reference-banner { min-height: 320px; }
  .reference-account { grid-template-rows: 86px 58px 160px; }
  .reference-category-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { left: -210px; width: 195px; }
  .sidebar-open .admin-sidebar { left: 0; }
  .filter-row.primary-row, .filter-row.secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .client-brand span { display: none; }
  .reference-home { width: calc(100% - 20px); margin-top: 10px; }
  .reference-banner { min-height: 280px; }
  .banner-brand { left: 18px; top: 16px; }
  .banner-copy { padding: 54px 18px 24px; }
  .banner-copy h1 { font-size: 27px; }
  .banner-copy p { padding: 8px 13px; font-size: 12px; }
  .banner-copy b { min-width: 72px; padding: 7px 8px; font-size: 11px; }
  .reference-account { grid-template-rows: 84px 56px 178px; }
  .account-grid { grid-template-columns: repeat(4, 1fr); }
  .reference-notice { padding: 0 14px; grid-template-columns: auto 1fr; }
  .reference-notice a { display: none; }
  .reference-recommend { height: auto; display: block; }
  .recommend-title { min-height: 86px; grid-template-columns: auto auto; align-content: center; justify-content: space-between; padding: 14px 18px; }
  .recommend-title h2 { font-size: 18px; }
  .recommend-title p { display: none; }
  .recommend-title a { padding: 6px 15px; }
  .recommend-list { grid-template-columns: 1fr; overflow: visible; }
  .compact-product { min-height: 94px; padding: 12px 15px; grid-template-columns: 78px minmax(0, 1fr); border-right: 0; border-bottom: 1px solid #edf0f3; }
  .compact-product:last-child { border-bottom: 0; }
  .compact-product .product-visual { width: 78px; height: 68px; min-height: 0; }
  .reference-category-products { grid-template-columns: 1fr; gap: 8px; }
  .reference-category-card { height: 86px; overflow: hidden; }
  .reference-category-card .product-visual { min-height: 0; }
  .reference-runtime { grid-template-columns: 1fr 1fr; gap: 12px; }
  .reference-runtime a { grid-column: 1 / -1; text-align: center; }
  .filter-row.primary-row, .filter-row.secondary-row { grid-template-columns: 1fr; }
  .admin-top { height: 52px; min-height: 52px; flex-wrap: nowrap; padding: 0 12px; }
  .admin-breadcrumb { min-width: 0; gap: 6px; font-size: 12px; }
  .admin-breadcrumb span:first-child, .admin-breadcrumb i:first-of-type { display: none; }
  .admin-top-actions { width: auto; margin-left: auto; flex: none; }
  .top-icon-button { width: 30px; height: 30px; }
  .admin-content { padding: 12px; }
}
