/* P1 COI Tracker layout. Tokens and primitives come from /reclaimt.css (the shared Reclaimt design system). */

/* ---- top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.brand .mark { width: 22px; height: 22px; flex: none; }
.brand .product { color: var(--ink-2); font-weight: 500; }
.brand .product::before { content: "/"; color: var(--line-2); margin-right: 10px; }
.spacer { flex: 1; }
.tag { font-size: 12px; font-weight: 500; color: var(--warn); background: var(--warn-soft); border-radius: var(--radius-pill); padding: 3px 9px; white-space: nowrap; }
.bar nav { display: flex; align-items: center; gap: 2px; }
.bar nav button.link { color: var(--ink-2); padding: 0 10px; min-height: 34px; }
.bar nav button.link:hover { color: var(--ink); background: var(--surface-2); }
#who { font-size: 13px; color: var(--ink-2); padding-right: 8px; border-right: 1px solid var(--line); margin-right: 6px; }

/* ---- page */
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.page-head .titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.page-head .titles .row { margin: 0; }
.page-head h1 + .muted { margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -6px; }
h1 { outline-offset: 6px; }

/* ---- toolbar above the vendor table */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.toolbar input[type=search] { flex: 1 1 260px; }
.toolbar .divider { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

/* ---- empty state */
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { font-size: 18px; margin-bottom: 8px; }
.empty ol { text-align: left; max-width: 560px; margin: 16px auto; }
.empty .row { justify-content: center; margin-top: 18px; }
p.empty-line { color: var(--ink-2); padding: 36px 0; text-align: center; }

/* ---- vendor table */
.vendor-name { font-weight: 500; white-space: nowrap; }
td.action { white-space: nowrap; }
td .badge { margin: 2px 6px 2px 0; }
td .badge + .badge { margin-left: 0; }
.brand { white-space: nowrap; }
#who { white-space: nowrap; }

/* ---- vendor detail */
.coverages td:first-child { font-weight: 500; }
ul.contacts { list-style: none; padding: 0; margin: 0 0 12px; }
ul.contacts > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.contacts > li:last-child { border-bottom: none; }
ul.contacts > li .badge { margin-right: 4px; }
ul.contacts > li .row { flex: 1 1 100%; }

/* ---- settings: sections read as a settings list */
.settings .card { padding: 20px 22px; }
.settings textarea { width: 100%; max-width: 480px; }

/* skip link appears only when focused */
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); border: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* wide tables scroll inside their own box instead of breaking the page on a phone */
.table-wrap { overflow-x: auto; }

@media (max-width: 960px) { .tag { display: none; } }
@media (max-width: 720px) {
  .bar { padding: 0 12px; gap: 6px; }
  .brand .product { display: none; }
  .bar nav button.link { padding: 0 8px; font-size: 14px; }
  #who { display: none; }
  .vendor-name { white-space: normal; }
  .table-wrap table { min-width: 0; }
  td, th { padding: 10px 10px; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 21px; }
  .card { padding: 16px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .row > * { flex: 1 1 100%; }
  .row > label.inline { flex: 1 1 auto; }
  button { min-height: 44px; }
  .bar nav button.link { min-height: 36px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > * { flex: 1 1 auto; }
}
