/* Production Paradise Sales Hub — brand rules from replit.md */
:root {
  --navy: #0A1C2F;
  --navy-card: #102A44;
  --navy-border: #1B3550;
  --blue: #1B4366;
  --blue-mid: #2F5578;
  --sky: #AECCE7;
  --pale: #EEF4FA;
  --border: #D5E2EF;
  --white: #FFFFFF;
  --text: #0A1C2F;
  --muted: #4E5F70;
  --green: #2E6B3E;  --green-bg: #E5F2E8;
  --amber: #8A5600;  --amber-bg: #FBF1DC;
  --red: #B3261E;    --red-bg: #FBEAE8;
  --grey: #5C6B7A;   --grey-bg: #EEF1F4;
  --radius: 8px;
  --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--pale); }
a { color: var(--blue); }
a:hover { color: var(--blue-mid); }
h1 { font-size: 24px; font-weight: 600; margin: 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 200px; max-width: 232px; background: var(--navy); color: var(--white); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.brand-logo { width: 168px; height: auto; display: block; }
.brand-text { font-weight: 700; font-size: 15px; }
.brand-sub { color: var(--sky); font-size: 13px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--white); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--navy-card); color: var(--white); }
.nav a.active { background: var(--navy-card); box-shadow: inset 0 0 0 1px var(--navy-border); }
.me { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 8px 0; border-top: 1px solid var(--navy-border); }
.me-text { display: flex; flex-direction: column; line-height: 1.3; }
.me-name { font-weight: 600; font-size: 13px; }
.me-role { color: var(--sky); font-size: 12px; }
.link-on-navy { background: none; border: 0; padding: 8px 0; color: var(--sky); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.link-on-navy:hover { color: var(--white); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { margin: 2px 0 0; }
.tip { margin: 0; color: var(--muted); font-size: 13px; }

/* Cards, forms, buttons */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.form-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-row label { flex: 1 1 180px; }
input[type=text], input[type=email], input[type=password], select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--white);
  min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn { font: inherit; font-weight: 600; min-height: 42px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--blue); background: var(--white); color: var(--blue); cursor: pointer; }
.btn:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-quiet { border-color: var(--border); color: var(--muted); }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

.notice { margin: 0; padding: 10px 14px; border-radius: var(--radius); font-size: 14px; }
.notice-error { background: var(--red-bg); color: var(--red); }
.notice-ok { background: var(--green-bg); color: var(--green); }

.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--grey-bg); color: var(--grey); }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-grey { background: var(--grey-bg); color: var(--grey); }

.avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--pale); color: var(--blue); }
.avatar-on-navy { background: var(--navy-card); color: var(--white); box-shadow: inset 0 0 0 1px var(--navy-border); }

/* Tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.actions-wrap { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-off td { color: var(--muted); }
.person { display: inline-flex; align-items: center; gap: 10px; }

.link-card { border-color: var(--blue); }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 320px; }

/* Pipeline board */
.board-scroll { overflow-x: auto; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; min-height: 520px; }
.column { background: #E3ECF5; border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.column-head { display: flex; align-items: center; gap: 8px; }
.column-head h2 { margin: 0; font-size: 14px; }
.column-hint { margin: 0 0 4px 18px; font-size: 12px; color: var(--muted); }
.count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--white); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); }
.dot-assigned { background: #2F6DB5; }
.dot-contacted { background: var(--green); }
.dot-conversation { background: #A86A00; }
.dot-offer { background: #6B4FA0; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.lead-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.lead-name { font-weight: 600; }
.lead-meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.empty { margin: 0; padding: 16px 12px; border: 1.5px dashed #B8CADC; border-radius: var(--radius); text-align: center; font-size: 12px; color: var(--muted); }
.drop-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.zone { min-height: 60px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-weight: 600; border: 2px dashed; }
.zone-won { border-color: #8DBB98; background: var(--green-bg); color: var(--green); }
.zone-lost { border-color: #B6C0CA; background: var(--grey-bg); color: var(--grey); }

/* Sign-in pages */
body.auth { background: var(--navy); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px; color: var(--white); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.auth-card { width: min(440px, 100%); color: var(--text); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 22px; }
.auth-card p { margin: 0; }

/* ---- Layer 2: board cards, filters, panel, dialogs, messages ---- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.filters .search { flex: 1 1 260px; }
.filters .search input { width: 100%; }
input[type=search], textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--white); min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
textarea { resize: vertical; width: 100%; }
.filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; min-height: 44px; }
.check input { width: 18px; height: 18px; }

.lead-card { display: block; padding: 0; overflow: hidden; }
.lead-card[draggable="true"] { cursor: grab; }
.lead-card.dragging { opacity: .45; }
.lead-card-selected { box-shadow: 0 0 0 2px var(--blue); }
.lead-open { display: flex; flex-direction: column; gap: 4px; padding: 12px; color: inherit; text-decoration: none; }
.lead-open:hover .lead-name { color: var(--blue); }
.lead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lead-sub { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.strip { margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 600; background: var(--amber-bg); color: var(--amber); }
.column { transition: background .1s; }
.column.drop-over { background: #CFE0F0; outline: 2px dashed var(--blue); outline-offset: -2px; }
.column-won .dot, .dot-won { background: var(--green); }
.column-lost .dot, .dot-lost { background: var(--grey); }
.zone.drop-over { border-style: solid; filter: brightness(.95); }
body.is-dragging .zone { border-width: 3px; }

/* Lead panel */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--white); border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgba(10, 28, 47, .12); z-index: 20; overflow-y: auto; }
.panel-inner { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 32px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head p { margin: 2px 0 0; }
.panel-title { font-size: 20px; margin: 0; }
.panel-title:focus { outline: none; }
.icon-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius); background: var(--pale); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; }
.panel-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stage-select select { font-weight: 600; border-radius: 999px; min-height: 36px; padding: 4px 12px; }
.panel-owner { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 6px 4px; color: var(--blue); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-won { border-color: var(--green); color: var(--green); }
.btn-won-solid { background: var(--green); border-color: var(--green); color: var(--white); }
.btn-won-solid:hover { background: #245632; color: var(--white); }
.btn-block { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-right { align-self: flex-end; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab { min-height: 44px; padding: 0 14px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--navy); }
.panel-section-stack { display: flex; flex-direction: column; gap: 20px; }
.panel-section { display: flex; flex-direction: column; gap: 10px; }
.panel-section h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.details { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.details div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; word-break: break-word; }
.note { background: var(--pale); border-radius: var(--radius); padding: 10px 12px; }
.note p { margin: 0; }
.note-body { white-space: pre-line; }
.info { margin: 0; background: var(--pale); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline-item { display: flex; gap: 12px; }
.timeline-item > span:last-child { display: flex; flex-direction: column; }
.timeline-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--blue-mid); }
.timeline-won .timeline-dot { background: var(--green); }
.timeline-lost .timeline-dot { background: var(--red); }
.timeline-created .timeline-dot { background: var(--grey); }

/* Pop-ups */
.dialog { border: 0; border-radius: 14px; padding: 24px; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); color: var(--text); box-shadow: 0 24px 60px rgba(10, 28, 47, .3); }
.dialog::backdrop { background: rgba(10, 28, 47, .45); }
.dialog h2 { font-size: 19px; margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice-group { grid-column: 1 / -1; margin: 4px 0 0; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--navy); background: var(--pale); box-shadow: inset 0 0 0 1px var(--navy); }
.choice input { width: 18px; height: 18px; accent-color: var(--navy); }
.choice-label { flex: 1; }
.choice-tile { justify-content: center; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.span-2 { grid-column: 1 / -1; }
.notice-warn { background: var(--amber-bg); color: var(--amber); }
.notice ul { margin: 6px 0; padding-left: 20px; }

/* Messages */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 10px; background: var(--navy); color: var(--white); box-shadow: 0 10px 30px rgba(10, 28, 47, .3); }
.toast form { margin: 0; }
.toast-error { background: var(--red); }
.toast-undo { min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--navy-card); color: var(--sky); font: inherit; font-weight: 600; cursor: pointer; }
.toast-close { min-width: 36px; min-height: 36px; border: 0; background: none; color: var(--white); font-size: 20px; cursor: pointer; }

@media (max-width: 640px) {
  .content { padding: 20px 16px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Layer 3: follow-ups, log buttons, PP Admin fill ---- */
.follow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lead-open .follow { margin-top: 6px; padding-top: 8px; border-top: 1px solid #EEF2F6; }
.follow::before { content: ""; width: 12px; height: 12px; flex: 0 0 auto; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat; }
.follow-overdue { color: var(--red); font-weight: 600; }
.follow-today { color: var(--amber); font-weight: 600; }
.follow-future { color: #33465A; }
.follow-none { font-style: italic; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red-bg); color: var(--red); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.group-label { margin: 2px 0 -4px; }
.log-grid { display: grid; gap: 8px; }
.log-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.log-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.log-grid form { margin: 0; }
.btn-log { width: 100%; min-height: 44px; padding: 0 8px; font-size: 13px; font-weight: 600; border-color: var(--border); color: var(--text); }
.btn-log:hover { border-color: var(--blue); color: var(--blue); }
.btn-log-in { background: var(--green-bg); border-color: #B9D8C1; color: var(--green); }
.btn-log-in:hover { border-color: var(--green); color: var(--green); }
.follow-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.follow-box .follow { font-size: 14px; }
.choice-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-stack { align-items: flex-start; line-height: 1.35; }
.choice-stack input { margin-top: 2px; }
.admin-fill { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1.5px dashed #B8CADC; border-radius: var(--radius); background: var(--pale); }
.admin-fill > label { font-size: 13px; font-weight: 600; }
.admin-fill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-fill-row input { flex: 1 1 260px; }
.admin-status { margin: 0; }
.admin-status-ok { color: var(--green); }
.admin-status-error { color: var(--red); }
.fu-section h2 { display: flex; align-items: center; gap: 8px; }
.fu-overdue { border-color: #E8B4AF; }
.fu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fu-row { display: grid; grid-template-columns: minmax(160px, 2fr) auto minmax(80px, 1fr) minmax(160px, 1.5fr) auto; gap: 8px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fu-row:last-child { border-bottom: 0; }
.fu-name { text-decoration: none; color: var(--text); }
.fu-name:hover { color: var(--blue); }
.steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) { .fu-row { grid-template-columns: 1fr auto; } .log-grid-3 { grid-template-columns: 1fr 1fr; } }

/* ---- Layer 4: warnings ---- */
.pill-red { background: var(--red-bg); color: var(--red); }
.warn { font-size: 11px; padding: 1px 8px; }
.strip-red { background: var(--red-bg); color: var(--red); }
.warn-box { list-style: none; margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--red-bg); color: var(--red); display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.warn-box .pill { background: var(--white); margin-right: 6px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.settings-grid .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input[type=number] { font: inherit; font-size: 14px; color: var(--text); min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); max-width: 160px; }
.fu-row .pill { justify-self: start; }

/* ---- Layer 5: All leads list ---- */
.list-card { padding: 8px 16px; }
.lead-table th a { color: var(--muted); text-decoration: none; }
.lead-table th a:hover { color: var(--blue); }
.lead-table td { font-size: 13px; vertical-align: top; }
.lead-table .pill { white-space: nowrap; }
.row-link { color: var(--text); text-decoration: none; font-size: 14px; }
.row-link:hover { color: var(--blue); text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0; }
.pager .btn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---- Layer 6: HQ requests ---- */
.pill-hq { background: #EAE6F7; color: #4E3A8F; }
.pill-hq-done { background: var(--green-bg); color: var(--green); }
.nav-badge-hq { background: #EAE6F7; color: #4E3A8F; }
.hq-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: #F4F1FB; border: 1px solid #DCD3F2; }
.hq-box p { margin: 0; }
.hq-box-done { background: var(--green-bg); border-color: #B9D8C1; }
.hq-item { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.hq-item:last-child { border-bottom: 0; }
.hq-item p { margin: 0; }
.hq-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hq-reply { background: var(--green-bg); color: #1F4A2B; padding: 8px 10px; border-radius: var(--radius); }
.hq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hq-actions form { margin: 0; }
.hq-reply-form { display: flex; gap: 6px; flex: 1 1 360px; }
.hq-reply-form input { flex: 1; }

/* ---- CSV import ---- */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.import-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.import-steps li { padding: 6px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.import-steps li.current { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 600; }
.map-table select { min-width: 220px; }
.map-table td { vertical-align: top; }
.import-counts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.import-counts .pill { margin-right: 6px; }
input[type=file] { font: inherit; font-size: 14px; padding: 8px 0; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.form label.check { flex-direction: row; align-items: center; font-weight: 500; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Person colours (People & access). Always shown with initials and a name, never alone. */
.av-yellow { background: #F5CE3E; color: #0A1C2F; }
.av-blue { background: #2F6DB5; color: #FFFFFF; }
.av-green { background: #2E7D4F; color: #FFFFFF; }
.av-purple { background: #6B4FA0; color: #FFFFFF; }
.av-pink { background: #C23F7A; color: #FFFFFF; }
.av-teal { background: #1F7A80; color: #FFFFFF; }
.av-red { background: #B3261E; color: #FFFFFF; }
.av-brown { background: #8A5A2B; color: #FFFFFF; }
.av-grey { background: #5C6B7A; color: #FFFFFF; }
.av-light-blue { background: #9CC9F0; color: #0A1C2F; }
.av-mint { background: #A8DDB5; color: #0A1C2F; }
.av-lavender { background: #CDB8F0; color: #0A1C2F; }
.av-peach { background: #F6C3A8; color: #0A1C2F; }
.avatar[class*="av-"] { box-shadow: inset 0 0 0 1px rgba(10, 28, 47, 0.18); }
.dot-no_reply { background: #8A97A5; }
.dot-later { background: #1F7A80; }
/* Who has how many leads (board, managers) */
.team-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.team-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--text); text-decoration: none; font-size: 13px; }
.team-chip:hover { border-color: var(--blue-mid); color: var(--text); }
.team-chip-active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.team-chip .n { font-weight: 600; }
.colour-form select { min-height: 36px; padding: 4px 10px; }

/* Reports (Layer 7a). Bars use one brand blue (passes contrast); people are named next to their colour. */
.report-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-toggle { position: relative; }
.panel-toggle > summary { list-style: none; cursor: pointer; }
.panel-toggle > summary::-webkit-details-marker { display: none; }
.panel-toggle[open] > summary { box-shadow: inset 0 0 0 2px var(--navy); }
.toggle-body { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(640px, calc(100vw - 48px)); max-height: 75vh; overflow-y: auto; box-shadow: 0 16px 40px rgba(10, 28, 47, .2); }
.toggle-body hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.library-group { display: flex; flex-direction: column; gap: 8px; }
.library-group legend { font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.form label.library-item { align-items: flex-start; gap: 10px; }
.form label.library-item input { margin-top: 4px; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 999px; background: var(--grey-bg); color: var(--grey); }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio-row legend { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form label.radio { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.delete-board { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.starter-list { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.report-start { display: flex; flex-direction: column; }

.report-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; align-items: start; }
.panel-toggle > summary, .report-menu > summary { display: inline-flex; align-items: center; justify-content: center; }
.report-kpi { grid-column: span 2; }
.report-half { grid-column: span 3; }
.report-wide { grid-column: span 6; }
@media (max-width: 1100px) { .report-kpi { grid-column: span 3; } .report-half { grid-column: span 6; } }
@media (max-width: 700px) { .report-kpi { grid-column: span 6; } }
.report-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.report-head h2 { margin: 0; }
.report-head p { margin: 2px 0 0; }
.report-menu { position: relative; }
.report-menu > summary { list-style: none; cursor: pointer; }
.report-menu > summary::-webkit-details-marker { display: none; }
.report-menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; width: min(460px, calc(100vw - 48px)); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: 0 16px 40px rgba(10, 28, 47, .2); }
.report-menu-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.report-none { margin: 8px 0; padding: 18px; text-align: center; color: var(--muted); background: var(--pale); border-radius: var(--radius); }
.report-note { margin: 0; }
.report-empty p { margin: 0; }

.kpi-value { margin: 4px 0 0; font-size: 36px; line-height: 1.1; font-weight: 600; }
.kpi-label { margin: 0; color: var(--muted); }
.kpi-compare { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--muted); }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; align-items: center; gap: 10px; }
.bar-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.bar-track { display: block; }
.bar-fill { fill: #2F6DB5; }
.bar-value { font-size: 13px; font-weight: 600; white-space: nowrap; text-align: right; min-width: 2ch; }
.avatar-xs { width: 22px; height: 22px; font-size: 10px; flex: none; }

.columns-scroll { overflow-x: auto; }
.columns { width: 100%; height: auto; display: block; min-width: 420px; }
.columns .axis { stroke: var(--border); stroke-width: 1; }
.columns .col-hit { fill: transparent; }
.columns g:hover .col-hit { fill: var(--pale); }
.columns .col-value { font-size: 12px; font-weight: 600; fill: var(--text); font-family: var(--font); }
.columns .col-label { font-size: 11px; fill: var(--muted); font-family: var(--font); }

.report-table th[scope="row"] { font-weight: 500; text-align: left; }
.report-table .num { text-align: right; white-space: nowrap; }
.report-table td, .report-table th { padding: 8px 10px; }
.report-table tfoot th, .report-table tfoot td { border-bottom: 0; }

/* To assign */
.assign-form { display: flex; flex-direction: column; gap: 12px; }
.assign-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.assign-bar .check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.assign-table td, .assign-table th { vertical-align: top; }
.assign-table th[scope="row"] { font-weight: 500; }

/* Settings › Lead sources */
.source-channel { display: flex; flex-direction: column; gap: 12px; }
.source-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.source-head h2 { margin: 0; }
.source-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.source-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.source-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.source-name { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 500; }
.rename-form input { min-height: 36px; width: 170px; }
.add-source input { min-height: 36px; width: min(320px, 100%); }
.source-channel.is-off h2, .source-list li.is-off .source-name { color: var(--muted); }
.add-source .btn { white-space: nowrap; }

/* Lead intelligence on To assign */
.intel-details { margin-top: 4px; font-weight: 400; }
.intel-details summary { cursor: pointer; color: var(--blue); }
.intel-details ul { margin: 6px 0; padding-left: 18px; }
.decline-target { display: none; }
.decline-target:target { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; background: rgba(10, 28, 47, .45); padding: 16px; }
.decline-form { width: min(480px, 100%); box-shadow: 0 24px 60px rgba(10, 28, 47, .3); }
.assign-table .btn, .assign-table td:has(> .pill) { white-space: nowrap; }
.card form + h2 { margin-top: 24px; }

/* Delete lead (25 Nov 2026): quiet link at the bottom of the lead panel. */
.panel-delete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.link-danger { color: var(--red); }
.head-actions .link-btn { align-self: center; }
