:root {
  color-scheme: light;
  --bg: #eef7f6;
  --surface: #ffffff;
  --surface-soft: #e4f2f0;
  --text: #102a2b;
  --muted: #5c6f70;
  --line: #c8dcda;
  --accent: #066b70;
  --accent-dark: #034b51;
  --danger: #b42318;
  --warning: #9a6400;
  --success: #147a50;
  --shadow: 0 14px 38px rgba(16, 42, 43, 0.08);
}

/* Partnerships research CRM */
.partnerships-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.partnership-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.8fr));
  align-items: end;
  gap: 12px;
}

.partnership-filter-grid .filter-actions {
  grid-column: 1 / -1;
}

.partnership-table {
  min-width: 1050px;
}

.partnership-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.partnership-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.detail-check {
  align-self: end;
  min-height: 42px;
}

.readiness-list,
.research-link-list,
.source-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

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

.readiness-list li {
  border-left: 4px solid var(--warning);
  padding: 7px 10px;
  background: rgba(154, 100, 0, 0.07);
}

.readiness-list li.passed {
  border-left-color: var(--success);
  background: rgba(20, 122, 80, 0.07);
}

.research-link-list a {
  overflow-wrap: anywhere;
  color: var(--accent-dark);
  font-weight: 700;
}

.research-link-list.compact {
  gap: 5px;
}

.subsection-form {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.source-list article,
.timeline-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.source-list article:last-child,
.timeline-list article:last-child {
  border-bottom: 0;
}

.source-list p,
.timeline-list p {
  margin: 6px 0 0;
}

.source-list a {
  overflow-wrap: anywhere;
}

.email-draft {
  min-height: 390px;
  line-height: 1.45;
}

.email-draft-preview {
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  overflow-wrap: anywhere;
}

.coverage-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coverage-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.coverage-counts span {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--line);
  padding-left: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.coverage-counts strong {
  color: var(--text);
  font-size: 1.2rem;
}

.coverage-table {
  min-width: 1080px;
}

.coverage-update-form {
  min-width: 260px;
  gap: 8px;
}

.import-preview {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

@media (max-width: 920px) {
  .partnerships-stats,
  .coverage-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partnership-filter-grid,
  .partnership-form-grid,
  .partnership-detail-layout,
  .coverage-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .partnerships-stats,
  .coverage-counts {
    grid-template-columns: 1fr;
  }

  .source-list article,
  .timeline-list article {
    display: grid;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(110deg, rgba(6, 107, 112, 0.12), transparent 45%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 28px, 1180px);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(200, 220, 218, 0.85);
  background: rgba(238, 247, 246, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.brand-stack {
  display: grid;
  gap: 2px;
}

.signed-in-label {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.nav-links a,
.button,
button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 20;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown-menu a {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
}

.nav-links a.language-pill,
.language-switch a.language-pill {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  border-color: rgba(6, 107, 112, 0.24);
  background: rgba(255, 255, 255, 0.72);
}

.nav-links a.language-pill.active,
.language-switch a.language-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 107, 112, 0.18);
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 18px;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.danger,
button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.page {
  padding: 28px 0 54px;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.offline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.compact-def-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.compact-def-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(200, 220, 218, 0.72);
}

.compact-def-list dt {
  color: var(--muted);
  font-weight: 700;
}

.compact-def-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.offline-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 16px;
}

.compact-table {
  margin-top: 12px;
}

.compact-table table {
  font-size: 0.92rem;
}

.button[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-summary-wide {
  grid-column: span 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#activity-form,
#payment-form,
#participants,
#activities,
#payments,
#contact-editor,
#new-offline-client,
#existing-offline-clients {
  scroll-margin-top: 160px;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title-row h2,
.section-title-row p {
  margin-bottom: 4px;
}

.stat {
  display: grid;
  gap: 6px;
}

.stat strong {
  font-size: 1.65rem;
}

.notice {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.notice.success {
  border-color: rgba(20, 122, 80, 0.3);
  color: var(--success);
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.3);
  color: var(--danger);
}

.notice.warning {
  border-color: rgba(154, 100, 0, 0.3);
  color: var(--warning);
}

.segmented-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-tabs a {
  padding: 9px 14px;
  border-right: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.segmented-tabs a:last-child {
  border-right: 0;
}

.segmented-tabs a.active {
  background: var(--accent);
  color: #fff;
}

form {
  display: grid;
  gap: 14px;
}

.inline-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.stacked-actions {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.stacked-actions input {
  min-height: 34px;
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline {
  display: inline;
}

.button.small,
button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox-row input {
  width: auto;
}

.field-help {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap table {
  min-width: 1040px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 760px;
}

.activity-sales-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.82rem;
}

.activity-sales-table th,
.activity-sales-table td {
  padding: 7px 5px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.activity-sales-table th {
  line-height: 1.2;
}

.activity-col-date { width: 8%; }
.activity-col-item { width: 13%; }
.activity-col-for { width: 10%; }
.activity-col-quantity { width: 7%; }
.activity-col-amounts { width: 14%; }
.activity-col-commission { width: 13%; }
.activity-col-provider { width: 12%; }
.activity-col-notes { width: 12%; }
.activity-col-actions { width: 11%; }

.activity-cell-lines {
  display: table-cell;
}

.activity-cell-lines > span {
  display: block;
  margin-bottom: 3px;
}

.activity-cell-lines > span:last-child {
  margin-bottom: 0;
}

.activity-cell-lines small {
  display: inline;
  color: var(--muted);
  font-weight: 600;
}

.activity-money-cell span {
  white-space: nowrap;
}

.activity-actions-cell .button.small,
.activity-actions-cell button.small,
.activity-actions-cell summary {
  max-width: 100%;
  white-space: normal;
  padding: 6px 7px;
  line-height: 1.15;
}

.activity-cancel-details {
  min-width: 0;
}

.activity-cancel-details textarea {
  min-height: 72px;
}

.payment-sales-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.82rem;
}

.payment-sales-table th,
.payment-sales-table td {
  padding: 7px 5px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.payment-sales-table th {
  line-height: 1.2;
}

.payment-sales-table.has-accounting .payment-col-date { width: 10%; }
.payment-sales-table.has-accounting .payment-col-type { width: 11%; }
.payment-sales-table.has-accounting .payment-col-amounts { width: 15%; }
.payment-sales-table.has-accounting .payment-col-cash { width: 16%; }
.payment-sales-table.has-accounting .payment-col-note { width: 13%; }
.payment-sales-table.has-accounting .payment-col-status { width: 11%; }
.payment-sales-table.has-accounting .payment-col-accounting { width: 13%; }
.payment-sales-table.has-accounting .payment-col-actions { width: 11%; }

.payment-sales-table:not(.has-accounting) .payment-col-date { width: 11%; }
.payment-sales-table:not(.has-accounting) .payment-col-type { width: 13%; }
.payment-sales-table:not(.has-accounting) .payment-col-amounts { width: 18%; }
.payment-sales-table:not(.has-accounting) .payment-col-cash { width: 18%; }
.payment-sales-table:not(.has-accounting) .payment-col-note { width: 16%; }
.payment-sales-table:not(.has-accounting) .payment-col-status { width: 12%; }
.payment-sales-table:not(.has-accounting) .payment-col-actions { width: 12%; }

.payment-cell-lines > span {
  display: block;
  margin-bottom: 3px;
}

.payment-cell-lines > span:last-child {
  margin-bottom: 0;
}

.payment-cell-lines small {
  display: inline;
  color: var(--muted);
  font-weight: 600;
}

.payment-money-cell span {
  white-space: nowrap;
}

.payment-actions-cell .button.small,
.payment-actions-cell button.small,
.payment-actions-cell summary {
  max-width: 100%;
  white-space: normal;
  padding: 6px 7px;
  line-height: 1.15;
}

.payment-void-details {
  min-width: 0;
}

.payment-void-details textarea {
  min-height: 72px;
}

.control-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.control-stat-warning {
  border-color: rgba(180, 35, 24, 0.35);
}

.control-stat-warning strong {
  color: var(--danger);
}

.control-stat-ok {
  border-color: rgba(20, 122, 80, 0.3);
}

.control-stat-ok strong {
  color: var(--success);
}

.control-dashboard-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.compact-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 10px;
}

.compact-filters button {
  min-height: 42px;
}

.audit-list {
  display: grid;
  gap: 12px;
}

.audit-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.audit-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.audit-entry-head time {
  color: var(--muted);
  white-space: nowrap;
}

.audit-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.audit-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-meta small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-weight: 700;
}

.audit-values {
  margin-top: 12px;
}

.audit-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.audit-values pre {
  max-height: 320px;
  margin: 6px 0 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.official-year-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  max-width: 100%;
}

.official-year-fixed,
.official-year-table {
  font-size: 0.82rem;
  border-radius: 0;
}

.official-year-fixed {
  position: relative;
  z-index: 2;
  width: 260px;
  min-width: 260px;
  box-shadow: 4px 0 8px rgba(15, 23, 42, 0.08);
}

.official-year-numbers {
  min-width: 0;
  overflow-x: auto;
}

.official-year-table {
  min-width: 1860px;
}

.official-year-fixed th,
.official-year-fixed td,
.official-year-table th,
.official-year-table td {
  height: 34px;
  padding: 6px 7px;
  white-space: nowrap;
  vertical-align: middle;
}

.official-year-fixed th,
.official-year-fixed td {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.official-year-table th,
.official-year-table td {
  text-align: right;
}

.official-year-fixed .summary-row td,
.official-year-table .summary-row td {
  background: #d9ead3;
  font-weight: 800;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  font-size: 0.9rem;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.ok {
  background: rgba(20, 122, 80, 0.12);
  color: var(--success);
}

.badge.warning {
  background: rgba(154, 100, 0, 0.12);
  color: var(--warning);
}

.badge.danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.weather-authority {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-bottom: 16px;
}

.weather-authority h2 {
  margin: 10px 0 8px;
}

.weather-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.weather-source-grid a,
.weather-link-list a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
  text-decoration: none;
}

.weather-source-grid strong,
.weather-link-list a {
  color: var(--accent-dark);
  font-weight: 800;
}

.weather-source-grid span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.weather-grid,
.weather-page-section {
  margin-bottom: 16px;
}

.port-status-card {
  padding-bottom: 14px;
}

.port-status-card .section-title-row {
  margin-bottom: 8px;
}

.port-status-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(360px, 1.35fr);
  gap: 14px;
  align-items: start;
}

.port-status-current h3,
.port-status-current p {
  margin-bottom: 6px;
}

.port-status-form {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.port-status-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.port-status-form label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  white-space: nowrap;
}

.port-status-form label span {
  min-width: 42px;
}

.port-status-form input,
.port-status-form select,
.port-status-form textarea {
  min-height: 34px;
  padding: 6px 8px;
}

.port-status-form input[type="date"] {
  width: 142px;
}

.port-status-form input[type="time"] {
  width: 96px;
}

.port-status-form select {
  width: 156px;
}

.port-status-note {
  width: min(100%, 520px);
}

.port-status-note textarea {
  min-height: 42px;
  width: 100%;
  white-space: normal;
}

.port-status-card .compact-help {
  margin: 0;
  font-size: 0.86rem;
}

.port-status-card .table-scroll {
  margin-top: 8px;
}

.port-status-card th,
.port-status-card td {
  padding: 7px 9px;
}

.compact-details {
  margin-top: 10px;
}

.compact-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.offline-status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 28px;
  padding: 4px 10px;
  background: #fff;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.offline-status-pill.online {
  border-color: rgba(20, 122, 80, 0.28);
  color: #147a50;
}

.offline-status-pill.warning {
  border-color: rgba(217, 119, 6, 0.3);
  color: #995c00;
}

.offline-status-pill.offline {
  border-color: rgba(169, 61, 50, 0.32);
  color: #a93d32;
}

.offline-update-banner {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 81;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(8, 127, 140, 0.24);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.weather-metric {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.weather-metric span,
.weather-metric small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-metric strong {
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 1.2rem;
}

.weather-flag-list {
  display: grid;
  gap: 10px;
}

.weather-scan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.weather-scan-item {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(154, 100, 0, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(154, 100, 0, 0.08);
}

.weather-scan-item strong {
  color: var(--text);
  line-height: 1.3;
}

.weather-scan-item small {
  color: var(--muted);
  line-height: 1.4;
}

.weather-forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.weather-day {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  font-size: 0.9rem;
}

.weather-day strong {
  color: var(--accent-dark);
}

.weather-day span {
  color: var(--muted);
  font-weight: 800;
}

.storm-map {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.storm-map img {
  display: block;
  width: 100%;
  height: auto;
}

.weather-link-list {
  display: grid;
  gap: 8px;
}

.report-card-list {
  display: grid;
  gap: 12px;
}

.report-line-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.report-card-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.report-card-head p {
  margin: 0;
}

.report-card-total {
  min-width: 150px;
  text-align: right;
}

.report-card-total span,
.report-label,
.money-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-card-total strong {
  display: block;
  margin-top: 3px;
  color: var(--accent-dark);
  font-size: 1.2rem;
}

.report-card-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.report-card-main strong,
.report-card-main .muted {
  display: block;
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.overview-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.money-grid div {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.overview-money-grid div {
  display: flex;
  min-width: 0;
  min-height: 74px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.overview-money-grid span {
  min-height: 0;
}

.money-grid strong {
  display: block;
  margin-top: auto;
  overflow-wrap: anywhere;
}

.overview-money-grid strong {
  display: block;
  margin-top: auto;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

.report-note {
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.report-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.report-tabs a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.print-only {
  display: none;
}

.offline-voucher-print {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 9mm;
  }

  .topbar,
  .report-tabs,
  .report-filters,
  .actions,
  button,
  .button {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 9pt;
  }

  .shell {
    width: 100%;
    max-width: none;
  }

  .page {
    padding: 0;
  }

  .screen-only {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 10px !important;
    break-inside: auto;
  }

  .page-head {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #111;
  }

  .page-head h1 {
    margin: 0 0 3px;
    font-size: 15pt;
  }

  .page-head p,
  .muted {
    color: #333 !important;
  }

  h2 {
    margin: 9px 0 5px;
    font-size: 11pt;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
  }

  th,
  td {
    border: 1px solid #bbb;
    padding: 4px 5px;
    vertical-align: top;
  }

  th {
    background: #eee !important;
    color: #111;
    font-weight: 800;
  }

  .right {
    text-align: right;
  }

  .table-scroll {
    overflow: visible;
  }

  .table-scroll table {
    min-width: 0;
  }

  .report-print-section {
    page-break-before: auto;
  }

  .print-report-table {
    table-layout: fixed;
  }

  .print-report-table th:nth-child(1),
  .print-report-table td:nth-child(1) {
    width: 11%;
  }

  .print-report-table th:nth-child(2),
  .print-report-table td:nth-child(2) {
    width: 10%;
  }

  .print-report-table th:nth-child(3),
  .print-report-table td:nth-child(3) {
    width: 15%;
  }

  .print-report-table th:nth-child(4),
  .print-report-table td:nth-child(4) {
    width: 21%;
  }

  .print-report-table th:nth-child(n+5),
  .print-report-table td:nth-child(n+5) {
    width: 7%;
  }

  body.printing-offline-voucher {
    background: #fff;
    font-size: 11pt;
  }

  body.printing-offline-voucher .topbar,
  body.printing-offline-voucher .page > :not(.offline-voucher-print) {
    display: none !important;
  }

  body.printing-offline-voucher .shell {
    width: 100%;
    max-width: none;
  }

  body.printing-offline-voucher .offline-voucher-print {
    display: block !important;
    border: 0;
    padding: 0;
    margin: 0;
    color: #102a2b;
    box-shadow: none;
  }

  body.printing-offline-voucher .offline-voucher-print .brand {
    font-size: 24pt;
    font-weight: 800;
    color: #102a2b;
  }

  body.printing-offline-voucher .offline-voucher-print .site {
    margin-top: 2px;
    color: #333;
  }

  body.printing-offline-voucher .offline-voucher-print h1 {
    margin: 16px 0 8px;
    font-size: 18pt;
  }

  body.printing-offline-voucher .offline-voucher-print .warning {
    display: inline-block;
    margin: 8px 0 14px;
    padding: 8px 10px;
    border: 1px solid #9a6400;
    color: #9a6400;
    font-weight: 800;
  }

  body.printing-offline-voucher .offline-voucher-print .grid {
    display: grid;
    grid-template-columns: 38mm 1fr;
    gap: 5px 12px;
    margin: 10px 0 16px;
  }

  body.printing-offline-voucher .offline-voucher-print .label {
    font-weight: 800;
    color: #333;
  }

  body.printing-offline-voucher .offline-voucher-print table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }

  body.printing-offline-voucher .offline-voucher-print th,
  body.printing-offline-voucher .offline-voucher-print td {
    border: 1px solid #888;
    padding: 6px 7px;
    text-align: left;
    vertical-align: top;
  }

  body.printing-offline-voucher .offline-voucher-print th {
    background: #e4f2f0 !important;
  }

  body.printing-offline-voucher .offline-voucher-print .foot {
    margin-top: 16px;
    color: #333;
    font-size: 10pt;
  }
}

@media (max-width: 760px) {
  .nav {
    display: block;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .nav-dropdown {
    display: block;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 4px;
    box-shadow: none;
  }

  .page-head {
    display: block;
  }

  .page-head .button {
    margin-top: 12px;
  }

  .grid,
  .grid.two,
  .offline-grid,
  .offline-detail-grid,
  .dashboard-summary,
  .control-summary,
  .form-grid,
  .weather-authority,
  .port-status-layout,
  .filters-row {
    grid-template-columns: 1fr;
  }

  .segmented-tabs {
    display: flex;
  }

  .segmented-tabs a {
    flex: 1;
    text-align: center;
  }

  .audit-entry-head {
    display: block;
  }

  .audit-entry-head time {
    display: block;
    margin-top: 6px;
  }

  .audit-meta,
  .audit-values-grid {
    grid-template-columns: 1fr;
  }

  .control-dashboard-alert {
    display: block;
  }

  .control-dashboard-alert .button {
    margin-top: 10px;
  }

  .dashboard-summary-wide {
    grid-column: span 1;
  }

  .section-title-row {
    display: block;
  }

  .section-title-row .button {
    margin-top: 10px;
  }

  .report-card-head {
    display: block;
  }

  .report-card-total {
    text-align: left;
    margin-top: 10px;
  }

  .report-card-main,
  .money-grid,
  .weather-metrics,
  .weather-source-grid,
  .weather-scan-list {
    grid-template-columns: 1fr 1fr;
  }

  .overview-money-grid {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  .table-scroll table {
    display: table;
  }

  .activity-sales-table {
    display: table;
    table-layout: auto;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .activity-sales-table colgroup,
  .activity-sales-table thead {
    display: none;
  }

  .activity-sales-table tbody,
  .activity-sales-table tr,
  .activity-sales-table td {
    display: block;
    width: 100%;
  }

  .activity-sales-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }

  .activity-sales-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .activity-sales-table td:last-child {
    border-bottom: 0;
  }

  .activity-sales-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .activity-actions-cell .button.small,
  .activity-actions-cell button.small {
    width: auto;
  }

  .payment-sales-table {
    display: table;
    table-layout: auto;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .payment-sales-table colgroup,
  .payment-sales-table thead {
    display: none;
  }

  .payment-sales-table tbody,
  .payment-sales-table tr,
  .payment-sales-table td {
    display: block;
    width: 100%;
  }

  .payment-sales-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }

  .payment-sales-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .payment-sales-table td:last-child {
    border-bottom: 0;
  }

  .payment-sales-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .payment-actions-cell .button.small,
  .payment-actions-cell button.small {
    width: auto;
  }
}

.stats-grid.partnerships-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.form-grid.partnership-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.coverage-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .stats-grid.partnerships-stats,
  .coverage-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partnership-filter-grid,
  .form-grid.partnership-form-grid,
  .partnership-detail-layout,
  .grid.coverage-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .stats-grid.partnerships-stats,
  .coverage-counts {
    grid-template-columns: 1fr;
  }
}

.readiness-list li {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.readiness-list li span {
  flex: 0 0 24px;
  font-weight: 800;
}

.initial-contact-section {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.initial-contact-row {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.initial-contact-row:last-child {
  margin-bottom: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.form-grid.partnership-intake-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.remove-initial-contact {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .form-grid.partnership-intake-contact-grid {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.multi-choice {
  position: relative;
}

.multi-choice summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.multi-choice summary::-webkit-details-marker {
  display: none;
}

.multi-choice summary::after {
  content: "v";
  color: var(--muted);
  font-weight: 800;
}

.multi-choice[open] > div {
  display: grid;
  gap: 8px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.partnership-simple-intake,
.partnership-simple-details {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.optional-fields {
  margin: 14px 0;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.optional-fields > summary,
.partnership-support-details > summary,
.partnership-collapsible > summary,
.research-error > summary {
  cursor: pointer;
  font-weight: 700;
  color: #174a55;
  padding: 12px 14px;
}

.optional-fields[open] > summary,
.partnership-support-details[open] > summary,
.partnership-collapsible[open] > summary {
  border-bottom: 1px solid #cbd5e1;
}

.optional-fields > :not(summary),
.partnership-support-details > :not(summary),
.partnership-collapsible > :not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}

.partnership-support-details,
.partnership-collapsible {
  padding: 0;
  overflow: hidden;
}

.partnership-scan-form,
.partnership-review-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.repeat-scan-warning {
  grid-column: 1 / -1;
  margin: 0;
}

.repeat-scan-warning .checkbox-row {
  margin-top: 8px;
}

.unsubscribe-card {
  max-width: 620px;
  margin: 48px auto;
}

.research-progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 1px;
  margin-top: 12px;
  border: 1px solid #cbd5e1;
  background: #cbd5e1;
}

.research-progress-grid > div {
  min-width: 0;
  padding: 10px 12px;
  background: #fff;
}

.research-progress-grid span,
.candidate-facts span {
  display: block;
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.research-progress-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
}

.research-error {
  margin-top: 12px;
  border: 1px solid #fecaca;
  background: #fff7f7;
}

.candidate-bulk-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.candidate-review-list {
  display: grid;
  gap: 10px;
}

.candidate-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #94a3b8;
  background: #fff;
}

.candidate-card.priority-high { border-left-color: #15803d; }
.candidate-card.priority-medium { border-left-color: #ca8a04; }
.candidate-card.priority-low { border-left-color: #64748b; }

.candidate-title-row,
.candidate-badges,
.candidate-actions {
  display: flex;
  gap: 8px;
}

.candidate-title-row {
  justify-content: space-between;
  align-items: flex-start;
}

.candidate-title-row h3,
.candidate-title-row p {
  margin: 0;
}

.candidate-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.candidate-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  background: #e2e8f0;
}

.candidate-facts > div {
  min-width: 0;
  padding: 9px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.candidate-facts small { display: block; }

.candidate-fit {
  margin: 10px 0;
  padding-left: 10px;
  border-left: 3px solid #0f766e;
}

.candidate-actions {
  flex-direction: column;
  align-items: stretch;
}

.compact-notice {
  margin: 9px 0;
  padding: 8px 10px;
}

.research-run-list {
  display: grid;
  gap: 1px;
  border: 1px solid #dbe3e8;
  background: #dbe3e8;
}

.research-run-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.research-run-list a:hover { background: #f0fdfa; }

@media (max-width: 800px) {
  .partnership-scan-form,
  .partnership-review-filters,
  .research-progress-grid,
  .candidate-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-card {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .candidate-actions {
    grid-column: 2;
    flex-direction: row;
  }

  .candidate-bulk-bar,
  .candidate-title-row,
  .research-run-list a {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .partnership-scan-form,
  .partnership-review-filters,
  .research-progress-grid,
  .candidate-facts {
    grid-template-columns: 1fr;
  }
}
