:root {
  --blue: #2b76e5;
  --blue-dark: #1d5fc2;
  --blue-soft: #edf4ff;
  --navy: #172b45;
  --ink: #2a3a4e;
  --muted: #64748b;
  --subtle: #9ca3af;
  --line: #dfe7f1;
  --line-soft: #edf1f6;
  --panel: #ffffff;
  --canvas: #f4f7fb;
  --green: #00875a;
  --green-soft: #e6f5ee;
  --orange: #d9801a;
  --orange-soft: #fff5eb;
  --red: #d9363e;
  --red-soft: #ffeded;
  --topbar-height: 60px;
  --sidebar-width: 228px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(51, 136, 255, 0.28);
  outline-offset: 1px;
}

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

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: stretch;
  background: linear-gradient(100deg, #1760c0 0%, #2778e1 62%, #3285ed 100%);
  box-shadow: 0 2px 12px rgba(27, 80, 153, 0.14);
}

.brand {
  display: flex;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  color: #fff;
  background: rgba(8, 57, 130, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 7px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }

.primary-nav {
  display: flex;
  height: 60px;
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display: none; }

.primary-nav-item {
  height: 60px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.primary-nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.primary-nav-item.active { color: #fff; background: rgba(12, 74, 157, 0.16); border-bottom-color: #fff; }

.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; padding: 0 16px; }
.icon-button {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  background: transparent;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.15); }
.icon-button svg { width: 18px; height: 18px; stroke-width: 1.9; }
.icon-button.light { color: var(--muted); background: #fff; border-color: var(--line); }
.icon-button.light:hover { color: var(--blue); border-color: #bdd7ff; background: var(--blue-soft); }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 1px solid var(--blue); border-radius: 50%; background: #ffcf49; }

.profile-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: transparent;
}
.profile-button:hover { background: rgba(255, 255, 255, 0.13); }
.profile-button svg { width: 15px; height: 15px; }
.profile-menu-wrap { position: relative; }
.profile-button[aria-expanded="true"] { background: rgba(255, 255, 255, 0.13); }
.profile-button[aria-expanded="true"] > svg { transform: rotate(180deg); }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(17, 24, 28, 0.16); }
.profile-menu-heading { display: grid; gap: 3px; padding: 9px 10px 11px; border-bottom: 1px solid var(--line-soft); }
.profile-menu-heading span { color: var(--muted); font-size: 11px; }
.profile-menu-heading strong { overflow: hidden; color: var(--navy); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-action { display: flex; width: 100%; min-height: 36px; align-items: center; gap: 9px; margin-top: 5px; padding: 0 10px; border: 0; border-radius: 5px; color: #39434d; background: transparent; font-size: 13px; text-align: left; }
.profile-menu-action:hover { color: var(--blue-dark); background: var(--blue-soft); }
.profile-menu-action svg { width: 15px; height: 15px; }
#transferDialog { z-index: 42; width: min(480px, calc(100vw - 32px)); }
#transferOverlay { z-index: 41; }
#transferDialog .transfer-fields { grid-template-columns: 1fr; gap: 12px; }
.transfer-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #1765c9; background: #e5f0ff; font-size: 12px; font-weight: 700; }

.sidebar {
  position: fixed;
  z-index: 20;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 2px 0 14px rgba(39, 74, 119, 0.025);
}
.sidebar-section { padding: 18px 12px 0; }
.sidebar-section-last { padding-bottom: 16px; }
.sidebar-label { margin: 0 0 8px; padding: 0 10px; color: var(--subtle); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.side-nav { display: grid; gap: 2px; }
.side-nav-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #4b5563;
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.side-nav-item svg { width: 17px; height: 17px; color: #7d8791; stroke-width: 1.9; }
.side-nav-item:hover { color: var(--blue-dark); background: #f3f7fd; }
.side-nav-item:hover svg { color: var(--blue); }
.side-nav-item.active { position: relative; color: #155db8; background: var(--blue-soft); font-weight: 650; }
.side-nav-item.active::before { position: absolute; top: 8px; bottom: 8px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); content: ""; }
.side-nav-item.active svg { color: var(--blue); }
.nav-count { margin-left: auto; min-width: 21px; padding: 1px 6px; border-radius: 9px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 700; text-align: center; }
.nav-count.warning-count { background: #e58a16; }
.collapse-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 0 22px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}
.collapse-button:hover { color: var(--blue); background: #fafcff; }
.collapse-button svg { width: 17px; height: 17px; }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding-top: var(--topbar-height); }
.tabbar {
  position: sticky;
  z-index: 10;
  top: var(--topbar-height);
  display: flex;
  height: 44px;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.page-tab { display: inline-flex; min-width: 116px; height: 44px; align-items: center; border-right: 1px solid var(--line-soft); border-bottom: 2px solid transparent; color: var(--muted); background: #fff; }
.page-tab:hover { background: #fafcff; }
.page-tab.active { border-bottom-color: var(--blue); color: var(--blue); }
.page-tab-select { display: flex; min-width: 0; height: 42px; flex: 1; align-items: center; justify-content: center; padding: 0 8px 0 14px; border: 0; color: inherit; background: transparent; font-size: 13px; white-space: nowrap; }
.page-tab.active .page-tab-select { font-weight: 650; }
.tab-close { display: inline-grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; margin-right: 5px; padding: 0; border: 0; border-radius: 4px; color: #9aa2ac; background: transparent; }
.tab-close svg { width: 14px; height: 14px; }
.tab-close:hover:not(:disabled) { color: #b42318; background: #fff0ef; }
.tab-close:disabled { cursor: default; opacity: .35; }

.content-frame { max-width: 1680px; margin: 0 auto; padding: 20px 24px 32px; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; height: 20px; color: var(--muted); font-size: 13px; }
.breadcrumbs svg { width: 14px; height: 14px; color: #a4abb4; }
.breadcrumbs strong { color: #39434d; font-weight: 600; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 13px 0 20px; }
.heading-line { display: flex; align-items: center; gap: 10px; }
h1 { margin: 0; color: var(--navy); font-size: 23px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.status-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-chip.neutral { color: #5b6672; background: #edf1f5; }
.heading-actions { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.button svg { width: 16px; height: 16px; }
.button-primary { color: #fff; border-color: var(--blue); background: var(--blue); }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); box-shadow: 0 4px 12px rgba(37, 109, 215, 0.18); }
.button-secondary { color: #4b5563; border-color: var(--line); background: #fff; }
.button-secondary:hover { color: var(--blue); border-color: #bdd7ff; background: var(--blue-soft); }

.metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 7px; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-label { color: var(--muted); font-size: 12px; white-space: nowrap; }

.panel { border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(31, 57, 91, 0.035); }
.filter-panel { margin-bottom: 16px; }
.filter-row { display: flex; min-height: 68px; align-items: center; gap: 10px; padding: 14px 16px; }
.search-field { display: flex; width: min(330px, 100%); height: 36px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: #98a1aa; background: #fff; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 136, 255, 0.12); }
.search-field svg { width: 17px; height: 17px; flex: 0 0 17px; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-field input::placeholder { color: #a1a8af; }
.select-field { position: relative; display: inline-flex; width: 148px; height: 36px; align-items: center; }
.select-field select { width: 100%; height: 36px; appearance: none; padding: 0 32px 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; color: #4b5563; background: #fff; font-size: 13px; }
.select-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 136, 255, 0.12); }
.select-field svg { position: absolute; right: 10px; width: 15px; height: 15px; pointer-events: none; color: var(--subtle); }
.text-button { margin-left: auto; padding: 6px 3px; border: 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.text-button:hover { color: var(--blue-dark); text-decoration: underline; }

.data-panel { overflow: hidden; }
.panel-toolbar { display: flex; min-height: 59px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.table-summary { display: flex; align-items: baseline; gap: 9px; }.table-summary strong { color: var(--navy); font-size: 15px; }.table-summary span { color: var(--muted); font-size: 12px; }.toolbar-actions { display: flex; gap: 6px; }
.column-menu-wrap { position: relative; }
.column-menu { position: absolute; z-index: 25; top: calc(100% + 7px); right: 0; width: 190px; max-height: min(360px, 60vh); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(17, 24, 28, 0.16); }
.column-menu strong { display: block; padding: 5px 7px 8px; color: var(--navy); font-size: 12px; }
.column-menu label { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 7px; border-radius: 4px; color: #39434d; font-size: 12px; cursor: pointer; }
.column-menu label:hover { background: var(--blue-soft); }
.column-menu input { width: 14px; height: 14px; accent-color: var(--blue); }
.table-wrap { position: relative; min-height: 260px; overflow-x: auto; }
table { width: 100%; min-width: 1060px; border-collapse: collapse; }
th { height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafbfc; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
td { height: 58px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); color: #323c46; font-size: 13px; vertical-align: middle; white-space: nowrap; }
tbody tr { transition: background-color 120ms ease; }tbody tr:hover { background: #fafcff; }tbody tr:last-child td { border-bottom: 0; }
.checkbox-column { width: 46px; padding-right: 0; text-align: center; }.checkbox-column input, td input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }.action-column { width: 86px; }
.account-name { display: flex; align-items: center; gap: 10px; color: #1d5fb5; font-weight: 600; }.account-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 6px; font-size: 12px; font-weight: 700; }.account-avatar.blue { color: #1566ca; background: #e8f2ff; }.account-avatar.green { color: #007e55; background: #e6f5ee; }.account-avatar.orange { color: #b56604; background: #fff1db; }.account-avatar.purple { color: #6944bb; background: #f0ebff; }
.owner-cell { display: flex; align-items: center; gap: 7px; }.owner-avatar { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #4e5d6c; background: #e8edf3; font-size: 11px; font-weight: 700; }.number-cell { color: #1e2935; font-variant-numeric: tabular-nums; }.money-cell { color: #273544; font-weight: 600; font-variant-numeric: tabular-nums; }
.type-tag, .table-status { display: inline-flex; min-height: 23px; align-items: center; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 600; }.type-tag.enterprise { color: #2767a9; background: #eef6ff; }.type-tag.strategy { color: #855e13; background: #fff6de; }.type-tag.channel { color: #007e55; background: #eaf8f0; }.table-status.enabled { color: var(--green); background: var(--green-soft); }.table-status.disabled { color: #687076; background: #edf1f5; }.table-status.pending { color: var(--orange); background: var(--orange-soft); }
.row-actions { display: flex; align-items: center; gap: 5px; }.row-action { padding: 5px 4px; border: 0; color: var(--blue); background: transparent; font-size: 13px; }.row-action:hover { color: var(--blue-dark); text-decoration: underline; }.more-button { width: 28px; height: 28px; color: var(--muted); }.more-button:hover { color: var(--blue); background: var(--blue-soft); }
.flow-action-column { min-width: 205px; }.row-actions { white-space: nowrap; }
.pool-table { min-width: 1390px; }
.pool-table .flow-action-column { min-width: 170px; }
.pool-table .pool-followup { display: block; width: min(24vw, 300px); overflow: hidden; color: #2872c2; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.pool-table .pool-claim-action { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 4px; color: #fff; background: #12aa91; font-size: 12px; font-weight: 700; }
.pool-table .pool-claim-action::before { content: '✓'; font-size: 12px; }
.pool-table .pool-claim-action:hover { color: #fff; background: #0b8f7b; text-decoration: none; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; min-height: 330px; color: var(--muted); background: #fff; }.empty-state svg { width: 34px; height: 34px; color: #b4bfcb; }.empty-state strong { color: #47525e; font-size: 14px; }.empty-state span { font-size: 13px; }
.table-footer { display: flex; min-height: 58px; align-items: center; justify-content: space-between; padding: 0 16px; border-top: 1px solid var(--line); color: var(--muted); background: #fafbfc; font-size: 13px; }.pagination { display: flex; align-items: center; gap: 4px; }.page-button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; color: #596470; background: #fff; font-size: 13px; }.page-button:hover:not(:disabled) { color: var(--blue); border-color: #bdd7ff; background: var(--blue-soft); }.page-button:disabled { color: #b4bdc7; background: #f6f8fa; cursor: not-allowed; }.page-button.active { color: #fff; border-color: var(--blue); background: var(--blue); }.page-button svg { width: 16px; height: 16px; }.page-ellipsis { padding: 0 3px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 16px; padding: 16px; background: #f8fafc; }.dashboard-panel { min-height: 242px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; }.dashboard-panel.wide-panel { min-height: 330px; }.dashboard-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }.dashboard-panel-heading div { display: grid; gap: 5px; }.dashboard-panel-heading strong { color: var(--navy); font-size: 15px; }.dashboard-panel-heading span { color: var(--muted); font-size: 12px; }.dashboard-panel-heading .text-button { margin: 0; }.funnel-list { display: grid; gap: 18px; }.funnel-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, 2.4fr) 42px; align-items: center; gap: 12px; }.funnel-label { display: grid; gap: 3px; }.funnel-label span { color: #4b5563; font-size: 13px; }.funnel-label strong { color: var(--navy); font-size: 13px; }.progress-track { height: 9px; overflow: hidden; border-radius: 5px; background: #edf1f5; }.progress-fill { display: block; height: 100%; border-radius: inherit; }.progress-fill.blue { background: #3388ff; }.progress-fill.green { background: #18a874; }.progress-fill.orange { background: #ee9a2f; }.progress-fill.purple { background: #7d5bd6; }.progress-fill.progress-100 { width: 100%; }.progress-fill.progress-81 { width: 81%; }.progress-fill.progress-74 { width: 74%; }.progress-fill.progress-72 { width: 72%; }.progress-fill.progress-66 { width: 66%; }.progress-fill.progress-61 { width: 61%; }.progress-fill.progress-56 { width: 56%; }.progress-fill.progress-28 { width: 28%; }.funnel-row > b { color: var(--muted); font-size: 12px; text-align: right; }.task-list { display: grid; gap: 2px; }.task-item { display: grid; grid-template-columns: 34px 1fr 20px; align-items: center; gap: 10px; min-height: 57px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); background: transparent; text-align: left; }.task-item:last-child { border-bottom: 0; }.task-item:hover strong { color: var(--blue); }.task-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; }.task-icon svg { width: 16px; height: 16px; }.task-icon.blue { color: var(--blue); background: var(--blue-soft); }.task-icon.orange { color: var(--orange); background: var(--orange-soft); }.task-icon.red { color: var(--red); background: var(--red-soft); }.task-item span:not(.task-icon) { display: grid; gap: 3px; min-width: 0; }.task-item strong { overflow: hidden; color: #37414b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.task-item small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.task-item > b { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 10px; color: #fff; background: #e88b21; font-size: 11px; }.rank-list { display: grid; gap: 11px; }.rank-item { display: grid; grid-template-columns: 22px 28px 1fr auto; align-items: center; gap: 9px; min-height: 36px; }.rank-number { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 4px; color: var(--muted); background: #f1f4f7; font-size: 11px; font-weight: 700; }.rank-item:nth-child(1) .rank-number { color: #8a5a00; background: #fff0c7; }.rank-item:nth-child(2) .rank-number { color: #586875; background: #e9eef2; }.rank-item:nth-child(3) .rank-number { color: #975f35; background: #f7e9dd; }.rank-item .owner-avatar { width: 26px; height: 26px; }.rank-item strong { color: #39434d; font-size: 13px; }.rank-item b { color: var(--green); font-size: 13px; }

.modal-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(15, 23, 33, 0.28); opacity: 0; transition: opacity 160ms ease; }.modal-backdrop:not([hidden]) { opacity: 1; }.modal-dialog { position: fixed; z-index: 40; top: 50%; left: 50%; display: flex; width: min(620px, calc(100vw - 32px)); max-height: min(650px, calc(100vh - 48px)); flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 18px 44px rgba(25, 43, 71, 0.2); opacity: 0; pointer-events: none; transform: translate(-50%, calc(-50% + 10px)); transition: opacity 160ms ease, transform 160ms ease; }.modal-dialog.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }.modal-header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fff; }.modal-header h2 { margin: 2px 0 0; color: var(--navy); font-size: 16px; line-height: 22px; }.modal-kicker { margin: 0; color: var(--blue); font-size: 12px; font-weight: 650; }.modal-dialog form { display: flex; min-height: 0; flex: 1; flex-direction: column; }.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; overflow-y: auto; padding: 18px; }.form-field { display: grid; gap: 6px; color: #39434d; font-size: 13px; font-weight: 600; }.form-field.full-width { grid-column: 1 / -1; }.form-field b { color: var(--red); }.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; }.form-field input, .form-field select { height: 34px; padding: 0 9px; }.form-field textarea { min-height: 80px; padding: 8px 9px; resize: vertical; }.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 136, 255, 0.12); outline: 0; }.form-switch-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fafcff; }.form-switch-row div { display: grid; gap: 3px; }.form-switch-row strong { color: #36414b; font-size: 13px; }.form-switch-row span { color: var(--muted); font-size: 12px; }.switch { position: relative; display: inline-block; width: 38px; height: 20px; }.switch input { width: 0; height: 0; opacity: 0; }.switch-slider { position: absolute; inset: 0; border-radius: 12px; background: #c7d0d9; transition: 150ms ease; }.switch-slider::before { position: absolute; bottom: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; content: ""; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: 150ms ease; }.switch input:checked + .switch-slider { background: var(--blue); }.switch input:checked + .switch-slider::before { transform: translateX(18px); }.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--line); background: #fafbfc; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid #bce7d0; border-radius: 6px; color: #08784f; background: #effbf4; box-shadow: 0 8px 24px rgba(25, 43, 71, 0.16); font-size: 14px; font-weight: 600; }.toast svg { width: 18px; height: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

body.compact-rows td { height: 47px; } body.compact-rows .account-avatar { width: 24px; height: 24px; } body.compact-rows .owner-avatar { width: 22px; height: 22px; }
body.compact-module-view .content-frame { max-width: 1540px; }.compact-module-view .page-heading { margin-bottom: 14px; }.compact-module-view .page-heading p { display: none; }.compact-module-view .status-chip { min-height: 22px; }.compact-module-view .filter-panel { margin-bottom: 10px; }.compact-module-view .filter-row { min-height: 56px; padding: 10px 12px; }.compact-module-view .search-field, .compact-module-view .select-field, .compact-module-view .select-field select { height: 34px; }.compact-module-view .data-panel { border-radius: 9px; }.compact-module-view .panel-toolbar { min-height: 50px; padding: 0 12px; }.compact-module-view .table-wrap { min-height: 260px; }.compact-module-view th { height: 40px; padding: 0 12px; }.compact-module-view td { height: 50px; padding: 0 12px; }.compact-module-view .table-footer { min-height: 50px; padding: 0 12px; }.compact-module-view .table-summary strong { font-size: 14px; }.compact-module-view .account-avatar { width: 26px; height: 26px; }.compact-module-view .owner-avatar { width: 23px; height: 23px; }.target-owner { color: #1266d6; background: #e8f2ff; }
body.sidebar-collapsed { --sidebar-width: 72px; } body.sidebar-collapsed .brand { width: var(--sidebar-width); min-width: var(--sidebar-width); justify-content: center; padding: 0; } body.sidebar-collapsed .brand-name, body.sidebar-collapsed .sidebar-label, body.sidebar-collapsed .side-nav-item span:not(.nav-count), body.sidebar-collapsed .collapse-button span { display: none; } body.sidebar-collapsed .sidebar-section { padding-right: 11px; padding-left: 11px; } body.sidebar-collapsed .side-nav-item { justify-content: center; padding: 0; } body.sidebar-collapsed .nav-count { position: absolute; margin: -19px 0 0 20px; } body.sidebar-collapsed .collapse-button { justify-content: center; padding: 0; }

@media (max-width: 1160px) { .filter-row { flex-wrap: wrap; }.text-button { margin-left: 0; }.table-wrap { min-height: 430px; } }
@media (max-width: 1160px) { .dashboard-grid { grid-template-columns: 1fr; }.dashboard-panel.wide-panel { min-height: 290px; } }
@media (max-width: 800px) { :root { --sidebar-width: 62px; }.brand { width: var(--sidebar-width); min-width: var(--sidebar-width); justify-content: center; padding: 0; }.brand-name, .sidebar-label, .side-nav-item span:not(.nav-count), .collapse-button span { display: none; }.sidebar-section { padding-right: 10px; padding-left: 10px; }.side-nav-item { justify-content: center; padding: 0; }.nav-count { position: absolute; margin: -19px 0 0 20px; }.collapse-button { justify-content: center; padding: 0; }.primary-nav-item { padding: 0 12px; font-size: 14px; }.profile-name, .profile-button > svg { display: none; }.topbar-actions { padding: 0 8px; }.content-frame { padding: 16px; }.page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }.heading-actions { width: 100%; padding-top: 0; }.heading-actions .button-primary { margin-left: auto; }.filter-row { align-items: stretch; }.search-field { width: 100%; }.select-field { width: calc(50% - 5px); }.text-button { padding-left: 0; }.modal-body { grid-template-columns: 1fr; }.form-field.full-width, .form-switch-row { grid-column: auto; } }
@media (max-width: 560px) { .primary-nav-item:nth-child(n+3), .topbar-actions .icon-button { display: none; }.topbar { height: 54px; }.brand, .primary-nav, .primary-nav-item { height: 54px; }.sidebar { top: 54px; }.main-content { padding-top: 54px; }.tabbar { top: 54px; }.content-frame { padding: 14px 12px 28px; }.heading-line { flex-wrap: wrap; }.heading-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.heading-actions .button { min-width: 0; padding: 0 7px; font-size: 13px; }.heading-actions .button-primary { grid-column: 1 / -1; margin-left: 0; }.select-field { width: 100%; }.table-footer { padding: 0 10px; }.table-footer > span:last-child { display: none; }.toast { right: 12px; bottom: 12px; left: 12px; }.page-tab { min-width: 105px; }.dashboard-grid { padding: 10px; gap: 10px; }.dashboard-panel { min-height: auto; padding: 14px; }.dashboard-panel.wide-panel { min-height: auto; }.funnel-row { grid-template-columns: 1fr 1.3fr 34px; gap: 8px; }.funnel-label strong { font-size: 12px; } }

/* Lean loan-assistance workspace: preserve the existing compact, centered UI. */
.workspace-label { display: flex; align-items: center; padding: 0 24px; color: rgba(255, 255, 255, 0.92); font-size: 14px; font-weight: 600; }
.form-field input:read-only, .form-field select:disabled { color: #566271; background: #f5f7fa; }
@media (max-width: 560px) { .workspace-label { padding: 0 14px; } }

.modal-dialog:not(.open) { visibility: hidden; }

.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--canvas); }
.login-form { display: grid; width: min(380px, 100%); gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 28px rgba(25, 43, 71, .08); }
.login-brand { display: flex; align-items: center; gap: 10px; color: #1765c9; font-size: 16px; }
.login-brand .brand-mark { color: #2979ef; border-color: #2979ef; }
.login-form h1 { margin: 4px 0; color: var(--navy); font-size: 20px; }
.login-form .form-field { gap: 7px; }
.login-form .form-field input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; }
.login-form .form-field input:focus { border-color: var(--blue); outline: 3px solid rgba(51, 136, 255, .16); }
.login-submit { width: 100%; min-height: 40px; justify-content: center; }
.login-error { margin: -4px 0; color: var(--red); font-size: 13px; }

.analytics-view { display: grid; gap: 22px; min-width: 0; }
.analytics-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.analytics-metric { display: flex; min-height: 86px; align-items: center; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; }
.analytics-metric .metric-icon { width: 34px; height: 34px; flex: 0 0 34px; }
.analytics-metric-copy { display: grid; min-width: 0; gap: 3px; }
.analytics-metric-copy .metric-label { overflow-wrap: anywhere; }
.analytics-metric-copy strong { color: var(--navy); font-size: 19px; line-height: 22px; font-variant-numeric: tabular-nums; }
.analytics-metric-copy small { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.analytics-breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.analytics-breakdown { min-width: 0; padding-top: 13px; border-top: 1px solid var(--line); }
.analytics-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.analytics-heading h2 { margin: 0; color: var(--navy); font-size: 15px; }
.analytics-heading span { color: var(--muted); font-size: 12px; text-align: right; }
.analytics-rows { display: grid; gap: 13px; }
.analytics-row { display: grid; grid-template-columns: minmax(90px, .9fr) minmax(55px, 1.8fr) 42px; align-items: center; gap: 10px; }
.analytics-row-label { overflow-wrap: anywhere; color: #4b5563; font-size: 13px; }
.analytics-row strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.analytics-track { display: block; height: 8px; overflow: hidden; border-radius: 4px; background: #edf1f5; }
.analytics-fill { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.analytics-fill.width-10 { width: 10%; }.analytics-fill.width-20 { width: 20%; }.analytics-fill.width-30 { width: 30%; }.analytics-fill.width-40 { width: 40%; }.analytics-fill.width-50 { width: 50%; }.analytics-fill.width-60 { width: 60%; }.analytics-fill.width-70 { width: 70%; }.analytics-fill.width-80 { width: 80%; }.analytics-fill.width-90 { width: 90%; }.analytics-fill.width-100 { width: 100%; }
.analytics-row:nth-child(3n + 2) .analytics-fill { background: #18a874; }
.analytics-row:nth-child(3n) .analytics-fill { background: #e58a16; }
.analytics-empty-row, .analytics-state { color: var(--muted); font-size: 13px; }
.analytics-state { display: grid; min-height: 180px; place-items: center; }
.analytics-employee-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; }
.analytics-employee-panel > .analytics-heading { align-items: center; margin: 0; padding: 15px 16px; border-bottom: 1px solid var(--line-soft); }
.analytics-employee-panel .analytics-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.analytics-employee-scroll { max-width: 100%; overflow-x: auto; }
.analytics-employee-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.analytics-employee-table th { height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); color: var(--muted); background: #fafbfc; font-weight: 500; text-align: left; white-space: nowrap; }
.analytics-employee-table td { height: 52px; padding: 7px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-employee-table tr:last-child td { border-bottom: 0; }
.analytics-employee-table td:first-child strong { display: block; color: var(--navy); font-weight: 600; }
.analytics-employee-table td:first-child small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.analytics-employee-table .analytics-employee-money { font-weight: 600; }
.analytics-employee-state { display: grid; min-height: 120px; place-items: center; padding: 20px; color: var(--muted); font-size: 13px; }
.analytics-employee-footer { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.analytics-employee-footer > div { display: flex; gap: 6px; }

@media (max-width: 1160px) { .analytics-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }.analytics-breakdowns { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 560px) { .analytics-view { gap: 18px; }.analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.analytics-metric { min-height: 72px; gap: 8px; padding: 9px; }.analytics-metric .metric-icon { width: 30px; height: 30px; flex-basis: 30px; }.analytics-metric-copy strong { font-size: 17px; }.analytics-metric-copy small { font-size: 10px; }.analytics-row { grid-template-columns: minmax(82px, 1fr) minmax(55px, 1.4fr) 32px; gap: 8px; } }

/* Quiet, consistent surfaces for the compact CRM workspace. */
.brand-mark { border-color: rgba(255, 255, 255, 0.9); }
.page-tab.active { background: #f7faff; }
.breadcrumbs strong { color: var(--navy); }
.status-chip.neutral { color: #4c6481; background: #e9eff7; }
.search-field:hover, .select-field select:hover { border-color: #c5d4e6; }
.search-field:focus-within, .select-field select:focus { box-shadow: 0 0 0 3px rgba(43, 118, 229, 0.12); }
.panel-toolbar { background: linear-gradient(180deg, #fff, #fcfdff); }
.table-summary strong { letter-spacing: -0.01em; }
th, .analytics-employee-table th { color: #52647c; background: #f7f9fc; }
tbody tr:hover, .analytics-employee-table tbody tr:hover { background: #f5f9ff; }
.table-footer { background: #fbfcfe; }
.type-tag, .table-status { border-radius: 5px; }
.row-action { font-weight: 600; }
.analytics-metric {
  border-color: var(--line);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(31, 57, 91, 0.035);
  background: linear-gradient(160deg, #fff 68%, #f9fbff);
}
.analytics-metric .metric-icon { border-radius: 8px; }
.analytics-breakdowns { gap: 14px; }
.analytics-breakdown {
  padding: 16px 17px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 57, 91, 0.035);
}
.analytics-employee-panel { border-color: var(--line); border-radius: 9px; box-shadow: 0 2px 8px rgba(31, 57, 91, 0.035); }
.analytics-employee-panel > .analytics-heading { background: linear-gradient(180deg, #fff, #fcfdff); }
.modal-dialog { border-radius: 10px; box-shadow: 0 22px 60px rgba(21, 43, 75, 0.22); }
.modal-header { background: #fbfdff; }
.modal-footer { background: #f7f9fc; }
.form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: #c5d4e6; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { box-shadow: 0 0 0 3px rgba(43, 118, 229, 0.12); }
.login-screen { background: radial-gradient(circle at 50% 0%, #eaf3ff, #f4f7fb 48%); }
.login-form { border-color: var(--line); border-radius: 12px; box-shadow: 0 18px 46px rgba(29, 73, 136, 0.1); }

@media (max-width: 560px) {
  .analytics-breakdown { padding: 14px; }
  .table-footer #selectedText { max-width: 132px; font-size: 11px; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .modal-backdrop, .modal-dialog, tbody tr { transition: none; }
}

/* 2026 workspace polish: keep the established blue-and-white CRM density. */
.topbar { background: linear-gradient(105deg, #1659b7 0%, #2475d8 65%, #2d80e7 100%); }
.brand { background: rgba(4, 47, 111, 0.18); }
.brand-mark { background: rgba(255, 255, 255, 0.08); }
.workspace-label {
  height: 28px;
  align-self: center;
  margin-left: 16px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
}
.topbar-actions .icon-button:hover, .profile-button:hover { background: rgba(255, 255, 255, 0.2); }
.sidebar { background: linear-gradient(180deg, #fff 0%, #fbfcff 100%); }
.sidebar-section { padding-top: 20px; }
.sidebar-section-last { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.sidebar-label { color: #8795a9; font-size: 11px; letter-spacing: 0.04em; }
.side-nav-item { min-height: 39px; color: #40516a; transition: background-color 140ms ease, color 140ms ease; }
.side-nav-item svg { color: #7b8ca3; }
.side-nav-item.active { background: #eaf3ff; }
.side-nav-item.active::before { top: 7px; bottom: 7px; }
.collapse-button { background: transparent; }
.tabbar { box-shadow: 0 2px 8px rgba(28, 65, 111, 0.025); }
.page-tab.active { background: #fff; }
.page-tab.active .page-tab-select { color: #1e64c7; }
.breadcrumbs { color: #78879a; font-size: 12px; }
.page-heading { align-items: center; }
.page-heading h1 { letter-spacing: -0.025em; }
.page-heading .status-chip.neutral { border: 1px solid #dbe8f8; background: #eef5ff; color: #35639d; }
.button-primary { background: linear-gradient(180deg, #3384ed, #2673db); box-shadow: 0 2px 5px rgba(35, 105, 205, 0.13); }
.button-primary:hover { background: linear-gradient(180deg, #2777df, #1d61c5); }
.button-secondary, .icon-button.light { color: #4d617b; background: #fff; }
.button-secondary:hover, .icon-button.light:hover { color: #1e66cb; background: #f1f7ff; }
.panel { box-shadow: 0 3px 12px rgba(31, 61, 101, 0.045); }
.filter-panel { border-color: #dce6f2; }
.filter-row { gap: 11px; }
.search-field, .select-field select { background: #fbfdff; border-color: #dce5f0; }
.search-field:focus-within, .select-field select:focus { background: #fff; }
.text-button { padding: 6px 8px; border-radius: 5px; }
.text-button:hover { background: #eff5fe; text-decoration: none; }
.panel-toolbar { border-bottom-color: #e4ebf4; }
.table-summary strong { position: relative; padding-left: 10px; }
.table-summary strong::before { position: absolute; top: 3px; bottom: 3px; left: 0; width: 3px; border-radius: 3px; background: #2b76e5; content: ""; }
.table-wrap, .compact-module-view .table-wrap { min-height: 210px; }
th, .analytics-employee-table th { background: #f6f9fd; color: #526681; border-bottom-color: #e1eaf5; }
tbody tr:nth-child(even), .analytics-employee-table tbody tr:nth-child(even) { background: #fcfdff; }
tbody tr:hover, .analytics-employee-table tbody tr:hover { background: #f0f6ff; }
tbody tr:has(.row-checkbox:checked) { background: #eef6ff; }
.account-name { color: #1e62bd; }
.owner-avatar { color: #425c7b; background: #eaf0f7; }
.type-tag, .table-status { gap: 5px; border: 1px solid transparent; }
.table-status::before { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; content: ""; }
.table-status.enabled { border-color: #dbefe6; }
.table-status.pending { border-color: #f7e9d9; }
.table-status.disabled { border-color: #e2e8ef; }
.table-footer { border-top-color: #e1eaf5; }
.pagination .page-button.active { box-shadow: 0 2px 6px rgba(43, 118, 229, 0.18); }
.analytics-metric { position: relative; overflow: hidden; padding-left: 16px; }
.analytics-metric::before { position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #2b76e5; content: ""; }
.analytics-metric:nth-child(2)::before { background: #18a874; }
.analytics-metric:nth-child(3)::before { background: #e9922d; }
.analytics-metric:nth-child(4)::before { background: #6b7fe5; }
.analytics-metric:nth-child(5)::before { background: #df6570; }
.analytics-employee-panel > .analytics-heading { border-bottom-color: #e1eaf5; }
.analytics-track { height: 7px; background: #eaf0f7; }
.modal-dialog { border-color: #d8e4f2; }
.modal-header { border-top: 3px solid #2b76e5; }
.form-switch-row { background: #f6f9fd; }
.login-screen {
  background: radial-gradient(circle at 18% 18%, rgba(150, 201, 255, 0.22), transparent 28%),
    radial-gradient(circle at 85% 82%, rgba(109, 166, 236, 0.13), transparent 31%),
    #f3f7fc;
}
.login-form { position: relative; overflow: hidden; gap: 15px; border-radius: 12px; padding: 30px; box-shadow: 0 24px 58px rgba(30, 73, 128, 0.12); }
.login-form::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, #1b61c4, #56a0ff); content: ""; }
.login-brand { margin-bottom: 8px; color: #1b5db8; }
.login-brand .brand-mark { width: 32px; height: 32px; background: #edf5ff; }
.login-form h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.login-subtitle { margin: -9px 0 5px; color: var(--muted); font-size: 12px; }
.login-form .form-field input { height: 42px; background: #fbfdff; }
.login-form .form-field input:focus { background: #fff; }
.login-submit { min-height: 42px; margin-top: 4px; }

@media (max-width: 800px) {
  .sidebar-section { padding-top: 14px; }
  .sidebar-section-last { margin-top: 7px; padding-top: 11px; }
  .page-heading { align-items: flex-start; }
}
@media (max-width: 560px) {
  .workspace-label { margin-left: 8px; padding: 0 10px; }
  .filter-row { gap: 9px; }
  .table-wrap, .compact-module-view .table-wrap { min-height: 200px; }
  .analytics-metric { padding-left: 12px; }
  .analytics-metric::before { top: 10px; bottom: 10px; }
  .login-form { padding: 25px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .side-nav-item { transition: none; }
}

/* Customer import keeps the existing compact business workspace language. */
.import-view { display: grid; gap: 14px; min-width: 0; }
.import-guide { display: flex; align-items: center; gap: 13px; padding: 15px 17px; }
.import-guide-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 8px; color: #276fd0; background: #eaf3ff; }
.import-guide-icon svg { width: 20px; height: 20px; }
.import-guide h2, .import-section-heading h2 { margin: 0; color: var(--navy); font-size: 15px; }
.import-guide p, .import-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.import-guide > div { min-width: 0; flex: 1; }
.import-guide .button { flex: 0 0 auto; }
.import-layout { display: grid; grid-template-columns: minmax(270px, .7fr) minmax(0, 1.3fr); align-items: start; gap: 14px; }
.import-setup, .import-preview { min-width: 0; padding: 18px; }
.import-section-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.import-section-heading > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 6px; color: #1f68c8; background: #eaf3ff; font-size: 11px; font-weight: 700; }
.import-section-heading > div { min-width: 0; }
.import-setup .form-field { margin-bottom: 16px; }
.import-setup .form-field select { height: 36px; }
.import-file { display: grid; min-height: 158px; place-content: center; justify-items: center; gap: 7px; padding: 15px; border: 1px dashed #a9c5e9; border-radius: 8px; color: #2a66b5; background: #f7faff; cursor: pointer; text-align: center; }
.import-file:hover, .import-file:focus-within { border-color: var(--blue); background: #eff6ff; }
.import-file svg { width: 25px; height: 25px; }
.import-file strong { font-size: 13px; }
.import-file span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.import-file input { width: 1px; height: 1px; opacity: 0; position: absolute; }
.import-help { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.import-table-wrap { min-height: 196px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.import-table { min-width: 620px; }
.import-table th { height: 38px; padding: 0 10px; }
.import-table td { height: 38px; padding: 0 10px; }
.import-table .import-empty { height: 150px; color: var(--muted); text-align: center; }
.import-message { min-height: 20px; margin: 12px 0; color: #52647c; font-size: 12px; line-height: 1.6; }
.import-message.error { color: #bb3b41; }
.import-message.success { color: #087a56; }
.import-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.import-actions span { color: var(--muted); font-size: 12px; }
.import-actions .button:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; }
@media (max-width: 980px) { .import-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .import-guide { flex-wrap: wrap; padding: 13px; }
  .import-guide > div { flex: 1 1 calc(100% - 52px); }
  .import-guide .button { width: 100%; }
  .import-setup, .import-preview { padding: 13px; }
  .import-file { min-height: 130px; }
}

/* Sales-process workspace: compact journey, workbench and authorized customer view. */
.customer-journey { display: flex; align-items: center; gap: 18px; min-height: 73px; margin-bottom: 12px; padding: 10px 15px; }
.customer-journey-intro { display: grid; gap: 3px; min-width: 145px; padding-right: 17px; border-right: 1px solid var(--line-soft); }
.customer-journey-intro strong { color: var(--navy); font-size: 13px; }
.customer-journey-intro span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.customer-journey-steps { display: grid; grid-auto-columns: minmax(115px, 1fr); grid-auto-flow: column; gap: 7px; width: 100%; }
.customer-journey-step { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid transparent; border-radius: 6px; color: #536782; background: #f7f9fc; cursor: pointer; text-align: left; }
.customer-journey-step:hover { border-color: #c8ddfa; background: #f0f6ff; }
.customer-journey-step.active { border-color: #b9d6fa; color: #1c62bd; background: #edf5ff; box-shadow: inset 0 0 0 1px rgba(36, 111, 216, .06); }
.journey-step-number { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 50%; color: #6c7d92; background: #e8eef6; font-size: 11px; font-weight: 700; }
.customer-journey-step.active .journey-step-number { color: #fff; background: #2b76e5; }
.journey-step-copy { display: grid; min-width: 0; gap: 1px; }
.journey-step-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.journey-step-copy small { color: #8190a4; font-size: 10px; white-space: nowrap; }
.customer-journey-step > svg { width: 15px; height: 15px; flex: 0 0 15px; margin-left: auto; opacity: .66; }
.row-detail-action { font-weight: 700; }
.flow-action-column { min-width: 270px; }
.analytics-workbench { display: flex; align-items: center; gap: 22px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(31, 57, 91, .035); }
.analytics-workbench > div:first-child { display: grid; min-width: 145px; gap: 4px; }
.analytics-workbench > div:first-child strong { color: var(--navy); font-size: 14px; }
.analytics-workbench > div:first-child span { color: var(--muted); font-size: 11px; }
.analytics-workbench-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 9px; }
.analytics-workbench-links button { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #e0eaf6; border-radius: 6px; color: #2c6cc2; background: #f8fbff; cursor: pointer; text-align: left; }
.analytics-workbench-links button:hover { border-color: #a8c9f2; background: #edf5ff; }
.analytics-workbench-links button > svg:first-child { width: 18px; height: 18px; flex: 0 0 18px; }
.analytics-workbench-links button > svg:last-child { width: 14px; height: 14px; margin-left: auto; opacity: .55; }
.analytics-workbench-links button span { display: grid; min-width: 0; gap: 2px; }
.analytics-workbench-links button strong { color: #274b78; font-size: 12px; white-space: nowrap; }
.analytics-workbench-links button small { overflow: hidden; color: #8190a4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-detail-dialog { position: fixed; z-index: 42; top: 50%; left: 50%; display: flex; width: min(700px, calc(100vw - 32px)); max-height: min(690px, calc(100vh - 40px)); flex-direction: column; overflow: hidden; border: 1px solid #d8e4f2; border-radius: 10px; background: #fff; box-shadow: 0 22px 60px rgba(21, 43, 75, .22); opacity: 0; pointer-events: none; transform: translate(-50%, calc(-50% + 10px)); transition: opacity 160ms ease, transform 160ms ease; }
.customer-detail-dialog.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
#customerDetailOverlay { z-index: 41; }
.customer-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 3px solid #2b76e5; border-bottom: 1px solid var(--line); background: #fbfdff; }
.customer-detail-header p { margin: 0 0 3px; color: #3172cb; font-size: 11px; font-weight: 700; }
.customer-detail-header h2 { margin: 0; color: var(--navy); font-size: 17px; }
.customer-detail-body { overflow-y: auto; padding: 17px 18px; }
.customer-detail-status { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; color: var(--muted); font-size: 12px; }
.customer-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.customer-detail-grid > div { min-width: 0; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.customer-detail-grid > div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.customer-detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.customer-detail-grid dt { color: #8592a3; font-size: 11px; }
.customer-detail-grid dd { overflow-wrap: anywhere; margin: 4px 0 0; color: #2f4056; font-size: 13px; font-weight: 600; }
.customer-detail-note { margin-top: 13px; padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fafcff; }
.customer-detail-note h3 { margin: 0 0 6px; color: #485c76; font-size: 12px; }
.customer-detail-note p { margin: 0; color: #44546a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.customer-detail-loading { margin: 30px 0; color: var(--muted); font-size: 13px; text-align: center; }
.customer-detail-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--line); background: #f7f9fc; }
@media (max-width: 1100px) {
  .customer-journey { align-items: stretch; flex-direction: column; gap: 10px; }
  .customer-journey-intro { padding-right: 0; border-right: 0; }
  .analytics-workbench { align-items: stretch; flex-direction: column; gap: 12px; }
}
@media (max-width: 680px) {
  .customer-journey { padding: 11px; }
  .customer-journey-steps { grid-auto-columns: minmax(115px, 1fr); overflow-x: auto; padding-bottom: 2px; }
  .analytics-workbench-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-detail-grid { grid-template-columns: 1fr; }
  .customer-detail-grid > div:nth-child(odd) { border-right: 0; }
  .customer-detail-grid > div:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
}
@media (prefers-reduced-motion: reduce) { .customer-detail-dialog { transition: none; } }

.customer-activity { margin-top: 15px; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.customer-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); background: #f8fbff; }
.customer-activity-heading h3 { margin: 0; color: #344d6d; font-size: 12px; }
.customer-activity-heading span { color: #8592a3; font-size: 11px; }
.customer-activity ol { margin: 0; padding: 0; list-style: none; }
.customer-activity li { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.customer-activity li:last-child { border-bottom: 0; }
.customer-activity-kind { display: grid; min-width: 38px; height: 22px; place-items: center; border-radius: 5px; color: #246abf; background: #eaf3ff; font-size: 11px; font-weight: 700; }
.customer-activity li:nth-child(3n+2) .customer-activity-kind { color: #00866e; background: #e8f8f3; }
.customer-activity li:nth-child(3n) .customer-activity-kind { color: #a4651c; background: #fff4e5; }
.customer-activity li > div { display: grid; min-width: 0; gap: 3px; }
.customer-activity li strong { color: #34465d; font-size: 12px; }
.customer-activity li small { color: #8391a3; font-size: 11px; }
.customer-activity li p { margin: 3px 0 0; color: #52647c; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.customer-activity-empty { margin: 0; padding: 16px 13px; color: #8190a4; font-size: 12px; }
/* Clearly separate the public read-only preview from a production workspace. */
.preview-ribbon { position: fixed; z-index: 9999; top: 0; left: 50%; transform: translateX(-50%); padding: 5px 16px; border-radius: 0 0 10px 10px; background: #103c7a; color: #fff; box-shadow: 0 4px 12px #142a4b30; font-size: 12px; font-weight: 700; letter-spacing: .04em; pointer-events: none; }
