/* dashboard.css — Dashboard / User Center page styles */

/* ── Hero ────────────────────────────────────────────────── */
.db-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  text-align: left;
  max-width: var(--container-max);
}
.db-hero-text h1 { font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 8px; }
.db-hero-text p { font-size: 15px; color: var(--c-text-2); line-height: 1.6; margin-bottom: 20px; }
.db-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.db-wave { display: inline-block; width: 28px; height: 28px; background: var(--c-accent); border-radius: 50%; vertical-align: middle; position: relative; }
.db-wave::after { content: '👋'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.db-hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--c-bg-1);
  border: 1px solid var(--c-border-1);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  min-width: 320px;
}
.db-hero-meta-item { display: flex; flex-direction: column; gap: 2px; }
.db-hero-meta-label { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 1px; }
.db-hero-meta-value { font-size: 14px; font-weight: 600; color: var(--c-text-1); }

/* ── KPI Cards ───────────────────────────────────────────── */
.db-kpi-sec { padding: 32px 0 0; }
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.db-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--c-bg-1);
  border: 1px solid var(--c-border-1);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
  text-decoration: none;
}
.db-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.db-kpi-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-2);
  flex-shrink: 0;
}
.db-kpi-icon svg { width: 22px; height: 22px; }
.db-kpi-pending .db-kpi-icon { background: rgba(234,179,8,0.12); color: var(--c-accent-strong); }
.db-kpi-projects .db-kpi-icon { background: rgba(59,130,246,0.12); color: #3b82f6; }
.db-kpi-spend .db-kpi-icon { background: rgba(22,163,74,0.12); color: #16a34a; }
.db-kpi-time .db-kpi-icon { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.db-kpi-quotes .db-kpi-icon { background: rgba(220,38,38,0.12); color: var(--c-danger); }
.db-kpi-body { flex: 1; min-width: 0; }
.db-kpi-label { font-size: 12px; color: var(--c-text-3); margin-bottom: 4px; }
.db-kpi-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--c-text-1); font-family: var(--font-mono); }
.db-kpi-unit { font-size: 14px; font-weight: 600; margin-left: 2px; }
.db-kpi-trend { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }
.db-up { color: #16a34a; }
.db-warn { color: #d97706; }

/* ── Main Grid ───────────────────────────────────────────── */
.db-main-sec { padding: 32px 0; }
.db-main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.db-main-left { display: flex; flex-direction: column; gap: 24px; }
.db-main-right { display: flex; flex-direction: column; gap: 24px; }

/* ── Card ────────────────────────────────────────────────── */
.db-card {
  background: var(--c-bg-1);
  border: 1px solid var(--c-border-1);
  border-radius: var(--radius-2);
  padding: 20px 24px;
  box-shadow: var(--shadow-1);
}
.db-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.db-card-head h3 { font-size: 16px; font-weight: 700; color: var(--c-text-1); }
.db-card-link { font-size: 13px; color: var(--c-accent-strong); text-decoration: none; font-weight: 500; }
.db-card-link:hover { text-decoration: underline; }
.db-card-count { font-size: 12px; background: var(--c-accent); color: var(--c-ink); border-radius: var(--radius-pill); padding: 1px 8px; font-weight: 700; margin-left: 6px; }

/* ── Order List ──────────────────────────────────────────── */
.db-order-list { list-style: none; padding: 0; margin: 0; }
.db-order-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border-1);
}
.db-order-item:last-child { border-bottom: none; }
.db-order-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-order-thumb svg { width: 20px; height: 20px; }
.db-order-meta { flex: 1; min-width: 0; }
.db-order-no { font-size: 14px; font-weight: 600; color: var(--c-text-1); }
.db-order-sub { font-size: 12px; color: var(--c-text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-order-status {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-pill); white-space: nowrap;
}
.db-st-progress { background: rgba(234,179,8,0.12); color: #b45309; }
.db-st-shipped { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.db-st-done { background: rgba(22,163,74,0.12); color: #15803d; }
.db-st-review { background: rgba(139,92,246,0.12); color: #6d28d9; }
.db-st-draft { background: rgba(0,0,0,0.06); color: var(--c-text-3); }
.db-st-warn { background: rgba(217,119,6,0.12); color: #b45309; }
.db-order-amount { font-size: 14px; font-weight: 700; color: var(--c-text-1); font-family: var(--font-mono); white-space: nowrap; min-width: 80px; text-align: right; }
.db-order-action {
  font-size: 12px; font-weight: 600; color: var(--c-accent-strong);
  text-decoration: none; padding: 4px 12px; border-radius: var(--radius-1);
  border: 1px solid var(--c-accent); transition: background 0.15s;
  white-space: nowrap;
}
.db-order-action:hover { background: var(--c-accent); color: var(--c-ink); }

/* ── Project List ────────────────────────────────────────── */
.db-proj-list { list-style: none; padding: 0; margin: 0; }
.db-proj-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border-1);
}
.db-proj-item:last-child { border-bottom: none; }
.db-proj-info { flex: 1; min-width: 0; }
.db-proj-name { font-size: 14px; font-weight: 600; color: var(--c-text-1); }
.db-proj-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); margin-left: 8px; }
.db-st-warn.db-proj-pill { background: rgba(217,119,6,0.12); color: #b45309; }
.db-proj-meta { font-size: 12px; color: var(--c-text-3); margin-top: 3px; }
.db-proj-progress { display: flex; align-items: center; gap: 8px; width: 160px; }
.db-proj-bar { flex: 1; height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; overflow: hidden; }
.db-proj-bar span { display: block; height: 100%; border-radius: 3px; }
.db-proj-pct { font-size: 13px; font-weight: 700; color: var(--c-text-2); font-family: var(--font-mono); min-width: 36px; text-align: right; }
.db-proj-due { font-size: 12px; color: var(--c-text-3); white-space: nowrap; min-width: 70px; text-align: right; }
.db-due-warn { color: #b45309; font-weight: 600; }
.db-due-today { color: #dc2626; font-weight: 700; }

/* ── Todo List ───────────────────────────────────────────── */
.db-todo-list { list-style: none; padding: 0; margin: 0; }
.db-todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border-1);
  font-size: 14px;
  color: var(--c-text-2);
}
.db-todo-item:last-child { border-bottom: none; }
.db-todo-item input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--c-accent);
}
.db-todo-item label { flex: 1; cursor: pointer; }
.db-todo-item.is-done label { text-decoration: line-through; color: var(--c-text-4); }
.db-todo-due { font-size: 12px; color: var(--c-text-3); white-space: nowrap; }
.db-todo-urgent { background: rgba(220,38,38,0.03); border-radius: var(--radius-1); padding-left: 8px; padding-right: 8px; }

/* ── Activity Stream ─────────────────────────────────────── */
.db-act-list { list-style: none; padding: 0; margin: 0; }
.db-act-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-border-1); }
.db-act-item:last-child { border-bottom: none; }
.db-act-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.db-act-content { flex: 1; }
.db-act-content div:first-child { font-size: 13px; color: var(--c-text-2); line-height: 1.5; }
.db-act-content strong { color: var(--c-text-1); }
.db-act-time { font-size: 12px; color: var(--c-text-4); margin-top: 2px; }

/* ── Quick Actions ───────────────────────────────────────── */
.db-quick-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.db-quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.db-quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border: 1px solid var(--c-border-1); border-radius: var(--radius-2);
  text-decoration: none; color: var(--c-text-1); font-size: 13px; font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.db-quick-item:hover { border-color: var(--c-accent); background: rgba(234,179,8,0.04); }
.db-quick-icon { font-size: 22px; }
.db-quick-icon svg { width: 22px; height: 22px; }
.db-quick-label { font-size: 13px; color: var(--c-text-2); }

/* ── Resource Usage ──────────────────────────────────────── */
.db-resource-list { display: flex; flex-direction: column; gap: 16px; }
.db-resource-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-text-2); margin-bottom: 6px; }
.db-resource-row strong { color: var(--c-text-1); font-family: var(--font-mono); }
.db-resource-bar { height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; overflow: hidden; }
.db-resource-bar span { display: block; height: 100%; border-radius: 3px; transition: width 0.3s; }

/* ── Factory List ────────────────────────────────────────── */
.db-factory-list { list-style: none; padding: 0; margin: 0; }
.db-factory-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--c-border-1);
}
.db-factory-item:last-child { border-bottom: none; }
.db-factory-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-1);
  background: var(--c-accent); color: var(--c-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.db-factory-info { flex: 1; min-width: 0; }
.db-factory-name { font-size: 14px; font-weight: 600; color: var(--c-text-1); }
.db-factory-meta { font-size: 12px; color: var(--c-text-3); }
.db-factory-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-pill); background: rgba(234,179,8,0.12);
  color: var(--c-accent-strong);
}
.db-tag-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }

/* ── Team List ───────────────────────────────────────────── */
.db-team-list { list-style: none; padding: 0; margin: 0; }
.db-team-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--c-border-1);
}
.db-team-item:last-child { border-bottom: none; }
.db-team-avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.db-team-info { flex: 1; min-width: 0; }
.db-team-name { font-size: 14px; font-weight: 600; color: var(--c-text-1); }
.db-team-role { font-size: 11px; color: var(--c-text-3); font-weight: 400; margin-left: 4px; }
.db-team-status { font-size: 12px; color: var(--c-text-3); }
.db-online { color: #16a34a; }

/* ── Watch List ──────────────────────────────────────────── */
.db-watch-list { list-style: none; padding: 0; margin: 0; }
.db-watch-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--c-border-1);
}
.db-watch-item:last-child { border-bottom: none; }
.db-watch-name { font-size: 13px; color: var(--c-text-2); }
.db-watch-price { font-size: 13px; font-weight: 600; color: var(--c-text-1); font-family: var(--font-mono); }
.db-watch-delta { font-size: 11px; margin-left: 6px; font-weight: 500; }
.db-delta-down { color: #16a34a; }
.db-delta-up { color: #dc2626; }
.db-delta-flat { color: var(--c-text-4); }

/* ── Help Card ───────────────────────────────────────────── */
.db-help-card { border-color: var(--c-accent); border-width: 2px; }
.db-help-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.db-help-list { list-style: none; padding: 0; margin: 0; }
.db-help-list li { padding: 6px 0; }
.db-help-list a { font-size: 13px; color: var(--c-text-2); text-decoration: none; }
.db-help-list a:hover { color: var(--c-accent-strong); }

/* ── Charts Section ──────────────────────────────────────── */
.db-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/* Trend chart spans full width (row 1); doughnut + bar share row 2 */
.db-charts-grid > .db-chart-card:first-child { grid-column: 1 / -1; }
.db-chart-card {
  background: var(--c-bg-1);
  border: 1px solid var(--c-border-1);
  border-radius: var(--radius-2);
  padding: 20px 24px;
  box-shadow: var(--shadow-1);
}
.db-chart-card canvas { max-height: 240px; }
.db-chart-line-body { display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: center; }
.db-chart-stats { display: flex; flex-direction: column; gap: 14px; }
.db-stat span { display: block; font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.db-stat strong { font-size: 22px; font-weight: 800; color: var(--c-text-1); font-family: var(--font-mono); }
.db-chart-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.db-chart-head h3 { font-size: 15px; font-weight: 700; color: var(--c-text-1); }
.db-chart-select {
  font-size: 12px; padding: 4px 8px; border: 1px solid var(--c-border-1);
  border-radius: var(--radius-1); background: var(--c-bg-2); color: var(--c-text-2);
}
.db-chart-tag {
  font-size: 11px; font-weight: 600; color: var(--c-text-3);
  background: rgba(0,0,0,0.04); padding: 3px 10px; border-radius: var(--radius-pill);
}

/* ── Recommendations ─────────────────────────────────────── */
.db-rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.db-rec-card {
  background: var(--c-bg-1);
  border: 1px solid var(--c-border-1);
  border-radius: var(--radius-2);
  padding: 20px 24px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.db-rec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.db-rec-cat {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 3px 10px; border-radius: var(--radius-pill);
  background: rgba(234,179,8,0.12); color: var(--c-accent-strong); margin-bottom: 12px;
}
/* badge variants unified to accent yellow — was 4-color clash (M3 P1-6) */
.db-rec-card h4 { font-size: 15px; font-weight: 700; color: var(--c-text-1); margin-bottom: 8px; line-height: 1.4; }
.db-rec-card p { font-size: 13px; color: var(--c-text-2); line-height: 1.5; margin-bottom: 12px; }
.db-rec-link { font-size: 13px; font-weight: 600; color: var(--c-accent-strong); text-decoration: none; }
.db-rec-link:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .db-main-grid { grid-template-columns: 1fr; }
  .db-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .db-charts-grid { grid-template-columns: 1fr 1fr; }
  .db-rec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .db-hero-inner { flex-direction: column; text-align: center; gap: 24px; }
  .db-hero-cta { justify-content: center; }
  .db-hero-meta { min-width: 0; width: 100%; justify-content: center; }
  .db-kpi-grid { grid-template-columns: 1fr; }
  .db-charts-grid { grid-template-columns: 1fr; }
  .db-chart-line-body { grid-template-columns: 1fr; }
  .db-rec-grid { grid-template-columns: 1fr; }
  .db-proj-progress { width: 120px; }
  .db-proj-due { min-width: auto; }
  /* Cap long lists so the single-column stack doesn't run 20+ screens;
     each card stays scannable, page height bounded. */
  .db-order-list, .db-proj-list, .db-act-list, .db-todo-list, .db-team-list,
  .db-factory-list, .db-watch-list { max-height: 320px; overflow-y: auto; }
  /* collapse low-frequency settings cards on mobile; tap header to expand */
  .db-card.db-collapse-m > .db-card-head { cursor: pointer; user-select: none; }
  .db-card.db-collapse-m > .db-card-head::after {
    content: '▾'; color: var(--c-text-3); margin-left: 8px;
    display: inline-block; transition: transform .2s;
  }
  .db-card.db-collapse-m.is-collapsed > *:not(.db-card-head) { display: none; }
  .db-card.db-collapse-m.is-collapsed > .db-card-head::after { transform: rotate(-90deg); }
}

/* ── Sidebar Layout（dashboard 专属：左侧栏 + 右内容区） ── */
.db-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; align-items: start; }

/* Sidebar */
.db-sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 16px;
  background: var(--c-bg-1);
  border-right: 1px solid var(--c-border-1);
  overflow-y: auto;
}
.db-sb-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--c-text-1); text-decoration: none; padding: 4px 8px; }
.db-sb-logo-mark { width: 28px; height: 28px; background: var(--c-accent); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.db-sb-actions { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.db-sb-cta { display: block; padding: 10px 12px; background: var(--c-accent); color: #000; font-weight: 700; font-size: 13px; text-decoration: none; border-radius: 8px; text-align: center; }
.db-sb-cta:hover { background: var(--c-accent-strong); }
.db-sb-cta-secondary { display: block; padding: 8px 12px; border: 1px solid var(--c-border-1); color: var(--c-text-1); font-size: 13px; font-weight: 600; text-decoration: none; border-radius: 8px; text-align: center; }
.db-sb-cta-secondary:hover { border-color: var(--c-accent); color: var(--c-accent-strong); }
.db-sb-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.db-sb-section-label { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 4px; }
.db-sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--c-text-2); font-size: 14px; text-decoration: none; border-radius: 8px; transition: background .15s; }
.db-sb-link:hover { background: var(--c-bg-2); color: var(--c-text-1); }
.db-sb-link.is-active { background: rgba(234,179,8,0.12); color: var(--c-accent-strong); font-weight: 600; }
.db-sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--c-border-1); }
.db-sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.db-sb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--c-accent); color: #000; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.db-sb-user-info { display: flex; flex-direction: column; min-width: 0; }
.db-sb-user-name { font-size: 13px; font-weight: 600; color: var(--c-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-sb-user-role { font-size: 11px; color: var(--c-text-3); }
.db-sb-logout { width: 100%; padding: 8px; background: transparent; border: 1px solid var(--c-border-1); border-radius: 8px; font-size: 13px; color: var(--c-text-2); cursor: pointer; }
.db-sb-logout:hover { border-color: #dc2626; color: #dc2626; }

/* Content + Topbar */
.db-content { min-width: 0; }
.db-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px;
  background: var(--c-bg-1);
  border-bottom: 1px solid var(--c-border-1);
}
.db-burger { display: none; width: 36px; height: 36px; border: 1px solid var(--c-border-1); background: transparent; border-radius: 8px; font-size: 18px; cursor: pointer; color: var(--c-text-1); }
.db-topbar-promo { flex: 1; min-width: 0; font-size: 13px; color: var(--c-text-2); }
.db-topbar-promo strong { color: var(--c-text-1); }
.db-topbar-bell { position: relative; width: 36px; height: 36px; border: 1px solid var(--c-border-1); background: transparent; border-radius: 8px; font-size: 15px; cursor: pointer; }
.db-bell-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.db-topbar-currency { padding: 7px 10px; border: 1px solid var(--c-border-1); border-radius: 8px; font-size: 13px; background: transparent; color: var(--c-text-1); cursor: pointer; }

/* Sidebar overlay (mobile) */
.db-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 49; }
.db-overlay.is-open { display: block; }

/* Mobile: sidebar 抽屉 */
@media (max-width: 768px) {
  .db-layout { grid-template-columns: 1fr; }
  .db-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw;
    transform: translateX(-100%); transition: transform .25s ease; z-index: 50;
    box-shadow: 2px 0 12px rgba(0,0,0,0.1);
  }
  .db-sidebar.is-open { transform: translateX(0); }
  .db-burger { display: inline-flex; align-items: center; justify-content: center; }
}

/* ── Tab Bar（dashboard 单页 tab 系统） ── */
.db-tab-bar {
  display: flex; gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid var(--c-border-1);
  background: var(--c-bg-1);
}
.db-tab {
  padding: 12px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--c-text-3);
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.db-tab:hover { color: var(--c-text-1); }
.db-tab.is-active { color: var(--c-accent-strong); border-bottom-color: var(--c-accent); }
.db-tab-content { display: none; }
.db-tab-content.is-active { display: block; }

/* ── pj-collab 任务面板（真实 CRUD） ── */
.pj-assign-add { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.pj-assign-add input { flex: 1; padding: 7px 10px; border: 1px solid var(--c-border-1); border-radius: 8px; font-size: 13px; }
.pj-assign-add select { padding: 7px 8px; border: 1px solid var(--c-border-1); border-radius: 8px; font-size: 13px; background: var(--c-bg-1); }
.pj-assign-add button { padding: 7px 14px; background: var(--c-accent); color: #000; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.pj-assign-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-border-1); }
.pj-assign-item:last-child { border-bottom: none; }
.pj-assign-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c-accent); }
.pj-assign-item .pj-assign-title { flex: 1; font-size: 14px; color: var(--c-text-1); }
.pj-assign-item.is-done .pj-assign-title { text-decoration: line-through; color: var(--c-text-4); }
.pj-assign-item .pj-assign-who { font-size: 12px; color: var(--c-text-3); }
.pj-assign-item .pj-assign-del { font-size: 12px; color: #dc2626; cursor: pointer; border: none; background: none; padding: 2px 6px; }

/* ── pj-collab 任务评论 ── */
.pj-assign-cmt { font-size: 13px; cursor: pointer; border: none; background: none; padding: 2px 6px; }
.pj-cmt-area { flex-basis: 100%; margin-top: 8px; padding-left: 28px; }
.pj-cmt-list { list-style: none; padding: 0; margin: 0 0 8px; max-height: 200px; overflow-y: auto; }
.pj-cmt-item { padding: 6px 0; border-bottom: 1px solid var(--c-border-1); font-size: 13px; color: var(--c-text-2); }
.pj-cmt-item:last-child { border-bottom: none; }
.pj-cmt-item .pj-mention { color: var(--c-accent-strong); font-weight: 600; }
.pj-cmt-input { width: 100%; padding: 6px 8px; border: 1px solid var(--c-border-1); border-radius: 6px; font-size: 13px; resize: vertical; min-height: 36px; }
.pj-cmt-post { margin-top: 4px; padding: 4px 12px; background: var(--c-accent); color: #000; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* ── topbar 通知面板 ── */
.db-notif-item { padding: 12px 16px; border-bottom: 1px solid var(--c-border-1); cursor: pointer; }
.db-notif-item:last-child { border-bottom: none; }
.db-notif-item.is-unread { background: rgba(234,179,8,0.06); }
.db-notif-item:hover { background: var(--c-bg-2); }
.db-notif-title { font-size: 13px; font-weight: 600; color: var(--c-text-1); }
.db-notif-body { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
/* P0: hide internal-only cards from customer role — no backing API, customer lacks these features (Team/Factory are semantically wrong; Projects/Watched have no backend) */
.is-customer .db-card-cust-hide { display: none; }
