/* 1688 sales workspace: shared visual tokens and component rules.
   Loaded after the legacy sheet; this file changes presentation only. */
:root {
  --accent: #17665b;
  --accent-hover: #105348;
  --accent-soft: #e9f3ef;
  --bg: #f5f7f6;
  --card: #fff;
  --ink: #20332f;
  --muted: #596b65;
  --text-secondary: #596b65;
  --border: #dfe7e3;
  --green: #287353;
  --green-soft: #edf6f0;
  --blue: #365f9b;
  --blue-soft: #eff3fa;
  --amber: #936018;
  --amber-soft: #fff5e5;
  --red: #b54747;
  --red-soft: #fdf0ef;
  --radius: 10px;
  --shadow: none;
  --ui-ink: #111827;
  --ui-secondary: #596579;
  --ui-focus: #17665b;
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  --purple: #705d91;
  --purple-soft: #f4f0f8;
}

body, .app-body, .customer-workspace { background: var(--bg); }
body { color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { letter-spacing: 0; font-weight: 600; }
h1 { font-size: 20px; }
h2, h3 { font-size: 16px; }
h4 { font-size: 14px; }
small, .small-text, .subline { font-size: 12px; }
.muted, .secondary, .subline { color: var(--text-secondary); }
a, .link-button { color: var(--accent); }
a:hover, .link-button:hover { color: var(--accent-hover); }
.link-button { font-size: 12px; line-height: 1.5; }
.app-body { min-width: 0; }
.main-content, .main-content.customer-workspace {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 32px;
}
.topbar { height: 64px; padding-inline: 32px; background: #fff; border-color: var(--border); }
.topbar-location, .global-search input { font-size: 13px; }
.topbar-location strong { color: var(--ink); }
.app-footer { color: var(--text-secondary); font-size: 12px; }

/* The dark background is reserved for navigation and the login introduction. */
.sidebar { background: var(--work-shell); box-shadow: none; color: var(--ink); border-right: 1px solid var(--work-divider); }
.sidebar .brand { color: var(--ink); }
.sidebar .brand small, .sidebar .nav-group-label, .sidebar .local-badge,
.sidebar .sidebar-bottom > p, .sidebar .profile-copy small { color: var(--work-secondary); }
.sidebar .nav-item { font-size: 14px; color: #40574f; border-radius: 6px; font-weight: 450; }
.sidebar .nav-item.active, .sidebar .nav-item.active:hover {
  color: #14594f; background: #d9e9e1; box-shadow: none; font-weight: 600;
}
.sidebar .nav-item .nav-count { color: #435b52; background: #e2eae5; }
.sidebar .nav-item.active .nav-count { color: #14594f; background: #c9dfd3; }
.sidebar .workspace-label, .sidebar .profile-button { background: transparent; border-color: var(--work-divider); }
.sidebar .workspace-label small { color: var(--work-secondary); }
.sidebar .brand-symbol { filter: none; }

/* A compact heading replaces every legacy decorative banner. */
.main-content .page-heading {
  min-height: 48px;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
.main-content .page-heading::before, .main-content .page-heading::after { display: none; }
.main-content .page-heading > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.main-content .page-heading h1 {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
  margin: 0;
}
.main-content .page-heading p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
  max-width: 65ch;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.main-content .page-heading .heading-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: none;
}
.main-content .page-heading .date-display { color: var(--text-secondary); font-size: 12px; }
.main-content .page-heading .button {
  color: #374151;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: none;
}
.main-content .page-heading .button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.main-content .page-heading .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.card, .kanban-card, .knowledge-card, .member-card, .project-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: none;
}
.card:hover, .kanban-card:hover, .knowledge-card:hover, .member-card:hover, .project-card:hover {
  transform: none;
}
.card-header { padding: 16px 20px; min-height: 60px; border-color: var(--border); background: #fff; }
.card-header h2, .card-header h3, .drawer-body .detail-section h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.card-header h2::before { display: none; }
.card-header p, .card-footer { font-size: 12px; color: var(--text-secondary); }
.card-header p { margin-top: 4px; }
.card-body, .project-card, .knowledge-card, .member-card { padding: 20px; }
.card-footer { padding: 12px 20px; background: #fff; }
.section-gap { margin-top: 24px; }
.dashboard-grid, .dashboard-bottom, .team-grid, .project-grid { gap: 16px; }

.button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 8px;
  color: #374151;
  border-color: var(--border);
  box-shadow: none;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.button:hover { transform: none; background: #f9fafb; border-color: #d1d5db; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.compact, .button.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.button.soft { background: #fff; color: #374151; border-color: var(--border); }
.button.danger { color: #b42318; background: #fff; border-color: #fecaca; }
.button.danger:hover { background: #fef2f2; }
.button.text { color: #2563eb; }
.button.text:hover { color: #1d4ed8; background: #eff6ff; }
input, select, textarea { border-color: var(--border); border-radius: 8px; font-size: 14px; line-height: 1.5; padding: 8px 12px; }
.field input, .field select, .field textarea, .filters input, .filters select { font-size: 14px; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: none; }
input::placeholder, textarea::placeholder { color: #9ca3af; }
.field > span, .field > span:first-child, .followup-sheet .field > span { font-size: 14px; color: #374151; }
.field small, .field-help { font-size: 12px; color: var(--text-secondary); }
.notice { border-color: #fde68a; background: var(--amber-soft); color: #92400e; font-size: 12px; line-height: 1.5; padding: 12px 16px; }
.notice strong { color: inherit; }
.notice.info { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }
.notice.info strong { color: inherit; }
.notice.neutral { border-color: var(--border); background: #f9fafb; color: var(--text-secondary); }
.notice-row { margin-bottom: 16px; }

/* Status is expressed consistently; orange is not a generic warning. */
.badge, .lead-table-structured .badge {
  padding: 2px 7px; border: 1px solid transparent; border-radius: 5px;
  font-size: 12px; line-height: 1.5; font-weight: 400; color: #596579; background: #f3f4f6;
}
.badge-dot { width: 5px; height: 5px; }
.badge.blue, .lead-table-structured .badge.blue, .badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.green, .lead-table-structured .badge.green, .badge.success { background: var(--green-soft); color: var(--green); }
.badge.red, .lead-table-structured .badge.red, .badge.danger { background: #fef2f2; color: #b42318; }
.badge.amber, .lead-table-structured .badge.amber, .badge.warning { background: #fffbeb; color: #b45309; }
.badge.orange, .lead-table-structured .badge.orange { background: var(--amber-soft); color: var(--amber); border-color: #ead9b9; }
.badge.purple, .lead-table-structured .badge.purple { background: #eff6ff; color: #2563eb; }
.deadline, .risk-countdown { font-size: 12px; color: var(--text-secondary); }
.deadline.overdue, .risk-countdown.overdue, .is-overdue, .overdue-text { color: #b42318; }
.risk-countdown.warning { color: #b45309; }
.risk-countdown.protected { color: #047857; }
.owner-inline, .lead-table-structured .owner-inline { color: #4b5563; font-size: 12px; }
.avatar, .avatar.orange, .avatar.blue, .avatar.green, .avatar.purple { background: #f3f4f6; color: #596579; }

/* Tables remain horizontally scrollable where content warrants it. */
table { font-variant-numeric: tabular-nums; }
th { background: #f9fafb; color: #596579; font-size: 12px; font-weight: 500; }
td { font-size: 14px; line-height: 1.5; color: var(--ink); }
.lead-table td, .workflow-table td { font-size: 14px; line-height: 1.5; }
td, th { padding: 12px 16px; height: 52px; border-bottom-color: var(--border); }
tbody tr:hover, .lead-table tbody tr:hover { background: #f9fafb; }
.customer-button, .lead-table-structured .customer-button, .compact-customer-table .identity-column .customer-button { color: var(--ink); font-size: 14px; line-height: 1.5; font-weight: 600; }
.customer-button:hover { color: #2563eb; }
.table-overflow { overscroll-behavior-x: contain; }
.table-pagination { padding: 12px 20px; color: var(--text-secondary); font-size: 12px; }
.workflow-table th, .workflow-table td, .task-table th, .task-table td { padding: 12px 16px; }
.workflow-table td strong { font-size: 14px; font-weight: 600; }
.workflow-table td p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.workflow-table td:last-child, .task-table td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -1px 0 0 var(--border); }
.workflow-table th:last-child, .task-table th:last-child { position: sticky; right: 0; background: #f9fafb; z-index: 2; }
.workflow-table tr:hover td:last-child, .task-table tr:hover td:last-child { background: #f9fafb; }
.workflow-table .button { margin: 0 4px 0 0; }
.task-table .product-cell { color: var(--text-secondary); font-size: 12px; }
.task-table .badge { font-size: 12px; }

/* Core customer list: seven columns, two deliberate information levels. */
.customer-workspace .customer-list-card { border-radius: 10px; box-shadow: var(--shadow); }
.customer-workspace .work-view-row { padding: 0 20px; min-height: 52px; gap: 16px; border-bottom-color: var(--border); }
.customer-workspace .quick-views { gap: 20px; flex-wrap: nowrap; overflow-x: auto; align-self: stretch; }
.customer-workspace .quick-view {
  position: relative; padding: 15px 0; border: 0; border-radius: 0;
  background: transparent; color: #596579; font-size: 12px; flex: 0 0 auto;
}
.customer-workspace .quick-view.active { background: transparent; color: var(--accent); border: 0; font-weight: 600; }
.customer-workspace .quick-view.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.quick-view span, .table-tab span, .dashboard-todo-tabs .count { margin-left: 6px; padding: 1px 6px; font-size: 12px; border-radius: 4px; background: #f3f4f6; color: #596579; }
.quick-view.active span { color: var(--accent); background: var(--accent-soft); }
.customer-workspace .layout-switch { gap: 4px; }
.customer-workspace .layout-switch .button[aria-pressed="true"] { color: var(--accent); border-color: #bdd7c8; background: var(--accent-soft); }
.customer-workspace .filters { padding: 16px 20px; gap: 8px; border-bottom: 1px solid var(--border); }
.customer-workspace .filter-search { max-width: 420px; min-width: 220px; }
.customer-workspace .filters input, .customer-workspace .filters select { font-size: 14px; height: 36px; }
.customer-workspace .filters select { min-width: 112px; color: #4b5563; }
.customer-workspace .more-filters { position: static; margin-left: auto; }
.customer-workspace .more-filters > summary { font-size: 12px; color: #2563eb; }
.customer-workspace .history-inventory { padding: 8px 20px; border-top: 0; background: #fff; font-size: 12px; color: #596579; }
.active-filter-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 20px 12px; }
.active-filter-tags:empty { display: none; }
.active-filter-tags button, .active-filter-tag { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: #4b5563; padding: 3px 8px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 5px; }
.active-filter-tags .filter-tag:hover { color: #111827; border-color: #d1d5db; background: #e5e7eb; }
.filter-tag > span[aria-hidden] { color: #596579; font-size: 16px; line-height: 1; }
.active-filter-tags svg { height: 12px; width: 12px; }
.customer-table-scroll { max-height: min(72vh, 780px); }
.customer-workspace .customer-table-scroll .lead-table-structured th { font-size: 12px; line-height: 1.5; font-weight: 500; color: #596579; background: #f9fafb; padding: 10px 16px; height: 40px; }
.customer-workspace .customer-table-scroll .lead-table-structured td { font-size: 14px; line-height: 1.5; padding: 12px 16px; height: 52px; color: var(--ink); vertical-align: top; }
.customer-table-scroll .compact-customer-table { min-width: 1050px; width: 100%; table-layout: fixed; }
.compact-customer-table col.identity-column { width: 190px; }
.compact-customer-table col.product-column { width: 200px; }
.compact-customer-table col.stage-column { width: 104px; }
.compact-customer-table col.owner-column { width: 88px; }
.compact-customer-table col.next-column { width: 160px; }
.compact-customer-table col.legacy-cell { width: auto; }
.compact-customer-table col.actions-column { width: 88px; }
.customer-workspace .compact-customer-table :is(th, td).identity-column,
.customer-table-scroll .pool-lead-table :is(th, td).identity-column,
.customer-table-scroll .pool-lead-table :is(th, td).inquiry-date-column {
  position: static; left: auto; box-shadow: none; background: transparent;
  min-width: 0; max-width: none;
}
.customer-workspace .compact-customer-table thead th.identity-column,
.customer-table-scroll .pool-lead-table thead th.identity-column,
.customer-table-scroll .pool-lead-table thead th.inquiry-date-column { position: sticky; top: 0; background: #f9fafb; }
.compact-customer-table .identity-column .subline { margin-top: 3px; color: #596579; font-size: 12px; overflow-wrap: anywhere; }
.compact-customer-table .customer-demand { gap: 4px; }
.compact-customer-table .demand-text { font-size: 14px; line-height: 1.5; }
.compact-customer-table .customer-demand > .customer-type-tag { background: #f3f4f6; color: #596579; border: 0; border-radius: 4px; font-size: 12px; line-height: 1.5; padding: 1px 6px; text-align: left; }
.compact-customer-table .demand-copy .subline { color: #596579; font-size: 12px; }
.compact-customer-table .next-step { color: #374151; font-size: 14px; font-weight: 400; }
.compact-customer-table .next-column .subline { color: #596579; font-size: 12px; }
.compact-customer-table .next-column .overdue, .compact-customer-table .next-column.overdue { color: #b42318; }
.compact-customer-table .next-step.overdue + .subline { color: #b42318; }
.compact-customer-table .legacy-cell { min-width: 0; max-width: none; }
.compact-customer-table .legacy-preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: none; font-size: 14px; line-height: 1.5; color: #374151; }
.compact-customer-table .history-summary-meta { justify-content: flex-start; margin-top: 3px; }
.compact-customer-table .history-occurred { font-size: 12px; color: #596579; }
.customer-workspace .customer-table-scroll .lead-table-structured :is(th, td).actions-column { position: sticky; right: 0; z-index: 3; box-shadow: -1px 0 0 var(--border); background: #fff; padding-inline: 12px; }
.customer-workspace .customer-table-scroll .lead-table-structured thead th.actions-column { z-index: 6; background: #f9fafb; }
.customer-workspace .customer-table-scroll .lead-table-structured tbody tr:hover td { background: #f9fafb; }
.customer-workspace .customer-table-scroll .lead-table-structured tbody tr:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.compact-customer-table tr[data-lead-id] { cursor: pointer; }
.compact-customer-table .button.small { min-height: 30px; font-size: 12px; padding: 4px 8px; }
.customer-row-actions { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 4px; }
.row-more-actions { display: none; position: absolute; z-index: 10; right: 0; top: 0; width: max-content; min-width: 140px; padding: 0 4px; gap: 4px; align-items: center; justify-content: flex-end; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--work-shadow-popover); }
.row-more-actions .button { display: inline-flex; width: auto; margin: 0; justify-content: center; flex: 0 0 auto; }
.compact-customer-table tr:hover .row-more-actions, .customer-row-actions:focus-within .row-more-actions { display: inline-flex; flex-direction: row; }
.compact-customer-table tr:hover .row-default-action, .customer-row-actions:focus-within .row-default-action { opacity: 0; pointer-events: none; }
.customer-workspace .customer-table-scroll .compact-customer-table tr:is(:hover, :focus-within) td.actions-column { z-index: 5; }
.customer-table-scroll .pool-lead-table { min-width: 1020px; }
.pool-lead-table col.select-column { width: 44px; }
.pool-lead-table col.identity-column { width: 190px; }
.pool-lead-table col.stage-column { width: 112px; }
.pool-lead-table col.source-column { width: 100px; }
.pool-lead-table col.inquiry-date-column { width: 120px; }
.pool-lead-table col.actions-column { width: 96px; }
.customer-table-scroll .pool-lead-table th { padding: 10px 16px; height: 40px; font-size: 12px; color: #596579; background: #f9fafb; }
.customer-table-scroll .pool-lead-table td { padding: 12px 16px; font-size: 14px; color: var(--ink); }
.customer-table-scroll .pool-lead-table :is(th, td).actions-column { position: sticky; right: 0; z-index: 3; background: #fff; box-shadow: -1px 0 0 var(--border); }
.customer-table-scroll .pool-lead-table th.actions-column { z-index: 6; background: #f9fafb; }
.customer-table-scroll .pool-lead-table tr:hover td { background: #f9fafb; }

/* Metrics communicate a real count, an explanation, and a destination. */
.stats-grid, .daily-workspace .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.ui-stat-card[data-id="overdue"]:not(.is-zero) .stat-value { color: #EF4444; }
.stat-card, .daily-workspace .stat-card,
.stat-card:first-child, .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4),
.daily-workspace .stat-card:first-child, .daily-workspace .stat-card:last-child {
  padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  box-shadow: var(--shadow); text-align: left; animation: none; transform: none;
}
button.stat-card:hover { box-shadow: none; border-color: #b8c2cf; background: #f8f9fb; }
.stat-label { font-size: 13px; color: #596579; }
.stat-icon, .stat-icon.blue, .stat-icon.green, .stat-icon.purple { width: 28px; height: 28px; background: #f3f4f6; color: #596579; border-radius: 8px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value, .daily-workspace .stat-value { margin-top: 8px; color: var(--accent); font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: 0; }
.stat-bottom, .daily-workspace .stat-bottom { display: flex; font-size: 12px; line-height: 1.5; margin-top: 12px; min-height: 18px; color: #596579; }
.ui-stat-card .stat-bottom { justify-content: space-between; align-items: flex-start; gap: 12px; }
.ui-stat-card .stat-bottom > span:first-child { min-width: 0; }
.ui-stat-card .stat-link { flex: 0 0 auto; color: #2563eb; white-space: nowrap; }
.stat-card.is-zero, .daily-workspace .stat-card.is-zero { background: #fafafa; box-shadow: none; }
.stat-card.is-zero .stat-value, .stat-card.is-zero .stat-icon { color: #9ca3af; }
.stat-card.is-zero .stat-label, .stat-card.is-zero .stat-bottom { color: #596579; }
.count-strip { gap: 16px; margin-bottom: 24px; }
.mini-stat { padding: 20px; }
.mini-stat strong { font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--ink); letter-spacing: 0; }
.mini-stat p, .mini-stat small { font-size: 12px; color: #596579; }
.number-badge { color: #596579; background: #f3f4f6; font-size: 12px; }

.daily-workspace .dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: stretch; }
.daily-workspace .priority-work, .daily-workspace .dashboard-priority { border: 1px solid var(--border); box-shadow: var(--shadow); }
.daily-workspace .priority-work .card-header, .daily-workspace .dashboard-priority .card-header { padding: 16px 20px; background: #fff; }
.daily-workspace .priority-work h2, .daily-workspace .dashboard-priority h2 { font-size: 16px; position: relative; }
.daily-workspace .priority-work h2::before, .daily-workspace .dashboard-priority h2::before { content: ""; display: inline-block; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); vertical-align: -2px; margin-right: 8px; }
.daily-workspace .task-table td { padding: 10px 12px; }
.daily-workspace .task-table th { padding: 10px 12px; height: 40px; }
.daily-workspace .task-table .customer-button { font-size: 14px; }
.daily-workspace .task-table .next-step { font-size: 14px; font-weight: 400; color: #374151; }
.daily-workspace .task-table .button { color: #2563eb; background: #fff; border-color: var(--border); }
.task-table tr.is-stale td, .task-table tr.overdue-critical td { background: #fff7f7; }
.task-table tr.is-stale td:first-child, .task-table tr.overdue-critical td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.dashboard-todo-card { margin-top: 16px; }
.dashboard-todo-tabs { display: flex; gap: 24px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.dashboard-todo-tabs button { position: relative; flex: 0 0 auto; border: 0; border-radius: 0; padding: 12px 0; font-size: 14px; color: #596579; background: transparent; }
.dashboard-todo-tabs button.active, .dashboard-todo-tabs [aria-selected="true"] { color: var(--accent); }
.dashboard-todo-tabs button.active::after, .dashboard-todo-tabs [aria-selected="true"]::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.dashboard-todo-panel { padding: 16px 20px; }
.dashboard-todo-panel > .card, .daily-workspace .dashboard-todo-panel .workflow-summary { border: 0; box-shadow: none; margin: 0; padding: 0; background: #fff; border-radius: 0; }
.dashboard-more { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.dashboard-more > summary { cursor: pointer; color: #596579; font-size: 14px; }
.dashboard-more > summary:hover { color: #111827; }
.dashboard-more .coverage-panel { margin: 16px 0; background: var(--border); }
.dashboard-more .channel-section { margin-top: 24px; }
/* Daily work puts actions ahead of historical business totals. Counts and links remain intact. */
.daily-workspace .work-summary {
  gap: 0; margin-bottom: 16px; border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden; background: #fff;
}
.daily-workspace .work-summary .stat-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px;
  padding: 14px 18px; border: 0; border-right: 1px solid var(--border);
  border-radius: 0; box-shadow: none; background: #fff;
}
.daily-workspace .work-summary .stat-card:last-child { border-right: 0; }
.daily-workspace .work-summary .stat-card:hover { background: #f6f7f8; box-shadow: none; }
.daily-workspace .work-summary .stat-top { display: contents; }
.daily-workspace .work-summary .stat-label { grid-column: 1; align-self: center; color: #4b5563; }
.daily-workspace .work-summary .stat-value { grid-column: 2; grid-row: 1; margin: 0; font-size: 24px; }
.daily-workspace .work-summary .stat-icon { display: none; }
.daily-workspace .work-summary .stat-bottom {
  grid-column: 1 / -1; margin: 0; min-height: 0; font-size: 11px; line-height: 1.55;
}
.daily-workspace .work-summary .stat-link { display: none; }
.daily-workspace .dashboard-main-grid { align-items: start; }
.daily-workspace .dashboard-main-grid .card { border-radius: 6px; box-shadow: none; }
.daily-workspace .dashboard-main-grid .card-header { padding: 14px 18px; }
.daily-workspace .dashboard-main-grid .empty-state.compact {
  display: grid; grid-template-columns: 28px minmax(0,1fr) auto;
  grid-template-areas: "icon title action" "icon message action";
  gap: 5px 12px; padding: 22px 18px; min-height: 0; text-align: left;
}
.daily-workspace .dashboard-main-grid .empty-icon {
  grid-area: icon; width: 28px; height: 28px; margin: 0; align-self: center;
  background: transparent; border-radius: 0;
}
.daily-workspace .dashboard-main-grid .empty-icon svg { width: 25px; height: 25px; }
.daily-workspace .dashboard-main-grid .empty-state h3 { grid-area: title; margin: 0; font-size: 14px; }
.daily-workspace .dashboard-main-grid .empty-state p { grid-area: message; margin: 0; max-width: none; font-size: 12px; }
.daily-workspace .dashboard-main-grid .empty-state .button { grid-area: action; align-self: center; margin: 0; }
.daily-workspace .dashboard-todo-card,
.daily-workspace .chain-overview { border-radius: 6px; box-shadow: none; }
.daily-workspace .chain-overview .card-header { padding: 12px 18px; }
.daily-workspace .chain-overview .chain-metric {
  display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 14px 18px;
}
.daily-workspace .chain-overview .chain-metric strong { font-size: 22px; }
.daily-workspace .chain-overview .chain-metric span { margin: 0; font-size: 12px; }
.daily-workspace .chain-overview .card-footer { padding: 10px 18px; font-size: 11px; }
@media (max-width: 760px) {
  .daily-workspace .work-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .daily-workspace .work-summary .stat-card { padding: 12px; }
  .daily-workspace .work-summary .stat-card:nth-child(2) { border-right: 0; }
  .daily-workspace .work-summary .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .daily-workspace .work-summary .stat-bottom { display: flex; }
  .daily-workspace .dashboard-main-grid .empty-state.compact {
    grid-template-columns: 28px minmax(0,1fr); grid-template-areas: "icon title" "icon message" "action action";
    padding: 16px;
  }
  .daily-workspace .dashboard-main-grid .empty-state .button { justify-self: start; margin-top: 6px; }
  .daily-workspace .chain-overview .chain-metric { padding: 12px; flex-wrap: wrap; }
}
.daily-workspace .dashboard-bottom { gap: 16px; margin-top: 24px; }
.risk-list { padding: 4px 20px 12px; }
.risk-row { padding: 12px 0; gap: 12px; }
.risk-row strong { font-size: 14px; color: var(--ink); }
.risk-row small { font-size: 12px; color: #596579; }
.workspace-channels { margin-top: 24px; padding-top: 24px; border-color: var(--border); }
.channel-card, .workspace-channels .channel-card { padding: 20px; background: #fff; border-color: var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.channel-card::before { display: none; }
.channel-card.active { background: #fff; border-color: var(--accent); box-shadow: none; }
.channel-card:hover { background: #f8f9fb; border-color: #b8c2cf; box-shadow: none; }
.channel-card strong, .workspace-channels .channel-card strong { font-size: 28px; font-weight: 600; color: var(--ink); }
.channel-card.active strong { color: var(--accent); }
.funnel-stage-track span, .funnel-fill { background: var(--accent); }
.funnel-row:nth-child(n + 2) .funnel-fill { background: #9ca3af; }

/* Plans remain three independent, equal-height lanes on desktop. */
.followup-columns { gap: 16px; align-items: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.followup-column { padding: 16px; background: #f3f4f6; border: 1px solid var(--border); border-radius: 10px; min-height: 320px; display: flex; flex-direction: column; }
.followup-column-header { font-size: 14px; font-weight: 600; padding: 0 0 16px; min-height: 36px; }
.followup-column-header .count { font-size: 12px; color: #596579; background: #e5e7eb; padding: 1px 7px; }
.followup-column:first-child .dot { background: #ef4444; }
.followup-column:nth-child(2) .dot { background: #3b82f6; }
.followup-column:nth-child(3) .dot { background: #9ca3af; }
.followup-column-list { display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 310px); min-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.followup-card { padding: 16px; margin: 0; border-color: var(--border); border-radius: 8px; flex: 0 0 auto; }
.followup-card .customer-button { font-size: 14px; font-weight: 600; }
.followup-card p { font-size: 14px; line-height: 1.5; color: #374151; margin-top: 8px; }
.followup-card p.followup-meta, .followup-card-footer { color: #596579; font-size: 12px; }
.plan-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; color: #596579; }
.followup-card.overdue .plan-meta > span:first-child { color: #b42318; }
.plan-notice { align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; margin-bottom: 16px; }
.plan-notice > .icon-button { flex: 0 0 auto; width: 28px; height: 28px; color: #596579; }
.followup-card.is-overdue, .followup-column:first-child .followup-card { border-left: 3px solid #ef4444; }
.followup-card-footer { margin-top: 12px; padding-top: 12px; border-color: var(--border); }
.followup-card-footer > .button { opacity: 0; }
.followup-card:hover .followup-card-footer > .button, .followup-card:focus-within .followup-card-footer > .button { opacity: 1; }
.followup-card .followup-complete { opacity: 0; }
.followup-card:hover .followup-complete, .followup-card:focus-within .followup-complete { opacity: 1; }
.followup-column .empty-state { padding: 24px 12px; border: 1px dashed #d1d5db; border-radius: 8px; background: #fafafa; margin: 0; }
.workflow-filters { display: flex; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; gap: 12px; background: #fff; border-color: var(--border); }
.workflow-filters .field { margin: 0; flex: 1 1 140px; max-width: 240px; }
.workflow-tabs { display: flex; align-items: center; gap: 20px; margin-right: auto; }
.workflow-tabs button { border: 0; border-radius: 0; background: #fff; padding: 10px 0; font-size: 14px; color: #596579; }
.workflow-tabs button.active { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.workflow-summary { background: #fff; border: 1px solid var(--border); border-radius: 10px; }

/* Guided empty states and rule explanations use the same calm visual language. */
.empty-state { padding: 40px 24px; color: #596579; }
.empty-state.compact { padding: 24px 20px; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 16px; background: transparent; color: #9ca3af; border-radius: 0; }
.empty-icon svg { width: 44px; height: 44px; stroke-width: 1.3; }
.empty-state h3 { color: #374151; font-size: 14px; font-weight: 600; }
.empty-state p { color: #596579; font-size: 12px; line-height: 1.5; margin: 8px auto 16px; }
.empty-state .button { margin: 0 4px; }
.pool-rule-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 24px 20px; }
.pool-rule-timeline > * { position: relative; min-width: 0; padding-top: 40px; font-size: 14px; color: #374151; }
.pool-rule-timeline > *:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: 36px; right: 0; height: 1px; background: #d1d5db; }
.pool-rule-timeline strong { font-size: 14px; color: #374151; display: block; }
.pool-rule-timeline small, .pool-rule-timeline p, .pool-rule-timeline span { font-size: 12px; color: #596579; display: block; margin-top: 4px; }
.pool-rule-timeline > div > span:first-child { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; margin: 0; color: #596579; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 50%; font-size: 12px; }
.pool-info { color: #9ca3af; height: 28px; width: 28px; }
.pool-info svg { width: 16px; height: 16px; }
.pool-info:hover, .pool-info:focus-visible { color: #2563eb; background: #eff6ff; }
.pool-stat-label { font-size: 13px; color: #596579; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pool-stat-rule { font-size: 12px; color: #596579; margin-top: 12px; }
.project-onboarding { padding: 40px 24px; text-align: center; }
.project-onboarding-steps { display: flex; justify-content: center; gap: 32px; padding: 24px 0; list-style: none; }
.project-stage-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 20px 0; }
.project-stage-progress > * { font-size: 12px; color: #596579; padding-top: 8px; border-top: 3px solid #e5e7eb; }
.project-stage-progress > .active { color: var(--accent); border-color: var(--accent); }
.project-stage-progress > .complete { color: #047857; border-color: #10b981; }
.project-card h2 { margin: 12px 0 8px; font-size: 16px; }
.project-progress { gap: 8px; }
.project-progress > div { background: #f9fafb; padding: 12px; }
.project-blocker { color: #b45309; }

/* Details keep primary actions visible while their content scrolls. */
.drawer { width: min(1100px, 100%); background: #fff; }
.drawer-header { padding: 20px 24px 16px; background: #fff; border-color: var(--border); flex: 0 0 auto; }
.drawer-title-row h2 { font-size: 20px; line-height: 1.5; font-weight: 600; margin-top: 4px; }
.drawer-identity-subtitle, .drawer-meta, .eyebrow { font-size: 12px; color: #596579; }
.drawer-actions { margin-top: 16px; gap: 8px; }
.drawer-body { padding: 24px; background: #f9fafb; }
.drawer .tab-bar { padding-inline: 24px; background: #fff; flex-shrink: 0; overflow-x: auto; }
.tab-button { min-height: 44px; font-size: 14px; white-space: nowrap; color: #596579; }
.tab-button.active { color: var(--accent); }
.tab-button.active::after { background: var(--accent); }
.customer-detail-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(240px, 3fr); gap: 16px; align-items: start; }
.customer-detail-main, .customer-detail-aside { min-width: 0; }
.customer-detail-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.customer-detail-identity > .avatar { width: 42px; height: 42px; font-size: 16px; }
.customer-detail-identity > div { min-width: 0; }
.customer-detail-identity h2 { margin: 0; overflow-wrap: anywhere; }
.customer-detail-identity .drawer-identity-subtitle { margin-top: 4px; max-width: none; overflow-wrap: anywhere; }
.customer-360 .drawer-title-row > .icon-button { flex: 0 0 auto; }
.customer-360 .drawer-actions { max-width: 100%; }
.customer-360 .drawer-actions .button { flex: 0 0 auto; }
.customer-360 .tab-bar .tab-button { flex: 0 0 auto; }
.detail-stage-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 16px 0; margin-bottom: 16px; border: 0; border-bottom: 1px solid var(--work-line); border-radius: 0; background: #fff; box-shadow: none; }
.detail-stage-path > span { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #596579; min-width: 0; }
.detail-stage-path > span > i { display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid #e5e7eb; border-radius: 50%; background: #f9fafb; color: #596579; font-style: normal; font-size: 12px; }
.detail-stage-path > span.current { color: var(--accent); font-weight: 600; }
.detail-stage-path > span.current > i { color: #fff; background: var(--accent); border-color: var(--accent); }
.customer-detail-layout .detail-section { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 20px; margin: 0 0 16px; }
.customer-detail-aside h3 > .button { margin-left: auto; }
.customer-detail-layout .customer-archive > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #374151; }
.customer-detail-layout .customer-archive[open] > summary { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.customer-detail-layout .customer-archive > .detail-section { border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; margin-top: 16px; padding: 16px 0 0; }
.customer-detail-layout .customer-archive > .detail-section:last-child { margin-bottom: 0; }
.customer-detail-aside .detail-grid { grid-template-columns: 1fr; gap: 12px; }
.customer-detail-aside .detail-field { min-width: 0; }
.drawer-body .detail-field dt { font-size: 12px; color: #596579; }
.drawer-body .detail-field dd { font-size: 14px; line-height: 1.5; color: var(--ink); }
.detail-section h3 { margin-bottom: 16px; }
.customer-360 .timeline { margin-top: 16px; }
.customer-360 .timeline-item { padding: 0 0 24px 24px; border-left-color: var(--border); }
.customer-360 .timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.customer-360 .timeline-item::before { background: #d1d5db; }
.customer-360 .timeline-item:first-child::before { background: #3b82f6; }
.customer-360 .timeline-time { font-size: 12px; line-height: 1.5; color: #596579; margin-bottom: 4px; }
.customer-360 .timeline-item h4 { font-size: 14px; font-weight: 600; color: var(--ink); }
.customer-360 .timeline-item p { font-size: 14px; line-height: 1.5; color: #374151; margin-top: 8px; }
.customer-360 .timeline-item p.small-text { font-size: 12px; color: #596579; }
.customer-360 .timeline-feedback { padding: 12px; font-size: 14px; line-height: 1.5; color: #374151; background: #f9fafb; border-radius: 8px; overflow-wrap: anywhere; }
.customer-360 .timeline-feedback strong { color: #596579; font-size: 12px; font-weight: 400; margin-bottom: 4px; }
.customer-360 .legacy-timeline { padding: 16px; margin: 20px 0 0; border: 1px solid var(--border); border-radius: 8px; background: #f9fafb; }
.customer-360 .legacy-timeline > p { font-size: 14px; line-height: 1.5; }
.detail-record-list { display: grid; gap: 16px; }
.detail-order-card { padding: 20px; }
.detail-order-card > .between { align-items: flex-start; }
.detail-order-card > .between > strong { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.detail-order-card > .between > .badge { flex: 0 0 auto; }
.detail-order-card > p { font-size: 12px; margin-top: 8px; }
.order-amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; margin: 16px 0; border-radius: 8px; background: #f9fafb; }
.order-amounts > span { font-size: 14px; color: #374151; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.detail-attachments > a.card { display: flex; flex-direction: column; padding: 12px; gap: 8px; min-width: 0; color: var(--ink); }
.detail-attachments > a.card:hover { border-color: #93c5fd; box-shadow: none; background: #f8f9fb; }
.detail-attachments img { display: block; width: 100%; height: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: #f9fafb; }
.detail-attachments strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.detail-attachments span { font-size: 12px; color: #596579; }
.copyable-value { margin-top: 16px; padding: 16px; background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.identity-callout, .customer-brief, .followup-context { padding: 16px; background: #f9fafb; border-color: var(--border); border-radius: 8px; }
.identity-callout span, .identity-callout small { font-size: 12px; color: #596579; }
.identity-callout strong { font-size: 16px; color: var(--ink); }
.pool-status-banner { border-color: #dbeafe; background: #eff6ff; border-radius: 8px; }
.pool-status-banner strong { color: #2563eb; font-size: 14px; }
.pool-status-banner span, .pool-status-banner small { font-size: 12px; color: #596579; }
.pool-status-banner.overdue { background: #fef2f2; border-color: #fecaca; }
.pool-status-banner.overdue strong { color: #b42318; }
.pool-status-banner.protected { background: #ecfdf5; border-color: #a7f3d0; }
.pool-status-banner.protected strong { color: #047857; }
.brief-facts strong { font-size: 14px; }
.brief-plan { background: var(--work-surface); border-color: var(--work-divider); }
.modal, .modal.followup-sheet { border-radius: 10px; }
.modal-header, .followup-sheet .modal-header { padding: 20px; background: #fff; border-color: var(--border); }
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-header p { font-size: 12px; color: #596579; }
.modal-body, .followup-sheet .modal-body { padding: 20px; }
.modal-footer, .followup-sheet .modal-footer { padding: 16px 20px; background: #fff; border-color: var(--border); }
.modal.followup-sheet { border-radius: 10px 0 0 10px; }
.modal.followup-sheet:has(.saved-view-tools) { width: min(440px, 100%); }
.modal .saved-view-tools { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal .saved-view-tools .field { width: 100%; }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.settings-nav button, .settings-nav a { border: 0; background: transparent; color: #4b5563; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.settings-nav .active { color: var(--accent); background: #fff3ed; }
.settings-nav-item:hover { background: #f9fafb; color: #111827; }
.settings-nav-item.active:hover { background: #fff3ed; color: var(--accent); }
.settings-content { min-width: 0; }
.pool-settings-summary { background: #f9fafb; border-color: var(--border); }
.pool-settings-summary h3 { font-size: 14px; }
.pool-settings-summary p, .pool-settings-summary small { font-size: 12px; color: #596579; }
.login-story { background: #e3ede6; color: #244438; }
.login-brand b, .login-story-body h1 { color: #244438; }
.login-story .eyebrow { color: #526d5b; }
.login-story-body > p, .login-footnote { color: #526d5b; font-size: 14px; }
.login-panel { background: #f9fbf9; }
.login-form h2 { color: var(--ink); font-size: 24px; font-weight: 600; }
.login-kicker, .login-form > .muted, .login-form .field > span:first-child { font-size: 14px; }
.login-kicker { color: var(--muted); }
.login-help, .login-network { background: #fff; border-color: var(--border); font-size: 12px; color: #596579; }
.login-help p, .login-help strong, .login-help code, .login-network p, .login-network strong, .login-local { font-size: 12px; color: #596579; }
.login-submit { min-height: 40px; font-size: 14px; }

@media (max-width: 1280px) {
  .main-content .page-heading > div:first-child { display: block; }
  .main-content .page-heading p { margin-top: 4px; }
  .main-content .page-heading .date-display { display: none; }
  .daily-workspace .dashboard-main-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .customer-workspace .work-view-row { gap: 12px; }
  .customer-workspace .quick-views { gap: 16px; }
  .customer-workspace .layout-switch .button { font-size: 12px; padding-inline: 8px; }
}
@media (max-width: 980px) {
  .main-content, .main-content.customer-workspace { padding: 24px; }
  .daily-workspace .dashboard-main-grid { grid-template-columns: 1fr; }
  .daily-workspace .dashboard-risk .empty-state { padding: 20px; }
  .customer-detail-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .followup-columns { overflow-x: auto; grid-template-columns: repeat(3, minmax(260px, 1fr)); padding-bottom: 8px; }
  .customer-workspace .work-view-row { align-items: flex-start; flex-wrap: wrap; padding-top: 4px; }
  .customer-workspace .quick-views { flex-basis: 100%; }
  .customer-workspace .layout-switch { margin: 0 0 8px auto; }
  .settings-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  .main-content, .main-content.customer-workspace { padding: 16px; }
  .topbar { height: 56px; padding-inline: 16px; }
  .main-content .page-heading { min-height: 0; margin-bottom: 16px; gap: 12px; align-items: flex-start; }
  .main-content .page-heading h1 { font-size: 20px; }
  .main-content .page-heading p { font-size: 12px; max-width: none; }
  .main-content .page-heading .heading-actions { max-width: 48%; flex-shrink: 1; }
  .main-content .page-heading .button { font-size: 12px; padding-inline: 10px; }
  .card-header, .card-body, .project-card, .knowledge-card, .member-card { padding: 16px; }
  .stats-grid, .daily-workspace .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .stat-card, .daily-workspace .stat-card, .daily-workspace .stat-card:first-child { padding: 16px; border: 1px solid var(--border); }
  .stat-value, .daily-workspace .stat-value { font-size: 28px; }
  .stat-bottom, .daily-workspace .stat-bottom { display: flex; font-size: 12px; }
  .customer-workspace .filters { padding: 12px 16px; }
  .customer-workspace .filter-search { max-width: none; min-width: 0; flex-basis: 100%; }
  .customer-workspace .filters select { flex: 1; min-width: 0; max-width: 100%; }
  .customer-workspace .work-view-row { padding-inline: 16px; }
  .customer-workspace .quick-views { gap: 16px; }
  .customer-workspace .history-inventory { padding: 8px 16px; }
  .active-filter-tags { padding-inline: 16px; }
  .customer-table-scroll { max-height: 65vh; }
  .customer-workspace .customer-table-scroll .lead-table-structured td { padding: 10px 12px; }
  .customer-workspace .customer-table-scroll .lead-table-structured :is(th, td).actions-column { padding-inline: 8px; }
  .table-pagination { padding: 12px 16px; flex-wrap: wrap; }
  .followup-column-list { max-height: 60vh; }
  .followup-card { padding: 16px; }
  .followup-card .followup-complete { opacity: 1; }
  .followup-card-footer > .button { opacity: 1; }
  .workflow-filters { padding: 16px; }
  .workflow-filters .field { max-width: none; }
  .dashboard-todo-tabs { padding-inline: 16px; gap: 20px; }
  .dashboard-todo-panel { padding: 16px; }
  .customer-detail-layout { grid-template-columns: 1fr; }
  .drawer-header { padding: 16px; }
  .drawer-body { padding: 16px; }
  .drawer .tab-bar { padding-inline: 16px; gap: 20px; }
  .drawer-actions .button { min-height: 32px; font-size: 12px; padding: 5px 10px; }
  .drawer-title-row h2 { font-size: 20px; }
  .drawer-meta { gap: 8px; font-size: 12px; }
  .customer-detail-layout .detail-section { padding: 16px; }
  .customer-detail-layout .customer-archive > .detail-section { padding: 16px 0 0; }
  .detail-stage-path { padding: 12px 0; }
  .detail-stage-path > span { flex-direction: column; gap: 6px; text-align: center; }
  .customer-detail-identity { gap: 8px; align-items: flex-start; }
  .customer-detail-identity > .avatar { width: 36px; height: 36px; font-size: 14px; }
  .detail-order-card { padding: 16px; }
  .order-amounts { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .detail-attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .detail-attachments > a.card { padding: 8px; }
  .detail-attachments img { height: 140px; }
  .modal.followup-sheet { border-radius: 0; }
  .modal-header, .modal-body, .followup-sheet .modal-header, .followup-sheet .modal-body { padding: 16px; }
  .modal-footer, .followup-sheet .modal-footer { padding: 12px 16px; }
  .pool-rule-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 16px; }
  .project-onboarding-steps { flex-direction: column; gap: 16px; }
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .settings-nav > * { flex-shrink: 0; }
  .login-panel { padding: 32px 24px; background: #f9fafb; }
}
@media (hover: none), (pointer: coarse) {
  .compact-customer-table:not(.pool-lead-table) col.actions-column { width: 168px; }
  .row-more-actions { display: inline-flex; position: static; flex-direction: row; min-width: 0; width: auto; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .customer-row-actions .row-default-action { display: none; }
  .customer-row-actions { align-items: flex-start; flex-wrap: wrap; }
  .followup-card .followup-complete { opacity: 1; }
  .followup-card-footer > .button { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .card, .page-heading, .stat-card { animation: none; transition: none; }
}

/* Second pass is deliberately scoped to the inquiry/customer list. */
.customer-table-scroll .customer-list-v2 { min-width: 1140px; table-layout: fixed; }
.customer-list-v2 col.select-column { width: 44px; }
.customer-list-v2 col.identity-column { width: 180px; }
.customer-list-v2 col.inquiry-date-column { width: 104px; }
.customer-list-v2 col.product-column { width: 176px; }
.customer-list-v2 col.stage-column { width: 106px; }
.customer-list-v2 col.owner-column { width: 90px; }
.customer-list-v2 col.next-column { width: 150px; }
.customer-list-v2 col.legacy-cell { width: auto; }
.customer-list-v2 col.actions-column { width: 90px; }
.customer-workspace .customer-table-scroll .customer-list-v2 th { padding: 8px; height: 40px; }
.customer-workspace .customer-table-scroll .customer-list-v2 td { height: 52px; padding: 5px 8px; vertical-align: middle; }
.customer-workspace .customer-table-scroll .customer-list-v2 :is(th, td).actions-column { padding-inline: 8px; }
.customer-workspace .customer-table-scroll .customer-list-v2 :is(th, td).select-column { padding-inline: 14px; }
.customer-workspace .customer-table-scroll .customer-list-v2 td.inquiry-date-column { position: static; left: auto; box-shadow: none; background: transparent; }
.customer-workspace .customer-table-scroll .customer-list-v2 th.inquiry-date-column { position: sticky; top: 0; left: auto; z-index: 3; box-shadow: none; background: #f9fafb; }
.customer-workspace .customer-table-scroll .customer-list-v2 tbody tr:hover td { background: #f9fafb; }
.customer-list-v2 .select-column input { display: block; margin: 0; padding: 0; width: 16px; height: 16px; accent-color: #596579; }
.customer-list-v2 .select-column input:focus-visible { outline-color: #596579; }
.customer-workspace .customer-list-v2 .identity-column .customer-button,
.customer-list-v2 .identity-column > strong { display: block; max-width: 100%; padding: 0; margin: 0; font-size: 14px; line-height: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; color: #111827; }
.customer-list-v2 .identity-column .identity-contact,
.customer-list-v2 .identity-column .subline { display: block; margin: 0; font-size: 12px; line-height: 18px; color: #596579; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.customer-list-v2 .customer-demand { width: 100%; min-width: 0; gap: 0; }
.customer-list-v2 .demand-copy { width: 100%; min-width: 0; }
.customer-list-v2 .demand-text { display: block; font-size: 14px; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.customer-list-v2 .customer-demand > .customer-type-tag { display: block; max-width: 100%; padding: 0 4px; font-size: 12px; line-height: 18px; border: 0; border-radius: 3px; background: #f3f4f6; color: #596579; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.customer-list-v2 .owner-column { color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-list-v2 .owner-inline { display: inline; font-size: 12px; line-height: 18px; color: #596579; }
.customer-list-v2 .owner-inline .avatar { display: none; }
.customer-list-v2 .next-step { display: block; margin: 0; font-size: 14px; line-height: 21px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.customer-list-v2 .next-column .subline { display: block; margin: 0; font-size: 12px; line-height: 18px; color: #596579; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.customer-list-v2 .next-step.overdue, .customer-list-v2 .next-step.overdue + .subline { color: #b45353; }
.customer-list-v2 .next-step.overdue-neutral, .customer-list-v2 .next-step.overdue-neutral + .subline,
.customer-list-v2 tr:has(.recent-inquiry) .next-step.overdue, .customer-list-v2 tr:has(.recent-inquiry) .next-step.overdue + .subline { color: #374151; font-weight: 600; }
.customer-list-v2 .customer-empty { color: #9ca3af; font-weight: 400; }
.customer-workspace .customer-list-v2 .identity-column .customer-button.customer-empty { color: #9ca3af; font-weight: 400; }
.toast .toast-undo { flex: 0 0 auto; width: auto; min-width: 36px; margin-left: 8px; padding: 2px 6px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.customer-list-v2 .recent-inquiry { color: #e8622c; font-weight: 500; }
.customer-list-v2 .inquiry-date-column { font-size: 12px; font-variant-numeric: tabular-nums; }
.customer-list-v2 .legacy-preview { display: block; margin: 0; max-height: 21px; font-size: 14px; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; color: #374151; cursor: default; }
.customer-list-v2 .actions-column .button { color: #4b5563; }
.customer-list-v2 .actions-column .button:hover { color: #111827; border-color: #d1d5db; }
.customer-list-v2 .inline-stage-select { display: inline-block; width: auto; max-width: 100%; min-height: 26px; padding: 3px 18px 3px 7px; font-size: 12px; line-height: 18px; font-weight: 500; border: 1px solid transparent; border-radius: 5px; color: #596579; background-color: #f3f4f6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; appearance: none; cursor: pointer; text-overflow: ellipsis; }
.customer-list-v2 .inline-stage-select[data-tone="blue"] { color: #2563eb; background-color: #eff6ff; }
.customer-list-v2 .inline-stage-select[data-tone="orange-outline"] { color: #c84e20; border-color: #e8622c; background-color: #fff; }
.customer-list-v2 .inline-stage-select[data-tone="green"] { color: #047857; background-color: #ecfdf5; }
.customer-list-v2 .inline-stage-select[data-tone="gray"] { color: #596579; background-color: #f3f4f6; }
.customer-list-v2 .inline-stage-select[data-tone="lost"] { color: #986666; background-color: #f5f0f0; }
.customer-list-v2 .inline-stage-select:focus { box-shadow: none; outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.customer-list-v2 .inline-stage-select:disabled { opacity: 1; cursor: default; }
.customer-list-v2 .inline-stage-select option { background: #fff; color: #374151; }
.customer-list-v2 .list-sort-button { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #596579; font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.customer-list-v2 .list-sort-button:is(.active, [data-active="true"]), .customer-list-v2 th[aria-sort="ascending"] .list-sort-button, .customer-list-v2 th[aria-sort="descending"] .list-sort-button { color: #c84e20; }
.customer-list-v2 .list-sort-button:hover { color: #111827; }
.customer-list-v2 .list-sort-button > :is(svg, .sort-arrow) { width: 12px; height: 12px; color: currentColor; }
.customer-summary-popover { position: fixed; z-index: 1000; width: max-content; max-width: min(480px, calc(100vw - 32px)); max-height: min(280px, calc(100dvh - 32px)); overflow-y: auto; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; box-shadow: var(--work-shadow-popover); color: #374151; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-bulk-bar { position: sticky; top: 64px; z-index: 12; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 16px; min-height: 52px; border-top: 1px solid #fed7c0; border-bottom: 1px solid #fed7c0; background: #fff; box-shadow: none; font-size: 12px; color: #4b5563; }
.customer-bulk-bar > :is(span, strong) { flex: 0 0 auto; }
.customer-bulk-bar strong { color: #111827; font-weight: 600; }
.customer-bulk-bar .button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.customer-workspace:has(.customer-list-v2) .quick-view span,
.customer-workspace:has(.customer-list-v2) .quick-view.active span { background: #f3f4f6; color: #596579; }
@media (max-width: 760px) {
  .customer-bulk-bar { top: 56px; flex-wrap: nowrap; gap: 8px; padding-inline: 12px; overflow-x: auto; }
  .customer-bulk-bar > * { flex: 0 0 auto; }
}
@media (hover: none), (pointer: coarse) {
  .customer-list-v2 col.actions-column { width: 90px; }
  .customer-list-v2 .customer-row-actions { flex-wrap: nowrap; }
  .customer-list-v2 .customer-row-actions .row-default-action { display: inline; opacity: 1; pointer-events: auto; }
  .customer-list-v2 .customer-row-actions .row-more-actions { display: none; }
}

/* Contact plans and independently versioned commercial tasks share a reading path. */
.followup-columns .plan-task-kind { font-size: 11px; color: var(--text-secondary, #64748b); background: #f1f3f5; padding: 2px 6px; border-radius: 3px; display: inline-block; }
.followup-columns .workflow-plan-card { border-left-color: #87939e; }
.followup-columns .followup-column-list > .empty-state { min-height: 100px; padding: 16px 10px; }
.followup-columns .empty-state p { font-size: 11px; line-height: 1.6; }
