@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap");

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e8eaed;
  --border-light: #f0f1f3;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ── */
#sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 22px 18px;
  border-bottom: 1px solid var(--border-light);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand-title { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

#nav { flex: 1; padding: 10px; }

.nav-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar-foot {
  padding: 14px 18px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ── Main ── */
#main {
  margin-left: 220px;
  flex: 1;
  padding: 32px 40px;
  max-width: 1200px;
}

h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.page-desc { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 0; line-height: 1.5; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

/* ── Cards & Stats ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-profit { border-color: #a7f3d0; background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); }
.stat-profit .stat-value { color: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-accent-soft { background: var(--accent-soft); color: var(--accent); border: 1px solid #a7f3d0; }
.btn-accent-soft:hover { background: #d1fae5; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.order-payments-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.order-payments-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-payments-table td:last-child { width: 72px; white-space: nowrap; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* ── Forms ── */
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; font-weight: 500; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.form-group { margin-bottom: 0; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table th {
  background: var(--bg);
  text-align: left;
  padding: 11px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  vertical-align: middle;
}

table tbody tr:hover td { background: #fafbfc; }

.money-pos { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.money-neg { color: var(--danger); font-weight: 600; font-variant-numeric: tabular-nums; }
.money-warn { color: var(--warning); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Status tags ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tag-pending { background: #f3f4f6; color: #6b7280; }
.tag-active { background: #eff6ff; color: #2563eb; }
.tag-feedback { background: #fef3c7; color: #b45309; }
.tag-tail { background: #fff7ed; color: #c2410c; }
.tag-done { background: var(--accent-soft); color: var(--accent); }
.tag-pause { background: #f3f4f6; color: #9ca3af; }

.status-select {
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
  min-width: 90px;
  border-radius: 20px;
  cursor: pointer;
}

/* ── Tips & Empty ── */
.tip {
  background: var(--accent-soft);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tip strong { color: var(--accent); }

.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ── Task cards (daily quick actions) ── */
.task-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s;
}

.task-card:hover { box-shadow: var(--shadow); }

.task-card-info { flex: 1; min-width: 0; }
.task-card-id { font-size: 12px; color: var(--accent); font-weight: 600; }
.task-card-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; background: var(--bg); padding: 4px; border-radius: 10px; width: fit-content; }

.tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-income.active { color: var(--accent); }
.tab-expense.active { color: var(--danger); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s ease;
  overflow-y: auto;
  padding: 20px 16px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.2s ease;
  margin: auto;
}

.modal-flex {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
}
.modal-head { flex-shrink: 0; padding: 20px 24px 0; }
.modal-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 24px;
  -webkit-overflow-scrolling: touch;
}
.modal-foot {
  flex-shrink: 0;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 0;
}
.modal-flex .modal-sub { margin-bottom: 0; }
.modal-flex h3 { margin-bottom: 4px; }

.modal h3 { font-size: 17px; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-foot.modal-actions { margin-top: 0; }

.modal-lg { max-width: 560px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Toast ── */
#toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success { border-left: 3px solid var(--accent); }
.toast-error { border-left: 3px solid var(--danger); }

/* ── Bars (reports) ── */
.bar-row { margin-bottom: 14px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar-track { display: flex; height: 6px; gap: 2px; border-radius: 3px; overflow: hidden; background: var(--border-light); }
.bar-inc { background: var(--accent); border-radius: 3px; }
.bar-exp { background: #fca5a5; border-radius: 3px; }
.bar-pay { background: #fcd34d; border-radius: 3px; }

/* ── Row actions ── */
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }

/* ── Inline month picker ── */
input[type="month"] { width: auto; }

/* ── Finance dashboard ── */
.hero-profit {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.hero-profit.negative { background: linear-gradient(135deg, #64748b 0%, #475569 100%); }

.hero-label { font-size: 13px; opacity: 0.85; font-weight: 500; margin-bottom: 6px; }
.hero-value { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 13px; opacity: 0.9; margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; }

.delta-up { color: #6ee7b7; font-weight: 600; }
.delta-down { color: #fca5a5; font-weight: 600; }
.delta-neutral { opacity: 0.8; }

.bridge { display: flex; flex-direction: column; gap: 8px; }

.bridge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 13.5px;
}

.bridge-item.result {
  background: var(--accent-soft);
  border: 1px solid #a7f3d0;
  font-weight: 700;
}

.bridge-bar-wrap { flex: 1; height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.bridge-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.bridge-bar.in { background: var(--accent); }
.bridge-bar.out { background: #fca5a5; }
.bridge-bar.result { background: var(--accent); }

.bridge-val { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}

.kpi-pct { font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi-name { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.kpi-ring {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--border-light) 0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  position: relative;
}

.kpi-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--surface);
  border-radius: 50%;
}

.kpi-ring span { position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: var(--accent); }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dash-grid-2 { grid-template-columns: 1fr; } }

.trend-chart { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding-top: 8px; }

.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dash-day-col { cursor: crosshair; }
.dash-day-col:hover .trend-bar { filter: brightness(1.08); }
.dash-day-tip {
  position: fixed; z-index: 9999; display: none; min-width: 168px; padding: 10px 12px;
  background: #0f172a; color: #f8fafc; border-radius: 10px; font-size: 12px; line-height: 1.65;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22); pointer-events: none;
}
.dash-day-tip strong { display: block; margin-bottom: 4px; font-size: 13px; }
.dash-day-tip .tip-pos { color: #6ee7b7; display: block; }
.dash-day-tip .tip-neg { color: #fca5a5; display: block; }
.dash-day-tip .tip-warn { color: #fcd34d; display: block; }
.dash-day-tip .tip-profit { color: #fff; display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.15); }
.dash-daily-card { overflow: visible; }
.trend-bar-wrap { width: 100%; height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.trend-bar { width: 70%; border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.3s; }
.trend-bar.pos { background: var(--accent); }
.trend-bar.neg { background: #94a3b8; }
.trend-label { font-size: 10px; color: var(--text-muted); }

.order-rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.order-rank:last-child { border-bottom: none; }
.order-rank-num { width: 22px; height: 22px; border-radius: 6px; background: var(--bg); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.order-rank-num.top { background: var(--accent-soft); color: var(--accent); }
.order-rank-info { flex: 1; min-width: 0; }
.order-rank-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-rank-meta { font-size: 11px; color: var(--text-muted); }

/* ── Daily quick entry ── */
.quick-entry { padding: 8px 0; }

.quick-amount {
  font-size: 36px !important;
  font-weight: 700;
  text-align: center;
  padding: 16px !important;
  letter-spacing: -0.02em;
}

.quick-amount::placeholder { color: var(--border); font-weight: 400; }

.amount-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.preset-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.preset-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.cat-pill {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.cat-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.cat-pill.expense-active { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }

.tx-row { cursor: pointer; transition: background 0.1s; }
.tx-row:hover td { background: var(--accent-soft) !important; }

.more-toggle {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: 4px 0;
  margin-bottom: 12px;
}

.more-toggle:hover { color: var(--accent); }

.more-fields { display: none; }
.more-fields.open { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 16px; }

.quick-submit { width: 100%; padding: 14px; font-size: 15px; margin-top: 4px; }

/* ── Period selector ── */
.period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.period-pills { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; }

.period-pill {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.period-pill.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.period-pill:hover:not(.active) { color: var(--text); }

.period-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.period-extra input[type="date"], .period-extra input[type="month"] { width: auto; font-size: 13px; }
.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 14px 12px 6px;
  font-weight: 600;
}

.nav-sub { display: block; font-size: 10px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.nav-item.active .nav-sub { color: var(--accent); opacity: 0.8; }

.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 800px) { .role-cards { grid-template-columns: 1fr; } }

.role-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: box-shadow 0.15s, transform 0.1s;
}

.role-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.role-sales { border-top: 3px solid #2563eb; }
.role-delivery { border-top: 3px solid #0d9488; }
.role-ops { border-top: 3px solid #d97706; }
.role-card-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.role-card-num { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.role-card-num span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.role-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.card-muted { background: var(--bg); border-style: dashed; }

.nav-lock { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent); font-size: 9px; }
.nav-finance { border-left: 2px solid transparent; }
.nav-finance.active { border-left-color: var(--accent); }
.nav-locked { color: var(--text-muted); font-style: italic; }
.nav-logout {
  display: block; width: calc(100% - 24px); margin: 8px 12px 12px;
  padding: 8px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: transparent; color: var(--text-muted); font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.nav-logout:hover { color: var(--text-secondary); border-color: var(--text-muted); }

.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 80px);
}
.login-card {
  width: 100%; max-width: 380px; padding: 36px 32px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-md); text-align: center;
}
.login-icon { font-size: 36px; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .page-desc { margin-bottom: 24px; }
.login-card .form-group { text-align: left; margin-bottom: 14px; }
.login-submit { width: 100%; margin-top: 8px; }
.login-back { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--text-muted); text-decoration: none; }
.login-back:hover { color: var(--accent); }

.iron-triangle { margin: 16px 0; padding: 14px 16px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border-light); }
.iron-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
.iron-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .iron-row { grid-template-columns: 1fr; } }
.sync-pay { margin: 12px 0; padding: 14px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); }
.sync-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; }
.sync-check input { margin-top: 3px; }
.sync-badge { font-size: 11px; font-weight: 600; color: #059669; background: #d1fae5; padding: 2px 8px; border-radius: 99px; }
.card-inner { }

.team-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border); margin: 1px; }
.team-chip em { font-style: normal; font-weight: 400; color: var(--text-muted); font-size: 10px; }
.chip-sales { border-color: #bfdbfe; background: #eff6ff; }
.chip-delivery { border-color: #99f6e4; background: #f0fdfa; }
.chip-ops { border-color: #fed7aa; background: #fffbeb; }

.team-roster, .team-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.team-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 140px; }
.team-card-lg { min-width: 180px; }
.team-card-head { margin-bottom: 8px; }
.team-card-stats, .team-card-body { font-size: 11px; color: var(--text-muted); }
.team-stat { margin-bottom: 4px; }
.team-stat span { font-weight: 700; color: var(--text); font-size: 16px; }

.flow-steps { display: flex; flex-direction: column; gap: 10px; }
.flow-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.flow-step span { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.detail-block { padding: 12px; background: var(--bg); border-radius: var(--radius); }
.detail-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.detail-val { font-size: 14px; font-weight: 600; }

.order-row { cursor: pointer; }
.order-row:hover { background: var(--bg); }

.role-banner {
  padding: 14px 18px; border-radius: var(--radius-lg); margin-bottom: 20px;
  border: 1px solid var(--border);
}
.role-banner-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.role-banner-kernel { font-size: 12px; color: var(--text-secondary); }
.role-banner-sales { background: linear-gradient(135deg, #eff6ff, #fff); border-color: #bfdbfe; }
.role-banner-delivery { background: linear-gradient(135deg, #f0fdfa, #fff); border-color: #99f6e4; }
.role-banner-ops { background: linear-gradient(135deg, #fffbeb, #fff); border-color: #fed7aa; }

.role-kernel { border-top: 3px solid var(--border); }
.role-kernel-sales { border-top-color: #2563eb; }
.role-kernel-delivery { border-top-color: #0d9488; }
.role-kernel-ops { border-top-color: #d97706; }
.kernel-text { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; }

.sales-funnel {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 20px;
}
.funnel-step { font-size: 12px; color: var(--text-secondary); }
.funnel-step span { display: block; font-size: 22px; font-weight: 700; color: var(--text); }
.funnel-warn span { color: #d97706; }
.funnel-ok span { color: #059669; }
.funnel-arrow { color: var(--text-muted); font-size: 14px; }

.ms-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 99px; border: 1px dashed var(--border);
  background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.ms-btn:hover { border-color: var(--accent); color: var(--accent); }
.ms-btn.ms-done { border-style: solid; border-color: #059669; background: #ecfdf5; color: #059669; }
.ms-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.lead-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lead-card {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: box-shadow 0.15s;
}
.lead-card:hover { box-shadow: var(--shadow-sm); }
.lead-won { border-color: #bbf7d0; background: #fafffe; }
.lead-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lead-name {
  border: none; background: none; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 0; font-family: inherit; color: var(--text);
}
.lead-name:hover { color: var(--accent); }
.lead-ms-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lead-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.lead-intent { font-size: 12px; color: var(--text-secondary); background: var(--bg); padding: 8px 10px; border-radius: var(--radius); margin-bottom: 10px; line-height: 1.5; }
.lead-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.voice-quick { font-size: 11px; padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--radius); flex: 1; min-width: 140px; }

.today-voice-list { display: flex; flex-direction: column; gap: 8px; }
.today-voice-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.lead-name-text { font-size: 15px; font-weight: 700; flex: 1; }
.lead-edit-btn { margin-left: auto; }
.lead-field { margin-bottom: 10px; }
.lead-field label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.lead-inline-select { width: 100%; padding: 6px 8px; font-size: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-family: inherit; }
.lead-intent-input {
  width: 100%; padding: 8px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); font-family: inherit; resize: vertical; min-height: 44px; line-height: 1.5; box-sizing: border-box;
}
.lead-intent-input:focus { border-color: var(--accent); outline: none; background: #fff; }
.lead-voice-block .voice-display { font-weight: 600; color: var(--accent); font-size: 11px; }
.time-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.time-pill {
  padding: 3px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface);
  font-size: 10px; font-weight: 600; color: var(--text-secondary); cursor: pointer; font-family: inherit;
}
.time-pill:hover { border-color: var(--accent); color: var(--accent); background: #eff6ff; }
.time-pill-clear { border-style: dashed; color: var(--text-muted); }
.time-pill-clear:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.lead-card.lead-dirty,
.lead-card.card-dirty,
.proj-card.card-dirty,
.ops-card.card-dirty,
tr[data-order-row].card-dirty,
.card-dirty-wrap.card-dirty {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.card-save-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.card-dirty .card-save-btn:not(:disabled) { animation: pulse-save 1.5s ease infinite; }
.lead-save-btn:disabled { opacity: 0.45; cursor: not-allowed; }
@keyframes pulse-save { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); } 50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0); } }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.lead-actions .lead-save-btn { min-width: 72px; }
.voice-quick { width: 100%; font-size: 11px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); box-sizing: border-box; }

/* ── 交付看板 ── */
.delivery-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.delivery-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select { padding: 6px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-family: inherit; }
.delivery-workload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workload-chip { font-size: 12px; padding: 4px 10px; background: var(--bg); border-radius: 99px; border: 1px solid var(--border); }
.workload-chip strong { color: var(--accent); margin-left: 2px; }
.workload-hot { border-color: #fca5a5; background: #fef2f2; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proj-empty { grid-column: 1 / -1; padding: 48px; text-align: center; }
.proj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s;
}
.proj-card:hover { box-shadow: var(--shadow-sm); border-color: #cbd5e1; }
.proj-card.prio-border-高 { border-left: 4px solid #dc2626; }
.proj-card.prio-border-中 { border-left: 4px solid #f59e0b; }
.proj-card.prio-border-低 { border-left: 4px solid #94a3b8; }
.proj-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.proj-id { margin-left: auto; font-size: 10px; color: var(--text-muted); font-weight: 600; }
.proj-name { font-size: 16px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.proj-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.proj-bench { margin-bottom: 10px; font-size: 12px; }
.bench-link { color: var(--accent); text-decoration: none; word-break: break-all; }
.bench-link:hover { text-decoration: underline; }
.bench-empty { font-size: 11px; color: var(--text-muted); font-style: italic; }
.warn-assign { color: #d97706; font-style: normal; font-weight: 600; }
.proj-team { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding: 8px; background: var(--bg); border-radius: var(--radius); }
.proj-team-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.proj-team-row label { width: 32px; font-size: 10px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.proj-notes { font-size: 12px; color: var(--text-secondary); background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 8px 10px; margin-bottom: 10px; line-height: 1.5; }
.proj-money { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-bottom: 10px; font-weight: 600; }
.proj-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.proj-progress label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.proj-status-select { flex: 1; font-size: 12px; padding: 4px 8px; border-radius: var(--radius); border: 1px solid var(--border); }
.proj-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prio-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.prio-high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.prio-mid { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.prio-low { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.iron-detail { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.iron-detail em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--text-muted); display: inline-block; width: 28px; margin-right: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* ── 交付 · 看板 & 快捷操作 ── */
.delivery-me-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 14px;
}
.delivery-me-bar label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.view-toggle { display: flex; gap: 4px; margin-left: auto; }
.view-toggle button {
  padding: 5px 12px; font-size: 11px; font-weight: 600; border: 1px solid var(--border);
  background: var(--bg); border-radius: var(--radius); cursor: pointer; font-family: inherit;
}
.view-toggle button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.workload-chip { cursor: pointer; transition: border-color 0.15s; }
.workload-chip:hover { border-color: var(--accent); }
.workload-chip.active { background: #eff6ff; border-color: var(--accent); }

/* Kanban board — horizontal scroll, fixed column height */
.kanban-board-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -8px;
  padding: 4px 8px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.kanban-board-wrap::-webkit-scrollbar { height: 6px; }
.kanban-board-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

.kanban-board {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-width: min(100%, 1240px);
}
.kanban-board-5 { min-width: max(100%, 1240px); }

.kanban-col {
  flex: 0 0 228px;
  width: 228px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 210px);
  max-height: calc(100vh - 210px);
  min-height: 200px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.kanban-col-label {
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.kanban-col-count {
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.kanban-col-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.kanban-col-dense .kanban-col-body { gap: 5px; padding: 6px; }
.kanban-col-body::-webkit-scrollbar { width: 5px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.kanban-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 8px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.kb-col-pending .kanban-col-head { border-top: 3px solid #94a3b8; }
.kb-col-pending .kanban-col-count { background: #f1f5f9; color: #475569; }
.kb-col-working .kanban-col-head { border-top: 3px solid #2563eb; }
.kb-col-working .kanban-col-count { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.kb-col-feedback .kanban-col-head { border-top: 3px solid #d97706; }
.kb-col-feedback .kanban-col-count { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.kb-col-tail .kanban-col-head { border-top: 3px solid #ea580c; }
.kb-col-tail .kanban-col-count { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.kb-col-done .kanban-col-head { border-top: 3px solid #16a34a; }
.kb-col-done .kanban-col-count { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* Kanban cards */
.kb-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.kb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); border-color: #cbd5e1; }
.kb-card-accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent;
}
.kb-card.prio-border-高 .kb-card-accent { background: linear-gradient(180deg, #ef4444, #dc2626); }
.kb-card.prio-border-中 .kb-card-accent { background: linear-gradient(180deg, #fbbf24, #d97706); }
.kb-card.prio-border-低 .kb-card-accent { background: #94a3b8; }
.kb-card-settled { background: linear-gradient(180deg, #f0fdf4 0%, var(--surface) 48%); border-color: #bbf7d0; }
.kb-card-unassigned { border-color: #fde68a; }
.kb-card-inner {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px 8px 14px;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}
.kb-card-inner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.kb-card-inner:hover { background: rgba(13, 148, 136, 0.03); }
.kb-card-compact .kb-card-inner { padding: 8px 10px 10px 12px; }
.kb-card-compact .kb-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
}
.kb-card-compact .kb-meta-line {
  white-space: normal;
  line-height: 1.45;
}
.kb-card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-height: 22px; min-width: 0; }
.kb-card-top-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 72%;
}
.kb-archive-hint {
  display: inline-block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.kb-archive-warn { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.kb-card-archive { border-color: #bbf7d0; }
.kb-meta-line {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-id { font-size: 10px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.04em; }
.kb-prio-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: #94a3b8;
}
.kb-prio-high .kb-prio-dot { background: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.kb-prio-mid .kb-prio-dot { background: #d97706; box-shadow: 0 0 0 2px #fde68a; }
.kb-prio-low .kb-prio-dot { background: #64748b; }
.kb-money {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap;
  flex-shrink: 0;
}
.kb-card-top-actions .kb-money { margin-left: 0; }
.kb-money-ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.kb-money-tail { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.kb-title {
  margin: 0 0 4px; font-size: 13px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted); margin-bottom: 6px;
}
.kb-assignee { font-weight: 600; color: var(--text-secondary); }
.kb-assignee-warn { color: #d97706; }
.kb-dot { opacity: 0.45; }
.kb-link-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.kb-chip {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-muted); text-decoration: none;
}
.kb-chip-site { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.kb-chip-bench { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.kb-chip-warn { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.kb-chip-muted { opacity: 0.7; }
.kb-note {
  margin: 4px 0 0; font-size: 10px; line-height: 1.45; color: var(--text-secondary);
  padding: 5px 7px; background: #fffbeb; border-radius: 6px; border: 1px solid #fde68a;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-status-rail {
  display: flex; gap: 0; border-top: 1px solid var(--border); background: var(--bg);
}
.kb-status-btn {
  flex: 1; border: none; background: transparent; padding: 7px 2px;
  font-size: 10px; font-weight: 700; color: var(--text-muted); cursor: pointer;
  font-family: inherit; transition: background 0.12s, color 0.12s;
  border-right: 1px solid var(--border);
}
.kb-status-btn:last-child { border-right: none; }
.kb-status-btn:hover { background: var(--surface); color: var(--accent); }
.kb-status-btn.active {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08);
}

/* Shopify quick access */
.kb-shopify-pill {
  display: inline-flex; align-items: center; gap: 3px;
  margin: 0; padding: 2px 6px 2px 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.01em;
  border-radius: 5px; border: 1px solid #95bf47; background: linear-gradient(180deg, #f4fae8 0%, #e8f5d6 100%);
  color: #435a1f; text-decoration: none; cursor: pointer;
  font-family: inherit; line-height: 1.2; max-width: 88px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex-shrink: 1; min-width: 0;
}
.kb-shopify-pill:hover { background: #d4ed9a; border-color: #7ab317; color: #2d3a12; }
.kb-shopify-needs {
  border-style: dashed; background: #fffbeb; border-color: #fcd34d; color: #b45309;
}
.kb-shopify-needs:hover { background: #fef3c7; }

.shopify-mark, .shopify-mark-sm {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 0; width: 22px; height: 22px;
}
.shopify-mark-sm { width: 16px; height: 16px; }
.shopify-logo { display: block; object-fit: contain; flex-shrink: 0; }

.btn-shopify {
  background: linear-gradient(180deg, #95bf47 0%, #7ab317 100%);
  border: 1px solid #6a9a12; color: #fff !important; font-weight: 700;
  box-shadow: 0 2px 8px rgba(122, 179, 23, 0.35);
}
.btn-shopify:hover { filter: brightness(1.05); transform: translateY(-1px); }

.shopify-dock {
  margin-bottom: 12px; padding: 14px; border-radius: 12px;
  border: 1px solid #c5e1a5; background: linear-gradient(145deg, #f7fce8 0%, #fff 60%);
}
.shopify-dock-empty { border-style: dashed; background: #fafdf5; }
.shopify-dock-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.shopify-dock-head strong { display: block; font-size: 13px; margin-bottom: 2px; }
.shopify-dock-head p { margin: 0; font-size: 11px; color: var(--text-muted); line-height: 1.45; }
.shopify-dock-head code { font-size: 10px; padding: 1px 5px; background: #eef6dc; border-radius: 4px; }
.shopify-dock-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.shopify-dock-meta { flex: 1; min-width: 0; }
.shopify-dock-meta strong { display: block; font-size: 14px; font-family: ui-monospace, monospace; }
.shopify-dock-meta span { font-size: 10px; color: var(--text-muted); }
.shopify-dock-meta kbd {
  font-size: 9px; padding: 1px 4px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--bg);
}
.shopify-dock-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.shopify-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 8px;
  border: 1px solid #d4e8a8; background: #fff; color: #435a1f;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.chip-icon { display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; }
.chip-icon svg { width: 14px; height: 14px; display: block; }
.shopify-chip:hover { background: #eef6dc; border-color: #95bf47; }
.shopify-dock-input-row { display: flex; gap: 8px; align-items: center; }
.shopify-dock-input-row .drawer-input { flex: 1; min-width: 0; font-size: 12px; }
.shopify-dock-edit { margin-top: 6px; }
.shopify-dock-edit summary {
  font-size: 11px; color: var(--text-muted); cursor: pointer; user-select: none;
}

.shopify-launchbar {
  margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid #c5e1a5; background: linear-gradient(180deg, #f9fdf3 0%, #fff 100%);
}
.shopify-launchbar-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.shopify-launchbar-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-left: auto; }
.shopify-launchbar-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin;
}
.shopify-launch-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 12px; border-radius: 10px; border: 1px solid #d4e8a8;
  background: #fff; text-decoration: none; color: inherit;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.shopify-launch-chip:hover {
  transform: translateY(-2px); border-color: #95bf47;
  box-shadow: 0 6px 16px rgba(122, 179, 23, 0.18);
}
.shopify-launch-name { font-size: 12px; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shopify-launch-handle { font-size: 10px; font-family: ui-monospace, monospace; color: #5a7a1a; font-weight: 600; }
.shopify-launchbar-warn {
  margin-top: 8px; font-size: 11px; color: #b45309; padding: 6px 10px;
  background: #fffbeb; border-radius: 8px; border: 1px solid #fde68a;
}

.proj-field-link label { display: inline-flex; align-items: center; gap: 4px; }
.proj-link-row, .drawer-link-row {
  display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
}
.proj-link-row .proj-inline-input, .drawer-link-row .drawer-input { flex: 1; min-width: 0; }
.link-open-btn {
  flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--accent);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.link-open-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.link-open-disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.drawer-field-link .drawer-link-row { margin-top: 4px; }

.qs-btn.qs-shopify { display: inline-flex; align-items: center; gap: 3px; background: #eef6dc; border-color: #c5e1a5; color: #435a1f; font-weight: 700; }
.qs-btn.qs-shopify-needs { display: inline-flex; align-items: center; gap: 3px; background: #fffbeb; border-color: #fcd34d; color: #b45309; }
.detail-shopify-link {
  font-family: ui-monospace, monospace; font-weight: 700; color: #5a7a1a;
}

/* Delivery drawer */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
body.drawer-open { overflow: hidden; }
.delivery-drawer-overlay {
  position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.22s ease;
}
.delivery-drawer-overlay.is-visible { opacity: 1; }
.delivery-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 94vw);
  background: var(--surface); box-shadow: -16px 0 48px rgba(15, 23, 42, 0.16);
  display: flex; flex-direction: column; transform: translateX(104%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.delivery-drawer-overlay.is-visible .delivery-drawer { transform: translateX(0); }
.delivery-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: linear-gradient(165deg, #f0fdfa 0%, #fff 55%);
}
.delivery-drawer-head-main { flex: 1; min-width: 0; }
.delivery-drawer-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.delivery-drawer-id {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--text-muted);
  padding: 2px 8px; background: var(--bg); border-radius: 6px; border: 1px solid var(--border);
}
.delivery-drawer-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.25; }
.delivery-drawer-money {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; font-weight: 600;
}
.delivery-drawer-money span {
  padding: 4px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border);
}
.drawer-tail-ok { background: #ecfdf5 !important; border-color: #a7f3d0 !important; color: #047857 !important; }
.drawer-tail-warn { background: #fff7ed !important; border-color: #fed7aa !important; color: #c2410c !important; }
.delivery-drawer-close {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; font-size: 16px; color: var(--text-muted); flex-shrink: 0;
}
.delivery-drawer-close:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.delivery-drawer-body {
  flex: 1; overflow-y: auto; padding: 16px 20px 24px; min-height: 0;
}
.drawer-proj-form { padding: 0; background: transparent; border: none; box-shadow: none; cursor: default; }
.drawer-panel {
  margin-bottom: 16px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg);
}
.drawer-panel-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.drawer-status-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
}
.drawer-status-btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 8px 4px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
  color: var(--text-secondary); transition: all 0.12s ease;
}
.drawer-status-btn:hover { border-color: var(--accent); color: var(--accent); }
.drawer-status-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}
.drawer-field { margin-bottom: 10px; }
.drawer-field:last-child { margin-bottom: 0; }
.drawer-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--text-secondary); }
.drawer-field-warn .drawer-input { border-color: #fca5a5; background: #fef2f2; }
.drawer-input, .drawer-textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-family: inherit;
}
.drawer-input:focus, .drawer-textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.drawer-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.drawer-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-drawer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.04);
}
.delivery-drawer-foot-actions { display: flex; gap: 8px; margin-left: auto; }
.drawer-proj-form.card-dirty ~ .delivery-drawer-foot .btn-primary,
.delivery-drawer-foot .btn-primary.draw-save-pulse { animation: pulse-save 1.5s ease infinite; }
.ops-api-warn {
  margin-bottom: 14px; padding: 12px 16px; border-color: #fde68a; background: #fffbeb;
  font-size: 13px; color: #92400e; line-height: 1.5;
}
.ops-api-warn code { font-size: 12px; background: #fef3c7; padding: 1px 5px; border-radius: 4px; }
@media (max-width: 520px) {
  .drawer-status-grid { grid-template-columns: repeat(3, 1fr); }
  .drawer-form-row { grid-template-columns: 1fr; }
}
.proj-card-compact { cursor: default; padding: 12px; }
.proj-card-compact .proj-name { font-size: 14px; }
.proj-quick-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.qs-btn {
  padding: 3px 8px; font-size: 10px; font-weight: 600; border: 1px solid var(--border);
  border-radius: 99px; background: var(--surface); cursor: pointer; font-family: inherit;
}
.qs-btn:hover { border-color: var(--accent); color: var(--accent); }
.qs-btn.qs-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.qs-btn.qs-bench { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.proj-notes-input {
  width: 100%; font-size: 11px; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); resize: vertical; min-height: 36px; font-family: inherit; box-sizing: border-box;
}
.modal-collapse { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.modal-collapse summary {
  padding: 10px 14px; font-size: 13px; cursor: pointer; background: var(--bg); font-weight: 600; list-style: none;
}
.modal-collapse summary::-webkit-details-marker { display: none; }
.modal-collapse[open] summary { border-bottom: 1px solid var(--border); }
.modal-collapse .collapse-body { padding: 12px 14px; }

.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ops-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.ops-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ops-field { margin-bottom: 8px; }
.ops-field label { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 3px; }
.ops-field input, .ops-field select, .ops-field textarea {
  width: 100%; padding: 6px 8px; font-size: 12px; border: 1px solid var(--border);
  border-radius: var(--radius); box-sizing: border-box; font-family: inherit;
}
.ops-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.ops-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ops-multi-select { min-height: 72px; }
.ops-metrics .ops-field input { text-align: center; }
.ops-stats {
  display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 18px; margin-bottom: 16px; align-items: center;
}
.ops-progress-wrap { flex: 1; min-width: 120px; max-width: 200px; margin-left: auto; }
.ops-progress-label { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; text-align: right; }
.ops-progress-bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.ops-progress-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24); border-radius: 999px; transition: width 0.3s ease; }
.ops-progress-matrix { background: linear-gradient(90deg, #16a34a, #4ade80); }
.ops-stat { font-size: 13px; color: var(--text-secondary); }
.ops-stat span { font-size: 22px; font-weight: 700; color: var(--text); margin-right: 4px; }
.ops-stat-warn span { color: #d97706; }
.ops-tabs { margin-bottom: 16px; }
.ops-card-matrix { border-left: 3px solid #d97706; }
.ops-card-posted { border-left-color: #16a34a; background: linear-gradient(180deg, #f0fdf4, var(--surface)); }
.matrix-summary { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; padding: 8px; background: var(--bg); border-radius: var(--radius); }
.matrix-summary em { font-style: normal; font-weight: 700; color: var(--text-muted); margin-right: 6px; font-size: 10px; }
.matrix-testing { color: #2563eb; font-weight: 600; margin-top: 4px; }
.matrix-posted-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; cursor: pointer; }
.ops-card-script { border-top: 3px solid #f59e0b; }
.mx-zone-expanded {
  border-color: #14b8a6 !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18) !important;
  transform: translateY(-2px);
}

.mx-zone-expand-hint {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.mx-zone-expanded .mx-zone-expand-hint { color: #0d9488; }

.mx-zone-plat-mini {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.mx-zone-plat-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  font-size: 9px;
  font-weight: 800;
}

.mx-zone-plat-badge.mx-zone-plat-tone-up { border-color: #bbf7d0; background: #f0fdf4; }
.mx-zone-plat-badge.mx-zone-plat-tone-down { border-color: #fecaca; background: #fef2f2; }
.mx-zone-plat-best { box-shadow: 0 0 0 1px #34d399; }
.mx-zone-plat-count-good { color: #047857; }
.mx-zone-plat-count-bad { color: #b91c1c; }

/* Zone detail expand panel */
.mx-zone-detail {
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid #99f6e4;
  background: linear-gradient(180deg, #f0fdfa, #fff);
  animation: mx-slide 0.22s ease;
}

.mx-zone-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.mx-zone-detail-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
  margin-bottom: 4px;
}

.mx-zone-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mx-zone-detail-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.mx-zone-detail-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.mx-zone-detail-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
}

.mx-zone-detail-close:hover { border-color: #fca5a5; color: #b91c1c; }

.mx-zone-best {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  margin-bottom: 12px;
}

.mx-zone-best-warn { background: #fef2f2; color: #b91c1c; }
.mx-zone-best-muted { background: var(--bg); color: var(--text-muted); font-weight: 500; }

.mx-zone-phone-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mx-zone-phone-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  font-size: 11px;
}

.mx-zone-phone-row.is-posted { border-color: #bbf7d0; background: #fafffe; }

.mx-zone-phone-id {
  font-family: ui-monospace, monospace;
  font-weight: 800;
}

.mx-zone-phone-script {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-weight: 600;
}

.mx-zone-phone-status {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}

.mx-zone-phone-row.is-posted .mx-zone-phone-status { color: #047857; }

.mx-zone-phone-plats {
  display: flex;
  gap: 4px;
}

.mx-zone-phone-plat {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1px;
  opacity: 0.45;
  filter: grayscale(0.5);
}

.mx-zone-phone-plat-good {
  opacity: 1;
  filter: none;
  border-color: #6ee7b7;
  box-shadow: 0 0 0 1px #bbf7d0;
}

.mx-zone-phone-plat-bad {
  opacity: 1;
  filter: none;
  border-color: #fca5a5;
  box-shadow: 0 0 0 1px #fecaca;
}

.mx-card-highlight {
  animation: mx-card-pulse 1.2s ease 2;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35) !important;
}

@keyframes mx-card-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.15); }
}

/* Phone manage · 6-up grid board */
.ph-grid-board {
  display: grid;
  grid-template-columns: 72px repeat(var(--ph-dir-cols, 3), minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.ph-grid-head { display: contents; }

.ph-grid-corner,
.ph-grid-colhead,
.ph-grid-rowhead {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
}

.ph-grid-corner { color: var(--text-muted); font-size: 10px; }

.ph-grid-row { display: contents; }

.ph-grid-cell {
  position: relative;
  min-height: 132px;
  padding: 8px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #fafafa;
}

.ph-grid-filled {
  border-style: solid;
  border-color: var(--border-light);
  background: var(--surface);
}

.ph-grid-count {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 999px;
}

.ph-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
  height: 100%;
  min-height: 108px;
}

.ph-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  min-height: 48px;
  transition: border-color 0.12s, transform 0.1s, box-shadow 0.12s;
  position: relative;
}

.ph-tile:hover {
  border-color: #99f6e4;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.1);
}

.ph-tile-empty {
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 300;
  border-style: dashed;
  background: transparent;
}

.ph-tile-empty:hover { color: #0d9488; border-color: #5eead4; background: #f0fdfa; }

.ph-tile-filled.ph-tile-active { background: #fffbeb; border-color: #fde68a; }
.ph-tile-filled.ph-tile-pause { opacity: 0.55; background: #f3f4f6; }

.ph-tile-id {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ph-tile-script {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.ph-tile-status {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 8px;
  color: #d97706;
}

.ph-tile-active .ph-tile-status { color: #16a34a; }

.ph-cell-add {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 4px;
  border: none;
  background: transparent;
  color: #0d9488;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.ph-cell-add:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .ph-grid-board {
    grid-template-columns: 56px repeat(var(--ph-dir-cols, 3), minmax(120px, 1fr));
    overflow-x: auto;
  }
  .mx-zone-phone-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .mx-zone-phone-plats { justify-content: flex-start; }
}
.slot-board { width: 100%; border-collapse: collapse; font-size: 12px; }
.slot-board th, .slot-board td { border: 1px solid var(--border); padding: 8px; vertical-align: top; text-align: center; }
.slot-board thead th { background: var(--bg); font-size: 11px; font-weight: 700; color: var(--text-secondary); line-height: 1.4; }
.slot-row-head { background: var(--bg); font-weight: 800; white-space: nowrap; width: 52px; }
.slot-cell { min-width: 100px; min-height: 72px; background: var(--surface); position: relative; }
.slot-multi { background: linear-gradient(180deg, #fffbeb, var(--surface)); }
.slot-count {
  font-size: 10px; font-weight: 800; color: #b45309; background: #fef3c7;
  padding: 2px 8px; border-radius: 999px; display: inline-block; margin-bottom: 6px;
}
.slot-phone-list { max-height: 140px; overflow-y: auto; padding-right: 2px; }
.slot-phone-list::-webkit-scrollbar { width: 4px; }
.slot-phone-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.slot-add-more-btn { margin-top: 6px; width: 100%; }
.slot-add-more {
  position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px;
  border: 1px dashed #d97706; background: #fffbeb; color: #d97706; border-radius: 6px;
  font-size: 14px; font-weight: 700; cursor: pointer; line-height: 1; padding: 0;
}
.slot-add-more:hover { background: #fef3c7; }
.slot-board-compact .slot-cell { min-height: 56px; padding: 6px 28px 6px 6px; }
.slot-board-compact .slot-phone-list { max-height: 88px; }
.slot-board-compact .slot-phone { padding: 4px 6px; margin-bottom: 3px; }
.slot-board-compact .slot-phone strong { font-size: 11px; }
.slot-empty { background: #fafafa; }
.slot-empty-label { color: var(--text-muted); font-size: 11px; display: block; margin-bottom: 6px; }
.slot-phone { padding: 6px 8px; border-radius: var(--radius); margin-bottom: 4px; cursor: pointer; text-align: left; border: 1px solid transparent; }
.slot-phone:last-child { margin-bottom: 0; }
.slot-phone strong { display: block; font-size: 12px; }
.slot-meta, .slot-script { font-size: 10px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.slot-posted { background: #f0fdf4; border-color: #86efac; }
.slot-pending { background: #fffbeb; border-color: #fcd34d; }
.slot-pause { background: #f3f4f6; opacity: 0.75; }
.slot-status { float: right; font-size: 14px; }

/* Phone manage · daily platform data */
.slot-board-legend {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  font-size: 11px; color: var(--text-muted); margin-bottom: 10px; padding: 0 2px;
}
.slot-board-legend span { display: inline-flex; align-items: center; gap: 5px; }
.slot-board-legend-muted { opacity: 0.75; }
.slot-board-phones .slot-board { table-layout: fixed; }
.slot-board-phones .slot-cell { min-width: 148px; padding: 6px 26px 6px 6px; vertical-align: top; }
.slot-board-phones .slot-phone-list {
  max-height: min(408px, calc(100vh - 280px));
  overflow-y: auto;
  padding-right: 3px;
}
.slot-board-phones .slot-phone-manage { padding: 5px 6px; margin-bottom: 4px; }
.slot-board-phones .slot-phone-head {
  display: flex; align-items: center; gap: 4px; min-width: 0; margin-bottom: 2px;
}
.slot-board-phones .slot-phone-head strong {
  flex: 1; min-width: 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slot-board-phones .slot-phone-script { font-size: 9px; line-height: 1.35; margin-top: 0; }
.slot-phone-summary {
  font-size: 9px; color: var(--text-secondary); margin-top: 3px; line-height: 1.35; font-weight: 500;
}
.ph-plat-strip { display: inline-flex; gap: 2px; flex-shrink: 0; }
.ph-plat-dot {
  width: 17px; height: 17px; border-radius: 4px; border: 1px solid var(--border-light);
  font-size: 9px; font-weight: 700; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text-muted); padding: 0; line-height: 1;
  font-family: inherit;
}
button.ph-plat-dot { cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
button.ph-plat-dot:hover { transform: translateY(-1px); border-color: var(--border); }
.ph-plat-good { background: #ecfdf5; border-color: #86efac; color: #047857; }
.ph-plat-bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ph-plat-none { opacity: 0.45; }

.ops-grid-config { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ops-phone-config { padding: 0; overflow: hidden; }
.ops-phone-config-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 16px; cursor: pointer; list-style: none; user-select: none;
}
.ops-phone-config-summary::-webkit-details-marker { display: none; }
.ops-phone-config-hint { margin-left: auto; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.ops-phone-config-body { padding: 0 16px 16px; border-top: 1px solid var(--border-light); }

.slot-tag { display: inline-block; font-size: 10px; font-weight: 700; color: #2563eb; background: #eff6ff; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.slot-hint { font-size: 11px; color: var(--text-muted); background: var(--bg); padding: 8px 10px; border-radius: var(--radius); margin-bottom: 8px; line-height: 1.5; }
.rec-badge { font-size: 10px; color: #16a34a; font-weight: 700; margin-left: 4px; }
.matrix-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 16px; }
.matrix-date-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.matrix-date-nav input[type="date"] { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.matrix-toolbar-meta { font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Matrix day bar — single date control */
.mx-day-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px 20px;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.mx-day-bar-main { min-width: 0; }
.mx-day-kicker {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--text-muted); margin-bottom: 6px;
}
.mx-day-kicker-today { background: #ecfdf5; color: #047857; }
.mx-day-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.mx-day-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.mx-day-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mx-day-nav-btn {
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-size: 14px; cursor: pointer; font-family: inherit; color: var(--text-secondary);
  transition: border-color 0.12s, color 0.12s;
}
.mx-day-nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mx-day-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mx-day-input {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 132px;
}
.mx-day-today-btn {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.mx-day-today-btn:hover { border-color: var(--accent); color: var(--accent); }
.mx-day-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.mx-day-pill {
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.mx-day-pill-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.mx-day-pill-ok { background: #ecfdf5; color: #047857; border: 1px solid #bbf7d0; }

@media (max-width: 900px) {
  .mx-day-bar { grid-template-columns: 1fr; }
  .mx-day-meta { justify-content: flex-start; }
}

/* Platform data in matrix stream */
.mx-item-shell { border-bottom: 1px solid var(--border-light); }
.mx-item:last-child .mx-item-shell { border-bottom: none; }
.mx-plat-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 0 16px 10px 34px;
}
.mx-plat-bar-compact { padding-top: 0; padding-bottom: 11px; }
.mx-plat-cell { display: inline-flex; align-items: center; gap: 4px; }
.mx-plat-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted); width: 14px; text-align: center; flex-shrink: 0;
}
.mx-plat-summary-inline {
  font-size: 10px; font-weight: 600; color: var(--text-secondary); margin-left: auto;
}
.mx-plat-summary {
  margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--text-secondary);
}
.mx-plat-summary-empty { font-weight: 500; color: var(--text-muted); }
.matrix-day-section { margin-bottom: 14px; }
.matrix-day-section:last-child { margin-bottom: 0; }
.matrix-day-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.ph-pill {
  min-width: 28px; padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--border-light); background: var(--bg);
  font-size: 10px; font-weight: 700; cursor: pointer; font-family: inherit;
  color: var(--text-muted); transition: all 0.12s ease;
}
.ph-pill:hover:not(.is-on) { border-color: var(--border); color: var(--text); background: var(--surface); }
.ph-pill-good.is-on { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.ph-pill-bad.is-on { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

.cat-progress { font-size: 12px; color: var(--text-secondary); }
.text-warn { color: #d97706; font-weight: 600; }
.text-ok { color: #16a34a; font-weight: 600; }
.matrix-day-card { border-left: 3px solid #d97706; }
.matrix-day-card.ops-card-posted { border-left-color: #16a34a; }

/* ── Ops modals & empty states ── */
.modal-ops { max-width: 520px; border-top: 4px solid #f59e0b; }
.modal-ops-script { border-top-color: #8b5cf6; }
.ops-modal-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 4px; }
.ops-modal-icon {
  width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #fffbeb, #fef3c7);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #fde68a;
}
.modal-ops-script .ops-modal-icon { background: linear-gradient(135deg, #f5f3ff, #ede9fe); box-shadow: inset 0 0 0 1px #ddd6fe; }
.ops-modal-form { margin-top: 12px; }
.field-hint { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.ops-chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ops-chip {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease; color: var(--text-secondary);
}
.ops-chip:hover { border-color: #fcd34d; background: #fffbeb; color: var(--text); }
.ops-chip.active {
  border-color: #f59e0b; background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}
.modal-ops-script .ops-chip.active {
  border-color: #8b5cf6; background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: #5b21b6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}
.ops-slot-preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border: 1px solid #fde68a; margin-bottom: 4px;
}
.modal-ops-script .ops-slot-preview { background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%); border-color: #ddd6fe; }
.ops-slot-preview-empty { color: var(--text-muted); font-size: 13px; justify-content: center; background: var(--bg); border-style: dashed; }
.ops-slot-preview-badge {
  font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 8px;
  background: #fff; border: 1px solid #fcd34d; color: #92400e;
}
.ops-slot-preview-dir { border-color: #93c5fd; color: #1d4ed8; }
.ops-slot-preview-arrow { font-weight: 800; color: var(--text-muted); font-size: 16px; }
.ops-slot-preview-note { width: 100%; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ops-direction-hint {
  grid-column: 1 / -1; font-size: 12px; line-height: 1.6; color: #92400e;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 10px 12px;
}
.ops-fill-template { margin-top: 6px; }
.ops-modal-tip {
  margin-top: 14px; font-size: 12px; color: var(--text-secondary); line-height: 1.6;
  background: var(--bg); border-radius: var(--radius); padding: 12px 14px;
}
.ops-empty-hero {
  grid-column: 1 / -1; text-align: center; padding: 48px 24px;
  background: linear-gradient(180deg, #fffbeb 0%, var(--surface) 60%);
  border: 1px dashed #fcd34d;
}
.ops-empty-icon { font-size: 48px; margin-bottom: 12px; filter: grayscale(0.2); }
.ops-empty-hero h3 { font-size: 18px; margin-bottom: 8px; }
.ops-empty-hero p { color: var(--text-secondary); font-size: 14px; max-width: 360px; margin: 0 auto 20px; line-height: 1.6; }
.ops-page-head { margin-bottom: 16px; align-items: flex-start; }
.ops-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-head-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ops-head-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
}
.section-badge { font-size: 11px; font-weight: 700; color: #d97706; margin-left: 8px; }
.slot-clickable { cursor: pointer; transition: background 0.15s; }
.slot-clickable:hover { background: #fffbeb; border-color: #fcd34d; }
.slot-add-hint { display: block; font-size: 11px; color: #d97706; font-weight: 700; margin-top: 4px; }
.ops-filter-bar { margin-bottom: 16px; }

/* ── 工作台待办 ── */
.wb-todos { margin-bottom: 20px; padding: 16px 18px; }
.wb-motto {
  margin-bottom: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #115e59 100%);
  border: none;
  color: #fff;
}
.wb-motto-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.wb-focus-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.wb-focus-multi { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.wb-focus-item {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, transform 0.12s;
}
.wb-focus-item:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.wb-focus-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 6px;
}
.wb-focus-core { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #99f6e4; }
.wb-focus-detail { font-size: 12px; line-height: 1.55; opacity: 0.88; }

.wb-commission {
  padding: 22px 24px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.wb-commission-warn { background: #fef2f2; border-color: #fecaca; }
.wb-comm-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.wb-comm-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
}
.wb-comm-meta { font-size: 13px; color: var(--text-secondary); }
.wb-comm-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 32px;
  padding-bottom: 18px; border-bottom: 1px solid var(--border-light);
}
.wb-comm-amount {
  font-size: 42px; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.wb-comm-kpis {
  display: flex; flex-wrap: wrap; gap: 10px; flex: 1; min-width: 200px;
}
.wb-comm-kpi {
  flex: 1; min-width: 88px; padding: 10px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border-light);
}
.wb-comm-kpi span {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 4px;
}
.wb-comm-kpi strong {
  display: block; font-size: 17px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.wb-comm-kpi-accent {
  background: #f0fdf4; border-color: #bbf7d0;
}
.wb-comm-kpi-accent strong { color: #047857; }
.wb-comm-kpi-tail {
  background: #fffbeb; border-color: #e7d5bc;
}
.wb-comm-kpi-tail strong { color: #92400e; }
.wb-comm-kpi-muted strong { color: var(--text-secondary); font-size: 15px; }
.wb-comm-note {
  margin-top: 14px; font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.wb-settle-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wb-settle-tag {
  font-size: 11px; padding: 4px 10px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border-light); color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.wb-comm-breakdown { margin-top: 18px; }
.wb-comm-breakdown-title {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 10px; letter-spacing: 0.01em;
}
.wb-comm-table-wrap { border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; }
.wb-comm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wb-comm-table th {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); padding: 8px 12px; background: var(--bg);
  border-bottom: 1px solid var(--border-light); text-align: left;
}
.wb-comm-table th.num { text-align: right; }
.wb-comm-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.wb-comm-table tr:last-child td { border-bottom: none; }
.wb-comm-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.wb-comm-shop { display: block; font-weight: 600; color: var(--text); font-size: 13px; }
.wb-comm-id { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.03em; }
.wb-comm-pending-val { color: #92400e; }
.wb-comm-detail-btn {
  flex-shrink: 0; padding: 6px 14px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary);
  border-radius: 8px; cursor: pointer; font-family: inherit; transition: border-color 0.15s, color 0.15s;
}
.wb-comm-detail-btn:hover { border-color: var(--accent); color: var(--accent); }
/* legacy commission helpers */
.wb-commission-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.wb-commission-amount { font-size: 36px; font-weight: 800; line-height: 1.1; }
.wb-commission-pending { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.wb-commission-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.wb-commission-settled { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.wb-unsettled-strong { font-weight: 700; color: #047857; }
.text-comm-unsettled { color: #047857; font-weight: 700; font-variant-numeric: tabular-nums; }
.text-comm-tail { color: #92400e; font-weight: 700; font-variant-numeric: tabular-nums; }
.comm-compact-table { font-size: 11px; }
.comm-compact-table th { font-size: 10px; padding: 6px 8px; }
.comm-compact-table td { padding: 6px 8px; vertical-align: top; }
.wb-commission-side { text-align: right; }
.wb-commission-stat span { font-size: 28px; font-weight: 800; }
.wb-commission-hint { font-size: 13px; color: var(--text-secondary); max-width: 200px; line-height: 1.5; text-align: right; }
.settle-intro { margin-bottom: 12px; padding: 12px 16px; }
.comm-logic-card { background: linear-gradient(180deg, #f8fafc, var(--surface)); border: 1px solid var(--border); }
.comm-logic-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.comm-logic-grid { display: flex; flex-direction: column; gap: 8px; }
.comm-logic-item { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
.comm-logic-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }
.comm-logic-tag.settled { background: #ecfdf5; color: #047857; }
.comm-logic-tag.pending { background: #fffbeb; color: #b45309; }
.comm-logic-tag.earned { background: #eff6ff; color: #2563eb; }
.comm-logic-tag.tail { background: #fff7ed; color: #c2410c; }
.comm-logic-tag.total { background: #f5f3ff; color: #7c3aed; }
.comm-total-col { color: var(--text-muted); font-size: 12px; }
.comm-stat-hint { display: block; font-size: 10px; font-weight: 400; color: var(--text-muted); margin-top: 2px; font-style: normal; }
.comm-detail-stat-total { background: #faf5ff; border-color: #ddd6fe; }
.comm-hint { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.comm-row-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.comm-tail-warn { color: #92400e; font-weight: 700; }
.comm-tail-ok { color: #047857; font-weight: 600; }
.comm-earned-link {
  border: none; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.comm-earned-link:hover { color: var(--accent); }
.comm-detail-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px;
}
.comm-detail-stat {
  padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg);
}
.comm-detail-stat span { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.comm-detail-stat strong { font-size: 18px; }
.comm-detail-table { font-size: 12px; }
@media (max-width: 768px) {
  .comm-detail-stats { grid-template-columns: repeat(2, 1fr); }
}
.payroll-auto-row { background: #fafafa; }
.payroll-auto-tag { font-size: 10px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; }
.dash-snapshot .stat-value { font-variant-numeric: tabular-nums; }
.wb-pcard-project { border-top: 3px solid var(--accent); }
.wb-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wb-highlight {
  border: 1px solid var(--border-light); cursor: pointer; font: inherit; font-size: 12px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px; background: var(--surface); color: var(--text-secondary);
  transition: border-color 0.15s, color 0.15s;
}
.wb-highlight:hover { border-color: var(--border); color: var(--text); }
.wb-highlight-urgent { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.wb-highlight-warn { border-color: #fde68a; color: #b45309; background: #fffbeb; }
.wb-highlight-money { border-color: #bbf7d0; color: #047857; background: #f0fdf4; }
.wb-highlight-ok { border-color: #bbf7d0; color: #047857; background: #f0fdf4; }
.wb-my-todos { display: flex; flex-direction: column; gap: 8px; }
.wb-my-todo-item {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.wb-my-todo-item:hover { background: var(--bg); border-color: #fcd34d; }
.wb-my-todo-dot { width: 8px; height: 8px; border-radius: 50%; background: #d97706; flex-shrink: 0; }
.wb-priority-0 .wb-my-todo-dot { background: #dc2626; }
.wb-personal-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 20px;
}
.wb-pcard {
  display: block; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); text-decoration: none; color: inherit; transition: box-shadow 0.15s;
}
.wb-pcard:hover { box-shadow: var(--shadow); border-color: #bfdbfe; }
.wb-pcard-num { font-size: 28px; font-weight: 800; }
.wb-pcard-num span { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.wb-pcard-label { font-size: 13px; font-weight: 700; margin-top: 4px; }
.wb-pcard-meta { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.wb-pcard-ops { border-top: 3px solid #f59e0b; }
.wb-pcard-delivery { border-top: 3px solid #2563eb; }
.wb-pcard-won { border-top: 3px solid #16a34a; }
.wb-todos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.wb-todo-col { padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.wb-todo-title { font-size: 12px; font-weight: 800; margin-bottom: 8px; color: var(--text-secondary); }
.wb-todo-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 6px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; cursor: pointer; transition: all 0.12s;
}
.wb-todo-item:hover { border-color: var(--accent); background: #f0fdf4; }
.wb-todo-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 20px; }
.wb-ops .wb-todo-title { color: #d97706; }
.wb-sales .wb-todo-title { color: #2563eb; }
.wb-delivery .wb-todo-title { color: #16a34a; }
.wb-push { margin-bottom: 20px; padding: 16px 18px; background: linear-gradient(180deg, #fffbeb, var(--surface)); }
.wb-push-list { display: flex; flex-direction: column; gap: 8px; }
.wb-push-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.lead-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal-confirm { max-width: 380px; }
.btn-danger { background: #dc2626; color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; }
.voice-quick-mini { font-size: 11px; padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.today-voice-item { gap: 8px; }
.filter-search {
  flex: 1; min-width: 160px; max-width: 280px; padding: 6px 10px; font-size: 12px;
  border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit;
}
.delivery-pills-wrap { flex-wrap: wrap; }
.filter-check { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.filter-check input { margin: 0; }
.proj-card-settled { border-color: #86efac; background: linear-gradient(180deg, #f0fdf4, var(--surface)); }
.proj-field-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.proj-field-inline label { font-size: 10px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; min-width: 28px; }
.proj-links { display: grid; gap: 6px; margin-bottom: 8px; }
.proj-field-warn .proj-website-input { border-color: #fbbf24; background: #fffbeb; }
.proj-field-warn label { color: #d97706; }
.qs-site { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.qs-site:hover { background: #d1fae5; }
.detail-site-link { font-weight: 600; color: #059669; }
.proj-inline-input, .proj-inline-select {
  flex: 1; min-width: 80px; padding: 5px 8px; font-size: 11px; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: inherit; box-sizing: border-box;
}
.proj-prio-select { flex: 0 0 56px; min-width: 56px; }
.proj-card-compact .proj-notes-input { min-height: 32px; }
.proj-card-compact .proj-field-inline .proj-inline-input { min-width: 100%; flex-basis: 100%; }

/* ── 账号系统 ── */
.nav-user { margin-top: auto; padding: 14px 16px 0; border-top: 1px solid var(--border); }
.nav-user-name { font-size: 13px; font-weight: 700; }
.nav-user-role { font-size: 11px; color: var(--text-muted); margin: 2px 0 8px; }
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: 16px; text-align: center; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.account-card { padding: 16px; }
.account-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.account-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.account-perms { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; min-height: 24px; }
.perm-tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); }
.perm-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.perm-check { font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.account-actions { display: flex; gap: 8px; }

/* ── 矩阵指挥台 ── */
.mx-command {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.mx-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #0d9488 100%);
  border: none;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.mx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
}

.mx-hero-ring-wrap {
  --pct: 0;
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  z-index: 1;
}

.mx-hero-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#34d399 calc(var(--pct) * 1%), rgba(255,255,255,0.12) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}

.mx-hero-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0.9;
}

.mx-hero-ring-text strong {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.mx-hero-copy { z-index: 1; flex: 1; min-width: 0; }

.mx-hero-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mx-hero-date {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

.mx-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mx-hero-stat {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
}

.mx-hero-stat em {
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  margin-right: 4px;
}

.mx-stat-done { background: rgba(52,211,153,0.25); }
.mx-stat-pending { background: rgba(251,191,36,0.25); }

.mx-bento {
  padding: 12px;
}

.mx-bento-board {
  display: grid;
  grid-template-columns: 72px repeat(var(--mx-dir-cols, 3), 1fr);
  gap: 8px;
  align-items: stretch;
}

.mx-bento-row {
  display: contents;
}

.mx-zone-empty {
  min-height: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 720px) {
  .mx-bento-board {
    grid-template-columns: 56px repeat(var(--mx-dir-cols, 3), minmax(0, 1fr));
    gap: 6px;
  }
  .mx-bento-colhead { font-size: 10px; padding: 6px 2px; }
  .mx-bento-rowhead { font-size: 11px; }
}

.mx-bento-corner {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-end;
  padding: 0 4px 6px;
  line-height: 1.2;
}

.mx-bento-colhead {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 8px 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ecfdf5, var(--bg));
  border: 1px solid #99f6e4;
  color: #0f766e;
}

.mx-bento-rowhead {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  writing-mode: horizontal-tb;
}

.mx-cat-2c.mx-bento-rowhead { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.mx-cat-wm.mx-bento-rowhead { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.mx-cat-bf.mx-bento-rowhead { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.mx-cat-g0.mx-bento-rowhead { color: #059669; background: #ecfdf5; border-color: #6ee7b7; }
.mx-cat-g1.mx-bento-rowhead { color: #2563eb; background: #eff6ff; border-color: #93c5fd; }
.mx-cat-g2.mx-bento-rowhead { color: #9333ea; background: #faf5ff; border-color: #d8b4fe; }
.mx-cat-g3.mx-bento-rowhead { color: #db2777; background: #fdf2f8; border-color: #f9a8d4; }

/* ── 阵地配置弹窗 ── */
.modal-ops-taxonomy { max-width: 720px; }
.tax-section { margin-bottom: 20px; }
.tax-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.tax-table { font-size: 13px; min-width: 100%; }
.tax-table th { font-size: 11px; padding: 8px 10px; }
.tax-table td { padding: 8px 10px; vertical-align: middle; }
.tax-table input[type="text"] {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 13px;
}
.tax-check { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.tax-actions { white-space: nowrap; }
.tax-actions .btn { min-height: 32px; padding: 4px 8px; }

.mx-zone {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 8px;
  min-height: 108px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.mx-zone:hover {
  border-color: #99f6e4;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.mx-zone-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,0.15);
}

.mx-zone-complete {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4, var(--surface));
}

.mx-zone-head {
  display: none;
}

.mx-zone-title {
  display: none;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  color: var(--text);
  line-height: 1.3;
}

@media (max-width: 560px) {
  .mx-hero { flex-direction: column; text-align: center; }
  .mx-hero-stats { justify-content: center; }
}

.mx-zone-ring {
  --pct: 0;
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto;
}

.mx-zone-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.mx-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.mx-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.mx-zone-complete .mx-ring-fill { stroke: #22c55e; }

.mx-zone-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.mx-zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  min-height: 22px;
}

.mx-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.mx-chip-done {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.mx-chip-more {
  background: var(--accent-soft);
  border-color: #99f6e4;
  color: var(--accent);
}

.mx-zone-add {
  font-size: 10px;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 6px;
}

.mx-zone-add:hover { text-decoration: underline; }

.mx-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mx-filter {
  font-family: inherit;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
}

.mx-filter b { font-weight: 700; color: var(--text); margin-left: 4px; }

.mx-filter:hover { border-color: #99f6e4; }

.mx-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mx-filter.active b { color: #fff; }

.mx-filter-warn.active { background: #d97706; border-color: #d97706; }
.mx-filter-ok.active { background: #16a34a; border-color: #16a34a; }
.mx-filter-zone { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.mx-filter-ghost { background: transparent; border-style: dashed; }

.mx-stream-wrap { padding: 0; overflow: hidden; }

.mx-stream-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
}

.mx-stream-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.mx-stream { max-height: min(72vh, 520px); overflow-y: auto; padding: 10px 12px 14px; }

/* ── Matrix digest (三维度归纳) ── */
.mx-digest { padding: 16px 18px; }
.mx-digest-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 20px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light);
}
.mx-digest-kicker {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
}
.mx-digest-title { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.mx-trend { display: flex; align-items: flex-end; gap: 6px; flex: 1; justify-content: flex-end; min-width: 200px; }
.mx-trend-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 6px 2px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; cursor: pointer; font-family: inherit; min-width: 36px; transition: all 0.12s;
  position: relative;
}
.mx-trend-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 188px; padding: 10px 12px; border-radius: 12px; background: #0f172a; color: #f8fafc;
  font-size: 11px; line-height: 1.45; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  z-index: 30; text-align: left;
}
.mx-trend-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #0f172a;
}
.mx-trend-day:hover .mx-trend-tip, .mx-trend-day:focus-visible .mx-trend-tip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-2px);
}
.mx-trend-tip-head { font-size: 12px; font-weight: 800; margin-bottom: 8px; color: #fff; }
.mx-trend-tip-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; color: #cbd5e1; }
.mx-trend-tip-row b { color: #fff; font-weight: 700; }
.mx-trend-tip-plats {
  display: flex; flex-direction: column; gap: 5px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.mx-trend-tip-plat { display: flex; align-items: center; gap: 8px; }
.mx-trend-tip-good { color: #6ee7b7; font-weight: 700; }
.mx-trend-tip-bad { color: #fca5a5; font-weight: 700; margin-left: auto; }
.mx-trend-tip-foot { margin-top: 8px; font-size: 9px; color: #64748b; text-align: center; }
.mx-trend-day:hover { background: var(--bg); border-color: var(--border-light); }
.mx-trend-day.is-active { background: #ecfdf5; border-color: #6ee7b7; }
.mx-trend-bar-wrap { display: flex; align-items: flex-end; height: 36px; width: 100%; justify-content: center; }
.mx-trend-bar {
  display: block; width: 14px; min-height: 4px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #34d399, #14b8a6); transition: height 0.2s;
}
.mx-trend-day.is-active .mx-trend-bar { background: linear-gradient(180deg, #10b981, #059669); }
.mx-trend-label { font-size: 9px; color: var(--text-muted); font-weight: 600; }
.mx-trend-num { font-size: 10px; font-weight: 800; color: var(--text-secondary); }
.mx-digest-grid {
  display: grid; grid-template-columns: minmax(140px, 0.85fr) minmax(180px, 1.2fr) minmax(200px, 1fr); gap: 16px;
}
@media (max-width: 960px) {
  .mx-digest-grid { grid-template-columns: 1fr; }
  .mx-trend { justify-content: flex-start; }
}
.mx-digest-col-title { font-size: 11px; font-weight: 700; color: var(--text-muted); margin: 0 0 10px; }
.mx-digest-kpi { margin-bottom: 10px; }
.mx-digest-kpi-secondary { opacity: 0.85; }
.mx-digest-kpi-main { font-size: 12px; color: var(--text-secondary); }
.mx-digest-kpi-main em {
  font-style: normal; font-size: 26px; font-weight: 800; color: var(--text);
  letter-spacing: -0.03em; margin-right: 2px;
}
.mx-digest-kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mx-digest-zones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mx-digest-chip {
  font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border-light); color: var(--text-secondary);
}
.mx-digest-chip b { margin-left: 4px; color: var(--text); }
.mx-digest-list { display: flex; flex-direction: column; gap: 6px; }
.mx-digest-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 4px 8px; align-items: center;
  font-size: 11px; padding: 6px 8px; border-radius: 8px; background: var(--bg);
}
.mx-digest-row-main { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 1 / -1; }
.mx-digest-row-meta { font-size: 10px; color: var(--text-muted); }
.mx-digest-row-val { font-weight: 700; color: var(--text-secondary); }
.mx-digest-perf { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.mx-digest-perf-good { background: #ecfdf5; color: #047857; }
.mx-digest-perf-bad { background: #fef2f2; color: #b91c1c; margin-left: 4px; }
.mx-digest-muted, .mx-digest-empty { font-size: 11px; color: var(--text-muted); }
.mx-digest-platforms { display: flex; flex-direction: column; gap: 10px; }
.mx-digest-plat {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--border-light);
}
.mx-digest-plat-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 700; }
.mx-digest-plat-good { color: #047857; }
.mx-digest-plat-bad { color: #b91c1c; }
.mx-digest-plat-muted { color: var(--text-muted); font-weight: 600; font-size: 11px; }
.mx-digest-hint { margin: 10px 0 0; font-size: 10px; color: var(--text-muted); }

/* ── Platform logos ── */
.mx-plat-logo { display: block; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.mx-plat-logo-sm { width: 16px; height: 16px; border-radius: 4px; }
.mx-plat-logo-md { width: 28px; height: 28px; }
.mx-plat-logo-lg { width: 32px; height: 32px; }
.mx-plat-bar-logos { display: flex; gap: 10px; align-items: stretch; padding: 0 !important; flex-wrap: nowrap; }
.mx-plat-unit {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 6px 4px 5px; border-radius: 10px; border: 2px solid var(--border-light); background: var(--bg);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.mx-plat-unit.is-good { border-color: #6ee7b7; box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15); background: #f0fdf4; }
.mx-plat-unit.is-bad { border-color: #fca5a5; box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12); background: #fef2f2; }
.mx-plat-toggle { display: flex; width: 100%; gap: 3px; }
.mx-plat-good, .mx-plat-bad {
  flex: 1; min-height: 26px; padding: 4px 0; border-radius: 6px; border: 1px solid var(--border-light);
  background: var(--surface); font-family: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
  color: var(--text-muted); transition: all 0.1s;
}
.mx-plat-good:hover:not(.is-on) { border-color: #6ee7b7; color: #047857; background: #ecfdf5; }
.mx-plat-bad:hover:not(.is-on) { border-color: #fca5a5; color: #b91c1c; background: #fef2f2; }
.mx-plat-good.is-on { background: #10b981; border-color: #10b981; color: #fff; }
.mx-plat-bad.is-on { background: #ef4444; border-color: #ef4444; color: #fff; }

/* ── Matrix stream cards (compact grid) ── */
.mx-stream-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 1200px) {
  .mx-stream-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .mx-stream-grid { grid-template-columns: 1fr; }
}

.mx-card {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  grid-template-rows: auto auto;
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.2s, transform 0.2s;
  min-height: 78px;
}

.mx-card:hover { border-color: #99f6e4; box-shadow: 0 2px 12px rgba(20, 184, 166, 0.08); }
.mx-card-done { border-color: #bbf7d0; background: linear-gradient(135deg, #fff, #f0fdf4); }
.mx-card-pending { border-left: 3px solid #fbbf24; }
.mx-card-done { border-left: 3px solid #22c55e; }
.mx-card-leaving { opacity: 0; transform: scale(0.98); pointer-events: none; }
.mx-card-open { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

.mx-post-btn {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border: none;
  border-right: 1px solid var(--border-light);
  background: #fffbeb;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}

.mx-post-btn:hover { background: #fef3c7; }
.mx-post-btn.is-posted { background: #ecfdf5; }
.mx-post-btn.is-posted:hover { background: #d1fae5; }
.mx-post-btn-loading { opacity: 0.6; pointer-events: none; }

.mx-post-icon {
  font-size: 14px;
  font-weight: 800;
  color: #047857;
  line-height: 1;
}

.mx-post-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #b45309;
}

.mx-post-btn.is-posted .mx-post-text { color: #047857; }

.mx-post-count {
  font-size: 9px;
  font-weight: 600;
  color: #047857;
  opacity: 0.85;
}

.mx-post-undo {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  max-width: 44px;
}

.mx-card-main {
  padding: 8px 8px 6px;
  min-width: 0;
  grid-column: 2;
}

.mx-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 4px;
}

.mx-card-id {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mx-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  white-space: nowrap;
}

.mx-tag-cat { border-color: transparent; }
.mx-tag-dir { color: var(--text-muted); background: transparent; border-style: dashed; }

.mx-scan-strip {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
}

.mx-scan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
  background: var(--bg);
  overflow: hidden;
  padding: 1px;
}

.mx-scan .mx-plat-logo { width: 100%; height: 100%; border-radius: 4px; }

.mx-scan-good { border-color: #6ee7b7; box-shadow: 0 0 0 1px #bbf7d0; }
.mx-scan-bad { border-color: #fca5a5; box-shadow: 0 0 0 1px #fecaca; }
.mx-scan-none { opacity: 0.5; filter: grayscale(0.6); }

.mx-card-script {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  line-height: 1.3;
}

.mx-plat-bar-card {
  padding: 0 !important;
  gap: 8px !important;
  margin-top: 2px;
}

.mx-plat-bar-card .mx-plat-unit { min-width: 0; }
.mx-plat-bar-card .mx-plat-logo-md { width: 26px; height: 26px; }
.mx-plat-bar-card .mx-plat-good,
.mx-plat-bar-card .mx-plat-bad { min-height: 24px; font-size: 10px; }

.mx-card-more {
  grid-row: 1 / 3;
  grid-column: 3;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  align-self: start;
  margin-top: 6px;
}

.mx-card-more:hover { color: var(--accent); }

.mx-card-drawer {
  display: none;
  grid-column: 1 / -1;
  padding: 0 10px 10px;
  border-top: 1px dashed var(--border-light);
  animation: mx-slide 0.18s ease;
}

.mx-card-open .mx-card-drawer { display: block; }

.matrix-summary-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 11px;
  margin-bottom: 10px;
}

.matrix-summary-compact em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.matrix-drawer-hint {
  font-size: 10px;
  color: var(--text-muted);
  align-self: center;
}

.ph-pill-loading { opacity: 0.5; pointer-events: none; }

.mx-item { border-bottom: none; }
.mx-item:last-child { border-bottom: none; }

.mx-row {
  display: grid;
  grid-template-columns: 8px 72px 1fr 1.2fr auto 20px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.mx-row:hover { background: var(--bg); }

.mx-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
}

.mx-item-done .mx-row-dot { background: #22c55e; }

.mx-row-label {
  font-weight: 700;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.mx-row-slot {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mx-row-script {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mx-row-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fffbeb;
  color: #b45309;
  white-space: nowrap;
}

.mx-item-done .mx-row-badge {
  background: #ecfdf5;
  color: #047857;
}

.mx-row-chevron {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
}

.mx-item-body {
  display: none;
  padding: 0 16px 14px 34px;
  animation: mx-slide 0.2s ease;
}

.mx-item-open .mx-item-body { display: block; }

@keyframes mx-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .mx-row {
    grid-template-columns: 8px 1fr auto 16px;
    grid-template-rows: auto auto;
  }
  .mx-row-label { grid-column: 2; }
  .mx-row-slot { grid-column: 2; grid-row: 2; font-size: 10px; }
  .mx-row-script { display: none; }
  .mx-row-badge { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .mx-row-chevron { grid-column: 4; grid-row: 1 / 3; align-self: center; }
  .mx-plat-bar { padding-left: 16px; padding-right: 12px; }
  .mx-plat-summary-inline { flex: 0 0 100%; margin-left: 0; margin-top: 2px; }
}

.mx-stream-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.mx-stream-empty span { font-size: 32px; display: block; margin-bottom: 8px; }
.mx-stream-empty p { font-size: 13px; }

.nav-ext::after {
  content: "↗";
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════
   Mobile shell & responsive (≤768px)
   ══════════════════════════════════════════════════════════ */
.mobile-topbar,
.mobile-bottomnav,
.nav-backdrop {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --mobile-top: calc(52px + env(safe-area-inset-top, 0px));
    --mobile-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  body {
    flex-direction: column;
    padding-top: var(--mobile-top);
    padding-bottom: var(--mobile-bottom);
    overflow-x: hidden;
  }

  body.no-bottomnav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Top bar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-top);
    padding: 0 12px;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    box-shadow: var(--shadow-sm);
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg);
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-topbar-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Sidebar drawer */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  #sidebar {
    width: min(280px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
    box-shadow: var(--shadow-md);
  }

  body.nav-open #sidebar {
    transform: translateX(0);
  }

  .nav-item {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Bottom tab bar */
  .mobile-bottomnav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 90;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  }

  .mobile-bottomnav.hidden {
    display: none;
  }

  .mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border: none;
    background: none;
    color: var(--text-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-btn svg {
    width: 22px; height: 22px; display: block;
  }

  .mob-tab-icon {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; line-height: 0;
  }

  .mob-tab-icon svg {
    width: 22px; height: 22px; display: block;
  }

  .mob-tab-label {
    line-height: 1.2;
  }

  .mob-tab.active {
    color: var(--accent);
  }

  .mob-tab-more {
    opacity: 0.85;
  }

  /* Main content */
  #main {
    margin-left: 0;
    padding: 16px 14px 24px;
    max-width: none;
    width: 100%;
  }

  h1 { font-size: 20px; }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-head .btn,
  .page-head-actions {
    width: 100%;
  }

  .page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-head-actions .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    min-height: 44px;
  }

  .card {
    padding: 16px;
    margin-bottom: 14px;
    border-radius: var(--radius);
  }

  /* Touch-friendly controls */
  .btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .btn-sm {
    min-height: 40px;
    padding: 8px 12px;
  }

  /* iOS Safari：输入框字体 <16px 时聚焦会自动放大页面，统一 16px 防止拉近 */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  .status-select,
  .lead-inline-select,
  .lead-intent-input,
  .voice-quick,
  .filter-select,
  .proj-status-select,
  .proj-notes-input,
  .ops-field input,
  .ops-field select,
  .ops-field textarea,
  .period-extra input,
  .matrix-date-nav input {
    font-size: 16px !important;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]),
  select,
  textarea {
    min-height: 44px;
  }

  textarea { min-height: 88px; }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ops-field-row {
    grid-template-columns: 1fr;
  }

  /* Tables horizontal scroll */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .table-wrap table {
    min-width: 560px;
  }

  table th, table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Stats & pills */
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px !important;
  }

  .period-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .period-pill {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 14px;
  }

  .ops-stats {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ops-progress-wrap {
    max-width: none;
    margin-left: 0;
    width: 100%;
  }

  /* Modals full-screen-ish */
  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal {
    max-width: none;
    min-height: 100%;
    border-radius: 0;
    margin: 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .modal-flex {
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .modal-head { padding: 16px 16px 0; }
  .modal-scroll-body { padding: 12px 16px; }
  .modal-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-actions .btn {
    width: 100%;
  }

  #toast-root {
    top: calc(var(--mobile-top) + 8px);
    left: 12px;
    right: 12px;
  }

  .toast {
    max-width: none;
  }

  /* Workbench mobile */
  .wb-motto {
    padding: 16px;
  }

  .wb-motto-text {
    font-size: 15px;
    line-height: 1.55;
  }

  .wb-focus-multi {
    grid-template-columns: 1fr;
  }

  .wb-commission {
    padding: 18px 16px;
  }

  .wb-comm-hero {
    flex-direction: column; align-items: stretch; gap: 14px;
  }

  .wb-comm-amount {
    font-size: 32px;
  }

  .wb-comm-kpis {
    min-width: 0;
  }

  .wb-comm-kpi {
    min-width: calc(50% - 5px);
  }

  .wb-commission-side,
  .wb-commission-hint {
    text-align: left;
    max-width: none;
  }

  .wb-commission-amount {
    font-size: 28px;
  }

  .wb-personal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .wb-pcard-num {
    font-size: 22px;
  }

  .wb-todos-grid {
    grid-template-columns: 1fr;
  }

  .wb-push-item {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Finance dashboard */
  .dash-grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-profit {
    padding: 20px 18px;
    margin-bottom: 16px;
  }

  .hero-value {
    font-size: 32px;
  }

  .hero-sub {
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
  }

  .period-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .period-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .period-extra input,
  .period-extra .btn {
    flex: 1;
    min-width: 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .trend-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Matrix command center — card list layout */
  .mx-hero {
    flex-direction: column;
    text-align: center;
    padding: 18px 16px;
  }

  .mx-hero-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .mx-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -4px;
  }

  .mx-filter {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 12px;
  }

  .matrix-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .matrix-date-nav {
    justify-content: space-between;
  }

  .matrix-date-nav input[type="date"] {
    flex: 1;
    min-height: 44px;
  }

  .mx-bento-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mx-bento-board > :not(.mx-zone) {
    display: none !important;
  }

  .mx-bento-row {
    display: contents;
  }

  .mx-zone {
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: auto;
    padding: 14px;
    gap: 12px;
  }

  .mx-zone-title {
    display: block;
    flex: 1;
    min-width: 0;
    order: 1;
  }

  .mx-zone-ring {
    order: 2;
    margin: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
  }

  .mx-zone-chips {
    display: flex;
    flex: 0 0 100%;
    order: 3;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 4px;
  }

  .mx-zone {
    flex-wrap: wrap;
  }

  /* Kanban / sales */
  .kanban-board-wrap {
    margin: 0 -4px;
    padding: 4px 4px 8px;
  }

  .kanban-board,
  .kanban-board-5 {
    min-width: 100%;
    flex-direction: column;
  }

  .kanban-col {
    flex: none;
    width: 100%;
    height: auto;
    max-height: min(420px, 55vh);
  }

  .kb-status-btn {
    min-height: 40px;
    font-size: 11px;
  }

  .delivery-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle button {
    flex: 1;
    min-height: 40px;
  }

  /* Login */
  .login-wrap {
    padding: 24px 16px;
    min-height: calc(100vh - var(--mobile-top));
    min-height: calc(100dvh - var(--mobile-top));
  }

  .login-card {
    width: 100%;
    max-width: none;
    padding: 24px 20px;
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

  /* Nav user block in drawer */
  .nav-user {
    padding: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
  }

  .nav-logout {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
  }
}

@media (max-width: 400px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

  .wb-personal-grid {
    grid-template-columns: 1fr;
  }

  .mob-tab-label {
    font-size: 9px;
  }
}
