/* =========================================================
   Studio order desk
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --a-bg: #f3f7fd;
  --a-card: #ffffff;
  --a-ink: #071d3d;
  --a-ink-2: #16345e;
  --a-muted: #617289;
  --a-muted-2: #93a4ba;
  --a-line: #dce7f3;
  --a-line-strong: #c4d5e8;
  --a-coral: #ff7a18;
  --a-coral-soft: #fff1e6;
  --a-teal: #1457d9;
  --a-teal-soft: #e8f0ff;
  --a-lime: #ffb050;
  --a-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --a-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--a-bg); color: var(--a-ink); font-family: var(--a-sans); font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--a-ink); color: var(--a-bg); }

/* --------------------------------------------------------- login */
.login-screen { min-height: 100svh; display: grid; grid-template-columns: 1.03fr .97fr; background: var(--a-bg); }
.login-art {
  position: relative; overflow: hidden;
  background:
    radial-gradient(50% 50% at 80% 14%, rgba(255, 157, 128, .25), transparent 65%),
    radial-gradient(52% 52% at 20% 82%, rgba(124, 224, 195, .2), transparent 65%),
    var(--a-ink);
}
.login-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000, transparent 74%);
  mask-image: radial-gradient(circle at 50% 48%, #000, transparent 74%);
}
.login-art::after {
  content: "M"; position: absolute; right: -3%; bottom: -18%; font-family: var(--a-sans); font-size: min(56vw, 790px); line-height: .8; font-weight: 850; letter-spacing: -.11em; color: rgba(255,255,255,.032);
}
.login-orb {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%) rotate(-18deg);
  width: min(40vw, 460px); height: min(40vw, 460px); border-radius: 45% 55% 57% 43% / 51% 43% 57% 49%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.75), transparent 18%),
    conic-gradient(from 190deg, #ff9b87, #ffd490, #a2e4ca, #8ca1ff, #e3a6e1, #ff9b87);
  box-shadow: inset -36px -46px 75px rgba(33,20,15,.4), inset 24px 26px 55px rgba(255,255,255,.35), 0 60px 130px rgba(0,0,0,.35);
  opacity: .92;
}
.login-orb::after {
  content: ""; position: absolute; left: 50%; top: 53%; transform: translate(-50%,-50%);
  width: 48%; height: 39%; border-radius: 52% 48% 44% 56% / 46% 55% 45% 54%;
  background: radial-gradient(circle at 38% 30%, #fff9e9, #d8d4ad 58%, #a9b28f);
  box-shadow: inset -16px -18px 34px rgba(43,30,25,.35), inset 10px 8px 22px rgba(255,255,255,.55);
}
.login-coord { position: absolute; left: 35px; bottom: 28px; font-family: var(--a-mono); font-size: 8px; letter-spacing: .14em; color: rgba(255,255,255,.3); }
.login-coord.right { left: auto; right: 35px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 52px clamp(38px, 8vw, 128px); background: var(--a-bg); }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.admin-logo { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: var(--a-ink); color: #fff; font-size: 17px; font-weight: 850; letter-spacing: -.03em; position: relative; overflow: hidden; }
.admin-logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, transparent 38%, rgba(255,123,95,.65), rgba(255,209,102,.65), rgba(124,224,195,.6)); mix-blend-mode: screen; opacity: .8; }
.admin-brand b { display: block; font-size: 13px; font-weight: 750; letter-spacing: .12em; }
.admin-brand small { display: block; font-family: var(--a-mono); font-size: 7px; letter-spacing: .19em; color: var(--a-muted-2); margin-top: 2px; }
.login-kicker { margin-top: clamp(60px, 9vh, 102px); font-family: var(--a-mono); font-size: 8px; letter-spacing: .16em; color: var(--a-muted-2); }
.login-panel h1 { margin: 15px 0 0; font-size: clamp(44px, 4vw, 62px); line-height: 1.02; letter-spacing: -.075em; font-weight: 820; }
.login-panel h1 span { color: var(--a-coral); }
.login-panel > p { max-width: 390px; margin: 17px 0 0; font-size: 11px; line-height: 1.85; color: var(--a-muted); }
.login-form { max-width: 390px; margin-top: 38px; }
.login-form label { display: block; margin-bottom: 7px; font-size: 9px; color: var(--a-muted); }
.key-input { display: flex; gap: 8px; }
.key-input input { flex: 1; min-width: 0; height: 43px; border: 1px solid var(--a-line-strong); border-radius: 8px; background: var(--a-card); padding: 0 12px; font-family: var(--a-mono); font-size: 11px; outline: none; transition: .2s; }
.key-input input:focus { border-color: var(--a-ink); box-shadow: 0 0 0 3px rgba(28,26,24,.06); }
.key-input button { flex: 0 0 auto; height: 43px; padding: 0 16px; border-radius: 8px; background: var(--a-coral); color: #fff; font-size: 11px; font-weight: 700; transition: .2s; }
.key-input button:hover { background: #e95643; }
.login-error { min-height: 17px; margin-top: 9px; font-size: 9px; color: var(--a-coral); }
.login-hint { font-size: 8px; color: var(--a-muted-2); line-height: 1.7; }
.login-hint code { font-family: var(--a-mono); background: #eee7dc; border-radius: 4px; padding: 1px 4px; }
.login-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 54px; padding-top: 17px; border-top: 1px solid var(--a-line); font-family: var(--a-mono); font-size: 7px; letter-spacing: .05em; color: var(--a-muted-2); }
.login-foot a { color: var(--a-ink-2); }
.login-foot a:hover { color: var(--a-coral); }

/* --------------------------------------------------------- shell */
.admin-header { height: 67px; display: flex; align-items: center; gap: 19px; padding: 0 clamp(18px, 3.4vw, 48px); background: var(--a-ink); color: #f8f3eb; position: sticky; top: 0; z-index: 50; }
.admin-header .admin-logo { width: 33px; height: 33px; background: #f8f3eb; color: var(--a-ink); }
.admin-header .admin-brand b { color: #f8f3eb; font-size: 12px; }
.admin-header .admin-brand small { color: rgba(255,255,255,.34); }
.admin-divider { width: 1px; height: 21px; background: rgba(255,255,255,.13); }
.admin-page-title { font-size: 11px; color: rgba(255,255,255,.65); }
.admin-page-title i { margin-left: 8px; font-family: var(--a-mono); font-style: normal; font-size: 7px; letter-spacing: .1em; color: rgba(255,255,255,.25); }
.admin-head-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; padding: 5px 9px; border: 1px solid rgba(124,224,195,.16); border-radius: 999px; background: rgba(124,224,195,.06); color: #a2e4ca; font-family: var(--a-mono); font-size: 7px; }
.sync-pill i { width: 5px; height: 5px; border-radius: 50%; background: #8ce0bd; }
.sync-pill.stale { color: #ffd490; border-color: rgba(255,212,144,.18); }
.sync-pill.stale i { background: #ffd490; }
.sync-pill.error { color: #ffb39f; border-color: rgba(255,179,159,.18); }
.sync-pill.error i { background: #ff8d72; }
.head-btn { height: 30px; padding: 0 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; color: rgba(255,255,255,.65); font-size: 9px; transition: .2s; }
.head-btn:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.head-btn.ghost { border-color: transparent; color: rgba(255,255,255,.4); }
.head-btn.ghost:hover { color: #fff; }
.admin-main { max-width: 1430px; margin: 0 auto; padding: 45px clamp(18px, 3.4vw, 48px) 54px; }
.admin-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.admin-eyebrow { font-family: var(--a-mono); font-size: 8px; letter-spacing: .16em; color: var(--a-muted-2); }
.admin-intro h2 { margin: 11px 0 0; font-size: clamp(33px, 3.5vw, 49px); font-weight: 800; letter-spacing: -.065em; line-height: 1.05; }
.admin-intro h2 span { color: var(--a-coral); }
.admin-intro p { max-width: 500px; margin: 11px 0 0; color: var(--a-muted); font-size: 10.5px; line-height: 1.75; }
.admin-date { text-align: right; font-family: var(--a-mono); font-size: 8px; color: var(--a-muted); line-height: 1.8; white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 14px; }
.kpi-card { position: relative; min-height: 140px; padding: 18px 18px 15px; border: 1px solid var(--a-line); border-radius: 13px; background: var(--a-card); overflow: hidden; }
.kpi-card > span { font-size: 9px; color: var(--a-muted); }
.kpi-card > b { display: block; margin-top: 25px; font-family: var(--a-mono); font-size: 31px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.kpi-card > p { margin-top: 8px; font-size: 8px; color: var(--a-muted-2); }
.kpi-card.hot { background: #fff6f1; border-color: #ffded1; }
.kpi-card.hot > b { color: var(--a-coral); }
.kpi-card.dark { background: var(--a-ink); border-color: var(--a-ink); color: var(--a-bg); }
.kpi-card.dark > span { color: rgba(255,255,255,.47); }
.kpi-card.dark > b { color: var(--a-lime); font-size: 26px; }
.kpi-card.dark > p { color: rgba(255,255,255,.28); }
.kpi-mark { position: absolute; right: 15px; top: 16px; font-family: var(--a-mono); font-style: normal; font-size: 7px; color: var(--a-muted-2); }
.kpi-card.dark .kpi-mark { color: rgba(255,255,255,.22); }
.kpi-card.hot .kpi-mark { color: #e7b6a8; }
.orders-panel { border: 1px solid var(--a-line); border-radius: 14px; background: var(--a-card); overflow: hidden; }
.orders-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px; border-bottom: 1px solid var(--a-line); }
.filter-tabs { display: flex; gap: 2px; overflow: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab { height: 29px; padding: 0 10px; color: var(--a-muted); font-size: 9px; white-space: nowrap; border-radius: 5px; transition: .18s; }
.filter-tab:hover { color: var(--a-ink); background: #f6f1e8; }
.filter-tab.active { background: var(--a-ink); color: var(--a-bg); }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; align-items: center; gap: 6px; width: 230px; height: 29px; border: 1px solid var(--a-line); border-radius: 5px; padding: 0 9px; background: #fbf8f2; }
.search-box span { font-size: 14px; color: var(--a-muted-2); line-height: 1; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 9px; }
.search-box input::placeholder { color: var(--a-muted-2); }
.orders-table-wrap { overflow-x: auto; position: relative; min-height: 180px; }
.orders-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.orders-table th { padding: 11px 14px; text-align: left; font-family: var(--a-mono); font-size: 7px; font-weight: 500; letter-spacing: .06em; color: var(--a-muted-2); background: #fbf8f2; border-bottom: 1px solid var(--a-line); }
.orders-table td { padding: 13px 14px; border-bottom: 1px solid #f2ece3; vertical-align: middle; }
.orders-table tbody tr { cursor: pointer; transition: background .15s; }
.orders-table tbody tr:hover { background: #fdf9f2; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.order-no { font-family: var(--a-mono); font-size: 10px; font-weight: 500; }
.order-no small { display: block; margin-top: 2px; font-family: var(--a-sans); font-size: 7px; color: var(--a-muted-2); }
.customer-name { font-size: 10px; font-weight: 600; }
.customer-contact { display: block; margin-top: 2px; font-size: 7.5px; color: var(--a-muted-2); }
.model-cell b { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; font-weight: 550; }
.model-cell span { display: block; margin-top: 2px; font-size: 7.5px; color: var(--a-muted); }
.qty-cell { font-family: var(--a-mono); font-size: 10px; }
.amount-cell { font-family: var(--a-mono); font-size: 11px; font-weight: 500; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px; font-size: 8px; white-space: nowrap; }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.st-待确认 { color: #c1781e; background: #fff2dc; }
.st-已确认 { color: #177b62; background: #e6f5ef; }
.st-制作中 { color: #5e63b5; background: #eeedff; }
.st-已发货 { color: #2b6ba7; background: #eaf4ff; }
.st-已完成 { color: #38784d; background: #edf7e8; }
.st-已取消 { color: #9b8477; background: #f1ece7; }
.time-cell { font-family: var(--a-mono); font-size: 7.5px; color: var(--a-muted); white-space: nowrap; }
.row-open { width: 25px; height: 25px; border: 1px solid var(--a-line); border-radius: 50%; color: var(--a-muted); font-size: 11px; transition: .18s; }
.row-open:hover { background: var(--a-ink); color: #fff; border-color: var(--a-ink); }
.orders-empty { padding: 61px 20px; text-align: center; }
.orders-empty > span { font-family: var(--a-serif, serif); font-size: 33px; color: var(--a-muted-2); }
.orders-empty b { display: block; margin-top: 10px; font-size: 14px; font-weight: 650; }
.orders-empty p { margin-top: 5px; color: var(--a-muted); font-size: 9px; }
.empty-link { display: inline-block; margin-top: 14px; color: var(--a-coral); font-size: 9px; border-bottom: 1px solid #f0c3b8; }
.orders-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; padding: 57px 20px; color: var(--a-muted-2); font-size: 8px; }
.loading-bar { width: 120px; height: 2px; border-radius: 2px; overflow: hidden; background: #f0e8de; }
.loading-bar i { display: block; width: 45%; height: 100%; background: var(--a-ink); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.orders-foot { display: flex; justify-content: space-between; gap: 20px; padding: 10px 15px; border-top: 1px solid var(--a-line); font-family: var(--a-mono); font-size: 7px; color: var(--a-muted-2); }
.orders-foot code { color: var(--a-muted); }
.admin-caution { margin: 19px 0 0; text-align: center; font-size: 7.5px; line-height: 1.7; color: var(--a-muted-2); }

/* --------------------------------------------------------- drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(25,20,16,.35); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.order-drawer { position: fixed; right: 0; top: 0; bottom: 0; z-index: 90; width: min(92vw, 495px); background: var(--a-card); box-shadow: -30px 0 80px rgba(40,30,20,.15); display: flex; flex-direction: column; animation: drawerIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes drawerIn { from { transform: translateX(100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 27px 27px 20px; border-bottom: 1px solid var(--a-line); flex: 0 0 auto; }
.drawer-kicker { font-family: var(--a-mono); font-size: 7px; letter-spacing: .14em; color: var(--a-muted-2); }
.drawer-head h3 { margin-top: 5px; font-family: var(--a-mono); font-size: 17px; font-weight: 500; }
.drawer-close { width: 29px; height: 29px; border: 1px solid var(--a-line); border-radius: 50%; color: var(--a-muted); font-size: 17px; line-height: 1; }
.drawer-close:hover { background: var(--a-ink); color: #fff; border-color: var(--a-ink); }
.drawer-scroll { overflow: auto; padding: 22px 27px 32px; }
.drawer-section { padding: 0 0 19px; margin-bottom: 19px; border-bottom: 1px solid var(--a-line); }
.drawer-section:last-child { border: 0; margin-bottom: 0; }
.drawer-label { margin-bottom: 10px; font-family: var(--a-mono); font-size: 7px; letter-spacing: .12em; color: var(--a-muted-2); }
.status-editor { display: flex; gap: 6px; }
.status-editor select { flex: 1; height: 34px; padding: 0 9px; border: 1px solid var(--a-line-strong); border-radius: 6px; background: #fff; font-size: 10px; outline: none; }
.status-editor button { height: 34px; padding: 0 12px; border-radius: 6px; background: var(--a-ink); color: #fff; font-size: 9px; }
.status-editor button:hover { background: #000; }
.status-editor button:disabled { opacity: .5; }
.status-feedback { min-height: 12px; margin-top: 5px; font-size: 8px; color: var(--a-teal); }
.drawer-customer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 15px; font-size: 10px; }
.drawer-customer b { font-size: 13px; }
.drawer-customer a { color: var(--a-coral); border-bottom: 1px solid #f0c3b8; }
.drawer-customer span { color: var(--a-muted); }
.drawer-address { margin-top: 9px; padding: 9px 10px; border-radius: 6px; background: #f8f3ea; color: var(--a-ink-2); font-size: 9px; line-height: 1.65; }
.drawer-note { margin-top: 8px; color: var(--a-muted); font-size: 9px; line-height: 1.65; white-space: pre-wrap; }
.drawer-snapshot { min-height: 120px; border-radius: 8px; overflow: hidden; background: linear-gradient(145deg, #f9efe1, #e7ece0 55%, #e1e6f9); border: 1px solid var(--a-line); margin-bottom: 10px; }
.drawer-snapshot img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.drawer-model-name { font-size: 10px; font-weight: 600; word-break: break-all; line-height: 1.4; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 10px; border-top: 1px solid var(--a-line); }
.drawer-grid > div { padding: 8px 0; border-bottom: 1px solid var(--a-line); }
.drawer-grid span { display: block; font-size: 7px; color: var(--a-muted-2); }
.drawer-grid b { display: block; margin-top: 2px; font-family: var(--a-mono); font-size: 8.5px; font-weight: 500; }
.drawer-thickness { margin-top: 9px; padding: 8px 9px; border-radius: 6px; background: #f4faf7; font-size: 8.5px; color: #35705f; line-height: 1.6; }
.drawer-quote-lines { border-top: 1px solid var(--a-line); }
.drawer-quote-line { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--a-line); }
.drawer-quote-line span { font-size: 9px; }
.drawer-quote-line small { display: block; margin-top: 2px; font-family: var(--a-mono); font-size: 7px; color: var(--a-muted-2); }
.drawer-quote-line b { font-family: var(--a-mono); font-size: 9px; white-space: nowrap; }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 12px 13px; background: var(--a-ink); color: var(--a-bg); border-radius: 7px; }
.drawer-total span { font-size: 8px; }
.drawer-total b { font-family: var(--a-mono); font-size: 21px; font-weight: 500; }
.drawer-time { font-family: var(--a-mono); font-size: 8px; color: var(--a-muted); line-height: 1.8; }
.admin-toast { position: fixed; left: 50%; bottom: 25px; z-index: 150; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: var(--a-ink); color: var(--a-bg); font-size: 10px; box-shadow: 0 14px 35px rgba(0,0,0,.2); transition: .25s; max-width: 90vw; text-align: center; }
.admin-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100svh; padding: 44px 25px; }
  .login-kicker { margin-top: 65px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .orders-toolbar { display: block; }
  .toolbar-right { margin-top: 9px; }
  .search-box { width: 100%; }
}
@media (max-width: 640px) {
  .admin-header { height: 58px; gap: 10px; padding: 0 13px; }
  .admin-page-title, .admin-divider, .sync-pill { display: none; }
  .head-btn { font-size: 8px; height: 27px; padding: 0 8px; }
  .admin-main { padding: 28px 12px 38px; }
  .admin-intro { display: block; margin-bottom: 23px; }
  .admin-intro h2 { font-size: 37px; }
  .admin-date { margin-top: 14px; text-align: left; }
  .kpi-grid { gap: 6px; }
  .kpi-card { min-height: 119px; padding: 13px 12px; }
  .kpi-card > b { margin-top: 20px; font-size: 26px; }
  .kpi-card.dark > b { font-size: 21px; }
  .kpi-card > p { font-size: 7px; }
  .orders-toolbar { padding: 9px; }
  .filter-tabs { gap: 0; }
  .filter-tab { padding: 0 8px; font-size: 8px; }
  .orders-foot { flex-direction: column; gap: 4px; font-size: 6.5px; }
  .orders-foot span:last-child { display: none; }
  .order-drawer { width: 100%; }
  .drawer-head { padding: 21px 19px 15px; }
  .drawer-scroll { padding: 18px 19px 25px; }
  .login-panel h1 { font-size: 43px; }
  .login-form { margin-top: 29px; }
  .login-panel { padding: 30px 21px; }
  .login-kicker { margin-top: 55px; }
  .login-foot { margin-top: 40px; flex-direction: column; gap: 5px; }
}
/* --------------------------------------------------------- contact messages */
.messages-panel { margin-top: 14px; border: 1px solid var(--a-line); border-radius: 14px; background: var(--a-card); padding: 18px; }
.messages-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--a-line); }
.messages-head h3 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.045em; font-weight: 760; }
.messages-head h3 span { font-family: var(--a-mono); font-size: 10px; font-weight: 400; color: var(--a-muted-2); margin-left: 5px; }
.messages-head p { max-width: 380px; color: var(--a-muted-2); font-size: 8.5px; line-height: 1.6; text-align: right; }
.messages-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.message-card { padding: 14px 0 13px; border-bottom: 1px solid var(--a-line); }
.message-card:nth-last-child(-n+2) { border-bottom: 0; }
.message-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.message-top b { font-size: 10px; font-weight: 650; }
.message-top time { font-family: var(--a-mono); font-size: 7px; color: var(--a-muted-2); }
.message-contact { margin-top: 3px; font-family: var(--a-mono); font-size: 8px; color: var(--a-coral); }
.message-body { margin-top: 6px; font-size: 9px; line-height: 1.7; color: var(--a-muted); }
.messages-empty { padding: 28px 0 12px; text-align: center; font-size: 9px; color: var(--a-muted-2); }
@media (max-width: 700px) {
  .messages-panel { padding: 13px; }
  .messages-head { display: block; }
  .messages-head p { margin-top: 8px; text-align: left; }
  .messages-list { grid-template-columns: 1fr; }
  .message-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--a-line); }
  .message-card:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------- legibility */
.login-panel > p { font-size: 12px; }
.login-form label { font-size: 10px; }
.key-input input { font-size: 12px; }
.key-input button { font-size: 12px; }
.login-hint { font-size: 9px; }
.login-error { font-size: 10px; }
.admin-intro p { font-size: 11.5px; }
.kpi-card > span { font-size: 10px; }
.kpi-card > p { font-size: 9px; }
.filter-tab { font-size: 10px; }
.search-box input { font-size: 10px; }
.orders-table th { font-size: 8px; }
.order-no { font-size: 11.5px; }
.order-no small { font-size: 8px; }
.customer-name { font-size: 11.5px; }
.customer-contact { font-size: 8.5px; }
.model-cell b { font-size: 10.5px; }
.model-cell span { font-size: 8.5px; }
.qty-cell { font-size: 11px; }
.amount-cell { font-size: 12px; }
.status-pill { font-size: 9px; }
.time-cell { font-size: 8.5px; }
.orders-foot { font-size: 8px; }
.admin-caution { font-size: 8.5px; }
.drawer-label { font-size: 8px; }
.drawer-customer { font-size: 11px; }
.drawer-customer b { font-size: 14px; }
.drawer-address { font-size: 10px; }
.drawer-note { font-size: 10px; }
.drawer-model-name { font-size: 11px; }
.drawer-grid span { font-size: 8px; }
.drawer-grid b { font-size: 9.5px; }
.drawer-thickness { font-size: 9.5px; }
.drawer-quote-line span { font-size: 10px; }
.drawer-quote-line small { font-size: 8px; }
.drawer-quote-line b { font-size: 10px; }
.drawer-time { font-size: 9px; }
.messages-head p { font-size: 9.5px; }
.message-top b { font-size: 11px; }
.message-contact { font-size: 9px; }
.message-body { font-size: 10px; }

/* =========================================================
   Fuxing 3D · blue / orange re-theme + site settings
   ========================================================= */
.login-art {
  background:
    radial-gradient(45% 55% at 84% 12%, rgba(255, 138, 0, .22), transparent 62%),
    radial-gradient(60% 60% at 15% 84%, rgba(30, 107, 255, .34), transparent 64%),
    linear-gradient(150deg, #061936 0%, #0a2a5e 55%, #071d3d 100%);
}
.login-art::after { content: none; }
.login-grid {
  background-image:
    linear-gradient(rgba(157, 195, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 195, 255, .075) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000, transparent 76%);
  mask-image: radial-gradient(circle at 50% 48%, #000, transparent 76%);
}
.login-brandmark {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: min(42vw, 465px); z-index: 2;
  filter: drop-shadow(0 42px 65px rgba(0, 0, 0, .45)) drop-shadow(0 0 55px rgba(44, 132, 255, .2));
}
.login-brandmark img { width: 100%; height: auto; display: block; }
.login-rings {
  position: absolute; left: 50%; top: 46%; width: min(54vw, 600px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border: 1px solid rgba(126, 181, 255, .18); border-radius: 50%; z-index: 1;
  box-shadow: 0 0 0 36px rgba(255, 138, 0, .026), 0 0 0 37px rgba(255, 255, 255, .045), 0 0 0 105px rgba(30, 107, 255, .035);
}
.login-coord { color: rgba(193, 219, 255, .35); }
.login-panel { background: var(--a-bg); }
.admin-logo {
  width: 39px; height: 39px; padding: 5px; background: #fff; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px; overflow: visible;
}
.admin-logo::after { content: none; }
.admin-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-panel .admin-logo { border: 1px solid var(--a-line); box-shadow: 0 8px 20px rgba(9, 35, 70, .08); }
.admin-header .admin-logo { background: #fff; border-color: rgba(255,255,255,.22); }
.admin-brand b { letter-spacing: .08em; }
.login-kicker { color: #7890ab; }
.login-panel h1 span { color: var(--a-coral); }
.key-input button, .btn-save, .add-row-btn { background: var(--a-coral); }
.key-input button:hover { background: #ea6a0c; }
.login-hint code { background: #e5edf8; color: #405a79; }
.login-form label { color: #5c718a; }
.key-input input { border-color: var(--a-line-strong); }

.admin-header { background: #081f41; }
.admin-tabs { display: flex; align-items: center; gap: 3px; margin-left: 10px; padding: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.035); }
.admin-tab { height: 27px; padding: 0 12px; border-radius: 5px; font-size: 9px; color: rgba(255,255,255,.46); transition: .18s; }
.admin-tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-tab.active { background: #fff; color: var(--a-ink); font-weight: 650; }
.head-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.admin-main { max-width: 1460px; }
.admin-intro h2 span, .settings-heading h2 span { color: var(--a-coral); }
.kpi-card.hot { background: #fff4eb; border-color: #ffd9bd; }
.kpi-card.hot > b { color: #ed6d0b; }
.kpi-card.dark > b { color: #ffb050; }
.admin-date { color: #7890ab; }
.orders-panel, .messages-panel, .kpi-card { box-shadow: 0 10px 30px rgba(14, 43, 82, .035); }
.orders-table tbody tr:hover { background: #f5f9ff; }
.filter-tab.active { background: #0a2a5e; }
.filter-tab:hover { background: #eef5ff; }
.status-pill.st-已确认 { color: #1457d9; background: #e8f0ff; }
.status-pill.st-已完成 { color: #0d7a64; background: #e8f6f2; }
.status-pill.st-待确认 { color: #c56c09; background: #fff3e5; }
.drawer-total, .summary-total { background: #081f41; }
.drawer-quote-line, .drawer-address { border-color: var(--a-line); }
.admin-toast { background: #081f41; }
.status-editor button { background: var(--a-coral); }
.status-editor button:hover { background: #e76a0d; }
.messages-head h3 { letter-spacing: -.035em; }
.message-contact { color: #d7650f; }

/* settings view */
.admin-view[hidden] { display: none !important; }
.settings-view { padding-bottom: 24px; }
.settings-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 27px; }
.settings-heading h2 { margin: 11px 0 0; font-size: clamp(32px, 3.4vw, 47px); line-height: 1.06; letter-spacing: -.065em; font-weight: 800; }
.settings-heading p { max-width: 600px; margin-top: 11px; color: var(--a-muted); font-size: 10.5px; line-height: 1.7; }
.btn-soft { height: 34px; padding: 0 14px; border: 1px solid var(--a-line-strong); border-radius: 7px; background: #fff; color: var(--a-muted); font-size: 9px; transition: .18s; }
.btn-soft:hover { border-color: var(--a-ink); color: var(--a-ink); }
#settingsForm { display: block; }
.settings-group { border: 1px solid var(--a-line); border-radius: 13px; background: var(--a-card); margin-bottom: 10px; box-shadow: 0 8px 26px rgba(14, 43, 82, .028); overflow: hidden; }
.settings-group summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; user-select: none; }
.settings-group summary::-webkit-details-marker { display: none; }
.settings-group summary > span:nth-child(2) { flex: 1; min-width: 0; }
.settings-group summary b { display: block; font-size: 12px; font-weight: 650; }
.settings-group summary small { display: block; margin-top: 2px; font-size: 8.5px; color: var(--a-muted-2); }
.settings-group summary > i { font-style: normal; color: var(--a-muted-2); font-size: 15px; transition: transform .2s; }
.settings-group[open] summary > i { transform: rotate(45deg); }
.settings-group[open] summary { border-bottom: 1px solid var(--a-line); background: #fbfdff; }
.group-index { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 5px; background: #edf4ff; color: var(--a-teal); font-family: var(--a-mono); font-size: 7px; }
.settings-group-body { padding: 18px; }
.form-grid { display: grid; gap: 11px 13px; margin-bottom: 11px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.a-field { display: block; min-width: 0; }
.a-field > span { display: block; margin-bottom: 5px; font-size: 8.5px; color: var(--a-muted); }
.a-field input, .a-field textarea {
  width: 100%; border: 1px solid var(--a-line-strong); border-radius: 7px; background: #fbfdff;
  padding: 8px 10px; font-size: 10px; color: var(--a-ink); outline: none; transition: .18s; resize: vertical;
}
.a-field input:focus, .a-field textarea:focus { border-color: #5a91e5; background: #fff; box-shadow: 0 0 0 3px rgba(30, 107, 255, .08); }
.a-field input::placeholder, .a-field textarea::placeholder { color: #b1bfce; }
.a-field input[type="number"] { font-family: var(--a-mono); }
.brand-setting { display: grid; grid-template-columns: 210px 1fr; gap: 22px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--a-line); }
.brand-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.preview-label { font-family: var(--a-mono); font-size: 7px; letter-spacing: .08em; color: var(--a-muted-2); }
.logo-preview-tile { width: 150px; height: 120px; display: grid; place-items: center; border: 1px solid var(--a-line); border-radius: 10px; background: #fff; padding: 12px; }
.logo-preview-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-preview p { color: var(--a-muted-2); font-size: 7.5px; line-height: 1.65; }
.brand-fields .form-grid { margin-bottom: 10px; }
.upload-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px; border: 1px solid var(--a-line-strong); border-radius: 6px; background: #fff; color: var(--a-teal); font-size: 8px; cursor: pointer; transition: .18s; overflow: hidden; }
.upload-btn:hover { border-color: var(--a-teal); background: #f2f7ff; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-btn.uploading { opacity: .55; pointer-events: none; }
.settings-subhead { display: flex; align-items: baseline; gap: 10px; margin: 5px 0 10px; padding-top: 15px; border-top: 1px solid var(--a-line); }
.settings-subhead b { font-size: 10px; font-weight: 650; }
.settings-subhead span { color: var(--a-muted-2); font-size: 8px; }
.qr-upload-row { display: flex; align-items: flex-start; gap: 22px; margin-top: 8px; padding-top: 15px; border-top: 1px solid var(--a-line); }
.qr-upload { display: flex; flex-direction: column; gap: 8px; }
.qr-preview { width: 96px; height: 96px; border: 1px solid var(--a-line); border-radius: 8px; background: #fbfdff; display: grid; place-items: center; color: #9aacc2; font-size: 7px; overflow: hidden; }
.qr-preview::before { content: "未上传"; }
.qr-preview.has-image::before { content: ""; }
.qr-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: none; }
.qr-preview.has-image img { display: block; }
.upload-note { flex: 1; color: var(--a-muted-2); font-size: 8px; line-height: 1.7; }
.settings-tip { margin-top: 9px; color: var(--a-muted-2); font-size: 8px; line-height: 1.7; }
.material-editor-list, .shipping-editor-list { display: flex; flex-direction: column; gap: 8px; }
.material-edit-card { border: 1px solid var(--a-line); border-radius: 9px; background: #fbfdff; overflow: hidden; }
.me-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--a-line); background: #f7fbff; }
.me-head b { flex: 1; font-size: 10px; font-weight: 650; }
.me-head span { font-family: var(--a-mono); font-size: 7px; color: var(--a-muted-2); }
.remove-row-btn { width: 22px; height: 22px; border: 1px solid var(--a-line); border-radius: 5px; background: #fff; color: var(--a-muted-2); font-size: 13px; line-height: 1; }
.remove-row-btn:hover { border-color: #e1a08e; color: #c4553b; background: #fff7f3; }
.me-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 12px; }
.me-grid .a-field.full { grid-column: 1 / -1; }
.me-grid .a-field.feature-field { grid-column: span 2; }
.shipping-edit-row { display: grid; grid-template-columns: 1fr 110px 1.5fr 24px; gap: 8px; align-items: end; }
.shipping-edit-row .a-field { margin: 0; }
.add-row-btn { display: inline-flex; align-items: center; justify-content: center; height: 29px; margin-top: 9px; padding: 0 12px; border-radius: 6px; background: #081f41; color: #fff; font-size: 8px; }
.add-row-btn:hover { background: #1457d9; }
.settings-savebar {
  position: sticky; bottom: 0; z-index: 20; margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 13px 16px; border: 1px solid var(--a-line-strong); border-radius: 11px;
  background: rgba(255,255,255,.93); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 -10px 30px rgba(20, 48, 83, .07);
}
.settings-savebar > div:first-child b { display: block; font-size: 9px; }
.settings-savebar > div:first-child span { display: block; margin-top: 2px; font-size: 8px; color: var(--a-muted-2); }
.savebar-actions { display: flex; align-items: center; gap: 10px; }
.save-status { font-size: 8px; color: var(--a-teal); max-width: 280px; text-align: right; }
.save-status.error { color: #c4553b; }
.btn-save { height: 34px; padding: 0 15px; border-radius: 7px; color: #fff; font-size: 9px; font-weight: 650; transition: .18s; }
.btn-save:hover { background: #ea6a0c; }
.btn-save:disabled { opacity: .55; cursor: wait; }
.secret-field input { font-family: var(--a-mono); }
.empty-extra { color: var(--a-muted-2); font-size: 8px; }
@media (max-width: 1080px) {
  .admin-tabs { margin-left: 0; }
  .admin-page-title, .admin-divider { display: none; }
  .settings-heading { display: block; }
  .settings-head-actions { margin-top: 14px; }
  .form-grid.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .admin-tabs { order: 3; margin-left: 0; margin-top: 7px; width: 100%; justify-content: center; }
  .admin-header { height: auto; min-height: 58px; flex-wrap: wrap; padding: 9px 13px; }
  .admin-head-actions { margin-left: auto; }
  .admin-head-actions .sync-pill, .admin-head-actions .head-link, .head-btn#exportBtn, .head-btn#refreshBtn { display: none; }
  .form-grid.two, .form-grid.three, .form-grid.four, .brand-setting, .me-grid { grid-template-columns: 1fr; }
  .brand-setting { gap: 14px; }
  .brand-preview { display: grid; grid-template-columns: 120px 1fr; column-gap: 12px; align-items: center; }
  .brand-preview .preview-label, .brand-preview p { grid-column: 1 / -1; }
  .logo-preview-tile { width: 120px; height: 100px; }
  .qr-upload-row { flex-wrap: wrap; }
  .upload-note { flex-basis: 100%; }
  .shipping-edit-row { grid-template-columns: 1fr 90px 24px; }
  .shipping-edit-row .a-field:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
  .me-grid .a-field.feature-field { grid-column: 1; }
  .settings-group-body { padding: 13px; }
  .settings-savebar { display: block; padding: 11px 12px; }
  .savebar-actions { margin-top: 9px; justify-content: space-between; }
  .save-status { max-width: none; }
  .settings-heading h2 { font-size: 36px; }
}

/* image clear controls */
.upload-actions { display: flex; align-items: center; gap: 7px; }
.clear-image-btn { height: 28px; padding: 0 8px; border: 1px solid var(--a-line); border-radius: 6px; background: #fff; color: var(--a-muted-2); font-size: 8px; }
.clear-image-btn:hover { border-color: #e2a695; color: #b85437; background: #fff8f5; }

/* --------------------------------------------------------- model library */
.design-list { display: grid; gap: 9px; padding: 13px; }
.design-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) 132px 216px;
  gap: 14px; align-items: center;
  padding: 11px; border: 1px solid var(--a-line); border-radius: 11px; background: #fff;
}
.design-thumb { width: 76px; height: 76px; border-radius: 9px; overflow: hidden; background: #e8eef8; }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.design-main { min-width: 0; }
.design-main .design-title { display: flex; align-items: center; gap: 7px; }
.design-main b { font-size: 12px; font-weight: 700; }
.design-main p { margin-top: 3px; font-size: 9.5px; color: var(--a-muted); line-height: 1.55; }
.design-main small { display: block; margin-top: 3px; font-family: var(--a-mono); font-size: 8.5px; color: var(--a-muted-2); }
.design-state { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-family: var(--a-mono); font-size: 8px; letter-spacing: .04em; }
.design-state.live { background: #e7f6ee; color: #0f7a52; }
.design-state.pending { background: #fff2e2; color: #a45c06; }
.design-state.offline { background: #eef1f6; color: #64748b; }
.design-state.rejected { background: #fdeaea; color: #b42318; }
.design-fee { display: grid; gap: 5px; align-content: center; }
.design-fee label { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--a-muted); }
.design-fee input { width: 66px; height: 27px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--a-line-strong); font-family: var(--a-mono); font-size: 10px; outline: none; }
.design-fee input:focus { border-color: var(--a-ink); }
.design-fee span { font-family: var(--a-mono); font-size: 8.5px; color: var(--a-muted-2); }
.design-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.design-actions button {
  padding: 6px 9px; border-radius: 6px; font-size: 9.5px;
  border: 1px solid var(--a-line-strong); background: #fff; color: var(--a-ink-2);
  transition: background .2s, border-color .2s, color .2s;
}
.design-actions button:hover { border-color: var(--a-ink); }
.design-actions button.primary { background: var(--a-ink); border-color: var(--a-ink); color: #fff; }
.design-actions button.primary:hover { background: #000; }
.design-actions button.danger { color: #b42318; border-color: #efc5c1; }
.design-actions button.danger:hover { background: #fdf1f0; }
.design-actions button:disabled { opacity: .5; cursor: default; }

/* --------------------------------------------------------- earnings */
.earnings-wrap { overflow-x: auto; }
.earnings-table { width: 100%; border-collapse: collapse; }
.earnings-table th {
  text-align: left; padding: 9px 12px;
  background: #f6fafd; border-bottom: 1px solid var(--a-line);
  font-family: var(--a-mono); font-size: 8px; letter-spacing: .05em; color: var(--a-muted-2);
}
.earnings-table td { padding: 10px 12px; border-bottom: 1px solid #eef4fa; font-size: 10.5px; color: var(--a-ink-2); }
.earnings-table td.mono { font-family: var(--a-mono); font-size: 10px; }
.earnings-table .settle-btn { padding: 5px 9px; border-radius: 6px; border: 1px solid var(--a-line-strong); font-size: 9px; background: #fff; }
.earnings-table .settle-btn:hover { border-color: var(--a-ink); }
.earnings-table .settled { font-family: var(--a-mono); font-size: 8.5px; color: var(--a-muted-2); }

/* --------------------------------------------------------- case editor */
/* --------------------------------------------------------- case gallery */
.case-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.case-tile { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; border: 1px solid var(--a-line); background: #eef4fb; }
.case-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-tile-remove {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(7, 29, 61, .72); color: #fff; font-size: 13px; line-height: 1;
}
.case-tile-remove:hover { background: #b42318; }
.creator-notice {
  margin: 10px 0 0; padding: 11px 13px; border-radius: 9px;
  background: #fff8ef; border: 1px solid #ffdfc0;
  font-family: var(--a-mono); font-size: 10px; color: #8a5a1e; line-height: 1.7;
}

/* --------------------------------------------------------- review + plans */
.design-side { display: grid; gap: 6px; justify-items: end; }
.design-review { display: grid; gap: 3px; }
.design-review label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; color: #5b7290; white-space: nowrap;
}
.design-review input[type="checkbox"] { width: 13px; height: 13px; accent-color: var(--a-ink); }
.design-review.is-done { font-family: var(--a-mono); font-size: 8.5px; color: var(--a-muted-2); }
.plan-cell { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.plan-select {
  height: 27px; padding: 0 6px; border-radius: 6px;
  border: 1px solid var(--a-line-strong); background: #fff;
  font-size: 10px; color: var(--a-ink-2);
}
.plan-months {
  width: 42px; height: 27px; padding: 0 5px; border-radius: 6px;
  border: 1px solid var(--a-line-strong); background: #fff;
  font-family: var(--a-mono); font-size: 10px;
}


/* ------------------------------------------------------ payment & tracking */
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.drawer-actions button {
  height: 32px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--a-line-strong); background: var(--a-ink); color: #fff;
  font-size: 10px;
}
.drawer-actions button.ghost { background: #fff; color: var(--a-ink-2); }
.drawer-actions button:disabled { opacity: .45; cursor: default; }

.pay-pill { display: inline-block; margin-left: 4px; padding: 2px 6px; border-radius: 999px; font-size: 8px; font-weight: 700; vertical-align: middle; }
.pay-pill.pay-wait { background: #f2f5f9; color: #7c8fa5; }
.pay-pill.pay-warn { background: #fff4e6; color: #a86400; }
.pay-pill.pay-ok { background: #eaf7ef; color: #1c7b45; }

/* ---------------------------------------------------------- copy manager */
.copy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 6px; }
.copy-fields .settings-subhead { grid-column: 1 / -1; margin: 10px 0 0; }
.copy-fields .a-field.full { grid-column: 1 / -1; }
.copy-fields textarea { min-height: 62px; }
.replacement-list { display: grid; gap: 8px; margin: 10px 0 12px; }
.replacement-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.replacement-row input { width: 100%; padding: 9px 11px; border: 1px solid #dde6f0; border-radius: 9px; background: #fff; font: inherit; font-size: 12px; color: #17355b; }
.replacement-row input:focus { outline: none; border-color: #7ea8dd; box-shadow: 0 0 0 3px rgba(30, 107, 255, .08); }
.replacement-arrow { color: #93a4ba; font-size: 12px; }
.replacement-remove { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #e5edf6; background: #fff; color: #8498ad; cursor: pointer; line-height: 1; }
.replacement-remove:hover { border-color: #f0b9a8; color: #d1533a; }
@media (max-width: 900px) { .copy-fields { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ copy preview */
.copy-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; align-items: start; }
.copy-workbench-fields { min-width: 0; }
.copy-preview { position: sticky; top: 82px; }
.copy-preview-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.copy-preview-head b { font-size: 13px; color: #17355b; white-space: nowrap; }
.copy-preview-head span { flex: 1; min-width: 0; color: #7c8ea6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-preview-head a { color: #1e6bff; text-decoration: none; white-space: nowrap; }
.copy-preview-stage { position: relative; height: 640px; border: 1px solid #dfe8f2; border-radius: 12px; overflow: hidden; background: #f6f9fc; }
.copy-preview-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
#copyPreviewEmpty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #8a9bb0; font-size: 12px; line-height: 1.9; background: #f6f9fc; }
.copy-preview-stage.is-live #copyPreviewEmpty { display: none; }
@media (max-width: 1200px) {
  .copy-workbench { grid-template-columns: 1fr; }
  .copy-preview { position: static; }
  .copy-preview-stage { height: 480px; }
}
