/* 方案三 展示後台樣式
 * 照 Design 畫布「後台：總覽」「後台：頁面內容編輯」；換風格＝改 :root 變數。
 */

:root {
  --navy-950: #0A1C2E;
  --navy-900: #0F2A44;
  --navy-700: #1D3F61;
  --blue: #1D4F7A;
  --ink: #18222C;
  --slate: #4A5A69;
  --slate-2: #5F6E7C;
  --steel-200: #C9D6E2;
  --steel-300: #A9BCCD;
  --line: #DCE3E9;
  --line-2: #E6ECF1;
  --bg: #F3F6F8;
  --bg-2: #F7F9FA;
  --tint-blue: #EEF3F7;
  --orange: #F26B1D;
  --orange-hover: #E05B0F;
  --orange-text: #A0410B;
  --orange-tint: #FFF4EC;
  --orange-line: #F2C3A1;
  --field: #8494A3;
  --error: #C0262D;
  --st-new-bg: #FDE6D6; --st-new: #A0410B; --st-new-dot: #C2500F;
  --st-proc-bg: #DCE8F3; --st-proc: #1D4F7A;
  --st-done-bg: #E6EBEF; --st-done: #3D4B57;
  --font-sans: 'Noto Sans TC', "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-cond: 'Barlow Condensed', 'Noto Sans TC', "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, 'Noto Sans TC', "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --side-w: 248px;
  --r-s: 6px;
  --r-m: 8px;
  --pad-x: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: var(--font-sans); color: var(--ink); font-size: 16px; line-height: 1.6; }
svg { display: block; flex-shrink: 0; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::placeholder { color: var(--slate-2); opacity: 1; }
a { color: var(--blue); }
a:hover { color: var(--navy-900); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); }

/* ===== 按鈕 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-s); background: #fff; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--navy-900); }
.btn-primary:hover:not(:disabled) { background: var(--orange-hover); color: var(--navy-900); }
.btn-navy { border: 1.5px solid var(--navy-900); color: var(--navy-900); }
.btn-navy:hover:not(:disabled) { background: var(--navy-900); color: #fff; }
.btn-line { border-color: var(--field); color: var(--ink); font-weight: 500; }
.btn-line:hover:not(:disabled) { border-color: var(--navy-900); color: var(--navy-900); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #A41F25; color: #fff; }
.btn-danger-line { border-color: var(--error); color: var(--error); }
.btn-danger-line:hover:not(:disabled) { background: #FDF1F1; color: var(--error); }
.btn-lg { height: 48px; padding: 0 20px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-publish { height: 48px; padding: 0 24px; font-size: 17px; font-weight: 900; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--blue); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-text:hover { color: var(--navy-900); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--slate); cursor: pointer; }
.icon-btn:hover:not(:disabled) { border-color: var(--navy-900); color: var(--navy-900); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ===== 骨架：側欄＋主區 ===== */
.adm { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 20px 16px 24px; background: var(--navy-900); color: var(--steel-200); }
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; border-bottom: 1px solid rgba(201,214,226,.18); }
.adm-brand__t { display: block; font-size: 18px; line-height: 24px; font-weight: 900; letter-spacing: .06em; color: #fff; }
.adm-brand__s { display: block; font-size: 12px; line-height: 18px; color: var(--steel-300); }
.adm-side__close { display: none; margin-left: auto; }
.adm-nav { margin-top: 16px; }
.adm-nav ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.adm-nav a { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px; border-radius: var(--r-s); color: var(--steel-200); font-size: 17px; font-weight: 500; text-decoration: none; }
.adm-nav a svg { stroke: var(--steel-300); }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a[aria-current="page"] { background: var(--navy-700); color: #fff; font-weight: 700; }
.adm-nav a[aria-current="page"] svg { stroke: var(--orange); }
.adm-nav__badge { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--orange); color: var(--navy-900); font-size: 14px; line-height: 26px; font-weight: 700; text-align: center; }
.adm-nav__badge:empty { display: none; }
.adm-nav__dot { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(242,107,29,.25); }
.adm-demo { margin-top: auto; padding: 14px; border: 1px dashed rgba(201,214,226,.32); border-radius: var(--r-m); font-size: 13px; line-height: 20px; color: var(--steel-300); }
.adm-demo__t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #fff; }
.adm-demo__t::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.adm-demo p { margin: 6px 0 0; }
.adm-demo__reset { margin-top: 12px; width: 100%; height: 40px; border: 1px solid rgba(201,214,226,.45); border-radius: var(--r-s); background: transparent; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.adm-demo__reset:hover { background: rgba(255,255,255,.08); }
.adm-scrim { display: none; }
.adm-body { min-width: 0; display: flex; flex-direction: column; }
.adm-head { min-height: 64px; padding: 10px var(--pad-x); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.adm-head__l, .adm-head__r { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-width: 0; }
.adm-head__r { gap: 16px; }
.adm-menu { display: none; }
.adm-head__name { font-size: 17px; line-height: 26px; font-weight: 700; color: var(--navy-900); }
.adm-head__view { display: inline-flex; align-items: center; gap: 6px; height: 44px; font-size: 15px; font-weight: 700; color: var(--blue); text-decoration: none; }
.demo-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px dashed var(--orange); border-radius: 13px; background: var(--orange-tint); color: var(--orange-text); font-size: 13px; line-height: 24px; font-weight: 700; white-space: nowrap; }
.adm-user { display: flex; align-items: center; gap: 10px; }
.adm-user__av { width: 36px; height: 36px; border-radius: 50%; background: #DCE8F3; color: var(--navy-900); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.adm-user__n { font-size: 15px; line-height: 22px; font-weight: 500; }
.adm-alert { margin: 16px var(--pad-x) 0; padding: 12px 16px; border-left: 4px solid var(--error); border-radius: var(--r-s); background: #FDF1F1; color: #7A1C20; font-size: 14px; line-height: 22px; font-weight: 700; }
.adm-main { flex: 1; padding: 24px var(--pad-x) 28px; outline: none; }

/* ===== 標題列、卡片 ===== */
.page-top { min-height: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.page-top__l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.page-top h1, .h1 { margin: 0; font-size: 28px; line-height: 40px; font-weight: 900; color: var(--navy-900); }
.m-only { display: none; }
.pe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.page-top__sub { font-size: 15px; line-height: 22px; color: var(--slate); }
.page-top__r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-bottom: 4px; font-size: 15px; font-weight: 700; color: var(--blue); text-decoration: none; }
.lead { margin: 2px 0 0; font-size: 16px; line-height: 26px; color: var(--slate); }
.lead strong { font-weight: 700; color: var(--orange-text); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
.card__pad { padding: 18px 20px 20px; }
.card__t { margin: 0; font-size: 19px; line-height: 28px; font-weight: 700; color: var(--navy-900); }
.card__d { margin: 2px 0 0; font-size: 14px; line-height: 22px; color: var(--slate); }
.card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 20px 14px 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.empty { padding: 40px 24px; text-align: center; color: var(--slate); font-size: 15px; line-height: 24px; }
.empty b { display: block; margin-bottom: 4px; color: var(--navy-900); font-size: 17px; }

/* ===== 表單欄位 ===== */
.fld { min-width: 0; }
.fld + .fld { margin-top: 14px; }
.fld__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fld label, .fld .fld__lab { font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ink); }
.req { color: var(--orange-text); }
.fld__count { font-family: var(--font-mono); font-size: 13px; line-height: 22px; color: var(--slate); white-space: nowrap; }
.fld__count.is-over { color: var(--error); font-weight: 700; }
.inp, .fld input[type="text"], .fld input[type="email"], .fld input[type="tel"], .fld input[type="date"], .fld input[type="password"], .fld select, .fld textarea { margin-top: 6px; display: block; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff; color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.fld textarea { height: auto; min-height: 72px; padding: 10px 12px; font-size: 15px; line-height: 24px; resize: vertical; }
.inp:focus, .fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--navy-900); box-shadow: 0 0 0 3px rgba(242,107,29,.35); }
.fld [aria-invalid="true"], .inp[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.fld__hint { margin-top: 6px; font-size: 13px; line-height: 20px; color: var(--slate); }
.fld__err { margin-top: 6px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--error); }
.fld__err:empty { display: none; }
.fld--mono input { font-family: var(--font-mono); letter-spacing: .02em; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.g2 .fld + .fld { margin-top: 0; }
.g2 + .fld, .fld + .g2, .g2 + .g2 { margin-top: 14px; }
.combo { display: flex; height: 44px; margin-top: 6px; border: 1px solid var(--field); border-radius: var(--r-s); overflow: hidden; background: #fff; }
.combo:focus-within { border-color: var(--navy-900); box-shadow: 0 0 0 3px rgba(242,107,29,.35); }
.fld .combo__lab, .combo__lab { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bg); border-right: 1px solid var(--line); font-size: 13px; line-height: 20px; font-weight: 400; color: var(--slate); white-space: nowrap; }
.combo__sq { width: 10px; height: 10px; background: var(--orange); }
.combo__sq--line { background: transparent; border: 1.5px solid var(--navy-900); }
.fld .combo input[type="text"], .combo input[type="text"] { flex: 1; min-width: 0; height: 42px; margin: 0; padding: 0 12px; border: 0; border-radius: 0; background: #fff; box-shadow: none; font-size: 16px; }
.fld .combo input[type="text"]:focus { outline: none; box-shadow: none; }

/* 開關 */
.sw { position: relative; flex: 0 0 44px; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 13px; background: #A3B1BE; cursor: pointer; transition: background-color .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.sw[aria-checked="true"] { background: var(--blue); }
.sw[aria-checked="true"]::after { left: 21px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.sw-row:first-of-type { border-top: 0; }
.sw-row__t { font-size: 15px; line-height: 22px; font-weight: 700; }
.sw-row__d { font-size: 13px; line-height: 20px; color: var(--slate); }

/* 狀態標籤 */
.st { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 14px; line-height: 28px; font-weight: 700; white-space: nowrap; }
.st-new { background: var(--st-new-bg); color: var(--st-new); }
.st-proc, .st-pub { background: var(--st-proc-bg); color: var(--st-proc); }
.st-done, .st-draft { background: var(--st-done-bg); color: var(--st-done); }
.st-sm { height: 24px; padding: 0 9px; font-size: 13px; line-height: 24px; }

/* ===== 表格 ===== */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; text-align: left; }
.tbl th { padding: 11px 16px; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; line-height: 22px; font-weight: 500; color: var(--slate); white-space: nowrap; }
.tbl td { padding: 8px 16px; border-bottom: 1px solid var(--line-2); font-size: 15px; line-height: 22px; vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 24px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 24px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .c-acts { text-align: right; white-space: nowrap; }
.tbl .c-acts > * + * { margin-left: 8px; }
.tbl .nowrap { white-space: nowrap; }
.tbl .c-date { font-family: var(--font-mono); font-size: 14px; color: var(--slate); white-space: nowrap; }
.tbl tr.is-new { background: #FFFAF5; }
.tbl tr.is-flash { animation: rowflash 2.4s ease-out; }
@keyframes rowflash { 0%, 30% { background: #FFE6D3; } 100% { background: transparent; } }
.t-strong { font-weight: 700; }
.t-sub { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--slate); }
.t-muted { font-size: 13px; line-height: 20px; color: var(--slate); }
.t-model { font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: .03em; color: #B5470C; }
.thumb { width: 72px; height: 46px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line-2); border-radius: 4px; background-color: var(--bg-2); background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 8px 8px; }
.thumb svg { width: 70px; height: 44px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .noimg { font-size: 11px; color: var(--slate); }
.star { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-s); background: none; color: #A3B1BE; cursor: pointer; }
.star:hover { background: var(--bg); }
.star[aria-pressed="true"] { color: var(--orange); }
.star svg { fill: none; stroke: currentColor; }
.star[aria-pressed="true"] svg { fill: currentColor; }

/* 工具列、篩選 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.toolbar select, .toolbar .search input { height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff; font-size: 15px; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 360px; }
.toolbar .search input { width: 100%; padding-left: 38px; }
.toolbar .search svg { position: absolute; left: 12px; top: 13px; stroke: var(--slate); }
.toolbar__count { margin-left: auto; font-size: 14px; color: var(--slate); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; }
.seg button:hover { border-color: var(--navy-900); }
.seg button[aria-pressed="true"] { border-color: var(--navy-900); background: var(--navy-900); color: #fff; font-weight: 700; }
.seg__n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bg); color: var(--slate); font-family: var(--font-mono); font-size: 12px; line-height: 22px; text-align: center; }
.seg button[aria-pressed="true"] .seg__n { background: rgba(255,255,255,.18); color: #fff; }

/* 儲存列 */
.savebar { position: sticky; bottom: 0; z-index: 15; margin: 20px calc(var(--pad-x) * -1) -28px; padding: 12px var(--pad-x); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(10,28,46,.06); }
.savebar__note { margin-right: auto; font-size: 14px; color: var(--slate); }

/* ===== 提示訊息、確認框 ===== */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 440px; padding: 12px 12px 12px 16px; border-radius: var(--r-m); background: var(--navy-900); color: #fff; font-size: 15px; line-height: 22px; box-shadow: 0 10px 30px rgba(10,28,46,.25); animation: toastin .2s ease-out; }
.toast svg { margin-top: 2px; }
.toast--error { background: #FFF1F1; color: #7A1C20; border-left: 4px solid var(--error); font-weight: 700; }
.toast__x { flex: 0 0 28px; width: 28px; height: 28px; margin: -3px 0 -3px 4px; padding: 0; border: 0; border-radius: 4px; background: none; color: inherit; opacity: .75; font-size: 20px; line-height: 28px; cursor: pointer; }
.toast__x:hover { opacity: 1; background: rgba(255,255,255,.12); }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cdlg { width: min(460px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 24px 64px rgba(10,28,46,.35); }
.cdlg::backdrop { background: rgba(10,28,46,.55); }
.cdlg__in { padding: 24px; }
.cdlg__t { margin: 0; font-size: 20px; line-height: 28px; font-weight: 900; color: var(--navy-900); }
.cdlg__b { margin: 10px 0 0; font-size: 15px; line-height: 24px; color: var(--slate); }
.cdlg__acts { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ===== 登入 ===== */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background-color: var(--navy-900); background-image: linear-gradient(rgba(201,214,226,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(201,214,226,.07) 1px, transparent 1px), linear-gradient(rgba(201,214,226,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(201,214,226,.045) 1px, transparent 1px); background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; }
.login__card { width: 100%; max-width: 420px; padding: 32px; border-radius: 10px; background: #fff; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.login__brand { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.login__t { font-size: 22px; line-height: 30px; font-weight: 900; color: var(--navy-900); }
.login__s { font-size: 14px; line-height: 20px; color: var(--slate); }
.login form { margin-top: 20px; }
.login .btn-block { margin-top: 22px; height: 52px; font-size: 17px; }
.login__demo { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; color: var(--slate); }
.login__back { display: inline-flex; margin-top: 14px; font-size: 14px; font-weight: 700; text-decoration: none; }

/* ===== 總覽 ===== */
.ov-cards { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.scard { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; color: var(--ink); text-decoration: none; }
a.scard:hover { border-color: var(--orange); color: var(--ink); }
.scard--hot { background: var(--orange-tint); border-color: var(--orange-line); }
.scard__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--slate); }
.scard__ic { width: 32px; height: 32px; border-radius: var(--r-s); background: var(--tint-blue); display: flex; align-items: center; justify-content: center; }
.scard__ic svg { stroke: var(--blue); }
.scard--hot .scard__ic { background: #FDE3D0; }
.scard--hot .scard__ic svg { stroke: var(--orange-text); }
.scard__num { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.scard__num b { font-family: var(--font-cond); font-size: 44px; line-height: 48px; font-weight: 600; color: var(--navy-900); }
.scard--hot .scard__num b { color: var(--orange-text); }
.scard__num span { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--slate); }
.scard__sub { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 22px; color: var(--slate); }
.scard__sub svg { stroke: var(--blue); }
.scard--hot .scard__sub { font-weight: 700; color: var(--orange-text); }
.ov-row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.ov-latest { flex: 999 1 640px; min-width: 0; overflow: hidden; }
.ov-latest .card__head h2 { margin: 0; font-size: 19px; line-height: 28px; font-weight: 700; color: var(--navy-900); }
.ov-quick { flex: 1 1 340px; min-width: 0; padding: 14px 24px 24px; display: flex; flex-direction: column; }
.ov-quick h2 { margin: 0; min-height: 44px; display: flex; align-items: center; font-size: 19px; line-height: 28px; font-weight: 700; color: var(--navy-900); }
.quick { margin-top: 12px; flex: 1; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick a { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); color: var(--navy-900); text-decoration: none; transition: border-color .15s, background-color .15s; }
.quick a:hover { border-color: var(--navy-900); background: #fff; }
.quick__ic { flex: 0 0 48px; height: 48px; border-radius: var(--r-m); background: var(--navy-900); display: flex; align-items: center; justify-content: center; }
.quick__ic--hot { background: var(--orange); }
.quick__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick__t { font-size: 18px; line-height: 26px; font-weight: 700; }
.quick__d { font-size: 14px; line-height: 22px; color: var(--slate); }
.btn-view { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff; color: var(--navy-900); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn-view:hover { border-color: var(--navy-900); color: var(--navy-900); }
.ov-latest .tbl td { padding-top: 6px; padding-bottom: 6px; }
.ov-latest .tbl .c-main { white-space: nowrap; }

/* ===== 頁面內容編輯 ===== */
.pe-top__r .fld__count { align-self: center; }
.pe-pub { font-size: 13px; line-height: 20px; color: var(--slate); }
.pe-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--st-new-bg); color: var(--st-new); font-size: 13px; line-height: 28px; font-weight: 700; white-space: nowrap; }
.pe-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-new-dot); }
.pe-chip.is-unsaved { background: #fff; box-shadow: inset 0 0 0 1px var(--orange-line); }
.pe-grid { margin-top: 16px; display: grid; grid-template-columns: 260px minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.pe-nav { padding: 16px; }
.pe-nav h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--navy-900); }
.pe-nav > p { margin: 2px 0 0; font-size: 13px; line-height: 20px; color: var(--slate); }
.pe-pages { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pe-page { width: 100%; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 10px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); font-size: 16px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.pe-page:hover { background: var(--bg); color: var(--ink); }
.pe-page svg { stroke: var(--slate); }
.pe-page.is-open, .pe-page[aria-current="true"] { background: var(--tint-blue); color: var(--navy-900); font-weight: 700; }
.pe-page.is-open svg, .pe-page[aria-current="true"] svg { stroke: var(--navy-900); }
.pe-ic-doc { display: flex; }
.pe-page .pe-ic-doc svg { stroke: var(--blue); }
.pe-page__n { margin-left: auto; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--slate); }
.pe-blocks { margin: 4px 0 6px 18px; padding: 0 0 0 10px; list-style: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.pe-block { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px 0 0; border-radius: var(--r-s); background: #fff; transition: box-shadow .15s, background-color .15s; }
.pe-block.is-current { background: var(--orange-tint); box-shadow: inset 0 0 0 1px var(--orange-line); }
.pe-block.is-dragging { position: relative; z-index: 2; background: #fff; box-shadow: 0 8px 20px rgba(10,28,46,.18), inset 0 0 0 1px var(--blue); }
.pe-drag, .pe-pin { flex: 0 0 28px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--slate-2); }
.pe-drag { cursor: grab; touch-action: none; }
.pe-drag:active { cursor: grabbing; }
.pe-drag:hover { background: var(--bg); }
.pe-block a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 44px; font-weight: 500; color: var(--ink); text-decoration: none; }
.pe-block.is-current a { font-weight: 700; color: var(--orange-text); }
.pe-block.is-off a { color: #8A97A3; text-decoration: line-through; text-decoration-color: rgba(138,151,163,.6); }
.pe-block__vis { font-size: 13px; line-height: 20px; color: var(--slate); }
.pe-block__fixed { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--bg); font-size: 12px; color: var(--slate); }
.pe-hint { margin-top: 12px; display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: var(--r-s); background: var(--bg); font-size: 13px; line-height: 20px; color: var(--slate); }
.pe-hint svg { margin-top: 2px; stroke: var(--blue); }
.pe-edit__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.pe-edit__head h2 { margin: 0; font-size: 19px; line-height: 28px; font-weight: 700; color: var(--navy-900); }
.pe-edit__head span { font-size: 14px; line-height: 22px; color: var(--slate); }
.pe-back { display: none; }
.pe-edit__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.pe-edit__body .fld + .fld { margin-top: 0; }
.pe-row2 { display: flex; gap: 10px; align-items: stretch; }
.pe-row2 > input { flex: 1; min-width: 0; }
.pe-row2 .combo { flex: 0 0 170px; }
.pe-btns { margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.pe-btns .combo { margin-top: 0; }
.pe-bg { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); }
.pe-bg__thumb { flex: 0 0 96px; height: 54px; border-radius: 3px; overflow: hidden; display: flex; align-items: center; justify-content: center; background-color: var(--navy-900); color: var(--steel-300); font-size: 12px; }
.pe-bg__thumb--grid { background-image: linear-gradient(rgba(201,214,226,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(201,214,226,.12) 1px, transparent 1px); background-size: 8px 8px; }
.pe-bg__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pe-bg__info { flex: 1 1 120px; min-width: 0; }
.pe-bg__name { font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-bg__meta { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--slate); }
.pe-bg__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-stats { margin-top: 6px; display: grid; grid-template-columns: 120px 84px minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.pe-stats > span { font-size: 13px; line-height: 18px; color: var(--slate); }
.pe-stats .inp { margin-top: 0; }
.pe-stats .inp-num { font-family: var(--font-cond); font-size: 21px; font-weight: 600; color: var(--navy-900); }
.pe-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--orange-tint); border: 1px solid var(--orange-line); font-size: 14px; line-height: 22px; color: var(--orange-text); font-weight: 700; }
.pe-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; }
.pe-sub { margin: 4px 0 0; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ink); }
.pe-preview { padding: 16px; position: sticky; top: 16px; }
.pv-head { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pv-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--navy-900); }
.pv-head .btn-text { font-size: 14px; }
.pv-label { margin-top: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 20px; letter-spacing: .06em; color: var(--slate); }
.pv-desk { position: relative; margin-top: 6px; height: 196px; border: 1px solid var(--steel-200); border-radius: 4px; overflow: hidden; background: var(--navy-900); }
.pv-phone-wrap { margin-top: 6px; display: flex; justify-content: center; }
.pv-phone { position: relative; width: 132px; height: 240px; border: 5px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff; }
.pv-desk iframe, .pv-phone iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.pv-note { margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--slate); }

/* 多列輸入（規格表、設備清單） */
.rows { margin-top: 6px; }
.rows__head, .rows__row { display: grid; grid-template-columns: var(--cols); gap: 8px; align-items: center; }
.rows__head { padding: 0 0 4px; font-size: 13px; line-height: 18px; color: var(--slate); }
.rows__row + .rows__row { margin-top: 8px; }
.rows__row .inp { margin-top: 0; height: 40px; font-size: 15px; }
.rows__row .icon-btn { width: 40px; height: 40px; }
.rows__add { margin-top: 10px; }

/* ===== 產品／消息表單 ===== */
.form-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.imgbox { margin-top: 12px; aspect-ratio: 11 / 7; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-s); background-color: var(--bg-2); background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 16px 16px; }
.imgbox svg { width: 90%; height: 90%; }
.imgbox img { width: 100%; height: 100%; object-fit: cover; }
.imgbox .noimg { font-size: 14px; color: var(--slate); }
.img-acts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.img-acts select { height: 44px; padding: 0 10px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff; font-size: 15px; max-width: 100%; }
.meta { margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--slate); }

/* ===== 詢價詳細 ===== */
.inq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.inq-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.dl { margin: 12px 0 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); border-top: 1px solid var(--line-2); }
.dl dt, .dl dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; line-height: 24px; }
.dl dt { color: var(--slate); }
.dl dd { font-weight: 500; overflow-wrap: anywhere; }
.dl dd.msg { white-space: pre-wrap; font-weight: 400; }
.file-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); font-size: 14px; }
.status-pick { margin-top: 12px; display: grid; gap: 8px; }
.status-pick label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-s); font-size: 15px; font-weight: 700; cursor: pointer; }
.status-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy-900); }
.status-pick label:has(input:checked) { border-color: var(--navy-900); background: var(--tint-blue); }
.status-pick .st { margin-left: auto; }

/* ===== 網站設定：Google 預覽 ===== */
.seo-grid { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
.seo-grid > .fld + .fld, .seo-grid > div > .fld + .fld { margin-top: 14px; }
.seo-grid > .fld { margin-top: 0; }
.serp { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; font-family: Arial, "Microsoft JhengHei", "微軟正黑體", sans-serif; }
.serp__site { display: flex; align-items: center; gap: 10px; }
.serp__fav { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; background: #fff; }
.serp__name { font-size: 14px; line-height: 20px; color: #202124; }
.serp__url { font-size: 12px; line-height: 18px; color: #4D5156; }
.serp__title { margin-top: 6px; font-size: 20px; line-height: 26px; color: #1A0DAB; overflow-wrap: anywhere; }
.serp__desc { margin-top: 4px; font-size: 14px; line-height: 22px; color: #4D5156; overflow-wrap: anywhere; }

/* ===== 帳號 ===== */
.you { display: inline-flex; margin-left: 6px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--tint-blue); color: var(--blue); font-size: 12px; line-height: 22px; font-weight: 700; vertical-align: middle; }
.role-hint { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 20px; color: var(--slate); }

/* ===== 平板：側欄改抽屜（< 1024） ===== */
@media (max-width: 1279px) {
  .pe-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .pe-block__vis { display: none; }
  .pe-edit .rows__head { display: none; }
  .pe-edit .rows__row { grid-template-columns: var(--cols-m, var(--cols)); }
  .pe-edit .rows__row .rows__wide { grid-column: 1 / span 3; }
  .pe-preview { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: 20px; }
  .pe-preview .pv-head, .pe-preview .pv-note { grid-column: 1 / -1; }
  .pe-preview .pv-label-desk { grid-column: 1; grid-row: 2; }
  .pe-preview .pv-desk { grid-column: 1; grid-row: 3; height: 300px; }
  .pe-preview .pv-label-phone { grid-column: 2; grid-row: 2; }
  .pe-preview .pv-phone-wrap { grid-column: 2; grid-row: 3; align-items: flex-start; }
}
@media (max-width: 1023px) {
  :root { --pad-x: 20px; }
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 120; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .22s ease-out; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .adm.is-drawer .adm-side { transform: none; }
  .adm-side__close { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(201,214,226,.3); border-radius: var(--r-s); background: transparent; color: #fff; cursor: pointer; }
  .adm.is-drawer .adm-scrim { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(10,28,46,.5); }
  .adm-menu { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--navy-900); cursor: pointer; }
  .adm-head { position: sticky; top: 0; z-index: 30; }
  .form-grid, .inq-grid, .seo-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 手機（< 768） ===== */
@media (max-width: 767px) {
  :root { --pad-x: 16px; }
  .adm-head { min-height: 60px; padding: 8px var(--pad-x); flex-wrap: nowrap; gap: 8px; }
  .adm-head__l { flex-wrap: nowrap; gap: 10px; flex: 1; }
  .adm-head__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .adm-head__view, .adm-user__n, .adm-head [data-logout] span { display: none; }
  .adm-head__r { flex-wrap: nowrap; gap: 8px; }
  .adm-head [data-logout] { width: 44px; padding: 0; }
  .adm-user__av { width: 32px; height: 32px; font-size: 14px; }
  .adm-main { padding: 18px var(--pad-x) 24px; }
  .page-top h1 { font-size: 24px; line-height: 34px; }
  .page-top__r { width: 100%; }
  .page-top__r > .btn { flex: 1 1 auto; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .card__head { padding: 12px 16px; }
  .toolbar { padding: 12px 16px; }
  .toolbar .search { max-width: none; }
  .toolbar__count { width: 100%; margin-left: 0; }

  /* 表格改卡片 */
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td, .tbl td:first-child, .tbl td:last-child { display: block; padding: 0; border: 0; }
  .tbl td.c-thumb { order: -4; }
  .tbl td.c-main { order: -3; flex: 1 1 calc(100% - 140px); min-width: 0; white-space: normal; font-size: 16px; }
  .tbl tr:has(.c-thumb) td.c-main { flex-basis: 60px; }
  .tbl td.c-status { order: -2; flex: 0 0 auto; }
  .tbl td.c-lbl { flex: 1 1 calc(50% - 6px); min-width: 0; font-size: 14px; line-height: 22px; white-space: normal; }
  .tbl td.c-lbl::before { content: attr(data-label) "："; color: var(--slate); font-family: var(--font-sans); }
  .tbl td.c-lbl > div { display: inline; }
  .tbl td.c-lbl > div + div { margin-left: 6px; }
  .tbl td.c-lbl .star { width: 32px; height: 32px; vertical-align: middle; }
  .ov-latest .tbl td.c-main { white-space: normal; }
  .tbl td.c-full { flex-basis: 100%; }
  .tbl td.c-hide-m { display: none; }
  .tbl td.c-acts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; text-align: left; }
  .tbl td.c-acts > * { flex: 1 1 0; margin: 0 !important; }
  .tbl td.c-acts > .star { flex: 0 0 44px; }

  .savebar { margin-left: calc(var(--pad-x) * -1); margin-right: calc(var(--pad-x) * -1); margin-bottom: -24px; }
  .savebar > .btn { flex: 1 1 auto; }
  .savebar__note { width: 100%; }

  .ov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
  .scard { padding: 12px 14px; }
  .scard__top { font-size: 13px; line-height: 20px; gap: 6px; }
  .scard__ic { width: 26px; height: 26px; }
  .scard__num { margin-top: 4px; }
  .scard__num b { font-size: 34px; line-height: 38px; }
  .scard__num span { font-size: 14px; }
  .scard__sub { font-size: 12px; line-height: 18px; gap: 4px; }
  .ov-row { margin-top: 14px; gap: 14px; }
  .ov-quick { padding: 12px 16px 16px; }
  .quick a { min-height: 76px; padding: 12px 14px; }

  /* 頁面內容：清單／編輯分兩個畫面 */
  .pe-top { position: relative; }
  .pe-top__r { order: 3; }
  .pe-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 8px; padding: 10px var(--pad-x); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(10,28,46,.08); }
  .pe-actions .btn { flex: 1 1 0; padding: 0 8px; font-size: 15px; }
  .pe-actions .btn-publish { height: 48px; font-size: 16px; }
  .pe-wrap { padding-bottom: 72px; }
  .pe-grid { grid-template-columns: minmax(0, 1fr); }
  .pe-grid[data-pane="list"] .pe-edit, .pe-grid[data-pane="list"] .pe-preview { display: none; }
  .pe-grid[data-pane="edit"] .pe-nav { display: none; }
  .pe-back { display: inline-flex; width: 100%; padding: 8px 20px 0; }
  .pe-preview { display: block; }
  .pe-preview .pv-desk { height: 200px; }
  .pe-row2 { flex-direction: column; gap: 8px; }
  .pe-row2 > input, .pe-row2 .combo { flex: 0 0 auto; }
  .pe-stats { grid-template-columns: 92px 64px minmax(0, 1fr); gap: 6px 8px; }
  .pe-stats .inp { padding: 0 8px; }
  .rows__head { display: none; }
  .rows__row { grid-template-columns: var(--cols-m, var(--cols)); }
  .rows__row .rows__wide { grid-column: 1 / span 3; }
  .m-only { display: block; }
  .h1 { font-size: 24px; line-height: 34px; }

  .toasts { left: 12px; right: 12px; bottom: 84px; align-items: stretch; }
  .toast { max-width: none; }
  .dl { grid-template-columns: 92px minmax(0, 1fr); }
  .login__card { padding: 24px 20px; }
}

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