/* Supplier portal: quiet surfaces and product names as the primary anchor. */
.portal-content { max-width: 1320px; padding: 32px 24px 56px; }
.portal-content h1 { letter-spacing: -.035em; line-height: 1.2; }
.portal-content h2 { letter-spacing: -.02em; }
.portal-content table { border-collapse: separate; border-spacing: 0; width: 100%; }
.portal-content thead th { padding-top: 14px; padding-bottom: 14px; background: #f8fafc; color: #64748b; font-size: 11px; letter-spacing: .035em; font-weight: 600; }
.portal-content tbody td { padding-top: 14px; padding-bottom: 14px; border-top: 1px solid #eef2f6; vertical-align: middle; }
.portal-content tbody tr { transition: background-color .12s ease; }
.portal-content tbody tr:hover { background: #f0f9ff; }
.portal-content td.tabular-nums { font-weight: 600; font-variant-numeric: tabular-nums; }
.portal-product-name { display: inline-block; color: #182c3c; font-size: 14px; line-height: 1.5; font-weight: 600; text-decoration: none; }
.portal-product-name:hover { color: #007fa3; text-decoration: underline; text-underline-offset: 3px; }
.portal-product-reference { display: block; margin-top: 3px; font-size: 11px; color: #64748b; }
.portal-detail-reference { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 12px; font-size: 12px; color: #64748b; }
.portal-detail-reference strong { color: #334155; font-weight: 500; }
.portal-detail-reference span { margin-left: 12px; }
.portal-content a:focus-visible, .portal-content button:focus-visible { outline: 2px solid #00aee0; outline-offset: 3px; border-radius: 5px; }
@media (max-width: 640px) {
  .portal-content { padding: 20px 16px 40px; }
  .portal-content h1 { font-size: 24px; overflow-wrap: anywhere; }
  .portal-content tbody td { padding-top: 12px; padding-bottom: 12px; }
  .portal-detail-reference span { margin-left: 0; flex-basis: 100%; }
}
.portal-content div:has(> table) { overflow-x: auto; border-radius: 12px; }
@media (max-width: 640px) {
  .portal-content table { min-width: 580px; }
}

/* Access keys: retain Django's accessible inputs, with deliberate choice cards. */
.portal-key-settings { max-width: 880px; }
.portal-key-settings > section { padding: 24px; }
.portal-key-settings h2 { font-size: 17px; }
.portal-key-settings form > fieldset { margin-top: 24px; min-width: 0; }
.portal-key-settings legend, .portal-key-name > label { display: block; margin-bottom: 8px; color: #334155; font-size: 13px; font-weight: 600; }
.portal-key-name input { max-width: 480px; font-size: 14px; min-height: 44px; }
.portal-key-hint { color: #64748b; font-size: 13px; line-height: 1.6; margin: 0 0 12px; }
.portal-key-scopes > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.portal-key-settings fieldset label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; color: #334155; font-size: 14px; cursor: pointer; transition: background .12s, border-color .12s; }
.portal-key-settings fieldset label:hover { background: #f8fafc; border-color: #94a3b8; }
.portal-key-settings fieldset label:has(input:checked) { background: #effaff; border-color: #00aee0; color: #075985; }
.portal-key-settings fieldset label:focus-within { outline: 2px solid #00aee0; outline-offset: 2px; }
.portal-key-settings fieldset input { flex-shrink: 0; width: 17px; height: 17px; margin: 0; accent-color: #008caf; }
.portal-key-duration > div { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-key-duration label { min-width: 125px; }
.portal-key-settings form > button { margin-top: 24px; font-size: 14px; min-height: 44px; }
.portal-key-empty { padding: 20px; border: 1px dashed #dbe3ec; border-radius: 10px; background: #f8fafc; color: #475569; font-size: 14px; }
.portal-key-empty .portal-key-hint { margin: 4px 0 0; }
.portal-key-settings code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .portal-key-settings > section { padding: 20px 16px; }
  .portal-key-scopes > div { grid-template-columns: 1fr; }
  .portal-key-duration > div > div { flex: 1; }
  .portal-key-duration label { min-width: 0; }
}

/* Supplier workbench: calm, scannable work pages, including narrow screens. */
.portal-primary-nav { min-width: 0; overflow-x: auto; white-space: nowrap; }
.portal-primary-nav > a { flex-shrink: 0; }
.portal-work { display: grid; gap: 24px; }
.portal-work-header h1 { font-size: 32px; font-weight: 650; margin: 8px 0; }
.portal-work-header p { color: #64748b; font-size: 14px; line-height: 1.65; max-width: 820px; }
.portal-work-eyebrow { color: #007f9e; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.portal-work-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.portal-work-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #536779; }
.portal-work-nav a:hover { background: #eaf6fa; }
.portal-work-nav a[aria-current] { background: #e0f3f8; color: #006d89; }
.portal-work-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portal-work-metrics > * { padding: 24px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.portal-work-metrics strong { display: block; font-size: 34px; font-weight: 650; letter-spacing: -.04em; }
.portal-work-metrics span { color: #64748b; font-size: 13px; }
.portal-work-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; scroll-margin-top: 70px; }
.portal-work-section-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px; border-bottom: 1px solid #eef2f6; }
.portal-work-section-heading h2 { font-size: 17px; font-weight: 650; color: #182c3c; }
.portal-work-section-heading p { margin-top: 5px; font-size: 12px; color: #64748b; line-height: 1.6; max-width: 760px; }
.portal-work-section-heading > a, .portal-work-back { color: #007f9e; font-size: 13px; font-weight: 600; }
.portal-work-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.portal-work-action:hover { background: #f3fafc; }
.portal-work-action strong { display: block; color: #24384a; font-size: 14px; font-weight: 600; }
.portal-work-action small { display: block; margin-top: 4px; color: #64748b; font-size: 12px; }
.portal-work-action > span { flex-shrink: 0; color: #007f9e; }
.portal-work-badge { display: inline-flex; border-radius: 6px; padding: 5px 9px; background: #f1f5f9; color: #536779; font-size: 11px; font-weight: 600; }
.portal-work-badge.is-alert { background: #fff5e6; color: #996017; }
.portal-work-badge.is-good { background: #eaf8f1; color: #187453; }
.portal-work-empty { padding: 32px 24px; color: #64748b; font-size: 14px; line-height: 1.6; }
.portal-work-note { color: #64748b; font-size: 12px; line-height: 1.7; }
.portal-work-card > .portal-work-note { padding: 16px 24px; background: #f8fafc; }
.portal-work-button { display: inline-flex; justify-content: center; align-items: center; white-space: nowrap; min-height: 40px; padding: 10px 16px; background: #007f9e; color: #f8fafc; font-size: 13px; font-weight: 600; border-radius: 9px; }
.portal-work-button:hover { background: #006d89; }
.portal-work-preview { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #eef9fc; border: 1px solid #cfe9f0; border-radius: 16px; padding: 24px; }
.portal-work-preview h2 { margin-top: 5px; font-size: 20px; font-weight: 650; }
.portal-work-preview p { margin-top: 6px; font-size: 13px; color: #536779; }
.portal-week-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 64px; padding: 32px; border-radius: 16px; background: #eaf7fb; border: 1px solid #cfe9f0; }
.portal-week-hero span, .portal-week-hero p { font-size: 13px; color: #536779; }
.portal-week-hero strong { display: block; font-size: 42px; color: #12526a; font-weight: 650; letter-spacing: -.04em; }
.portal-week-hero strong small { font-size: 20px; }
.portal-week-hero > a { margin-left: auto; font-size: 13px; font-weight: 600; color: #007f9e; }
.portal-work-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.portal-work-delta { font-size: 17px; font-weight: 650; color: #187453 !important; text-align: right; }
.portal-work-delta.is-down { color: #996017 !important; }
.portal-work-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.portal-work-search input:not([type=hidden]) { flex: 1; min-width: 180px; max-width: 600px; padding: 12px 16px; border: 1px solid #dce4ec; border-radius: 10px; font-size: 14px; background: #fff; }
.portal-work-search a { font-size: 13px; color: #007f9e; }
.portal-work-table { overflow-x: auto; }
.portal-work-table th, .portal-work-table td { text-align: left; padding-left: 24px; padding-right: 20px; font-size: 13px; }
.portal-work-table td:not(:first-child) { white-space: nowrap; }
.portal-work-table td:first-child { min-width: 220px; }
.portal-work-table td a { color: #007f9e; }
.portal-work-pagination { display: flex; justify-content: center; align-items: center; gap: 24px; padding: 20px; font-size: 13px; color: #64748b; }
.portal-work-pagination a { color: #007f9e; font-weight: 600; }
.portal-work-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-work-filters a { padding: 7px 12px; font-size: 12px; border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; color: #536779; }
.portal-work-filters a[aria-current] { color: #006d89; background: #eaf7fb; border-color: #b6dde8; }
.portal-launch-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 24px; }
.portal-launch-steps li { display: flex; gap: 10px; color: #64748b; font-size: 12px; }
.portal-launch-steps li > span { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; background: #f1f5f9; border-radius: 50%; font-weight: 600; }
.portal-launch-steps .is-done > span { background: #e0f3f8; color: #007f9e; }
.portal-launch-steps strong { display: block; font-weight: 600; margin-top: 4px; color: #334155; }
.portal-launch-steps small { display: block; margin-top: 5px; line-height: 1.6; }
.portal-launch-next { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; background: #f8fafc; border-top: 1px solid #eef2f6; }
.portal-launch-next strong { font-size: 12px; color: #334155; }
.portal-launch-next p { margin-top: 4px; font-size: 13px; color: #64748b; }
@media (max-width: 1200px) { .portal-supplier-identity { display: none; } }
@media (max-width: 700px) {
  .portal-work-columns, .portal-work-metrics { grid-template-columns: 1fr; }
  .portal-work-metrics { gap: 8px; }
  .portal-work-metrics > * { display: flex; align-items: baseline; gap: 14px; padding: 16px 20px; }
  .portal-work-metrics strong { font-size: 26px; }
  .portal-work-header h1 { font-size: 26px; }
  .portal-work-nav a { padding: 9px 10px; font-size: 12px; }
  .portal-work-action { flex-wrap: wrap; padding: 16px; gap: 8px; }
  .portal-work-section-heading { padding: 20px 16px; }
  .portal-work-preview, .portal-launch-next { align-items: flex-start; flex-direction: column; }
  .portal-week-hero { padding: 24px; gap: 24px; }
  .portal-week-hero strong { font-size: 34px; }
  .portal-week-hero > a { margin-left: 0; }
  .portal-launch-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 16px; }
}
.portal-primary-nav a[aria-current] { background: #ffffff12; color: #fff; }
.portal-mobile-nav-toggle { display: none; }
@media (max-width: 700px) {
  .portal-mobile-nav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px; color: #e2e8f0; font-size: 13px; }
  .portal-primary-nav { display: none; }
  .portal-primary-nav.is-open { position: absolute; display: grid; grid-template-columns: 1fr; top: 49px; left: 0; right: 0; background: #1b1b1b; padding: 12px 16px; border-bottom: 1px solid #334155; box-shadow: 0 12px 20px #0002; }
  .portal-primary-nav.is-open > a { padding: 12px; }
}
.portal-work-preview-wrap { overflow: hidden; border: 1px solid #cfe9f0; border-radius: 16px; background: #fff; }
.portal-work-preview-wrap .portal-work-preview { border: 0; border-radius: 0; }
.portal-work-preview-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-work-preview-actions a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 24px; border-top: 1px solid #eaf0f4; font-size: 13px; color: #24384a; }
.portal-work-preview-actions a:hover { background: #f3fafc; }
.portal-work-preview-actions small { font-size: 11px; color: #007f9e; flex-shrink: 0; }
@media (max-width: 700px) {
  .portal-work-preview-actions { grid-template-columns: 1fr; }
  .portal-work-preview-actions a { flex-wrap: wrap; gap: 4px; }
}
