/* Shared visual system. Breakpoints: responsive.css; sign-in: auth.css. */
:root {
  --ink: #172b4d; --muted: #52627a; --paper: #f3f6fc; --surface: #fff;
  --line: #dce4f0; --control-border: #7a8ca7;
  --primary: #1d4ed8; --primary-hover: #1e40af; --primary-soft: #eaf1ff;
  --navy: #102643; --nav-muted: #b7c8e1;
  --warning: #895113; --warning-soft: #fff6e6;
  --danger: #b42338; --danger-soft: #fff0f2;
  --success: #17614a; --success-soft: #eaf8f1;
  --touch-size: 44px; --radius: 12px; --control-radius: 8px; --sidebar-width: 240px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.6 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--primary); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; max-width: 100%; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch-size); padding: 10px 16px; border: 1px solid var(--primary);
  border-radius: var(--control-radius); background: var(--primary); color: white;
  font-size: 14px; font-weight: 650; line-height: 1.4; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
button:hover, .button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: white; text-decoration: none; }
button:disabled { background: #e1e7f0; border-color: #acb9cc; color: #52627a; cursor: not-allowed; }
.secondary { color: var(--primary); background: white; }
.secondary:hover { color: var(--primary-hover); background: var(--primary-soft); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
:where(input, select, textarea):focus-visible { border-color: var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: white; border: 2px solid var(--primary); border-radius: 8px; font-weight: 650; }
.skip-link:focus { top: 12px; }
main, .detail-grid > *, .topbar > *, .filters > *, .page-heading > * { min-width: 0; }
img { max-width: 100%; height: auto; }
p { margin: 0 0 16px; }
h1, h2, h3 { line-height: 1.3; font-weight: 650; }
h1 { margin: 8px 0 12px; font-size: clamp(28px, 2.6vw, 34px); letter-spacing: -.025em; }
h1 span { color: var(--primary); }
h2 { margin: 0 0 16px; font-size: 20px; }
h3 { margin: 24px 0 12px; font-size: 16px; }
small, .fineprint { font-size: 12px; line-height: 1.65; color: var(--muted); }
.fineprint { margin: 12px 0 20px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }

/* Navigation and shell. */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width);
  display: flex; flex-direction: column; padding: 32px 20px 24px;
  background: var(--navy); color: var(--nav-muted); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; color: white; line-height: 1.25; letter-spacing: .07em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; color: #93c5fd; }
.brand-name { font-size: 16px; font-weight: 650; }
.brand-name b { font-size: 12px; font-weight: 500; letter-spacing: .17em; }
.nav-caption { margin: 48px 12px 16px; font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--nav-muted); }
.primary-nav { display: grid; gap: 8px; }
.primary-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; border-radius: var(--control-radius); color: var(--nav-muted); font-size: 14px; font-weight: 550; }
.primary-nav a:hover { color: white; background: #1b365b; text-decoration: none; }
.primary-nav a.selected { color: white; background: #234c87; box-shadow: inset 3px 0 #93c5fd; }
.nav-icon { width: 20px; height: 20px; flex: none; }
.sidebar :focus-visible { outline-color: #93c5fd; }
.sidebar-footer { margin-top: auto; padding: 32px 12px 0; font-size: 12px; color: white; }
.sidebar-footer div { margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--nav-muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #93c5fd; margin-right: 7px; }
.sidebar-account { width: 100%; margin-top: 24px; padding: 20px 12px 0; border-top: 1px solid #3e587b; flex-shrink: 0; }
.logout-form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; }
.logout-form span { max-width: 100%; color: var(--nav-muted); font-size: 12px; overflow-wrap: anywhere; }
.sidebar-account button { min-height: 44px; padding: 8px 16px; background: transparent; border-color: #93c5fd; color: white; }
.sidebar-account button:hover { background: #234c87; }
.menu-toggle, .mobile-open-label { display: none; }
main { max-width: 1640px; margin-left: var(--sidebar-width); padding: 0 32px; }
.topbar { display: flex; align-items: center; min-height: 60px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.topbar i { margin: 0 12px; color: var(--muted); font-style: normal; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0 24px; }
.page-heading p { margin: 0; color: var(--muted); }
.collection-actions { flex: none; }
.page-heading .action-hint { max-width: 240px; margin: 8px 0 0; font-size: 12px; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; font-size: 14px; font-weight: 600; }
footer { margin-top: 32px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Compact collection summary. */
.collection-countdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 24px 0 0; padding: 20px 24px; border: 1px solid #b6c9ee; border-radius: var(--radius); background: var(--primary-soft); }
.countdown-copy { flex: 1; min-width: 220px; }
.countdown-copy p { margin: 6px 0 4px; font-size: 14px; }
.countdown-copy small { font-size: 12px; }
.countdown-digits { display: flex; align-items: flex-start; gap: 8px; color: var(--primary); flex-shrink: 0; }
.countdown-digits > div { min-width: 52px; text-align: center; }
.countdown-digits strong { display: block; font-size: 30px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown-digits span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.countdown-digits > b { font-size: 24px; line-height: 1.2; font-weight: 400; }
.collection-details { flex-basis: 100%; width: 100%; border-top: 1px solid #c8d8f4; }
.collection-details > summary { min-height: 44px; padding: 10px 0 0; font-size: 12px; color: var(--primary); font-weight: 600; }
.countdown-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.collection-countdown noscript { font-size: 12px; }

/* Summary, notices and lists. */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 24px 0; margin-bottom: 24px; border-block: 1px solid var(--line); }
.metrics > div { padding: 0 20px; border-left: 1px solid var(--line); }
.metrics > div:first-child { padding-left: 0; border-left: 0; }
.metrics span { display: block; font-size: 11px; font-weight: 650; letter-spacing: .02em; color: var(--muted); }
.metrics strong { display: block; margin: 8px 0 4px; color: var(--ink); font-size: 34px; line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; }
.metrics small { display: block; }
.notice { margin: 16px 0 24px; padding: 16px 20px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; background: var(--primary-soft); color: #24436f; font-size: 13px; overflow-wrap: anywhere; }
.notice p { margin: 8px 0; }
.notice a { font-weight: 650; }
.notice.success { border-left-color: var(--success); background: var(--success-soft); color: var(--success); }
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.coverage-detail { margin: 20px 0; }
.search-guide { margin: 0 0 20px; padding: 0 20px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.search-guide > summary { min-height: 48px; padding: 12px 0; color: var(--primary); font-size: 13px; font-weight: 650; }
.search-guide h3 { margin-top: 20px; }
.search-guide .notice { margin-bottom: 20px; }
summary { cursor: pointer; }
.coverage-detail > summary { min-height: 44px; padding: 10px 0; font-size: 14px; color: var(--primary); font-weight: 600; }
.coverage-detail ul { margin: 8px 0 16px; padding-left: 24px; line-height: 1.8; }
.opportunity-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 28px 0 24px; border-bottom: 1px solid #bccbe0; }
.opportunity-tabs a { display: block; margin: 0; padding: 12px 16px; min-height: 48px; color: var(--muted); border-bottom: 3px solid transparent; font-size: 14px; }
.opportunity-tabs a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.opportunity-tabs a.active { color: var(--primary); background: var(--primary-soft); border-bottom-color: var(--primary); font-weight: 650; border-radius: 8px 8px 0 0; }
.opportunity-tabs a span { margin-left: 6px; font-size: 12px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading > span { font-size: 12px; color: var(--muted); }
.empty { padding: 48px 24px; background: white; border: 1px dashed var(--control-border); border-radius: var(--radius); text-align: center; }
.empty-icon { color: var(--primary); font-size: 36px; }
.empty h2 { margin: 8px 0 12px; }
.empty p { max-width: 65ch; margin: 0 auto; color: var(--muted); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 13px; }
.pagination > div { display: flex; gap: 20px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Native forms. */
label { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .02em; }
input, select, textarea { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--control-border); border-radius: var(--control-radius); background: white; color: var(--ink); font-size: 14px; letter-spacing: 0; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 20px; padding: 0; accent-color: var(--primary); flex: none; }
input[type=file] { white-space: normal; padding: 8px; }
input[type=file]::file-selector-button { border: 0; border-radius: 4px; padding: 6px 10px; margin-right: 10px; background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 600; }
textarea { resize: vertical; }
.filter-panel { margin-bottom: 20px; }
.filter-panel > summary { min-height: 48px; padding: 12px 16px; color: var(--primary); font-size: 14px; font-weight: 650; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.filter-panel[open] > summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 16px 12px; margin-bottom: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.filter-panel .filters { margin-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.filters > label { flex: 1 1 155px; min-width: 0; }
.filters .search { flex: 2 1 260px; }
.filter-actions { display: flex; align-items: end; gap: 16px; }
.filter-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
.followup label { margin-bottom: 20px; }
.followup form > button { width: 100%; }

/* Data register. Responsive tables become cards, other tables keep scrolling. */
.table-wrap { position: relative; max-width: 100%; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 14px 12px; background: #eef3fc; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
td { padding: 20px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
th:first-child, td:first-child { padding-left: 20px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f6f9ff; }
.opportunity-table { min-width: 880px; }
.demand-cell { min-width: 280px; max-width: 420px; }
.org-link { color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.5; }
a.org-link:hover { color: var(--primary); }
.location { margin: 6px 0 10px; font-size: 12px; color: var(--muted); }
.demand-value { display: block; font-size: 20px; line-height: 1.3; color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.demand-cell p { margin: 10px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.tag { display: inline-block; max-width: 180px; padding: 5px 8px; background: var(--primary-soft); color: #24436f; border-radius: 5px; font-size: 12px; line-height: 1.4; }
.status { display: inline-block; padding: 5px 10px; background: #eef1f6; color: #495a72; border-radius: 20px; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.status.nova { background: var(--primary-soft); color: var(--primary); }
.status.em_analise { background: var(--warning-soft); color: var(--warning); }
.status.contatada { background: var(--success-soft); color: var(--success); }
.status.descartada { color: #495a72; }
.priority { color: var(--warning); font-weight: 650; }
.history { font-weight: 600; }
td small { display: block; margin-top: 6px; font-size: 12px; }
.nowrap { white-space: nowrap; }
.arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; border: 1px solid #b6c9ee; border-radius: 8px; font-size: 20px; }
.arrow:hover { background: var(--primary-soft); text-decoration: none; }
.lead-controls { display: grid; grid-template-columns: repeat(3, max-content); align-items: stretch; gap: 8px; margin-top: 16px; }
.lead-controls form { margin: 0; }
.lead-controls form > button { height: 100%; width: 100%; white-space: nowrap; }
.favorite-form, .seen-form, .delete-form { margin: 12px 0; }
.favorite-button, .seen-button, .delete-button { padding: 8px 10px; min-height: 44px; font-size: 12px; }
.favorite-button { background: white; color: var(--primary); border-color: var(--control-border); }
.favorite-button.is-favorite { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.favorite-button:hover:not(:disabled) { background: var(--primary); color: white; border-color: var(--primary); }
.favorite-button > [aria-hidden="true"] { font-size: 17px; flex-shrink: 0; }
.favorite-button > [data-action-label] { font-size: inherit; }
.seen-button { background: white; color: var(--muted); border-color: var(--control-border); }
.seen-button.is-seen { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.seen-button:hover:not(:disabled) { background: var(--muted); color: white; border-color: var(--muted); }
.seen-button.is-seen:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); }
.seen-button.is-seen circle { fill: currentColor; }
.seen-button svg { flex-shrink: 0; }
.delete-button { background: white; color: var(--danger); border-color: var(--danger); }
.delete-button:hover:not(:disabled) { background: var(--danger); color: white; border-color: var(--danger); }
.favorite-button:disabled, .seen-button:disabled, .delete-button:disabled { background: #e1e7f0; border-color: #acb9cc; color: var(--muted); }
.contact-profile-link { font-size: 13px; font-weight: 600; }
.lead-controls .contact-profile-link { grid-column: 1 / -1; display: inline-flex; align-items: center; min-height: 44px; }
#inline-action-status { position: fixed; z-index: 50; bottom: 20px; right: 20px; max-width: min(520px, calc(100vw - 40px)); margin: 0; border: 1px solid var(--control-border); background: white; box-shadow: 0 8px 28px #10264326; }

/* Detail, coverage and contacts. */
.detail-title { max-width: 850px; font-size: 30px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.sheet { margin-bottom: 24px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow-wrap: anywhere; }
.sheet > :last-child { margin-bottom: 0; }
.sheet table { table-layout: fixed; }
.sheet td, .sheet th { overflow-wrap: anywhere; }
.description { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
dl { margin: 24px 0; }
dl > div { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
dt { width: 175px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 650; }
hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.interval { margin: 8px 0; color: var(--warning); font-size: 28px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.evidence { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.evidence small { display: block; margin: 12px 0; }
.event { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.event b { font-weight: 600; }
.coverage-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.coverage-row p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
progress { width: 25%; min-width: 100px; height: 12px; accent-color: var(--primary); }
.error-record { padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
code { font-size: 13px; overflow-wrap: anywhere; }
.trash-notes { max-width: 340px; white-space: pre-wrap; overflow-wrap: anywhere; }
.retained-note + .retained-note { margin-top: 16px; }
.contact-sources, .contact-list { margin: 24px 0; }
.contact-sources textarea { max-width: 900px; }
.contact-sources button { margin-top: 12px; }
.contact-table { min-width: 800px; table-layout: fixed; }
.contact-table th:nth-child(1) { width: 21%; }
.contact-table th:nth-child(2) { width: 16%; }
.contact-table th:nth-child(3) { width: 23%; }
.contact-table th:nth-child(4) { width: 15%; }
.contact-table th:nth-child(5) { width: 25%; }
.contact-table td { padding: 16px 12px; overflow-wrap: anywhere; }
.contact-org { font-weight: 650; }
.contact-value { font-size: 14px; }
.contact-evidence { margin-top: 12px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.contact-evidence summary { color: var(--primary); min-height: 44px; padding: 10px 0; }
.contact-evidence p { margin: 8px 0 0; }
.contact-warning { font-size: 12px; color: var(--warning); font-weight: 600; }

/* Existing message preparation and approval. */
.mail-steps li { margin: 12px 0; }
.mail-catalog { padding: 20px 0; border-top: 1px solid var(--line); }
.mail-choice { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 16px 0; font-size: 14px; letter-spacing: 0; }
.mail-choice input { margin-top: 3px; }
.mail-choice .recipient-label { min-height: 44px; margin: 0; padding: 8px 0; font: inherit; letter-spacing: normal; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.7; }
.signature-preview { margin: 20px 0; }
.signature-preview img { display: block; max-width: min(100%, 600px); height: auto; }
.signature-preview figcaption { margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
