:root {
  color-scheme: light;
  --navy: #102a40;
  --deep: #0b1f31;
  --muted: #54677a;
  --ink: #152b40;
  --paper: #edf2f6;
  --white: #fff;
  --line: #d7e1e9;
  --gold: #e7b477;
  --gold-deep: #80501b;
  --steel: #44657d;
  --good: #28644f;
  --radius: 11px;
  --side-width: 224px;
  --toolbar-height: 62px;
  --mobile-nav-height: 62px;
  --panel-shadow: 0 1px 2px #162b3f08;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

*,*::before,*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  font-size: 14px;
}

button,input,select,textarea {
  font: inherit;
}

button,select {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid #a96a1c;
  outline-offset: 3px;
}

button:disabled {
  opacity: .56;
  cursor: not-allowed;
}

img {
  max-width: 100%;
}

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

abbr[title] {
  text-decoration: none;
}

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

[hidden] {
  display: none!important;
}

.skip {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 20;
  padding: 10px;
  background: #fff;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.loading {
  padding: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  white-space: nowrap;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

.brand-mark {
  display: grid;
  place-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #b88950;
  border-radius: 9px;
  color: #ffcf92;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 3px #102b43;
}

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

.brand-copy strong {
  font-size: 14px;
  letter-spacing: .014em;
}

.brand-copy small {
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #aec4d5;
}

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

.mast-actions {
  justify-content: flex-end;
}

.org-picker {
  color: #e8eff5;
  background: #132d43;
  border: 1px solid #3b5266;
  border-radius: 8px;
  padding: 7px 10px;
  max-width: min(31vw,280px);
}

.avatar {
  border: 1px solid #528098;
  border-radius: 50%;
  background: #173650;
  color: #fff;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 12px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  white-space: nowrap;
  background: #e8edf1;
  color: #43586a;
  font-size: 11px;
  font-weight: 750;
  padding: 5px 9px;
  line-height: 1.18;
}

.badge.gold {
  background: #f8ebd8;
  color: #79501c;
}

.badge.green {
  background: #e3f1ea;
  color: #245d4b;
}

.badge.blue {
  background: #e3edf6;
  color: #2e546d;
}

.badge.red {
  background: #f8e8e6;
  color: #8b3f33;
}

.badge.preview {
  background: #2a3b4b;
  color: #f4d6ac;
}

.main {
  max-width: 1500px;
  margin: auto;
  padding: 28px clamp(18px,2.45vw,36px) 58px;
  scroll-margin-top: var(--toolbar-height);
}

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

.eyebrow {
  color: #835b32;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .145em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.page-head h1,.landing h1 {
  font-size: clamp(28px,3.05vw,43px);
  letter-spacing: -.045em;
  line-height: 1.1;
  font-weight: 740;
  overflow-wrap: anywhere;
}

.page-head p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 8px;
}

.page-head .action-row {
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 38px;
  border: 1px solid #cdd9e3;
  background: #fff;
  color: #172f43;
  font-size: 13px;
  font-weight: 650;
  border-radius: 7px;
  text-decoration: none;
  white-space: normal;
  text-align: center;
}

.btn:hover {
  background: #f0f6fa;
}

.btn.primary {
  background: #102c43;
  color: #fff;
  border-color: #102c43;
}

.btn.primary:hover {
  background: #1c4868;
}

.btn.gold {
  background: var(--gold);
  border-color: #dbab70;
  color: #2d210f;
}

.btn.gold:hover {
  background: #f0bd7e;
}

.btn.quiet {
  min-height: 34px;
  padding: 5px 9px;
  font-size: 12px;
}

.btn.danger {
  color: #8b3f33;
}

.btn.light {
  background: #203a50;
  border-color: #4b6276;
  color: #fff;
}

.btn.link {
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  padding: 15px 16px;
  min-height: 112px;
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}

.stat>span {
  display: block;
  font-size: 13px;
  font-weight: 630;
  color: var(--muted);
}

.stat strong {
  display: block;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.14;
  margin: 5px 0 4px;
}

.stat small {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.progress {
  height: 5px;
  width: 100%;
  accent-color: #1c4564;
  border: none;
  appearance: none;
  display: block;
  margin-top: 10px;
  background: #e6edf2;
  border-radius: 10px;
  overflow: hidden;
}

.progress::-webkit-progress-bar {
  background: #e6edf2;
}

.progress::-webkit-progress-value {
  background: #1c4564;
}

.progress::-moz-progress-bar {
  background: #1c4564;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0,1.95fr) minmax(295px,1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 17px;
}

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

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  min-width: 0;
  box-shadow: var(--panel-shadow);
}

.panel h2 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.panel h3 {
  font-size: 15px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.panel-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.panel+.panel.full {
  margin-top: 17px;
}

.panel .segment {
  margin-bottom: 12px;
}

.segment {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.segment .btn[aria-pressed=true] {
  background: #e9f0f5;
  border-color: #7090a8;
  color: #102e49;
}

.map-panel {
  padding: 17px;
}

.deck-host {
  min-width: 0;
}

.map-caption {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 11px;
  font-size: 12px;
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #8fa5b7;
}

.legend .gold-dot {
  background: #c38945;
}

.legend .green-dot {
  background: #2c7b62;
}

.legend .red-dot {
  background: #ab594b;
}

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

.list li,.line-item {
  padding: 11px 0;
  border-bottom: 1px solid #edf1f4;
}

.list li:first-child {
  padding-top: 3px;
}

.list li:last-child,.line-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.feed-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: start;
}

.feed-row time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #52677a;
  font-weight: 750;
  padding-top: 2px;
}

.feed-row p {
  font-size: 14px;
}

.feed-row small,.stack small {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.list .split,.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.split>div:first-child,.stack {
  min-width: 0;
  overflow-wrap: anywhere;
}

.text-button {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  color: #214d6a;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}

.data-table th,.data-table td {
  text-align: left;
  border-bottom: 1px solid #eaf0f3;
  padding: 10px 11px;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
}

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

.data-table td:first-child,.data-table th:first-child {
  padding-left: 0;
}

.data-table td:last-child,.data-table th:last-child {
  padding-right: 0;
}

.data-table td .progress {
  width: 92px;
  margin: 2px 0;
}

.empty {
  color: var(--muted);
  border: 1px dashed #cddae4;
  border-radius: 10px;
  padding: 18px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.banner {
  padding: 11px 14px;
  border-radius: 9px;
  background: #f7eddf;
  color: #66451e;
  border: 1px solid #ead9bd;
  margin-bottom: 16px;
  font-size: 13px;
}

.item-select {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fa;
}

.check-list label {
  display: flex;
  gap: 9px;
  align-items: center;
}

.check-list input {
  width: 18px;
  height: 18px;
  accent-color: #173d59;
}

.field-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-gap {
  margin-top: 10px;
}

.section-gap {
  margin-top: 18px;
}

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

.detail-grid>div {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 9px;
  background: #f8fafb;
  overflow-wrap: anywhere;
}

.detail-grid dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.detail-grid dd {
  font-weight: 700;
  margin: 3px 0 0;
}

.landing {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
  align-items: stretch;
  margin: 15px 0;
}

.landing .lead {
  background: radial-gradient(ellipse at 12% 90%,#24465d,transparent 68%),#102b41;
  color: #fff;
  border: 1px solid #25435a;
  padding: clamp(22px,4vw,54px);
  border-radius: var(--radius);
}

.landing .eyebrow {
  color: #f4c68d;
}

.landing p:not(.eyebrow) {
  margin-top: 12px;
}

.landing .lead p:not(.eyebrow) {
  color: #c8d8e5;
}

.auth-panel {
  padding: clamp(20px,4vw,36px);
}

.auth-panel form {
  margin-top: 14px;
}

.form-fields {
  display: grid;
  gap: 12px;
}

.form-fields label {
  display: grid;
  gap: 4px;
  font-weight: 680;
  font-size: 13px;
}

.form-fields input,.form-fields textarea,.form-fields select {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  min-height: 40px;
  color: var(--ink);
  border: 1px solid #c6d4df;
  border-radius: 8px;
  background: #fff;
}

.form-fields textarea {
  resize: vertical;
  min-height: 82px;
}

.form-fields .action-row {
  margin-top: 5px;
}

.form-error {
  color: #8b3026;
  font-size: 13px;
  min-height: 16px;
}

.toast {
  position: fixed;
  z-index: 22;
  bottom: 15px;
  right: 15px;
  padding: 11px 15px;
  background: #102d44;
  color: #fff;
  max-width: min(420px,calc(100vw - 30px));
  border-radius: 9px;
  box-shadow: 0 8px 25px #0a263b3b;
}

.toast.error {
  background: #852f26;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 21px;
  width: min(490px,calc(100vw - 28px));
  max-height: calc(100dvh - 30px);
  color: var(--ink);
  box-shadow: 0 16px 64px #0b263a55;
}

dialog::backdrop {
  background: #091e30a8;
}

dialog h2 {
  font-size: 21px;
  letter-spacing: -.025em;
}

dialog .panel-head {
  align-items: flex-start;
}

.close-btn {
  line-height: 1;
  font-size: 21px;
  padding: 4px 8px;
  min-height: 30px;
}

.qr-layout {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.qr-image {
  width: 184px;
  height: 184px;
  image-rendering: pixelated;
  border: 1px solid var(--line);
}

video.scan-video {
  width: 100%;
  min-height: 120px;
  background: var(--deep);
  border-radius: 8px;
}

@media(max-width:1020px) {
  .main {
    padding-inline: 22px;
  }
  .grid {
    grid-template-columns: minmax(0,1.55fr) minmax(260px,1fr);
  }
}

@media(max-width:730px) {
  .main {
    padding-inline: 15px;
    padding-top: 21px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
  .brand-copy strong {
    white-space: normal;
    font-size: 12px;
  }
  .brand-copy small {
    font-size: 8px;
  }
  .mast-actions {
    gap: 5px;
  }
  .org-picker {
    font-size: 12px;
    max-width: 31vw;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  .page-head .action-row {
    justify-content: flex-start;
  }
  .count-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    margin-bottom: 12px;
  }
  .stat {
    padding: 11px;
    min-height: 94px;
  }
  .stat strong {
    font-size: 25px;
  }
  .grid,.grid.even,.landing {
    grid-template-columns: minmax(0,1fr);
    gap: 11px;
    margin-bottom: 11px;
  }
  .panel {
    padding: 13px;
  }
  .panel+.panel.full {
    margin-top: 11px;
  }
  .detail-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .landing {
    margin-top: 0;
  }
}

.brand {
  text-decoration: none;
}

.page-head .action-row>.item-select {
  width: auto;
  max-width: min(42vw,260px);
}

/* Persistent workspace navigation */
.portal-shell {
  display: grid;
  grid-template-columns: var(--side-width) minmax(0,1fr);
  min-height: 100dvh;
}

.portal-shell.is-access {
  grid-template-columns: minmax(0,1fr);
}

.portal-main {
  min-width: 0;
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
  height: 100dvh;
  min-width: 0;
  padding: 21px 12px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #456075 transparent;
  border-right: 1px solid #2a4052;
  background: linear-gradient(165deg,#122d44 0%,#10273c 41%,#0c2033 88%);
  color: #e1ecf5;
}

.portal-sidebar .brand {
  gap: 10px;
  margin: 0 4px;
  padding: 0 0 17px;
  border-bottom: 1px solid #95aeb82a;
  color: #f5f8fb;
  text-wrap: pretty;
}

.portal-sidebar .brand-mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #18354b;
  box-shadow: none;
  font-size: 21px;
}

.portal-sidebar .brand-copy {
  min-width: 0;
  gap: 1px;
  white-space: normal;
}

.portal-sidebar .brand-copy strong {
  font-size: 13px;
  font-weight: 710;
  line-height: 1.24;
  letter-spacing: -.009em;
}

.portal-sidebar .brand-copy small {
  color: #adc1d1;
  font-size: 9px;
  letter-spacing: .13em;
}

.side-group {
  min-width: 0;
}

.side-group-label {
  margin: 0 9px 6px;
  color: #a4b8ca;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .115em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 17px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.portal-sidebar .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #d0e0ec;
  font-size: 12px;
  font-weight: 590;
  line-height: 1.3;
  text-decoration: none;
}

.side-group .nav-link + .nav-link {
  margin-top: 2px;
}

.portal-sidebar .nav-link:hover {
  background: #ffffff0a;
  color: #fff;
}

.portal-sidebar .nav-link[aria-current="page"] {
  border-color: #9bb7cb32;
  background: #223e56;
  color: #fbf8f3;
  font-weight: 690;
}

.portal-sidebar .nav-link[aria-current="page"]::before {
  position: absolute;
  left: -2px;
  width: 2px;
  height: 16px;
  border-radius: 4px;
  background: var(--gold);
  content: '';
}

.nav-icon,
.stat-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
}

.nav-icon {
  position: relative;
  font: 600 17px/1 'Segoe UI Symbol',sans-serif;
}

.nav-icon[data-icon="field"],
.nav-icon[data-icon="team"] {
  font-size: 0;
}

.nav-icon[data-icon="field"]::before {
  position: absolute;
  inset: 3px;
  border: 1.5px dashed currentColor;
  border-radius: 2px;
  content: '';
}

.nav-icon[data-icon="field"]::after,
.nav-icon[data-icon="team"]::before {
  position: absolute;
  inset: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: '';
}

.nav-icon[data-icon="team"]::before {
  inset: 2px 6px 10px;
}

.nav-icon[data-icon="team"]::after {
  position: absolute;
  inset: 9px 3px 3px;
  border: 1px solid currentColor;
  border-radius: 6px 6px 2px 2px;
  content: '';
}

.portal-sidebar .nav-icon {
  color: #a9c0d2;
}

.portal-sidebar [aria-current="page"] .nav-icon {
  color: var(--gold);
}

.nav-icon svg,
.stat-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-foot {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 13px 7px 0;
  border-top: 1px solid #95aeb82a;
  color: #abbfd0;
  font-size: 11px;
}

.sidebar-foot small {
  color: #abbfd0;
}

.sidebar-foot strong {
  color: #dfebf4;
  font-weight: 630;
  overflow-wrap: anywhere;
}

.sidebar-foot-label {
  font-size: 10px;
  letter-spacing: .04em;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: var(--toolbar-height);
  padding: 7px clamp(18px,2.45vw,36px);
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.portal-shell:not(.is-access) .topbar-brand {
  display: none;
}

.topbar-brand .brand-mark {
  width: 34px;
  height: 34px;
  background: #152e44;
  box-shadow: none;
  font-size: 20px;
}

.topbar-brand .brand-copy small {
  color: #687d90;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
}

.topbar-context a {
  color: var(--muted);
  text-decoration: none;
}

.topbar-context a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar-context strong,
.topbar-context [aria-current] {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-topbar .mast-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
}

.portal-topbar .org-picker {
  min-height: 34px;
  max-width: min(28vw,230px);
  padding-block: 5px;
  border-color: #d3dfe8;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.portal-topbar .avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #a8c0d1;
  background: #e2edf6;
  color: #1c4060;
}

.portal-topbar .badge.preview {
  background: #f5ebdc;
  color: #785423;
}

.portal-mobile-nav,
.portal-mobile-menu {
  display: none;
}

/* Overview and status reporting */
.overview-head {
  position: relative;
  isolation: isolate;
  margin-bottom: 16px;
  padding: 19px 21px 20px;
  border: 1px solid #23465f;
  border-radius: var(--radius);
  background: linear-gradient(110deg,#112b43 10%,#193b54 66%,#21485d);
  color: #f1f6fb;
}

.overview-head::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(to right,#d3e4ef12 1px,transparent 1px),
    linear-gradient(to bottom,#d3e4ef12 1px,transparent 1px);
  background-size: 23px 23px;
  mask-image: linear-gradient(100deg,transparent 27%,#0009 79%,#000);
  pointer-events: none;
  content: '';
}

.overview-head .eyebrow {
  margin-bottom: 5px;
  color: #ffd6a3;
}

.overview-head p:not(.eyebrow) {
  margin-top: 6px;
  color: #d3e1ec;
}

.overview-head .vessel-identifier,
.overview-head h1 .muted {
  color: #bed0e1;
  font-size: .56em;
  font-weight: 640;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.overview-head .btn.quiet,
.overview-head .item-select {
  min-height: 36px;
  border-color: #8eaec08f;
  background: #223f57;
  color: #eef5fb;
}

.overview-head .btn.quiet:hover {
  background: #335670;
}

.overview-head .btn.primary {
  border-color: #ddaa70;
  background: var(--gold);
  color: #182a39;
}

.overview-head .btn.primary:hover {
  background: #f1c794;
}

.overview-metrics .stat {
  min-width: 0;
  min-height: 119px;
}

.overview-metrics .stat-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.overview-metrics .stat-link:hover {
  border-color: #9cb4c8;
  background: #fcfdff;
}

.stat .stat-kicker {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 25px;
}

.stat .stat-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  padding: 3px;
  border-radius: 6px;
  background: #e6eff6;
  color: #35617e;
}

.stat-icon .nav-icon {
  width: 16px;
  height: 16px;
  font-size: 14px;
}

.stat:nth-child(3) .stat-icon {
  background: #faeedf;
  color: #87591f;
}

.stat .stat-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: #335e7a;
  font-size: 11px;
  font-weight: 650;
}

.stat-total {
  margin-left: 2px;
  color: #65798d;
  font-size: .61em;
  font-weight: 620;
  letter-spacing: -.02em;
}

.overview-metrics .stat strong {
  margin-block: 6px 4px;
}

.overview-grid {
  grid-template-columns: minmax(0,1.82fr) minmax(260px,1fr);
  align-items: start;
}

.overview-rail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.overview-rail .panel-head,
.map-panel .panel-head {
  margin-bottom: 13px;
}

.overview-priority .list li,
.overview-rail .activity-panel .list li {
  padding-block: 9px;
}

.overview-rail .list li:first-child {
  padding-top: 1px;
}

.overview-rail .list li:last-child {
  padding-bottom: 0;
}

.overview-rail .feed-row {
  grid-template-columns: minmax(44px,auto) minmax(0,1fr);
  gap: 8px;
}

.overview-rail .feed-row p {
  font-size: 12px;
  line-height: 1.32;
}

.overview-rail .feed-row time,
.overview-rail .feed-row small {
  font-size: 11px;
}

.overview-rail .feed-row small {
  line-height: 1.25;
}

.overview-priority .badge {
  margin-left: auto;
}

.priority-row .stack a,
.alteration-name {
  color: #204963;
  font-weight: 670;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.map-panel .segment {
  gap: 4px;
}

.map-panel .segment .btn[aria-pressed="true"] {
  border-color: #e4c49c;
  background: #fcf0e1;
  color: #77501f;
}

.map-panel .map-caption {
  font-size: 11px;
}

.map-panel .map-caption > span:last-child {
  white-space: nowrap;
}

.map-panel .line-item {
  align-items: center;
  margin-top: 12px;
  padding: 11px 0 0;
  border-top: 1px solid var(--line);
}

.deck-tabs {
  min-width: 0;
}

.deck-selection .stack strong {
  color: #203b51;
}

.overview-alterations .data-table th {
  background: #f2f7fa;
}

.overview-alterations .data-table th:first-child,
.overview-alterations .data-table td:first-child {
  padding-left: 9px;
}

.data-table tbody tr:hover td {
  background: #f8fbfd;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.space-primary,
.space-aside {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.space-primary > .panel,
.space-aside > .section-gap,
.space-aside > .panel {
  margin-top: 0;
}

.space-meta > div {
  padding: 12px;
  background: #fcfdfe;
  box-shadow: var(--panel-shadow);
}

.closeout-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(91px,1fr));
  gap: 6px;
  padding: 0;
  margin: 0 0 13px;
  list-style: none;
}

.closeout-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 45px;
  padding: 5px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  background: #f7f9fb;
  color: #506578;
  font-size: 11px;
  line-height: 1.2;
}

.closeout-stage > span:first-child {
  display: inline-grid;
  flex: 0 0 19px;
  place-items: center;
  height: 19px;
  border-radius: 50%;
  background: #e7eef3;
  color: #41586c;
  font-size: 10px;
  font-weight: 720;
}

.closeout-stage strong {
  font-weight: 660;
  overflow-wrap: anywhere;
}

.closeout-stage.is-complete {
  border-color: #cfe1dc;
  background: #f1f8f5;
  color: #355f54;
}

.closeout-stage.is-complete > span:first-child {
  background: #dceee6;
  color: #2d6954;
}

.closeout-stage.is-current {
  border-color: #dab98e;
  background: #fff2e1;
  color: #754b1c;
}

.closeout-stage.is-current > span:first-child {
  background: #f2d4ad;
  color: #663d11;
}

.space-layout.is-field .closeout-progress {
  margin-bottom: 10px;
}

.issue-log .issue-trigger {
  text-decoration-thickness: 1px;
}

.issue-log .issue-trigger:hover {
  color: #122f48;
}

.report-row,
.report-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.report-row {
  justify-content: space-between;
}

.report-icon {
  display: inline-grid;
  flex: 0 0 32px;
  place-items: center;
  height: 32px;
  border-radius: 7px;
  background: #eaf1f7;
  color: #2d5979;
}

.report-summary-list a {
  display: grid;
  grid-template-columns: 33px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  color: #264962;
  text-decoration: none;
}

.report-summary-list a:hover > span:first-of-type {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-summary-list a > strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

@media(max-width:1170px) {
  :root { --side-width: 204px; }

  .portal-sidebar { padding-inline: 10px; }
  .overview-grid { grid-template-columns: minmax(0,1.55fr) minmax(250px,1fr); }
}

@media(min-width:720px) and (max-width:1030px) {
  :root { --side-width: 70px; }

  .portal-sidebar {
    gap: 16px;
    padding: 16px 9px 12px;
  }

  .portal-sidebar .brand {
    justify-content: center;
    margin-inline: 0;
    padding-bottom: 13px;
  }

  .portal-sidebar .brand-copy,
  .side-group-label,
  .portal-sidebar .nav-label,
  .sidebar-foot {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .portal-sidebar .nav-link {
    justify-content: center;
    min-height: 43px;
    padding-inline: 4px;
  }

  .portal-sidebar .nav-icon {
    width: 19px;
    height: 19px;
  }
}

@media(max-width:890px) {
  .overview-grid { grid-template-columns: minmax(0,1fr); }
  .overview-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media(max-width:719px) {
  .portal-shell { display: block; }
  .portal-sidebar { display: none; }

  .portal-shell:not(.is-access) .topbar-brand { display: flex; }
  .portal-shell:not(.is-access) .topbar-brand .brand-copy { display: none; }

  .portal-topbar {
    min-height: 56px;
    padding-inline: 14px;
  }

  .topbar-context { flex: 1; gap: 5px; }
  .portal-topbar .org-picker { max-width: min(32vw,185px); min-height: 40px; }
  .portal-topbar .avatar { width: 37px; height: 37px; }
  .portal-topbar .mast-actions .preview {
    display: inline-flex;
    padding: 4px 6px;
    font-size: 10px;
  }

  .portal-shell:has(.portal-mobile-nav) .main {
    padding-bottom: calc(var(--mobile-nav-height) + 24px + env(safe-area-inset-bottom));
  }

  .portal-mobile-nav {
    position: fixed;
    z-index: 12;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: stretch;
    gap: 3px;
    min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid #385269;
    background: #112a41;
    color: #dce9f3;
    box-shadow: 0 -2px 12px #0d233b1a;
  }

  .portal-mobile-nav > nav {
    display: flex;
    flex: 1;
    min-width: 0;
  }

  .portal-mobile-nav > a,
  .portal-mobile-nav > nav > a,
  .portal-mobile-menu > summary {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 45px;
    min-height: 48px;
    padding: 5px 3px;
    border-radius: 6px;
    color: inherit;
    font-size: 10px;
    font-weight: 640;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
  }

  .portal-mobile-nav a[aria-current="page"],
  .portal-mobile-menu[open] > summary {
    background: #244057;
    color: #ffdaad;
  }

  .portal-mobile-menu {
    position: relative;
    display: block;
    flex: 1;
  }

  .portal-mobile-menu > summary { cursor: pointer; list-style: none; }
  .portal-mobile-menu > summary::-webkit-details-marker { display: none; }

  .portal-mobile-menu > :not(summary) {
    position: absolute;
    right: 3px;
    bottom: calc(100% + 8px);
    display: grid;
    gap: 2px;
    width: min(245px,calc(100vw - 16px));
    padding: 7px;
    border: 1px solid #385269;
    border-radius: 8px;
    background: #132f47;
    color: #ebf3fa;
    box-shadow: 0 8px 24px #0d233b35;
  }

  .portal-mobile-menu:not([open]) > :not(summary) { display: none; }

  .portal-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
  }

  body:has(.portal-mobile-nav) .toast {
    bottom: calc(var(--mobile-nav-height) + 13px + env(safe-area-inset-bottom));
  }

  .overview-metrics .stat { min-height: 104px; }
  .overview-head { padding: 15px; }
  .overview-rail { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .space-primary,.space-aside { gap: 11px; }
  .closeout-progress { grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); }
  .page-head .action-row > .item-select { max-width: min(44vw,260px); }
  .btn,.btn.quiet { min-height: 42px; }
  .segment .btn { min-height: 39px; }
  dialog .close-btn { min-width: 39px; min-height: 39px; }
  .form-fields input,.form-fields textarea,.form-fields select { font-size: 16px; }
}

@media(max-width:400px) {
  .portal-topbar { gap: 7px; }
  .topbar-context > span { display: none; }
  .stat .stat-icon { width: 23px; height: 23px; }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto!important; }
}

@media print {
  body:has(#field-qr) #app,body:has(#field-qr) #toast,dialog:has(#field-qr) .btn,dialog:has(#field-qr) .form-fields>label {
    display: none!important;
  }
  dialog:has(#field-qr) {
    position: static;
    display: block;
    margin: 0;
    max-height: none;
    box-shadow: none;
    border: 0;
  }
  dialog:has(#field-qr)::backdrop {
    display: none;
  }
}

.org-context {
  max-width: 14rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.space-tools { margin-top: .75rem; }
.space-tools > summary { width: fit-content; cursor: pointer; }
.space-tools > .field-actions { margin-top: .55rem; }
@media (max-width: 720px) { .org-context { display: none; } }

.microsoft-auth {
  display: grid;
  gap: .45rem;
  margin-top: .85rem;
}

.portal-topbar .language-toggle {
  flex: 0 0 auto;
  min-height: 40px;
  padding-inline: 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}

@media (max-width: 375px) {
  .portal-topbar .mast-actions { gap: 4px; }
  .portal-topbar .language-toggle { padding-inline: 7px; }
}
.microsoft-button { min-height: 2.9rem; justify-content: center; }
.microsoft-button:disabled { cursor: default; }
.microsoft-mark {
  display: inline-grid;
  flex: none;
  grid-template-columns: repeat(2, .38rem);
  gap: .09rem;
  margin-right: .32rem;
}
.microsoft-mark i { height: .38rem; background: currentColor; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .4rem 0 .65rem;
  color: var(--muted);
  font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
  flex: 1;
  height: 1px;
  background-color: var(--line);
  content: '';
}
