:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --border: #e4e7ee;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --brand: #1b3a5c;
  --brand-soft: #eaf0f6;
  --accent: #f26522;
  --accent-dark: #d9541c;
  --accent-soft: #fdece1;
  --green: #15803d;
  --green-soft: #e8f7ee;
  --amber: #b45309;
  --amber-soft: #fef3e2;
  --gray: #4b5563;
  --gray-soft: #eef0f2;
  --blue: #1d4ed8;
  --blue-soft: #e8effe;
  --purple: #7c3aed;
  --purple-soft: #f2ecfe;
  --red: #b91c1c;
  --red-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 20px -4px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.20), 0 8px 16px rgba(16, 24, 40, 0.08);
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme is always explicit — layouts/app.blade.php and auth/login.blade.php
   both set data-theme on <html> directly (defaulting to "light", never the
   OS prefers-color-scheme) — so only these two blocks are ever read. */
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --border: #e4e7ee;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --brand: #1b3a5c;
  --brand-soft: #eaf0f6;
  --accent: #f26522;
  --accent-dark: #d9541c;
  --accent-soft: #fdece1;
  --green-soft: #e8f7ee;
  --amber-soft: #fef3e2;
  --gray-soft: #eef0f2;
  --blue-soft: #e8effe;
  --purple-soft: #f2ecfe;
  --red-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 20px -4px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.20), 0 8px 16px rgba(16, 24, 40, 0.08);
}

:root[data-theme="dark"] {
  --bg: #10121a;
  --surface: #1a1e29;
  --border: #2c313e;
  --text: #edeef2;
  --text-muted: #9aa1b0;
  --brand: #6a9ac4;
  --brand-soft: #1e2f42;
  --accent: #ff8c50;
  --accent-dark: #ff6d24;
  --accent-soft: #3a2416;
  --green-soft: #10301f;
  --amber-soft: #392a10;
  --gray-soft: #262b35;
  --blue-soft: #16233a;
  --purple-soft: #27203e;
  --red-soft: #391818;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 28px 56px -12px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }

/* ---------------------------------------------------------------------
   Header / navigation
   --------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { font-size: 15px; margin: 0; color: var(--text-muted); font-weight: 600; letter-spacing: 0.01em; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { height: 26px; width: auto; display: block; border-radius: 0; }

/* ── Topbar nav button (Engagement etc.) ── */
.topbar-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); text-decoration: none;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  transition: border-color .15s, color .15s, background .15s; cursor: pointer; margin-left: 8px;
}
.topbar-nav-btn i { font-size: 1rem; color: var(--brand); }
.topbar-nav-btn:hover, .topbar-nav-btn.active { border-color: var(--brand); color: var(--brand); background: var(--surface); }

/* ── Account settings dropdown ── */
.topbar-settings-wrap { position: relative; margin-left: 10px; }
.topbar-settings-btn {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.topbar-settings-btn i.bi-person-circle { font-size: 1.3rem; color: var(--brand); }
.topbar-settings-btn:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.topbar-chevron { font-size: 0.65rem; color: var(--text-muted); transition: transform .2s; }
.topbar-settings-wrap.open .topbar-chevron { transform: rotate(180deg); }
#topbar-email-wrap .topbar-nav-btn,
#topbar-files-wrap .topbar-nav-btn { flex-direction: row; align-items: center; gap: 6px; padding: 6px 10px; font-size: 0.75rem; }
.topbar-email-badge {
  position: absolute; top: 4px; right: 4px;
  display: flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--red, #d32f2f); color: #fff;
  font-size: 0.6rem; font-weight: 700; line-height: 1;
  pointer-events: none; z-index: 1;
}
#topbar-email-dropdown .topbar-dropdown-item.active { color: var(--brand); font-weight: 600; }
.topbar-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 260px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 200; overflow: hidden;
}
.topbar-settings-wrap.open .topbar-dropdown { display: block; }
.topbar-dropdown-user { padding: 14px 18px 12px; min-width: 0; }
.topbar-dropdown-name { font-size: 0.88rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-dropdown-email { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-dropdown-divider { height: 1px; background: var(--border); margin: 2px 0; }
.topbar-dropdown-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 16px;
  font-size: 0.82rem; color: var(--text); text-decoration: none; background: none;
  border: none; cursor: pointer; transition: background .12s; text-align: left;
}
.topbar-dropdown-item i { font-size: 0.95rem; color: var(--text-muted); width: 16px; text-align: center; }
.topbar-dropdown-item:hover { background: var(--bg); color: var(--brand); }
.topbar-dropdown-item:hover i { color: var(--brand); }
.topbar-dropdown-danger { color: var(--danger, #d93025) !important; }
.topbar-dropdown-danger i { color: var(--danger, #d93025) !important; }
.topbar-dropdown-danger:hover { background: #fef2f2; }

.stat-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  min-width: 120px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}
.stat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-tile-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: var(--brand-soft); color: var(--brand);
}
.stat-tile-accent .stat-tile-icon { background: var(--accent-soft); color: var(--accent); }
.stat-tile-blue .stat-tile-icon { background: var(--blue-soft); color: var(--blue); }
.stat-tile-green .stat-tile-icon { background: var(--green-soft); color: var(--green); }
.stat-tile-purple .stat-tile-icon { background: var(--purple-soft); color: var(--purple); }
.stat-value, .stat-tile .num { font-size: 18px; font-weight: 700; display: block; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); }
.stat-label, .stat-tile .label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  max-width: 1300px;
  margin: 0 auto;
}
.tab-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.tab-btn:hover { color: var(--text); background: var(--bg); }
.tab-btn.active { color: #fff; background: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------------
   Layout / toolbar
   --------------------------------------------------------------------- */
main.container-fluid { padding: 22px 24px 44px; max-width: 1300px; margin: 0 auto; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.toolbar > div { margin-left: auto; }
/* Bootstrap's .form-control/.form-select default to width:100% (built for
   stacked form layouts) — this app always places them in an inline toolbar
   or a CSS-grid edit field, so undo that and let them size naturally. */
.form-control, .form-select {
  width: auto;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-control::placeholder, textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
.toolbar input[type="search"] { flex: 1; min-width: 260px; }

/* Search-box icon + filter-select icon — small, muted, consistent across
   every module's toolbar. */
.search-box { position: relative; flex: 1; min-width: 260px; display: flex; }
.search-box > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-box input[type="search"] { width: 100% !important; padding-left: 32px; flex: none; min-width: 0; }

.filter-group { display: inline-flex; align-items: center; gap: 6px; }
.filter-group > i { color: var(--text-muted); font-size: 13px; }

/* Multi-select filter dropdown (checkbox list + Apply/Clear) */
.filter-dropdown .dropdown-toggle { cursor: pointer; user-select: none; text-align: left; min-width: 170px; }
.filter-dropdown .dropdown-toggle::after { float: right; margin-top: 7px; }
.filter-dropdown-menu { padding: 6px; max-height: 280px; overflow-y: auto; min-width: 220px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.filter-dropdown-menu .dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.filter-dropdown-menu .dropdown-item:hover { background: var(--bg); }
.filter-dropdown-menu input[type="checkbox"] { cursor: pointer; }
.filter-dropdown-actions { display: flex; gap: 8px; padding: 8px 8px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.filter-dropdown-actions .save-btn, .filter-dropdown-actions .ghost-btn { flex: 1; text-align: center; justify-content: center; font-size: 12px; padding: 6px 10px; }

.btn, .ghost-btn {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover, .ghost-btn:hover, .btn-outline-secondary:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-sm); background: var(--surface); transform: translateY(-1px); }
.danger-btn { color: var(--red); border-color: var(--red); }
.danger-btn:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.danger-zone { margin-top: 28px; padding-top: 14px; border-top: 1px dashed var(--border); }
.btn-outline-secondary, .btn-outline-primary { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-link { color: var(--brand); font-weight: 600; text-decoration: none; border: none; background: none; }
.btn-link:hover { color: var(--accent); }
.btn-sm { font-size: 13px; padding: 8px 15px; }

#io-status { font-size: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap, .card-list-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.table-wrap { overflow-x: auto; }
.card-list-wrap { padding: 18px 20px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  font-weight: 700;
}
thead tr:first-child th:first-child { border-top-left-radius: var(--radius); }
thead tr:first-child th:last-child { border-top-right-radius: var(--radius); }
.sortable a { color: var(--text-muted); text-decoration: none; }
.sortable a:hover { color: var(--brand); }
.sortable.sort-active a { color: var(--accent); }
.sort-arrow { display: inline-block; margin-left: 4px; font-size: 9px; opacity: 0.45; }
.sort-active .sort-arrow { opacity: 1; font-weight: 700; }

tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; color: var(--text); }
tbody tr { cursor: pointer; transition: background 0.12s var(--ease); }
.table-hover > tbody > tr:hover > * { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: none; }
.fw-semibold { font-weight: 600; }
.text-muted.small { color: var(--text-muted) !important; font-size: 12px; }
.company-name { font-weight: 600; }
.company-domain { color: var(--text-muted); font-size: 12px; }
.deal-name { font-weight: 600; }

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.badge-empty { background: transparent; color: var(--text-muted); }
.badge-green { background: var(--green-soft); color: var(--green); } .badge-green .badge-dot { background: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); } .badge-amber .badge-dot { background: var(--amber); }
.badge-gray { background: var(--gray-soft); color: var(--gray); } .badge-gray .badge-dot { background: var(--gray); }
.badge-blue { background: var(--blue-soft); color: var(--blue); } .badge-blue .badge-dot { background: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); } .badge-purple .badge-dot { background: var(--purple); }
.badge-red { background: var(--red-soft); color: var(--red); } .badge-red .badge-dot { background: var(--red); }

.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ---------------------------------------------------------------------
   Drawer (Bootstrap offcanvas)
   --------------------------------------------------------------------- */
.offcanvas-backdrop.show { background: rgba(16, 20, 30, 0.5); opacity: 1; backdrop-filter: blur(2px); }
.offcanvas {
  border-left: 1px solid var(--border) !important;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}
.offcanvas-header { padding: 26px 30px 0; border-bottom: none !important; }
.offcanvas-body { padding: 8px 30px 60px; }
.offcanvas-title { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; color: var(--text); text-transform: none; }
.btn-close {
  font-size: 20px; opacity: 1; color: var(--text-muted); background: none;
  width: auto; height: auto; padding: 4px 8px; border-radius: var(--radius-sm);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-close:hover { color: var(--text); background: var(--bg); opacity: 1; }

h4, h5 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.015em; color: var(--text); font-weight: 650; }
.reasons-line { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.field-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field-value { font-size: 13px; margin-top: 3px; word-break: break-word; color: var(--text); }

.target-box { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: 13px; border: 1px solid var(--border); }
.journey-box {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 20px; font-size: 13px; box-shadow: var(--shadow-sm);
}

.related-card, .timeline-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 17px;
  margin-bottom: 12px;
  font-size: 14px;
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.related-card[data-open-record], .timeline-item[data-open-record] { cursor: pointer; }
.related-card[data-open-record]:hover, .timeline-item[data-open-record]:hover { box-shadow: var(--shadow-md); border-color: var(--brand); transform: translateY(-1px); }
.notes-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12px; white-space: pre-wrap; margin-bottom: 8px; max-height: 220px; overflow-y: auto;
}

.section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin: 24px 0 9px; display: flex; align-items: center; gap: 8px;
}
.section-title-with-action { justify-content: space-between; }
.section-add-btn { text-transform: none; letter-spacing: normal; font-size: 12px; font-weight: 500; padding: 4px 10px; margin-left: auto; }
.count-chip { background: var(--gray-soft); color: var(--gray); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.stat-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; overflow: hidden; text-transform: none; letter-spacing: normal; font-weight: 500; vertical-align: middle; }
.stat-chip-label { padding: 3px 7px; color: var(--text-muted); background: var(--gray-soft); border-right: 1px solid var(--border); }
.stat-chip-count { padding: 3px 8px; color: var(--text); font-weight: 700; background: var(--surface); }

.sub-muted { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.drawer-title-with-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-title-with-action .ghost-btn { margin-left: 0; font-size: 12px; }
.drawer-actions { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.drawer-actions .edit-trigger { margin: 0; }

/* Folder-tab control — a full-width row of its own below the action
   buttons. Active tab gets a bordered card raised above the strip (border
   color matches the panel background so it reads as attached). */
.record-tab-nav {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100%;
  margin: 2px 0 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
  flex-wrap: wrap;
}
.record-tab-nav .nav-item { display: flex; }
.record-tab-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
  outline: none;
}
.record-tab-nav .nav-link:hover { color: var(--text); background: var(--bg); }
.record-tab-nav .nav-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.record-tab-nav .nav-link.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
}
.record-tab-nav .nav-link .badge {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
}
.record-tab-nav .nav-link.active .badge { background: var(--blue-soft); color: var(--blue); }

.record-tab-nav + .tab-content { margin-top: 14px; }
.edit-trigger { margin: 6px 0 10px; }
.edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.create-suggestion { margin-top: 12px; }

.related-card-title { font-weight: 700; font-size: 14px; }
.related-card-link { font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 8px; }
.related-card .info-grid { margin: 8px 0 0; background: transparent; border: none; padding: 0; }

.timeline-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-item .tl-main { flex: 1; }
.timeline-item .tl-dates { color: var(--text-muted); font-size: 12px; }

.dup-actions { display: flex; gap: 8px; }

.journey-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.journey-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); min-width: 110px; }
.journey-value { font-weight: 600; }
.journey-block { margin-top: 10px; }
.journey-block-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
.journey-text { line-height: 1.5; color: var(--text); }
.journey-bullets { margin: 0; padding-left: 20px; line-height: 1.6; }
.journey-bullets li { margin-bottom: 4px; }

.target-box .target-title { font-weight: 700; margin-bottom: 6px; }
.target-box ul { margin: 6px 0 0; padding-left: 18px; }
.target-box li { margin-bottom: 2px; }

/* ---------------------------------------------------------------------
   Contact/lead card list rows — a shared CSS grid template so header +
   row columns line up, not a literal <table>.
   --------------------------------------------------------------------- */
.person-list-header, .person-row {
  display: grid;
  grid-template-columns: 18px minmax(140px, 1fr) minmax(140px, 1fr) minmax(120px, 170px) 108px 84px 118px 88px;
  align-items: center;
  gap: 10px;
}
.person-linkedin-col { text-align: left; }
.person-linkedin-link { color: var(--brand); text-decoration: none; font-weight: 600; font-size: 12px; }
.person-linkedin-link:hover { text-decoration: underline; }

/* Job Changers has one fewer column than Contacts/Leads (no Status/"Was"
   badge — its long "Left <company>" text overflowed its column). */
.job-changer-row {
  grid-template-columns: 18px minmax(130px,1.2fr) minmax(170px,1.5fr) minmax(110px,1fr) minmax(110px,1fr) 108px 80px !important;
}
.jc-title-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  cursor: default;
}
.person-list-header {
  padding: 7px 15px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.person-list-header .sortable-col { cursor: pointer; text-decoration: none; color: inherit; }
.person-list-header .sortable-col:hover { color: var(--brand); }
.person-list-header .sortable-col.sort-active { color: var(--accent); }
.person-row {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; padding: 11px 15px;
  cursor: pointer; transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease); text-decoration: none; color: inherit;
}
.person-row:hover { box-shadow: var(--shadow-md); border-color: var(--brand); transform: translateY(-1px); }
.person-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-title, .person-company { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .badge-pill {
  justify-self: start; max-width: 100%; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; display: inline-block; white-space: nowrap;
}
.person-row .badge-pill .badge-dot { display: inline-block; vertical-align: middle; margin-right: 5px; }

/* The account drawer (offcanvas, max 760px) is narrower than the full-page
   Contacts/Leads lists — compress column widths so all 7 (including the
   LinkedIn link) still fit without horizontal overflow. */
.offcanvas-body .person-list-header,
.offcanvas-body .person-row {
  grid-template-columns: 18px minmax(90px, 1fr) minmax(90px, 1fr) minmax(80px, 110px) 90px 70px 90px 80px;
  gap: 6px;
}

/* ---------------------------------------------------------------------
   Edit / create forms
   --------------------------------------------------------------------- */
.edit-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px 15px; }
.edit-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); }
.edit-field-wide { grid-column: 1 / -1; }
.edit-field .form-control, .edit-field .form-select {
  font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); color: var(--text); font-family: inherit;
}
.edit-field textarea { resize: vertical; line-height: 1.5; }
.save-btn {
  padding: 9px 18px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: filter 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}
.save-btn:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); color: #fff; transform: translateY(-1px); }
.save-btn:active { transform: translateY(1px); }
.edit-status { font-size: 12px; color: var(--text-muted); }
.edit-status:empty { display: none; }

/* ---------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 18px 0 4px; margin-bottom: 0; }
.page-link {
  min-width: 32px; text-align: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 13px; box-shadow: none;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.page-link:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); transform: translateY(-1px); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: white; box-shadow: var(--shadow-sm); }
.page-item.disabled .page-link { opacity: 0.4; color: var(--text); background: var(--surface); }

.dup-pair-item { align-items: center; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------------------------------------------------------------------
   Login page
   --------------------------------------------------------------------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.login-theme-toggle { position: fixed; top: 18px; right: 18px; }
.login-shell {
  display: flex;
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.login-brand {
  flex: 1 1 42%;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(155deg, var(--brand), #0f2438);
}
.login-logo-badge {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.login-logo-badge img { max-width: 38px; max-height: 30px; width: auto; height: auto; object-fit: contain; }
.login-brand h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.login-brand p { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin: 0; line-height: 1.6; max-width: 260px; }
.login-form-panel { flex: 1 1 58%; padding: 44px 40px; }
.login-form-panel h2 { font-size: 21px; margin: 0 0 4px; }
.login-form-panel .sub-muted { margin-bottom: 24px; }
.login-alert {
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-soft);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.login-alert-success {
  background: var(--green-soft); color: var(--green); border-color: var(--green-soft);
}
.login-field { margin-bottom: 18px; }
.login-field-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 6px; display: block;
}
.login-input-group {
  display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-input-icon { display: flex; align-items: center; padding: 0 12px; color: var(--text-muted); font-size: 14px; }
.login-input-group input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 10px 4px 10px 0;
  font-size: 14px; color: var(--text); outline: none;
}
.login-toggle-visibility { border: none; background: transparent; color: var(--text-muted); padding: 0 12px; cursor: pointer; }
.login-toggle-visibility:hover { color: var(--text); }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.login-submit {
  width: 100%; padding: 11px 16px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: filter 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-submit:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); }
.login-submit:active { transform: translateY(1px); }
.login-footer-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 22px; }

@media (max-width: 680px) {
  .login-shell { flex-direction: column; max-width: 420px; }
  .login-brand { padding: 28px 28px 20px; }
  .login-form-panel { padding: 28px 28px 34px; }
}

/* ── Flash toast (post-delete confirmation) ──────────────────────────────── */
.flash-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a7f4b;
  color: #fff;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
}
.flash-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Quick-filter chip (e.g. Free Trial toggle on leads) ─────────────────── */
.quick-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.quick-filter-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.quick-filter-chip--active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.quick-filter-chip--active:hover {
  background: var(--brand-dark, var(--brand));
  color: #fff;
}

/* ── Account autocomplete dropdown ──────────────────────────────────────── */
.account-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 2px 0 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
}
.account-search-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
}
.account-search-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.account-domain-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.account-chip-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Global search bar (in nav) ──────────────────────────────────────────── */
.global-search-wrap {
  position: relative;
  margin-left: auto;
  min-width: 200px;
  max-width: 280px;
  flex-shrink: 0;
  align-self: center;
  margin-right: 4px;
}
.global-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.global-search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}
.js-global-search {
  width: 100%;
  padding: 5px 10px 5px 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.js-global-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(27,58,92,0.12);
  background: var(--surface);
}
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 320px;
  z-index: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 400px;
  overflow-y: auto;
}
.global-search-group-label {
  padding: 6px 12px 3px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.global-search-group-label:first-child { border-top: none; }
.global-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
}
.global-search-item:hover { background: var(--brand-soft); color: var(--brand); }
.global-search-item i { font-size: 0.9rem; color: var(--text-muted); flex-shrink: 0; }
.global-search-item:hover i { color: var(--brand); }
.global-search-item-label { font-weight: 500; }
.global-search-item-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }
.global-search-empty { padding: 10px 12px; font-size: 0.82rem; color: var(--text-muted); }

/* ── Summary bullet points ───────────────────────────────────────────────── */
.summary-points {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}
.summary-points li { margin-bottom: 4px; }

/* ── Next step box ───────────────────────────────────────────────────────── */
.next-step-box {
  margin: 8px 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.next-step-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.next-step-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

/* ── Job Changer cross-link button ──────────────────────────────────────── */
.ghost-btn--icon { padding: 6px 10px; font-size: 14px; }
.ghost-btn--jc {
  border-color: var(--purple);
  color: var(--purple);
}
.ghost-btn--jc:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
}

/* ── Job Changer rows inside account drawer ──────────────────────────────── */
.jc-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.jc-account-row:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
}
.jc-account-row-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}
.jc-account-row-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.jc-account-row-muted { color: var(--text-muted); }
.jc-account-row-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.jc-account-row:hover .jc-account-row-arrow { color: var(--purple); }

/* ── Accounts table — secondary column font size ─────────────────────────── */
#accounts-table tbody td:nth-child(2),
#accounts-table tbody td:nth-child(3),
#accounts-table tbody td:nth-child(4),
#accounts-table tbody td:nth-child(8),
#accounts-table tbody td:nth-child(9) {
  font-size: 12px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ── Opportunities table — secondary column font (task 1) ────────────────── */
#opportunities-table tbody td:nth-child(2),
#opportunities-table tbody td:nth-child(4),
#opportunities-table tbody td:nth-child(6),
#opportunities-table tbody td:nth-child(7) {
  font-size: 12px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ── Contact list — narrower name column so others breathe (task 2) ─────── */
.contacts-list .person-list-header,
.contacts-list .person-row {
  grid-template-columns: 18px minmax(100px, 0.65fr) minmax(120px, 1fr) minmax(110px, 1fr) 115px 80px 108px 88px;
}
.contacts-list .person-row .person-company,
.contacts-list .person-list-header > *:nth-child(4) {
  padding-left: 24px;
}
.contacts-list .person-row .person-company {
  font-weight: 600;
  color: var(--text);
}

/* ── Drawer summaries + next step — Inter 13px (tasks 3 & 4) ─────────────── */
.summary-points { font-size: 13px; }
.next-step-text { font-size: 13px; }

/* ── Leads list — fix clustered status/linkedin/target (task 5) ──────────── */
.leads-list .person-list-header,
.leads-list .person-row {
  grid-template-columns: 18px minmax(120px, 1fr) minmax(120px, 1fr) minmax(110px, 1fr) 120px 80px 108px 88px;
}
.leads-list .person-row .person-company { font-weight: 600; color: var(--text); }

/* ── Job changers — tighter name, wider title ──────────────────────────── */
.job-changer-row {
  grid-template-columns: 18px minmax(105px, 0.85fr) minmax(170px, 1.5fr) minmax(100px, 1fr) minmax(100px, 1fr) 108px 78px !important;
}
.jc-title-cell { max-width: none; font-size: 12px; }

/* ── Job changers — extra spacing after New Title column ─────────────────── */
.job-changer-row > *:nth-child(3) { padding-right: 40px; }
/* New Company (4th child) bold; Previous Company stays muted */
.job-changer-row > *:nth-child(4) { font-weight: 600; color: var(--text); }

/* ── Replacements list ────────────────────────────────────────────────────── */
.replacement-row {
  grid-template-columns: 18px minmax(120px,1fr) minmax(140px,1.2fr) minmax(110px,1fr) minmax(150px,1.4fr) 108px 80px !important;
}
.replacement-row > .person-company { font-weight: 600; color: var(--text); }
.repl-jc-ref { display: flex; flex-direction: column; gap: 1px; }
.repl-jc-name { font-size: 13px; color: var(--brand); cursor: pointer; text-decoration: none; }
.repl-jc-name:hover { text-decoration: underline; }
.repl-jc-title { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.repl-jc-change-btn { font-size: 11px; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.replacement-row:hover .repl-jc-change-btn { opacity: 1; }
.repl-jc-change-btn:hover { color: var(--brand); }
.repl-jc-add { font-size: 12px; color: var(--brand); cursor: pointer; opacity: .6; }
.repl-jc-add:hover { opacity: 1; text-decoration: underline; }
.person-title { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Replacement record — outreach summary ───────────────────────────────── */
.repl-outreach-summary { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.repl-bullet { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--gray-soft); border-radius: 8px; border-left: 3px solid var(--brand); font-size: 13px; }
.repl-bullet-icon { color: var(--brand); font-size: 15px; flex-shrink: 0; padding-top: 1px; }
.repl-bullet-label { font-weight: 600; color: var(--text); margin-bottom: 2px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.repl-bullet-text { color: var(--text-muted); line-height: 1.5; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dash-wrap { padding: 1rem 0 2rem; }
.dash-page-header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.25rem; }
.dash-page-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.dash-page-date { font-size: 0.78rem; color: var(--text-muted); }

.dash-insight-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.dash-insight { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; text-decoration: none; color: inherit; transition: border-color 0.15s; }
.dash-insight:hover { border-color: var(--brand); color: inherit; }
.dash-insight-val { font-size: 1.6rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.dash-insight-lbl { font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; }
.dash-insight-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; }

.dash-grid { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dash-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .dash-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .dash-grid-2 { grid-template-columns: 1fr; } }

.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.25rem; }
.dash-card-title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.9rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.dash-card-total { font-size: 0.72rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; margin-left: auto; }
.dash-chart-wrap { position: relative; }
.dash-donut-wrap { position: relative; height: 230px; }

.dash-stage-list { list-style: none; padding: 0; margin: 0.75rem 0 0; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.dash-stage-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.18rem 0; font-size: 0.78rem; }
.dash-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dash-stage-label { flex: 1; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stage-label:hover { color: var(--brand); text-decoration: underline; }
.dash-stage-count { font-weight: 600; color: var(--text); font-size: 0.78rem; }

/* Horizontal stage breakdown strip under Opportunities chart */
/* ── Dashboard stat tables ──────────────────────────────────────────────── */
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; padding: 0 8px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dash-table th.right { text-align: right; }
.dash-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: var(--hover); cursor: pointer; }
.dash-table a { color: var(--text); text-decoration: none; }
.dash-table a:hover { color: var(--brand); text-decoration: underline; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.dash-table .dot-cell { display: flex; align-items: center; gap: 8px; }
.dash-table .dot-cell .dash-stage-dot { flex-shrink: 0; }
.dash-pct-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dash-pct-bar-wrap { width: 72px; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.dash-pct-bar { height: 100%; border-radius: 3px; }
.dash-pct-text { font-size: 11px; color: var(--text-muted); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.dash-stage-strip { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.dash-stage-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.dash-stage-chip a { color: var(--text-muted); text-decoration: none; }
.dash-stage-chip a:hover { color: var(--text); text-decoration: underline; }
.dash-stage-chip .dash-stage-count { font-weight: 600; color: var(--text); margin-left: 1px; }

.dash-section-label { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD v2
   ═══════════════════════════════════════════════════════════════════════════ */
.dash-wrap { padding: 1.5rem 0 3rem; }
.dash-kpi-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.dash-kpi-big { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--kc, var(--brand)); border-radius: 14px; padding: 1.4rem 1.6rem 1.5rem; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease); display: flex; flex-direction: column; gap: 0; }
.dash-kpi-big:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: inherit; }
.dash-kpi-icon-wrap { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 14px; flex-shrink: 0; }
.dash-kpi-val { font-size: 2.8rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--text); margin-bottom: 8px; }
.dash-kpi-lbl { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.dash-kpi-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; opacity: 0.8; }
.dash-kpi-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; margin-bottom: 1.75rem; }
.dash-kpi-small { background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--kc, var(--brand)); border-radius: 11px; padding: 1rem 1.1rem 0.95rem; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 11px; box-shadow: var(--shadow-sm); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.dash-kpi-small:hover { border-color: var(--kc, var(--brand)); transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
.dash-kpi-ico { font-size: 18px; flex-shrink: 0; opacity: 0.85; }
.dash-kpi-num { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; color: var(--text); }
.dash-kpi-tag { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; margin-top: 1px; }
.dash-section-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 0.9rem; }
.dash-section-hdr span { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); white-space: nowrap; }
.dash-section-hdr::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.dash-card-title { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.dash-card-total { font-size: 0.8rem; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; margin-left: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; padding: 0 10px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dash-table th.right { text-align: right; }
.dash-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: var(--bg); cursor: pointer; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; font-size: 13px; }
.dash-table .dot-cell { display: flex; align-items: center; gap: 9px; }
.dash-rank { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; padding-right: 4px !important; opacity: 0.5; }
.dash-stage-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dash-pct-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dash-pct-bar-wrap { width: 90px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.dash-pct-bar { height: 100%; border-radius: 3px; }
.dash-pct-text { font-size: 11px; color: var(--text-muted); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.dash-donut-wrap { position: relative; height: 220px; }
.dash-stage-list { list-style: none; padding: 0; margin: 0.9rem 0 0; border-top: 1px solid var(--border); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 4px; }
.dash-stage-item { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 0.8rem; }
.dash-stage-label { flex: 1; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stage-label:hover { color: var(--brand); text-decoration: underline; }
.dash-stage-count { font-weight: 700; color: var(--text); font-size: 0.8rem; }
.dash-chart-wrap { position: relative; }
@media (max-width: 900px) { .dash-kpi-hero { grid-template-columns: 1fr; } .dash-kpi-strip { grid-template-columns: repeat(3, 1fr); } .dash-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .dash-kpi-strip { grid-template-columns: repeat(2, 1fr); } }

/* ── Sent emails section ─────────────────────────────────────────────── */
.sent-emails-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.sent-emails-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; }
.sent-email-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg); font-size: 0.82rem; }
.sent-email-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 8px; flex-wrap: wrap; }
.sent-email-to { color: var(--text); font-weight: 600; }
.sent-email-date { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; }
.sent-email-subject { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sent-email-body-wrap summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--bg);
}
.sent-email-body-wrap summary::-webkit-details-marker { display: none; }
.sent-email-body-wrap summary::before { content: '▸'; display: inline-block; margin-right: 5px; transition: transform .15s; }
.sent-email-body-wrap[open] summary::before { transform: rotate(90deg); }
.sent-email-body-wrap summary:hover { background: var(--border); }
.sent-email-body-wrap .email-message-body { margin-top: 6px; }
.sent-email-body-wrap summary .email-message-attachments-inline { font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }
.sent-email-body-wrap summary .email-message-attachments-inline a { color: var(--brand); }
.sent-email-body { white-space: pre-wrap; font-size: 0.78rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; margin-top: 6px; max-height: 260px; overflow-y: auto; font-family: inherit; }
.sent-email-from { font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; }
.sent-email-cc { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.sent-email-attachments { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.sent-email-attachments a { color: var(--brand); }
.sent-email-replies { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.sent-email-reply { font-size: 0.82rem; }

/* ── Email client, two-pane (/emails) ────────────────────────────────── */
.email-client { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; height: 74vh; min-height: 460px; }
@media (max-width: 860px) { .email-client { flex-direction: column; height: auto; } .email-list-pane { max-height: 46vh; } .email-reading-pane { max-height: 54vh; } }

.email-list-pane { flex: 0 0 360px; border-right: 1px solid var(--border); overflow-y: auto; }
.email-list-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--border); background: none; padding: 11px 14px; cursor: pointer; }
.email-list-row:hover { background: var(--bg); }
.email-list-row.active { background: var(--blue-soft); }
.email-list-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11.5px; }
.email-list-avatar.kind-sent { background: var(--blue-soft); color: var(--blue); }
.email-list-avatar.kind-received { background: var(--green-soft); color: var(--green); }
.email-list-avatar.kind-recipient { background: var(--brand-soft); color: var(--brand); }

/* Nested inside .section-title, which sets uppercase/12px/700 for the "EMAIL"
   header label — reset all of that here so picker content reads normally. */
#new-email-picker {
  text-transform: none; letter-spacing: normal; font-weight: 400; text-align: left;
}
#new-email-picker input { font-size: 13px; }
.recipient-picker-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
}
.recipient-picker-item:hover { background: var(--brand-soft); }
.recipient-picker-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipient-picker-email { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipient-picker-company { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.recipient-picker-main { min-width: 0; flex: 1 1 auto; }
.recipient-picker-type { flex: 0 0 auto; }
.email-list-main { flex: 1 1 auto; min-width: 0; }
.email-list-top { display: flex; justify-content: space-between; gap: 8px; }
.email-list-name { font-weight: 600; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.email-list-time { flex: 0 0 auto; font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.email-list-subject { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.email-list-snippet { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.email-list-badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.email-list-badges .badge-pill { font-size: 9px; padding: 1px 7px; text-decoration: none !important; }

.email-reading-pane { flex: 1 1 auto; overflow-y: auto; background: var(--surface); }
.email-reading-empty { padding: 60px 24px; text-align: center; color: var(--text-muted); }
.email-thread-block { display: none; padding: 20px 26px 26px; }
.email-thread-block.active { display: block; }
.email-thread-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.email-message { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); border-radius: 8px; padding: 13px 15px; font-size: 12.5px; scroll-margin-top: 20px; }
.email-message + .email-message { margin-top: 10px; }
.email-message.highlighted { outline: 2px solid var(--accent); outline-offset: 1px; }
.email-message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  cursor: pointer;
  list-style: none;
}
.email-message-header::-webkit-details-marker { display: none; }
.email-message-chevron {
  flex: 0 0 auto;
  display: inline-block;
  color: var(--text-muted);
  font-size: 16px;
  transition: transform .15s;
}
.email-message[open] > .email-message-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.email-message[open] > .email-message-header .email-message-chevron { transform: rotate(90deg); }
.email-message-avatar { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10.5px; background: var(--blue-soft); color: var(--blue); }
.email-message.is-reply .email-message-avatar { background: var(--green-soft); color: var(--green); }
.email-message-fromline { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex: 1 1 auto; min-width: 0; }
.email-message-fromline strong { color: var(--text); font-weight: 600; font-size: 12.5px; }
.email-message-fromline .muted { color: var(--text-muted); font-size: 11px; }
.email-message-time { flex: 0 0 auto; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.email-message-attachments-inline { flex: 0 0 auto; font-size: 11px; color: var(--text-muted); }
.email-message-attachments-inline a { color: var(--brand); }
.email-message-toline { font-size: 11px; color: var(--text-muted); margin: 0 0 8px; }
.email-message-body { white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; color: var(--text); max-height: 320px; overflow-y: auto; margin: 0; font-family: inherit; }
.email-quoted-toggle { margin-top: 6px; }
.email-quoted-toggle summary { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 18px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); font-size: 11px; letter-spacing: 1px; cursor: pointer; list-style: none; user-select: none; }
.email-quoted-toggle summary::-webkit-details-marker { display: none; }
.email-quoted-toggle summary:hover { background: var(--border); }
.email-quoted-toggle .email-message-quoted { margin-top: 6px; color: var(--text-muted); }
.email-message-attachments { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.email-message-attachments a { color: var(--brand); }
.email-thread-footer { margin-top: 12px; font-size: 11px; color: var(--text-muted); }

/* ── Email connection bar (inside outreach modal footer) ─────────────── */
.outreach-connect-bar { width: 100%; padding: 10px 18px 0; display: flex; align-items: center; gap: 8px; font-size: 0.78rem; flex-wrap: wrap; }
.outreach-connect-label { color: var(--text-muted); }
.outreach-provider-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: border-color .15s; }
.outreach-provider-btn:hover { border-color: var(--brand); }
.outreach-connected-as { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.outreach-connected-as strong { color: var(--text); }
.outreach-disconnect-link { margin-left: 6px; color: var(--danger,#d93025); cursor: pointer; text-decoration: underline; font-size: 0.72rem; }
.outreach-connected-as { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.outreach-connected-as strong { color: var(--text); }
.outreach-disconnect-link { font-size: 0.68rem; color: var(--text-muted); cursor: pointer; text-decoration: underline; }

/* ── Outreach modal overlay ───────────────────────────────────────────── */
.outreach-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 16px; }
.outreach-overlay.hidden { display: none; }
.outreach-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 680px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.outreach-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.outreach-modal-header h3 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin: 0; }
.outreach-recipient-info { padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 0.8rem; color: var(--text); background: var(--bg); }
.outreach-recipient-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.outreach-modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.outreach-angle-row { display: flex; gap: 6px; flex-wrap: wrap; }
.outreach-angle-btn { padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 0.75rem; cursor: pointer; transition: all .15s; }
.outreach-angle-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.outreach-angle-btn:hover:not(.active) { border-color: var(--brand); color: var(--brand); }
.outreach-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.outreach-email-area { width: 100%; min-height: 220px; resize: vertical; font-size: 0.82rem; line-height: 1.55; font-family: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; box-sizing: border-box; }
.outreach-email-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.outreach-hint-area { width: 100%; min-height: 54px; resize: vertical; font-size: 0.8rem; font-family: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; box-sizing: border-box; }
.outreach-hint-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.outreach-modal-footer { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.outreach-status { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.outreach-ccbcc-toggle { font-size: 0.72rem; color: var(--brand); cursor: pointer; text-decoration: underline; font-weight: 400; text-transform: none; letter-spacing: 0; }
#outreach-ccbcc-row.hidden { display: none; }
.outreach-modal--maximized { max-width: 98vw !important; max-height: 98vh !important; }
.outreach-modal--maximized #outreach-email-body { min-height: 55vh; }
.outreach-track-btn { cursor: pointer; user-select: none; font-size: 0.75rem; padding: 3px 10px; }
.outreach-track-btn--active { background: var(--brand-soft, #e8f0fe); border-color: var(--brand); color: var(--brand); }
#meeting-connect-bar.hidden { display: none; }
.outreach-attach-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.outreach-attach-list:empty { margin-top: 0; }
.outreach-attach-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); font-size: 0.72rem; color: var(--text); }
.outreach-attach-size { color: var(--text-muted); }
.outreach-attach-remove { cursor: pointer; color: var(--text-muted); font-weight: 700; padding: 0 2px; }
.outreach-attach-remove:hover { color: var(--danger,#d93025); }
.find-email-result { font-size: 0.8rem; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* File section */
.files-section { margin-top: 12px; }
.files-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.8rem; color: var(--brand); font-weight: 500; cursor: pointer; transition: background 0.15s; }
.files-upload-btn:hover { background: var(--brand-soft); }
.js-files-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.file-item-icon { font-size: 1.3rem; color: var(--brand); flex-shrink: 0; }
.file-item-info { flex: 1; min-width: 0; }
.file-item-name { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item-meta { display: block; font-size: 0.75rem; color: var(--text-muted); }
.file-item-notes { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin-top: 2px; }
.file-item-empty { font-size: 0.85rem; color: var(--text-muted); padding: 10px 0; }
.files-repository-list .file-item { padding: 10px 14px; }
.file-entity-badge { display: inline-block; font-size: 0.7rem; padding: 1px 7px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 500; margin-bottom: 2px; }
.file-repository-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.file-repository-filter input, .file-repository-filter select { font-size: 0.82rem; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.btn-xs { font-size: 0.72rem; padding: 2px 7px; line-height: 1.4; }
.badge-chip { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.02em; }
.badge-chip--gray { background: var(--gray-soft); color: var(--gray); }
.badge-chip--blue { background: var(--blue-soft); color: var(--blue); }
.files-repo-table td { vertical-align: middle; }
.file-icon-cell { text-align: center; }

.form-section-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); padding: 12px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.req { color: var(--accent); font-weight: 700; }
