/* ==========================================================================
   家纺智能工作台 — 全局样式表
   苹果风格 / 极简 / 原生 CSS，无任何框架或预处理器
   ========================================================================== */

:root {
  --color-primary: #FF2442;
  --color-primary-dark: #D81B3A;
  --color-primary-tint: #FFE7EB;
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F5F5F7;
  --color-border: #E5E5E7;
  --color-text: #1D1D1F;
  --color-text-secondary: #6E6E73;
  --color-success: #34C759;
  --color-success-tint: #EAFBEE;
  --color-warning: #FF9500;
  --color-warning-tint: #FFF4E5;
  --color-danger: #FF3B30;
  --color-danger-tint: #FFEDEC;

  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.08);

  --sidebar-width: 240px;
  --topbar-height: 64px;
  --bottomnav-height: 64px;
  --content-max: 1200px;
}

* { box-sizing: border-box; }

/* 所有用 data-icon 属性注入的图标，兜底给一个安全尺寸（1em，随上下文字号自适应），
   避免裸 SVG 没有显式宽高时被浏览器按默认尺寸（很大）渲染 */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-icon] svg { width: 1em; height: 1em; display: block; flex-shrink: 0; }
/* 图标一律不参与父级 flex 收缩，避免嵌套在 flex 容器里时被压扁变形 */
svg { flex-shrink: 0; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ==========================================================================
   App Shell Layout
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

#sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 20px 40px 80px;
}

/* ---- Sidebar ---- */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
}

.sidebar-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-brand .brand-text .name {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}

.sidebar-brand .brand-text .tag {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px;
}

.sidebar-nav .nav-group-title {
  font-size: 11px;
  color: var(--color-text-secondary);
  padding: 14px 10px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text);
  font-size: 14px;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}

.sidebar-nav a .nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  flex-shrink: 0;
}
.sidebar-nav a .nav-icon svg { width: 18px; height: 18px; display: block; }

.sidebar-nav a:hover { background: rgba(0,0,0,0.04); }

.sidebar-nav a.active {
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer .workspace-pill {
  font-size: 11px;
  color: var(--color-text-secondary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
}

.sidebar-footer .workspace-logout {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
}
.sidebar-footer .workspace-logout:hover { color: var(--color-danger); }

/* ---- Topbar ---- */

#topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
  transform: translateZ(0);
  will-change: transform;
}

#topbar .topbar-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
#topbar .topbar-center .form-control { height: 32px; font-size: 13px; padding: 0 10px; }

#topbar .topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

#topbar .back-btn {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  border: none;
  color: var(--color-text);
  flex-shrink: 0;
}
#topbar .back-btn span { width: 16px; height: 16px; display: inline-flex; }
#topbar .back-btn svg { width: 16px; height: 16px; display: block; }

#topbar h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
}

#topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#topbar .topbar-logout-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
}
#topbar .topbar-logout-btn span:first-child { width: 14px; height: 14px; display: inline-flex; }
#topbar .topbar-logout-btn svg { width: 14px; height: 14px; display: block; }
#topbar .topbar-logout-btn:hover { color: var(--color-danger); border-color: var(--color-danger-tint); background: var(--color-danger-tint); }

.avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* ---- Bottom Tab Nav (mobile) ---- */

#bottomnav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* 全局是 box-sizing: border-box，如果直接把 height 定死成 --bottomnav-height，
     下面这条 padding-bottom（灵动岛/Home指示条避让区）会从这个高度里"扣掉"，
     把图标区域越挤越扁。iOS Safari/Chrome 滚动时顶部地址栏收起，safe-area-inset-bottom
     会从 0 跳到全尺寸（iPhone 上约 34px），图标区瞬间被压缩，就会看到图标顶出底板的错位。
     改成"基础高度 + 避让区"相加，让避让区纯粹是往下多加的空间，图标区域始终保持
     --bottomnav-height 不被压缩。避让区本身封顶8px（min()），留白不会太空。 */
  --bottomnav-safe-area: min(env(safe-area-inset-bottom), 8px);
  height: calc(var(--bottomnav-height) + var(--bottomnav-safe-area));
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--color-border);
  z-index: 50;
  /* 部分安卓浏览器滚动时 backdrop-filter + fixed 定位会错位闪烁，强制独立合成层修复 */
  transform: translateZ(0);
  will-change: transform;
  padding-bottom: var(--bottomnav-safe-area);
}

#bottomnav .bottomnav-inner {
  display: flex;
  height: 100%;
}

#bottomnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

#bottomnav a .bn-icon { width: 20px; height: 20px; display: inline-flex; }
#bottomnav a .bn-icon svg { width: 20px; height: 20px; display: block; }

#bottomnav a.active { color: var(--color-primary); font-weight: 600; }

/* ==========================================================================
   Cards & Common Components
   ========================================================================== */

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.section {
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.section-head .section-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Stat cards ---- */

.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  background: var(--color-primary-tint);
}
.stat-card .stat-icon svg { width: 19px; height: 19px; display: block; }

.stat-card .stat-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card .stat-foot {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.stat-card.tone-danger .stat-icon { background: var(--color-danger-tint); color: var(--color-danger); }
.stat-card.tone-warning .stat-icon { background: var(--color-warning-tint); color: var(--color-warning); }
.stat-card.tone-success .stat-icon { background: var(--color-success-tint); color: #1f8a3d; }

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: #ececee; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-danger-tint {
  background: var(--color-danger-tint);
  color: var(--color-danger);
}

.btn-pill { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 16px; }

/* ---- Tags / Badges ---- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tag-success { background: var(--color-success-tint); color: #1f8a3d; }
.tag-warning { background: var(--color-warning-tint); color: #b46200; }
.tag-danger { background: var(--color-danger-tint); color: var(--color-danger); }
.tag-neutral { background: var(--color-bg-secondary); color: var(--color-text-secondary); }
.tag-primary { background: var(--color-primary-tint); color: var(--color-primary-dark); }
.tag-gold { background: var(--color-gold-tint, #FFF1DA); color: var(--color-gold, #B9750A); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-success { background: var(--color-success); }
.dot-warning { background: var(--color-warning); }
.dot-danger { background: var(--color-danger); }

/* ---- Reminder list ---- */

.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--color-bg-secondary);
  margin-bottom: 10px;
}

.reminder-item.level-danger { background: var(--color-danger-tint); }
.reminder-item.level-warning { background: var(--color-warning-tint); }
.reminder-item.level-success { background: var(--color-success-tint); }

.reminder-item .reminder-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reminder-item .reminder-icon svg { width: 16px; height: 16px; display: block; }
.reminder-item.level-danger .reminder-icon { color: var(--color-danger); }
.reminder-item.level-warning .reminder-icon { color: var(--color-warning); }
.reminder-item.level-success .reminder-icon { color: #1f8a3d; }

.reminder-item .reminder-text { font-size: 13.5px; font-weight: 500; }
.reminder-item .reminder-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

/* ---- Kanban ---- */

.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kanban-col {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 14px;
  min-height: 120px;
}

.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.kanban-col-head .kanban-col-title {
  font-size: 13px;
  font-weight: 700;
}

.kanban-col-head .kanban-count {
  font-size: 11px;
  color: var(--color-text-secondary);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}

.order-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  display: block;
}

.order-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }

.order-card .oc-no { font-size: 11px; color: var(--color-text-secondary); }
.order-card .oc-brand { font-size: 14px; font-weight: 700; margin: 3px 0 6px; }
.order-card .oc-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--color-text-secondary); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  text-align: left;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFAFB; }

.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-success { color: var(--color-success) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.fw-bold { font-weight: 700 !important; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  color: var(--color-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}

select.form-control { appearance: none; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---- Filter bar ---- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar select.form-control {
  width: auto;
  height: 38px;
  min-width: 140px;
}

.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: var(--color-text-secondary);
}
.chip.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-box .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-box .modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-bg-secondary);
  border: none;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}

/* ==========================================================================
   二次确认弹窗
   ========================================================================== */

.confirm-box { text-align: center; padding: 6px 4px; }

/* ---- 敏感页面进入前的模糊遮罩 ---- */
.blur-gate {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.25s ease;
}
.confirm-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
}
.confirm-icon svg { width: 26px; height: 26px; }
.confirm-icon.danger { background: var(--color-danger-tint); color: var(--color-danger); }
.confirm-message { font-size: 14.5px; line-height: 1.6; color: var(--color-text); margin-bottom: 20px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ==========================================================================
   金额脱敏
   ========================================================================== */

.masked-money { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.masked-money .mm-mask { letter-spacing: 1px; color: var(--color-text-secondary); }
.masked-money .mm-eye {
  width: 15px; height: 15px;
  background: none; border: none;
  color: #c7c7cc;
  display: inline-flex;
}
.masked-money .mm-eye svg { width: 15px; height: 15px; }
.masked-money.revealed .mm-eye { color: var(--color-primary); }

/* ---- 数字徽章（合作次数 / 交易次数等） ---- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 17px;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.icon-btn-sm {
  width: 22px; height: 22px;
  background: none; border: none;
  color: var(--color-text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-btn-sm svg { width: 18px; height: 18px; }

/* ==========================================================================
   Rating stars
   ========================================================================== */

.stars { color: #FFB100; font-size: 13px; letter-spacing: 1px; }
.stars .off { color: #E5E5E7; }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-border);
}

.timeline-item.done::before { background: var(--color-success); border-color: var(--color-success); }
.timeline-item.current::before { background: var(--color-primary); border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-tint); }

.timeline-item .ti-title { font-size: 14px; font-weight: 700; }
.timeline-item .ti-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.timeline-item .ti-desc { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 4px; }

/* ==========================================================================
   Quote breakdown
   ========================================================================== */

.quote-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 14px;
}
.quote-line:last-of-type { border-bottom: none; }
.quote-line .ql-label { color: var(--color-text-secondary); }
.quote-line .ql-op { width: 20px; color: var(--color-text-secondary); text-align: center; }
.quote-line.total { border-top: 2px solid var(--color-text); margin-top: 6px; padding-top: 14px; font-size: 17px; font-weight: 700; }

/* ---- 订单详情：线条式分割，不用卡片盒子 ---- */
.line-block { border-top: 1px solid var(--color-border); padding-top: 16px; }

.material-check-row { padding: 14px 2px; border-bottom: 1px solid var(--color-border); }
.material-check-row:last-child { border-bottom: none; }
.mcr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcr-name { font-size: 13.5px; font-weight: 700; }
.mcr-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 6px; }
.mcr-note { font-size: 12.5px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.mcr-note .inline-ic { flex-shrink: 0; }

.order-payable-row { padding: 14px 2px; border-bottom: 1px solid var(--color-border); }
.order-payable-row:last-child { border-bottom: none; }
.order-payable-row .ledger-row-top { justify-content: space-between; }
.order-payable-role { font-size: 11.5px; color: var(--color-text-secondary); }

/* ==========================================================================
   Toast
   ========================================================================== */

#toast-root {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  background: rgba(29,29,31,0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toast-in 0.2s ease;
  white-space: nowrap;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }

.thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F5F5F7, #E9E9EC);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.thumb-placeholder svg { width: 20px; height: 20px; display: block; }

.inline-ic {
  display: inline-flex;
  width: 14px; height: 14px;
  vertical-align: -2.5px;
  color: var(--color-text-secondary);
  margin-right: 3px;
}
.inline-ic svg { width: 14px; height: 14px; display: block; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
}
.empty-state .empty-icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--color-text-secondary); opacity: 0.6; }
.empty-state .empty-icon svg { width: 40px; height: 40px; display: block; }

/* ==========================================================================
   主页：顶部时间条 + 订单模块（无卡片，线条分割）
   ========================================================================== */

.home-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 6px;
}
.home-header h2 { font-size: 19px; font-weight: 700; }
.home-clock { font-size: 12.5px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

.order-module { margin-top: 4px; }

.order-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--color-border);
}
.order-tab {
  padding: 4px 2px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  flex: none;
  min-width: auto;
}
.order-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 700; }

.order-list { display: flex; flex-direction: column; }

.order-row {
  display: block;
  padding: 16px 2px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.order-row:last-child { border-bottom: none; }

.order-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.order-row-title { font-size: 15px; font-weight: 700; }
.order-row-dates { font-size: 12px; color: var(--color-text-secondary); margin-top: 5px; }

.order-progress-block { margin-top: 10px; }
.order-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.order-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--color-bg-secondary);
  overflow: hidden;
}
.order-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
}

/* ---- 订单页：简化卡片 ---- */
.order-card-simple { display: block; padding: 12px 2px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.order-card-simple:last-child { border-bottom: none; }
.ocs-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ocs-title { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; }
.ocs-sub { font-size: 11px; color: var(--color-text-secondary); margin-top: 3px; }
.ocs-money { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 8px; }

.order-contact-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--color-bg-secondary); border: none;
  border-radius: 999px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: var(--color-text);
  flex-shrink: 0;
}
.order-contact-badge [data-icon] { width: 11px; height: 11px; }

/* ==========================================================================
   我的（Profile）页面
   ========================================================================== */

.profile-header-merged {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--color-border);
}
.profile-header-left { display: flex; gap: 12px; }
.profile-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.profile-header-right .btn { padding: 7px 16px; font-size: 12.5px; }
.profile-expire {
  font-size: 12px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.avatar-badge-lg {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
}
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name { font-size: 17px; font-weight: 700; }
.profile-role { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 4px; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700;
  color: var(--color-gold, #B9750A);
  background: #FFF6E5;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.vip-badge svg { width: 12px; height: 12px; }

.annual-top-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 10px;
}
.annual-primary { flex: 1; min-width: 0; }
.annual-pair { display: flex; align-items: center; flex-shrink: 0; margin-left: auto; }
.annual-pair-item { text-align: center; padding: 0 16px; position: relative; }
.annual-pair-item:first-child { padding-left: 0; }
.annual-pair-item:first-child::after {
  content: "";
  position: absolute; right: 0; top: 3px; bottom: 3px;
  width: 1px; background: var(--color-border);
}
.annual-num { font-size: 29px; font-weight: 800; letter-spacing: -0.3px; }
.annual-primary .annual-num { display: flex; align-items: baseline; gap: 4px; }
.annual-pair-item .annual-num { display: block; text-align: center; }
.annual-label { font-size: 11px; color: var(--color-text-secondary); margin-top: 4px; white-space: nowrap; }

.annual-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}
.annual-sub-item {
  padding: 12px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.annual-sub-item:nth-child(odd) { border-right: 1px solid var(--color-border); }
.annual-sub-item span { color: var(--color-text-secondary); margin-right: 8px; }
.annual-sub-item .masked-money { font-weight: 700; }

.profile-menu { display: flex; flex-direction: column; }
.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item .inline-ic { width: 16px; height: 16px; margin-right: 8px; }
.profile-menu-item .inline-ic svg { width: 16px; height: 16px; }

.fine-print { font-size: 11.5px; color: var(--color-text-secondary); line-height: 1.6; }
.fine-print.center { text-align: center; }

/* ---- 我的客户 列表行 ---- */
.customer-row {
  display: block;
  padding: 10px 2px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.customer-row:last-child { border-bottom: none; }
.customer-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.customer-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.customer-row-sub { font-size: 12px; color: var(--color-text-secondary); margin-top: 3px; }
.customer-row-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 11.5px; color: var(--color-text-secondary); }
.customer-row-meta .inline-ic { width: 12px; height: 12px; margin-right: 2px; }
.customer-row-meta .inline-ic svg { width: 12px; height: 12px; }

/* ---- 详情弹窗键值对 ---- */
.detail-kv { display: flex; flex-direction: column; }
.detail-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.detail-kv > div:last-child { border-bottom: none; }
.detail-kv span { color: var(--color-text-secondary); flex-shrink: 0; }
.detail-kv b { font-weight: 700; text-align: right; }

/* ---- 我的供应商 tab 计数角标 ---- */
.order-tab-count { font-size: 10.5px; color: var(--color-text-secondary); margin-left: 3px; }
.order-tab.active .order-tab-count { color: var(--color-primary); }

/* ---- 供应商列表行（一排一，单列） ---- */
.supplier-row { padding: 12px 2px; border-bottom: 1px solid var(--color-border); }
.supplier-row:last-child { border-bottom: none; }
.supplier-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.supplier-name { font-size: 14.5px; font-weight: 700; }
.supplier-row-contact { display: flex; gap: 16px; margin-top: 4px; font-size: 12px; color: var(--color-text-secondary); }
.supplier-row-contact .inline-ic { width: 12px; height: 12px; margin-right: 3px; }
.supplier-row-contact .inline-ic svg { width: 12px; height: 12px; }
.supplier-row-business { font-size: 12px; color: var(--color-text-secondary); margin-top: 3px; }

.supplier-row-materials {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.supplier-materials-left { flex: 1; min-width: 0; }
.supplier-price-text { font-size: 11px; color: var(--color-text-secondary); margin-top: 6px; }

.supplier-row-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.supplier-action-btn { font-size: 11.5px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.supplier-action-btn [data-icon] { width: 13px; height: 13px; }
.supplier-action-btn svg { width: 13px; height: 13px; }

/* ---- 物料/项目缩略图（供应商页 + 仓库页共用） ---- */
.stock-thumb-row { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stock-thumb { flex-shrink: 0; width: 60px; text-align: center; cursor: pointer; }
.stock-thumb-img {
  width: 60px; height: 60px;
  border-radius: 12px;
  background: var(--color-bg-secondary);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--color-text-secondary);
  overflow: hidden;
}
.stock-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.stock-thumb-img [data-icon] { width: 22px; height: 22px; }
.stock-thumb-badge {
  position: absolute; bottom: 2px; left: 2px; right: 2px;
  background: var(--color-warning); color: #fff;
  font-size: 8px; font-weight: 700; border-radius: 5px;
  padding: 1.5px 0; text-align: center;
}
.stock-thumb-bar {
  height: 5px; border-radius: 3px;
  background: var(--color-border);
  margin-top: 6px; position: relative; overflow: hidden;
}
.stock-thumb-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-success); border-radius: 3px; }
.stock-thumb-fill-pending {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, var(--color-warning), var(--color-warning) 3px, transparent 3px, transparent 6px);
  opacity: 0.85;
}
.stock-thumb-name { font-size: 9.5px; color: var(--color-text-secondary); margin-top: 4px; line-height: 1.3; }

/* ---- 仓库物料列表 ---- */
.material-row { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--color-border); align-items: center; }
.material-row:last-child { border-bottom: none; }
.material-thumb { width: 44px; height: 44px; flex-shrink: 0; cursor: pointer; }
.material-thumb [data-icon] { width: 18px; height: 18px; }
.material-row-body { flex: 1; min-width: 0; }
.material-row-name { font-size: 13.5px; font-weight: 700; }
.material-row-code { font-size: 10.5px; font-weight: 400; color: var(--color-text-secondary); }
.material-row-qty { font-size: 12px; color: var(--color-text-secondary); margin-top: 3px; font-variant-numeric: tabular-nums; }
.material-row-status-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.material-progress-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--color-bg-secondary); position: relative; overflow: hidden; }
.material-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-success); border-radius: 3px; }
.material-progress-fill-pending {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, var(--color-warning), var(--color-warning) 3px, transparent 3px, transparent 6px);
  opacity: 0.85;
}
.material-row-location { font-size: 11px; color: var(--color-text-secondary); flex-shrink: 0; font-variant-numeric: tabular-nums; text-align: right; }

/* ---- 款式样品库 ---- */
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.style-card-wrap { position: relative; }
.style-card { display: block; color: var(--color-text); }
.style-card-delete {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
}
.style-card-delete svg { width: 14px; height: 14px; }
.style-card-img {
  width: 100%; aspect-ratio: 1/1; border-radius: 14px;
  background: var(--color-bg-secondary);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary);
  overflow: hidden;
  position: relative;
}
.style-card-img [data-icon] { width: 78px; height: 78px; opacity: 0.2; }
.style-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.style-card-name { font-size: 12.5px; font-weight: 700; margin-top: 8px; line-height: 1.4; }
.style-card-meta { font-size: 11px; color: var(--color-text-secondary); margin-top: 3px; }
.style-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.style-tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: var(--color-bg-secondary); color: var(--color-text-secondary); }

.style-photo-upload {
  border: 1px dashed var(--color-border); border-radius: 12px;
  padding: 24px 0; text-align: center; color: var(--color-text-secondary); cursor: pointer;
}
.style-photo-upload svg { width: 26px; height: 26px; }
.style-photo-upload .sp-hint { font-size: 12px; margin-top: 6px; }

@media (min-width: 640px) {
  .style-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- 经营（资金总表）页面：线条分割，不用卡片 ---- */
.finance-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-top: 14px;
}
.finance-summary-item {
  padding: 14px 4px;
  text-align: center;
  border-right: 1px solid var(--color-border);
  min-width: 0;
}
.finance-summary-item:last-child { border-right: none; }
.fs-label { font-size: 11.5px; color: var(--color-text-secondary); white-space: nowrap; }
.fs-value { font-size: 16px; font-weight: 800; margin-top: 5px; letter-spacing: -0.3px; white-space: nowrap; }
.fs-value .masked-money { flex-wrap: nowrap; }
.fs-foot { font-size: 10.5px; color: var(--color-text-secondary); margin-top: 3px; white-space: nowrap; }

@media (max-width: 380px) {
  .fs-value { font-size: 14px; }
  .fs-label { font-size: 10.5px; }
}

.ledger-row { padding: 10px 2px; border-bottom: 1px solid var(--color-border); cursor: pointer; }
.ledger-row:last-child { border-bottom: none; }
.ledger-row-top { display: flex; align-items: center; gap: 8px; }
.ledger-row-id { font-size: 11px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ledger-row-name {
  font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ledger-row-nums { font-size: 12px; color: var(--color-text-secondary); line-height: 1.6; margin-top: 6px; }
.ledger-num { font-size: 14.5px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }
.ledger-row-status { font-size: 12px; margin-top: 3px; }
.ledger-action-btn {
  font-size: 10.5px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.ledger-action-btn [data-icon] { width: 11px; height: 11px; }

.ledger-progress-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--color-bg-secondary);
  overflow: hidden;
  margin-top: 8px;
  position: relative;
}
.ledger-progress-fill { height: 100%; border-radius: 3px; }
.ledger-progress-bar.payable .ledger-progress-fill { background: var(--color-danger); }
.ledger-progress-bar.receivable .ledger-progress-fill { background: var(--color-success); }
/* 刚记录的收付款：叠加在历史金额旁边的半透明段，只显示这一次 */
.ledger-progress-fill-pending { position: absolute; top: 0; bottom: 0; opacity: 0.5; }
.ledger-progress-bar.payable .ledger-progress-fill-pending { background: var(--color-danger); }
.ledger-progress-bar.receivable .ledger-progress-fill-pending { background: var(--color-success); }

.ledger-settled-divider {
  margin: 18px 0 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--color-border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.support-contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.support-contact-row .avatar-badge-lg { color: var(--color-primary-dark); font-size: 24px; }
.support-contact-row > div:nth-child(2) { flex: 1; }

.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.faq-chevron { width: 14px; height: 14px; color: #c7c7cc; transition: transform 0.15s ease; flex-shrink: 0; }
.faq-a { padding: 0 2px 16px; font-size: 13px; color: var(--color-text-secondary); line-height: 1.7; }

.about-block { padding: 4px 0; }
.about-block h3 { font-size: 16px; font-weight: 700; }

.brand-mark-lg {
  width: 48px; height: 48px; margin: 0 auto;
  background: var(--color-primary);
  color: #fff; font-size: 20px; font-weight: 800;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}

.qr-box {
  width: 100px; height: 100px;
  border: 1.5px dashed var(--color-border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #b0b0b4; font-size: 12px; line-height: 1.5;
}

/* ==========================================================================
   Login page
   ========================================================================== */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #FFF6F6 0%, #FFFFFF 45%, #F5F5F7 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  padding: 40px 32px;
  text-align: center;
}

.login-card .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.login-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.login-card .login-sub { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 28px; }
.login-card .login-foot { font-size: 12px; color: var(--color-text-secondary); margin-top: 20px; }
.login-card .login-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 14px;
}
.login-card .login-back-link:hover { color: var(--color-primary); }

/* ==========================================================================
   Mobile Collect page (dedicated app-like shell)
   ========================================================================== */

.mc-shell {
  min-height: 100vh;
  background: var(--color-bg-secondary);
  display: flex;
  justify-content: center;
}

.mc-phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

.mc-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  z-index: 10;
}

.mc-topbar .mc-back {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  border: none;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.mc-topbar h1 { font-size: 17px; font-weight: 700; }
.mc-topbar .mc-sub { font-size: 11.5px; color: var(--color-text-secondary); }

.mc-body { flex: 1; padding: 20px 20px 40px; display: flex; flex-direction: column; }

.mc-step-indicator {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  font-weight: 600;
}

.mc-question {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.4;
}

.mc-task-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }

.mc-task-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  transition: transform 0.08s ease;
}
.mc-task-btn:active { transform: scale(0.97); }
.mc-task-btn .mc-task-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mc-task-btn .mc-task-icon svg { width: 26px; height: 26px; display: block; }
.mc-task-btn .mc-task-desc { font-size: 12.5px; font-weight: 400; color: var(--color-text-secondary); margin-top: 3px; }

.mc-card-select {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  min-height: 56px;
}

.mc-select-card .mc-select-icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--color-text-secondary); }
.mc-select-card .mc-select-icon svg { width: 24px; height: 24px; display: block; }
.mc-select-card.selected .mc-select-icon { color: var(--color-primary-dark); }
.mc-select-card .mc-select-sub { font-size: 12.5px; color: var(--color-text-secondary); font-weight: 400; margin-top: 2px; }
.mc-select-card.selected { border-color: var(--color-primary); background: var(--color-primary-tint); }
.mc-select-card:active { transform: scale(0.98); }

.mc-big-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mc-big-btn {
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 18px;
  padding: 26px 14px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mc-big-btn .mc-big-icon { width: 32px; height: 32px; color: var(--color-text-secondary); }
.mc-big-btn .mc-big-icon svg { width: 32px; height: 32px; display: block; }
.mc-big-btn.selected .mc-big-icon { color: var(--color-primary-dark); }
.mc-big-btn.selected { border-color: var(--color-primary); background: var(--color-primary-tint); color: var(--color-primary-dark); }
.mc-big-btn:active { transform: scale(0.97); }

.mc-number-input {
  width: 100%;
  height: 64px;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  margin: 18px 0;
}
.mc-number-input:focus { outline: none; border-color: var(--color-primary); }

.mc-stepper { display: flex; align-items: center; gap: 14px; }
.mc-stepper button {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-secondary);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}
.mc-stepper button.plus { background: var(--color-primary); color: #fff; }
.mc-stepper button:active { transform: scale(0.9); }
.mc-stepper .mc-number-input { margin: 0; flex: 1; }

.mc-amount-input {
  font-size: 44px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-bottom: 3px solid var(--color-primary);
  padding: 10px 0;
  width: 100%;
  margin: 24px 0;
  background: transparent;
}
.mc-amount-input:focus { outline: none; }
.mc-amount-prefix { text-align: center; color: var(--color-text-secondary); font-size: 15px; }

.mc-keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: auto; }
.mc-keypad button {
  height: 56px;
  border-radius: 14px;
  border: none;
  background: var(--color-bg-secondary);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
}
.mc-keypad button:active { transform: scale(0.94); background: #ECECEE; }
.mc-keypad button.mc-key-del { font-size: 18px; }

.mc-photo-btn {
  height: 120px;
  border: 2px dashed var(--color-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  background: var(--color-bg-secondary);
  width: 100%;
}
.mc-photo-btn .mc-photo-icon { width: 30px; height: 30px; }
.mc-photo-btn .mc-photo-icon svg { width: 30px; height: 30px; display: block; }

.mc-footer { margin-top: auto; padding-top: 24px; }

.mc-btn-primary {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
  transition: transform 0.08s ease, background 0.15s ease;
}
.mc-btn-primary:active { transform: scale(0.97); background: var(--color-primary-dark); }
.mc-btn-primary:disabled { background: #F2B3B1; }

.mc-btn-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.mc-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}
.mc-summary-row span:first-child { color: var(--color-text-secondary); }
.mc-summary-row span:last-child { font-weight: 700; }

.mc-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 40px 20px;
}

.mc-result .mc-result-icon {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--color-success-tint);
  color: var(--color-success);
  display: flex; align-items: center; justify-content: center;
}
.mc-result .mc-result-icon svg { width: 44px; height: 44px; display: block; }

.mc-result h2 { font-size: 22px; font-weight: 700; }
.mc-result p { font-size: 14px; color: var(--color-text-secondary); }

.mc-progress-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.mc-progress-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); }
.mc-progress-dots span.on { background: var(--color-primary); width: 18px; border-radius: 4px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .ledger-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #sidebar { display: none; }
  #bottomnav { display: block; }
  .main-content { padding: 20px 20px 100px; font-size: 15.5px; }
  #topbar { padding: 0 20px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .ledger-grid { grid-template-columns: repeat(2, 1fr); }

  .btn { min-height: 40px; }
  .btn-lg { min-height: 52px; }
  .form-control { height: 48px; font-size: 16px; }

  /* Responsive tables -> card stacking */
  .table-wrap.responsive-table table thead { display: none; }
  .table-wrap.responsive-table table,
  .table-wrap.responsive-table tbody,
  .table-wrap.responsive-table tr,
  .table-wrap.responsive-table td { display: block; width: 100%; }
  .table-wrap.responsive-table { border: none; box-shadow: none; background: transparent; }
  .table-wrap.responsive-table tr {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 6px 4px;
    box-shadow: var(--shadow-card);
  }
  .table-wrap.responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px dashed var(--color-border);
    font-size: 14px;
    text-align: right;
  }
  .table-wrap.responsive-table td:last-child { border-bottom: none; }
  .table-wrap.responsive-table td::before {
    content: attr(data-label);
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-align: left;
  }

  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
}

@media (max-width: 420px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .mc-big-btn-row { grid-template-columns: 1fr 1fr; }
}
