/*
  Automated Sales — shared portal styles.
  Best-effort match to automated-sales.com from screenshots (no access to
  the live site's actual CSS/hex values from this environment): light
  mint-to-white hero gradient, near-black navy headlines, medium-green
  accent for primary actions, pill-shaped buttons/badges, generous
  whitespace. Swap the CSS variables below if you have exact brand hex
  codes or a logo file.
*/
:root {
  --as-green: #1c8a5a;
  --as-green-dark: #146b45;
  --as-green-bg: #e3f5ea;
  --as-green-text: #1f7a52;
  --as-ink: #0b1220;
  --as-body: #5b6472;
  --as-border: #e3e6ea;
  --as-bg-top: #eaf7f0;
  --as-bg-bottom: #ffffff;
  --as-radius-pill: 999px;
  --as-radius-card: 16px;
  --as-shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--as-ink);
  background: linear-gradient(180deg, var(--as-bg-top) 0%, var(--as-bg-bottom) 420px);
  min-height: 100vh;
}

a {
  color: inherit;
}

.as-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.as-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.as-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  color: var(--as-ink);
}

.as-logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
  object-fit: contain;
  display: block;
}

.as-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.as-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--as-radius-pill);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.05s ease, opacity 0.15s ease;
}

.as-btn:active {
  transform: scale(0.98);
}

.as-btn-primary {
  background: var(--as-ink);
  color: #fff;
}

.as-btn-primary:hover {
  opacity: 0.88;
}

.as-btn-green {
  background: var(--as-green);
  color: #fff;
}

.as-btn-green:hover {
  background: var(--as-green-dark);
}

.as-btn-outline {
  background: #fff;
  color: var(--as-ink);
  border-color: var(--as-border);
}

.as-btn-outline:hover {
  border-color: #c7cbd1;
}

.as-btn-text {
  background: transparent;
  color: var(--as-ink);
  font-weight: 600;
  padding: 12px 8px;
}

.as-btn-block {
  width: 100%;
}

.as-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Badge / pill */
.as-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--as-radius-pill);
  background: var(--as-green-bg);
  color: var(--as-green-text);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(28, 138, 90, 0.18);
}

.as-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--as-green);
}

/* Hero */
.as-hero {
  padding: 56px 24px 40px;
  max-width: 1080px;
  margin: 0 auto;
}

.as-hero h1 {
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 20px 0 18px;
  max-width: 760px;
}

.as-hero p.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--as-body);
  max-width: 620px;
  margin: 0 0 30px;
}

.as-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.as-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
  max-width: 720px;
}

.as-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--as-ink);
}

.as-check svg {
  flex: none;
  margin-top: 2px;
}

/* Cards / sections */
.as-section {
  padding: 48px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.as-section h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.as-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.as-section-sub {
  color: var(--as-body);
  font-size: 15px;
  line-height: 1.55;
  max-width: 640px;
  margin: -4px 0 28px;
}

.as-screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.as-screenshot {
  margin: 0 auto;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-card);
  box-shadow: var(--as-shadow);
  padding: 12px;
}

.as-screenshot-wide {
  grid-column: 1 / -1;
  max-width: 820px;
}

.as-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--as-border);
}

.as-screenshot figcaption {
  margin-top: 12px;
  padding: 0 4px;
  color: var(--as-body);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}

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

.as-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--as-green-bg);
  color: var(--as-green-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.as-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.as-card p {
  color: var(--as-body);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}

.as-footer {
  padding: 32px 24px 48px;
  max-width: 1080px;
  margin: 0 auto;
  color: var(--as-body);
  font-size: 13.5px;
  border-top: 1px solid var(--as-border);
}

/* Auth forms (signup / login) */
.as-auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 76px);
  padding: 24px;
}

.as-auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-card);
  box-shadow: var(--as-shadow);
  padding: 36px;
}

.as-auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
}

.as-auth-card > p.sub {
  color: var(--as-body);
  font-size: 14.5px;
  margin: 0 0 24px;
}

.as-field {
  margin-bottom: 16px;
}

.as-field label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.as-field .hint {
  font-size: 12.5px;
  color: var(--as-body);
  margin-top: 5px;
}

.as-field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--as-border);
  font-size: 14.5px;
  font-family: inherit;
  background: #fbfbfc;
}

.as-field input:focus {
  outline: 2px solid var(--as-green);
  outline-offset: 1px;
  background: #fff;
}

.as-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdecec;
  color: #9a2e2e;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

.as-alert.show {
  display: block;
}

.as-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--as-body);
}

.as-switch a {
  color: var(--as-green-text);
  font-weight: 700;
  text-decoration: none;
}

/* Dashboard */
.as-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--as-border);
  background: #fff;
}

.as-dash-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.as-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.as-stat-card {
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-card);
  padding: 20px 22px;
}

.as-stat-card .num {
  font-size: 30px;
  font-weight: 800;
}

.as-stat-card .label {
  color: var(--as-body);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 4px;
}

.as-stat-card-clickable {
  cursor: pointer;
}

.as-stat-card-clickable:hover {
  border-color: var(--as-green);
}

.as-stat-subtext {
  color: var(--as-body);
  font-size: 12px;
  margin-top: 6px;
}

/* Diagnostic/technical counts — deliberately smaller and less
   prominent than the commercial metrics above, since a client opening
   this dashboard cares about Won Revenue and Attribution Coverage
   first, "touchpoints captured" second (if at all). Same 3-column
   grid, just visually demoted. */
.as-stat-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.as-stat-card-secondary {
  background: #fafbfc;
  border: 1px solid var(--as-border);
  border-radius: 12px;
  padding: 12px 16px;
}

.as-stat-card-secondary .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--as-body);
}

.as-stat-card-secondary .label {
  color: var(--as-body);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.as-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.as-panel-title {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 16px;
}

.as-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
}

.as-panel-head .as-panel-title {
  margin: 0;
}

.as-export-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--as-ink);
  text-decoration: none;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-pill);
  padding: 6px 14px;
}

.as-export-link:hover {
  border-color: #c7cbd1;
  background: #fafafa;
}

/* .as-export-link doubles as a <button> for the Columns toggle (as well
   as its original <a> use for CSV download links) — buttons don't
   inherit background/cursor/font the way an <a> naturally does, so
   normalize those explicitly. */
button.as-export-link {
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

/* Show/hide + reorder panel for the Recently active prospects table,
   toggled open by the Columns button. */
.as-columns-panel {
  border: 1px solid var(--as-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fafbfc;
}

.as-columns-hint {
  font-size: 12.5px;
  color: var(--as-body);
  margin: 0 0 12px;
}

.as-columns-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.as-columns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.as-columns-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--as-ink);
  cursor: pointer;
}

.as-columns-check:has(input:disabled) {
  cursor: default;
  color: var(--as-body);
}

.as-columns-move {
  display: flex;
  gap: 4px;
  flex: none;
}

.as-columns-move-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--as-border);
  background: #fff;
  color: var(--as-body);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.as-columns-move-btn:hover:not(:disabled) {
  border-color: #c7cbd1;
  color: var(--as-ink);
}

.as-columns-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.as-columns-reset {
  margin-top: 10px;
  padding: 4px 0;
  font-size: 12.5px;
  text-decoration: underline;
  text-decoration-color: var(--as-border);
}

.as-select {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--as-ink);
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: 10px;
  padding: 10px 14px;
}

.as-utm-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.as-utm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--as-body);
}

.as-utm-filter-field select {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 10px;
}

.as-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--as-body);
}

.as-pagination-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--as-ink);
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-pill);
  padding: 7px 16px;
  cursor: pointer;
}

.as-pagination-btn:disabled {
  color: #b7bdc6;
  cursor: default;
}

.as-pagination-btn:not(:disabled):hover {
  border-color: var(--as-green);
  color: var(--as-green-text);
}

.as-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.as-bar-label {
  width: 130px;
  flex: none;
  color: var(--as-ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-bar-track {
  flex: 1;
  background: #f1f3f5;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.as-bar-fill {
  height: 100%;
  background: var(--as-green);
  border-radius: 6px;
}

.as-bar-count {
  width: 28px;
  flex: none;
  text-align: right;
  font-weight: 700;
  color: var(--as-body);
}

/* Conversion funnel — a horizontal row of stages, each bar's width
   scaled relative to the first (largest) stage so the narrowing reads
   at a glance, same "width % of a max value" approach as .as-bar-fill
   above but arranged as a funnel rather than a ranked list. */
.as-funnel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.as-funnel-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}

.as-funnel-label {
  font-weight: 600;
  color: var(--as-ink);
}

.as-funnel-track {
  background: #f1f3f5;
  border-radius: 8px;
  height: 28px;
  overflow: hidden;
}

.as-funnel-fill {
  height: 100%;
  background: var(--as-green);
  border-radius: 8px;
  transition: width 0.2s ease;
}

.as-funnel-count {
  text-align: right;
  font-weight: 700;
  color: var(--as-body);
  white-space: nowrap;
}

.as-funnel-pct {
  font-weight: 400;
  color: var(--as-body);
  font-size: 12px;
}

/* Daily touchpoint volume — plain CSS bars (height %, not width %, since
   this reads left-to-right as a timeline) rather than an SVG/canvas
   chart library; consistent with .as-bar-fill above, this project has no
   charting dependency and every other chart-like element here is
   hand-rolled the same way. */
.as-daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  margin-bottom: 8px;
}

.as-daily-bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.as-daily-bar {
  width: 100%;
  background: var(--as-green);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}

.as-daily-labels {
  display: flex;
  gap: 3px;
  font-size: 10.5px;
  color: var(--as-body);
}

.as-daily-labels span {
  flex: 1;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.as-conversion-table td.as-rate-cell {
  font-weight: 700;
}

.as-conversion-table td.as-rate-cell.as-rate-good {
  color: var(--as-green-text);
}

/* Volume/Rate sort toggle above conversion-by-source and
   campaign-performance tables (dashboard.html's renderConversionTable). */
.as-sort-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
}

.as-sort-toggle-label {
  color: var(--as-body);
  font-weight: 600;
}

.as-sort-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--as-body);
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-pill);
  padding: 5px 14px;
  cursor: pointer;
}

.as-sort-btn-active {
  color: #fff;
  background: var(--as-green);
  border-color: var(--as-green);
}

/* Top-level page navigation (dashboard.html's data-section groups) —
   Reports / Setup & Segmentation / Ad Platform Exports. Deliberately
   NOT a sidebar — a horizontal pill bar keeps this simple and works
   identically on mobile without a separate collapse/hamburger state to
   build and maintain. */
.as-section-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.as-section-nav-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--as-body);
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius-pill);
  padding: 10px 20px;
  cursor: pointer;
}

.as-section-nav-btn:hover {
  border-color: var(--as-green);
  color: var(--as-green-text);
}

.as-section-nav-btn.active {
  color: #fff;
  background: var(--as-ink);
  border-color: var(--as-ink);
}

/* Conversion funnel's Value mode — two plain stat cards, not the
   proportional-bar layout Count mode uses (see renderFunnelValueMode's
   doc comment for why). */
.as-funnel-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.as-funnel-value-card {
  background: #f8faf9;
  border: 1px solid var(--as-border);
  border-radius: 12px;
  padding: 18px 20px;
}

.as-funnel-value-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--as-body);
  margin-bottom: 6px;
}

.as-funnel-value-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--as-ink);
}

/* Drill-down affordance — funnel rows and conversion-table rows that,
   when clicked, filter the Recently active prospects table below (see
   dashboard.html's applyProspectFilter). */
.as-clickable-row {
  cursor: pointer;
}

.as-funnel-row.as-clickable-row:hover .as-funnel-label {
  text-decoration: underline;
}

tr.as-clickable-row:hover {
  background: #f8faf9;
}

.as-bar-row.as-clickable-row:hover .as-bar-label {
  text-decoration: underline;
}

/* Notable-change callouts (dashboard.html's renderNotableChanges) —
   auto-surfaced week-over-week volume swings by source, styled as
   alert banners rather than a plain card, since the point is to be
   noticed immediately, not blend in with everything else. */
.as-notable-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.as-notable-change + .as-notable-change {
  margin-top: 8px;
}

.as-notable-arrow {
  font-size: 11px;
}

.as-notable-decrease {
  background: #fdecea;
  border-color: #f5c6c0;
  color: #a13d2f;
}

.as-notable-increase {
  background: var(--as-green-bg);
  border-color: #b9e3c9;
  color: var(--as-green-text);
}

/* Click-through drill-down popup (dashboard.html's openProspectModal). */
.as-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.as-modal {
  background: #fff;
  border-radius: var(--as-radius-card);
  box-shadow: var(--as-shadow);
  width: 100%;
  max-width: 1080px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.as-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--as-border);
  flex: none;
}

.as-modal-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.as-modal-count {
  font-size: 13px;
  color: var(--as-body);
  margin: 0;
}

.as-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--as-body);
  cursor: pointer;
  padding: 0 4px;
}

.as-modal-close:hover {
  color: var(--as-ink);
}

.as-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Lets a wide table (e.g. Recently active prospects, with its own
   Source/Medium/Campaign/Term/Content columns) scroll horizontally
   instead of squeezing every column unreadably narrow on smaller
   screens. */
.as-table-scroll {
  overflow-x: auto;
}

table.as-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.as-table th {
  text-align: left;
  color: var(--as-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--as-border);
  white-space: nowrap;
}

table.as-table-layout-fixed td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-select-cell {
  width: 38px;
  padding: 10px 0 10px 10px !important;
}

.as-select-cell input,
th .as-select-all {
  cursor: pointer;
  width: 15px;
  height: 15px;
}

/* The "N selected / Hide selected / Clear selection" bar (dashboard.html's
   wireBulkSelect) — sits above the table itself, hidden until at least
   one row is checked. */
.as-bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fdf6e8;
  border: 1px solid #f0dfae;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13.5px;
}

.as-bulk-actions-count {
  font-weight: 700;
  color: var(--as-ink);
  margin-right: auto;
}

table.as-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f3f5;
  white-space: nowrap;
}

/* Targets the Contact column specifically, via a class the render loop
   adds directly — NOT :first-child, which broke the moment the
   multi-select checkbox column was added as the new literal first
   child, and would break again if Contact is ever reordered away from
   its usual position (it's alwaysVisible, not pinned-first). */
table.as-table td.as-contact-td {
  white-space: normal;
}

/* Resizable columns (dashboard.html's wireColumnResize) — scoped to
   .as-table-resizable specifically (only the Recently active prospects
   table), not the base .as-table class shared by every other table on
   this dashboard, so this doesn't affect their unrelated layouts. */
table.as-table-resizable th {
  position: relative;
}

/* Added by lockColumnWidths right after every render, once every
   column already has an explicit <col> width measured from its natural
   size — see that function's own doc comment for why this can't just
   be a static class on .as-table-resizable from the start (every
   column would be forced into an equal share before any width was
   ever measured). */
table.as-table-layout-fixed {
  table-layout: fixed;
}

.as-th-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.as-col-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 1;
}

/* A visible, persistent divider line, not just a hover-only invisible
   strip — the previous version was genuinely undiscoverable, since
   there was nothing to see or find until you already knew to hover a
   specific 10px gap between column headers. */
.as-col-resize-handle::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 50%;
  width: 1px;
  background: var(--as-border);
}

.as-col-resize-handle:hover,
body.as-col-resizing .as-col-resize-handle {
  background: rgba(28, 138, 90, 0.25);
}

.as-col-resize-handle:hover::after,
body.as-col-resizing .as-col-resize-handle::after {
  background: var(--as-green);
  width: 2px;
}

/* Applied to <body> for the duration of a drag, so the resize cursor
   stays consistent even when the mouse briefly moves off the thin
   handle itself mid-drag, and so text elsewhere on the page doesn't
   get accidentally selected while dragging. */
body.as-col-resizing {
  cursor: col-resize;
  user-select: none;
}

.as-empty {
  color: var(--as-body);
  font-size: 14px;
  padding: 20px 0;
}

/* Recently active prospects — clickable rows + expanded timeline */
tr.as-row-clickable {
  cursor: pointer;
}

tr.as-row-clickable:hover td {
  background: #f7f8f9;
}

/* Keeps the expand chevron glued to the email/name on one line — without
   this, the cell's own `white-space: normal` (needed so a long email
   doesn't blow out the table width) lets the browser break the line
   between the chevron and the text once the column gets squeezed by all
   the newer Source/Medium/Campaign/etc columns, leaving the chevron
   stranded on its own line above the contact. The table already scrolls
   horizontally (.as-table-scroll), so nowrap here just means a long
   email scrolls instead of wrapping awkwardly. */
.as-contact-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

tr.as-row-clickable .as-row-chevron {
  display: inline-block;
  color: var(--as-body);
  transition: transform 0.15s ease;
  font-size: 11px;
  flex: none;
}

tr.as-row-clickable.expanded .as-row-chevron {
  transform: rotate(90deg);
}

tr.as-detail-row td {
  padding: 0;
  border-bottom: 1px solid #f1f3f5;
}

/* The "technical attribution data" grid shown above the touchpoint
   timeline on row-expand (dashboard.html's renderAttributionDetail) —
   raw UTMs, click IDs, referrer, etc, moved out of the main table's
   default columns since this session's table redesign. */
.as-attribution-detail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 24px;
  padding: 18px 10px 8px 30px;
  background: #fafbfc;
  border-bottom: 1px solid #eef0f2;
}

.as-attribution-detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--as-body);
  margin-bottom: 3px;
}

.as-attribution-detail-value {
  font-size: 13.5px;
  color: var(--as-ink);
  word-break: break-word;
}

.as-timeline-wrap {
  padding: 18px 10px 22px 30px;
  background: #fafbfc;
}

.as-timeline-loading,
.as-timeline-empty {
  color: var(--as-body);
  font-size: 13.5px;
}

.as-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.as-timeline-row {
  display: flex;
  gap: 12px;
}

.as-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 12px;
}

.as-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  margin-top: 4px;
}

.as-timeline-line {
  flex: 1;
  width: 2px;
  background: var(--as-border);
  margin-top: 2px;
}

.as-timeline-body {
  padding-bottom: 18px;
  flex: 1;
  min-width: 0;
}

.as-timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.as-timeline-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--as-radius-pill);
  border: 1px solid currentColor;
}

.as-timeline-date {
  font-size: 12px;
  color: var(--as-body);
}

.as-timeline-flag {
  font-size: 11px;
  font-weight: 700;
  color: var(--as-green-text);
  background: var(--as-green-bg);
  padding: 2px 8px;
  border-radius: var(--as-radius-pill);
}

.as-timeline-flag-last {
  color: #7a5c12;
  background: #fdf6e8;
}

.as-timeline-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--as-ink);
  word-break: break-word;
}

.as-timeline-source {
  font-size: 12.5px;
  color: var(--as-body);
  margin-top: 2px;
}

.as-timeline-desc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--as-border);
  text-underline-offset: 2px;
}

.as-timeline-desc a:hover {
  text-decoration-color: currentColor;
}

.as-timeline-referrer {
  font-size: 12px;
  color: var(--as-body);
  margin-top: 2px;
  word-break: break-word;
}

.as-timeline-referrer a {
  color: var(--as-green-text);
  text-decoration: none;
}

.as-timeline-referrer a:hover {
  text-decoration: underline;
}

/* Grouped run of website-visit touchpoints — collapsed by default */
.as-timeline-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.as-timeline-group-chevron {
  display: inline-block;
  color: var(--as-body);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.as-timeline-group.expanded .as-timeline-group-chevron {
  transform: rotate(90deg);
}

.as-timeline-subgroup {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 0 0 4px;
  border-top: 1px solid var(--as-border);
  display: none;
}

.as-timeline-group.expanded .as-timeline-subgroup {
  display: block;
}

.as-timeline-subrow {
  display: flex;
  gap: 10px;
  padding: 6px 0;
}

.as-timeline-subdot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--as-border);
  margin-top: 7px;
}

.as-timeline-subbody {
  flex: 1;
  min-width: 0;
}

.as-timeline-subbody .as-timeline-desc {
  font-size: 13px;
  font-weight: 600;
}

.as-timeline-subbody .as-timeline-date {
  font-size: 11.5px;
}

/* "Recently active prospects" — Pipedrive deep-link column */
a.as-pd-link {
  color: var(--as-green-text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

a.as-pd-link:hover {
  text-decoration: underline;
}

.as-pd-none {
  color: var(--as-border);
}

a.as-referrer-link {
  color: var(--as-body);
  text-decoration: underline;
  text-decoration-color: var(--as-border);
  text-underline-offset: 2px;
}

a.as-referrer-link:hover {
  color: var(--as-ink);
  text-decoration-color: currentColor;
}

/* "google · test-google-aug · test-ad-a" under a First touch channel
   label — source/campaign/ad-content detail, truncated with an ellipsis
   since campaign names can run long; the full string is in the title
   tooltip. */
.as-subtext {
  color: var(--as-body);
  font-size: 12px;
  margin-top: 2px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Install tracking (dashboard) */
.as-install-card {
  margin-bottom: 28px;
}

.as-install-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.as-install-head h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.as-install-head p {
  color: var(--as-body);
  font-size: 13.5px;
  margin: 0;
}

.as-install-toggle {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--as-green-text);
  white-space: nowrap;
}

.as-install-body {
  margin-top: 20px;
  border-top: 1px solid var(--as-border);
  padding-top: 20px;
}

.as-install-card.collapsed .as-install-body {
  display: none;
}

.as-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.as-tab-btn {
  padding: 8px 16px;
  border-radius: var(--as-radius-pill);
  border: 1px solid var(--as-border);
  background: #fff;
  color: var(--as-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.as-tab-btn.active {
  background: var(--as-ink);
  color: #fff;
  border-color: var(--as-ink);
}

.as-tab-panel {
  display: none;
}

.as-tab-panel.active {
  display: block;
}

.as-tab-panel ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--as-ink);
  font-size: 14px;
  line-height: 1.7;
}

.as-tab-panel ol li {
  margin-bottom: 4px;
}

.as-code-block {
  position: relative;
  background: #0b1220;
  color: #e3e8ef;
  border-radius: 10px;
  padding: 16px 44px 16px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 14px;
}

.as-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.as-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.as-kv {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.as-kv .k {
  flex: none;
  width: 90px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--as-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.as-kv .v {
  flex: 1;
  background: #f7f8f9;
  border: 1px solid var(--as-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

@media (max-width: 720px) {
  .as-hero h1 {
    font-size: 36px;
  }
  .as-checks,
  .as-steps,
  .as-panels,
  .as-stat-grid,
  .as-stat-grid-secondary,
  .as-screenshots-grid {
    grid-template-columns: 1fr;
  }
}
