/* =========================================================================
   拼豆计时管理系统  styles.css
   风格: iOS 26 液态玻璃 (Liquid Glass)
   ========================================================================= */

/* ===== 基础与变量 ===== */
:root {
  /* 状态色 - Apple 系统色 */
  --c-idle: #8A94A6;
  --c-running: #00B42A;
  --c-paused: #7C3AED;
  --c-overtime: #F5222D;
  --c-pending: #FA8C16;
  --c-accent: #0a84ff;

  /* 液态玻璃核心参数 (低白染色 + 内高光 + 强模糊) */
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-bg-strong: rgba(255, 255, 255, 0.24);
  --glass-bg-heavy: rgba(255, 255, 255, 0.40);
  --glass-blur: 28px;
  --glass-sat: 1.6;
  --hi-top: rgba(255, 255, 255, 0.65);   /* 顶部刀刃高光 */
  --hi-bot: rgba(255, 255, 255, 0.08);    /* 底部微光 */
  --edge: rgba(255, 255, 255, 0.35);      /* 玻璃描边 */
  --edge-soft: rgba(255, 255, 255, 0.22);

  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --shadow-outer: 0 8px 32px rgba(31, 42, 68, 0.18);
  --shadow-outer-lg: 0 24px 60px rgba(31, 42, 68, 0.24);
  --hairline: rgba(0, 0, 0, 0.08);

  --radius: 26px;
  --radius-lg: 32px;
  --radius-sm: 14px;

  /* 弹性缓动 */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* 桌台卡片尺寸(设置"桌台卡片大小"可调,三档预设见下方 data-card-size 规则) */
  --tc-min: 255px;      /* 单卡最小列宽 */
  --tc-gap: 18px;
  --tc-pad: 20px;
  --tc-radius: var(--radius);
  --tc-name: 17px;
  --tc-time: 26px;
  --tc-cust: 13px;
}

/* 桌台卡片大小档位:app.js 依据设置在 <html> 上写入 data-card-size */
html[data-card-size="compact"] { --tc-min: 136px; --tc-gap: 6px; --tc-pad: 9px 11px; --tc-radius: 14px; --tc-name: 13px; --tc-time: 16px; --tc-cust: 11px; --tc-h: 120px; }
html[data-card-size="large"]   { --tc-min: 320px; --tc-gap: 22px; --tc-pad: 24px; --tc-radius: 30px; --tc-name: 19px; --tc-time: 30px; --tc-cust: 14px; }
/* 紧凑档:状态胶囊与剩余/超时行同步缩小 */
html[data-card-size="compact"] .tc-status { font-size: 10px; padding: 2px 8px; }
html[data-card-size="compact"] .tc-remaining { font-size: 11px; }
/* 起始时间行(补记用):与 .tc-remaining 同风格,略小一档 */
.tc-start { font-size: 11px; color: var(--text-muted); position: relative; z-index: 2; font-weight: 500; opacity: 0.85; }
html[data-card-size="compact"] .tc-start { font-size: 10px; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  /* iOS 26 风格柔和壁纸:冷暖光影交错,有明暗层次,承载液态玻璃折射 */
  background-color: #e7ecf5;
  background-image:
    radial-gradient(1100px 780px at 8% -8%, rgba(178, 205, 255, 0.55), transparent 60%),
    radial-gradient(950px 680px at 102% -2%, rgba(214, 186, 255, 0.48), transparent 56%),
    radial-gradient(880px 680px at 88% 104%, rgba(255, 205, 182, 0.42), transparent 56%),
    radial-gradient(820px 620px at 12% 104%, rgba(168, 228, 216, 0.44), transparent 56%),
    linear-gradient(160deg, #dfe6f3 0%, #eae4f0 45%, #e4ecf4 100%);
  background-attachment: fixed;
  background-size: cover;
}

#app { min-height: 100vh; display: flex; flex-direction: column; position: relative; }

/* ===== 液态玻璃通用配方 ===== */
.liquid {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow:
    inset 0 1px 0 var(--hi-top),
    inset 0 -1px 0 var(--hi-bot),
    var(--shadow-outer);
  border: 1px solid var(--edge);
}

/* ===== 顶部栏 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; flex-wrap: wrap; gap: 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(32px) saturate(1.7);
  -webkit-backdrop-filter: blur(32px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 var(--hi-top),
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 24px rgba(31, 42, 68, 0.10);
  border-bottom: 1px solid var(--edge-soft);
  position: sticky; top: 0; z-index: 50;
  color: var(--text);
}
.topbar-left { display: flex; align-items: center; gap: 18px; }
.logo { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.shop-name {
  font-size: 12px; opacity: 0.65; font-weight: 500;
  padding: 4px 12px; background: rgba(0, 0, 0, 0.04); border-radius: 100px;
}
.clock {
  font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.today-summary {
  font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.34); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--edge-soft); white-space: nowrap;
}

/* ===== 导航 ===== */
.nav {
  display: flex; gap: 6px; padding: 12px 28px; flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom: 1px solid var(--edge-soft);
  position: sticky; top: 63px; z-index: 40;
}
.nav-btn {
  border: none; background: transparent; padding: 9px 18px; cursor: pointer;
  font-size: 14px; color: var(--text-muted); border-radius: 100px;
  transition: all 0.3s var(--ease-smooth); font-weight: 600; letter-spacing: -0.01em;
  position: relative;
}
.nav-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.28); }
.nav-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 16px rgba(31, 42, 68, 0.14);
}

/* ===== 视图 ===== */
.view { display: none; padding: 28px 30px 48px; flex: 1; max-width: 1500px; margin: 0 auto; width: 100%; }
.view.active { display: block; animation: fade-in 0.4s var(--ease-smooth); }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== 工具栏 ===== */
.dashboard-toolbar, .sales-toolbar, .storage-toolbar {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 13px; color: var(--text-muted); white-space: nowrap; font-weight: 600; }
.legend {
  display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; padding: 8px 16px;
  background: rgba(255, 255, 255, 0.22); border-radius: 100px;
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--edge-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.5); }
.dot.idle { background: var(--c-idle); }
.dot.running { background: var(--c-running); }
.dot.paused { background: var(--c-paused); }
.dot.overtime { background: var(--c-overtime); }

/* ===== 输入与选择 ===== */
.input, .date-input, .area-input, .tables-input, .price-input {
  border: 1px solid var(--edge-soft); border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 14px;
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text); outline: none;
  transition: all 0.25s var(--ease-smooth); font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.input:focus, .date-input:focus, .area-input:focus, .tables-input:focus, .price-input:focus {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.5);
}
.input.full { width: 100%; }

/* ===== 桌台看板 ===== */
.table-board { display: flex; flex-direction: column; gap: 28px; }
.area-section h3 {
  font-size: 18px; margin-bottom: 14px; color: var(--text); display: flex;
  align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em;
}
.area-section h3 .area-count {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  background: rgba(255, 255, 255, 0.30); padding: 4px 12px; border-radius: 100px;
  border: 1px solid var(--edge-soft); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tc-min), 1fr)); gap: var(--tc-gap); }

.table-card {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(30px) saturate(1.7);
  -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border-radius: var(--tc-radius); padding: var(--tc-pad); cursor: pointer;
  /* 固定卡高:紧凑档下带备注/超时行的卡片不会把整行撑高,计时始终贴底 */
  display: flex; flex-direction: column; height: var(--tc-h, auto);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-smooth);
  border: 1px solid var(--edge); position: relative; overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 6px 22px rgba(31, 42, 68, 0.12);
}
.table-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
  pointer-events: none; border-radius: var(--radius) var(--radius) 0 0;
}
.table-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(31, 42, 68, 0.20), inset 0 1px 0 rgba(255,255,255,0.9); }
.table-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
  background: var(--c-idle); border-radius: 0; z-index: 1;
}
.table-card.running::before { background: var(--c-running); box-shadow: 0 0 18px rgba(0,180,42,0.70); }
.table-card.paused::before { background: var(--c-paused); box-shadow: 0 0 18px rgba(124,58,237,0.70); }
.table-card.overtime::before { background: var(--c-overtime); box-shadow: 0 0 18px rgba(245,34,45,0.80); }

/* 整卡着色：远处/余光也能一眼分辨状态 */
.table-card.running { background: linear-gradient(180deg, rgba(0,180,42,0.20), rgba(0,180,42,0.07)); border-color: rgba(0,180,42,0.60); }
.table-card.paused  { background: linear-gradient(180deg, rgba(124,58,237,0.20), rgba(124,58,237,0.07)); border-color: rgba(124,58,237,0.60); }
.table-card.overtime{ background: linear-gradient(180deg, rgba(245,34,45,0.24), rgba(245,34,45,0.09)); border-color: rgba(245,34,45,0.65); }
.table-card.overtime .tc-time { color: var(--c-overtime); }
.table-card.paused .tc-time { color: var(--c-paused); }
.table-card.overtime { animation: pulse-red 1.6s ease-in-out infinite; }
@keyframes pulse-red {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 22px rgba(31,42,68,0.12), 0 0 0 0 rgba(245,34,45,0.28); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 22px rgba(31,42,68,0.12), 0 0 0 8px rgba(245,34,45,0.14); }
}

.tc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; position: relative; z-index: 2; }
.tc-name { font-size: var(--tc-name); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-status {
  flex-shrink: 0; margin-left: 8px;
  font-size: 13px; padding: 5px 14px; border-radius: 100px; color: #fff;
  background: var(--c-idle); white-space: nowrap; font-weight: 800; letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(31, 42, 68, 0.20);
}
.table-card.running .tc-status { background: var(--c-running); box-shadow: 0 3px 12px rgba(0,180,42,0.45); }
.table-card.paused .tc-status { background: var(--c-paused); box-shadow: 0 3px 12px rgba(124,58,237,0.45); }
.table-card.overtime .tc-status { background: var(--c-overtime); box-shadow: 0 3px 12px rgba(245,34,45,0.50); }

.tc-customer { font-size: var(--tc-cust, 13px); color: var(--text); margin-bottom: 2px; position: relative; z-index: 2; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-notes {
  font-size: var(--tc-cust, 13px); color: var(--text-muted); margin: 0 0 2px; position: relative; z-index: 2; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-time {
  font-size: var(--tc-time); font-weight: 800; font-variant-numeric: tabular-nums; margin: auto 0 4px;
  letter-spacing: -0.03em; position: relative; z-index: 2;
}
.tc-remaining { font-size: 12px; color: var(--text-muted); position: relative; z-index: 2; font-weight: 500; }
.tc-remaining.warn { color: var(--c-pending); font-weight: 800; }
.tc-remaining.over { color: var(--c-overtime); font-weight: 800; }
.tc-price { font-size: 11px; color: var(--text-muted); margin-top: 8px; position: relative; z-index: 2; }
.tc-items-badge {
  position: absolute; top: 16px; right: 16px; background: var(--c-pending); color: #fff;
  font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 100px;
  display: none; align-items: center; justify-content: center; font-weight: 700; z-index: 3;
  box-shadow: 0 2px 8px rgba(255,149,0,0.45);
}

/* ===== 表格 ===== */
.table-wrap {
  background: rgba(255, 255, 255, 0.22); border-radius: var(--radius); overflow: auto;
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--edge-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 28px rgba(31, 42, 68, 0.14);
}
.data-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.data-table th {
  background: rgba(255, 255, 255, 0.38); font-weight: 600; color: var(--text-muted);
  position: sticky; top: 0; white-space: nowrap; letter-spacing: -0.01em;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.data-table tr { transition: background 0.15s; }
.data-table tr:hover { background: rgba(10, 132, 255, 0.07); }
.data-table .empty-row td { text-align: center; color: var(--text-muted); padding: 48px; }

/* ===== 销售汇总 ===== */
.sales-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 16px; margin-bottom: 24px;
}
.summary-card {
  background: rgba(255, 255, 255, 0.22); border-radius: var(--radius); padding: 20px 22px;
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 20px rgba(31, 42, 68, 0.12);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-smooth);
  position: relative; overflow: hidden;
}
.summary-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--c-accent); border-radius: 4px;
}
.summary-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 16px 36px rgba(31,42,68,0.20); }
.summary-card .label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.summary-card .value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.summary-card .value.small { font-size: 17px; }

/* ===== 设置 ===== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.settings-card {
  background: rgba(255, 255, 255, 0.22); border-radius: var(--radius); padding: 26px;
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 20px rgba(31, 42, 68, 0.12);
}
.settings-card.wide { grid-column: 1 / -1; }
.settings-card h3 {
  font-size: 16px; margin-bottom: 18px; display: flex; justify-content: space-between;
  align-items: center; font-weight: 700; letter-spacing: -0.02em; gap: 12px;
}
.settings-card h3 .wallpaper-hint { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ===== 壁纸工具 ===== */
.wp-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  flex-wrap: wrap;
}
.wp-upload-label { display: inline-flex; align-items: center; cursor: pointer; }
.wp-mode { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.wp-mode select, .wp-mode input[type=range] {
  border: 1px solid var(--edge-soft); border-radius: 100px;
  padding: 6px 14px; background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: inherit; font-size: 13px; outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.wp-mode input[type=range] { padding: 0; accent-color: var(--c-accent); }
.wp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px;
}
.wp-item {
  border-radius: var(--radius-sm); overflow: hidden; position: relative;
  background: rgba(0,0,0,.06); aspect-ratio: 1;
  border: 2px solid transparent; cursor: pointer; transition: all .25s var(--ease-smooth);
}
.wp-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wp-item.active {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(10,132,255,.2);
}
.wp-item::after {
  content: attr(data-name); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 4px 6px; background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; opacity: 0; transition: opacity .15s;
}
.wp-item:hover::after, .wp-item:hover .wp-remove { opacity: 1; }
.wp-remove {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 59, 48, 0.92); color: #fff; border: none;
  cursor: pointer; font-size: 16px; line-height: 1; display: flex;
  align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.wp-remove:hover { background: #ff3b30; }
.wp-empty {
  grid-column: 1 / -1; padding: 40px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
  border: 2px dashed rgba(0,0,0,.12); border-radius: var(--radius-sm);
}
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text); flex-shrink: 0; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-row .input { width: 170px; }
.color-input { width: 54px; height: 36px; border: 1px solid var(--edge-soft); border-radius: var(--radius-sm); cursor: pointer; padding: 3px; background: rgba(255,255,255,0.3); }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.6; }

.area-manager { display: flex; flex-direction: column; gap: 10px; }
.area-row {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: rgba(255, 255, 255, 0.20); border-radius: var(--radius-sm); flex-wrap: wrap;
  border: 1px solid var(--edge-soft);
}
.area-row .area-input { width: 110px; }
.area-row .tables-input { flex: 1; min-width: 200px; }
.area-row .price-input { width: 110px; }

.data-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
  border: none; border-radius: 100px; padding: 10px 20px; font-size: 14px; cursor: pointer;
  transition: all 0.25s var(--ease-smooth); font-weight: 600; white-space: nowrap; letter-spacing: -0.01em;
  font-family: inherit;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-primary {
  background: linear-gradient(135deg, #0a84ff, #0066ff); color: #fff;
  box-shadow: 0 2px 10px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(10, 132, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.35); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.30); color: var(--text); border: 1px solid var(--edge-soft);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.5); }
.btn-danger {
  background: linear-gradient(135deg, #ff453a, #ff3b30); color: #fff;
  box-shadow: 0 2px 10px rgba(255, 59, 48, 0.32), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-danger:hover { box-shadow: 0 6px 18px rgba(255, 59, 48, 0.45), inset 0 1px 0 rgba(255,255,255,0.35); transform: translateY(-1px); }
.btn-success {
  background: linear-gradient(135deg, #34c759, #30b94e); color: #fff;
  box-shadow: 0 2px 10px rgba(52, 199, 89, 0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-success:hover { box-shadow: 0 6px 18px rgba(52, 199, 89, 0.5), inset 0 1px 0 rgba(255,255,255,0.35); transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 24, 40, 0.30);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
  animation: overlay-in 0.25s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: rgba(255, 255, 255, 0.30); border-radius: var(--radius-lg); width: 100%; max-width: var(--modal-max, 460px);
  max-height: 84vh; display: flex; flex-direction: column;
  backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 28px 70px rgba(31, 42, 68, 0.30);
  animation: modal-in 0.4s var(--ease-spring);
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.92) translateY(20px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 26px; border-bottom: 1px solid var(--hairline); }
.modal-header h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.modal-close {
  background: rgba(0, 0, 0, 0.05); border: none; font-size: 22px; cursor: pointer; color: var(--text-muted);
  line-height: 1; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease-smooth);
}
.modal-close:hover { background: rgba(0, 0, 0, 0.1); color: var(--text); }
.modal-body { padding: 24px 26px; overflow-y: auto; }
.modal-footer { padding: 16px 26px; border-top: 1px solid var(--hairline); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.modal-body .field { margin-bottom: 16px; }
.modal-body .field label { display: block; font-size: 13px; margin-bottom: 7px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.modal-body .field input, .modal-body .field select, .modal-body .field textarea {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid var(--edge-soft); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; font-family: inherit;
  background: rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text); outline: none; transition: all 0.25s var(--ease-smooth);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.modal-body .field input:focus, .modal-body .field select:focus, .modal-body .field textarea:focus {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.6);
}
.modal-body .field textarea { resize: vertical; min-height: 64px; }
.modal-body .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-body .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
/* 允许收缩:紧凑弹窗下数字输入框的固有宽度会溢出网格轨道,压到旁边控件 */
.modal-body .row-2 > .field, .modal-body .row-3 > .field { min-width: 0; }

/* 补记起始时间:时间输入与「补记开始」按钮同行 */
.bf-row { display: flex; align-items: center; gap: 10px; }
.modal-body .field .bf-row input[type="time"] { width: auto; flex: 1 1 auto; min-width: 0; }
.bf-row .btn { flex: 0 0 auto; white-space: nowrap; }

.bill-section { margin-bottom: 18px; }
.bill-section h4 { font-size: 13px; margin-bottom: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.bill-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.bill-row.total {
  font-size: 20px; font-weight: 800; border-top: 2px solid var(--hairline); margin-top: 10px;
  padding-top: 14px; color: var(--c-accent); letter-spacing: -0.02em;
}
.items-list { margin-bottom: 12px; }
.item-row {
  display: flex; align-items: center; gap: 8px; padding: 10px;
  background: rgba(255, 255, 255, 0.25); border-radius: var(--radius-sm); margin-bottom: 8px;
  border: 1px solid var(--edge-soft);
}
.item-row input { flex: 1; border: 1px solid var(--edge-soft); border-radius: 8px; padding: 8px 12px; font-size: 14px; background: rgba(255,255,255,0.5); outline: none; }
.item-row input:focus { border-color: var(--c-accent); }
.item-row .price-col { width: 90px; }
.item-row .qty-col { width: 70px; }
.item-row .remove-item {
  width: 30px; height: 30px; background: rgba(255, 59, 48, 0.12); color: var(--c-overtime);
  border: none; border-radius: 8px; cursor: pointer; font-size: 18px; transition: all 0.15s;
}
.item-row .remove-item:hover { background: rgba(255, 59, 48, 0.22); }

.status-badge { padding: 3px 11px; border-radius: 100px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-badge.stored { background: #165DFF; color: #fff; }
.status-badge.picked { background: #00B42A; color: #fff; }
.status-badge.overdue { background: #F5222D; color: #fff; }
.action-btns { display: flex; gap: 6px; }
.action-btns .btn { padding: 5px 12px; font-size: 12px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(30, 34, 50, 0.60);
  backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  color: #fff; padding: 13px 24px; border-radius: 100px; font-size: 14px; font-weight: 600;
  z-index: 2000; box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  animation: toast-in 0.4s var(--ease-spring);
}
.toast.success { background: rgba(52, 199, 89, 0.92); }
.toast.error { background: rgba(255, 59, 48, 0.92); }
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 24px) scale(0.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.16); border-radius: 100px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.28); background-clip: padding-box; }

/* ===== 手机端 (移动版) ===== */
@media (max-width: 720px) {
  /* 顶栏滚走 + 导航吸顶,切换视图始终可达 */
  .topbar {
    position: static;
    flex-wrap: wrap; row-gap: 8px;
    padding: 10px 14px;
  }
  .topbar-left { order: 1; gap: 8px; }
  .logo { font-size: 15px; white-space: nowrap; }
  .shop-name { display: none; }
  .topbar-center { order: 2; margin-left: auto; }
  .clock { font-size: 20px; }
  .topbar-right { order: 3; flex-basis: 100%; text-align: center; }
  .today-summary { font-size: 12px; padding: 6px 14px; white-space: normal; }

  .nav {
    position: sticky; top: 0; z-index: 40;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px 12px; gap: 6px;
  }
  .nav-btn { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; font-size: 14px; }

  .view { padding: 16px 14px 28px; }
  .dashboard-toolbar, .sales-toolbar, .storage-toolbar { gap: 10px; margin-bottom: 16px; }

  /* 桌台卡:跟随"桌台卡片大小"设置(紧凑档手机上可两列) */
  .table-grid { grid-template-columns: repeat(auto-fill, minmax(var(--tc-min), 1fr)); gap: var(--tc-gap); }
  .table-card { padding: var(--tc-pad); }

  /* 销售汇总:两列 */
  .sales-summary { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .summary-card { padding: 16px; }
  .summary-card .value { font-size: 22px; }

  /* 表格横向平滑滚动 */
  .table-wrap { -webkit-overflow-scrolling: touch; border-radius: 20px; }

  /* 设置:单列 + 表单项竖排 */
  .settings-grid { grid-template-columns: 1fr; gap: 14px; }
  .settings-card { padding: 18px; }
  .form-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .form-row .input { width: 100%; }
  .area-row { flex-direction: column; align-items: stretch; }
  .area-row .area-input, .area-row .price-input { width: 100%; }

  /* 按钮:加大触屏高度 */
  .btn { min-height: 44px; padding: 8px 18px; }

  /* 弹窗:底部悬浮小卡片(不再全宽铺满)，宽度跟随设置里的"弹窗大小" */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: auto;
    max-width: min(var(--modal-max, 460px), calc(100vw - 28px));
    max-height: 84vh;
    margin: 0 auto 14px;
    border-radius: 24px;
  }
  .modal-header { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-footer {
    position: sticky; bottom: 0; flex-wrap: wrap;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  }
  .modal-footer .btn { flex: 1 1 auto; min-height: 46px; }
  .modal-footer .btn-success, .modal-footer .btn-primary { flex: 2 1 40%; }
  .modal-body .row-2, .modal-body .row-3 { grid-template-columns: 1fr; }

  /* 输入防 iOS 自动缩放 */
  .input, .date-input, select,
  .modal-body .field input, .modal-body .field select, .modal-body .field textarea {
    font-size: 16px;
  }

  /* 附加消费行可换行 */
  .item-row { flex-wrap: wrap; }
  .item-row input { font-size: 16px; }
  .item-row .price-col { width: 100px; }
  .item-row .qty-col { width: 80px; }

  .toast { max-width: 88vw; white-space: normal; }
  .legend { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* ===================== 提醒条 / 会员 / 券码 / 价目表 ===================== */
.alert-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 22px 0; padding: 10px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.34); border: 1px solid var(--edge);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  font-size: 13px; color: var(--text);
}
.ab-status { cursor: pointer; font-weight: 600; }
.ab-status.ok { color: #0a7f2e; }
.ab-status.warn { color: #b25b00; }
.ab-sep { color: var(--text-muted); opacity: 0.45; }
.ab-warn { margin-left: auto; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.ab-warn input {
  width: 54px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--edge);
  background: rgba(255,255,255,0.75); font-weight: 800; text-align: center; font-size: 13px;
}
.btn-warn { background: linear-gradient(180deg,#FFA940,#FA8C16); color: #fff; border: none; }
.btn-warn:hover { filter: brightness(1.05); }

.toolbar-row { display: flex; gap: 12px; align-items: center; margin: 14px 22px; flex-wrap: wrap; }
.search-input { max-width: 240px; }
.stat-text { color: var(--text-muted); font-size: 13px; font-weight: 600; margin-left: auto; }
.data-table td.money { font-weight: 800; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty-row { text-align: center; color: var(--text-muted); padding: 20px; }

.pkg-group {
  margin-bottom: 16px; padding: 12px 14px; border-radius: 16px;
  background: rgba(255,255,255,0.34); border: 1px solid var(--edge-soft);
}
.pkg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.pkg-row { display: grid; grid-template-columns: 1fr 96px 76px; gap: 8px; margin-bottom: 6px; }
.pkg-row .input { padding: 6px 10px; }
.pkg-row .num { text-align: right; }
.pkg-row .btn { white-space: nowrap; font-size: 12px; padding: 6px 8px; }
.pkg-empty { color: var(--text-muted); font-size: 12px; }

.coupon-form { max-width: 560px; }
.code-cell {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tier-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.modal-sub { color: var(--text-muted); margin-bottom: 10px; }

/* 会员扣款快捷价目 */
.price-hint { color: #b25b00; font-weight: 700; font-size: 13px; margin: 6px 0 8px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.price-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--edge);
  background: rgba(255,255,255,0.6); cursor: pointer; transition: all .15s;
}
.price-card b { font-size: 19px; font-weight: 800; color: var(--text); }
.price-card span { font-size: 12px; color: var(--text-muted); }
.price-card:hover { border-color: #165DFF; transform: translateY(-1px); }
.price-card.on { border-color: #165DFF; background: rgba(22,93,255,0.10); }
.field label.chk-line, .chk-line { display: flex !important; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.field label.chk-line input, .chk-line input { width: 16px; height: 16px; margin: 0; flex: none; }

/* ===== 剩余时间放大：远处/余光也能一眼看清 ===== */
.tc-remaining { font-size: 15px !important; font-weight: 800 !important; letter-spacing: 0.01em; }
.tc-remaining.warn { font-size: 17px !important; font-weight: 900 !important; }
.tc-remaining.over { font-size: 17px !important; font-weight: 900 !important; }
html[data-card-size="compact"] .tc-remaining { font-size: 13.5px !important; }
html[data-card-size="compact"] .tc-remaining.warn,
html[data-card-size="compact"] .tc-remaining.over { font-size: 15px !important; }
html[data-card-size="large"] .tc-remaining { font-size: 22px !important; }
html[data-card-size="large"] .tc-remaining.warn,
html[data-card-size="large"] .tc-remaining.over { font-size: 26px !important; }

/* 预警桌台加橙色描边，配合提示音更容易被注意到 */
.table-card.warning { border-color: rgba(250,140,22,0.90) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 0 0 3px rgba(250,140,22,0.35) !important; }
.toast.warn { background: rgba(250,140,22,0.95); }

/* 紧凑档卡片加高，避免放大字号后文字被压扁 */
html[data-card-size="compact"] { --tc-h: 142px; }
.table-card .tc-head,
.table-card .tc-customer,
.table-card .tc-notes,
.table-card .tc-start,
.table-card .tc-remaining { flex: 0 0 auto; }

/* 再放大一档：剩余/超时是店员最需要远看的数字 */
.tc-remaining { font-size: 16px !important; }
.tc-remaining.warn, .tc-remaining.over { font-size: 18px !important; }
html[data-card-size="compact"] { --tc-h: 148px; }
html[data-card-size="compact"] .tc-remaining { font-size: 14.5px !important; }
html[data-card-size="compact"] .tc-remaining.warn,
html[data-card-size="compact"] .tc-remaining.over { font-size: 17px !important; }

/* 卡片底部两行时间：开台 / 结束 */
html[data-card-size="compact"] { --tc-h: 168px; }
html:not([data-card-size="compact"]) .table-card { min-height: 172px; }
.tc-start { font-size: 12px !important; opacity: 1; color: var(--text-muted); }
html[data-card-size="compact"] .tc-start { font-size: 11.5px !important; }

/* 已用时长前的小标签 */
.tc-time-label { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-right: 4px; letter-spacing: 0; }
html[data-card-size="compact"] .tc-time-label { font-size: 10px; }
html[data-card-size="large"] .tc-time-label { font-size: 14px; }

/* ===== 字号统一：已使用 / 开台 / 结束 / 剩余 四行同一字号，视觉对齐 ===== */
html body .table-card .tc-time,
html body .table-card .tc-time-label,
html body .table-card .tc-start,
html body .table-card .tc-remaining { font-size: 15.5px !important; line-height: 1.5 !important; font-weight: 700; }
html[data-card-size="compact"] body .table-card .tc-time,
html[data-card-size="compact"] body .table-card .tc-time-label,
html[data-card-size="compact"] body .table-card .tc-start,
html[data-card-size="compact"] body .table-card .tc-remaining { font-size: 13.5px !important; }
html[data-card-size="large"] body .table-card .tc-time,
html[data-card-size="large"] body .table-card .tc-time-label,
html[data-card-size="large"] body .table-card .tc-start,
html[data-card-size="large"] body .table-card .tc-remaining { font-size: 21px !important; }

/* 标签统一灰、数字统一黑，只有「剩余/超时」用状态色强调 */
html body .table-card .tc-time-label { color: var(--text-muted) !important; font-weight: 700; }
html body .table-card .tc-start { color: var(--text-muted) !important; opacity: 1; }
html body .table-card .tc-remaining { font-weight: 800; }
html body .table-card .tc-remaining.warn,
html body .table-card .tc-remaining.over { font-weight: 900; }

/* 四个数字列宽一致，边缘对齐 */
html body .table-card .tc-time,
html body .table-card .tc-start,
html body .table-card .tc-remaining { font-variant-numeric: tabular-nums; letter-spacing: 0; }

html[data-card-size="compact"] { --tc-h: 180px; }
html:not([data-card-size="compact"]) .table-card { min-height: 190px; }

/* ===== 卡片信息区：四行标签+数值对齐，去掉大片空白 ===== */
html body .table-card { height: auto !important; min-height: 150px; justify-content: flex-start; }
.tc-info { margin-top: auto; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 2; }
.tc-row { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; line-height: 1.42; }
.tc-row .k { flex: 0 0 auto; min-width: 46px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.tc-row .v { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--text); }
.tc-row.warn .v { color: var(--c-pending); }
.tc-row.over .v { color: var(--c-overtime); }
.tc-idle-hint { margin: auto 0; text-align: center; color: var(--text-muted); font-size: 13px; letter-spacing: 0.12em; position: relative; z-index: 2; font-weight: 600; }
html[data-card-size="compact"] body .table-card { min-height: 146px; }
html[data-card-size="compact"] .tc-row { font-size: 12.5px; line-height: 1.4; }
html[data-card-size="compact"] .tc-row .k { min-width: 42px; font-size: 11px; }
html[data-card-size="large"] body .table-card { min-height: 210px; }
html[data-card-size="large"] .tc-row { font-size: 18px; }
html[data-card-size="large"] .tc-row .k { min-width: 66px; font-size: 15px; }

/* ===== 登录遮罩 ===== */
.login-gate { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #e9eefb, #f7eefb); }
.login-gate[hidden] { display: none; }
.login-card { width: min(92vw, 380px); background: rgba(255,255,255,0.86); backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.9); border-radius: 22px; padding: 26px 24px; box-shadow: 0 24px 60px rgba(31,42,68,0.18); }
.login-card h2 { font-size: 19px; margin-bottom: 6px; }
.login-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.login-field .input { width: 100%; background: rgba(255,255,255,0.95); border: 1px solid rgba(31,42,68,0.18); padding: 11px 14px; font-size: 15px; }
.login-field .input[readonly] { background: #eef1f7; color: #4b5568; }
.login-err { color: #e5484d; font-size: 12.5px; margin: -4px 0 10px; }
.login-btn { width: 100%; padding: 11px 0; font-size: 15px; }
#app.locked { filter: blur(14px); pointer-events: none; user-select: none; }

/* ===== 看板顶部统计卡 ===== */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.9); border-radius: 18px;
  padding: 14px 16px; text-align: center; box-shadow: 0 8px 24px rgba(31,42,68,0.08); backdrop-filter: blur(18px); }
.stat-card .v { font-size: 30px; font-weight: 800; color: #1b5fbf; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card .k { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.02em; }
@media (max-width: 720px) {
  .stat-row { gap: 8px; }
  .stat-card { padding: 10px 8px; border-radius: 14px; }
  .stat-card .v { font-size: 22px; }
  .stat-card .k { font-size: 11px; }
}

/* ===== 会员流水弹窗：宽版表格 ===== */
.log-table { min-width: 0 !important; }
.log-table th, .log-table td { padding: 10px 12px; font-size: 12.5px; }
.log-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-table td:nth-child(2) { white-space: nowrap; }
.log-table td.money { white-space: nowrap; font-weight: 600; }
.log-table td:last-child { color: var(--text-muted); }
.log-table thead th { font-size: 12px; }

/* 流水表固定列宽，避免备注被挤成一字一行 */
.log-table { table-layout: fixed; }
.log-table th:nth-child(1), .log-table td:nth-child(1) { width: 152px; }
.log-table th:nth-child(2), .log-table td:nth-child(2) { width: 58px; }
.log-table th:nth-child(3), .log-table td:nth-child(3) { width: 84px; }
.log-table th:nth-child(4), .log-table td:nth-child(4) { width: 88px; }
.log-table th:nth-child(5), .log-table td:nth-child(5) { width: auto; word-break: break-word; }

/* ===== 流水：充值/扣款区分色 ===== */
.log-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.log-tag.in { background: rgba(0, 180, 42, 0.14); color: #00872a; }
.log-tag.out { background: rgba(245, 63, 63, 0.14); color: #c42222; }
.log-table td.money.in { color: #00872a; }
.log-table td.money.out { color: #c42222; }


/* ===== 壁纸图层（独立层，可单独控制透明度/虚化/裁剪） ===== */
#wpLayer {
  position: fixed; z-index: -2; pointer-events: none;
  transform-origin: center center;
  transition: opacity .25s var(--ease-smooth), filter .25s var(--ease-smooth);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
#wpVeil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  transition: background .3s var(--ease-smooth);
}

/* ===== 壁纸高级选项 ===== */
.wp-ctl { display: flex; gap: 18px; align-items: flex-start; margin-top: 14px; flex-wrap: wrap; }
.wp-ctl-grid {
  flex: 1 1 420px; display: grid; gap: 12px 16px;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
}
.wp-ctl-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.wp-ctl-item > label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.wp-ctl-item > label b { color: var(--text); font-weight: 700; font-size: 12.5px; }
.wp-ctl-item select { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.wp-ctl-item input[type=range] { width: 100%; accent-color: var(--c-accent); padding: 0; }
.wp-live { display: flex; flex-direction: column; gap: 7px; align-items: center; }
.wp-live-box {
  position: relative; width: 170px; height: 104px; border-radius: 12px;
  overflow: hidden; border: 1px solid var(--hairline);
  background: linear-gradient(135deg, #dbe6f6, #efe3ff);
  box-shadow: var(--shadow-outer);
}
.wp-live-box > div { position: absolute; inset: 0; }
#wpLivePreviewImg { transform-origin: center center; }
.wp-live-box.empty::after {
  content: '还没有壁纸'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-muted);
}
.wp-live-tip { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.5; }
.wp-live-tip span { opacity: .72; }


/* ===== 视频壁纸 ===== */
#wpVideo {
  position: fixed; z-index: -2; pointer-events: none;
  width: 100%; height: 100%;
  transform-origin: center center;
  transition: opacity .25s var(--ease-smooth);
  background: #000;
}
#wpVideo::-webkit-media-controls { display: none !important; }
#wpLiveVideo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform-origin: center center;
}
.wp-thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-item { position: relative; }
.wp-badge {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: 8px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 11px; line-height: 1.5; letter-spacing: .02em;
}

.wp-quick { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.wp-quick-btn {
  flex: 1 1 auto; padding: 5px 8px; border-radius: 9px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, .55);
  transition: background .18s var(--ease-smooth), color .18s var(--ease-smooth);
}
.wp-quick-btn:hover { background: rgba(255, 255, 255, .85); color: var(--text); }
.wp-quick-btn:active { transform: scale(.97); }
