:root {
  color-scheme: light;
  font-family: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  /* Mirrors AppTheme: ink, brandBerry, rose, lavender, peach and mist. */
  --ink: #403345;
  --muted: #736b73;
  --berry: #dc6e8f;
  --berry-dark: #c25670;
  --rose: #c25670;
  --peach: #cc8c4d;
  --lavender: #8578ad;
  --mint: #4d8c7d;
  --line: rgba(64, 51, 69, 0.10);
  --surface: rgba(255, 255, 255, 0.82);
  --background: #fdf9fa;
  --petal: #fee6ed;
  --blush: #fdd4de;
  --lavender-mist: #f4f1f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at 6% 4%, rgba(253,212,222,.66), transparent 25rem), radial-gradient(circle at 94% 96%, rgba(133,120,173,.13), transparent 29rem), linear-gradient(135deg, #fffdfd 0%, var(--background) 54%, var(--lavender-mist) 100%); }
body.sheet-open, body.catalog-open { overflow: hidden; }
.auth-gate[hidden] { display: none; }
.auth-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 12%, rgba(253,212,222,.72), transparent 30rem), linear-gradient(135deg, rgba(255,253,253,.98), rgba(244,241,249,.97)); backdrop-filter: blur(22px) saturate(160%); }
.auth-brand { position: absolute; top: max(20px, env(safe-area-inset-top)); left: clamp(20px, 4vw, 64px); display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 18px; font-weight: 720; letter-spacing: -.02em; }
.auth-card { width: min(440px, 100%); padding: clamp(24px, 5vw, 40px); border: 1px solid rgba(255,255,255,.94); border-radius: 30px; background: rgba(255,255,255,.76); box-shadow: 0 20px 52px rgba(85,62,87,.12); backdrop-filter: blur(22px) saturate(160%); }
.auth-card h1 { margin-bottom: 8px; font-size: clamp(30px, 6vw, 42px); }
.auth-description { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-form { display: grid; gap: 13px; margin-top: 24px; }
.auth-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.auth-form input { min-height: 50px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: white; color: var(--ink); }
.auth-form input:focus { border-color: rgba(220,110,143,.55); box-shadow: 0 0 0 4px rgba(220,110,143,.12); }
.auth-error { margin: 0; color: var(--rose); font-size: 12px; line-height: 1.45; }
.auth-submit { min-height: 52px; border: 0; border-radius: 15px; background: var(--berry); color: white; font-size: 15px; font-weight: 750; box-shadow: 0 10px 22px rgba(220,110,143,.24); }
.auth-register { min-height: 40px; border: 0; background: transparent; color: var(--berry); font-size: 13px; font-weight: 700; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.app-shell { min-height: 100dvh; background: transparent; }
.topbar { min-height: 64px; display: flex; align-items: center; gap: 20px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid rgba(255,255,255,.86); background: rgba(255,255,255,.66); backdrop-filter: blur(22px) saturate(165%); position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 rgba(64,51,69,.035); }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 720; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--berry); color: white; font-size: 15px; }
.history-trigger { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 13px; border: 0; border-radius: 13px; background: rgba(220,110,143,.10); color: var(--berry-dark); text-decoration: none; font-size: 14px; font-weight: 700; }
.history-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.history-trigger:active { transform: scale(.97); }
.catalog-trigger, .catalog-drawer-header { display: none; }
.store-indicator { color: var(--muted); font-size: 14px; margin-right: auto; }
.online-dot { width: 7px; height: 7px; background: var(--mint); border-radius: 50%; display: inline-block; margin-right: 6px; }
.backend-connect-button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(220,110,143,.16); border-radius: 11px; background: rgba(255,255,255,.72); color: var(--berry-dark); font-size: 12px; font-weight: 720; }
.backend-connect-button.connected { border-color: rgba(79,155,136,.25); color: var(--mint); background: rgba(79,155,136,.08); }
.demo-chip { padding: 7px 10px; border-radius: 999px; background: rgba(220,110,143,.10); color: var(--berry); font-size: 12px; font-weight: 650; }

.workspace { max-width: 1480px; margin: 0 auto; padding: clamp(22px, 4vw, 54px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .58fr); gap: clamp(22px, 4vw, 56px); align-items: start; }
.eyebrow { color: var(--rose); font-size: 11px; font-weight: 750; letter-spacing: .12em; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(31px, 4vw, 47px); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.025em; }
.intro { max-width: 570px; color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 26px; }

.scan-card, .cart-panel, .product-card { border: 1px solid rgba(255,255,255,.9); box-shadow: 0 14px 34px rgba(85,62,87,.075); }
.scan-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border-radius: 22px; background: var(--surface); }
.scan-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; font-size: 30px; line-height: 1; color: var(--berry); background: rgba(220,110,143,.10); transform: rotate(90deg); }
.scan-heading { display: grid; gap: 3px; white-space: nowrap; }
.scan-heading strong { font-size: 14px; }
.scan-heading span, .checkout-note { color: var(--muted); font-size: 12px; }
.search-field { min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.88); transition: border-color .16s ease, box-shadow .16s ease; }
.search-field:focus-within { border-color: rgba(220,110,143,.55); box-shadow: 0 0 0 4px rgba(220,110,143,.12); }
.search-symbol { color: var(--berry); font-size: 22px; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
kbd { color: var(--muted); border: 1px solid rgba(64,51,69,.13); border-radius: 5px; padding: 1px 5px; font-size: 11px; }
.secondary-button, .text-button { border: 0; background: transparent; color: var(--berry); font-weight: 700; }
.secondary-button { min-height: 48px; padding: 0 15px; border-radius: 13px; background: rgba(220,110,143,.10); }
.icon-button { display: grid; place-items: center; width: 48px; padding: 0; }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.secondary-button:active, .text-button:active, .quantity-button:active, .add-button:active { transform: scale(.97); }
.search-status { min-height: 23px; margin: 11px 3px 5px; color: var(--muted); font-size: 13px; }
.results { display: grid; gap: 8px; }
.result-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 15px; background: rgba(255,255,255,.58); border: 1px solid rgba(64,51,69,.07); }
.result-item:hover { background: white; }
.product-thumb { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; color: var(--berry-dark); background: linear-gradient(145deg, rgba(253,212,222,.78), rgba(254,230,237,.9)); font-size: 19px; }
.product-image { object-fit: contain; padding: 4px; }
.result-info, .cart-item-info { min-width: 0; flex: 1; }
.result-info strong, .cart-item-info strong { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-info span, .cart-item-info span { color: var(--muted); font-size: 15px; }
.result-price { color: var(--berry); font-weight: 750; font-variant-numeric: tabular-nums; }
.add-button { margin-left: 5px; border: 0; border-radius: 11px; padding: 8px 10px; background: var(--berry); color: white; font-size: 12px; font-weight: 700; }

.stock-section, .history-section { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.muted-count { color: var(--muted); font-size: 13px; }
.section-note { margin: -4px 0 14px; color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.product-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 12px; border-radius: 24px; background: rgba(255,255,255,.78); }
.product-visual { position: relative; display: grid; place-items: center; width: 100%; height: clamp(200px, 22vw, 280px); border: 1px solid rgba(220,110,143,.10); border-radius: 17px; overflow: hidden; background: #fff; }
.product-visual::before { display: none; }
.product-visual .product-thumb { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 14px; font-size: clamp(39px, 4.6vw, 55px); color: var(--berry-dark); background: transparent; box-shadow: none; }
.product-visual .product-image { padding: 8px; object-fit: contain; }
.product-visual .product-thumb:not(.product-image) { width: clamp(82px, 10vw, 118px); height: clamp(82px, 10vw, 118px); border-radius: 31px; background: rgba(254,230,237,.72); box-shadow: 0 12px 26px rgba(168,71,100,.12); }
.variant-count { position: absolute; right: 10px; top: 10px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.78); color: var(--berry-dark); font-size: 12px; font-weight: 720; backdrop-filter: blur(10px); }
.product-details { display: grid; gap: 5px; padding: 14px 5px 2px; }
.product-card h3 { margin: 0; font-size: clamp(16px, 1.7vw, 20px); letter-spacing: -.028em; line-height: 1.22; }
.product-price { color: var(--berry); font-size: clamp(28px, 3vw, 40px); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.product-price small { margin-left: 2px; font-size: 12px; letter-spacing: 0; font-weight: 650; }
.choose-spec-button { width: 100%; min-height: 44px; margin-top: 11px; border: 0; border-radius: 13px; background: rgba(220,110,143,.10); color: var(--berry); font-size: 14px; font-weight: 720; }
.choose-spec-button:active { transform: scale(.97); }
.order-history { display: grid; gap: 9px; }
.empty-history { padding: 28px 18px; border: 1px dashed rgba(220,110,143,.24); border-radius: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.history-description { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.history-item { display: grid; gap: 13px; padding: 16px; border: 1px solid rgba(64,51,69,.08); border-radius: 18px; background: rgba(255,255,255,.64); }
.history-item-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px; align-items: start; }
.history-item strong { display: block; margin-bottom: 4px; font-size: 14px; }
.history-meta { color: var(--muted); font-size: 12px; }
.history-side { display: grid; justify-items: end; gap: 7px; }
.history-total { color: var(--berry); font-size: 15px; font-weight: 760; font-variant-numeric: tabular-nums; }
.history-saving { color: var(--mint); font-size: 11px; font-weight: 700; }
.status-pill { padding: 4px 8px; border-radius: 999px; background: rgba(79,155,136,.11); color: var(--mint); font-size: 11px; font-weight: 700; }
.status-pill.cancelled { color: var(--muted); background: rgba(64,51,69,.08); }
.cancel-order { border: 0; padding: 5px 0; background: transparent; color: var(--rose); font-size: 12px; font-weight: 700; }
.reprint-order { border: 0; padding: 5px 0; background: transparent; color: var(--berry); font-size: 12px; font-weight: 700; }
.reprint-order:disabled { opacity: .6; }
.history-details { display: grid; gap: 8px; padding: 11px 12px; border-radius: 13px; background: rgba(220,110,143,.06); }
.history-detail-line { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 13px; line-height: 1.35; }
.history-detail-line span:first-child { min-width: 0; }
.history-detail-line small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.history-detail-line del { color: var(--muted); font-size: 11px; }
.history-detail-line span:last-child { flex: 0 0 auto; color: var(--muted); font-size: 12px; text-align: right; }
.history-back { display: inline-flex; align-items: center; min-height: 42px; margin-left: auto; padding: 0 13px; border-radius: 13px; background: rgba(220,110,143,.10); color: var(--berry); text-decoration: none; font-size: 14px; font-weight: 720; }
.history-workspace { width: min(920px, 100%); margin: 0 auto; padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 32px); }
.history-page-card { padding: clamp(20px, 4vw, 36px); border: 1px solid rgba(255,255,255,.9); border-radius: 28px; background: rgba(255,255,255,.78); box-shadow: 0 16px 42px rgba(85,62,87,.08); backdrop-filter: blur(18px); }
.history-page-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.history-page-heading h1 { margin-bottom: 7px; font-size: clamp(31px, 5vw, 44px); }
.history-page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; }
.history-count { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; background: rgba(220,110,143,.10); color: var(--berry); font-size: 13px; font-weight: 720; }
.history-page-list { gap: 12px; }
/* 收款页作为面向顾客的展示屏：尽量占满视口、弱化顶栏、价格放大 */
.payment-view .topbar { background: rgba(255,255,255,.40); box-shadow: none; }
.payment-workspace { min-height: 100dvh; display: grid; place-items: center; padding: clamp(28px, 6vw, 72px) 16px; }
.payment-card { width: min(720px, 100%); padding: clamp(34px, 6vw, 60px); border: 1px solid rgba(255,255,255,.92); border-radius: 36px; background: rgba(255,255,255,.84); box-shadow: 0 24px 64px rgba(85,62,87,.12); text-align: center; backdrop-filter: blur(22px); }
.payment-card h1 { margin-bottom: 8px; font-size: clamp(34px, 6vw, 52px); letter-spacing: -.04em; }
.payment-order { margin: 0; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.payment-total { display: block; margin: 22px 0 26px; font-size: clamp(108px, 19vw, 208px); line-height: .92; letter-spacing: -.03em; font-weight: 680; font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; font-family: "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "SF Pro Display", sans-serif; color: #c2547f; background: linear-gradient(135deg, #d96a95 0%, #b14a78 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.payment-total::first-letter { font-size: .46em; font-weight: 420; letter-spacing: 0; vertical-align: .16em; -webkit-text-fill-color: #b14a78; }
/* 收款码并排卡片：白底圆角 + 品牌色描边，窄屏自动改为上下排 */
.payment-qr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 4px; }
.payment-qr-row.single { grid-template-columns: minmax(240px, 420px); justify-content: center; }
.payment-qr-row.empty { display: block; }
.payment-qr-empty { padding: 24px 18px; border: 1px dashed rgba(64,51,69,.20); border-radius: 18px; color: var(--muted); background: rgba(64,51,69,.03); font-size: 14px; line-height: 1.6; }
.payment-qr-card { margin: 0; padding: 0; border-radius: 20px; overflow: hidden; background: #fff; border: 3px solid rgba(64,51,69,.08); box-shadow: 0 10px 26px rgba(64,51,69,.10); }
.payment-qr-card.qr-alipay { border-color: #1677ff; }
.payment-qr-card.qr-wechat { border-color: #07c160; }
.payment-qr-card .qr-brand { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; font-size: 15px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.payment-qr-card.qr-alipay .qr-brand { background: #1677ff; }
.payment-qr-card.qr-wechat .qr-brand { background: #07c160; }
.payment-qr-card img { display: block; width: 100%; height: auto; object-fit: contain; background: #fff; }
@media (max-width: 699px) { .payment-qr-row { gap: 10px; } .payment-qr-card { border-radius: 14px; } }
.payment-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.payment-items { display: grid; gap: 8px; margin-top: 22px; padding: 13px; border-radius: 15px; background: rgba(220,110,143,.06); text-align: left; }
.payment-items div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.payment-items span:last-child { color: var(--muted); font-size: 12px; text-align: right; }
.payment-item-line > span:first-child { min-width: 0; display: grid; gap: 3px; }
.payment-item-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; color: var(--ink); }
.payment-item-line small { color: var(--muted); font-size: 13px; }
.payment-item-line > span:last-child { display: grid; justify-items: end; gap: 2px; }
.payment-item-line del { color: var(--muted); font-size: 11px; }
.payment-item-line b { color: var(--berry); font-size: 20px; line-height: 1.05; font-weight: 850; }
.payment-item-line em { color: var(--mint); font-size: 20px; line-height: 1.05; font-weight: 850; font-style: normal; }
.payment-confirm { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; margin-top: 22px; border: 0; border-radius: 18px; background: var(--berry); color: white; text-decoration: none; font-size: 17px; font-weight: 750; box-shadow: 0 12px 24px rgba(220,110,143,.28); }
.payment-confirm:active { transform: scale(.98); }
.payment-empty { display: grid; gap: 10px; }
.payment-empty p { margin: 0; color: var(--muted); }
.payment-empty .payment-confirm { margin-top: 12px; }
.payment-success { display: grid; gap: 16px; justify-items: center; width: min(780px, 100%); padding: clamp(36px, 7vw, 72px); text-align: center; }
.success-check { color: var(--mint); margin-bottom: 2px; filter: drop-shadow(0 12px 26px rgba(79,155,136,.32)); }
.success-check svg { width: 120px; height: 120px; }
.success-title { margin: 0; font-size: clamp(38px, 7vw, 60px); font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.success-amount { margin: 6px 0; }
.success-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; width: 100%; margin-top: 22px; }
.success-fullscreen-btn { min-height: 68px; padding: 0 26px; border: 1px solid rgba(220,110,143,.28); border-radius: 18px; background: rgba(220,110,143,.08); color: var(--berry); font-size: 17px; font-weight: 720; }
.success-fullscreen-btn:active { transform: scale(.98); }
.payment-success .payment-confirm { width: auto; min-height: 68px; padding: 0 30px; margin-top: 0; font-size: 18px; }

/* 面向顾客的「全屏展示」浮动按钮：扫码页与成功页共用 */
.screen-fullscreen-fab { position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.86); color: var(--berry-dark); font-size: 15px; font-weight: 720; box-shadow: 0 14px 34px rgba(85,62,87,.18); backdrop-filter: blur(14px); }
.screen-fullscreen-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.screen-fullscreen-fab:active { transform: scale(.97); }
/* 进入全屏后隐藏顶栏与浮动按钮，让画面更干净 */
.payment-view.is-fullscreen .topbar { opacity: 0; pointer-events: none; }
.payment-view.is-fullscreen .screen-fullscreen-fab { opacity: 0; pointer-events: none; }
.payment-view.is-fullscreen .payment-workspace { padding: clamp(20px, 4vw, 48px) 16px; }

.cart-panel { position: sticky; top: 82px; min-height: calc(100dvh - 118px); display: flex; flex-direction: column; padding: 23px; border-radius: 26px; background: rgba(255,255,255,.80); backdrop-filter: blur(18px) saturate(150%); }
.cart-header { display: flex; align-items: start; justify-content: space-between; }
.cart-header .eyebrow { margin-bottom: 5px; }
.order-scan-card { margin-top: 15px; padding: 8px; border-radius: 17px; box-shadow: none; }
.order-scan-card .search-field, .order-scan-card .secondary-button { min-height: 44px; }
.text-button { min-height: 36px; padding: 0 5px; font-size: 13px; }
.customer-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(253,212,222,.90), rgba(254,230,237,.78)); }
.customer-total span { color: var(--berry-dark); font-size: 15px; font-weight: 720; }
.customer-total strong { color: var(--berry); font-size: clamp(34px, 3.7vw, 50px); line-height: .95; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.promotion-suggestion { display: grid; gap: 13px; margin-top: 12px; padding: 14px 15px; border: 1px solid rgba(204,140,77,.28); border-radius: 17px; background: linear-gradient(135deg, rgba(255,250,247,.98), rgba(254,238,242,.86)); }
.promotion-suggestion[hidden] { display: none; }
.promotion-suggestion-copy { display: grid; gap: 3px; }
.promotion-suggestion-copy .eyebrow { margin: 0; color: var(--peach); }
.promotion-suggestion-copy strong { font-size: 15px; }
.promotion-suggestion-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.promotion-suggestion-actions { display: flex; gap: 8px; }
.suggestion-confirm, .suggestion-decline { min-height: 36px; border-radius: 10px; font-size: 12px; font-weight: 720; }
.suggestion-confirm { flex: 1; border: 0; background: var(--berry); color: #fff; }
.suggestion-decline { border: 1px solid rgba(220,110,143,.20); padding: 0 12px; background: rgba(255,255,255,.7); color: var(--berry); }
.cart-list { flex: 1; min-height: 280px; padding: 12px 0; }
.empty-cart { height: 100%; min-height: 250px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-cart .empty-icon { margin: 0 auto 11px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; font-size: 24px; background: rgba(220,110,143,.10); color: var(--berry); }
.empty-cart p { max-width: 220px; margin: 0; font-size: 13px; line-height: 1.55; }
.cart-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-total { display: grid; justify-items: end; gap: 3px; color: var(--berry); font-size: 15px; font-weight: 760; text-align: right; font-variant-numeric: tabular-nums; }
.cart-item-total span { color: var(--muted); font-size: 16px; line-height: 1.1; font-weight: 600; white-space: nowrap; }
.cart-item-total strong { color: var(--berry-dark); font-size: 23px; line-height: 1.05; font-weight: 850; white-space: nowrap; }
.quantity-control { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quantity-stepper { display: inline-flex; align-items: center; border-radius: 11px; background: rgba(220,110,143,.10); }
.quantity-button { width: 31px; height: 30px; border: 0; color: var(--berry); background: transparent; font-size: 18px; line-height: 1; }
.quantity-value { min-width: 27px; text-align: center; color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.remove-button { border: 0; padding: 4px; background: transparent; color: var(--muted); font-size: 12px; }
.promotion-picker { grid-column: 1 / 4; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 1px 0 1px 52px; }
.promotion-picker-label { color: var(--muted); font-size: 11px; }
.promotion-options { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.promotion-option { min-height: 28px; padding: 0 8px; border: 1px solid rgba(220,110,143,.18); border-radius: 8px; background: rgba(220,110,143,.05); color: var(--muted); font-size: 11px; }
.promotion-option.selected { border-color: var(--berry); background: rgba(220,110,143,.13); color: var(--berry-dark); font-weight: 720; }
.promotion-option:active { transform: scale(.97); }
.promotion-saving { color: var(--mint); font-size: 11px; font-weight: 700; }
.cart-summary { padding: 17px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.cart-summary div { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.cart-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cart-summary .discount-row strong { color: var(--mint); }
.cart-summary div:last-child { font-size: 15px; align-items: baseline; }
.cart-summary div:last-child strong { font-size: clamp(32px, 3vw, 42px); color: var(--berry); letter-spacing: -.055em; }
.checkout-button { min-height: 55px; display: flex; justify-content: space-between; align-items: center; gap: 15px; width: 100%; padding: 0 18px; border: 0; border-radius: 17px; background: var(--berry); color: white; font-weight: 700; box-shadow: 0 10px 22px rgba(220,110,143,.26); transition: transform .16s ease, background .16s ease; }
.checkout-button:not(:disabled):active { transform: scale(.98); }
.checkout-button:disabled { background: #b6acbc; box-shadow: none; }
.checkout-button strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.checkout-note { margin: 12px 2px 0; text-align: center; line-height: 1.5; }
.toast { position: fixed; inset: auto 50% 24px auto; transform: translateX(50%) translateY(16px); width: max-content; max-width: calc(100vw - 32px); padding: 11px 15px; border-radius: 13px; background: rgba(41,33,38,.92); color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 70; }
.toast.visible { opacity: 1; transform: translateX(50%) translateY(0); }
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(41,33,38,.24); backdrop-filter: blur(4px); }
.spec-sheet, .history-sheet { width: min(560px, 100%); max-height: min(650px, calc(100dvh - 40px)); overflow: auto; padding: 20px; border: 1px solid rgba(255,255,255,.88); border-radius: 28px; background: rgba(252,250,248,.96); box-shadow: 0 28px 70px rgba(48,28,40,.24); }
.sheet-grabber { display: none; width: 36px; height: 5px; margin: 0 auto 14px; border-radius: 4px; background: rgba(64,51,69,.2); }
.sheet-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.sheet-header h2 { font-size: 24px; }
.sheet-header .eyebrow { margin-bottom: 5px; }
.sheet-close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(64,51,69,.08); color: var(--ink); font-size: 25px; font-weight: 300; line-height: 1; }
.sheet-description { margin: 11px 0 16px; color: var(--muted); font-size: 13px; }
.spec-options { display: grid; gap: 9px; }
.spec-empty { margin: 8px 2px; padding: 16px; border: 1px dashed rgba(64,51,69,.18); border-radius: 14px; color: rgba(64,51,69,.6); font-size: 13px; line-height: 1.6; }
.spec-option { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 88px; padding: 11px; border: 1px solid rgba(64,51,69,.09); border-radius: 17px; background: rgba(220,110,143,.07); cursor: pointer; user-select: none; transition: border-color .15s ease, background .15s ease, transform .1s ease; }
.spec-option:hover { border-color: rgba(220,110,143,.45); background: rgba(220,110,143,.12); }
.spec-option:active { transform: scale(.99); }
.spec-option.is-out { cursor: not-allowed; opacity: .5; }
.spec-option.is-out:hover { border-color: rgba(64,51,69,.09); background: rgba(220,110,143,.07); }
.spec-option.in-cart { border-color: rgba(220,110,143,.6); background: rgba(220,110,143,.16); }
.spec-option.in-cart .add-button.added { background: var(--berry-dark); }
.spec-option > .product-thumb { width: 48px; height: 48px; font-size: 22px; }
.spec-info { min-width: 0; padding: 10px 12px; border: 1px solid rgba(64,51,69,.07); border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 3px 10px rgba(64,51,69,.035); }
.spec-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.spec-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.spec-option .add-button { min-height: 46px; padding: 0 13px; font-size: 14px; }
.spec-action { display: grid; justify-items: end; gap: 7px; color: var(--berry); font-size: 15px; font-variant-numeric: tabular-nums; }
.spec-action strong { font-size: 18px; }
.backend-sheet { width: min(480px, 100%); padding: 24px; border: 1px solid rgba(255,255,255,.88); border-radius: 26px; background: rgba(252,250,248,.97); box-shadow: 0 28px 70px rgba(48,28,40,.24); }
.backend-form { display: grid; gap: 13px; margin-top: 18px; }
.backend-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.backend-form input { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: white; color: var(--ink); }
.backend-form input:focus { border-color: rgba(220,110,143,.55); box-shadow: 0 0 0 4px rgba(220,110,143,.12); }
.backend-actions { display: flex; gap: 9px; margin-top: 4px; }
.backend-actions button { flex: 1; min-height: 44px; }
.backend-error { margin: 0; color: var(--rose); font-size: 12px; line-height: 1.45; }

@media (min-width: 1101px) {
  .workspace { height: calc(100dvh - 64px); padding-block: 18px; overflow: hidden; }
  .catalog-panel, .cart-panel { height: 100%; min-height: 0; }
  .catalog-panel { overflow: auto; padding-right: 3px; }
  .cart-panel { position: static; }
  .cart-list { min-height: 0; overflow: auto; }
}
@media (min-width: 700px) and (max-width: 1100px) {
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .cart-panel { order: -1; position: static; min-height: 0; padding: 16px; }
  .customer-total { margin-top: 12px; padding: 13px 16px; }
  .customer-total strong { font-size: clamp(36px, 5vw, 48px); }
  .cart-summary { display: none; }
  .cart-list { min-height: 0; max-height: 145px; padding: 0; overflow: auto; }
  .empty-cart { display: none; }
  .checkout-button { margin-top: 12px; }
  .stock-section { margin-top: 16px; }
  .product-grid { gap: 14px; }
  .product-visual { min-height: clamp(160px, 28vw, 230px); }
}
/* iPad-sized canvases use the same order-first layout in both orientations. */
@media (min-width: 700px) and (max-width: 1100px) {
  .topbar { min-height: 56px; }
  .catalog-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; margin-left: auto; padding: 0 12px; border: 0; border-radius: 13px; background: rgba(220,110,143,.10); color: var(--berry); font-size: 14px; font-weight: 720; }
  .history-trigger { margin-left: 0; }
  .catalog-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .catalog-trigger:active { transform: scale(.97); }
  .workspace { display: block; min-height: calc(100dvh - 56px); padding: 12px; }
  .cart-panel { min-height: calc(100dvh - 80px); padding: 18px; }
  .order-scan-card { margin-top: 12px; }
  .cart-list { max-height: none; min-height: 0; overflow: auto; }
  .empty-cart { min-height: 0; }
  .cart-item { grid-template-columns: 108px minmax(0, 1fr) auto; gap: 12px; padding: 16px 0; }
  .cart-item > .product-thumb { width: 108px; height: 108px; border-radius: 20px; grid-row: 1 / span 3; align-self: start; font-size: 38px; }
  .cart-item > .product-image { padding: 6px; object-fit: contain; background: #fff; }
  .cart-item-info strong { font-size: 18px; }
  .cart-item-info span { font-size: 14px; }
  .cart-item-total strong { font-size: 24px; }
  .quantity-control { grid-column: 2 / 4; }
  .promotion-picker { grid-column: 2 / 4; margin-left: 0; }
  .checkout-button { min-height: 68px; margin-top: 14px; margin-bottom: calc(10px + env(safe-area-inset-bottom)); padding: 0 21px; border-radius: 20px; }
  .checkout-button strong { font-size: 20px; }
  .payment-workspace { min-height: calc(100dvh - 56px); padding: 24px 16px; }
  .payment-card { padding: 28px; }
  .payment-confirm { min-height: 70px; font-size: 18px; }
  .catalog-backdrop[hidden] { display: none; }
.catalog-backdrop { position: fixed; inset: 0; z-index: 19; display: block; background: rgba(64,51,69,.20); backdrop-filter: blur(4px); opacity: 0; animation: catalog-dim-in .22s ease forwards; }
.catalog-panel { position: fixed; inset: 0 0 0 auto; z-index: 20; display: block; width: min(560px, calc(100vw - 46px)); height: 100dvh; padding: calc(14px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)); overflow: auto; background: rgba(255,252,253,.96); box-shadow: -22px 0 56px rgba(85,62,87,.16); transform: translateX(105%); transition: transform .3s cubic-bezier(.22,.8,.25,1); }
  body.catalog-open .catalog-panel { transform: translateX(0); }
  .catalog-drawer-header { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 16px; }
  .catalog-drawer-header div { display: grid; gap: 3px; }
  .catalog-drawer-header span { color: var(--muted); font-size: 12px; font-weight: 650; }
  .catalog-drawer-header strong { font-size: 20px; letter-spacing: -.025em; }
  .scan-card { padding: 10px; }
  .stock-section { margin-top: 14px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { padding: 10px; border-radius: 20px; }
  .product-visual { height: 220px; border-radius: 16px; }
  .product-visual .product-image { padding: 6px; }
  .product-visual .product-thumb:not(.product-image) { width: 94px; height: 94px; border-radius: 28px; font-size: 43px; }
  .variant-count { top: 8px; right: 8px; padding: 5px 7px; font-size: 11px; }
  .product-details { gap: 5px; padding: 13px 4px 2px; }
  .product-card h3 { font-size: 19px; }
  .product-price { font-size: 32px; }
  .choose-spec-button { min-height: 42px; margin-top: 8px; }
  .history-page { align-self: stretch; width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 22px; border-radius: 26px; }
}
@media (max-width: 699px) { .topbar { min-height: 62px; gap: 10px; padding: 0 17px; } .store-indicator { display: none; } .backend-connect-button { margin-left: auto; min-height: 40px; padding: 0 9px; } .history-trigger { min-height: 40px; padding: 0 10px; font-size: 13px; } .workspace { display: flex; flex-direction: column; gap: 22px; padding: 23px 16px 28px; } .catalog-panel, .cart-panel { width: 100%; } .cart-panel { position: static; order: 2; min-height: unset; } .cart-list { min-height: 190px; max-height: 360px; overflow: auto; } .promotion-picker { margin-left: 0; } .promotion-suggestion-actions { width: 100%; } .spec-sheet, .history-sheet, .backend-sheet { align-self: end; width: calc(100% + 32px); max-height: 82dvh; padding: 12px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; } .sheet-backdrop { padding: 0 16px; align-items: end; } .sheet-grabber { display: block; } .history-page-heading { align-items: stretch; flex-direction: column; } .history-count { align-self: flex-start; } }
@media (max-width: 390px) { .brand { font-size: 16px; } .demo-chip { padding: 6px 8px; } .scan-heading { white-space: normal; } .cart-panel { padding: 18px; } .history-item { padding: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@keyframes catalog-dim-in { to { opacity: 1; } }

/* Member management */
.member-trigger { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 720; }
.member-trigger.active { color: var(--berry-dark); background: rgba(220,110,143,.11); }
.member-trigger:active { transform: scale(.97); }
.member-workspace { width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 64px; }
.member-hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.member-hero h1 { margin: 5px 0 8px; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.055em; }
.member-hero p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; }
.primary-action { min-height: 50px; display: inline-flex; align-items: center; gap: 8px; padding: 0 19px; border: 0; border-radius: 15px; background: var(--berry); color: #fff; font-size: 14px; font-weight: 760; box-shadow: 0 12px 24px rgba(220,110,143,.22); }
.primary-action span { font-size: 21px; font-weight: 400; line-height: 0; }
.primary-action:active { transform: scale(.98); }
.member-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.member-stat-card { min-height: 142px; display: grid; align-content: center; gap: 7px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.92); border-radius: 22px; background: rgba(255,255,255,.71); box-shadow: 0 12px 32px rgba(85,62,87,.06); }
.member-stat-card span { color: var(--muted); font-size: 13px; font-weight: 650; }
.member-stat-card strong { color: var(--ink); font-size: 36px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.member-stat-card small { color: var(--muted); font-size: 11px; }
.member-stat-card.stat-main { background: linear-gradient(135deg, rgba(253,212,222,.86), rgba(255,255,255,.82)); }
.member-stat-card.stat-main strong { color: var(--berry-dark); }
.member-content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.member-list-card, .level-settings-card { min-width: 0; padding: 24px; border: 1px solid rgba(255,255,255,.92); border-radius: 26px; background: rgba(255,255,255,.75); box-shadow: 0 16px 42px rgba(85,62,87,.07); }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.section-heading h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.035em; }
.member-list-heading { align-items: center; }
.member-count { padding: 7px 10px; border-radius: 999px; background: rgba(220,110,143,.10); color: var(--berry-dark); font-size: 12px; font-weight: 720; white-space: nowrap; }
.member-toolbar { display: flex; gap: 10px; margin: 21px 0 13px; }
.member-search { min-height: 43px; display: flex; align-items: center; gap: 8px; flex: 1; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.82); color: var(--muted); }
.member-search span { font-size: 22px; line-height: 1; }
.member-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.member-toolbar select, .member-form select, .member-form input, .member-form textarea { min-height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: rgba(255,255,255,.86); color: var(--ink); }
.member-toolbar select { min-width: 116px; }
.member-toolbar select:focus, .member-form select:focus, .member-form input:focus, .member-form textarea:focus { border-color: rgba(220,110,143,.55); box-shadow: 0 0 0 4px rgba(220,110,143,.10); }
.member-table-wrap { overflow-x: auto; }
.member-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.member-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 680; text-align: left; white-space: nowrap; }
.member-table td { padding: 14px 12px; border-bottom: 1px solid rgba(64,51,69,.075); vertical-align: middle; font-size: 13px; }
.member-table tbody tr:last-child td { border-bottom: 0; }
.member-person { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.member-avatar { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: linear-gradient(135deg, var(--blush), #f4edf7); color: var(--berry-dark); font-size: 15px; font-weight: 760; }
.member-person strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-person span, .member-joined { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.level-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 8px; background: rgba(133,120,173,.11); color: var(--lavender); font-size: 11px; font-weight: 760; }
.member-benefit { color: var(--mint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.member-actions { display: flex; gap: 6px; }
.member-action { min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: rgba(64,51,69,.06); color: var(--muted); font-size: 11px; }
.member-action:hover { color: var(--berry-dark); background: rgba(220,110,143,.10); }
.member-action.delete:hover { color: var(--rose); background: rgba(194,86,112,.10); }
.member-empty { display: grid; justify-items: center; gap: 7px; padding: 52px 20px 42px; color: var(--muted); text-align: center; }
.member-empty .empty-icon { margin-bottom: 2px; }
.member-empty strong { color: var(--ink); font-size: 16px; }
.member-empty p { max-width: 320px; margin: 0 0 9px; font-size: 12px; line-height: 1.6; }
.secondary-button { min-height: 36px; padding: 0 12px; border: 1px solid rgba(220,110,143,.18); border-radius: 10px; background: rgba(220,110,143,.08); color: var(--berry-dark); font-size: 12px; font-weight: 720; }
.level-settings-intro { margin: 14px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.level-list { display: grid; gap: 10px; }
.level-row { padding: 13px; border: 1px solid rgba(64,51,69,.08); border-radius: 15px; background: rgba(255,255,255,.60); }
.level-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.level-row-head strong { font-size: 14px; }
.level-row-head span { color: var(--muted); font-size: 11px; }
.level-config { display: grid; grid-template-columns: 1fr 94px; gap: 7px; }
.level-config select, .level-config input { width: 100%; min-height: 35px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; }
.level-config input:disabled { color: #aaa; background: rgba(64,51,69,.04); }
.level-config select:focus, .level-config input:focus { border-color: rgba(220,110,143,.55); }
.member-sheet { width: min(650px, 100%); max-height: min(720px, calc(100dvh - 40px)); overflow: auto; padding: 24px; border: 1px solid rgba(255,255,255,.88); border-radius: 28px; background: rgba(252,250,248,.97); box-shadow: 0 28px 70px rgba(48,28,40,.24); }
.member-form { display: grid; gap: 15px; margin-top: 18px; }
.member-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.member-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 680; }
.member-form input, .member-form select { width: 100%; }
.member-form textarea { width: 100%; min-height: 74px; padding: 10px 11px; resize: vertical; }
.required-mark { color: var(--berry); }
.member-form-error { margin: 0; color: var(--rose); font-size: 12px; line-height: 1.5; }
.member-form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.member-form-actions button { min-height: 43px; padding: 0 17px; border-radius: 11px; font-size: 13px; font-weight: 720; }
@media (max-width: 980px) { .member-content-grid { grid-template-columns: 1fr; } .level-settings-card { order: 2; } }
@media (max-width: 720px) { .member-workspace { width: min(100% - 28px, 620px); padding: 28px 0 45px; } .member-hero { align-items: start; flex-direction: column; margin-bottom: 20px; } .member-hero h1 { font-size: 38px; } .member-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .member-stat-card { min-height: 118px; padding: 16px; } .member-stat-card strong { font-size: 29px; } .member-list-card, .level-settings-card { padding: 18px; border-radius: 22px; } .member-toolbar { flex-direction: column; } .member-toolbar select { width: 100%; } .member-form-grid { grid-template-columns: 1fr; } .member-sheet { width: calc(100% + 32px); padding: 12px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; } .member-form-actions { padding-bottom: 2px; } }
@media (max-width: 500px) { .member-trigger { display: none; } .member-workspace { width: calc(100% - 24px); } .member-stat-grid { gap: 8px; } .member-stat-card { padding: 14px; } .member-stat-card small { font-size: 10px; } .member-content-grid { gap: 12px; } }

/* Refined member center visual system */
.member-view {
  --member-ink: #392d42;
  --member-soft: #786c78;
  --member-pink: #de708f;
  --member-pink-deep: #b94f71;
  --member-lilac: #8574ae;
  --member-card: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,221,231,.86), transparent 28rem),
    radial-gradient(circle at 97% 25%, rgba(217,209,239,.48), transparent 28rem),
    linear-gradient(135deg, #fffafa 0%, #fbf7f9 46%, #f2eff7 100%);
  color: var(--member-ink);
}
.member-view::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: radial-gradient(rgba(64,51,69,.08) .55px, transparent .55px); background-size: 6px 6px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
.member-view .topbar { background: rgba(255,255,255,.58); border-bottom-color: rgba(255,255,255,.78); }
.member-view .brand { color: var(--member-ink); }
.member-view .history-trigger { color: var(--member-ink); background: rgba(255,255,255,.72); border: 1px solid rgba(64,51,69,.08); transition: transform .18s ease, background .18s ease; }
.member-view .history-trigger:hover { background: #fff; transform: translateY(-1px); }
.member-view .store-indicator { color: var(--member-soft); }
.member-view .member-trigger { color: var(--member-pink-deep); background: rgba(222,112,143,.12); }
.member-workspace { position: relative; z-index: 1; width: min(1320px, calc(100% - 64px)); padding: 44px 0 72px; }
.member-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 284px; display: flex; justify-content: space-between; align-items: center; gap: 34px; margin-bottom: 20px; padding: 42px 46px; border-radius: 34px; color: #fff; background: linear-gradient(120deg, #4b354c 0%, #663f58 52%, #9c526f 100%); box-shadow: 0 22px 42px rgba(83,52,75,.18); }
.member-hero::before { content: ""; position: absolute; z-index: -1; width: 480px; height: 480px; right: 12%; top: -330px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.035), 0 0 0 60px rgba(255,255,255,.03), 0 0 0 90px rgba(255,255,255,.025); }
.member-hero::after { content: "✦"; position: absolute; right: 42%; bottom: 22px; color: rgba(255,255,255,.28); font-size: 21px; transform: rotate(16deg); }
.member-hero-copy { position: relative; z-index: 1; max-width: 600px; }
.member-hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 760; letter-spacing: .18em; }
.hero-kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffd1dd; box-shadow: 0 0 0 5px rgba(255,209,221,.13); }
.member-hero h1 { margin: 18px 0 13px; font-size: clamp(38px, 5vw, 63px); line-height: .98; letter-spacing: -.075em; }
.member-hero h1 em { color: #ffd4df; font-style: normal; }
.member-hero-copy > p { max-width: 480px; margin: 0; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.7; }
.member-hero-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.member-hero-meta span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); font-size: 11px; }
.member-hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 25px; min-width: 235px; }
.member-hero-mini-card { display: grid; gap: 5px; min-width: 205px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 12px 26px rgba(48,26,45,.15); backdrop-filter: blur(12px); }
.mini-card-label { color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: .08em; }
.member-hero-mini-card strong { font-size: 29px; letter-spacing: -.05em; }
.member-hero-mini-card strong span { padding: 0 4px; color: #ffd2dd; font-size: 17px; }
.member-hero-mini-card small { color: rgba(255,255,255,.62); font-size: 11px; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 190px; height: 190px; right: -26px; top: -36px; }
.orbit-two { width: 116px; height: 116px; right: 10px; top: 2px; }
.member-hero .primary-action { color: var(--member-pink-deep); background: #fff; box-shadow: 0 10px 24px rgba(34,15,31,.18); }
.member-hero .primary-action:hover { background: #fff6f8; transform: translateY(-2px); }
.member-hero .primary-action:active { transform: scale(.98); }
.member-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.member-stat-card { position: relative; min-height: 144px; align-content: space-between; gap: 8px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: var(--member-card); box-shadow: 0 12px 30px rgba(85,62,87,.055); backdrop-filter: blur(10px); transition: transform .2s ease, box-shadow .2s ease; }
.member-stat-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 56px; height: 56px; border-radius: 56px 0 22px 0; background: linear-gradient(135deg, transparent, rgba(222,112,143,.09)); }
.member-stat-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(85,62,87,.1); }
.member-stat-card.stat-main { background: linear-gradient(140deg, #fff0f4, #fffafc 74%); }
.stat-card-top { display: flex; align-items: center; gap: 9px; color: var(--member-soft); font-size: 12px; font-weight: 720; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--member-pink-deep); background: rgba(222,112,143,.12); font-size: 15px; }
.member-stat-card strong { position: relative; z-index: 1; color: var(--member-ink); font-size: 38px; letter-spacing: -.07em; }
.member-stat-card.stat-main strong { color: var(--member-pink-deep); }
.member-stat-card small { color: var(--member-soft); font-size: 10px; }
.member-content-grid { grid-template-columns: minmax(0, 1.45fr) minmax(350px, .8fr); gap: 20px; }
.member-list-card, .level-settings-card { padding: 26px; border-color: rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.74); box-shadow: 0 16px 42px rgba(85,62,87,.065); backdrop-filter: blur(12px); }
.member-list-heading { align-items: start; margin-bottom: 20px; }
.section-subtitle { margin: 7px 0 0; color: var(--member-soft); font-size: 11px; line-height: 1.45; }
.member-count { padding: 8px 11px; color: var(--member-pink-deep); background: rgba(222,112,143,.1); }
.member-toolbar { margin: 0 0 17px; padding: 5px; border: 1px solid rgba(64,51,69,.07); border-radius: 15px; background: rgba(247,243,247,.76); }
.member-search { min-height: 41px; border: 0; background: transparent; }
.member-search:focus-within { box-shadow: none; }
.member-toolbar select { min-height: 36px; border: 0; border-left: 1px solid rgba(64,51,69,.09); border-radius: 9px; background: rgba(255,255,255,.7); }
.member-table th { padding: 10px 12px; color: #978b98; font-size: 10px; letter-spacing: .06em; }
.member-table td { padding: 15px 12px; border-bottom-color: rgba(64,51,69,.06); }
.member-table tbody tr { transition: background .18s ease; }
.member-table tbody tr:hover { background: rgba(255,246,249,.9); }
.member-avatar { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.86); border-radius: 14px; background: linear-gradient(145deg, #ffd4df, #e9dff2); box-shadow: 0 5px 12px rgba(170,93,120,.12); }
.member-person strong { font-size: 13px; }
.member-person span, .member-joined { color: #958b96; font-size: 10px; }
.level-pill { padding: 5px 9px; border-radius: 999px; color: var(--member-pink-deep); background: rgba(222,112,143,.1); font-size: 10px; }
.member-benefit { color: #468779; font-size: 11px; }
.member-action { min-height: 28px; border: 1px solid rgba(64,51,69,.06); background: #fff; transition: color .18s ease, background .18s ease, transform .18s ease; }
.member-action:hover { transform: translateY(-1px); }
.level-settings-card { position: relative; overflow: hidden; }
.level-settings-card::before { content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #dd7793, #ab8fbe); }
.level-settings-intro { display: flex; align-items: start; gap: 8px; margin: 18px 0 16px; color: var(--member-soft); font-size: 11px; }
.info-dot { display: grid; place-items: center; flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; color: var(--member-pink-deep); background: rgba(222,112,143,.12); font-size: 10px; font-weight: 800; }
.level-list { gap: 9px; }
.level-row { padding: 12px; border-color: rgba(64,51,69,.065); border-radius: 16px; background: rgba(255,255,255,.66); transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.level-row:hover { border-color: rgba(222,112,143,.24); background: #fff; transform: translateX(2px); }
.level-row-head { margin-bottom: 10px; }
.level-name-wrap { display: flex; align-items: center; gap: 10px; }
.level-name-wrap > div { display: grid; gap: 3px; }
.level-name-wrap strong { font-size: 12px; }
.level-name-wrap span:not(.level-mark) { color: var(--member-soft); font-size: 10px; }
.level-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #d76b89, #b85b7b); font-size: 10px; font-weight: 800; box-shadow: 0 5px 10px rgba(184,91,123,.18); }
.level-l2 .level-mark { background: linear-gradient(145deg, #bd8b6d, #a96e5b); }
.level-l3 .level-mark { background: linear-gradient(145deg, #c7a04c, #b47d32); }
.level-l4 .level-mark { background: linear-gradient(145deg, #8e7bb3, #6e5f98); }
.level-l5 .level-mark { background: linear-gradient(145deg, #3b9a8a, #28736b); }
.level-arrow { color: #bbb0bd; font-size: 14px; }
.level-config { grid-template-columns: minmax(0, 1fr) 93px; gap: 7px; }
.level-config select, .level-config input { min-height: 34px; border-color: rgba(64,51,69,.09); border-radius: 9px; font-size: 11px; }
.level-value-wrap { position: relative; display: block; }
.level-value-wrap input { padding-right: 27px; }
.level-value-wrap span { position: absolute; top: 50%; right: 9px; color: #a59aa6; font-size: 10px; transform: translateY(-50%); pointer-events: none; }
.level-config input:disabled { color: #b9b1ba; background: rgba(64,51,69,.035); }
.member-sheet { border-radius: 30px; background: rgba(255,252,253,.98); }
.member-form-actions .suggestion-decline { border: 1px solid rgba(64,51,69,.1); background: #fff; color: var(--member-soft); }
.member-form-actions .suggestion-confirm { background: linear-gradient(135deg, #dc6e8f, #bf5878); box-shadow: 0 9px 18px rgba(220,110,143,.2); }
.member-empty { padding: 62px 20px 48px; }
.member-empty .empty-icon { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 19px; color: var(--member-pink-deep); background: rgba(222,112,143,.1); font-size: 26px; }
@media (max-width: 980px) {
  .member-workspace { width: min(100% - 40px, 760px); }
  .member-hero { padding: 36px; }
  .member-hero-side { min-width: 210px; }
  .member-content-grid { grid-template-columns: 1fr; }
  .level-settings-card { order: 2; }
}
@media (max-width: 720px) {
  .member-workspace { width: calc(100% - 28px); padding: 26px 0 48px; }
  .member-hero { min-height: 390px; align-items: flex-start; flex-direction: column; padding: 30px 24px 24px; border-radius: 26px; }
  .member-hero h1 { font-size: 43px; }
  .member-hero-side { align-items: stretch; width: 100%; margin-top: auto; }
  .member-hero-mini-card { min-width: 0; }
  .member-hero .primary-action { justify-content: center; width: 100%; }
  .member-hero::before { right: -120px; top: 130px; }
  .member-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .member-stat-card { min-height: 122px; padding: 15px; }
  .member-stat-card strong { font-size: 31px; }
  .member-list-card, .level-settings-card { padding: 19px; border-radius: 22px; }
  .member-toolbar { flex-direction: column; }
  .member-toolbar select { border-top: 1px solid rgba(64,51,69,.09); border-left: 0; }
}
@media (max-width: 500px) {
  .member-view .topbar { padding: 0 14px; }
  .member-view .store-indicator, .member-view .member-trigger { display: none; }
  .member-workspace { width: calc(100% - 22px); }
  .member-hero { min-height: 370px; padding: 26px 20px 20px; }
  .member-hero h1 { font-size: 38px; }
  .member-hero-meta { gap: 6px; }
  .member-hero-meta span { padding: 6px 8px; font-size: 10px; }
  .member-stat-card { padding: 13px; }
  .stat-card-top { gap: 6px; font-size: 11px; }
  .stat-icon { width: 27px; height: 27px; font-size: 13px; }
  .member-table { min-width: 610px; }
}
