/* admin.css：後台外觀（照官網後台 lovely-shop 的 admin.css 複製；管理平台自己加的樣式在 platform.css）
   負責：顏色、字體、版面（左側選單、卡片、表單、按鈕、表格）、手機版。
   可以改的：:root 裡的顏色與尺寸（--accent 主要按鈕顏色、--radius 卡片圓角、--tap 觸控高度）。
   改了影響：整個後台的樣子。 */

:root {
  --bg: #F5F5F4;
  --card: #FFFFFF;
  --line: #E5E5E3;
  --text: #1C1C1B;
  --muted: #6B6B68;
  --accent: #A65C5A;
  --accent-dark: #8C4B49;
  --accent-soft: #F4E9E8;
  --danger: #B3261E;
  --ok: #2E7D4F;
  --radius: 12px;
  --radius-btn: 8px;
  --tap: 44px;
  --side: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--accent); }
.boot { padding: 40px; text-align: center; color: var(--muted); }

/* 版面 */
.layout { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; background: var(--card); border-right: 1px solid var(--line); height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; overflow: hidden; }
/* 店名＋總覽固定在上面，只有下面的群組捲動 */
.side-head, .menu-pinned { flex: none; }
.menu.menu-pinned { padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.side-head { padding: 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.side-head small { display: block; font-weight: 400; color: var(--muted); }
.menu { list-style: none; margin: 0; padding: 8px 0 40px; }
.menu-group > button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); padding: 0 16px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.menu-group > button::after { content: '▸'; color: var(--muted); transition: transform .15s; }
.menu-group.open > button::after { transform: rotate(90deg); }
.menu-group > button .group-label { flex: 1; text-align: left; }
.menu-group > button .group-sum { margin: 0 8px 0 0; } /* 收合時顯示底下的加總；展開時藏起來（子項目自己有數字） */
.menu-group.open > button .group-sum { display: none; }
.menu-group ul { list-style: none; margin: 0; padding: 0; display: none; }
.menu-group.open ul { display: block; }
.menu a { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px 0 32px; color: var(--text); text-decoration: none; }
.menu a:hover { background: var(--bg); }
.menu a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.menu a.single { padding-left: 16px; font-weight: 500; min-height: var(--tap); }
.tag-wip { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: auto; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 0 20px; height: 56px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .title { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.menu-btn { display: none; }
.content { padding: 20px; }

/* 卡片與文字 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 26px; }
.badge { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: #CBE5D5; background: #EEF7F1; }
.badge.off { color: var(--muted); }
.badge.accent { color: var(--accent-dark); border-color: #E7CFCE; background: var(--accent-soft); }

/* 按鈕 */
.btn { white-space: nowrap; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); }
/* 實心按鈕的字一律白色、粗一點（2026/11/19 使用者反映：紅底紅字的「刪除」看不清） */
.btn.primary, .btn.primary.danger { color: #fff; font-weight: 700; }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); }
.btn.primary.danger:hover { background: #8E1D17; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表單 */
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: #fff; font: inherit; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
/* 全站（2026/11/22 使用者要求）：點到輸入框、下拉選單、按鈕時不顯示其他顏色的框（輸入框只有游標閃爍）；框線維持原本的顏色。
   只有用鍵盤 Tab 移到按鈕、連結時保留細框（滑鼠、手指點不會出現），不然用鍵盤的人不知道現在在哪一顆。 */
input:focus, select:focus, textarea:focus, button:focus, .btn:focus, a:focus, [role=button]:focus { outline: none; box-shadow: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible, [role=button]:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--danger); }
.err-text { color: var(--danger); font-size: 13px; margin-top: 4px; }
.unit-wrap { display: flex; align-items: center; gap: 8px; }
.unit-wrap input { max-width: 200px; }
.switch { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-right: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.list-edit .item { display: flex; gap: 8px; margin-bottom: 8px; }
.list-edit .item input { flex: 1; }
.form-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; z-index: 3; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* 權限矩陣 */
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.perm-group > .head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--bg); font-weight: 500; }
.perm-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 8px 14px; border-top: 1px solid var(--line); }
.perm-item .name { width: 220px; flex: none; }

/* 登入頁 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 20px; margin: 0 0 4px; }

/* 提示訊息 */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; }
#toast .t { background: var(--text); color: #fff; padding: 10px 18px; border-radius: var(--radius-btn); margin-top: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
#toast .t.err { background: var(--danger); }

/* 對話框 */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.modal { background: var(--card); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 12px; }

.qr { text-align: center; margin: 12px 0; }
.steps { margin-bottom: 8px; }
.step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.step > div { flex: 1; min-width: 0; }
.step .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
details summary { cursor: pointer; color: var(--accent); min-height: 36px; display: flex; align-items: center; }
.back-btn { flex: none; }
/* 上方列同一組按鈕同寬同高（共用技能包規則） */
.topbar .btn.small { min-width: 96px; height: 40px; }
.side-backdrop { display: none; }
.qr svg { width: 280px; height: 280px; max-width: 100%; background: #fff; }
.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; }

/* 分類、條件清單 */
.cat-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cat-row:last-child { border-bottom: 0; }
.cat-row.child { padding-left: 32px; background: #FAFAF9; }
.cat-name { flex: 1; min-width: 120px; color: var(--text); text-decoration: none; }
a.cat-name:hover { color: var(--accent); }
td.acts-cell { width: 1%; white-space: nowrap; }
.cat-acts { gap: 6px; }

/* 圖片 */
/* 選圖片欄位（components/image-picker.js；照 SHOPLINE 商品圖片） */
.picker-head { display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
.picker-count { color: var(--muted); font-size: 14px; }
.picker-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.picker-thumbs.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.picker-thumbs:empty { display: none; }
.picker-thumb { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.picker-img { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.picker-thumbs.wide .picker-img { aspect-ratio: 24 / 5; }
.picker-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-thumbs.wide .picker-img img { object-fit: contain; }
.picker-img .drag-handle { position: absolute; left: 6px; top: 6px; background: rgba(255,255,255,.92); border-radius: 6px; min-height: 32px; width: 32px; }
.picker-first { position: absolute; left: 6px; bottom: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.picker-btns { justify-content: center; margin-top: 0; flex-wrap: nowrap; }
.picker-btns .btn { flex: 0 1 84px; min-width: 0; padding: 0 8px; white-space: nowrap; }
.picker-btns .btn.has-alt { border-color: var(--accent); color: var(--accent-dark); }
.picker-drop { margin-top: 16px; border: 2px dashed var(--line); border-radius: 12px; padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: border-color .15s, background .15s; }
.picker-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.picker-drop .drop-title { font-size: 20px; font-weight: 700; }
.picker-drop.full .drop-title { font-size: 15px; color: var(--muted); font-weight: 500; }
.picker-drop .row-btns { justify-content: center; }
.alt-body { display: flex; gap: 20px; align-items: flex-start; }
.alt-thumb { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
@media (max-width: 860px) {
  .picker-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .picker-thumbs.wide { grid-template-columns: 1fr; }
  .alt-body { flex-direction: column; }
  .alt-thumb { width: 120px; height: 120px; }
}
.media-card { border: 2px solid var(--line); border-radius: 8px; padding: 0; background: var(--bg); aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.media-card img, .media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.media-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.media-item > a { display: block; aspect-ratio: 1; background: var(--bg); }
.modal.modal-wide { max-width: 760px; }

/* 文字編輯器 */
.rich .ql-toolbar { border-radius: 8px 8px 0 0; border-color: var(--line); background: #FAFAF9; }
.rich .ql-container { border-radius: 0 0 8px 8px; border-color: var(--line); font: inherit; min-height: 180px; }
.rich .ql-editor { min-height: 180px; }
/* 描述裡的圖片一律自己一行、上下排列（2026/11/20 使用者要求：照自己排的順序上下排，不可以因為編輯框變寬就並排）；
   網站顯示商品描述時也要照這條（第 9 塊）。置中／靠右照段落的對齊。 */
.rich .ql-editor img { display: block; max-width: 100%; height: auto; margin: 0; }
.rich .ql-editor .ql-align-center img { margin: 0 auto; }
.rich .ql-editor .ql-align-right img { margin: 0 0 0 auto; }
.rich.readonly .ql-toolbar { display: none; }
.rich.readonly .ql-container { border-top: 1px solid var(--line); border-radius: 8px; }
.rich .ql-toolbar .rich-html-btn { width: auto; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.rich .ql-toolbar .rich-html-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rich.html-mode .ql-formats > *:not(.rich-html-btn):not(.rich-zoom-btn) { opacity: .35; pointer-events: none; }
.rich.html-mode .rich-html { border-radius: 0 0 8px 8px; }
/* 下拉選單的中文名稱 */
.rich .ql-snow .ql-picker.ql-header { width: 96px; }
.rich .ql-snow .ql-picker.ql-header .ql-picker-label::before, .rich .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: '一般文字'; }
.rich .ql-snow .ql-picker.ql-header [data-value="2"]::before { content: '標題 2'; }
.rich .ql-snow .ql-picker.ql-header [data-value="3"]::before { content: '標題 3'; }
.rich .ql-snow .ql-picker.ql-header [data-value="4"]::before { content: '標題 4'; }
.rich .ql-snow .ql-picker.ql-header [data-value="5"]::before { content: '標題 5'; }
.rich .ql-snow .ql-picker.ql-header [data-value="6"]::before { content: '標題 6'; }
.rich .ql-toolbar button.ql-paragraph { font-weight: 700; font-size: 14px; width: auto; padding: 0 8px; }
.rich .ql-snow .ql-picker.ql-size { width: 76px; }
.rich .ql-snow .ql-picker.ql-size .ql-picker-label::before, .rich .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: '字級'; }
.rich .ql-snow .ql-picker.ql-size .ql-picker-label[data-value]::before, .rich .ql-snow .ql-picker.ql-size .ql-picker-item[data-value]::before { content: attr(data-value); }
.rich .ql-snow .ql-picker.ql-lineheight { width: 70px; }
.rich .ql-snow .ql-picker.ql-lineheight .ql-picker-label::before, .rich .ql-snow .ql-picker.ql-lineheight .ql-picker-item::before { content: '行高'; }
.rich .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value]::before, .rich .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value]::before { content: attr(data-value); }
/* 語言分頁（components/lang-tabs.js）：繁體中文在左、英文在右 */
.lang-tab-row { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.lang-tab { border: 0; border-bottom: 3px solid transparent; background: none; padding: 0 18px; min-height: 40px; font: inherit; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.lang-tab:hover { color: var(--accent); }
.lang-tab.on { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 700; }
.rich-html { font-family: ui-monospace, Menlo, monospace; font-size: 13px; min-height: 220px; }

/* 顏色尺寸 chip */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; background: #fff; }
.chip span { margin-right: 4px; }
.chip button { border: 0; background: none; min-width: 28px; min-height: 32px; cursor: pointer; color: var(--muted); font: inherit; }
.chip button:hover { color: var(--accent); }
.chip button:disabled { opacity: .3; cursor: default; }
.chip button.chip-lock { opacity: .45; cursor: not-allowed; font-size: 13px; }
.count { float: right; font-size: 12px; margin-top: 2px; }

/* 頁首固定（電腦版）：標題、按鈕、篩選、分頁籤固定在上方列下面，只有內容捲動 */
.sticky-head { position: sticky; top: 56px; z-index: 4; background: var(--bg); margin: -20px -20px 16px; padding: 16px 20px 12px; border-bottom: 1px solid transparent; }
.sticky-head.stuck { border-bottom-color: var(--line); }
.page-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title { font-size: 20px; margin: 0; flex: 1; min-width: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sticky-head > .card, .sticky-head > .head-filters { margin: 12px 0 0; }
.head-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; }

/* 「?」說明（components/help-tip.js） */
.help-q { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; border: 1px solid #C9C6C2; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; user-select: none; }
.help-q:hover, .help-q:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.tip-pop { position: fixed; z-index: 100; background: var(--text); color: #fff; font-size: 13px; line-height: 1.6; padding: 8px 12px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); white-space: pre-line; pointer-events: none; }

/* 列表右邊的「複製」＋「⋯」（components/row-actions.js） */
.row-acts { display: flex; gap: 10px; flex: none; }
.btn.icon-btn { width: 40px; min-width: 40px; padding: 0; font-size: 18px; }
.row-menu { position: fixed; z-index: 90; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 6px; min-width: 150px; display: flex; flex-direction: column; max-height: calc(100vh - 16px); overflow-y: auto; }
.row-menu-sec { font-size: 12px; color: var(--muted); padding: 10px 12px 4px; border-top: 1px solid var(--line); margin-top: 4px; white-space: nowrap; }
.row-menu-sec:first-child { border-top: 0; margin-top: 0; }
.row-menu-item { border: 0; background: none; text-align: left; min-height: 40px; padding: 0 12px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; }
.row-menu-item:hover:not([disabled]) { background: var(--bg); }
.row-menu-item.danger { color: var(--danger); }
.row-menu-item[disabled] { color: #B5B2AE; cursor: not-allowed; }
.btn.locked-del { color: #A8A5A1; background: #F3F2F0; border-color: var(--line); cursor: not-allowed; }

/* 圖片庫卡片固定版面：圖片 → 檔名（兩行）→ 尺寸大小（兩行）→ 使用狀態（兩行）→ 按鈕（貼底、同一條線） */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: stretch; } /* 選圖片視窗、款式圖片的方格（2026/11/20 補回：曾被誤刪，圖片變成滿版） */
.media-item { display: flex; flex-direction: column; }
.media-item .m-name, .media-item .m-meta, .media-item .m-use { padding: 0 8px; font-size: 13px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; height: 3em; word-break: break-all; }
.media-item .m-name { margin-top: 6px; }
.media-item .m-meta { color: var(--muted); white-space: pre-line; }
.media-item .m-use { color: var(--muted); }
.media-item .m-use.used { color: var(--accent-dark); }
.card-btns { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; margin-top: auto; }
.card-btns .btn { min-width: 0 !important; padding: 0 4px; }

/* 商品 */
.sec-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sec-nav a { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; }
.sec-nav a:hover { border-color: var(--accent); color: var(--accent); }
.sec-nav a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.prod-sec { scroll-margin-top: 140px; }
.cat-checks { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.cat-checks .check.sub { padding-left: 24px; }
.chip-field input { margin-top: 8px; }
.chip-input:empty { display: none; }
.dim-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #FAFAF9; }
.dim-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.variant-wrap { border: 1px solid var(--line); border-radius: 8px; max-height: 560px; overflow: auto; }
.variant-table th { position: sticky; top: 0; background: #fff; z-index: 1; }
.variant-table td { padding: 6px 8px; }
.variant-table input { min-height: 36px; padding: 4px 8px; min-width: 90px; }
.variant-table .var-name { white-space: nowrap; font-weight: 500; }
.variant-table .bulk-row td { background: var(--accent-soft); }
.var-img { width: 40px; height: 40px; border: 1px dashed var(--line); border-radius: 6px; background: #fff; cursor: pointer; padding: 0; overflow: hidden; color: var(--muted); }
.var-img img { width: 100%; height: 100%; object-fit: cover; }
.stock-form { display: grid; grid-template-columns: 1fr 120px 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.stock-form .field { margin: 0; }
.picker-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumb.empty { background: var(--bg); }
td.thumb-cell { width: 60px; }

/* 拖曳排序（components/drag-sort.js） */
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 36px; flex: 0 0 28px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; user-select: none; }
.drag-handle:hover { background: var(--bg); color: var(--text); }
.drag-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.is-sorting > * { transition: transform .15s; }
.is-sorting > .is-dragging { transition: none; position: relative; z-index: 5; box-shadow: 0 10px 24px rgba(0,0,0,.16); background: #fff; cursor: grabbing; }
.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.chip .drag-handle { min-height: 30px; width: 22px; flex-basis: 22px; margin-left: -8px; }

/* 手機版：選單收成按鈕 */
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 24px rgba(0,0,0,.15); }
  .layout.menu-open .side { transform: none; }
  .layout.menu-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 20; }
  .btn.menu-btn { display: inline-flex; }
  /* 手機上方列：四顆按鈕平均分、同寬同高、字置中不換行，標題移到頁面裡（2026/11/19 使用者反映字沒對齊） */
  .topbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px 16px; height: 61px; }
  .topbar.no-back { grid-template-columns: repeat(3, 1fr); }
  .topbar .title { display: none; }
  /* 手機：頁首也固定在上方四顆按鈕下面（2026/11/20 使用者要求：不用每次往上滑找按鈕）。
     為了不佔太多畫面：標題一行（太長變…）、按鈕排一列平均分、篩選和跳轉按鈕一列左右滑 */
  .sticky-head { top: 61px; margin: -16px -16px 12px; padding: 10px 16px 8px; }
  .page-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-basis: 100%; }
  .page-title-row { gap: 8px; }
  .page-actions { width: 100%; justify-content: stretch; flex-wrap: nowrap; }
  .page-actions .btn { flex: 1 1 0; min-width: 0; min-height: 40px; height: 40px; padding: 0 8px; white-space: nowrap; }
  .sticky-head > .card, .sticky-head > .head-filters, .sticky-head > .sec-nav { margin-top: 8px; }
  .head-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .head-filters > * { flex: none; }
  .head-filters input[type=text], .head-filters input[type=search] { width: 200px; }
  .sec-nav a { min-height: 36px; }
  .topbar .btn.small { min-width: 0; width: 100%; height: 44px; padding: 0 4px; font-size: 14px; }
  .content { padding: 16px; }
  .perm-item .name { width: 100%; }
  .stock-form { grid-template-columns: 1fr 1fr; }
  .product-table thead { display: none; }
  .product-table tr { display: grid; grid-template-columns: 56px 1fr auto; gap: 2px 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .product-table td { border: 0; padding: 0; }
  .product-table td.thumb-cell { grid-row: span 6; }
  .product-table td.acts-cell { grid-column: 3; grid-row: 1 / span 2; }
  .product-table td[data-label]::before { content: attr(data-label) '：'; color: var(--muted); }
  .vendor-table thead { display: none; }
  .vendor-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .vendor-table td { display: flex; gap: 8px; border: 0; padding: 2px 4px; }
  .vendor-table td::before { content: attr(data-label); color: var(--muted); min-width: 56px; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 16px; }
}

/* 商品編輯頁：供應商輸入框（components/product/vendor-picker.js） */
.vendor-pick { position: relative; display: flex; }
.vendor-pick input { flex: 1; padding-right: 44px; }
.vendor-pick .vp-clear { position: absolute; right: 0; top: 0; bottom: 0; width: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; }
.vendor-pick .vp-clear:hover { color: var(--accent); }
.vp-menu { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow-y: auto; padding: 4px 0; }
.vp-item { padding: 0 14px; min-height: 40px; display: flex; align-items: center; cursor: pointer; }
.vp-item.on, .vp-item:hover { background: var(--accent-soft); }
.vp-item.add { color: var(--accent-dark); font-weight: 500; border-top: 1px solid var(--line); }
.vp-item.empty { color: var(--muted); cursor: default; }
.vp-item.empty:hover { background: none; }
@media (max-width: 860px) {
  .sec-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
}
/* 商品編輯頁：區塊收合（點標題收合／打開） */
.prod-sec > h2.sec-toggle { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 12px; user-select: none; }
.prod-sec > h2.sec-toggle::after { content: '▾'; color: var(--muted); font-size: 16px; transition: transform .15s; }
.prod-sec.closed > h2.sec-toggle { margin-bottom: -4px; }
.prod-sec.closed > h2.sec-toggle::after { transform: rotate(-90deg); }
.prod-sec.closed > .sec-body { display: none; }
.lang-pane.error textarea, .lang-pane.error .rich { outline: 2px solid var(--danger); border-radius: 8px; }
/* 是／否開關（components/yes-no-switch.js） */
.yn-field { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.yn-label { font-weight: 500; }
.yn-switch { position: relative; display: inline-flex; width: 92px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #EFEFED; cursor: pointer; overflow: hidden; font: inherit; }
.yn-switch::after { content: '|||'; position: absolute; top: 3px; bottom: 3px; left: 3px; width: 42px; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); color: #B9B9B6; font-size: 11px; letter-spacing: -1px; display: flex; align-items: center; justify-content: center; transition: left .15s; }
.yn-switch.on { background: var(--accent); border-color: var(--accent); }
.yn-switch.on::after { left: 45px; }
.yn-switch span { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.yn-switch .yn-yes { color: #fff; visibility: hidden; }
.yn-switch .yn-no { color: var(--muted); }
.yn-switch.on .yn-yes { visibility: visible; }
.yn-switch.on .yn-no { visibility: hidden; }
.yn-switch:disabled { opacity: .5; cursor: default; }
/* 異動紀錄（商品編輯頁） */
.history-list { max-height: 65vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.history-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.history-item .meta { color: var(--muted); font-size: 13px; }
.history-item table { margin-top: 6px; font-size: 14px; }
.history-item td { padding: 4px 8px 4px 0; vertical-align: top; }
.history-item td.f { font-weight: 500; white-space: nowrap; }
.history-item td.b { color: var(--accent-dark); }
@media (max-width: 860px) {
  .page-actions:has(> :nth-child(3)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-actions .yn-field { justify-content: center; }
}
/* 商品編輯頁：編輯區塊順序 */
.sec-nav.editing { flex-wrap: wrap; overflow-x: visible; padding: 8px; margin-left: -8px; margin-right: -8px; border: 2px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.sec-nav.editing a { cursor: default; padding-left: 4px; gap: 2px; }
.sec-nav.editing a .drag-handle { cursor: grab; min-height: 32px; width: 26px; }
.sec-nav a.is-dragging { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.sec-nav .sec-reset { align-self: center; }
.btn.on { border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
@media (max-width: 860px) {
  .page-actions:has(> :nth-child(3)) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* ===== 商品編輯頁：照 SHOPLINE 分頁（2026/11/20）===== */
.head-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.tab-panel { display: block; }
.blk { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.blk-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.blk-head h3 { margin: 0; font-size: 16px; }
.blk-head .help { margin: 0; }
.blk.closed .blk-head { border-bottom: 0; }
.blk.closed .blk-body { display: none; }
.blk-body { padding: 16px 20px; }
.blk-caret { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); min-width: 44px; min-height: 36px; }
.tab-intro { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 16px; }
.tab-intro h3 { margin: 0 0 6px; font-size: 16px; color: var(--accent-dark); }
.tab-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.q-inline { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: 12px; cursor: help; vertical-align: middle; }
.switch-row-wrap { border-bottom: 1px solid var(--line); padding: 14px 0; }
.switch-row-wrap:last-child { border-bottom: 0; }
.switch-row { display: flex; align-items: center; gap: 16px; }
.sr-text { flex: 1; min-width: 0; }
.sr-label { font-weight: 500; }
.sr-label .help { display: inline; }
.sr-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.sr-desc ul { margin: 4px 0 0; padding-left: 18px; }
.sr-kids { margin-top: 12px; }
.sr-always { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.money { display: flex; align-items: stretch; }
.money > span { display: inline-flex; align-items: center; padding: 0 10px; background: #F5F5F4; border: 1px solid var(--line); color: var(--muted); font-size: 13px; white-space: nowrap; }
.money > span:first-child { border-right: 0; border-radius: 8px 0 0 8px; }
.money > span:last-child:not(:first-child) { border-left: 0; border-radius: 0 8px 8px 0; }
.money > input { flex: 1; min-width: 0; border-radius: 0 8px 8px 0; }
.money > input:first-child { border-radius: 8px 0 0 8px; }
.money > button { margin-left: 10px; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 12px; }
.remain { float: right; color: var(--muted); font-size: 13px; }
.remain-row { text-align: right; min-height: 20px; }
.radio-cards { display: flex; flex-direction: column; gap: 10px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; }
.radio-card input { margin-top: 3px; }
.rel-custom { margin-top: 10px; }
.sub-title { font-weight: 500; margin: 0 0 8px; }
.sub-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 12px; }
.sub-row .muted { flex: 1; font-size: 13px; }
.seo-preview { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #FAFAF9; }
.seo-preview .sp-title { color: #1a0dab; font-size: 17px; }
.seo-preview .sp-url { color: #006621; font-size: 13px; }
.seo-preview .sp-desc { color: #545454; font-size: 13px; }
.lang-tab-row.big .lang-tab { font-size: 16px; min-height: 48px; }
/* 商品規格分頁 */
.var-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.var-block h4 { margin: 0 0 6px; }
.dim-row { border: 0; background: none; padding: 0; margin: 10px 0; }
.dim-line { display: flex; gap: 12px; align-items: flex-start; }
.dim-left { width: 180px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.dim-mid { flex: 1; min-width: 0; }
.dim-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.dim-del { min-width: 44px; }
.add-link { display: inline-block; margin-top: 6px; }
.add-single { width: 100%; margin-top: 12px; min-height: 64px; border: 2px dashed var(--line); border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--text); }
.add-single:hover { border-color: var(--accent); color: var(--accent); }
.var-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; background: var(--accent-soft); border-radius: 8px; margin: 8px 0; }
.var-picked { font-weight: 700; }
.var-menu-wrap { position: relative; }
.var-menu { position: absolute; z-index: 20; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px 0; min-width: 180px; }
.var-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; cursor: pointer; font: inherit; }
.var-menu button:hover { background: var(--accent-soft); }
/* 頁尾那一列 */
.prod-bottom { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; }
.prod-bottom .pb-hint { flex: 1; min-width: 200px; }
.stock-log td { vertical-align: top; }
@media (max-width: 860px) {
  .price-grid { grid-template-columns: 1fr; }
  .dim-line { flex-wrap: wrap; }
  .dim-left { width: 100%; }
  .blk-head, .blk-body { padding-left: 14px; padding-right: 14px; }
  .head-hint { display: none; }
}
.variant-table input[type=checkbox] { min-width: 0; width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); }
.variant-table td.muted { white-space: nowrap; }
/* 並排的欄位（2026/11/20 使用者要求，全站）：電腦同一排、上緣對齊、輸入框同高；手機上下排 */
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.field-row > .field { min-width: 0; }
.field-row[hidden] { display: none; }
@media (max-width: 860px) { .field-row { grid-template-columns: 1fr; } }
/* 開關打開後沒有要顯示的設定時，空區塊不佔位，文字不會上下移（2026/11/20） */
.sr-kids:empty { display: none !important; }
/* 後台已更新提示（app.js） */
.new-ver { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; align-items: center; gap: 10px; background: #1C1C1B; color: #fff; padding: 10px 12px 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 14px; }
.yn-field.locked .yn-switch { opacity: .45; cursor: not-allowed; pointer-events: none; }
.yn-field.locked { cursor: not-allowed; }
.share-info { font-size: 13px; display: inline-flex; align-items: center; flex-wrap: wrap; }

/* 商品描述「放大／縮小」：放大＝彈出視窗佔畫面 80%（2026/11/20）；z-index 35：蓋過左側選單（30），但在圖片庫、連結等對話框（40）和提示（50）下面 */
.rich .ql-toolbar .rich-zoom-wrap { float: right; margin-right: 0; }
.rich .ql-toolbar .rich-zoom-btn { width: auto; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.rich .ql-toolbar .rich-zoom-btn:hover { border-color: var(--accent); color: var(--accent); }
.rich-zoom-bg { position: fixed; inset: 0; z-index: 35; background: rgba(28, 28, 27, .45); display: flex; align-items: center; justify-content: center; }
.rich-zoom { height: 80vh; max-width: 100%; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; box-sizing: border-box; }
.rich.zoomed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rich.zoomed .ql-toolbar { flex: none; }
.rich.zoomed .rich-quill.ql-container { flex: 1; min-height: 0; overflow: auto; }
.rich.zoomed .ql-editor { min-height: 100%; }
.rich.zoomed .rich-html { flex: 1; min-height: 0; resize: none; }
.rich.zoomed .rich-hint:empty { display: none; }
body.no-scroll { overflow: hidden; }

/* 樣衣：勾選＋樣衣件數小格子（2026/11/20 使用者選 A：樣衣件數和可預購數量分開） */
.sample-cell { white-space: nowrap; }
.sample-qty-wrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
input.sample-qty { width: 64px !important; min-width: 64px; }

/* 圖片庫：照 SHOPLINE 一列一張小縮圖（2026/11/20 使用者要求）；--thumb＝縮圖大小 */
.media-list { --thumb: 96px; display: flex; flex-direction: column; }
.media-list .media-head, .media-list .media-item { display: grid; grid-template-columns: 64px var(--thumb) minmax(0, 1fr) 170px 270px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.media-list .media-head { padding: 8px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.media-list .media-item { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; background: none; overflow: visible; flex-direction: row; }
.media-list .m-thumb { display: block; width: var(--thumb); height: var(--thumb); aspect-ratio: auto; border-radius: 6px; overflow: hidden; background: var(--bg); }
.media-list .m-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-list .m-info { min-width: 0; }
.media-list .m-name, .media-list .m-meta, .media-list .m-use { padding: 0; height: auto; margin: 0; -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; font-size: 13px; line-height: 1.6; }
.media-list .m-name { font-size: 15px; color: var(--text); }
.media-list .m-time { font-size: 14px; white-space: nowrap; }
.media-list .card-btns { display: flex; gap: 10px; flex-wrap: nowrap; padding: 0; margin: 0; justify-content: flex-end; }
.media-list .card-btns > * { min-width: 84px !important; justify-content: center; text-align: center; } /* 同一組按鈕同寬 */
@media (max-width: 820px) {
  .media-list { --thumb: 72px; }
  .media-list .media-head { display: none; }
  .media-list .media-item { grid-template-columns: 40px var(--thumb) minmax(0, 1fr); gap: 6px 12px; }
  .media-list .m-pick { grid-row: span 3; flex-direction: column; }
  .media-list .m-thumb { grid-row: span 3; }
  .media-list .m-time, .media-list .card-btns { grid-column: 3; }
  .media-list .m-time { font-size: 13px; color: var(--muted); }
  .media-list .card-btns { flex-wrap: wrap; }
}

/* 圖片庫：拖曳把手＋勾選框、上方全選／刪除選取（2026/11/20） */
.media-list .m-pick { display: flex; align-items: center; gap: 8px; }
.media-list .m-pick input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.media-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.media-list.is-sorting .media-item { background: #fff; }

/* 選圖片欄位：每張右上角勾選框、上方全選／刪除選取（2026/11/20） */
.picker-img .picker-chk { position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.picker-bar { display: flex; gap: 10px; align-items: center; margin-left: auto; margin-right: 10px; }
.picker-bar:empty { display: none; }

/* 點圖片看大圖：原視窗彈出（components/lightbox.js；2026/11/20）；z-index 60：蓋過對話框（40）和提示（50） */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 20, 19, .82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 8px; background: #fff; cursor: default; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.lightbox-cap { color: #fff; font-size: 14px; text-align: center; max-width: 90vw; word-break: break-all; }
.lightbox-x { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--text); font-size: 20px; cursor: pointer; }
.media-list button.m-thumb { padding: 0; border: 0; cursor: zoom-in; }

/* 「系統會自動翻譯成當地國家語言」提示（2026/11/20 英文欄位拿掉後放在原本英文的位置） */
.auto-trans { font-size: 13px; color: var(--muted); background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }

/* 第三方服務 → API 金鑰（2026/11/20） */
.badge.bad { color: var(--danger); border-color: #F0C9C9; background: #FBEEEE; }
.notice.warn { border-color: #E7CFCE; background: #FFFBFA; }
.notice.warn h2 { color: var(--accent-dark); }
ol.steps { padding-left: 20px; margin: 8px 0; line-height: 1.8; }
.api-card .api-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-card .api-head h2 { margin: 0; }
.api-card.off { opacity: .7; }
.api-card .api-body { margin-top: 10px; }
.api-card .api-body[hidden] { display: none; }
.api-card .api-head .api-fold { min-width: 64px; }
.api-steps { margin: 8px 0 12px; }
.api-current { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.api-current code { font-size: 14px; letter-spacing: 1px; }
.api-input { display: flex; align-items: center; gap: 10px; }
.api-input input { flex: 1; min-width: 0; }
.api-test { margin-top: 10px; font-size: 13px; }
.btn.danger-outline { color: var(--danger); border-color: #F0C9C9; }

/* 自動翻譯勾選（2026/11/20）：欄位標題後面的小方框、區塊最上方「全部自動翻譯」 */
.trans-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; margin-left: 12px; vertical-align: middle; cursor: pointer; white-space: nowrap; }
.trans-check input, .trans-master input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.trans-cost { font-size: 12px; color: var(--muted); white-space: normal; }
.trans-master { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; margin: 8px 0; }
.trans-warn { font-size: 13px; color: var(--accent-dark); margin: 4px 0 8px; }
.trans-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
@media (max-width: 820px) { .trans-check { margin-left: 0; white-space: normal; } .blk-head h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } }

/* 頁首的「全部自動翻譯」（2026/11/20：放固定頁首，切換分頁都看得到） */
.trans-head { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trans-head .trans-master { margin: 0; padding: 6px 12px; }
.trans-warn { font-size: 13px; color: var(--accent-dark); white-space: nowrap; }
.head-sub { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 6px; }
.head-sub .head-hint { margin-top: 0; }
@media (max-width: 820px) { .head-sub { margin: 6px 0; } .trans-head .trans-cost { display: none; } }

/* 從圖片庫選取視窗：右上「＋ 上傳圖片」、可把照片拖進來（2026/11/20） */
.lib-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.lib-head h3 { margin: 0; }
.lib-box.over { outline: 2px dashed var(--accent); outline-offset: -6px; }

/* 從 SHOPLINE 搬家：進度條（2026/11/21） */
.import-bar { height: 10px; border-radius: 999px; background: #EFEDEB; overflow: hidden; margin: 8px 0 12px; }
.import-bar-in { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.import-old { opacity: .85; }

/* 商品列表（照 SHOPLINE；2026/11/21） */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head .field.inline-title { margin: 0; }
.card-title { font-size: 17px; font-weight: 700; color: var(--text); }
.search-group { display: flex; gap: 0; align-items: stretch; min-width: 260px; flex: 1; }
.search-with-tip { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 260px; } /* 搜尋框＋說明「?」（2026/11/23） */
.search-with-tip .search-group { min-width: 0; }
.search-group select { width: auto; border-radius: 8px 0 0 8px; border-right: 0; }
.search-group input { border-radius: 0; min-width: 120px; }
.search-group .btn { border-radius: 0 8px 8px 0; border-left: 0; }
/* 搜尋框點下去不顯示顏色框，只有游標閃爍（2026/11/22 使用者要求，全站搜尋框一樣） */
.search-group input:focus, .search-group select:focus { outline: none; border-color: var(--line); box-shadow: none; }
.drop-btn { white-space: nowrap; }
.list-count { margin: 4px 0 0; font-weight: 500; }
.sel-bar { min-height: 0; font-size: 14px; color: var(--accent-dark); }
.sel-bar:not(:empty) { padding: 8px 0; }
.link-btn { border: 0; background: none; color: var(--accent); padding: 0 4px; min-height: 0; }
.product-table td.chk-cell, .product-table th.chk-cell { width: 32px; }
.product-table tr.picked td { background: var(--accent-soft); }
.name-cell { min-width: 160px; }
.code-link { font-weight: 600; font-size: 13px; }
.status-icons { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.st-ico { cursor: default; font-size: 15px; }
.status-icons .badge { white-space: nowrap; }
.list-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.list-acts .btn { white-space: nowrap; }
.split-btn { display: inline-flex; }
.split-btn > .btn:first-child { border-radius: 8px 0 0 8px; }
.split-btn > .split-caret { border-radius: 0 8px 8px 0; border-left: 0; padding: 0 8px; min-width: 0; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.pager .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }
.pick-list { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.pick-sub { padding-left: 22px; }
@media (max-width: 820px) {
  .list-acts { flex-wrap: wrap; justify-content: flex-start; }
  .product-table tr { grid-template-columns: 28px 56px minmax(0, 1fr); }
  .product-table td.chk-cell { grid-column: 1; grid-row: 1 / span 8; }
  .product-table td.thumb-cell { grid-column: 2; grid-row: 1 / span 8; }
  .product-table td:not(.chk-cell):not(.thumb-cell) { grid-column: 3; }
  .product-table td.acts-cell { grid-column: 1 / -1; grid-row: auto; margin-top: 6px; }
  .search-group { min-width: 0; }
}

/* 商品批量修改：被擋下的商品（2026/11/21） */
.bad-text { color: var(--danger); }
.bulk-blocked p.bad-text { font-weight: 500; }
.product-table tr.row-blocked td { background: #FBECEC; }
.product-table tr.row-blocked td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.bulk-modes { display: flex; flex-wrap: wrap; gap: 0 4px; }
.bulk-box .field-row .field { margin-bottom: 8px; }
.bulk-box > .help.keep:first-of-type { margin-bottom: 14px; }

/* 分欄的選單（商品列表「大量上下架/變更」，2026/11/21 使用者反應：項目太多，下面的看不到） */
.row-menu.row-menu-cols { flex-direction: row; align-items: flex-start; gap: 4px; max-width: calc(100vw - 16px); }
.row-menu-col { display: flex; flex-direction: column; min-width: 180px; }
.row-menu-col + .row-menu-col { border-left: 1px solid var(--line); padding-left: 4px; }
.row-menu-col > .row-menu-sec:first-child { border-top: 0; margin-top: 0; }
@media (max-width: 720px) { .row-menu.row-menu-cols { flex-direction: column; } .row-menu-col + .row-menu-col { border-left: 0; padding-left: 0; } .row-menu-col > .row-menu-sec:first-child { border-top: 1px solid var(--line); margin-top: 4px; } .row-menu-col:first-child > .row-menu-sec:first-child { border-top: 0; margin-top: 0; } }

/* 頁首分頁按鈕（供應商：廠商｜商品來源，2026/11/21） */
.page-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.page-tabs .btn { min-width: 110px; }
/* 商品來源 */
.src-list { display: flex; flex-direction: column; gap: 8px; }
.src-row { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) 210px; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.src-row.off { background: var(--bg); color: var(--muted); }
.src-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.src-row .src-eta { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.src-row .src-eta input { width: 80px; flex: none; }
.src-row .src-name { min-width: 0; }
.src-row .src-name input { max-width: 320px; }
.src-row .src-use { font-size: 13px; color: var(--muted); margin-top: 2px; }
.src-add { display: flex; gap: 10px; margin-top: 12px; }
.src-add input { max-width: 260px; }
@media (max-width: 720px) { .src-row { grid-template-columns: 24px 28px 1fr; } .src-row .src-eta { grid-column: 3; } }
.help.bad { color: var(--danger); }

/* Excel 大量建立／更新商品（2026/11/21） */
.import-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.file-pick { display: flex; flex-direction: column; gap: 4px; }
.import-result { margin-top: 12px; }
.excel-update .steps a { margin-left: 6px; }

/* 贈品、加購品、組合商品列表（2026/11/21 item-list.js） */
.item-intro { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.item-intro .count-line { font-weight: 600; white-space: nowrap; }
.item-intro p { margin: 0; flex: 1; min-width: 220px; }
.card > .api-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card > .api-head h2 { margin: 0; }
.item-table th.chk-cell, .item-table td.chk-cell { width: 32px; }
.item-table td.price-cell { white-space: nowrap; }
.item-table .del-price { text-decoration: line-through; color: var(--muted); font-size: 13px; display: block; }
@media (max-width: 820px) {
  .item-table thead { display: none; }
  .item-table tr { display: grid; grid-template-columns: 32px 56px 1fr; gap: 2px 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .item-table td { border: 0; padding: 0; }
  .item-table td.chk-cell { grid-row: 1 / span 6; }
  .item-table td.thumb-cell { grid-row: 1 / span 6; }
  .item-table td:not(.chk-cell):not(.thumb-cell):not(.acts-cell)::before { content: attr(data-label) '：'; color: var(--muted); font-size: 13px; }
  .item-table td.acts-cell { grid-column: 3; }
}
/* 「選取商品」視窗（product-picker.js） */
.picker-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.picker-table { width: 100%; }
.picker-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.picker-table tr.muted { opacity: .55; }
/* 主商品、子商品清單（加購品、組合商品編輯頁） */
.pick-table td { vertical-align: middle; }
.pick-table input[type=number] { max-width: 140px; }
/* 組合商品（sets.js、set-edit.js） */
.set-toggles { display: flex; gap: 10px; flex-wrap: wrap; }
.set-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.set-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-item-name { flex: 1; min-width: 160px; }
.set-qty { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.set-qty select { width: auto; min-width: 64px; }
.set-vars { margin-top: 8px; font-size: 13px; }
.set-vars th, .set-vars td { padding: 4px 8px; white-space: nowrap; }
.price-types { display: flex; gap: 10px 24px; flex-wrap: wrap; }
.price-types label.check { margin: 0; }
.set-sale { margin: 4px 0 12px; }
/* 刪除確認視窗（delete-confirm.js） */
.del-warn { background: #FDF3F2; border: 1px solid #F0D2CF; border-radius: 8px; padding: 10px 14px; margin: 10px 0; max-height: 45vh; overflow-y: auto; font-size: 14px; }
.del-warn ul { margin: 0; padding-left: 20px; }
.del-warn ul ul { margin: 2px 0 6px; color: var(--danger); }
.del-confirm label.check { margin-top: 10px; }
/* 列表照 SHOPLINE（item-list.js，2026/11/21） */
.count-top { margin: 0 0 12px; font-size: 15px; }
.card.item-intro p { margin: 0; color: var(--muted); }
.item-title { color: var(--accent-dark); font-size: 18px; }
.item-table th.bulk-th { text-align: right; white-space: nowrap; }
.card.item-top .switch-row-wrap { border-bottom: 0; padding: 0; }
.sel-bulk-m { display: none; margin-left: 10px; }
@media (max-width: 820px) { .sel-bulk-m { display: inline-flex; } }
.import-errs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.import-errs h3 { margin: 0 0 6px; font-size: 16px; color: var(--danger); }
/* 搬家工具：匯入紀錄（import-records.js）、從哪裡匯入（import-tool.js） */
.rec { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--card); }
.rec-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; flex-wrap: wrap; }
.rec-warn { color: #D99A00; font-size: 18px; width: 20px; text-align: center; }
.rec-title { flex: 1; min-width: 200px; font-weight: 600; }
.rec-time { font-size: 13px; }
.rec-caret { color: var(--muted); }
.rec-body { padding: 0 14px 12px; border-top: 1px solid var(--line); }
.src-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.src-pick select { width: auto; min-width: 240px; }
.method { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.method h3 { margin: 0 0 6px; font-size: 16px; }
.csv-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 10px; }
.csv-pick { position: relative; overflow: hidden; }
.csv-pick.disabled { opacity: .5; pointer-events: none; }
.method .can { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.method .can span { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.method .can span.yes { border-color: #CBE5D5; background: #EEF7F1; color: var(--ok); }
.method .can span.later { color: var(--muted); }
.kind-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; }

/* 主檔合併（2026/11/21） */
.chip .chip-check { width: 16px; height: 16px; margin: 0 2px 0 0; }
.merge-modal { max-width: 560px; }
.merge-body { max-height: 60vh; overflow: auto; }
.merge-choices { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.merge-choices input[type=text] { width: auto; flex: 1; min-width: 160px; }
.merge-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.merge-names { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1; }
.kind-checks { align-items: flex-start; }
.kind-item { display: flex; flex-direction: column; gap: 2px; }
.kind-item .kind-last { font-size: 12px; padding-left: 26px; }
/* 贈品、加購品、組合商品列表：搜尋（左半）＋排序（右半）、數量、說明（整排），一起固定在頁首（2026/11/22 使用者要求） */
.sticky-head > .count-top { margin: 8px 0 0; }
.sticky-head > .item-intro { margin: 8px 0 0; padding: 12px 16px; }
.sticky-head > .item-top { margin: 8px 0 0; }
.item-search { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; align-items: center; }
.item-search-row { display: flex; gap: 10px; }
.item-search-row input { flex: 1; min-width: 0; }
.item-search-row .btn { white-space: nowrap; }
.item-sort-row { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: normal; }
.item-sort-row .muted { white-space: nowrap; }
.item-sort-row select { flex: 1; }
@media (max-width: 820px) {
  .item-search { grid-template-columns: 1fr; gap: 8px; margin-top: 6px; }
  .sticky-head > .item-intro { padding: 8px 12px; }
  .sticky-head > .item-intro p { font-size: 13px; }
}
/* 訂單列表、訂單內頁（2026/11/22 照 SHOPLINE） */
.st-badge { display: inline-block; font-size: 12px; line-height: 22px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; white-space: nowrap; }
.st-badge.st-warn { background: #F3A64A; border-color: #F3A64A; color: #fff; }
.st-badge.st-ok { background: #5DAA68; border-color: #5DAA68; color: #fff; }
.st-badge.st-off { background: #EDEDEB; color: var(--muted); }
.st-badge.st-bad { background: #FBEEEE; border-color: #F0C9C9; color: var(--danger); }
.st-badge.st-remind { background: #EEF2F7; border-color: #C9D3E0; color: #3E5470; } /* 未到貨提醒追加（2026/11/23） */
.retrack-state { font-size: 13px; margin-top: 4px; } .retrack-state.open { color: #C77A1E; font-weight: 600; } .retrack-state.done { color: #5DAA68; font-weight: 600; } /* 自行處理的補追狀態（2026/11/23） */
.retrack-at { margin-top: 2px; white-space: nowrap; } /* 已補追的時間（2026/11/24） */
.retrack-state.has-tip { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.new-sample-banner { border-left: 4px solid #F3A64A; margin-bottom: 12px; } /* 商品頁：新品建檔的樣衣還沒對上款式（2026/11/23） */
.new-sample-rows input { width: 100%; }
.remind-note { font-size: 12px; color: #3E5470; margin-top: 2px; }
.order-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.order-toolbar .order-logistic { width: auto; min-width: 200px; }
.order-tabs { margin: 0; }
.order-tabbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.order-tabbar .order-toolbar { margin-top: 0; }
.order-search { margin-top: 10px; align-items: center; }
.order-size-row { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: normal; }
.order-size-row select { width: auto; }
.order-filter-panel { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 50vh; overflow: auto; }
.of-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.of-row + .of-row { margin-top: 10px; }
.of-row input, .of-row select { width: auto; min-width: 150px; }
.of-label { font-weight: 500; min-width: 96px; }
.of-value { display: contents; }
.of-chips:not(:empty) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.order-table td.chk-cell, .order-table th.chk-cell { width: 32px; }
.order-table tr.picked td { background: var(--accent-soft); }
.order-table td.money-cell { white-space: nowrap; }
.order-table td.no-cell { white-space: nowrap; }
.order-archived { font-size: 13px; margin: 12px 0 0; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.order-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.order-col > .card { margin: 0; }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.order-card-title { margin: 0; font-size: 17px; color: var(--accent-dark); }
.order-card-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.order-card-acts .status-select { width: auto; min-height: 36px; padding: 4px 10px; }
.kv { padding: 6px 0; }
.kv-label { font-weight: 600; font-size: 14px; }
.kv-value { margin-top: 2px; word-break: break-word; }
.pre-line { white-space: pre-line; }
.order-sub-acts { margin-top: 8px; }
.order-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item .thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.order-item-name { font-weight: 600; margin: 2px 0; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.sum-row.sum-total { font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.sum-row.sum-sub { padding-left: 14px; color: var(--muted); }
.order-tag-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.order-card-body > input { margin-top: 8px; }
.msg-tabs .btn { min-width: 0; }
.msg-send { justify-content: flex-end; }
.msg-list { list-style: none; padding: 0; margin: 12px 0 0; }
.msg-list li { border-top: 1px solid var(--line); padding: 8px 0; }
.msg-meta { display: flex; gap: 10px; align-items: center; }
.msg-text { white-space: pre-line; margin-top: 4px; }
.act-list { list-style: none; padding: 0; margin: 0; }
.act-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.act-list li:last-child { border-bottom: 0; }
@media (max-width: 820px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-toolbar .order-logistic { min-width: 0; flex: 1; }
  .order-table thead { display: none; }
  .order-table tr { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 8px; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .order-table td { border: 0; padding: 0; }
  .order-table td.chk-cell { grid-row: 1 / span 7; }
  .order-table td:not(.chk-cell) { grid-column: 2; }
  .order-table td[data-label]:not(.no-cell)::before { content: attr(data-label) '：'; color: var(--muted); font-size: 13px; }
  .of-row input, .of-row select { min-width: 0; flex: 1 1 140px; }
  /* 手機頁首精簡（全站規則）：物流別＋兩顆按鈕一列平均分；分頁一列左右滑；搜尋框整排、下面「顯示」＋「更多篩選設定」 */
  .order-tabbar { display: flex; flex-direction: column-reverse; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin-top: 8px; }
  .order-tabbar > * { min-width: 0; }
  .order-toolbar, .order-tabbar .order-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
  .order-toolbar > * { min-width: 0; }
  .order-toolbar .btn { padding-left: 6px; padding-right: 6px; }
  .order-tabs { flex-wrap: nowrap; overflow-x: auto; margin-top: 0; padding-bottom: 2px; }
  .order-tabs .btn { min-width: 0; flex: 1 0 auto; padding: 0 12px; }
  .head-filters.order-search { flex-wrap: wrap; overflow: visible; margin-top: 8px; gap: 8px; }
  .order-search > .search-group { flex: 1 1 100%; min-width: 0; }
  .order-search .search-group select { max-width: 42%; }
  .order-search .search-group input { width: auto; flex: 1; min-width: 0; }
  .order-search > .order-size-row, .order-search > .btn { flex: 1 1 0; }
  .order-search .order-size-row select { flex: 1; }
}
/* 訂單列表「可出貨」分頁：有訂單可出貨時橘底白字＋筆數（2026/11/22 使用者選擇） */
.btn.tab-attn { background: #F3A64A; border-color: #F3A64A; color: #fff; font-weight: 700; }
.ready-wip h3 { margin: 0 0 6px; }

/* ---- 追加表、追加單（第 4 塊 4-1，2026/11/22） ---- */
/* 2026/11/22 使用者調整：條件一排在左邊（不換行）、🔍 搜尋在右邊同一排，上下對齊；放不下時搜尋才換到下一排 */
.restock-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; overflow: visible; }
.restock-conds { display: flex; gap: 10px; flex-wrap: nowrap; align-items: center; flex: none; }
.restock-conds select { width: auto; }
.restock-filters > .search-group { flex: 1 1 200px; min-width: 0; }
.restock-conds .date-range input { width: 140px; }
.restock-conds select { min-width: 0; }
.date-range { display: flex; gap: 6px; align-items: center; }
.date-range input { width: 148px; }
.restock-notes { display: grid; gap: 8px; margin-top: 10px; }
.restock-notes:empty { display: none; }
.restock-stock { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; border: 1px solid #E7CFCE; background: var(--accent-soft); border-radius: 12px; color: var(--accent-dark); }
.restock-stock .btn { white-space: nowrap; }
.restock-table td.num-cell, .restock-table th:nth-child(6) { white-space: nowrap; }
.restock-table tr.retrack td { background: #FFF6F0; }
.restock-table td.restock-orders { font-size: 13px; color: var(--muted); max-width: 320px; }
.restock-table input[type=text], .restock-table select { min-width: 110px; }
.restock-preview-list { max-height: 50vh; overflow: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; }
.restock-preview-list table { margin: 0; }
.empty-tip { text-align: center; padding: 28px 12px; }
.empty-tip h3 { margin: 0 0 6px; }
.restock-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.restock-card { display: grid; grid-template-rows: auto auto auto auto; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; min-height: 116px; }
.restock-card:hover { border-color: var(--accent); }
.restock-card.draft { border-style: dashed; }
.rc-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-no { font-size: 16px; }
.rc-meta, .rc-eta { font-size: 13px; }
.rc-nums { font-size: 14px; }
.restock-drafts h3 { margin: 0 0 10px; }
.restock-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.danger-text { color: var(--danger); }
@media (max-width: 820px) {
  .restock-filters { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .restock-filters > .search-group { flex: none; width: 100%; }
  .restock-conds { flex: none; width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .restock-conds > * { flex: none; }
  .date-range input { width: 140px; }
  .restock-table.no-chk tr { grid-template-columns: minmax(0, 1fr); }
  .restock-table.no-chk td:not(.chk-cell) { grid-column: 1; }
  .restock-table td.restock-orders { max-width: none; }
}

/* 訂單列表欄寬（2026/11/22 使用者要求，參考 SHOPLINE）：三個狀態欄一樣寬、間距平均，標籤加寬；訂購人往右、用剩下的空間 */
@media (min-width: 821px) {
  .order-list-table { table-layout: fixed; width: 100%; }
  /* 訂單號碼、日期長度固定 → 給固定寬度，剩下的全部給訂購人（名字＋Email 長短不一定）；一筆訂單一律一排，太長用「…」（滑鼠移上去看完整） */
  /* 2026/11/22 使用者調整：左邊幾欄照比例等距拉開（不要擠在一起），訂購人大約從表格 58% 的地方開始，合計靠右 */
  .order-list-table th:nth-child(2) { width: 162px; }
  .order-list-table th:nth-child(3) { width: 158px; }
  .order-list-table th:nth-child(4), .order-list-table th:nth-child(5), .order-list-table th:nth-child(6) { width: 100px; }
  .order-list-table th:nth-child(8) { width: 9.5%; }
  .order-list-table td:nth-child(4), .order-list-table td:nth-child(5), .order-list-table td:nth-child(6) { overflow: visible; }
  .order-list-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.order-list-table .st-badge { min-width: 80px; text-align: center; }
/* 訂單列表頁首（2026/11/22 使用者要求）：分頁和「物流別／更新追蹤編號／更多動作」同一排，15 吋筆電（1280 寬）也放得下 */
@media (min-width: 821px) {
  .order-tabbar .order-tabs .btn { min-width: 98px; padding-left: 10px; padding-right: 10px; }
  .order-tabbar .order-toolbar .order-logistic { width: 170px; min-width: 0; }
  .order-tabbar .order-toolbar .btn { padding-left: 12px; padding-right: 12px; }
}
.restock-preview th.tick-all { width: 76px; white-space: nowrap; }
.restock-preview th.tick-all .check { font-weight: inherit; }
@media (max-width: 820px) { .restock-preview thead { display: block; } .restock-preview thead th:not(.tick-all) { display: none; } .restock-preview th.tick-all { width: auto; border: 0; padding: 8px 0; } }

/* 追加單卡片：展開／收合（2026/11/22）；展開的那張佔一整排 */
.restock-card { display: block; min-height: 0; }
.restock-card.open { grid-column: 1 / -1; }
.rc-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.rc-main { display: grid; gap: 4px; min-width: 0; min-height: 92px; }
.rc-fold { min-width: 64px; flex: none; }
.rc-body { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }

/* 追加單分頁：分頁按鈕後面接來源按鈕（2026/11/22） */
.restock-tabrow { display: flex; gap: 10px 24px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.restock-tabrow .page-tabs { margin: 0; }
.restock-src:empty { display: none; }
@media (max-width: 820px) { .restock-tabrow { flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding-bottom: 2px; } .restock-tabrow .page-tabs { flex-wrap: nowrap; flex: none; } }

/* 訂單列表：螢幕夠寬（1500 以上）時左邊幾欄照比例等距拉開，訂購人大約從 58% 開始；比較窄的螢幕用上面的固定寬度，先保住訂單號碼和日期 */
@media (min-width: 1500px) {
  .order-list-table th:nth-child(2) { width: 16%; }
  .order-list-table th:nth-child(3) { width: 14.5%; }
  .order-list-table th:nth-child(4), .order-list-table th:nth-child(5), .order-list-table th:nth-child(6) { width: 9.5%; }
}

/* 入庫（第 4 塊 4-2） */
.recv-other { display: flex; gap: 6px; margin-top: 6px; }
.recv-other input { width: 96px; }
.recv-wrong { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 13px; margin-top: 4px; color: var(--muted); } /* 「收到別的款式」一排顯示不斷行（2026/11/22 使用者要求） */
.receive-batch td:nth-child(2) { min-width: 130px; }
.receive-rows select, .receive-batch select { min-width: 96px; }
.receive-rows input[type=text], .receive-batch input[type=text] { margin-top: 6px; }
.receive-log tr.cancelled td { opacity: .55; }
@media (max-width: 820px) { .recv-other { flex-wrap: wrap; } }

/* 可出貨（第 4 塊 4-3）：左側選單筆數（橘底白字）、先寄 B 批標示 */
.tag-count { margin-left: auto; font-size: 12px; line-height: 18px; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 9px; background: #F3A64A; color: #fff; font-weight: 600; }
.early-b { margin-left: 6px; }
.order-proc { margin-top: 4px; font-size: 13px; }
/* 入庫單（一天一張；2026/11/22） */
.receive-sheet { margin-top: 12px; }
.rs-head { display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.rs-no { margin: 0; font-size: 18px; }
.rs-meta { color: var(--text); }
.defect-results { display: flex; gap: 10px 18px; flex-wrap: wrap; }
.receive-log td:nth-child(1) { min-width: 170px; white-space: nowrap; }
.receive-log td:nth-child(3), .receive-log td:nth-child(4) { white-space: nowrap; }

/* 瑕疵退回（2026/11/22）：寄出超過提醒天數的那一列淡紅底；來源分頁＋狀態分頁同一排 */
.returns-table tr.overdue td { background: #FDF1F1; }
/* 每一張表單的欄位寬度固定（2026/11/23 使用者要求：不管哪種處理方式，每張表單的欄位位置都要對齊） */
@media (min-width: 821px) {
  .returns-table { table-layout: fixed; width: 100%; }
  .returns-table th:nth-child(1), .returns-table td:nth-child(1) { width: 26%; }
  .returns-table th:nth-child(2), .returns-table td:nth-child(2) { width: 16%; }
  .returns-table th:nth-child(3), .returns-table td:nth-child(3) { width: 8%; }
  .returns-table th:nth-child(4), .returns-table td:nth-child(4) { width: 12%; }
  .returns-table th:nth-child(5), .returns-table td:nth-child(5) { width: 16%; }
  .returns-table th:nth-child(6), .returns-table td:nth-child(6) { width: 13%; }
  .returns-table th:nth-child(7), .returns-table td:nth-child(7) { width: 9%; }
  .returns-table td { overflow-wrap: anywhere; }
}
.returns-acts { justify-content: flex-end; flex-wrap: nowrap; }
.returns-src, .returns-st { margin: 0; }
.returns-src .btn .tag-count { margin-left: 6px; }
.returns-st .btn .tag-count { margin-left: 6px; }
/* 瑕疵處理（2026/11/23 改成表單）：分頁＋來源＋搜尋放在固定頁首；待寄回表單一律展開，下面是加入商品的輸入框 */
.returns-head { display: flex; flex-direction: column; gap: 10px; }
.return-sheet { margin-top: 12px; }
.return-sheet.overdue .rs-head .bad-text { font-weight: 600; }
.draft-sheet .fold-head { cursor: default; margin-bottom: 10px; }
.rs-wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rs-wrap .rs-head { flex: 1; min-width: 0; }
.rf-add { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.rf-add h4 { margin: 0 0 8px; font-size: 15px; }
.rf-find { max-width: 520px; }
.review-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-pick select { min-width: 150px; width: auto; }
.wrong-pick { margin-top: 6px; }
/* 斷貨退款（2026/11/23）：確認視窗每位買家一塊（訂單、買家、商品、金額＋通知文字）；缺貨退款清單過期淡紅底 */
.oos-picks { max-height: 50vh; overflow: auto; margin: 10px 0; }
.oos-pick { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.oos-pick-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 6px; }
.oos-pick textarea { width: 100%; }
.oos-total { margin: 6px 0 10px; }
.oos-table tr.overdue td { background: #FDF1F1; }
/* 商品斷貨（2026/11/23）：標記斷貨視窗每件商品一塊 */
.stockout-prod { margin: 12px 0; }
.stockout-title { margin-bottom: 6px; }
.stockout-table tr.locked-row td, .restock-open-all tr.locked-row td { background: #F5F5F4; color: var(--muted); }
/* 入庫頁：收到別的款式還在處理中的件數鎖住（2026/11/23） */
.receive-open tr.locked-row td { background: #F5F5F4; color: var(--muted); }
.receive-open tr.locked-row td { border-top: 0; }
/* 是否要將訂單狀態改為已確認（2026/11/22）：不會改的訂單灰色 */
.order-confirm-list { max-height: 50vh; overflow: auto; margin: 10px 0; }
.order-confirm-list tr.muted-row td { color: var(--muted); background: #FAFAF9; }
/* 卡片各自展開／收合（components/fold-cards.js；2026/11/22）：收合時只顯示標題那一排 */
.fold-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.fold-main { flex: 1; min-width: 0; }
.fold-main .rs-head { margin-bottom: 0; }
.fold-btn { flex: none; min-width: 64px; }
.fold-card.open .fold-body { margin-top: 10px; }
.fold-card .fold-head h3 { margin: 0; }
/* 入庫頁：待到貨的追加商品（2026/11/22） */
.receive-sec { font-size: 16px; margin: 0 0 10px; }
.receive-sec .muted { font-weight: 400; font-size: 14px; margin-left: 6px; }
.receive-open tr.picked td { background: #FBF0EE; }
.receive-open td:nth-child(4) { min-width: 200px; }
/* 必填還沒填的格子（例：追加單預覽的廠商代號；2026/11/22） */
input.need-fill, select.need-fill { border-color: var(--danger); }
/* 頁首右上角：進入我的店面＋「您好，名字 ▾」下拉選單（2026/11/22，照 SHOPLINE） */
.user-wrap { position: relative; }
.topbar .user-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 220px; }
.user-btn .user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.user-btn .user-caret { flex: none; font-size: 11px; color: var(--muted); }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px; z-index: 30; }
.user-menu[hidden] { display: none; }
.user-menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 0 12px; height: 44px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; }
.user-menu-item:hover { background: #F5F5F4; }
.user-menu-item + .user-menu-item { border-top: 1px solid var(--line); border-radius: 0; }
@media (max-width: 860px) {
  .topbar .user-wrap { min-width: 0; }
  .topbar .user-btn { max-width: none; width: 100%; }
  .user-btn .user-caret { display: none; }
}

/* 追加單列表：一張一列（2026/11/22 使用者要求）；簡要（編號、狀態、來源、時間、件數、預計到貨日）排在同一列，詳情展開看 */
.restock-cards { grid-template-columns: 1fr; gap: 8px; }
.restock-card .rc-top { align-items: center; }
.restock-card .rc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 0; }
.restock-card .rc-head { flex: none; }
.restock-card .rc-meta, .restock-card .rc-nums, .restock-card .rc-eta { white-space: nowrap; }
/* 預覽出貨商品（2026/11/22） */
.ship-preview-list { max-height: 60vh; overflow: auto; margin: 10px 0; }
.ship-preview .sp-thumb { width: 64px; }
.ship-preview .sp-thumb img { cursor: zoom-in; }

/* 幾個數字並排的欄位（訂購／已到／未到；2026/11/22）：每格固定寬度、置中，標題和數字上下對齊；預留 4 位數 */
.qcol-cell { padding-left: 12px !important; padding-right: 12px !important; }
.qcol-cell { text-align: left !important; white-space: nowrap; }
.qcols { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.qcols .qc { display: inline-block; width: 52px; text-align: center; } /* 用 px：標題字比較小，用 em 會對不齊 */
.qcols .qs { display: inline-block; width: 16px; text-align: center; color: var(--muted); }
/* 新增不能出貨：找商品的結果（2026/11/23） */
.defect-results-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* 設定頁的小標題、依開關顯示的欄位（2026/11/28 顧客設定、商店購物金、會員點數） */
h2.form-section { font-size: 16px; margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid #E5E5E3; }
.card > h2.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.field[hidden], h2.form-section[hidden] { display: none !important; }

/* 顧客管理（第 5 塊，2026/11/28）：顧客列表篩選、顧客內頁、會員分級 */
.filter-panel { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filter-panel[hidden] { display: none; }
.filter-panel select { min-width: 160px; }
.filter-chips { margin-top: 10px; }
.filter-chips:empty { display: none; }
.chip .chip-select { border: 0; background: transparent; min-height: 32px; padding: 0 4px; font: inherit; color: var(--accent); }
.big-num { font-size: 24px; font-weight: 700; margin: 4px 0 8px; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check-item { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); cursor: pointer; }
.check-item input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-item.muted { cursor: not-allowed; }
table.field-pages { width: auto; min-width: 320px; }
table.field-pages th.center, table.field-pages td.center { text-align: center; width: 90px; }
table.field-pages input { width: 20px; height: 20px; accent-color: var(--accent); }
.redeem-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.redeem-rule .rule-part { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.redeem-rule .rule-label { display: block; height: 22px; line-height: 22px; color: var(--muted); }
.redeem-rule .rule-part > select { width: 100%; }
.redeem-rule .unit-wrap { display: flex; align-items: center; gap: 8px; }
.redeem-rule .unit-wrap input { max-width: 160px; }
.redeem-rule .unit-wrap[hidden] { display: none; }
.redeem-rule .rule-del { margin-top: 30px; } /* 和下拉選單同一條線（標題 22px＋間距 8px） */
@media (max-width: 820px) {
  .redeem-rule { grid-template-columns: minmax(0, 1fr); }
  .redeem-rule .rule-del { margin-top: 0; justify-self: start; }
}
.redeem-rules > .btn { margin-top: 10px; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.tier-auto { display: flex; align-items: center; gap: 8px; }
h3.sub-head { font-size: 15px; margin: 14px 0 6px; }
td.act-cell { width: 1%; white-space: nowrap; text-align: right; }
/* 顧客內頁：左 1/3 顧客資訊、右 2/3 訂單／購物金／點數（2026/11/29 使用者要求，照 SHOPLINE 比例）；手機上下排 */
@media (min-width: 821px) { .customer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.customer-grid .info-list { gap: 6px 12px; }
.customer-grid .info-list dd { word-break: break-word; }
.customer-grid .lang-tabs > p { margin: 12px 0 0; }
.tier-table td.drag-cell, .tier-table th:first-child { width: 32px; }
.ledger-table td.num-cell, .customer-table td.num-cell { white-space: nowrap; text-align: right; }

/* 列入黑名單的彈出視窗（customers/blacklist-box.js） */
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.modal-head h3 { margin: 0; }
.modal-x { border: 0; background: none; font-size: 20px; width: var(--tap); height: var(--tap); cursor: pointer; color: var(--text); border-radius: 8px; }
.modal-x:hover { background: var(--bg); }
.blacklist-box .scope-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 16px; }
.blacklist-box .scope-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; cursor: pointer; min-height: var(--tap); }
.blacklist-box .scope-item input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.blacklist-box .scope-item > span { display: flex; flex-direction: column; gap: 4px; }
.blacklist-box .row-btns { justify-content: flex-end; }

/* 顧客內頁「訂閱狀態」：平常顯示管道小圖示（customers/channel-icons.js），有訂閱＝彩色、沒訂閱＝灰色加斜線；編輯時一項一行 */
.ch-icons { display: flex; flex-wrap: wrap; gap: 10px; }
.ch-icon { position: relative; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; cursor: default; }
.ch-icon.off { background: #EDEDEB; color: #A3A3A0; }
.ch-icon.off::after { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: #A3A3A0; transform: rotate(-45deg); border-radius: 1px; }
.check-col { display: flex; flex-direction: column; gap: 2px; }
.check-col .check-item { min-height: 36px; }

/* 顧客內頁卡片右上的按鈕（活動紀錄、贈送、調整等級、編輯…）：同一組同寬，和標題同一條線（2026/11/29）
   只套用在顧客內頁（.customer-grid），不影響其他頁的卡片（例：商品列表）；手機放不下時整組換到標題下一行 */
.customer-grid .card-head .row-btns { margin-top: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }

/* 顧客活動紀錄（customers/customer-activity.js）：照 SHOPLINE 時間軸，左邊圓形日期、右邊灰底方塊，一天一組 */
.act-sum { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; margin-bottom: 4px; }
.act-day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 18px; }
.act-day::before { content: ''; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--line); }
.act-day:last-of-type::before { display: none; }
.act-date { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; position: relative; z-index: 1; }
.act-date .m { font-size: 12px; color: var(--muted); }
.act-date .d { font-size: 18px; font-weight: 700; }
.act-date .y { position: absolute; top: 58px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.act-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.act-item { background: #F5F5F4; border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.act-item .act-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.act-item .act-title { font-weight: 700; word-break: break-word; }
.act-item .act-meta { font-size: 13px; color: var(--muted); word-break: break-word; }
.act-item .act-amt { font-weight: 700; white-space: nowrap; font-size: 16px; }
.act-item .act-amt.plus { color: var(--ok); }
.act-more { display: flex; justify-content: center; margin-top: 6px; }
@media (max-width: 860px) {
  .act-day { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .act-date { width: 48px; height: 48px; }
  .act-day::before { left: 23px; top: 48px; }
  .act-date .y { top: 50px; }
}
