/* =====================================================
   麗香坊 現場極簡收銀台 V2.1 — pos.css
   橫式 iPad「零捲軸」焊死鎖版
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/* ══════════════════════════════════════════════════════
   CSS 主題變數 — 夜間市集模式（預設）
   ══════════════════════════════════════════════════════ */
:root {
  --bg:         #0d0f14;
  --bg2:        #161a24;
  --surface:    #1e2336;
  --surface2:   #252b40;
  --border:     #2a2f45;
  --border2:    #3a4060;
  --accent:     #f5a623;
  --accent2:    #ff6b35;
  --green:      #00d68f;
  --red:        #ff3d71;
  --blue:       #00aaff;
  --text:       #e8ecf4;
  --text2:      #b0b8d0;
  --muted:      #7a8099;
  --radius:     10px;
  --shadow:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.7);
  --header-h:   8vh;
  --work-h:     calc(100vh - 8vh - 24px); /* 扣掉 header 和 body padding */
}

/* ══════════════════════════════════════════════════════
   ☀️ 戶外烈日模式
   ══════════════════════════════════════════════════════ */
body.theme-day {
  --bg:         #ffffff;
  --bg2:        #f0f2f5;
  --surface:    #f7f8fa;
  --surface2:   #eaedf2;
  --border:     #c8cdd8;
  --border2:    #a0a8b8;
  --accent:     #d9000a;
  --accent2:    #b80000;
  --green:      #007a3d;
  --red:        #cc0000;
  --blue:       #0050cc;
  --text:       #090c14;
  --text2:      #2a2f45;
  --muted:      #555e78;
}

body.theme-day #pos-header            { border-bottom: 2px solid var(--border2); }
body.theme-day .pos-panel             { border: 2px solid var(--border2); }
body.theme-day #btn-checkout:disabled { background: var(--surface2); border: 2px solid var(--border2); }

/* ══════════════════════════════════════════════════════
   ① 鐵律：100vh 焊死絕不捲動
   ══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow: hidden; }

body {
  margin: 0;
  padding: 12px;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;                 /* ← 封殺外層捲軸 */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans TC', 'Inter', system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* ══════════════════════════════════════════════════════
   ② 頂部狀態列（8vh）
   ══════════════════════════════════════════════════════ */
#pos-header {
  height: var(--header-h);
  min-height: 52px;
  max-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(245,166,35,0.35);
}
.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  flex-shrink: 0;
}
.brand-text-fallback {
  /* JS onerror 控制顯示，預設隱藏 */
  align-items: center;
}
.brand-text  {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: 'Klee One', 'Ma Shan Zheng', cursive;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.brand-info { display: flex; flex-direction: column; justify-content: center; }
.brand-sub-v23 {
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Klee One', 'Ma Shan Zheng', cursive;
  color: var(--accent);
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.brand-sub   { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; }

/* 上一單膠囊（中央） */
#last-order-pill {
  flex: 1;
  display: flex;
  justify-content: center;
}
#btn-last-order {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 6px 18px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
#btn-last-order.active {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(245,166,35,0.2);
}
#btn-last-order:hover.active {
  background: rgba(245,166,35,0.12);
}

/* 右側工具列 */
#header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 流水號徽章 */
#queue-badge {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}
#queue-badge strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* 工具按鈕 */
.tool-btn {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text2);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tool-btn:hover { background: var(--border2); color: var(--text); }

/* API dot */
#api-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
#api-dot.ok      { background: var(--green); box-shadow: 0 0 6px var(--green); }
#api-dot.err     { background: var(--red); }
#api-dot.loading { background: var(--accent); animation: apiBlink 1s infinite; }
@keyframes apiBlink { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ══════════════════════════════════════════════════════
   ③ 工作區（剩餘高度，左右分割）
   ══════════════════════════════════════════════════════ */
#work-area {
  display: flex;
  gap: 12px;
  flex: 1;           /* 撐滿 header 以下所有空間 */
  min-height: 0;     /* 防止 flex 子元素溢出 */
  padding-top: 10px;
  overflow: hidden;
}

/* ── 左側 55% ─────────────────────────────────────── */
#left-panel {
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

/* ── 右側 45% ─────────────────────────────────────── */
#right-panel {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

/* 通用面板框 */
.pos-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.3s;
}

.panel-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 6px 12px 0;
}

/* ══════════════════════════════════════════════════════
   ④ 熱銷觸控盤（左上，40% of work-area height）
   ══════════════════════════════════════════════════════ */
#hotkey-panel {
  flex: 0 0 40%;    /* 40% 高度，不壓縮 */
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
}

#hotkey-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 8px;
  min-height: 0;
}

.hk-btn {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 18px;       /* ← 大拇指可戳 */
  font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
  line-height: 1.2;
  padding: 4px 6px;
}
.hk-btn:hover  { background: var(--surface); border-color: var(--accent); }
.hk-btn:active { transform: scale(0.96); background: rgba(245,166,35,0.15); }

.hk-btn .hk-name  { font-size: 18px; font-weight: 800; text-align: center; }
.hk-btn .hk-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245,166,35,0.1);
  border-radius: 10px;
  padding: 1px 8px;
}

/* 搜尋 / 更多下拉列 */
#search-bar {
  display: flex;
  gap: 7px;
  padding: 0 10px 8px;
}
#product-search, #product-select {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.2s;
}
#product-search:focus, #product-select:focus { border-color: var(--blue); }
#product-search::placeholder { color: var(--muted); }
#product-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a8099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  cursor: pointer;
}
#product-select option { background: var(--bg2); color: var(--text); }

/* ══════════════════════════════════════════════════════
   ⑤ 購買明細表（左下，剩餘 flex 空間）
   ══════════════════════════════════════════════════════ */
#cart-panel {
  flex: 1;          /* 撐滿剩餘空間 */
  display: flex;
  flex-direction: column;
  min-height: 0;    /* 允許縮小 */
  overflow: hidden;
}

#cart-panel .panel-title {
  flex-shrink: 0;
}

#cart-table-wrap {
  flex: 1;
  overflow-y: auto;   /* ← 只有表格內部捲動 */
  padding: 4px 10px;
  min-height: 0;
}

/* 捲動條 */
#cart-table-wrap::-webkit-scrollbar { width: 5px; }
#cart-table-wrap::-webkit-scrollbar-track { background: transparent; }
#cart-table-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

#cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
#cart-table thead tr {
  position: sticky; top: 0;
  background: var(--bg2);
  z-index: 1;
}
#cart-table thead th {
  padding: 5px 8px;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
#cart-table thead th:nth-child(2),
#cart-table thead th:nth-child(3),
#cart-table thead th:nth-child(4) { text-align: right; }
#cart-table thead th:last-child    { text-align: center; }

#cart-table tbody tr {
  border-bottom: 1px solid var(--border);
  animation: rowIn 0.18s ease-out;
}
@keyframes rowIn { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:none} }
#cart-table tbody tr:hover { background: rgba(255,255,255,0.03); }

#cart-table tbody td {
  padding: 8px 8px;
  vertical-align: middle;
}
#cart-table tbody td:nth-child(2) { text-align: right; color: var(--muted); }
#cart-table tbody td:nth-child(4) { text-align: right; color: var(--accent); font-weight: 700; }
#cart-table tbody td:last-child   { text-align: center; }

/* 空購物車 */
#cart-empty {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.8rem;
}
#cart-empty .empty-icon { font-size: 2rem; display: block; margin-bottom: 5px; opacity: 0.4; }

/* 數量控制 */
.qty-ctrl {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 5px; border: 1px solid var(--border2);
  background: var(--surface2); color: var(--text);
  font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  line-height: 1;
}
.qty-btn.minus:hover { background: rgba(255,61,113,0.2); border-color: var(--red); color: var(--red); }
.qty-btn.plus:hover  { background: rgba(0,214,143,0.2); border-color: var(--green); color: var(--green); }
.qty-value { min-width: 24px; text-align: center; font-weight: 800; font-size: 0.95rem; }

.del-btn {
  width: 26px; height: 26px;
  background: none; border: 1px solid transparent;
  border-radius: 5px; color: var(--muted);
  cursor: pointer; font-size: 0.9rem;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.del-btn:hover { background: rgba(255,61,113,0.12); border-color: var(--red); color: var(--red); }

/* 清空按鈕 */
#cart-footer {
  flex-shrink: 0;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--border);
}
#btn-clear-cart {
  width: 100%;
  padding: 7px;
  border: 1px dashed var(--border2);
  border-radius: 7px;
  background: none; color: var(--muted);
  font-family: inherit; font-size: 0.78rem;
  cursor: pointer; letter-spacing: 0.04em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
#btn-clear-cart:hover {
  border-color: var(--red); color: var(--red);
  background: rgba(255,61,113,0.06);
}

/* 左下角簽結按鈕 */
#btn-daily-close {
  flex-shrink: 0;
  margin: 0 10px 8px;
  padding: 8px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: var(--surface2); color: var(--text2);
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
#btn-daily-close:hover {
  background: rgba(0,170,255,0.1); border-color: var(--blue); color: var(--blue);
}

/* ══════════════════════════════════════════════════════
   ⑥ 右側戰情找零中心
   ══════════════════════════════════════════════════════ */
#right-panel {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
}

/* 右側每個等高格子 */
.right-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

#total-block {
  flex: 0 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
}
.rblock-label {
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 4px;
}
#total-amount {
  font-size: 2.8rem; font-weight: 900;
  color: var(--text); letter-spacing: -0.02em;
  line-height: 1;
  transition: transform 0.15s;
}
#total-amount.bump { animation: numBump 0.22s ease-out; }
@keyframes numBump {
  0%{transform:scale(1)} 40%{transform:scale(1.1)} 100%{transform:scale(1)}
}

/* 實收輸入框 */
#cash-block {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex; flex-direction: column;
  justify-content: center;
  min-height: 0;
}
#cash-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 8px;
}
#cash-pulse {
  width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.75)} }

#cash-wrap {
  display: flex; align-items: center;
  background: var(--surface2);
  border: 2px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#cash-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.18), 0 0 24px rgba(245,166,35,0.1);
}
#cash-prefix {
  padding: 0 12px;
  font-size: 1.4rem; font-weight: 900;
  color: var(--accent);
  background: rgba(245,166,35,0.06);
  border-right: 2px solid var(--border2);
  height: 70px; display: flex; align-items: center; flex-shrink: 0;
}
#cash-input {
  flex: 1; height: 70px;
  background: transparent; border: none; outline: none;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900; font-family: 'Inter', sans-serif;
  color: var(--text); text-align: center;
  caret-color: var(--accent);
}
#cash-input::placeholder { color: var(--muted); font-weight: 400; font-size: 1.2rem; }
#cash-suffix {
  padding: 0 12px;
  font-size: 1rem; font-weight: 700;
  color: var(--muted);
  height: 70px; display: flex; align-items: center; flex-shrink: 0;
}
#cash-hint {
  font-size: 0.66rem; color: var(--muted);
  text-align: center; margin-top: 5px; letter-spacing: 0.06em;
}

/* 找零看板 */
#change-block {
  flex: 0 0 auto;
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#change-block.ready {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(0,214,143,0.18);
}
#change-block.danger {
  border-color: var(--red);
}
#change-amount {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900; color: var(--red);
  letter-spacing: -0.02em; line-height: 1;
  transition: color 0.2s;
}
#change-block.ready #change-amount {
  color: var(--green);
  animation: numBump 0.22s ease-out;
}

/* 確認收銀按鈕 */
#btn-checkout {
  flex-shrink: 0;
  width: 100%;
  min-height: 90px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #000;
  font-family: inherit;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(245,166,35,0.35);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
#btn-checkout:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245,166,35,0.5);
}
#btn-checkout:not(:disabled):active { transform: scale(0.98); }
#btn-checkout:disabled {
  background: var(--surface2);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid var(--border2);
}
#btn-checkout .enter-hint {
  font-size: 0.72rem; font-weight: 600;
  opacity: 0.7; margin-top: 2px; letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════
   ⑦ Toast 通知
   ══════════════════════════════════════════════════════ */
#success-toast {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center;
  pointer-events: none;
}
#toast-inner {
  background: linear-gradient(135deg, #0d1f0f, #0a1a0a);
  border: 2px solid var(--green);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 40px rgba(0,214,143,0.35);
  padding: 18px 40px;
  text-align: center;
  transform: translateY(-100%);
  transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 300px;
}
#success-toast.show #toast-inner { transform: translateY(0); }
#toast-title { font-size: 1.3rem; font-weight: 900; color: var(--green); }
#toast-detail { font-size: 0.92rem; color: var(--text); opacity: 0.85; margin-top: 3px; }

body.theme-day #toast-inner {
  background: #f0fff4;
  border-color: var(--green);
}

/* ══════════════════════════════════════════════════════
   ⑧ 上一單彈窗 <dialog>
   ══════════════════════════════════════════════════════ */
#last-order-dialog {
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: 16px;
  color: var(--text);
  padding: 32px 40px;
  min-width: 320px;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  font-family: inherit;
}
#last-order-dialog::backdrop {
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}
#last-order-dialog h2 {
  font-size: 1.4rem; font-weight: 900;
  margin-bottom: 20px; text-align: center;
  letter-spacing: 0.04em;
  color: var(--accent);
}
#last-order-items { list-style: none; margin-bottom: 20px; }
#last-order-items li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  display: flex; justify-content: space-between;
}
#last-order-items li .item-subtotal { color: var(--accent); font-weight: 700; }
#last-order-summary {
  display: flex; justify-content: space-between;
  font-size: 1.1rem; font-weight: 900;
  padding-top: 12px; border-top: 2px solid var(--border2);
}
#last-order-summary .summary-total { color: var(--green); font-size: 1.3rem; }
#dialog-close-hint {
  text-align: center; margin-top: 16px;
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em;
}

body.theme-day #last-order-dialog { background: #fff; border-color: var(--border2); }

/* ══════════════════════════════════════════════════════
   ⑨ 日結簽結 Modal
   ══════════════════════════════════════════════════════ */
#daily-close-dialog {
  background: var(--bg2);
  border: 2px solid var(--blue);
  border-radius: 16px;
  color: var(--text);
  padding: 32px 40px;
  min-width: 360px;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  font-family: inherit;
}
#daily-close-dialog::backdrop {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
#daily-close-dialog h2 {
  font-size: 1.3rem; font-weight: 900;
  margin-bottom: 16px; text-align: center;
  color: var(--blue);
}
.dc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.dc-val { font-weight: 800; }
.dc-total-row { font-size: 1.1rem; font-weight: 900; color: var(--green); }

#dc-btn-row {
  display: flex; gap: 10px; margin-top: 24px;
}
.dc-btn {
  flex: 1; padding: 12px;
  border-radius: 8px; border: none;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
.dc-btn:active { transform: scale(0.97); }
#dc-btn-cancel { background: var(--surface2); color: var(--text2); border: 1px solid var(--border2); }
#dc-btn-confirm {
  background: linear-gradient(135deg, var(--blue), #0050cc);
  color: #fff;
}

body.theme-day #daily-close-dialog { background: #fff; border-color: var(--blue); }
body.theme-day .dc-btn#dc-btn-cancel { background: #f0f2f5; }

/* ══════════════════════════════════════════════════════
   捲動條
   ══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
