:root {
  --navy: #071f35;
  --navy-2: #0e304f;
  --ink: #092036;
  --steel: #526981;
  --muted: #6f7f8f;
  --gold: #d1aa47;
  --gold-soft: #f3e8cc;
  --cream: #f5f1e8;
  --white: #ffffff;
  --paper: #fffdfa;
  --mist: #e8edf2;
  --line: rgba(9, 32, 54, 0.13);
  --line-strong: rgba(9, 32, 54, 0.22);
  --green: #2f5f4d;
  --red: #9b3a34;
  --shadow: 0 28px 80px rgba(7, 31, 53, 0.24);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --sys-bridge-ui-scale: 0.9;
  --sys-bridge-ui-scaled-width: 111.111111vw;
  --sys-bridge-ui-scaled-height: 111.111111vh;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(7, 31, 53, 0.92), rgba(7, 31, 53, 0.78)),
    url("../assets/images/home-hero.jpg") center / cover fixed;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

body[data-drawer-open="true"] {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-shell {
  width: min(100% - 40px, 1480px);
  margin: 32px auto;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 64px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 22px;
  align-items: stretch;
}

.login-panel,
.login-aside,
.sheet-card {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 253, 250, 0.96);
  box-shadow: var(--shadow);
}

.login-panel,
.login-aside {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 56px);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 31, 53, 0.1), rgba(7, 31, 53, 0.82)),
    url("../assets/images/deck-hero.jpg") center / cover;
}

.brand-row,
.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(209, 170, 71, 0.72);
  border-radius: 16px;
  background: var(--navy);
  padding: 8px;
}

.eyebrow,
.mini-label {
  margin: 0 0 8px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-aside .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.login-aside h2,
.login-aside p,
.login-aside li {
  color: #fff;
}

.login-panel h1 {
  font-size: clamp(42px, 8vw, 84px);
}

.login-aside h2 {
  max-width: 560px;
  font-size: clamp(36px, 6vw, 78px);
}

.login-copy {
  max-width: 720px;
  margin: 30px 0;
  color: var(--steel);
  font-size: 20px;
}

.login-form {
  display: grid;
  max-width: 620px;
  gap: 16px;
}

.login-form label,
.toolbar label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  color-scheme: light;
  outline: none;
}

select option,
select optgroup,
datalist option {
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 52px;
  padding: 0 14px;
}

textarea {
  min-height: 118px;
  resize: vertical;
  padding: 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(209, 170, 71, 0.18);
}

.primary-button,
.ghost-button,
.secondary-button,
.close-button,
.table-link,
.save-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button,
.save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.danger-button {
  min-height: 52px;
  padding: 0 22px;
  background: rgba(155, 58, 52, 0.1);
  color: var(--red);
  border: 1px solid rgba(155, 58, 52, 0.28);
}

.danger-button--compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.login-security-note {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--steel);
  font-size: 14px;
  font-weight: 800;
}

.login-transition {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(209, 170, 71, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(7, 31, 53, 0.98), rgba(9, 48, 80, 0.96));
  color: #fff;
}

.login-transition .eyebrow {
  color: var(--gold);
}

.login-transition h2 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(38px, 7vw, 88px);
}

.login-transition p:last-child {
  max-width: 560px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
}

.bridge-loader {
  position: relative;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(209, 170, 71, 0.38);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.bridge-loader::before,
.bridge-loader::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.bridge-loader::after {
  border-color: transparent;
  border-top-color: var(--gold);
  animation: bridge-spin 900ms linear infinite;
}

.bridge-loader span {
  position: absolute;
  top: 50%;
  left: 26px;
  width: 80px;
  height: 2px;
  background: var(--gold);
  transform-origin: center;
  animation: bridge-pulse 1.2s ease-in-out infinite;
}

.bridge-loader span:nth-child(2) {
  transform: rotate(60deg);
  animation-delay: 120ms;
}

.bridge-loader span:nth-child(3) {
  transform: rotate(-60deg);
  animation-delay: 240ms;
}

@keyframes bridge-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bridge-pulse {
  0%,
  100% {
    opacity: 0.32;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bridge-loader::after,
  .bridge-loader span {
    animation: none;
  }
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-left: 22px;
  position: relative;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(245, 241, 232, 0.95);
  box-shadow: none;
  transition: grid-template-columns 180ms ease;
}

@media (min-width: 1081px) {
  .app-shell {
    width: var(--sys-bridge-ui-scaled-width);
    min-height: var(--sys-bridge-ui-scaled-height);
    zoom: var(--sys-bridge-ui-scale);
  }
}

@media print {
  .app-shell {
    width: 100%;
    min-height: auto;
    zoom: 1;
  }
}

.app-shell[data-sidebar-collapsed="true"] {
  grid-template-columns: 86px minmax(0, 1fr);
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px 18px;
  overflow: visible;
  padding: 12px clamp(16px, 1.5vw, 24px);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  background: var(--navy);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 260px;
  min-width: 210px;
  color: #fff;
  text-decoration: none;
}

.topbar-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(209, 170, 71, 0.7);
  border-radius: 14px;
  padding: 9px;
}

.brand-link strong,
.brand-link small {
  display: block;
}

.brand-link strong {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-link small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.user-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: none;
  overflow: visible;
  padding: 2px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.user-nav .ghost-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 clamp(12px, 1.1vw, 18px);
  white-space: nowrap;
}

.project-switcher {
  display: grid;
  gap: 5px;
  flex: 0 1 220px;
  width: min(220px, 100%);
  min-width: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-switcher select {
  width: 100%;
  min-width: 140px;
  max-width: 100%;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.project-switcher select:disabled {
  opacity: 0.82;
}

.user-chip,
.status-pill,
.locked-pill,
.quote-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 900;
}

.user-chip {
  min-height: 42px;
  padding: 0 14px;
  background: rgba(209, 170, 71, 0.15);
  color: #fff;
}

.save-status-indicator {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  flex: 0 0 164px;
  min-height: 38px;
  min-width: 144px;
  max-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  overflow: visible;
  padding: 6px 12px;
}

.save-status-indicator[hidden] {
  display: none;
}

.save-status-indicator::before {
  content: "";
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.save-status-indicator[data-save-state="saved"]::before {
  background: #48a56d;
}

.save-status-indicator[data-save-state="saving"]::before,
.save-status-indicator[data-save-state="pending"]::before {
  background: var(--gold);
  animation: save-status-pulse 1s ease-in-out infinite;
}

.save-status-indicator[data-save-state="stale"]::before,
.save-status-indicator[data-save-state="error"]::before {
  background: var(--red);
}

.save-status-indicator span,
.save-status-indicator small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-status-indicator span {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
}

.save-status-indicator small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }

  .brand-link {
    flex: 1 1 100%;
    max-width: none;
  }

  .user-nav {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .project-switcher {
    flex: 1 1 190px;
    width: auto;
    max-width: 260px;
  }

  .save-status-indicator {
    flex: 0 1 174px;
  }
}

@keyframes save-status-pulse {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  min-height: 38px;
  min-width: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  overflow: visible;
  padding: 0;
}

.notification-bell__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.notification-bell__icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell:hover,
.notification-bell:focus-visible,
.notification-bell[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
}

.stale-session-banner {
  position: fixed;
  top: 86px;
  left: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(164, 55, 55, 0.22);
  border-left: 6px solid var(--red);
  border-radius: 20px;
  background: rgba(255, 253, 250, 0.98);
  box-shadow: 0 24px 70px rgba(7, 31, 53, 0.22);
  padding: 16px 18px;
}

.stale-session-banner[hidden] {
  display: none;
}

.stale-session-banner strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.stale-session-banner p {
  margin: 4px 0 0;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
}

.stale-session-banner .primary-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding-inline: 22px;
}

.bridge-mate-toggle {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 84;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  min-height: 72px;
  padding: 7px;
  border: 3px solid var(--gold);
  border-radius: 24px;
  background: rgba(7, 31, 53, 0.94);
  color: #fff;
  box-shadow: 0 22px 44px rgba(7, 31, 53, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.bridge-mate-toggle__icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 17px;
  background: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(209, 170, 71, 0.22), 0 8px 18px rgba(7, 31, 53, 0.22);
}

.bridge-mate-toggle__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bridge-mate-toggle strong {
  font-size: 13px;
  letter-spacing: 0;
}

.bridge-mate-toggle:hover,
.bridge-mate-toggle:focus-visible,
.bridge-mate-toggle.is-active {
  border-color: #dfbb5b;
  background: var(--navy-2);
  color: #fff;
  transform: translateY(-1px);
}

.notification-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.notification-panel {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 80;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.98);
  box-shadow: 0 30px 90px rgba(7, 31, 53, 0.32);
  padding: 20px;
}

.bridge-mate-panel {
  position: fixed;
  right: 22px;
  bottom: 112px;
  z-index: 82;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  width: min(620px, calc(100vw - 32px));
  max-height: min(740px, calc(100vh - 136px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.99);
  box-shadow: 0 30px 90px rgba(7, 31, 53, 0.32);
  padding: 12px;
}

.bridge-mate-panel[hidden] {
  display: none;
}

.bridge-mate-panel__heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  padding: 10px;
}

.bridge-mate-panel__heading h2 {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.bridge-mate-panel__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: #05182a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.bridge-mate-panel__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bridge-mate-panel__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin: 0 0 4px;
  border-radius: 999px;
  background: rgba(212, 173, 63, 0.18);
  color: var(--gold);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.bridge-mate-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.bridge-mate-panel__intro,
.bridge-mate-caution,
.bridge-mate-status {
  margin: 0;
  color: var(--steel);
  line-height: 1.4;
}

.bridge-mate-caution {
  border: 1px solid rgba(212, 173, 63, 0.28);
  border-radius: 14px;
  background: rgba(212, 173, 63, 0.08);
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
}

.bridge-mate-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bridge-mate-prompts button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.7);
  color: var(--ink);
  padding: 7px 12px;
  font-weight: 900;
}

.bridge-mate-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 8px;
}

.bridge-mate-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(238, 242, 246, 0.78);
  padding: 3px;
}

.bridge-mate-mode button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--steel);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
}

.bridge-mate-mode button.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 31, 53, 0.14);
}

.bridge-mate-file-context {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 32px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: var(--mist);
  padding: 8px 9px 8px 10px;
}

.bridge-mate-file-context[hidden] {
  display: none;
}

.bridge-mate-file-context__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 173, 63, 0.34);
  border-radius: 10px;
  background: rgba(212, 173, 63, 0.16);
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bridge-mate-file-context__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.bridge-mate-file-context__copy small {
  color: var(--steel);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bridge-mate-file-context__copy strong,
.bridge-mate-file-context__copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-mate-file-context__copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.bridge-mate-file-context__copy span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
}

.bridge-mate-file-context__open,
.bridge-mate-file-context__remove {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.bridge-mate-file-context__open {
  min-width: 54px;
  padding: 0 10px;
}

.bridge-mate-file-context__remove {
  width: 32px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
}

.bridge-mate-file-context__open:hover,
.bridge-mate-file-context__open:focus-visible,
.bridge-mate-file-context__remove:hover,
.bridge-mate-file-context__remove:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.upload-progress-toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(9, 32, 54, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.98);
  box-shadow: 0 18px 46px rgba(7, 31, 53, 0.22);
  padding: 14px;
}

.upload-progress-toast[hidden] {
  display: none;
}

.upload-progress-toast__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--ink);
}

.upload-progress-toast__head strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.upload-progress-toast__head span {
  flex: 0 0 auto;
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

.upload-progress-toast p {
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload-progress-toast__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(9, 32, 54, 0.1);
}

.upload-progress-toast__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d7a73e, #f0c76b);
  transition: width 0.18s ease;
}

.upload-progress-toast.is-indeterminate .upload-progress-toast__track span {
  width: 42% !important;
  animation: upload-progress-sweep 1.2s ease-in-out infinite;
}

@keyframes upload-progress-sweep {
  0% {
    transform: translateX(-110%);
  }
  55% {
    transform: translateX(85%);
  }
  100% {
    transform: translateX(260%);
  }
}

.bridge-mate-form label {
  display: block;
  min-width: 0;
}

.bridge-mate-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 118px;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 10px 8px;
  resize: vertical;
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.bridge-mate-send {
  align-self: stretch;
  min-width: 74px;
  border: 0;
  border-radius: 14px;
  background: var(--gold);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(212, 173, 63, 0.26);
}

.bridge-mate-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(238, 242, 246, 0.78);
  padding: 4px;
}

.bridge-mate-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--steel);
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 900;
}

.bridge-mate-tabs button.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 20px rgba(7, 31, 53, 0.14);
}

.bridge-mate-tab-panel {
  display: none;
  min-height: 0;
}

.bridge-mate-tab-panel.is-active {
  display: grid;
  gap: 10px;
}

.bridge-mate-answer {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.bridge-mate-answer p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
  white-space: pre-line;
}

.bridge-mate-answer p + p {
  margin-top: 12px;
}

.bridge-mate-answer-feedback {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.bridge-mate-answer-feedback__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bridge-mate-answer-feedback__head > p,
.bridge-mate-answer-feedback.is-complete > p {
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.bridge-mate-answer-feedback__choices,
.bridge-mate-answer-feedback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bridge-mate-answer-feedback button {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--steel);
  padding: 5px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.bridge-mate-answer-feedback button:hover,
.bridge-mate-answer-feedback button:focus-visible,
.bridge-mate-answer-feedback button[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(212, 173, 63, 0.11);
  color: var(--ink);
  outline: none;
}

.bridge-mate-answer-feedback__form {
  display: grid;
  gap: 7px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}

.bridge-mate-answer-feedback__form[hidden] {
  display: none;
}

.bridge-mate-answer-feedback__form label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
}

.bridge-mate-answer-feedback__form textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 150px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  resize: vertical;
  text-transform: none;
}

.bridge-mate-answer-feedback__actions button[type="submit"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.bridge-mate-answer-feedback__status {
  min-height: 0;
  margin: 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.bridge-mate-answer-feedback__status:empty {
  display: none;
}

.bridge-mate-answer-feedback__status.is-error {
  color: var(--red);
}

.bridge-mate-answer-feedback.is-complete {
  gap: 0;
}

.bridge-mate-sources {
  display: grid;
  gap: 8px;
}

.bridge-mate-source-list {
  display: grid;
  gap: 8px;
}

.bridge-mate-source {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  padding: 10px;
}

.bridge-mate-source__icon {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(212, 173, 63, 0.95), rgba(236, 206, 123, 0.78)),
    var(--gold);
  box-shadow: inset 0 -8px 12px rgba(7, 31, 53, 0.1);
}

.bridge-mate-source small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bridge-mate-source strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.bridge-mate-source p {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.35;
}

.bridge-mate-source .inline-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 31, 53, 0.08);
  color: var(--steel);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
}

.bridge-mate-suggestions,
.bridge-mate-suggestion-list {
  display: grid;
  gap: 10px;
}

.bridge-mate-suggestion-heading,
.bridge-mate-suggestion__top,
.bridge-mate-suggestion__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.bridge-mate-suggestion-heading strong,
.bridge-mate-suggestion__top strong {
  color: var(--ink);
  font-weight: 950;
}

.bridge-mate-suggestion-heading span,
.bridge-mate-suggestion__top small,
.bridge-mate-suggestion__record small {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.bridge-mate-suggestion {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(212, 173, 63, 0.36);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 252, 242, 0.98), #fff);
  padding: 12px;
}

.bridge-mate-suggestion p {
  margin: 0;
  color: var(--steel);
  line-height: 1.38;
}

.bridge-mate-suggestion__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bridge-mate-suggestion__grid label,
.bridge-mate-suggestion__records summary {
  display: grid;
  gap: 5px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.bridge-mate-suggestion__grid input,
.bridge-mate-suggestion__grid select,
.bridge-mate-suggestion__grid textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.bridge-mate-suggestion__grid textarea {
  min-height: 76px;
  resize: vertical;
}

.bridge-mate-suggestion__evidence input[type="file"] {
  padding: 7px;
}

.bridge-mate-suggestion__evidence input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 9px;
  background: var(--mist);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.bridge-mate-suggestion__evidence small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-transform: none;
}

.bridge-mate-suggestion__records {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(238, 242, 246, 0.72);
  padding: 10px;
}

.bridge-mate-suggestion__records summary {
  cursor: pointer;
}

.bridge-mate-suggestion__records > div {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.bridge-mate-suggestion__record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.bridge-mate-suggestion__local-note {
  border-left: 3px solid var(--accent);
  background: rgba(216, 173, 66, 0.1);
  padding: 8px 10px;
  color: var(--muted) !important;
  font-weight: 800;
}

.bridge-mate-suggestion__warning {
  border-left: 3px solid #b73d3d;
  background: rgba(183, 61, 61, 0.08);
  padding: 8px 10px;
  color: #8f2f2f !important;
  font-weight: 850;
}

.bridge-mate-suggestion__confirm {
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 14px;
}

.notification-panel__heading,
.notification-panel__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-panel__heading h2 {
  font-size: 30px;
}

.notification-panel__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 12px;
}

.notification-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 900;
  padding: 8px 12px;
}

.notification-filter.is-active {
  background: var(--navy);
  color: #fff;
}

.notification-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--steel);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.88);
  padding: 14px;
}

.notification-item.is-unread {
  background: #fff;
  border-left-color: var(--gold);
}

.notification-item--urgent {
  border-left-color: var(--red);
}

.notification-item--action {
  border-left-color: var(--gold);
}

.notification-item h3 {
  margin: 4px 0;
  font-size: 17px;
  letter-spacing: 0;
}

.notification-item p {
  margin: 0;
  color: var(--steel);
  line-height: 1.35;
}

.notification-item small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
}

.notification-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notification-item__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, 0.75fr)) minmax(max-content, auto);
  gap: 14px;
  align-items: end;
  margin: 26px 20px 20px;
}

.toolbar > * {
  min-width: 0;
}

.toolbar > .primary-button {
  justify-self: end;
  white-space: nowrap;
}

.view-tabs {
  grid-column: 1;
  grid-row: 2 / span 2;
  display: grid;
  gap: 12px;
  align-self: start;
  height: calc(100vh - 132px);
  max-height: calc(100vh - 132px);
  margin: 0 0 28px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.7);
  box-shadow: 0 18px 42px rgba(9, 32, 54, 0.08);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sidebar-heading span,
.nav-group summary {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-heading strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
}

.sidebar-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.nav-group {
  display: block;
  min-width: 0;
  border: 1px solid rgba(9, 32, 54, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  overflow: visible;
}

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 13px 14px;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "+";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
}

.nav-group[open] summary::after {
  content: "-";
}

.nav-subsections {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 0 10px 12px;
}

.view-tab {
  --nav-icon: none;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--steel);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
  text-align: left;
  white-space: nowrap;
}

.view-tab[data-view="home"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/home.svg");
}

.view-tab[data-view="yard"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/shipyard.svg");
}

.view-tab[data-view="worklist"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/worklist.svg");
}

.view-tab[data-view="defects"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/defects.svg");
}

.view-tab[data-view="planner"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/planner.svg");
}

.view-tab[data-view="history"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/history.svg");
}

.view-tab[data-view="vesselDetails"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/vessel.svg");
}

.view-tab[data-view="systemsEquipment"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/systems.svg");
}

.view-tab[data-view="inventory"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/inventory.svg");
}

.view-tab[data-view="yachtAtlas"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/atlas.svg");
}

.view-tab[data-view="files"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/files.svg");
}

.view-tab[data-view="ism"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/ism.svg");
}

.view-tab[data-view="logbooks"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/logbooks.svg");
}

.view-tab[data-view="medkits"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/medkits.svg");
}

.view-tab[data-view="galley"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/galley.svg");
}

.view-tab[data-view="crew"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/crew.svg");
}

.view-tab[data-view="guests"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/guests.svg");
}

.view-tab[data-view="accounting"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/accounting.svg");
}

.view-tab[data-view="crm"] {
  --nav-icon: url("../assets/icons/sys-bridge-sidebar/crm.svg");
}

.view-tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.app-shell[data-sidebar-collapsed="true"] .view-tabs {
  margin-right: 0;
  padding: 12px;
}

.app-shell[data-sidebar-collapsed="true"] .sidebar-heading > div,
.app-shell[data-sidebar-collapsed="true"] .nav-group summary {
  display: none;
}

.app-shell[data-sidebar-collapsed="true"] .sidebar-heading {
  justify-content: center;
  padding: 0 0 10px;
}

.app-shell[data-sidebar-collapsed="true"] .nav-group {
  border: 0;
  background: transparent;
}

.app-shell[data-sidebar-collapsed="true"] .nav-subsections {
  margin-top: 0;
  padding: 0;
}

.app-shell[data-sidebar-collapsed="true"] .view-tab {
  justify-content: center;
  min-height: 48px;
  padding: 0;
  overflow: hidden;
  font-size: 0;
}

.app-shell[data-sidebar-collapsed="true"] .view-tab::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.sheet-actions .ghost-button {
  min-height: 52px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.add-menu {
  position: relative;
}

.add-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  text-align: center;
}

.add-menu summary::-webkit-details-marker {
  display: none;
}

.add-menu__panel {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(9, 32, 54, 0.16);
}

.add-menu__panel button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.history-actions {
  align-items: end;
}

.history-source-control {
  display: grid;
  min-width: 190px;
  gap: 6px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-source-control select {
  min-height: 44px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.import-status {
  min-height: 24px;
  margin: -6px 28px 18px;
  color: var(--steel);
  font-weight: 800;
}

.inventory-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0 28px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.78);
  box-shadow: 0 16px 34px rgba(9, 32, 54, 0.06);
}

.inventory-filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-filter-panel input,
.inventory-filter-panel select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.inventory-filter-panel .ghost-button {
  min-height: 46px;
  padding-inline: 18px;
  white-space: nowrap;
}

.inventory-subtabs {
  margin: 0 28px 18px;
}

.inventory-subtab-panel[hidden] {
  display: none;
}

.inventory-provisions-panel {
  margin: 0 28px 28px;
}

.provisions-register {
  display: grid;
  gap: 18px;
}

.provisions-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 0.7fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: 0 16px 34px rgba(9, 32, 54, 0.06);
}

.provisions-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.provisions-toolbar input,
.provisions-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.provisions-toolbar .primary-button {
  min-height: 46px;
  padding-inline: 22px;
  white-space: nowrap;
}

.provisions-table {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.provisions-table-head,
.provisions-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.75fr) minmax(110px, 0.65fr) minmax(96px, 0.55fr) minmax(96px, 0.55fr) minmax(96px, 0.55fr) minmax(150px, 0.85fr) minmax(110px, 0.6fr) minmax(92px, 0.5fr);
  gap: 14px;
  align-items: center;
}

.provisions-table-head {
  padding: 18px;
  background: var(--wash);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.provisions-table-row {
  width: 100%;
  min-height: 74px;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.provisions-table-row:nth-child(even) {
  background: #fbfaf7;
}

.provisions-table-row:hover,
.provisions-table-row:focus-visible {
  background: var(--gold-soft);
}

.provisions-table-row > span {
  min-width: 0;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.provisions-item {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.provisions-item strong {
  overflow: hidden;
  font-size: 19px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provisions-item small {
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f2ecd8;
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.provisions-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2dfcf;
  color: var(--danger);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.provisions-status--ordered {
  background: #e8efec;
  color: var(--green);
}

.provisions-receive-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.provisions-empty {
  margin: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .provisions-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .provisions-toolbar .primary-button {
    grid-column: 1 / -1;
  }

  .provisions-table {
    overflow-x: auto;
  }

  .provisions-table-head,
  .provisions-table-row {
    min-width: 980px;
  }
}

@media (max-width: 720px) {
  .accounting-approval-panel,
  .accounting-line-row {
    grid-template-columns: 1fr;
  }

  .accounting-line-row--head {
    display: none;
  }

  .accounting-line-allocation {
    grid-template-columns: 1fr;
  }

  .accounting-line-delete {
    width: 100%;
  }
}

/* ISM monthly equipment checks */
.ism-monthly-checks-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ism-monthly-checks-heading {
  margin-bottom: 0;
}

.ism-monthly-checklist-library {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.ism-monthly-checklist-library__heading,
.ism-monthly-checklist-library__heading > div {
  display: grid;
  gap: 2px;
}

.ism-monthly-checklist-library__heading strong {
  color: var(--ink);
  font-size: 16px;
}

.ism-monthly-checklist-library__heading small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.ism-monthly-checklist-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ism-monthly-checklist-group {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mist);
}

.ism-monthly-checklist-group__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ism-monthly-checklist-group__heading > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-monthly-checklist-group__heading > button {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.ism-monthly-checklist-group__heading > button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.ism-monthly-checklist-group__items {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ism-monthly-checklist-group__items > p {
  margin: 0;
  padding: 7px 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.ism-monthly-checklist-card {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ism-monthly-checklist-card:hover,
.ism-monthly-checklist-card.is-active {
  border-color: var(--gold);
}

.ism-monthly-checklist-card.is-active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.ism-monthly-checklist-card strong,
.ism-monthly-checklist-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-monthly-checklist-card strong {
  font-size: 12px;
}

.ism-monthly-checklist-card small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}

.ism-monthly-check-month {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.ism-monthly-check-month span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-monthly-check-month input {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
}

.ism-monthly-checklist-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.ism-monthly-checklist-toolbar > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ism-monthly-checklist-toolbar > div > span,
.ism-monthly-check-setup-copy label > span {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ism-monthly-check-setup-copy input,
.ism-monthly-check-setup-copy select {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
}

.ism-monthly-checklist-toolbar strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-monthly-checklist-toolbar small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.ism-monthly-check-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.ism-monthly-check-metrics > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.ism-monthly-check-metrics > div:last-child {
  border-right: 0;
}

.ism-monthly-check-metrics span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ism-monthly-check-metrics strong {
  color: var(--ink);
  font-size: 18px;
}

.ism-monthly-check-metrics .needs-attention {
  background: rgba(155, 58, 52, 0.08);
}

.ism-monthly-check-metrics .needs-attention strong {
  color: var(--red);
}

.ism-monthly-check-setup {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) repeat(2, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(209, 170, 71, 0.45);
  border-radius: 16px;
  background: var(--gold-soft);
}

.ism-monthly-check-setup-copy p {
  margin: 4px 0 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.35;
}

.ism-monthly-check-setup-copy label {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.ism-monthly-check-setup fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ism-monthly-check-setup legend {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.ism-monthly-check-picker {
  display: grid;
  gap: 4px;
  max-height: 210px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.ism-monthly-check-picker label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.ism-monthly-check-picker label:hover {
  background: var(--mist);
}

.ism-monthly-check-picker input {
  width: 18px;
  height: 18px;
}

.ism-monthly-check-picker span {
  display: grid;
  min-width: 0;
}

.ism-monthly-check-picker strong,
.ism-monthly-check-picker small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-monthly-check-picker strong {
  color: var(--ink);
  font-size: 13px;
}

.ism-monthly-check-picker small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
}

.ism-monthly-check-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  grid-column: 1 / -1;
}

.ism-monthly-check-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
}

.ism-monthly-check-empty strong {
  color: var(--ink);
  font-size: 20px;
}

.ism-monthly-check-empty p {
  margin: 3px 0 0;
  color: var(--steel);
  font-weight: 750;
}

.ism-monthly-check-table {
  min-width: 1040px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.ism-monthly-check-form {
  min-width: 0;
  overflow-x: auto;
}

.ism-monthly-check-head,
.ism-monthly-check-row {
  display: grid;
  grid-template-columns: 64px minmax(190px, 1.15fr) minmax(130px, 0.75fr) minmax(150px, 0.85fr) minmax(155px, 0.75fr) minmax(210px, 1.1fr) 90px;
  gap: 0;
  align-items: stretch;
}

.ism-monthly-check-head {
  min-height: 42px;
  background: var(--mist);
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ism-monthly-check-head span,
.ism-monthly-check-row > span,
.ism-monthly-check-row > button,
.ism-monthly-check-row > select,
.ism-monthly-check-row > input,
.ism-monthly-check-row > label {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.ism-monthly-check-head span {
  display: flex;
  align-items: center;
  padding: 9px 10px;
}

.ism-monthly-check-row {
  min-height: 64px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.ism-monthly-check-body .ism-monthly-check-row:first-child {
  border-top: 0;
}

.ism-monthly-check-row.needs-attention {
  box-shadow: inset 4px 0 0 var(--red);
}

.ism-monthly-check-row > span,
.ism-monthly-check-row > button {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.ism-monthly-check-row > button {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.ism-monthly-check-row > button:not(:disabled):hover strong {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

.ism-monthly-check-row button strong {
  font-size: 13px;
  line-height: 1.2;
}

.ism-monthly-check-row button small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}

.ism-monthly-check-row select,
.ism-monthly-check-row input[type="text"] {
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.ism-monthly-check-tick {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ism-monthly-check-tick input {
  width: 20px;
  height: 20px;
}

.ism-monthly-check-tick span,
.ism-monthly-check-tick em {
  display: none;
}

.ism-monthly-check-by {
  overflow: hidden;
  color: var(--steel) !important;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.ism-monthly-check-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 1040px;
  padding: 12px 2px 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.ism-monthly-check-footer > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 1100px) {
  .ism-monthly-checklist-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ism-monthly-check-setup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ism-monthly-check-setup-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .ism-monthly-checks-heading,
  .ism-monthly-check-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .ism-monthly-check-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ism-monthly-checklist-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ism-monthly-checklist-toolbar > button {
    align-self: flex-start;
  }

  .ism-monthly-checklist-groups {
    grid-template-columns: 1fr;
  }

  .ism-monthly-check-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .ism-monthly-check-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ism-monthly-check-setup {
    grid-template-columns: 1fr;
  }

  .ism-monthly-check-setup-copy,
  .ism-monthly-check-setup-actions {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .inventory-subtabs,
  .inventory-provisions-panel {
    margin-inline: 14px;
  }

  .provisions-toolbar {
    grid-template-columns: 1fr;
  }
}

.history-entry-panel {
  margin: 0 28px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.history-entry-panel[hidden] {
  display: none;
}

.history-entry-panel summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

.history-entry-panel summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}

.history-entry-panel[open] summary::after {
  content: "-";
}

.history-entry-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 22px 22px;
}

.history-entry-form label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-entry-form .wide-field,
.history-entry-form .account-form-actions,
.history-entry-form .form-message {
  grid-column: 1 / -1;
}

.history-entry-form textarea {
  min-height: 92px;
}

.search-field input {
  min-height: 58px;
  padding-left: 18px;
  font-size: 17px;
}

.worklist-heading {
  align-items: stretch;
  padding: 12px 18px 10px;
}

.worklist-heading > div {
  min-width: 0;
}

.worklist-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 251, 0.92));
  box-shadow: 0 12px 30px rgba(9, 32, 54, 0.06);
  padding: 12px 16px;
}

.worklist-title-group {
  display: grid;
  gap: 0;
  min-width: 0;
}

.worklist-title-group .eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.worklist-title-line {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.worklist-heading .worklist-title-line h2 {
  margin: 0;
  font-size: 44px;
  line-height: 0.95;
  white-space: nowrap;
}

.worklist-command-bar .row-count {
  margin: 0 0 3px;
  color: var(--steel);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.worklist-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.worklist-command-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(9, 32, 54, 0.08);
}

.worklist-view-tab {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--steel);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.worklist-view-tab.is-active {
  background: var(--navy);
  color: #fff;
}

.worklist-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.worklist-command-actions .ghost-button,
.worklist-command-bar > .primary-button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.worklist-command-actions .ghost-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
}

.worklist-command-actions .ghost-button:hover,
.worklist-command-actions .ghost-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--paper);
}

.worklist-command-bar > .primary-button {
  background: var(--gold);
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(209, 170, 71, 0.24);
}

.worklist-recurring-board {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.recurring-worklist-register {
  display: grid;
  min-width: 1120px;
}

.recurring-worklist-register__head,
.recurring-worklist-row {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.5fr)
    minmax(210px, 1.1fr)
    minmax(112px, 0.5fr)
    minmax(120px, 0.5fr)
    minmax(96px, 0.42fr)
    minmax(130px, 0.55fr)
    minmax(86px, 0.38fr)
    minmax(148px, auto);
  gap: 12px;
  align-items: center;
}

.recurring-worklist-register__head {
  background: var(--mist);
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  padding: 12px 16px;
  text-transform: uppercase;
}

.recurring-worklist-row {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.recurring-worklist-row__title {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.recurring-worklist-row strong,
.recurring-worklist-row span {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.15;
}

.recurring-worklist-row strong,
.recurring-worklist-row__title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-worklist-row small,
.recurring-worklist-row__title small {
  display: block;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-worklist-row__actions,
.recurring-job-row-actions,
.recurring-job-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.recurring-empty {
  margin: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 1320px) {
  .worklist-command-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .worklist-command-footer {
    align-items: center;
    flex-direction: row;
  }

  .worklist-command-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

.planner-completed-control,
.completed-toggle-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.82);
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.planner-completed-control input,
.completed-toggle-control input {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  min-height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(9, 32, 54, 0.12);
  box-shadow: inset 0 1px 2px rgba(9, 32, 54, 0.12);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.planner-completed-control input::after,
.completed-toggle-control input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(9, 32, 54, 0.22);
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.planner-completed-control input:checked,
.completed-toggle-control input:checked {
  border-color: rgba(209, 170, 71, 0.8);
  background: var(--gold);
}

.planner-completed-control input:checked::after,
.completed-toggle-control input:checked::after {
  transform: translate(14px, -50%);
}

.planner-completed-control input:focus-visible,
.completed-toggle-control input:focus-visible {
  outline: 3px solid rgba(209, 170, 71, 0.26);
  outline-offset: 3px;
}

.sheet-card {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  margin: 0 20px 28px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.sheet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px 28px 18px;
}

.sheet-heading > div {
  min-width: min(100%, 320px);
}

.sheet-heading > .sheet-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.shipyard-completed-control {
  min-height: 40px;
  font-size: 12px;
}

.sheet-heading h2 {
  font-size: clamp(32px, 4vw, 54px);
}

.row-count {
  margin: 0;
  color: var(--steel);
  font-weight: 900;
}

.sheet-intro {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 2260px;
  border-collapse: collapse;
  table-layout: fixed;
}

#work-table {
  min-width: 3100px;
}

.shipyard-register-table {
  min-width: 3100px;
  table-layout: fixed;
}

.shipyard-register-table .shipyard-col-code { width: 110px; }
.shipyard-register-table .shipyard-col-department { width: 150px; }
.shipyard-register-table .shipyard-col-priority { width: 140px; }
.shipyard-register-table .shipyard-col-status { width: 170px; }
.shipyard-register-table .shipyard-col-due { width: 140px; }
.shipyard-register-table .shipyard-col-name { width: 330px; }
.shipyard-register-table .shipyard-col-description { width: 500px; }
.shipyard-register-table .shipyard-col-location { width: 190px; }
.shipyard-register-table .shipyard-col-system { width: 150px; }
.shipyard-register-table .shipyard-col-equipment { width: 170px; }
.shipyard-register-table .shipyard-col-chosen-company { width: 120px; }
.shipyard-register-table .shipyard-col-money { width: 100px; }
.shipyard-register-table .shipyard-col-payment { width: 100px; }
.shipyard-register-table .shipyard-col-company { width: 135px; }
.shipyard-register-table .shipyard-col-quote { width: 130px; }
.shipyard-register-table .shipyard-col-notes { width: 135px; }

.shipyard-register-table th,
.shipyard-register-table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.shipyard-register-table td {
  padding-block: 8px;
  vertical-align: middle;
}

.shipyard-register-table th {
  padding-block: 12px;
  padding-inline: 8px;
  line-height: 1.18;
}

.shipyard-register-table td {
  padding-inline: 8px;
}

.shipyard-register-table .sort-heading {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 2px 8px;
  width: 100%;
  max-width: 100%;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.shipyard-register-table .sort-heading::after {
  min-width: max-content;
  margin-top: 2px;
}

.shipyard-title-stack {
  gap: 5px;
}

.shipyard-meta-toggle .record-meta-strip {
  padding: 8px 0 0;
}

.shipyard-meta-toggle {
  gap: 6px;
}

.shipyard-meta-toggle summary {
  min-height: 28px;
  padding: 4px 8px 4px 10px;
  font-size: 10px;
}

.shipyard-meta-toggle summary::after {
  inline-size: 16px;
  block-size: 16px;
  font-size: 13px;
}

.shipyard-register-table .shipyard-title-stack .cell-primary,
.shipyard-cell-clip {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-overflow: ellipsis;
}

.shipyard-cell-clip,
.shipyard-register-table .technical-link-cell,
.shipyard-register-table .quote-pill,
.shipyard-register-table .locked-pill {
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  white-space: nowrap;
}

.shipyard-register-table .technical-link-cell,
.shipyard-register-table .quote-pill,
.shipyard-register-table .locked-pill {
  display: block;
  max-width: 100%;
}

.shipyard-register-table .job-equipment-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipyard-register-table .job-equipment-cell .technical-link-cell:not(:first-child) {
  display: none;
}

.worklist-table {
  min-width: 1320px;
}

.crm-table {
  min-width: 1900px;
}

.history-table {
  min-width: 2370px;
}

.accounting-table {
  min-width: 2390px;
}

.accounting-quote-summary {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.accounting-quote-summary__header,
.accounting-quote-summary__empty {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 241, 232, 0.76);
}

.accounting-quote-summary__header span,
.accounting-quote-summary__empty span,
.accounting-quote-summary__cards span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.accounting-quote-summary__header strong,
.accounting-quote-summary__empty strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.accounting-quote-summary__header p,
.accounting-quote-summary__empty p {
  max-width: 620px;
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.accounting-quote-summary__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.accounting-quote-summary__cards article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.accounting-quote-summary__cards strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.1;
}

.accounting-quote-summary__cards small {
  color: var(--steel);
  font-weight: 850;
}

.accounting-quote-summary__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.accounting-quote-summary__table {
  min-width: 940px;
  table-layout: auto;
}

.accounting-quote-summary__table th,
.accounting-quote-summary__table td {
  padding: 13px 14px;
}

.accounting-quote-department-link {
  font-size: inherit;
}

.accounting-quote-drilldown {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.accounting-quote-drilldown__toolbar {
  min-height: 0;
  padding: 14px 62px 14px 16px;
}

.accounting-quote-drilldown__toolbar .quote-file-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  white-space: normal;
}

.accounting-quote-drilldown__toolbar .quote-file-heading p:not(.eyebrow) {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.2;
  white-space: normal;
}

.accounting-quote-drilldown__row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.accounting-quote-drilldown__row span,
.accounting-quote-drilldown__row small {
  display: block;
  color: var(--steel);
  font-weight: 850;
}

.accounting-quote-drilldown__row span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accounting-quote-drilldown__row strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.accounting-quote-drilldown__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1080px) {
  .accounting-quote-summary__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-quote-drilldown__row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .accounting-quote-drilldown__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .accounting-quote-drilldown__toolbar {
    padding: 14px 56px 14px 14px;
  }

  .accounting-quote-drilldown__toolbar .quote-file-heading h2 {
    font-size: 26px;
  }
}

@media (max-width: 720px) {
  .accounting-quote-summary__header,
  .accounting-quote-summary__empty {
    display: grid;
  }

  .accounting-quote-summary__cards {
    grid-template-columns: 1fr;
  }
}

.inventory-table {
  min-width: 1120px;
}

.medkits-table {
  min-width: 1260px;
}

.medkits-summary-grid {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  margin: -2px 0 12px;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.medkits-summary-grid .summary-card {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.medkits-summary-grid .summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.medkits-summary-grid .summary-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.crew-table {
  min-width: 1320px;
}

.crew-table--directory {
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 17px 14px;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f5f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-align: left;
  text-transform: uppercase;
}

.sort-heading {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.sort-heading::after {
  content: "Sort";
  flex: 0 0 auto;
  border-radius: 999px;
  color: rgba(82, 105, 129, 0.72);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-heading:hover,
.sort-heading:focus-visible {
  color: var(--navy-2);
}

.sort-heading:focus-visible {
  outline: 3px solid rgba(209, 170, 71, 0.28);
  outline-offset: 4px;
  border-radius: 8px;
}

table[data-column-layout-ready="true"] th.customisable-table-column {
  padding-right: 18px;
  padding-left: 30px;
  user-select: none;
}

table[data-column-layout-ready="true"] th.customisable-table-column .sort-heading {
  padding-right: 8px;
  padding-left: 16px;
}

table[data-column-layout-ready="true"] th.customisable-table-column.is-column-dragging {
  opacity: 0.45;
}

table[data-column-layout-ready="true"] th.customisable-table-column.is-column-drop-before {
  box-shadow: inset 4px 0 0 var(--gold);
}

table[data-column-layout-ready="true"] th.customisable-table-column.is-column-drop-after {
  box-shadow: inset -4px 0 0 var(--gold);
}

.table-column-resize-handle {
  position: absolute;
  top: 5px;
  right: -5px;
  bottom: 5px;
  z-index: 4;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.table-column-drag-handle {
  position: absolute;
  top: 50%;
  left: 4px;
  z-index: 4;
  width: 12px;
  height: 22px;
  border-radius: 4px;
  cursor: grab;
  opacity: 0.42;
  transform: translateY(-50%);
  transition:
    background 140ms ease,
    opacity 140ms ease;
}

.table-column-drag-handle::before {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 5px currentColor,
    0 10px currentColor,
    5px 0 currentColor,
    5px 5px currentColor,
    5px 10px currentColor;
  content: "";
}

.customisable-table-column:hover .table-column-drag-handle,
.table-column-drag-handle:focus-visible {
  background: rgba(209, 170, 71, 0.16);
  opacity: 1;
}

.table-column-drag-handle:active {
  cursor: grabbing;
}

.table-column-drag-handle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

body.is-moving-table-column,
body.is-moving-table-column * {
  cursor: grabbing !important;
  user-select: none !important;
}

.table-column-resize-handle::after {
  position: absolute;
  top: 0;
  right: 4px;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
  transition: background 140ms ease;
}

.table-column-resize-handle:hover::after,
.table-column-resize-handle:focus-visible::after,
.is-resizing-table-column .table-column-resize-handle::after {
  background: var(--gold);
}

.table-column-resize-handle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

body.is-resizing-table-column,
body.is-resizing-table-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

.table-layout-reset {
  white-space: nowrap;
}

.table-layout-toolbar {
  position: sticky;
  left: 0;
  z-index: 5;
  display: flex;
  width: min(100%, 100vw);
  justify-content: flex-end;
  padding: 6px 8px 0;
  background: inherit;
}

.table-layout-toolbar[hidden] {
  display: none;
}

.table-layout-reset--automatic {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.sort-heading.is-active::after {
  padding: 3px 7px;
  background: var(--gold);
  color: var(--ink);
}

.sort-heading.is-active[data-sort-direction="asc"]::after {
  content: "A-Z";
}

.sort-heading.is-active[data-sort-direction="desc"]::after {
  content: "Z-A";
}

td {
  color: var(--ink);
  font-size: 15px;
}

tbody tr {
  background: #fff;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

tbody tr:nth-child(even) {
  background: #fbfaf7;
}

tbody tr:hover {
  background: var(--gold-soft);
}

tbody tr.is-clickable-row {
  cursor: pointer;
}

tbody tr:focus-within {
  outline: 3px solid rgba(209, 170, 71, 0.32);
  outline-offset: -3px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 92px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 150px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 190px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 235px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 145px;
}

th:nth-child(6),
td:nth-child(6) {
  width: 170px;
}

th:nth-child(7),
td:nth-child(7) {
  width: 125px;
}

th:nth-child(8),
td:nth-child(8),
th:nth-child(9),
td:nth-child(9) {
  width: 132px;
}

th:nth-child(10),
td:nth-child(10),
th:nth-child(13),
td:nth-child(13),
th:nth-child(16),
td:nth-child(16) {
  width: 165px;
}

th:nth-child(11),
td:nth-child(11),
th:nth-child(14),
td:nth-child(14),
th:nth-child(17),
td:nth-child(17) {
  width: 108px;
}

th:nth-child(12),
td:nth-child(12),
th:nth-child(15),
td:nth-child(15),
th:nth-child(18),
td:nth-child(18) {
  width: 150px;
}

#work-table th:nth-child(1),
#work-table td:nth-child(1),
#work-table th:nth-child(2),
#work-table td:nth-child(2),
#work-table th:nth-child(3),
#work-table td:nth-child(3),
#work-table th:nth-child(4),
#work-table td:nth-child(4),
#work-table th:nth-child(5),
#work-table td:nth-child(5) {
  display: none;
}

.worklist-table th:nth-child(1),
.worklist-table td:nth-child(1) {
  width: 330px;
}

.worklist-table th:nth-child(2),
.worklist-table td:nth-child(2) {
  width: 130px;
}

.worklist-table th:nth-child(3),
.worklist-table td:nth-child(3) {
  width: 185px;
}

.worklist-table th:nth-child(4),
.worklist-table td:nth-child(4) {
  width: 210px;
}

.worklist-table th:nth-child(5),
.worklist-table td:nth-child(5) {
  width: 230px;
}

.worklist-table th:nth-child(6),
.worklist-table td:nth-child(6) {
  width: 235px;
}

.select-column {
  text-align: center;
}

.inventory-select-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--gold);
  cursor: pointer;
}

.inventory-select-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.inventory-bulk-delete[hidden],
.inventory-bulk-clear-location[hidden] {
  display: none;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
  width: 64px;
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) {
  width: 130px;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
  width: 320px;
}

.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4) {
  width: 260px;
}

.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5) {
  width: 150px;
}

.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
  width: 150px;
}

.inventory-table td {
  padding-block: 8px;
  vertical-align: middle;
}

.inventory-table .inventory-cell-clip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-table .inventory-cell-clip .cell-primary,
.inventory-table .inventory-cell-clip .cell-muted,
.inventory-table .inventory-location-cell {
  display: inline;
  min-width: 0;
  margin-top: 0;
}

.inventory-table .inventory-cell-clip .cell-muted::before,
.inventory-table .inventory-location-cell .cell-muted::before {
  content: " / ";
}

.inventory-table .inventory-location-cell {
  gap: 0;
}

.inventory-table .table-link,
.inventory-table .status-pill {
  max-width: 100%;
  vertical-align: middle;
}

.medkits-table th,
.medkits-table td {
  padding: 14px 12px;
}

.medkits-table th:nth-child(1),
.medkits-table td:nth-child(1) {
  width: 145px;
}

.medkits-table th:nth-child(2),
.medkits-table td:nth-child(2) {
  width: 220px;
}

.medkits-table th:nth-child(3),
.medkits-table td:nth-child(3) {
  width: 145px;
}

.medkits-table th:nth-child(4),
.medkits-table td:nth-child(4) {
  width: 90px;
}

.medkits-table th:nth-child(5),
.medkits-table td:nth-child(5) {
  width: 125px;
}

.medkits-table th:nth-child(6),
.medkits-table td:nth-child(6) {
  width: 170px;
  overflow: hidden;
}

.medkits-table th:nth-child(7),
.medkits-table td:nth-child(7) {
  width: 145px;
}

.medkits-table th:nth-child(8),
.medkits-table td:nth-child(8) {
  width: 220px;
}

.medkits-table td:nth-child(2),
.medkits-table td:nth-child(8) {
  color: var(--steel);
  font-weight: 760;
  line-height: 1.35;
}

.medkits-table .medkit-expiry-pill {
  max-width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 7px 9px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.medkits-subtabs {
  margin: 0 0 16px;
}

.medication-history-table {
  min-width: 980px;
}

.medication-history-table th:nth-child(1),
.medication-history-table td:nth-child(1) {
  width: 120px;
}

.medication-history-table th:nth-child(2),
.medication-history-table td:nth-child(2) {
  width: 210px;
}

.medication-history-table th:nth-child(3),
.medication-history-table td:nth-child(3) {
  width: 130px;
}

.medication-history-table th:nth-child(4),
.medication-history-table td:nth-child(4) {
  width: 180px;
}

.ism-board {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 0 28px 28px;
}

.ism-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(232, 237, 242, 0.72);
}

.ism-subtab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.ism-subtab.is-active {
  background: var(--navy);
  color: #fff;
}

.ism-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
  gap: 18px;
}

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

.ism-simple-panel {
  display: grid;
  gap: 14px;
  min-height: 310px;
  border-top: 4px solid var(--steel);
}

.ism-simple-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ism-simple-panel-top > div {
  display: grid;
  gap: 6px;
}

.ism-simple-panel-top span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-simple-panel-top strong {
  color: var(--ink);
  font-size: clamp(42px, 4.4vw, 68px);
  line-height: 0.9;
}

.ism-simple-panel > p {
  margin: 0;
  color: var(--steel);
  font-size: 18px;
  font-weight: 850;
}

.ism-queue--compact .ism-queue-row {
  grid-template-columns: 104px minmax(150px, 0.8fr) minmax(220px, 1fr);
}

.ism-equipment-grid .ism-panel {
  min-width: 0;
}

.ism-safety-register-panel {
  grid-column: 1 / -1;
}

.ism-source-banner--safety {
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.ism-source-banner--safety > strong {
  min-width: 0;
}

.ism-source-banner-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ism-equipment-grid--safety {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  align-items: start;
}

.ism-equipment-grid--safety .ism-safety-register-panel {
  grid-column: auto;
}

.ism-equipment-grid--safety .ism-panel {
  padding: 16px;
}

.ism-equipment-grid--safety .ism-panel-heading {
  gap: 10px;
  margin-bottom: 12px;
}

.ism-equipment-grid--safety .ism-panel-heading h3 {
  font-size: clamp(22px, 1.8vw, 29px);
}

.ism-equipment-grid--safety .ism-panel-heading p {
  margin-top: 4px;
  font-size: 13px;
}

.ism-equipment-grid--safety .ism-safety-register-table {
  border-radius: 14px;
}

.ism-equipment-grid--safety .ism-safety-register-head,
.ism-equipment-grid--safety .ism-safety-register-row {
  grid-template-columns: minmax(210px, 1.2fr) minmax(126px, 0.55fr) minmax(180px, 0.9fr);
  gap: 12px;
}

.ism-equipment-grid--safety .ism-safety-register-head {
  min-height: 44px;
  padding: 0 14px;
  font-size: 10px;
}

.ism-equipment-grid--safety .ism-safety-register-row {
  min-height: 58px;
  padding: 9px 14px;
}

.ism-equipment-grid--safety .ism-safety-name {
  gap: 2px;
}

.ism-equipment-grid--safety .ism-safety-name strong {
  font-size: 16px;
}

.ism-equipment-grid--safety .ism-safety-name small,
.ism-equipment-grid--safety .ism-safety-location {
  font-size: 11px;
  line-height: 1.2;
}

.ism-equipment-grid--safety .ism-safety-expiry .status-pill {
  min-height: 26px;
  padding: 0 9px;
  font-size: 9px;
}

.ism-safety-docs-panel {
  display: flex;
  min-height: 0;
  max-height: 470px;
  flex-direction: column;
}

.ism-safety-docs-panel .ism-queue {
  min-height: 0;
  max-height: 350px;
  padding-right: 3px;
  overflow-y: auto;
}

.ism-safety-docs-panel .ism-queue-row--files {
  grid-template-areas:
    "main actions"
    "detail detail"
    "files files";
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px 10px;
  padding: 12px;
  border-radius: 12px;
}

.ism-safety-docs-panel .ism-queue-main {
  gap: 2px;
}

.ism-safety-docs-panel .ism-queue-main strong {
  font-size: 15px;
}

.ism-safety-docs-panel .ism-row-detail {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.28;
}

.ism-safety-docs-panel .ism-row-actions--stacked {
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
}

.ism-safety-docs-panel .ism-row-actions .ghost-button,
.ism-safety-docs-panel .ism-row-actions .danger-button,
.ism-safety-docs-panel .ism-file-upload {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.ism-safety-docs-panel .ism-file-list {
  gap: 6px;
}

.ism-safety-docs-panel .ism-file-empty {
  margin: 0;
  color: var(--steel);
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 1320px) {
  .ism-equipment-grid.ism-equipment-grid--safety {
    grid-template-columns: minmax(0, 1fr);
  }

  .ism-safety-docs-panel {
    max-height: 420px;
  }

  .ism-safety-docs-panel .ism-queue-row--files {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ism-safety-docs-panel .ism-row-actions--stacked {
    align-items: center;
    flex-direction: row;
  }

  .ism-safety-docs-panel .ism-row-actions .ghost-button,
  .ism-safety-docs-panel .ism-row-actions .danger-button,
  .ism-safety-docs-panel .ism-file-upload {
    width: auto;
  }
}

.ism-metric-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ism-metric-card,
.ism-panel,
.ism-source-banner {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 16px 34px rgba(9, 32, 54, 0.08);
}

.ism-metric-card {
  min-height: 142px;
  padding: 18px;
  border-top: 4px solid var(--steel);
  border-radius: 18px;
}

.ism-metric-card span,
.ism-panel-heading span,
.ism-source-banner span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-metric-card strong {
  display: inline-block;
  margin: 8px 8px 6px 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1;
}

.ism-metric-card small {
  color: var(--steel);
  font-weight: 950;
}

.ism-metric-card p,
.ism-selected-panel p,
.ism-source-banner strong {
  margin: 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.35;
}

.ism-tone-danger {
  border-color: rgba(155, 58, 52, 0.32);
  border-top-color: var(--red);
}

.ism-tone-warning {
  border-color: rgba(209, 170, 71, 0.45);
  border-top-color: var(--gold);
}

.ism-tone-blue {
  border-top-color: #2d6593;
}

.ism-tone-green {
  border-top-color: var(--green);
}

.ism-panel {
  border-radius: 22px;
  padding: 20px;
}

.ism-priority-panel {
  min-width: 0;
}

.ism-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ism-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ism-panel-actions .ghost-button {
  border-color: var(--line-strong);
  background: var(--mist);
  color: var(--ink);
}

.primary-button--compact {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
}

.ism-panel-heading h3,
.ism-selected-panel h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.ism-panel-heading h3,
.ism-selected-panel h3 {
  font-size: clamp(24px, 2.2vw, 34px);
}

.ism-panel-heading p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
}

.ism-queue {
  display: grid;
  gap: 9px;
}

.ism-create-form {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid rgba(209, 170, 71, 0.42);
  border-radius: 18px;
  background: var(--gold-soft);
}

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

.ism-create-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ism-create-form label > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-create-form input,
.ism-create-form select,
.ism-create-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

.ism-create-form textarea {
  min-height: 108px;
  resize: vertical;
}

.ism-create-form-wide {
  grid-column: 1 / -1;
}

.ism-crew-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(8, 34, 54, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.ism-crew-selector-title {
  grid-column: 1 / -1;
  display: block;
  margin: 0 0 2px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-attendee-chip {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px !important;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.82);
}

.crew-attendee-chip input {
  grid-row: span 2;
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--gold);
}

.crew-attendee-chip span,
.crew-attendee-chip small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crew-attendee-chip span {
  color: var(--ink) !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.crew-attendee-chip small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.ism-template-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(8, 34, 54, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.ism-template-preview > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-template-preview > p {
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.ism-template-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(8, 34, 54, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.ism-template-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ism-template-editor-heading span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-template-editor-heading p {
  margin: 4px 0 0;
  color: var(--steel);
  font-weight: 800;
}

.ism-template-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ism-template-question-list {
  display: grid;
  gap: 10px;
}

.ism-template-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ism-template-question-row textarea {
  min-height: 68px;
}

.ism-template-question-row b {
  color: var(--ink);
  font-size: inherit;
}

.ism-template-question-controls {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 6px;
}

.ism-template-question-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.ism-template-question-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.ism-template-question-button--danger {
  border-color: rgba(155, 58, 52, 0.28);
  background: rgba(155, 58, 52, 0.08);
  color: var(--red);
}

.ism-template-question-grid,
.ism-checklist-summary {
  display: grid;
  gap: 10px;
}

.ism-template-question {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ism-template-question small,
.ism-checklist-summary small {
  color: var(--steel);
  font-weight: 750;
}

.ism-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ism-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.ism-filter-row label {
  display: grid;
  gap: 6px;
}

.ism-filter-row span,
.ism-incident-field span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-filter-row select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  padding: 8px 12px;
}

.ism-queue-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
}

.ism-queue-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.42fr) minmax(150px, 0.72fr) minmax(0, 1.36fr);
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  overflow: hidden;
}

.ism-queue-row--record {
  grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1.25fr) minmax(128px, auto);
  align-items: start;
}

.ism-incident-card {
  grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1fr);
  grid-template-areas:
    "main details"
    "investigation investigation"
    "files files"
    "actions actions";
}

.ism-incident-card .ism-queue-main {
  grid-area: main;
}

.ism-incident-detail-grid {
  grid-area: details;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ism-incident-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(8, 34, 54, 0.1);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.72);
}

.ism-incident-field strong {
  line-height: 1.24;
}

.ism-incident-investigation {
  grid-area: investigation;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ism-incident-investigation label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ism-incident-investigation span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ism-incident-investigation textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  line-height: 1.35;
  padding: 10px 12px;
  resize: vertical;
}

.ism-incident-card .ism-file-list,
.ism-incident-card > .ism-row-detail {
  grid-area: files;
}

.ism-incident-actions {
  grid-area: actions;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ism-queue-row--files {
  grid-template-areas:
    "main actions"
    "detail detail"
    "files files";
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: start;
  min-height: 0;
  padding: 16px;
}

.ism-queue-row--files .ism-queue-main {
  grid-area: main;
}

.ism-queue-row--files .ism-row-detail {
  grid-area: detail;
}

.ism-queue-row--files .ism-row-actions {
  grid-area: actions;
}

.ism-queue-row--files .ism-file-list {
  grid-area: files;
}

.ism-queue-row--equipment {
  grid-template-areas:
    "status title dates"
    "status context dates";
  grid-template-columns: minmax(124px, 0.34fr) minmax(260px, 1fr) minmax(190px, 0.42fr);
  align-items: center;
  row-gap: 6px;
  min-height: 92px;
}

.ism-equipment-status {
  grid-area: status;
}

.ism-equipment-title {
  grid-area: title;
}

.ism-equipment-context {
  grid-area: context;
}

.ism-queue-row--equipment .ism-service-dates {
  grid-area: dates;
}

.ism-safety-register-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ism-safety-register-head,
.ism-safety-register-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(170px, 0.45fr) minmax(240px, 1fr);
  gap: 18px;
  align-items: center;
}

.ism-safety-register-head {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 243, 247, 0.72);
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ism-safety-register-body {
  display: grid;
}

.ism-safety-register-row {
  min-height: 74px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font: inherit;
  text-align: left;
  padding: 13px 18px;
  cursor: pointer;
}

.ism-safety-register-row:last-child {
  border-bottom: 0;
}

.ism-safety-register-row:hover {
  background: rgba(213, 173, 67, 0.12);
}

.ism-safety-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ism-safety-name strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.08;
}

.ism-safety-name small,
.ism-safety-location {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.ism-safety-expiry {
  min-width: 0;
}

.ism-safety-expiry .status-pill {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
}

.ism-queue-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ism-checklist-summary {
  min-width: 0;
}

.ism-checklist-summary div {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 34, 54, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.ism-checklist-summary b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.ism-close-button {
  justify-self: end;
  white-space: nowrap;
}

.ism-row-detail {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(8, 34, 54, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--steel) !important;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ism-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.ism-row-actions--stacked {
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
}

.ism-delete-button {
  white-space: nowrap;
}

.ism-file-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(9, 32, 54, 0.18);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ism-file-upload:hover {
  border-color: rgba(209, 170, 71, 0.74);
  box-shadow: 0 12px 24px rgba(9, 32, 54, 0.13);
  transform: translateY(-1px);
}

.ism-file-upload span {
  color: inherit !important;
  font-size: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.ism-file-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
}

.ism-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(8, 34, 54, 0.1);
  border-radius: 14px;
  background: rgba(232, 237, 242, 0.42);
}

.ism-file-row a,
.ism-file-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ism-file-row strong,
.ism-file-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ism-file-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.ism-file-row small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.ism-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ism-file-empty {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.ism-empty-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(9, 32, 54, 0.22);
  border-radius: 18px;
  background: rgba(232, 237, 242, 0.38);
}

.ism-empty-panel strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.ism-empty-panel span {
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
}

.ism-empty-panel .primary-button {
  justify-self: start;
}

.ism-service-dates {
  display: grid;
  gap: 3px;
  color: var(--steel) !important;
  text-transform: none !important;
  justify-self: end;
  min-width: 176px;
}

.ism-service-dates b {
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ism-close-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 240px;
}

.ism-close-controls input {
  width: min(240px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 9px 12px;
}

.ism-close-note {
  color: var(--green) !important;
}

.ism-row-attendees {
  color: var(--ink) !important;
}

.ism-queue-row:hover {
  border-color: rgba(209, 170, 71, 0.72);
  background: var(--gold-soft);
}

.ism-queue-row span {
  color: var(--red);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ism-queue-row strong {
  font-weight: 950;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.ism-queue-row small {
  color: var(--steel);
  font-weight: 750;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.ism-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.ism-detail-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.ism-detail-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ism-detail-list dt {
  color: var(--steel);
  font-weight: 950;
}

.ism-detail-list dd {
  margin: 0;
  font-weight: 900;
}

.ism-source-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-color: rgba(209, 170, 71, 0.44);
  border-radius: 18px;
  background: var(--gold-soft);
}

.ism-source-banner .ghost-button {
  margin-left: auto;
  white-space: nowrap;
}

.crew-table th:nth-child(1),
.crew-table td:nth-child(1) {
  width: 260px;
}

.crew-table th:nth-child(2),
.crew-table td:nth-child(2),
.crew-table th:nth-child(3),
.crew-table td:nth-child(3) {
  width: 170px;
}

.crew-table th:nth-child(4),
.crew-table td:nth-child(4),
.crew-table th:nth-child(5),
.crew-table td:nth-child(5) {
  width: 190px;
}

.crew-table th:nth-child(6),
.crew-table td:nth-child(6) {
  width: 210px;
}

.crew-table th:nth-child(7),
.crew-table td:nth-child(7) {
  width: 330px;
}

.crew-table--directory th:nth-child(1),
.crew-table--directory td:nth-child(1) {
  width: 42%;
}

.crew-table--directory th:nth-child(2),
.crew-table--directory td:nth-child(2) {
  width: 28%;
}

.crew-table--directory th:nth-child(3),
.crew-table--directory td:nth-child(3) {
  width: 30%;
}

.crew-table tr.is-archived-row {
  background: rgba(9, 37, 58, 0.05);
  color: var(--slate);
}

.crew-table tr.is-archived-row .table-link {
  color: var(--slate);
}

.crm-table th:nth-child(1),
.crm-table td:nth-child(1) {
  width: 230px;
}

.crm-table th:nth-child(2),
.crm-table td:nth-child(2) {
  width: 240px;
}

.crm-table th:nth-child(3),
.crm-table td:nth-child(3) {
  width: 150px;
}

.crm-table th:nth-child(4),
.crm-table td:nth-child(4) {
  width: 220px;
}

.crm-table th:nth-child(5),
.crm-table td:nth-child(5) {
  width: 180px;
}

.crm-table th:nth-child(6),
.crm-table td:nth-child(6) {
  width: 260px;
}

.crm-table th:nth-child(7),
.crm-table td:nth-child(7) {
  width: 130px;
}

.crm-table th:nth-child(8),
.crm-table td:nth-child(8) {
  width: 150px;
}

.crm-table th:nth-child(9),
.crm-table td:nth-child(9) {
  width: 260px;
}

.crm-table th:nth-child(10),
.crm-table td:nth-child(10) {
  width: 320px;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 130px;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
  width: 280px;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
  width: 380px;
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
  width: 300px;
}

.history-table th:nth-child(5),
.history-table td:nth-child(5) {
  width: 140px;
}

.history-table th:nth-child(6),
.history-table td:nth-child(6) {
  width: 150px;
}

.history-table th:nth-child(7),
.history-table td:nth-child(7) {
  width: 180px;
}

.history-table th:nth-child(8),
.history-table td:nth-child(8) {
  width: 170px;
}

.history-table th:nth-child(9),
.history-table td:nth-child(9) {
  width: 170px;
}

.history-table th:nth-child(10),
.history-table td:nth-child(10) {
  width: 210px;
}

.history-table th:nth-child(11),
.history-table td:nth-child(11) {
  width: 120px;
}

.history-table th:nth-child(12),
.history-table td:nth-child(12) {
  width: 150px;
}

.history-row td {
  line-height: 1.35;
}

.accounting-table th:nth-child(1),
.accounting-table td:nth-child(1) {
  width: 170px;
}

.accounting-table th:nth-child(2),
.accounting-table td:nth-child(2) {
  width: 240px;
}

.accounting-table th:nth-child(3),
.accounting-table td:nth-child(3) {
  width: 170px;
}

.accounting-table th:nth-child(4),
.accounting-table td:nth-child(4) {
  width: 180px;
}

.accounting-table th:nth-child(5),
.accounting-table td:nth-child(5) {
  width: 190px;
}

.accounting-table th:nth-child(6),
.accounting-table td:nth-child(6) {
  width: 270px;
}

.accounting-table th:nth-child(7),
.accounting-table td:nth-child(7),
.accounting-table th:nth-child(8),
.accounting-table td:nth-child(8) {
  width: 190px;
}

.accounting-table th:nth-child(9),
.accounting-table td:nth-child(9),
.accounting-table th:nth-child(10),
.accounting-table td:nth-child(10) {
  width: 135px;
}

.accounting-table th:nth-child(11),
.accounting-table td:nth-child(11),
.accounting-table th:nth-child(12),
.accounting-table td:nth-child(12),
.accounting-table th:nth-child(13),
.accounting-table td:nth-child(13) {
  width: 145px;
}

.accounting-table th:nth-child(14),
.accounting-table td:nth-child(14) {
  width: 105px;
}

.accounting-ledger-list span,
.accounting-rollup__summary span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.accounting-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  width: fit-content;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.accounting-status--paid,
.accounting-status--deposit-paid {
  background: rgba(47, 95, 77, 0.13);
  color: var(--green);
}

.accounting-status--overdue,
.accounting-status--void {
  background: rgba(155, 58, 52, 0.12);
  color: var(--red);
}

.accounting-status--invoice-received,
.accounting-status--part-paid {
  background: var(--gold-soft);
}

.accounting-status--approved,
.accounting-status--synced,
.accounting-status--ready {
  background: rgba(47, 95, 77, 0.13);
  color: var(--green);
}

.accounting-status--needs-review,
.accounting-status--failed {
  background: rgba(155, 58, 52, 0.12);
  color: var(--red);
}

.accounting-workflow-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 14px;
}

.accounting-workflow-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--steel);
  font-weight: 950;
}

.accounting-workflow-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.accounting-workflow-tab span {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(82, 103, 125, 0.12);
  font-size: 12px;
}

.accounting-workflow-tab.is-active span {
  background: rgba(255, 255, 255, 0.18);
}

.accounting-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-page {
  width: min(calc(100% - 28px), 1900px);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 22px);
}

.accounting-page-breadcrumb {
  margin-bottom: 14px;
}

.accounting-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.accounting-page-title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.accounting-page .accounting-page-title-block h2 {
  margin: 0;
  font-size: clamp(38px, 3.65vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.accounting-page-title-block p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--steel);
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.accounting-page-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.accounting-page-actions .primary-button,
.accounting-page-actions .ghost-button,
.accounting-page-actions .danger-button {
  min-height: 42px;
  padding-inline: 18px;
  font-size: 15px;
}

.accounting-page-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.accounting-page-metrics article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.accounting-page-metrics span,
.accounting-page-card__header h3,
.accounting-workflow-strip .accounting-sync-error {
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.accounting-page-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(20px, 1.5vw, 26px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.accounting-page-metrics small {
  display: block;
  margin-top: 3px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
}

.accounting-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.84fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.accounting-page-side-stack {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.accounting-page-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.accounting-page-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 253, 0.86);
}

.accounting-page-card__header h3 {
  margin: 0;
}

.accounting-page-card__header .upload-button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
}

.accounting-page-card--sheet .accounting-edit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.accounting-page-card--sheet .worklist-detail-readonly-grid {
  padding: 16px;
}

.accounting-page-card--sheet .wide-field {
  grid-column: 1 / -1;
}

.accounting-page-card--workflow,
.accounting-page-card--file,
.accounting-page-card--payments {
  min-height: 0;
}

.accounting-workflow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}

.accounting-page-card--file .accounting-file-row,
.accounting-page-card--file .empty-history,
.accounting-page-card--payments .empty-history,
.accounting-page-card--payments .accounting-payment-list {
  margin: 0;
  padding: 14px 16px;
}

.accounting-page-card--file .accounting-file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.accounting-page-card--file .accounting-file-row .cell-muted {
  grid-column: 1 / -1;
}

.accounting-page-card--file .accounting-file-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-page-card--payments .accounting-payment-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.accounting-page-card--payments #accounting-payment-method,
.accounting-page-card--payments #accounting-payment-reference,
.accounting-page-card--payments #accounting-payment-account {
  min-width: 0;
}

.accounting-page-card--payments .accounting-payment-form .primary-button {
  grid-column: 1 / -1;
  min-width: 0;
}

.accounting-page-card--payments .accounting-payment-row {
  grid-template-columns: 100px 110px 100px minmax(0, 1fr);
  border-radius: 12px;
}

.accounting-line-items-card {
  margin-bottom: 14px;
}

.accounting-line-items-card > .accounting-line-table,
.accounting-ledger-card > .accounting-ledger-list {
  padding: 12px 16px 14px;
}

.accounting-line-items-card .accounting-page-card__header .primary-button {
  min-height: 38px;
  padding-inline: 18px;
}

.accounting-page .accounting-line-row {
  grid-template-columns: minmax(210px, 1.55fr) 70px 102px 84px 102px minmax(230px, 1.15fr) 40px;
}

.accounting-page input,
.accounting-page select {
  min-height: 44px;
  border-radius: 13px;
  padding-inline: 12px;
}

.accounting-page textarea {
  min-height: 92px;
  border-radius: 13px;
  padding: 12px;
}

.accounting-page .core-edit-grid label {
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.13em;
}

.accounting-page-save-note {
  margin: 0 0 8px;
}

.accounting-edit-grid input[list],
.accounting-edit-grid select {
  background: #fff;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.accounting-supplier-combobox {
  position: relative;
  display: block;
  width: 100%;
}

.accounting-supplier-combobox input {
  background: #fff;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.accounting-supplier-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #071f35;
  box-shadow: 0 16px 32px rgba(9, 32, 54, 0.24);
}

.accounting-supplier-combobox:focus-within .accounting-supplier-options:not([hidden]) {
  display: grid;
  gap: 4px;
}

.accounting-supplier-option {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.accounting-supplier-option:hover,
.accounting-supplier-option:focus {
  background: var(--gold);
  color: var(--ink);
  outline: none;
}

.accounting-edit-grid input[list]::placeholder {
  color: rgba(9, 32, 54, 0.52);
  -webkit-text-fill-color: rgba(9, 32, 54, 0.52);
}

.accounting-edit-grid select option,
.accounting-edit-grid select optgroup {
  background: #071f35;
  color: #fff;
}

.accounting-edit-grid select option:checked {
  background: #d1aa47;
  color: #071f35;
}

.accounting-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 241, 232, 0.75);
}

.accounting-file-row strong {
  color: var(--ink);
}

.accounting-download-link {
  text-decoration: none;
}

.accounting-payment-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.15fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.accounting-payment-form input,
.accounting-payment-form select {
  min-height: 50px;
  min-width: 0;
}

#accounting-payment-method,
#accounting-payment-reference {
  min-width: 220px;
}

.accounting-payment-form .primary-button {
  min-width: 220px;
  width: 100%;
}

.accounting-payment-list,
.accounting-ledger-list {
  display: grid;
  gap: 10px;
}

.accounting-approval-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.accounting-approval-panel article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.accounting-approval-panel span,
.accounting-line-row--head span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.accounting-approval-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.accounting-approval-panel small {
  display: block;
  margin-top: 3px;
  color: var(--steel);
  font-weight: 800;
}

.accounting-sync-error {
  grid-column: 1 / -1;
}

.accounting-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.accounting-workflow-actions .primary-button,
.accounting-workflow-actions .ghost-button {
  min-height: 46px;
}

.accounting-line-table {
  display: grid;
  gap: 8px;
}

.accounting-line-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) 90px 110px 100px 110px minmax(240px, 1.2fr) 44px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 8px;
}

.accounting-line-row--head,
.accounting-line-row--total {
  background: rgba(238, 243, 247, 0.78);
}

.accounting-line-row input,
.accounting-line-row select {
  min-width: 0;
  min-height: 42px;
  border-radius: 12px;
  font-size: 14px;
}

.accounting-line-allocation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.accounting-line-delete {
  min-width: 0;
  width: 42px;
  height: 42px;
  padding: 0;
}

.accounting-payment-row,
.accounting-ledger-list article {
  display: grid;
  grid-template-columns: 130px 150px 160px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}

.accounting-payment-row small,
.accounting-ledger-list small,
.accounting-rollup__summary small {
  color: var(--steel);
  font-weight: 800;
}

.accounting-ledger-list article {
  grid-template-columns: 150px 220px minmax(0, 1fr);
}

.accounting-ledger-list strong {
  color: var(--ink);
}

.accounting-rollup {
  display: grid;
  gap: 12px;
}

.accounting-rollup__summary {
  display: grid;
  grid-template-columns: 140px 180px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 241, 232, 0.75);
  padding: 14px;
}

.accounting-rollup__summary strong {
  color: var(--ink);
  font-size: 22px;
}

.history-action-cell {
  text-align: left;
}

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

.planner-card {
  overflow: hidden;
}

.planner-heading {
  display: grid;
  grid-template-columns: minmax(190px, 0.24fr) minmax(0, 1fr);
  align-items: end;
  gap: 22px;
  padding-bottom: 16px;
}

.planner-title-block {
  min-width: 0;
}

.planner-heading h2 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1;
}

.planner-heading > div,
.planner-control-deck {
  min-width: 0;
}

.planner-control-deck {
  display: grid;
  gap: 14px;
  justify-self: end;
  width: min(100%, 1200px);
}

.planner-control-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.planner-control-row--bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.planner-control-row .primary-button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 22px;
  white-space: nowrap;
}

.planner-control-row--top {
  position: relative;
}

.table-input--date {
  width: 128px;
  min-width: 128px;
}

.due-date-control {
  display: grid;
  grid-template-columns: 128px 32px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  position: relative;
}

.due-date-control.is-empty::before {
  content: "__/__/____";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7aaee8;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.due-date-control.is-empty:focus-within::before {
  opacity: 1;
}

.due-date-control input {
  min-width: 0;
}

.due-date-control input.table-input--date,
.worklist-table .due-date-control input.table-input--date {
  flex: 0 0 128px;
  width: 128px;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.worklist-table .due-date-control {
  width: max-content;
  grid-template-columns: 128px 32px;
  justify-content: flex-start;
}

.worklist-table .due-date-clear {
  min-width: 32px;
}

.due-date-control.is-empty input[type="date"] {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.due-date-control.is-empty input[type="date"]::-webkit-datetime-edit {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.due-date-control.is-empty:focus-within input[type="date"],
.due-date-control.is-empty:focus-within input[type="date"]::-webkit-datetime-edit {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.date-placeholder-control {
  display: inline-grid;
  width: 100%;
  min-width: 0;
  position: relative;
}

.date-placeholder-control input[type="date"] {
  width: 100%;
  min-width: 0;
}

.date-placeholder-control.is-empty::before {
  content: "__/__/____";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #7aaee8;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  text-transform: none;
  z-index: 1;
}

.date-placeholder-control.is-empty:focus-within::before {
  opacity: 0;
}

.date-placeholder-control.is-empty input[type="date"] {
  color: transparent;
}

.date-placeholder-control.is-empty input[type="date"]::-webkit-datetime-edit {
  color: transparent;
}

.date-placeholder-control.is-empty:focus-within input[type="date"],
.date-placeholder-control.is-empty:focus-within input[type="date"]::-webkit-datetime-edit {
  color: var(--ink);
}

.due-date-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 32px;
  block-size: 32px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(242, 245, 247, 0.82);
  color: var(--steel);
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.due-date-clear:hover,
.due-date-clear:focus-visible {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.planner-calendar-nav,
.planner-mode-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.planner-calendar-nav .ghost-button,
.planner-mode-control .segmented-button {
  min-height: 44px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
}

.planner-calendar-nav .ghost-button {
  padding: 0 18px;
  font-size: 14px;
}

.planner-date-control {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.planner-date-control input {
  width: 178px;
  min-height: 44px;
  border-radius: 14px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.planner-date-control .date-placeholder-control {
  width: 178px;
}

.segmented-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--steel);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 950;
}

.segmented-button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.planner-menu {
  position: relative;
  flex: 0 0 auto;
}

.planner-menu summary {
  list-style: none;
}

.planner-menu summary::-webkit-details-marker {
  display: none;
}

.planner-icon-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
}

.planner-icon-menu-button:hover,
.planner-icon-menu-button:focus-visible,
.planner-menu[open] .planner-icon-menu-button {
  border-color: var(--line-strong);
  background: #f8fafc;
  outline: none;
}

.planner-menu-icon {
  position: relative;
  display: block;
  inline-size: 22px;
  block-size: 20px;
}

.planner-menu-icon--filter::before,
.planner-menu-icon--filter::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  border-top: 4px solid var(--ink);
  border-radius: 999px;
}

.planner-menu-icon--filter::before {
  top: 4px;
  box-shadow: 0 7px 0 var(--ink);
}

.planner-menu-icon--filter::after {
  top: 18px;
}

.planner-menu-icon--tools::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  inline-size: 5px;
  block-size: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 8px 0 0 var(--ink), 16px 0 0 var(--ink);
}

.planner-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(9, 32, 54, 0.14);
}

.planner-menu-panel--actions {
  width: min(288px, calc(100vw - 48px));
}

.planner-menu-heading {
  display: grid;
  gap: 3px;
}

.planner-menu-heading span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.planner-menu-heading strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.planner-category-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  overflow: visible;
  white-space: normal;
}

.planner-action-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 0;
}

.planner-action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.planner-category-controls label,
.planner-completed-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.planner-completed-control {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
  white-space: nowrap;
}

.planner-completed-control input {
  margin: 0;
}

.planner-action-buttons .ghost-button {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
}

.planner-add-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.planner-filter-summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: min(100%, 620px);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--steel);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.planner-category-controls label {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.planner-category-controls input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--navy);
  box-shadow: none;
}

.planner-period-label {
  margin: 12px 0 0;
  padding: 0;
  color: var(--steel);
  font-size: 16px;
  font-weight: 900;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-heading {
  grid-template-columns: 1fr;
  align-items: start;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-heading h2 {
  font-size: clamp(38px, 4vw, 56px);
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-control-deck {
  justify-self: stretch;
  width: 100%;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-control-row {
  justify-content: flex-start;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-calendar-nav,
.app-shell:not([data-sidebar-collapsed="true"]) .planner-mode-control {
  flex-wrap: nowrap;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-date-control {
  flex: 0 1 220px;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-date-control input {
  width: 100%;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-category-controls {
  flex: 0 1 auto;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-action-controls {
  grid-template-columns: 1fr;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-action-buttons {
  justify-content: flex-start;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-option-three-layout {
  grid-template-columns: 1fr;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-agenda-panel {
  position: static;
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-calendar--week {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
}

.app-shell:not([data-sidebar-collapsed="true"]) .planner-calendar--month {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.planner-board {
  display: grid;
  gap: 16px;
  padding: 0 22px 28px;
}

.planner-option-three-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.32fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.planner-calendar {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.planner-calendar--week {
  grid-template-columns: repeat(7, minmax(168px, 1fr));
}

.planner-calendar--month {
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  overflow-x: auto;
}

.planner-weekday {
  min-height: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 245, 247, 0.92);
  padding: 12px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-weekday:nth-child(7) {
  border-right: 0;
}

.planner-day {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 520px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.planner-calendar--week .planner-day:nth-child(7),
.planner-calendar--month .planner-day:nth-child(7n) {
  border-right: 0;
}

.planner-calendar--month .planner-day {
  min-height: 172px;
  border-bottom: 1px solid var(--line);
}

.planner-calendar--month .planner-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.planner-day.is-outside-month {
  background: rgba(242, 245, 247, 0.5);
}

.planner-day.is-outside-month .planner-day-heading,
.planner-day.is-outside-month .planner-day-items {
  opacity: 0.58;
}

.planner-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(209, 170, 71, 0.62);
}

.planner-day.is-selected {
  background: rgba(246, 241, 228, 0.62);
}

.planner-day-heading {
  display: flex;
  height: 64px;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.planner-day-heading span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-day-heading strong {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.planner-day-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.planner-calendar--month .planner-day-heading {
  height: 44px;
  min-height: 44px;
  padding: 8px 10px;
}

.planner-calendar--month .planner-day-heading span {
  display: none;
}

.planner-calendar--month .planner-day-heading strong {
  font-size: 13px;
}

.planner-calendar--month .planner-day-items {
  max-height: 126px;
  overflow: auto;
  padding: 8px;
}

.planner-unscheduled {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.planner-unscheduled--odd-jobs {
  border-left: 4px solid #557c78;
}

.planner-unscheduled-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.planner-unscheduled-heading h3 {
  margin: 0;
  font-size: 18px;
}

.planner-unscheduled-heading > div {
  min-width: 0;
}

.planner-unscheduled-heading small {
  display: block;
  margin-top: 2px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-unscheduled-heading span {
  display: grid;
  min-width: 32px;
  min-height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.planner-unscheduled-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.planner-agenda-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 18px 38px rgba(8, 34, 54, 0.08);
}

.planner-agenda-heading span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.planner-agenda-heading h3 {
  margin: 6px 0 4px;
  font-size: 22px;
  line-height: 1.05;
}

.planner-agenda-heading p,
.planner-agenda-empty {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  font-weight: 850;
}

.planner-agenda-group {
  display: grid;
  gap: 8px;
}

.planner-agenda-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.planner-agenda-list {
  display: grid;
  gap: 8px;
}

.planner-agenda-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(242, 245, 247, 0.62);
  padding: 10px;
  cursor: pointer;
}

.planner-agenda-item > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
}

.planner-agenda-item--watch > span {
  background: #32779b;
}

.planner-agenda-item--oddJob > span {
  background: #557c78;
}

.planner-agenda-item--navWatch > span {
  background: #0b4f6f;
}

.planner-agenda-item--safety > span {
  background: var(--green);
}

.planner-agenda-item strong,
.planner-agenda-item small {
  display: block;
  min-width: 0;
}

.planner-agenda-item strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.planner-agenda-item small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.planner-agenda-item em {
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.planner-column {
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}

.planner-column-heading {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 245, 247, 0.9);
}

.planner-column-heading h3 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.planner-column-heading span {
  display: block;
  margin-top: 3px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
}

.planner-column-heading strong {
  display: grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}

.planner-column-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.planner-column-empty,
.planner-empty {
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.planner-item-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 14px 36px rgba(9, 32, 54, 0.08);
  cursor: pointer;
}

.planner-calendar-item {
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  padding: 12px;
  box-shadow: none;
}

.planner-calendar-item--job {
  border-left-color: var(--gold);
}

.planner-calendar-item--oddJob {
  border-left-color: #557c78;
  background: linear-gradient(180deg, rgba(85, 124, 120, 0.1), #fff 56%);
}

.planner-calendar-item--task {
  border-left-color: var(--green);
}

.planner-calendar-item--watch {
  border-left-color: #32779b;
  background: linear-gradient(180deg, rgba(50, 119, 155, 0.08), #fff 54%);
}

.planner-calendar-item--navWatch {
  border-left-color: #0b4f6f;
  background: linear-gradient(180deg, rgba(11, 79, 111, 0.1), #fff 56%);
}

.planner-calendar-item--safety {
  border-left-color: var(--green);
  background: linear-gradient(180deg, rgba(47, 95, 77, 0.08), #fff 54%);
}

.planner-calendar--month .planner-calendar-item {
  gap: 5px;
  border-radius: 10px;
  padding: 8px;
}

.planner-calendar--week .planner-card-meta,
.planner-calendar--week .planner-card-footer {
  display: none;
}

.planner-calendar--week .planner-calendar-item {
  gap: 8px;
}

.planner-calendar--week .planner-calendar-item h4 {
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0;
}

.planner-calendar--week .planner-calendar-item p {
  font-size: 12px;
  line-height: 1.25;
}

.planner-calendar--month .planner-card-top,
.planner-calendar--month .planner-card-meta,
.planner-calendar--month .planner-card-footer,
.planner-calendar--month .planner-calendar-item p {
  display: none;
}

.planner-calendar--month .planner-calendar-item h4 {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
}

.planner-item-card:focus-visible {
  outline: 3px solid rgba(209, 170, 71, 0.32);
  outline-offset: 3px;
}

.planner-card-top,
.planner-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.planner-card-top {
  justify-content: space-between;
}

.planner-item-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.planner-item-card p {
  margin: 0;
  color: var(--steel);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.planner-watch-crew {
  color: var(--ink) !important;
  font-weight: 900 !important;
}

.planner-card-meta {
  display: grid;
  gap: 7px;
  margin: 0;
}

.planner-card-meta div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}

.planner-card-meta dt {
  color: var(--steel);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.planner-card-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.planner-priority,
.planner-card-warning {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-priority--high {
  background: rgba(155, 58, 52, 0.12);
  color: var(--red);
}

.planner-priority--medium {
  background: rgba(209, 170, 71, 0.18);
  color: var(--ink);
}

.planner-priority--low {
  background: rgba(47, 95, 77, 0.12);
  color: var(--green);
}

.planner-card-warning {
  background: rgba(155, 58, 52, 0.1);
  color: var(--red);
}

.planner-complete-check {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 245, 247, 0.82);
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.planner-complete-check--done {
  border-color: rgba(47, 95, 77, 0.2);
  background: rgba(47, 95, 77, 0.12);
  color: var(--green);
}

.planner-watch-field[hidden] {
  display: none;
}

.planner-modal-panel {
  width: min(100%, 900px);
}

.planner-feed-panel {
  width: min(100%, 760px);
}

.planner-feed-card {
  display: grid;
  gap: 18px;
}

.planner-feed-categories {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.planner-feed-categories legend {
  padding: 0 8px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.planner-feed-card .planner-feed-categories label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.planner-feed-categories input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.planner-feed-card label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-feed-card textarea {
  min-height: 112px;
  resize: vertical;
  text-transform: none;
  letter-spacing: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.systems-equipment-card {
  overflow: visible;
}

.systems-equipment-board {
  display: grid;
  gap: 12px;
  padding: 0 22px 28px;
}

.systems-register-tabs {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  padding: 6px;
}

.systems-register-tab {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--steel);
  padding: 0 18px;
  font-weight: 950;
  cursor: pointer;
}

.systems-register-tab span {
  font-size: 14px;
}

.systems-register-tab strong {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(224, 231, 234, 0.82);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.systems-register-tab.is-active {
  background: var(--navy);
  color: #fff;
}

.systems-register-tab.is-active strong {
  background: var(--gold);
  color: var(--ink);
}

.systems-register-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.systems-register-header,
.systems-register-summary {
  display: grid;
  align-items: center;
  column-gap: 14px;
}

.systems-register-grid--systems {
  grid-template-columns: minmax(240px, 1.4fr) minmax(118px, 0.62fr) minmax(140px, 0.82fr) minmax(96px, 0.4fr) minmax(72px, 0.32fr);
}

.systems-register-grid--equipment,
.systems-register-grid--components {
  grid-template-columns: minmax(230px, 1.24fr) minmax(160px, 0.84fr) minmax(126px, 0.54fr) minmax(150px, 0.72fr) minmax(110px, 0.42fr) minmax(110px, 0.42fr);
}

.systems-register-header {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0 18px;
}

.systems-register-header span {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.systems-register-body {
  display: grid;
}

.systems-register-row {
  border-bottom: 1px solid var(--line);
}

.systems-register-row:last-child {
  border-bottom: 0;
}

.systems-register-row > summary {
  list-style: none;
}

.systems-register-row > summary::-webkit-details-marker {
  display: none;
}

.systems-register-summary {
  min-height: 54px;
  padding: 8px 18px;
  background: #fff;
  color: var(--ink);
}

.systems-register-row[open] > .systems-register-summary,
.systems-register-button-row:hover {
  background: rgba(246, 248, 247, 0.92);
}

.systems-register-name {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.systems-register-expander {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(224, 231, 234, 0.85);
  color: var(--ink);
}

.systems-register-expander::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
}

.systems-register-row[open] .systems-register-expander {
  background: var(--navy);
  color: #fff;
}

.systems-register-row[open] .systems-register-expander::before {
  transform: rotate(45deg);
}

.systems-register-button-row .systems-register-expander {
  visibility: hidden;
}

.systems-register-title {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.systems-register-title strong,
.systems-register-name > div strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.systems-register-title small,
.systems-register-name > div small,
.systems-register-meta small {
  overflow: hidden;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.systems-register-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.systems-register-meta strong,
.systems-register-text {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.systems-register-text {
  color: var(--steel);
  font-weight: 760;
}

.systems-register-expanded {
  border-top: 1px solid rgba(204, 213, 219, 0.7);
  background: rgba(246, 248, 247, 0.72);
  padding: 8px 18px 12px 56px;
}

.systems-register-nested-list {
  display: grid;
  gap: 6px;
}

.systems-register-nested-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 7px 10px;
  text-align: left;
}

.systems-register-nested-row strong,
.systems-register-nested-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.systems-register-nested-row strong {
  color: var(--ink);
  font-size: 13px;
}

.systems-register-nested-row small,
.systems-register-empty {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.systems-register-empty {
  margin: 0;
}

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

.systems-summary-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.systems-summary-card span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.systems-summary-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.systems-list {
  display: grid;
  gap: 14px;
}

.system-group {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
  box-shadow: 0 18px 46px rgba(9, 32, 54, 0.08);
}

.system-group--unassigned {
  border-style: dashed;
  background: rgba(246, 248, 247, 0.86);
}

.system-group__header,
.system-meta-pills,
.equipment-chip-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.system-group__header {
  justify-content: space-between;
}

.system-title-button {
  display: grid;
  gap: 2px;
  text-align: left;
}

.system-title-button--static {
  cursor: default;
}

.system-title-button span,
.equipment-chip span,
.technical-linked-row span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-title-button strong {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.system-group p {
  max-width: 86ch;
  margin: 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.35;
}

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

.system-mini-meta div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.system-mini-meta dt,
.system-mini-meta dd {
  margin: 0;
}

.system-mini-meta dt {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-mini-meta dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.system-equipment-toggle {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 248, 247, 0.74);
  padding: 0;
}

.system-equipment-toggle summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.system-equipment-toggle summary::-webkit-details-marker {
  display: none;
}

.system-equipment-toggle__arrow {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.system-equipment-toggle__arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
}

.system-equipment-toggle[open] .system-equipment-toggle__arrow {
  transform: rotate(90deg);
}

.system-equipment-toggle summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.system-equipment-toggle summary small {
  margin-left: auto;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.system-equipment-toggle .equipment-chip-list {
  padding: 0 12px 12px;
}

.equipment-chip {
  display: grid;
  min-width: 220px;
  max-width: 280px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.equipment-chip strong,
.technical-linked-row strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.equipment-chip small,
.technical-linked-row small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.equipment-chip em,
.technical-linked-row em {
  color: var(--steel);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equipment-system-summary-link {
  display: inline-block;
  margin: 0 10px 6px 0;
}

.equipment-system-link-editor {
  display: grid;
  gap: 10px;
}

.equipment-system-link-editor > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.equipment-system-link-editor > small {
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
}

.equipment-system-link-editor--tile {
  gap: 8px;
}

.equipment-system-link-editor--tile label {
  display: grid;
  gap: 5px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.equipment-system-link-editor--tile select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 8px 10px;
  text-transform: none;
}

.equipment-system-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-system-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 10px 8px 14px;
}

.equipment-system-chip small {
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equipment-system-remove {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f5e7e2;
  color: #a53b35;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.equipment-system-empty {
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
}

.technical-link-cell {
  font-size: 14px;
  line-height: 1.2;
}

.technical-edit-grid {
  align-items: start;
}

.technical-linked-list {
  display: grid;
  gap: 10px;
}

.technical-equipment-list--scroll {
  max-height: calc((64px * 5) + (10px * 4) + 2px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.technical-equipment-list--scroll::-webkit-scrollbar {
  width: 10px;
}

.technical-equipment-list--scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef2f5;
}

.technical-equipment-list--scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f5;
  border-radius: 999px;
  background: rgba(10, 34, 54, 0.36);
}

.inventory-location-groups {
  display: grid;
  gap: 18px;
}

.inventory-location-group {
  display: grid;
  gap: 10px;
}

.inventory-location-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.inventory-location-group header strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.inventory-location-group header span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.technical-linked-row {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) minmax(170px, 1fr) 150px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.inventory-location-row {
  grid-template-columns: 120px minmax(220px, 1fr) minmax(240px, 1fr) 170px;
}

.technical-system-page {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 28px);
}

.job-detail-view .technical-system-page {
  width: min(calc(100% - 36px), 1720px);
  margin: 0 auto;
}

.technical-system-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px) auto;
  gap: 14px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.technical-system-title-block {
  min-width: 0;
}

.technical-system-title-block .eyebrow {
  margin: 0 0 4px;
}

.technical-system-title-block h2 {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 4vw, 64px);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.technical-system-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.technical-system-search {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.technical-system-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 10px 14px;
  text-transform: none;
}

.technical-system-page__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.technical-system-page__layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

:where(.technical-equipment-page, .technical-component-page) .technical-system-page__layout {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
}

.technical-system-details-card,
.technical-system-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.technical-system-details-card {
  display: grid;
  gap: 0;
}

.technical-system-card-heading,
.technical-system-tile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.72);
  padding: 10px 14px;
}

.technical-system-card-heading h3,
.technical-system-tile__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
}

.technical-system-card-heading p {
  margin: 3px 0 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.technical-system-card-heading span,
.technical-system-tile__header span {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.technical-system-details-card .technical-edit-grid,
.technical-system-details-card .worklist-detail-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}

.technical-system-details-card .technical-edit-grid label,
.technical-system-details-card .worklist-detail-readonly-grid .property-card {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
}

.technical-system-details-card .technical-edit-grid label:nth-child(2n),
.technical-system-details-card .worklist-detail-readonly-grid .property-card:nth-child(2n) {
  border-right: 0;
}

.technical-system-details-card .technical-edit-grid label.wide-field,
.technical-system-details-card .worklist-detail-readonly-grid .property-card.wide-field {
  grid-column: 1 / -1;
  border-right: 0;
}

.technical-system-details-card .technical-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.technical-system-details-card .technical-edit-grid input,
.technical-system-details-card .technical-edit-grid select,
.technical-system-details-card .technical-edit-grid textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 8px 10px;
  text-transform: none;
}

.technical-system-details-card .technical-edit-grid textarea {
  min-height: 84px;
  resize: vertical;
}

.technical-system-details-card .technical-edit-grid textarea:not(.short-textarea) {
  min-height: 112px;
}

.technical-equipment-page .technical-system-details-card .technical-edit-grid,
.technical-equipment-page .technical-system-details-card .worklist-detail-readonly-grid,
.technical-component-page .technical-system-details-card .technical-edit-grid,
.technical-component-page .technical-system-details-card .worklist-detail-readonly-grid {
  gap: 1px;
  background: var(--line);
}

.technical-equipment-page .technical-system-details-card .technical-edit-grid label,
.technical-equipment-page .technical-system-details-card .worklist-detail-readonly-grid .property-card,
.technical-component-page .technical-system-details-card .technical-edit-grid label,
.technical-component-page .technical-system-details-card .worklist-detail-readonly-grid .property-card {
  border: 0;
  background: #fff;
}

.technical-system-details-card--search-match {
  box-shadow: 0 0 0 3px rgba(209, 170, 71, 0.18);
}

.technical-system-details-card--search-miss {
  opacity: 0.58;
}

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

.technical-system-tile {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 226px;
}

.technical-system-tile__header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.technical-system-tile__header[data-expand-system-tile] {
  cursor: pointer;
}

.technical-system-tile__header[data-expand-system-tile]:hover,
.technical-system-tile__header[data-expand-system-tile]:focus-visible {
  background: #eef2f3;
  outline: none;
}

.technical-system-tile__header[data-expand-system-tile]:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(209, 170, 71, 0.38);
}

.technical-system-tile__header > .technical-system-tile__header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.technical-system-tile__expand-icon {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--steel);
}

.technical-system-tile__expand-icon::before {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
}

.technical-system-tile__expand-icon::after {
  position: absolute;
  top: 10px;
  right: 7px;
  width: 10px;
  height: 2px;
  background: currentColor;
  content: "";
  transform: rotate(-45deg);
  transform-origin: right center;
}

.technical-system-tile.is-expanded {
  position: fixed;
  inset: clamp(10px, 3vw, 42px);
  z-index: 1200;
  width: auto;
  height: auto;
  max-height: none;
  box-shadow: 0 0 0 100vmax rgba(4, 18, 30, 0.62), 0 24px 80px rgba(4, 18, 30, 0.3);
}

.technical-system-tile.is-expanded .technical-system-tile__header {
  min-height: 66px;
}

.technical-system-tile.is-expanded .technical-system-tile__body {
  padding: 14px;
}

.technical-system-tile.is-expanded .technical-system-tile__expand-icon {
  transform: rotate(180deg);
}

body.technical-system-tile-expanded {
  overflow: hidden;
}

.technical-system-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.technical-system-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  padding: 0 0 3px;
  text-align: center;
}

.technical-system-add-button:hover,
.technical-system-add-button:focus-visible {
  background: #c79d35;
  outline: 3px solid rgba(209, 170, 71, 0.28);
  outline-offset: 2px;
}
.technical-system-media-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.technical-system-media-actions .technical-system-add-button {
  width: 40px;
  height: 40px;
  font-size: 28px;
}

.technical-system-tile__body {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  scrollbar-gutter: stable;
}

.technical-system-jobs-tabs {
  display: grid;
  gap: 8px;
}

.technical-system-jobs-tablist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.technical-system-jobs-tab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef2f5;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  gap: 8px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  padding: 8px 11px;
  text-align: left;
}

.technical-system-jobs-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-system-jobs-tab b {
  color: inherit;
  font-size: 13px;
  line-height: 1;
}

.technical-system-jobs-tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.technical-system-jobs-panel {
  display: grid;
  gap: 8px;
}

.technical-system-jobs-panel[hidden] {
  display: none !important;
}

.technical-system-jobs-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.technical-system-jobs-actions [data-system-jobs-action] {
  display: inline-flex;
}

.technical-system-jobs-actions [data-system-jobs-action][hidden] {
  display: none !important;
}

.technical-system-tile__body::-webkit-scrollbar {
  width: 10px;
}

.technical-system-tile__body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef2f5;
}

.technical-system-tile__body::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f5;
  border-radius: 999px;
  background: rgba(10, 34, 54, 0.34);
}

.technical-system-rows {
  display: grid;
  gap: 8px;
}

.technical-system-row,
.technical-system-history-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
}

.technical-system-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(0, 0.86fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
}

.technical-system-row--job,
.technical-system-row--equipment {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(96px, 0.34fr);
  gap: 12px;
}

.technical-system-row--inventory {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(92px, 0.34fr);
  gap: 12px;
}

.technical-system-row--accounting {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.recurring-job-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.recurring-job-row-main {
  grid-column: 1 / -1;
  display: grid;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  gap: 3px;
  padding: 0;
  text-align: left;
}

.recurring-job-row-meta {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 2px;
}

.recurring-job-row-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.recurring-job-row-meta--status strong {
  font-size: 12px;
}

.recurring-job-row-meta strong,
.recurring-job-row-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-job-row-actions .inline-button {
  min-height: 30px;
}

.recurring-job-row-actions {
  grid-column: 1 / -1;
  flex-wrap: nowrap;
}

.recurring-job-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.recurring-job-editor label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recurring-job-editor input,
.recurring-job-editor select,
.recurring-job-editor textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 9px;
  text-transform: none;
}

.recurring-job-editor textarea {
  min-height: 76px;
  resize: vertical;
}

.recurring-job-editor .wide-field,
.recurring-job-editor-actions {
  grid-column: 1 / -1;
}

.recurring-job-editor-actions {
  justify-content: flex-end;
}

.technical-system-row:hover,
.technical-system-row:focus-visible {
  border-color: rgba(209, 170, 71, 0.9);
  outline: none;
}

.technical-system-row span,
.technical-system-row em,
.technical-system-history-row em {
  color: var(--steel);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.technical-system-row strong,
.technical-system-history-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.technical-system-row small,
.technical-system-history-row small,
.technical-system-history-row p {
  min-width: 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.technical-system-row--file {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
}

.technical-system-row--file > div:first-of-type {
  display: grid;
  gap: 3px;
}

.technical-system-details-card .equipment-system-link-editor {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
}

.technical-system-media-stack {
  display: grid;
  gap: 10px;
}

.technical-system-media-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.technical-system-media-group h4 {
  margin: 0;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}
.technical-system-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.technical-system-photo-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(245, 241, 232, 0.54);
}

.technical-system-photo-tile a {
  display: block;
  min-width: 0;
}

.technical-system-photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.technical-system-photo-tile figcaption {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px 8px;
}

.technical-system-photo-tile figcaption strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.technical-system-photo-tile figcaption small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.technical-system-photo-delete {
  top: 6px;
  right: 6px;
}

.technical-system-row__actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2 / -1;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.technical-system-money-summary {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  border: 1px solid rgba(209, 170, 71, 0.36);
  border-radius: 10px;
  background: rgba(245, 241, 232, 0.64);
  padding: 8px 10px;
}

.technical-system-money-summary span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
}

.technical-system-money-summary small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
}

.technical-system-history-row {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
}

.technical-system-history-row--compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  cursor: pointer;
  font: inherit;
}

.technical-system-history-row--compact:hover,
.technical-system-history-row--compact:focus-visible {
  border-color: rgba(209, 170, 71, 0.9);
  outline: none;
}

.technical-system-history-row--compact span {
  border-radius: 999px;
  background: rgba(220, 231, 225, 0.76);
  color: #2f6a52;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.technical-system-history-row__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.technical-system-history-row__top > span {
  border-radius: 999px;
  background: rgba(220, 231, 225, 0.76);
  color: #2f6a52;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technical-system-history-list .history-photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.technical-history-modal {
  position: fixed;
  inset: 0;
  z-index: 68;
  display: grid;
  place-items: center;
  padding: 22px;
}

.technical-history-modal[hidden] {
  display: none;
}

.technical-history-modal .modal-backdrop {
  border: 0;
  cursor: pointer;
}

.technical-history-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(100%, 820px);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 38px);
}

.technical-history-panel > .close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  margin: 0;
}

.technical-history-panel__header {
  display: grid;
  gap: 8px;
  padding-right: 58px;
}

.technical-history-panel__header span {
  width: max-content;
  border-radius: 999px;
  background: rgba(220, 231, 225, 0.76);
  color: #2f6a52;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technical-history-panel__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
}

.technical-history-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.technical-history-details div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.technical-history-details div:nth-child(2n) {
  border-right: 0;
}

.technical-history-details dt,
.technical-history-section h4 {
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.technical-history-details dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.technical-history-section {
  display: grid;
  gap: 10px;
}

.technical-history-section .history-photo-grid {
  margin-top: 0;
}

.technical-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.technical-system-history-list .history-photo-grid figure,
.technical-system-history-list .history-file-chip {
  border-radius: 8px;
}

.technical-system-history-list .history-photo-grid img {
  aspect-ratio: 4 / 3;
}

.technical-system-upload {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  border: 1px dashed rgba(9, 32, 54, 0.24);
  border-radius: 10px;
  background: rgba(232, 237, 242, 0.42);
  color: var(--steel);
  padding: 10px;
  font-size: 12px;
  font-weight: 900;
}

.technical-system-upload input {
  width: 100%;
  min-height: 38px;
  color: var(--ink);
  font-weight: 850;
}

.technical-system-empty,
.technical-system-empty-search {
  padding: 10px;
}

.technical-system-page [hidden] {
  display: none !important;
}

.technical-system-page__actions .primary-button,
.technical-system-page__actions .danger-button,
.technical-system-tile__header .inline-button,
.technical-system-add-button,
.technical-system-row__actions .inline-button,
.technical-system-upload input::file-selector-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.technical-system-tile__header .inline-button {
  min-width: 74px;
  min-height: 38px;
  flex: 0 0 auto;
}

.technical-system-row__actions .inline-button {
  min-height: 30px;
}

.technical-system-save-note {
  margin: 0;
}

.technical-component-list {
  display: grid;
  gap: 10px;
}

.technical-component-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
}

.technical-component-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.technical-component-editor__header strong {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technical-component-delete {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
  background: #f3f5f7;
  color: var(--ink);
  font-size: 18px;
}

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

.technical-component-editor__grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technical-component-editor__grid input,
.technical-component-editor__grid select,
.technical-component-editor__grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 9px 10px;
  text-transform: none;
}

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

.technical-component-editor__grid textarea {
  min-height: 64px;
  resize: vertical;
}

@media (max-width: 1320px) {
  .technical-system-page__header {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  }

  .technical-system-page__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

}

@media (max-width: 900px) {
  .technical-system-page__header,
  .technical-system-context-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .technical-system-details-card .technical-edit-grid,
  .technical-system-details-card .worklist-detail-readonly-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .technical-system-details-card .technical-edit-grid label,
  .technical-system-details-card .worklist-detail-readonly-grid .property-card {
    border-right: 0;
  }

  .technical-system-row {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
  }

  .technical-system-row small,
  .technical-system-row em,
  .technical-system-row__actions {
    grid-column: 2 / -1;
  }

  .technical-component-editor__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .technical-system-page__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Finder-style Files navigation and interaction layer. */
.file-navigationbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  margin: 0 20px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #f7f9fa;
  padding: 6px 8px;
}

.file-navigationbar__history {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.file-navigation-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--steel);
  cursor: pointer;
  font: inherit;
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
  padding: 0;
}

.file-navigation-button:hover,
.file-navigation-button:focus-visible,
.file-navigation-button.is-active {
  background: rgba(9, 32, 54, 0.08);
  color: var(--ink);
  outline: 0;
}

.file-navigation-button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(11, 101, 216, 0.34);
}

.file-navigation-button:disabled {
  background: transparent;
  color: var(--muted);
  cursor: default;
  opacity: 0.36;
}

.file-navigation-button--inspector {
  border: 1px solid rgba(9, 32, 54, 0.16);
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 800;
}

.file-pathbar {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  white-space: nowrap;
}

.file-pathbar::-webkit-scrollbar {
  display: none;
}

.file-pathbar__separator {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 16px;
  padding: 0 2px;
}

.file-breadcrumb__item {
  flex: 0 0 auto;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--steel);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 7px;
}

.file-breadcrumb__item:hover,
.file-breadcrumb__item:focus-visible {
  background: rgba(9, 32, 54, 0.07);
  color: var(--ink);
  outline: 0;
}

.file-breadcrumb__item.is-current {
  color: var(--ink);
  font-weight: 950;
}

.files-board .file-browser {
  height: clamp(420px, calc(100dvh - 300px), 720px);
  min-height: 420px !important;
  border-radius: 0 0 14px 14px;
}

.files-board .file-browser.is-inspector-hidden {
  grid-template-columns: minmax(0, 1fr) !important;
}

.files-board .file-column-strip {
  min-height: 0 !important;
  height: 100%;
  scroll-behavior: smooth;
  scrollbar-color: rgba(9, 32, 54, 0.28) transparent;
  scrollbar-width: thin;
}

.files-board .file-column__list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(9, 32, 54, 0.24) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.files-board .file-column__heading::after {
  content: none !important;
}

.files-board [data-file-browser-row]:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(11, 101, 216, 0.46) !important;
  outline: 0;
}

@media (max-width: 1080px) {
  .files-board .file-browser {
    height: auto;
    min-height: 0 !important;
  }

  .files-board .file-column-strip {
    min-height: 420px !important;
    height: 52vh;
  }
}

@media (max-width: 720px) {
  .file-navigationbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    margin: 0 12px;
    padding: 5px 6px;
  }

  .file-navigation-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .file-breadcrumb__item {
    padding: 0 5px;
  }

  .files-board .file-column-strip {
    min-height: 330px !important;
    height: 48vh;
    scroll-snap-type: x mandatory;
  }
}

/* Compact detail workspaces: approved Crew A and Vessel A directions. */
.crew-profile-header--compact {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
}

.crew-profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.crew-profile-header--compact .crm-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid rgba(209, 170, 71, 0.58);
  border-radius: 50%;
  background: #102d47;
  font-size: 18px;
}

.crew-profile-header--compact h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 0.98;
}

.crew-profile-header--compact .eyebrow,
.crew-profile-header--compact p {
  margin: 0;
}

.crew-profile-header-status {
  display: grid;
  width: min(410px, 42vw);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

.crew-profile-header-status .crew-status-choice {
  min-height: 38px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-size: 13px;
}

.crew-profile-header-status .crew-status-choice:last-child {
  border-right: 0;
}

.crew-profile-header-status .crew-status-choice.is-selected {
  background: var(--gold);
  color: var(--ink);
  box-shadow: none;
}

.crew-profile-layout--compact {
  grid-template-columns: minmax(380px, 1.2fr) minmax(300px, 0.9fr) minmax(230px, 0.62fr);
  gap: 10px;
  margin: 10px 0 0;
}

.crew-profile-layout--compact > .overview-card,
.crew-profile-layout--compact > .crew-compact-summary {
  height: min(610px, calc(100vh - 275px));
  min-height: 430px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.crew-profile-layout--compact .crew-personal-card,
.crew-profile-layout--compact .crew-files-card {
  padding: 14px;
}

.crew-profile-layout--compact .crm-section-heading,
.crew-profile-layout--compact .crew-files-card > h3 {
  position: sticky;
  z-index: 2;
  top: -14px;
  margin: -14px -14px 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.crew-profile-layout--compact .crm-section-heading p,
.crew-profile-layout--compact .crew-files-card > p {
  display: none;
}

.crew-profile-layout--compact .crew-info-row {
  min-height: 42px;
  padding: 5px 0;
}

.crew-profile-layout--compact .crew-document-card,
.crew-profile-layout--compact .crew-file-card {
  min-height: 0;
  padding: 9px 10px;
  border-radius: 6px;
}

.crew-compact-summary {
  display: grid;
  align-content: start;
  background: #fff;
}

.crew-compact-summary section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.crew-compact-summary section:last-child {
  border-bottom: 0;
}

.crew-compact-summary__metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}

.crew-compact-summary__metric strong {
  color: var(--ink);
  font-size: 28px;
}

.crew-compact-summary__metric small,
.crew-compact-summary__row span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.crew-compact-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid rgba(218, 223, 226, 0.72);
}

.crew-compact-summary__row strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}

.crew-compact-summary__status {
  margin: 9px 0;
}

.vessel-passport-hero--compact {
  min-height: 66px;
  align-items: center;
  padding: 7px 8px;
}

.vessel-passport-hero--compact .vessel-passport-title h2 {
  font-size: clamp(30px, 3.2vw, 48px);
}

.vessel-passport-hero--compact .eyebrow {
  display: none;
}

.vessel-passport-strip .vessel-detail-field {
  min-height: 58px;
  padding: 7px 10px;
}

.vessel-passport-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.2fr);
  gap: 10px;
  min-height: 0;
}

.vessel-passport-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.vessel-passport-grid--compact .vessel-passport-card {
  height: min(620px, calc(100vh - 255px));
  min-height: 460px;
}

.vessel-passport-grid--compact .vessel-details-grid,
.vessel-passport-grid--compact .vessel-passport-card--build .vessel-details-grid {
  display: block;
  height: calc(100% - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vessel-passport-grid--compact .vessel-passport-card .vessel-detail-field,
.vessel-passport-grid--compact .vessel-passport-card--safety .vessel-detail-field,
.vessel-passport-grid--compact .vessel-passport-card--build .vessel-detail-field {
  display: grid;
  min-height: 45px;
  grid-template-columns: minmax(92px, 0.82fr) minmax(0, 1.18fr);
  gap: 7px;
  align-items: center;
  padding: 5px 8px;
  border-right: 0;
}

.vessel-passport-grid--compact .vessel-detail-field > span {
  font-size: 10px;
  line-height: 1.2;
}

.vessel-passport-grid--compact .vessel-detail-field input,
.vessel-passport-grid--compact .vessel-detail-field textarea {
  min-width: 0;
  min-height: 31px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 12px;
}

.vessel-passport-grid--compact .vessel-detail-field textarea {
  min-height: 52px;
}

.vessel-passport-grid--compact .vessel-detail-field--wide {
  grid-template-columns: 1fr;
}

.vessel-passport-grid--compact .vessel-equipment-links {
  grid-column: 1 / -1;
}

.vessel-particulars-status {
  height: min(620px, calc(100vh - 255px));
  min-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.vessel-particulars-status__heading,
.vessel-particulars-status section {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.vessel-particulars-status__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vessel-particulars-status__heading strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.vessel-particulars-status h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 13px;
}

.vessel-particulars-status p {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid rgba(218, 223, 226, 0.72);
  color: var(--steel);
  font-size: 11px;
}

.vessel-particulars-status p > span {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.vessel-particulars-status p strong,
.vessel-particulars-status p small {
  grid-column: 2;
}

@media (max-width: 1180px) {
  .crew-profile-layout--compact {
    grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 0.9fr);
  }

  .crew-compact-summary {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crew-compact-summary section {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .vessel-passport-workspace {
    grid-template-columns: 1fr;
  }

  .vessel-particulars-status {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .crew-profile-header--compact {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-profile-header-status {
    width: 100%;
  }

  .crew-profile-layout--compact,
  .vessel-passport-grid--compact {
    grid-template-columns: 1fr;
  }

  .crew-profile-layout--compact > .overview-card,
  .crew-profile-layout--compact > .crew-compact-summary,
  .vessel-passport-grid--compact .vessel-passport-card {
    height: auto;
    min-height: 0;
  }

  .crew-compact-summary,
  .vessel-particulars-status {
    grid-template-columns: 1fr;
  }

  .vessel-passport-grid--compact .vessel-details-grid,
  .vessel-passport-grid--compact .vessel-passport-card--build .vessel-details-grid {
    height: auto;
    max-height: none;
  }
}

/* Compact crew leave and payroll workspaces. Keep after legacy payroll rules. */
.crew-leave-compact-page,
.crew-payroll-compact-page {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.crew-leave-compact-page > .overview-card,
.crew-payroll-compact-page > .overview-card,
.crew-payroll-support-grid > .overview-card {
  margin-top: 0;
  padding: 14px;
  border-radius: 8px;
}

.crew-admin-heading {
  align-items: center;
  margin-bottom: 10px;
}

.crew-admin-heading h3,
.crew-leave-compact-page .overview-card h3,
.crew-payroll-compact-page .overview-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.crew-admin-heading p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
}

.crew-admin-metrics {
  display: grid;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
}

.crew-leave-summary.crew-admin-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.crew-payroll-summary.crew-admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crew-admin-metrics article {
  min-width: 0;
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.crew-admin-metrics article:last-child {
  border-right: 0;
}

.crew-admin-metrics article span,
.crew-leave-current-status span {
  display: block;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.crew-admin-metrics article strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-admin-metrics .crew-admin-metric--emphasis {
  background: rgba(213, 173, 70, 0.16);
}

.crew-leave-current-status {
  min-width: 112px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  text-align: right;
}

.crew-leave-current-status strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
}

.crew-leave-control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  gap: 12px;
  margin-top: 10px;
}

.crew-leave-control-panel,
.crew-leave-current-panel {
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.crew-payroll-subheading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.crew-payroll-subheading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.crew-payroll-subheading p {
  margin: 0;
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
}

.crew-leave-entitlement-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.crew-leave-entitlement-grid .crew-payroll-field {
  grid-template-rows: auto auto;
}

.crew-leave-entitlement-grid .crew-payroll-field--wide {
  grid-column: 1 / -1;
}

.crew-leave-current-panel .crew-info-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 6px;
}

.crew-leave-current-panel .crew-info-row {
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 38px;
  border-right: 1px solid var(--line-strong);
}

.crew-leave-current-panel .crew-info-row:nth-child(3) {
  border-right: 0;
}

.crew-leave-current-panel .crew-info-row:nth-child(n + 4) {
  grid-column: 1 / -1;
  border-right: 0;
}

.crew-leave-current-panel .crew-info-row > span,
.crew-leave-current-panel .crew-info-row--static > strong {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 10px;
}

.crew-leave-current-panel .crew-info-row input,
.crew-leave-current-panel .crew-info-row select,
.crew-leave-current-panel .crew-info-row textarea {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
}

.crew-leave-current-panel .crew-info-row textarea {
  height: 42px;
  min-height: 42px;
}

.crew-payroll-field {
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.crew-payroll-field input,
.crew-payroll-field select,
.crew-payroll-field textarea,
.crew-payroll-expense-form input,
.crew-payroll-expense-form select,
.crew-payroll-leave-form input,
.crew-payroll-leave-form select {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.crew-payroll-field textarea {
  height: 58px;
  min-height: 58px;
}

.crew-payroll-contract-heading {
  margin: 9px 0 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.crew-payroll-profile-grid.crew-payroll-contract-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.crew-payroll-contract-grid .crew-payroll-field--wide {
  grid-column: span 2;
}

.crew-payroll-register-card .crew-payroll-table,
.crew-leave-periods-card .crew-payroll-leave-table {
  max-height: min(330px, 42vh);
  overflow: auto;
}

.crew-payroll-table,
.crew-payroll-expense-table,
.crew-payroll-leave-table {
  border-radius: 6px;
}

.crew-payroll-row,
.crew-payroll-expense-row,
.crew-payroll-leave-row {
  min-width: 980px;
  gap: 8px;
  padding: 9px 10px;
  font-size: 12px;
}

.crew-payroll-row--head,
.crew-payroll-expense-row--head,
.crew-payroll-leave-row--head {
  position: sticky;
  z-index: 1;
  top: 0;
  font-size: 9px;
}

.crew-payroll-leave-row {
  min-width: 1040px;
}

.crew-payroll-leave-row input,
.crew-payroll-leave-row select {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 11px;
}

.crew-payroll-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crew-payroll-support-grid > .overview-card {
  min-width: 0;
}

.crew-payroll-support-grid .crew-payroll-expense-table,
.crew-payroll-support-grid .crew-payroll-leave-table {
  max-height: 290px;
  overflow: auto;
}

.crew-payroll-record-detail {
  margin-top: 0;
}

.crew-payroll-record-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.crew-payroll-record-grid .crew-payroll-field--wide {
  grid-column: span 2;
}

.crew-payroll-posting {
  gap: 7px;
  margin-top: 10px;
}

.crew-payroll-posting article,
.crew-payroll-attachment-list a {
  gap: 3px;
  padding: 10px;
  border-radius: 6px;
}

.crew-payroll-attachments,
.crew-payroll-history {
  gap: 7px;
  margin-top: 12px;
}

.crew-payroll-expense-form,
.crew-payroll-leave-form {
  margin-bottom: 8px;
  padding: 9px 10px;
  border-radius: 6px;
}

.crew-payroll-expense-form-grid,
.crew-payroll-leave-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.crew-payroll-expense-form-grid > *,
.crew-payroll-leave-form-grid > * {
  min-width: 0;
}

.crew-payroll-expense-form-grid > label,
.crew-payroll-leave-form-grid > label,
.crew-payroll-expense-receipt {
  display: grid;
  grid-template-rows: auto 36px;
  gap: 4px;
  align-self: start;
  color: var(--slate);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-payroll-expense-form-grid input,
.crew-payroll-expense-form-grid select,
.crew-payroll-leave-form-grid input,
.crew-payroll-leave-form-grid select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.crew-payroll-expense-form-grid .crew-payroll-check {
  display: flex;
  min-height: 36px;
  align-self: end;
}

.crew-payroll-expense-form-grid .crew-payroll-check input {
  width: 22px;
  min-width: 22px;
  height: 22px;
}

.crew-payroll-leave-notes {
  grid-column: span 3;
}

.crew-payroll-form-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
  min-height: 64px;
  align-self: end;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.crew-payroll-form-footer .primary-button {
  min-width: 150px;
  min-height: 40px;
  justify-self: end;
}

.crew-payroll-expense-receipt {
  max-width: 320px;
}

.crew-payroll-expense-receipt input[type="file"] {
  min-height: 40px;
  padding: 6px 8px;
  text-transform: none;
}

.crew-payroll-leave-form-grid label {
  gap: 4px;
  font-size: 9px;
}

.crew-payroll-form-note {
  font-size: 10px;
}

@media (max-width: 1180px) {
  .crew-leave-summary.crew-admin-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .crew-leave-summary.crew-admin-metrics article:nth-child(4) {
    border-right: 0;
  }

  .crew-leave-control-grid {
    grid-template-columns: 1fr;
  }

  .crew-payroll-profile-grid.crew-payroll-contract-grid,
  .crew-payroll-record-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .crew-payroll-support-grid {
    grid-template-columns: 1fr;
  }

  .crew-payroll-summary.crew-admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crew-payroll-summary.crew-admin-metrics article:nth-child(3) {
    border-right: 0;
  }

  .crew-payroll-profile-grid.crew-payroll-contract-grid,
  .crew-payroll-record-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .crew-admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-payroll-actions {
    justify-content: flex-start;
  }

  .crew-leave-summary.crew-admin-metrics,
  .crew-payroll-summary.crew-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crew-admin-metrics article:nth-child(2n) {
    border-right: 0;
  }

  .crew-leave-current-panel .crew-info-table,
  .crew-payroll-profile-grid.crew-payroll-contract-grid,
  .crew-payroll-record-grid,
  .crew-payroll-expense-form-grid,
  .crew-payroll-leave-form-grid {
    grid-template-columns: 1fr;
  }

  .crew-leave-current-panel .crew-info-row,
  .crew-leave-current-panel .crew-info-row:nth-child(n + 4),
  .crew-payroll-contract-grid .crew-payroll-field--wide,
  .crew-payroll-record-grid .crew-payroll-field--wide,
  .crew-payroll-field--wide,
  .crew-payroll-leave-notes {
    grid-column: auto;
    border-right: 0;
  }

  .crew-payroll-form-footer {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .crew-payroll-form-footer .primary-button,
  .crew-payroll-expense-receipt {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .crew-payroll-subheading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Compact Crew Overview workspace. All profile controls retain their existing
   autosave hooks; this layer only groups and condenses their presentation. */
.crew-profile-layout--compact .crew-personal-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.crew-profile-layout--compact .crew-personal-groups {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.crew-profile-layout--compact .crew-personal-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.crew-profile-layout--compact .crew-personal-group:first-child,
.crew-profile-layout--compact .crew-personal-group[open] {
  grid-column: 1 / -1;
}

.crew-profile-layout--compact .crew-personal-group > summary {
  display: grid;
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  list-style: none;
  background: rgba(244, 247, 249, 0.72);
  color: var(--ink);
}

.crew-profile-layout--compact .crew-personal-group > summary::-webkit-details-marker {
  display: none;
}

.crew-profile-layout--compact .crew-personal-group > summary::after {
  content: "+";
  color: var(--steel);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.crew-profile-layout--compact .crew-personal-group[open] > summary::after {
  content: "-";
}

.crew-profile-layout--compact .crew-personal-group > summary span {
  min-width: 0;
  font-size: 12px;
  font-weight: 950;
}

.crew-profile-layout--compact .crew-personal-group > summary small {
  min-width: 0;
  overflow: hidden;
  color: var(--steel);
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-profile-layout--compact .crew-personal-group[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.crew-profile-layout--compact .crew-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding: 7px;
  border: 0;
  border-radius: 0;
  background: rgba(244, 247, 249, 0.56);
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row--account,
.crew-profile-layout--compact .crew-personal-grid .crew-info-row--wide,
.crew-profile-layout--compact .crew-personal-grid .crew-info-row--notifications {
  grid-column: 1 / -1;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row > span {
  display: block;
  min-height: 0;
  padding: 5px 8px 0;
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row input,
.crew-profile-layout--compact .crew-personal-grid .crew-info-row select,
.crew-profile-layout--compact .crew-personal-grid .crew-info-row textarea {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 1px 8px 5px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row textarea {
  height: 48px;
  min-height: 48px;
  padding-top: 6px;
  resize: vertical;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row--date .date-placeholder-control {
  display: block;
  width: 100%;
  min-height: 28px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row--date input[type="date"] {
  display: block;
  line-height: 22px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-text-fill-color: currentColor;
}

.crew-profile-layout--compact .crew-personal-grid .crew-info-row--account small {
  display: none;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-settings {
  gap: 7px;
  padding: 7px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-email {
  gap: 3px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-email span {
  font-size: 8px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-email input {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-option {
  min-height: 34px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 10px;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
}

.crew-profile-layout--compact .crew-personal-grid .crew-notification-settings > .cell-muted {
  display: none;
}

.crew-profile-layout--compact .crew-compact-summary section {
  padding: 10px 12px;
}

.crew-profile-layout--compact .crew-compact-summary__metric {
  margin: 5px 0;
}

.crew-profile-layout--compact .crew-compact-summary__metric strong {
  font-size: 24px;
}

.crew-profile-layout--compact .crew-compact-summary__row {
  padding: 5px 0;
}

.crew-profile-layout--compact .crew-compact-summary__status {
  margin: 6px 0;
}

@media (max-width: 700px) {
  .crew-profile-layout.crew-profile-layout--compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .crew-profile-layout.crew-profile-layout--compact > .overview-card,
  .crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
    height: auto;
    min-height: 0;
  }

  .crew-profile-layout--compact .crew-personal-card,
  .crew-profile-layout--compact .crew-personal-groups {
    overflow: visible;
  }

  .crew-profile-layout--compact .crew-personal-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .crew-profile-layout--compact .crew-personal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.expense-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(212, 173, 79, 0.16);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.table-link {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(209, 170, 71, 0.85);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.table-input {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.table-input--code {
  min-width: 112px;
  padding-left: 14px;
  padding-right: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.table-input--textarea {
  min-height: 72px;
}

.table-input--select {
  min-height: 56px;
  padding: 0 44px 0 16px;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.9);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--steel) 50%),
    linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 23px,
    calc(100% - 15px) 23px;
  background-repeat: no-repeat;
  background-size: 7px 7px, 7px 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  appearance: none;
}

.table-input--select[multiple],
.worklist-detail-edit-grid select[multiple] {
  min-height: 96px;
  padding: 8px 10px;
  background-image: none;
  line-height: 1.35;
}

.worklist-table .table-input--select {
  min-height: 50px;
  border-radius: 16px;
}

.worklist-table .table-input:not(.table-input--textarea),
.worklist-table .status-menu__summary {
  min-height: 48px;
  border-color: transparent;
  border-radius: 14px;
  background-color: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}

.worklist-table .table-input:not(.table-input--textarea) {
  width: 100%;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worklist-table .status-menu__summary {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.worklist-table select.table-input.table-input--select[data-worklist-field="priority"] {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 16px;
  padding: 0 42px 0 12px;
  background-position:
    calc(100% - 23px) 18px,
    calc(100% - 16px) 18px;
}

.worklist-table .table-input--textarea {
  width: 100%;
  min-height: 82px;
  border-color: transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  box-shadow: none;
}

.worklist-table .table-input:hover,
.worklist-table .table-input:focus,
.worklist-table .status-menu__summary:hover,
.worklist-table .status-menu[open] .status-menu__summary,
.worklist-table .status-menu__summary:focus-visible {
  border-color: var(--line-strong);
  background-color: #fff;
  box-shadow: 0 10px 26px rgba(9, 32, 54, 0.08);
}

.worklist-table .table-input:focus,
.worklist-table .status-menu__summary:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(209, 170, 71, 0.18);
}

.worklist-table td {
  vertical-align: middle;
}

.worklist-detail-edit-grid .table-input--select,
.core-edit-grid select[data-core-field="priority"] {
  min-height: 56px;
}

.status-menu {
  position: relative;
}

.status-menu__summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.status-menu__summary::after {
  content: "⌄";
  color: var(--steel);
  font-size: 14px;
}

.status-menu[open] .status-menu__summary {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(209, 170, 71, 0.18);
}

.status-menu__panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 8px);
  left: 0;
  width: min(280px, 70vw);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(7, 31, 53, 0.18);
}

.status-menu__group {
  display: grid;
  gap: 6px;
}

.status-menu__group + .status-menu__group,
.status-custom-entry {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.status-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.status-option-row:has(.status-option-delete) .status-option {
  grid-column: 1;
}

.status-option,
.status-option-delete,
.status-custom-add {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.status-option {
  width: 100%;
  padding: 0 12px;
  background: rgba(9, 32, 54, 0.06);
  color: var(--ink);
  text-align: left;
}

.status-option.is-selected {
  background: var(--gold);
}

.status-option--custom {
  justify-content: flex-start;
}

.status-option-delete {
  background: rgba(155, 58, 52, 0.1);
  color: var(--red);
}

.status-custom-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.status-custom-input {
  min-height: 38px;
  border-radius: 999px;
  font-size: 13px;
}

.status-custom-add {
  padding: 0 12px;
  background: var(--navy);
  color: #fff;
}

.cell-primary {
  display: block;
  font-weight: 900;
  line-height: 1.25;
}

.record-title-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.record-title-stack > .table-input {
  width: 100%;
  max-width: 100%;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.worklist-add-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.worklist-add-actions .ghost-button,
.worklist-add-actions .primary-button {
  min-height: 44px;
  padding-inline: 20px;
  white-space: nowrap;
}

.worklist-table td {
  padding-block: 8px;
  vertical-align: middle;
}

.worklist-title-stack {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.worklist-title-stack .cell-primary,
.worklist-compact-cell,
.worklist-description-cell,
.worklist-table .technical-link-cell,
.worklist-table .cell-muted {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.worklist-title-stack .cell-primary,
.worklist-compact-cell,
.worklist-table .technical-link-cell,
.worklist-table .cell-muted {
  -webkit-line-clamp: 1;
}

.worklist-description-cell {
  -webkit-line-clamp: 1;
  line-height: 1.35;
}

.worklist-meta-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worklist-meta-line span {
  display: inline;
}

.worklist-type-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 241, 244, 0.92);
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.worklist-type-pill--planned {
  background: rgba(48, 110, 132, 0.12);
  color: #2c6f84;
}

.worklist-type-pill--unplanned {
  background: rgba(209, 170, 71, 0.22);
  color: #7a5a10;
}

.worklist-compact-cell {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}

.worklist-table .job-equipment-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.record-meta-strip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.record-meta-toggle {
  display: grid;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
}

.record-meta-toggle summary {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 10px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(236, 241, 244, 0.82);
  color: var(--steel);
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

.record-meta-toggle summary span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.record-meta-toggle summary::-webkit-details-marker {
  display: none;
}

.record-meta-toggle summary::after {
  content: "+";
  display: grid;
  place-items: center;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.record-meta-toggle[open] summary::after {
  content: "-";
}

.record-meta-toggle summary:hover,
.record-meta-toggle summary:focus-visible {
  border-color: rgba(209, 170, 71, 0.72);
  color: var(--ink);
}

.record-meta-toggle summary:focus-visible {
  outline: 3px solid rgba(209, 170, 71, 0.24);
  outline-offset: 3px;
}

.record-meta-item {
  display: grid;
  gap: 4px;
  min-width: 92px;
  max-width: 180px;
}

.record-meta-label {
  color: var(--steel);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.record-meta-value {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.technical-system-row--job em,
.technical-system-row--equipment em {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
  text-align: right;
}

.technical-system-row--job em b,
.technical-system-row--equipment em b {
  min-width: 0;
  font: inherit;
  overflow-wrap: anywhere;
}

.technical-system-row--accounting em {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.05;
  text-align: right;
  text-transform: none;
  white-space: nowrap;
}

.record-meta-value .table-input,
.record-meta-value .status-menu__summary {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
}

.record-meta-value .table-input {
  width: 100%;
  padding: 5px 9px;
}

.record-meta-value .table-input--code {
  min-width: 92px;
}

.record-meta-value .table-input--select,
.record-meta-value .status-menu__summary {
  min-width: 136px;
  max-width: 180px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.record-meta-value .table-input--select {
  padding: 0 34px 0 10px;
  background-position:
    calc(100% - 19px) 14px,
    calc(100% - 12px) 14px;
}

.record-meta-value .table-input--select[multiple] {
  min-width: 156px;
  min-height: 92px;
  background-image: none;
}

.record-meta-value .status-menu__summary {
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta-value .status-menu {
  width: max-content;
  max-width: 100%;
}

.record-meta-value .due-date-control {
  grid-template-columns: 118px 30px;
  gap: 6px;
}

.record-meta-value .due-date-control input.table-input--date {
  width: 118px;
  flex-basis: 118px;
  font-size: 13px;
}

.record-meta-value .due-date-clear {
  inline-size: 30px;
  min-width: 30px;
  block-size: 30px;
}

.worklist-table .worklist-meta-strip .record-meta-value .table-input:not(.table-input--textarea),
.worklist-table .worklist-meta-strip .record-meta-value .status-menu__summary {
  min-height: 36px;
  border-color: var(--line);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: none;
}

.worklist-table .worklist-meta-strip .record-meta-value .table-input:not(.table-input--textarea) {
  width: 100%;
  padding: 5px 9px;
}

.worklist-table .worklist-meta-strip .record-meta-value .table-input--select,
.worklist-table .worklist-meta-strip .record-meta-value .status-menu__summary {
  min-width: 136px;
  max-width: 180px;
}

.worklist-table .worklist-meta-strip .record-meta-value .table-input--select {
  padding: 0 34px 0 10px;
  background-position:
    calc(100% - 19px) 14px,
    calc(100% - 12px) 14px;
}

.worklist-table .worklist-meta-strip .record-meta-value select.table-input.table-input--select[data-worklist-field="priority"] {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  border-radius: 12px;
  padding: 0 34px 0 10px;
  background-position:
    calc(100% - 19px) 14px,
    calc(100% - 12px) 14px;
}

.worklist-table .worklist-meta-strip .record-meta-value .status-menu {
  width: max-content;
  max-width: 100%;
}

.worklist-table .worklist-meta-strip .record-meta-value .due-date-control {
  grid-template-columns: 118px 30px;
  gap: 6px;
}

.worklist-table .worklist-meta-strip .record-meta-value .due-date-control input.table-input--date {
  width: 118px;
  min-height: 36px;
  flex-basis: 118px;
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 13px;
}

.worklist-table .worklist-meta-strip .record-meta-value .due-date-control.is-empty::before {
  left: 9px;
  font-size: 13px;
}

.worklist-table .worklist-meta-strip .record-meta-value .due-date-clear {
  inline-size: 30px;
  min-width: 30px;
  block-size: 30px;
  min-height: 30px;
  border-radius: 999px;
  font-size: 1.2rem;
}

.cell-muted {
  display: block;
  margin-top: 4px;
  color: var(--steel);
  font-size: 13px;
}

.inventory-location-cell {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.inventory-location-link {
  color: var(--ink);
  font-size: inherit;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.inventory-location-link:hover {
  color: var(--steel);
}

.quote-pill,
.locked-pill,
.status-pill {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-pill {
  background: var(--gold-soft);
  color: var(--ink);
}

.locked-pill {
  background: var(--mist);
  color: var(--steel);
}

.status-pill {
  background: rgba(47, 95, 77, 0.12);
  color: var(--green);
}

.status-pill--warning {
  background: rgba(209, 170, 71, 0.22);
  color: #7c570f;
}

.status-pill--danger {
  background: rgba(155, 58, 52, 0.12);
  color: var(--red);
}

.crew-status,
.crew-rest {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-status--onboard,
.crew-rest--approved {
  background: rgba(47, 95, 77, 0.13);
  color: var(--green);
}

.crew-status--off-duty,
.crew-status--joining,
.crew-rest--draft,
.crew-rest--submitted {
  background: var(--gold-soft);
  color: #74520f;
}

.crew-rest--off-no-work {
  background: rgba(91, 111, 132, 0.12);
  color: var(--steel);
}

.crew-status--off-vessel,
.crew-status--leaving,
.crew-rest--exception {
  background: rgba(164, 61, 57, 0.12);
  color: #9b3430;
}

.crm-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-tag button {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(9, 32, 54, 0.1);
  color: var(--ink);
  font-weight: 950;
  line-height: 1;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: stretch end;
}

.drawer[data-detail-type="crm"],
.drawer[data-detail-type="crew"] {
  place-items: stretch;
}

.drawer[hidden] {
  display: none;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 53, 0.68);
}

.permissions-modal,
.work-history-modal,
.csv-import-modal,
.crew-attention-modal,
.crew-logbook-modal,
.crew-rest-review-modal,
.quote-file-modal,
.mobile-app-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.permissions-modal[hidden],
.work-history-modal[hidden],
.csv-import-modal[hidden],
.crew-attention-modal[hidden],
.crew-logbook-modal[hidden],
.crew-rest-review-modal[hidden],
.quote-file-modal[hidden],
.mobile-app-prompt-modal[hidden] {
  display: none;
}

.permissions-panel,
.work-history-panel,
.csv-import-panel,
.crew-attention-panel,
.crew-logbook-panel,
.crew-rest-review-panel,
.quote-file-panel,
.mobile-app-prompt-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
}

.permissions-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
  width: min(calc(100vw - 44px), 1040px);
  height: min(calc(100vh - 44px), 1040px);
}

.permissions-panel > .close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  float: none;
  margin: 0;
}

.work-history-panel {
  width: min(100%, 880px);
}

.history-export-panel {
  width: min(100%, 720px);
}

.history-export-form {
  display: grid;
  gap: 18px;
}

.history-export-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.history-export-presets legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-export-presets label {
  min-width: 0;
}

.history-export-presets input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.history-export-presets span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.history-export-presets input:focus-visible + span {
  outline: 3px solid rgba(31, 118, 255, 0.24);
  outline-offset: 2px;
}

.history-export-presets input:checked + span {
  border-color: var(--gold);
  background: var(--gold);
}

.history-export-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-export-custom label.is-disabled {
  opacity: 0.56;
}

.job-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.job-history-actions .inline-button {
  min-height: 32px;
  padding: 7px 12px;
}

@media (max-width: 760px) {
  .history-export-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-export-custom {
    grid-template-columns: 1fr;
  }
}

.mobile-app-prompt-panel {
  width: min(100%, 620px);
}

.mobile-app-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.mobile-app-prompt-actions .primary-button,
.mobile-app-prompt-actions .ghost-button {
  min-height: 54px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mobile-app-prompt-actions .primary-button {
  display: inline-flex;
}

.csv-import-panel {
  width: min(100%, 760px);
}

.csv-import-panel > .close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  float: none;
  margin: 0;
}

.csv-import-drop-zone {
  position: relative;
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  margin-top: 22px;
  padding: 26px 30px;
  border: 1.5px dashed rgba(226, 236, 243, 0.76);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(10, 24, 38, 0.98), rgba(14, 32, 49, 0.96)),
    var(--ink);
  color: #fff;
  cursor: pointer;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.csv-import-drop-zone::after {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(226, 236, 243, 0.28);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.csv-import-drop-zone > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.csv-import-drop-zone strong {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 780;
  line-height: 1.2;
}

.csv-import-drop-zone span {
  color: rgba(226, 236, 243, 0.78);
  font-size: 14px;
  font-weight: 560;
}

.csv-import-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(226, 236, 243, 0.92);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.csv-import-link:hover,
.csv-import-link:focus-visible {
  color: #fff;
}

.csv-import-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 54px;
  height: 38px;
  border: 1px solid rgba(226, 236, 243, 0.48);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(103, 132, 150, 0.46), rgba(42, 70, 84, 0.58)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.csv-import-icon::before {
  position: absolute;
  top: -8px;
  left: 9px;
  width: 27px;
  height: 10px;
  border: 1px solid rgba(226, 236, 243, 0.44);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: rgba(44, 67, 82, 0.74);
  content: "";
}

.csv-import-drop-zone:hover,
.csv-import-drop-zone:focus-visible,
.csv-import-drop-zone.is-drag-over {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(9, 32, 54, 0.24);
}

.csv-import-drop-zone.is-drag-over {
  transform: translateY(-1px);
}

.csv-import-panel .form-message {
  min-height: 22px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .csv-import-drop-zone {
    align-items: flex-start;
    flex-direction: column;
    min-height: 160px;
    padding: 22px;
  }

  .csv-import-drop-zone::after {
    top: auto;
    right: -20px;
    bottom: -48px;
    transform: none;
  }
}

.quote-file-panel {
  display: flex;
  flex-direction: column;
  width: min(calc(100vw - 32px), 1180px);
  height: min(calc(100vh - 32px), 920px);
  overflow: hidden;
  overflow: clip;
  padding: 14px;
}

#permissions-content {
  display: flex;
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
}

.accounts-card {
  overflow: visible;
}

.accounts-board {
  display: grid;
  gap: 16px;
  padding: 0 28px 28px;
}

.accounts-board .permissions-tool {
  margin-bottom: 0;
}

.accounts-board .permissions-tool[open] {
  max-height: none;
  overflow: visible;
}

.accounts-board .permissions-table-wrap {
  flex: none;
  max-height: min(64vh, 760px);
  min-height: 0;
  background: #fff;
}

.accounts-board .permissions-table {
  width: 100%;
  min-width: 1420px;
}

.accounts-board .permissions-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(250, 248, 242, 0.94);
  padding: 14px;
  backdrop-filter: blur(10px);
}

.accounts-board .permissions-note {
  margin: 4px 0 0;
}

.accounts-section-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--mist);
  padding: 5px;
}

.accounts-section-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 8px 12px;
  color: var(--steel);
  font-weight: 950;
  cursor: pointer;
}

.accounts-section-button strong {
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(9, 32, 54, 0.08);
  color: inherit;
  font-size: 12px;
}

.accounts-section-button.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(9, 32, 54, 0.14);
}

.accounts-section-button.is-active strong {
  background: var(--gold);
  color: var(--ink);
}

.accounts-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.accounts-workspace--databases {
  align-items: stretch;
}

.accounts-sidebar,
.accounts-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(9, 32, 54, 0.06);
}

.accounts-sidebar {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.accounts-main {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.accounts-sidebar__head,
.accounts-page-topbar,
.account-permission-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.accounts-sidebar__head h3,
.accounts-page-topbar h3,
.accounts-empty-panel h3,
.account-permission-panel h4 {
  margin: 0;
  color: var(--ink);
}

.accounts-sidebar__head h3 {
  font-size: 24px;
}

.accounts-sidebar__head > span,
.permission-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.accounts-tool {
  margin: 0;
}

.accounts-tool[open] {
  max-height: none;
}

.accounts-tool summary {
  padding: 14px;
}

.accounts-tool .add-project-card,
.accounts-tool .add-account-card,
.account-edit-tool .add-account-card {
  grid-template-columns: 1fr;
  padding: 16px;
}

.accounts-tool .project-access-field,
.account-edit-tool .project-access-field {
  grid-template-columns: 1fr;
}

.accounts-cancel-edit {
  min-height: 46px;
  border: 1px solid rgba(9, 32, 54, 0.14);
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}

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

.account-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.account-list-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 18px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.account-list-row.is-selected .account-list-item {
  border-color: var(--gold);
  background: #fff7df;
  box-shadow: inset 4px 0 0 var(--gold);
}

.account-list-item strong,
.account-list-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-list-item strong {
  color: var(--ink);
  font-weight: 950;
}

.account-list-item small {
  margin-top: 3px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.account-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

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

.project-list-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 18px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.project-list-item.is-selected {
  border-color: var(--gold);
  background: #fff7df;
  box-shadow: inset 4px 0 0 var(--gold);
}

.project-list-item strong,
.project-list-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-list-item strong {
  color: var(--ink);
  font-weight: 950;
}

.project-list-item small {
  margin-top: 3px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.project-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.project-creation-status {
  margin: 0;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: rgba(45, 102, 81, 0.08);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.project-creation-status.is-warning {
  border-left-color: var(--gold);
  background: rgba(209, 170, 71, 0.12);
}

.account-list-delete {
  align-self: center;
  min-height: 42px;
  border: 1px solid rgba(170, 45, 45, 0.2);
  border-radius: 14px;
  background: #fff4f2;
  color: #9f2929;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.accounts-page-topbar {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.accounts-page-topbar h3 {
  font-size: clamp(28px, 4vw, 48px);
}

.accounts-page-topbar p {
  margin: 6px 0 0;
  color: var(--steel);
  font-weight: 800;
}

.accounts-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.yacht-database-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.yacht-database-topbar h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
}

.yacht-database-topbar p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--steel);
  font-weight: 800;
}

.yacht-database-topbar .primary-button {
  flex: 0 0 auto;
}

.yacht-database-status {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.yacht-database-status > span {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(170, 45, 45, 0.1);
}

.yacht-database-status.is-ready > span {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(45, 102, 81, 0.1);
}

.yacht-database-status strong,
.yacht-database-status small {
  display: block;
}

.yacht-database-status strong {
  color: var(--ink);
  font-weight: 950;
}

.yacht-database-status small {
  margin-top: 2px;
  color: var(--steel);
  font-weight: 800;
}

.yacht-database-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.yacht-database-stat {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.yacht-database-stat span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.yacht-database-stat strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
}

.yacht-database-accounts {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.yacht-database-accounts h4 {
  margin: 0;
  color: var(--ink);
}

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

.yacht-database-account-chip {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
}

.yacht-database-account-chip strong,
.yacht-database-account-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yacht-database-account-chip strong {
  color: var(--ink);
  font-weight: 950;
}

.yacht-database-account-chip small {
  margin-top: 3px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.account-edit-tool,
.account-permission-panel,
.accounts-empty-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.account-edit-tool {
  overflow: hidden;
}

.account-edit-tool summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
}

.account-edit-tool summary::-webkit-details-marker {
  display: none;
}

.account-edit-tool summary span {
  color: var(--ink);
  font-weight: 950;
}

.account-edit-tool summary small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.account-permission-board {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.account-permission-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.account-permission-panel--tabs .tab-permission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-select-grid,
.feature-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-select-label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-permission-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.feature-permission-option input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--gold);
}

.additional-permission-group {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.accounts-empty-panel {
  display: grid;
  gap: 8px;
  min-height: 260px;
  align-content: center;
  padding: 28px;
  text-align: center;
}

.accounts-empty-panel p {
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .accounts-workspace,
  .account-permission-board {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .accounts-board {
    padding: 0 14px 18px;
  }

  .accounts-section-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .accounts-sidebar,
  .accounts-main {
    border-radius: 18px;
    padding: 14px;
  }

  .accounts-page-topbar,
  .accounts-sidebar__head,
  .account-permission-panel__head,
  .yacht-database-topbar {
    flex-direction: column;
  }

  .yacht-database-topbar .primary-button {
    width: 100%;
  }

  .yacht-database-stat-grid,
  .yacht-database-account-list {
    grid-template-columns: 1fr;
  }

  .permission-select-grid,
  .feature-permission-grid,
  .account-permission-panel--tabs .tab-permission-grid {
    grid-template-columns: 1fr;
  }

  .account-list-row {
    grid-template-columns: 1fr;
  }

  .account-list-delete {
    justify-self: stretch;
  }
}

.permissions-heading {
  flex: 0 0 auto;
  max-width: 760px;
  margin-bottom: 22px;
  padding-right: 120px;
}

.permissions-heading h2 {
  font-size: clamp(36px, 6vw, 64px);
}

.permissions-heading p {
  color: var(--steel);
  font-size: 18px;
  font-weight: 700;
}

.add-project-card,
.add-account-card {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--cream);
  padding: 20px;
}

.add-project-card > div,
.add-account-card > div {
  grid-column: 1 / -1;
}

.add-project-card h3,
.add-account-card h3 {
  margin: 0;
  font-size: 28px;
}

.add-project-card p,
.add-account-card p {
  margin: 8px 0 0;
  color: var(--steel);
  font-weight: 700;
}

.add-project-card label,
.add-account-card label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.add-project-card button,
.add-account-card button {
  align-self: end;
}

.account-form-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.add-project-card .form-message,
.add-account-card .form-message {
  grid-column: 1 / -1;
}

.project-access-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  border: 1px solid rgba(9, 32, 54, 0.14);
  border-radius: 18px;
  padding: 14px;
}

.project-access-field legend {
  padding: 0 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-access-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.project-access-option input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--gold);
}

.project-access-option span {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.project-access-option small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
}

.project-access-select {
  grid-column: 1 / -1;
  max-width: 420px;
}

.permissions-tool {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.permissions-tool[open] {
  max-height: min(38vh, 520px);
  overflow: auto;
  overscroll-behavior: contain;
}

.permissions-tool summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
}

.permissions-tool summary::-webkit-details-marker {
  display: none;
}

.permissions-tool summary span {
  color: var(--ink);
  font-weight: 950;
}

.permissions-tool summary small {
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.permissions-tool summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-weight: 950;
}

.permissions-tool[open] summary::after {
  content: "-";
}

.permissions-tool .add-project-card,
.permissions-tool .add-account-card {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

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

.work-history-form label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-history-form .wide-field,
.work-history-form .account-form-actions,
.work-history-form .form-message {
  grid-column: 1 / -1;
}

.nav-watch-panel {
  width: min(100%, 980px);
}

.nav-watch-form select[multiple] {
  min-height: 190px;
  padding: 12px;
}

.nav-watch-form select[multiple] option {
  padding: 8px 6px;
}

.permissions-table-wrap {
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 240px;
  min-width: 0;
  max-height: min(48vh, 520px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.permissions-table {
  width: max-content;
  min-width: 1280px;
  table-layout: fixed;
}

.permissions-table th,
.permissions-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.permissions-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f3f6fa;
  box-shadow: 0 1px 0 var(--line);
  line-height: 1.2;
}

.permissions-table th:nth-child(1) {
  width: 250px;
}

.permissions-table th:nth-child(2) {
  width: 160px;
}

.permissions-table th:nth-child(3) {
  width: 210px;
}

.permissions-table th:nth-child(4) {
  width: 280px;
}

.permissions-table th:nth-child(5) {
  width: 230px;
}

.permissions-table th:nth-child(n + 6) {
  width: 116px;
  text-align: center;
}

.permission-check-cell {
  text-align: center;
}

.permission-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.permission-toggle input {
  width: 28px;
  min-height: 28px;
  accent-color: var(--gold);
}

.permission-select-label select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 14px;
}

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

.tab-permission-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
}

.tab-permission-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--gold);
}

.tab-permission-option.is-disabled {
  opacity: 0.54;
}

.inline-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
}

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

.inline-button--danger {
  background: rgba(155, 58, 52, 0.12);
  color: #9b3a34;
}

.bridge-mate-file-button {
  background: var(--navy);
  color: #fff;
}

.permissions-note {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  margin: 18px 0 0;
  color: var(--steel);
  font-weight: 800;
}

.permissions-actions {
  display: flex;
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.ghost-button--light {
  border-color: var(--line-strong);
  background: var(--mist);
  color: var(--ink);
}

.detail-page {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  height: 100%;
  overflow: auto;
  background: var(--paper);
  box-shadow: -30px 0 80px rgba(7, 31, 53, 0.3);
}

.drawer[data-detail-type="crm"] .detail-page,
.drawer[data-detail-type="crew"] .detail-page {
  width: 100%;
  max-width: none;
  box-shadow: 0 0 90px rgba(7, 31, 53, 0.35);
}

.drawer[data-detail-type="system"] .detail-page {
  width: 100%;
  max-width: none;
  box-shadow: 0 0 90px rgba(7, 31, 53, 0.28);
}

.drawer[data-detail-type="crm"] .detail-body,
.drawer[data-detail-type="crew"] .detail-body {
  width: min(calc(100% - 48px), 1480px);
  margin: 0 auto;
}

.drawer[data-detail-type="system"] .detail-body {
  width: min(calc(100% - 36px), 1720px);
  margin: 0 auto;
}

.drawer[data-detail-type="crew"] .detail-body {
  width: min(calc(100% - 48px), 1620px);
}

.close-button {
  position: sticky;
  top: 18px;
  z-index: 2;
  float: right;
  margin: 18px 18px 0 0;
  min-height: 42px;
  padding: 0 16px;
  background: var(--navy);
  color: #fff;
}

.detail-cover {
  min-height: 230px;
  background:
    linear-gradient(135deg, rgba(7, 31, 53, 0.26), rgba(7, 31, 53, 0.76)),
    var(--cover-image) center / cover;
}

.detail-body {
  padding: clamp(24px, 5vw, 48px);
}

.crm-detail-body {
  padding-top: clamp(32px, 5vw, 56px);
}

.crm-profile-header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.crm-profile-header p:not(.eyebrow) {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--steel);
  font-size: 18px;
  font-weight: 700;
}

.crm-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 18px;
  background: var(--navy);
  color: var(--gold);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.crew-profile-header {
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 18%, rgba(209, 170, 71, 0.25), transparent 34%),
    linear-gradient(135deg, var(--ink), #102d47);
  padding: 28px;
}

.crew-profile-header h2,
.crew-profile-header p:not(.eyebrow) {
  color: #fff;
}

.crew-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.crew-status-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.crew-status-choice {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
}

.crew-status-choice.is-selected {
  border-color: rgba(209, 170, 71, 0.8);
  background: var(--gold);
  box-shadow: 0 18px 30px rgba(209, 170, 71, 0.22);
}

.crew-status-choice:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.crew-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.crew-personal-card,
.crew-files-card {
  padding: 22px;
}

.crew-info-table {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
}

.crew-info-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 58px;
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
}

.crew-info-row:last-child {
  border-bottom: 0;
}

.crew-info-row > span,
.crew-info-section {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-info-row > span {
  border-right: 1px solid var(--line-strong);
  background: var(--mist);
}

.crew-info-section {
  justify-content: center;
  border-bottom: 1px solid var(--line-strong);
  background: var(--cream);
  color: var(--ink);
}

.crew-info-row input,
.crew-info-row select,
.crew-info-row textarea {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.crew-info-row--static > strong {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 18px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.crew-info-row textarea {
  min-height: 110px;
  resize: vertical;
}

.crew-info-row--notifications {
  grid-template-columns: 220px minmax(0, 1fr);
}

.crew-notification-settings {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #fff;
}

.crew-notification-email {
  display: grid;
  gap: 7px;
}

.crew-notification-email span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-notification-email input {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0 14px;
}

.crew-notification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.crew-notification-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.crew-notification-option input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.crew-notification-option span {
  min-width: 0;
  overflow-wrap: normal;
  text-transform: none;
  letter-spacing: 0;
}

.crew-notification-settings .cell-muted {
  margin: 0;
  max-width: 760px;
}

.crew-files-card > p {
  margin: 6px 0 18px;
  color: var(--steel);
  font-weight: 750;
}

.crew-file-list {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
}

.crew-file-section {
  border-bottom: 1px solid var(--line-strong);
  background: var(--mist);
}

.crew-file-section:last-child {
  border-bottom: 0;
}

.crew-file-section summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 850;
  list-style: none;
}

.crew-file-section summary::-webkit-details-marker {
  display: none;
}

.crew-file-section summary::after {
  color: var(--steel);
  content: ">";
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.18s ease;
}

.crew-file-section[open] summary::after {
  transform: rotate(90deg);
}

.crew-file-section summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crew-file-section summary em {
  color: var(--steel);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-file-section summary strong {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(164, 61, 57, 0.12);
  color: #a43d39;
  font-size: 12px;
}

.crew-file-section-body {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid var(--line-strong);
  background: #fff;
}

.crew-file-section-body > p {
  margin: 0;
  color: var(--steel);
  font-weight: 750;
}

.crew-file-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.crew-file-actions label:not(.crew-file-upload-button) {
  display: grid;
  min-width: 190px;
  gap: 6px;
}

.crew-file-actions label span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crew-file-upload-button {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
}

.crew-file-upload-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.crew-file-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.crew-file-actions select {
  min-height: 50px;
  border-radius: 16px;
  background-color: #fff;
  font-weight: 850;
}

.crew-certificate-upload-form {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--mist);
}

.crew-certificate-upload-heading {
  display: grid;
  gap: 4px;
}

.crew-certificate-upload-heading strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.crew-certificate-upload-heading span {
  color: var(--steel);
  font-weight: 750;
}

.crew-certificate-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.crew-certificate-upload-grid label {
  display: grid;
  gap: 8px;
}

.crew-certificate-upload-grid label > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crew-certificate-upload-grid label > span em {
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}

.crew-certificate-upload-grid input,
.crew-certificate-upload-grid select {
  min-height: 54px;
  border-radius: 16px;
  background: #fff;
  font-weight: 850;
}

.crew-certificate-type-field,
.crew-certificate-file-field {
  grid-column: 1 / -1;
}

.crew-certificate-message {
  min-height: 18px;
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  font-weight: 850;
}

.crew-certificate-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.crew-file-table {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.crew-file-table-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(120px, 0.8fr) minmax(160px, 0.8fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-strong);
}

.crew-file-table--passport .crew-file-table-row {
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(150px, 0.7fr);
}

.crew-file-table--certificates .crew-file-table-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(140px, 0.6fr);
}

.crew-file-table-row:last-child {
  border-bottom: 0;
}

.crew-file-table-head {
  background: var(--mist);
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crew-file-table-row:not(.crew-file-table-head) span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.crew-file-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.crew-file-expiry {
  color: var(--red) !important;
}

.crew-file-expiry--warning,
.crew-file-expiry--expired {
  font-weight: 950 !important;
}

.crew-file-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  color: var(--steel);
  font-size: 16px;
  font-weight: 850;
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(155, 58, 52, 0.38);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.detail-body h2 {
  font-size: clamp(42px, 6vw, 76px);
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

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

.crew-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.crew-summary-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
}

.crew-summary-card--button {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.crew-summary-card--button:disabled {
  cursor: default;
}

.crew-summary-card--button:not(:disabled):hover,
.crew-summary-card--button:not(:disabled):focus-visible {
  border-color: rgba(209, 170, 71, 0.85);
  box-shadow: 0 14px 28px rgba(7, 31, 53, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.crew-summary-card span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.crew-summary-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.crew-summary-card--attention {
  border-color: rgba(209, 170, 71, 0.55);
  background: var(--gold-soft);
}

.crew-attention-panel {
  width: min(100%, 820px);
}

.crew-logbook-panel {
  width: min(calc(100vw - 44px), 1240px);
  max-height: min(900px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#crew-logbook-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 2px;
}

.crew-logbook-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.crew-logbook-heading__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.crew-logbook-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.crew-logbook-metric {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
}

.crew-logbook-metric span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.crew-logbook-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.crew-logbook-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
}

.crew-logbook-filter-panel,
.crew-logbook-form {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
}

.crew-logbook-filter-panel {
  align-self: start;
  display: grid;
  gap: 14px;
}

.crew-logbook-filter-panel label,
.crew-logbook-form label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crew-logbook-filter-panel input,
.crew-logbook-filter-panel select,
.crew-logbook-form input,
.crew-logbook-form select,
.crew-logbook-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 14px;
  background: #fff;
}

.crew-logbook-main {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr);
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.crew-logbook-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.crew-logbook-form__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
}

.crew-logbook-form__header p {
  margin: 4px 0 0;
  color: var(--steel);
  font-weight: 800;
}

.crew-logbook-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.crew-logbook-table-wrap {
  min-height: 220px;
  max-height: min(420px, 42vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.crew-logbook-table {
  min-width: 980px;
}

.crew-logbook-table th,
.crew-logbook-table td {
  vertical-align: top;
}

.crew-rest-review-panel {
  width: min(calc(100vw - 44px), 1440px);
  max-height: min(900px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px);
}

#crew-rest-review-page-content,
#crew-rest-review-content,
.crew-rest-review-page {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

#crew-rest-review-page-content,
#crew-rest-review-content {
  overflow: hidden;
}

.crew-rest-review-full-page-card {
  min-height: calc(100vh - 230px);
  overflow: hidden;
  padding: 0;
}

.crew-rest-review-full-page-card #crew-rest-review-page-content {
  min-height: calc(100vh - 230px);
}

.crew-rest-review-full-page-card .crew-rest-review-page {
  min-height: calc(100vh - 230px);
  padding: clamp(14px, 2vw, 24px);
}

.crew-rest-review-full-page-card .crew-rest-review-layout {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.crew-rest-review-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 10px;
}

.crew-rest-review-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.crew-rest-review-header__actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.crew-rest-review-month-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rest-review-month-controls button,
.crew-rest-review-month-controls span,
.crew-rest-review-filter-buttons button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-review-month-controls button,
.crew-rest-review-filter-buttons button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 13px;
}

.crew-rest-review-month-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.crew-rest-review-month-controls span {
  background: var(--navy);
  color: #fff;
  padding: 0 14px;
}

.crew-rest-review-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.crew-rest-review-metric {
  flex: 0 1 172px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 7px 10px;
}

.crew-rest-review-metric span,
.crew-rest-review-metric small,
.crew-rest-review-issue small,
.crew-rest-review-day span,
.crew-rest-review-day small,
.crew-rest-review-notes span {
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.crew-rest-review-metric strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 24px;
  line-height: 0.95;
}

.crew-rest-review-metric small {
  display: block;
  margin-top: 2px;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.crew-rest-review-layout {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(330px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
}

.crew-rest-review-queue,
.crew-rest-review-month-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.crew-rest-review-queue {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.crew-rest-review-filter-strip {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
}

.crew-rest-review-filter-strip .crew-rest-review-filter-buttons {
  justify-content: stretch;
}

.crew-rest-review-filter-strip .crew-rest-review-filter-buttons button {
  flex: 1 1 0;
  min-height: 34px;
}

.crew-rest-review-selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  padding: 9px 12px;
}

.crew-rest-review-selected-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.35vw, 32px);
  letter-spacing: -0.035em;
  line-height: 1;
}

.crew-rest-review-selected-heading p:not(.eyebrow) {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.crew-rest-review-filter-buttons,
.crew-rest-review-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rest-review-filter-buttons button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.crew-rest-review-issue-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.crew-rest-review-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.crew-rest-review-issue.is-selected {
  border-color: rgba(209, 170, 71, 0.84);
  box-shadow: inset 0 0 0 2px rgba(209, 170, 71, 0.18);
}

.crew-rest-review-issue strong,
.crew-rest-review-issue em,
.crew-rest-review-issue b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.crew-rest-review-issue strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 0.98;
}

.crew-rest-review-issue em {
  justify-self: end;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #74520f;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  text-transform: uppercase;
  text-align: center;
}

.crew-rest-review-issue b {
  grid-column: 1 / -1;
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-review-month-panel {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
}

.crew-rest-review-selected-heading {
  background: #fff;
}

.crew-rest-review-selected-actions .primary-button,
.crew-rest-review-selected-actions .ghost-button {
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  padding: 0 12px;
}

.crew-rest-review-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 58px;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: visible;
  padding: 10px;
}

.crew-rest-review-day {
  display: grid;
  min-height: 0;
  grid-template-rows: auto 10px auto;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 5px 6px;
}

.crew-rest-review-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.crew-rest-review-day strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 0.95;
}

.crew-rest-review-day span,
.crew-rest-review-day small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-rest-review-mini-bar {
  position: relative;
  min-height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 95, 77, 0.12);
}

.crew-rest-review-mini-bar.is-empty {
  background: repeating-linear-gradient(
    135deg,
    rgba(91, 111, 132, 0.14),
    rgba(91, 111, 132, 0.14) 6px,
    rgba(91, 111, 132, 0.05) 6px,
    rgba(91, 111, 132, 0.05) 12px
  );
}

.crew-rest-review-mini-bar span {
  position: absolute;
  inset-block: 0;
  border-radius: 999px;
  background: var(--gold);
}

.crew-rest-review-day.is-exception {
  border-color: rgba(164, 61, 57, 0.36);
  background: rgba(164, 61, 57, 0.06);
}

.crew-rest-review-day.is-exception .crew-rest-review-mini-bar span {
  background: #a43d39;
}

.crew-rest-review-day.is-missing {
  border-color: rgba(164, 61, 57, 0.22);
}

.crew-rest-review-day.is-approved {
  border-color: rgba(47, 95, 77, 0.26);
  background: rgba(47, 95, 77, 0.07);
}

.crew-rest-review-day.is-future {
  opacity: 0.58;
}

.crew-rest-review-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--mist);
  padding: 8px 10px 10px;
}

.crew-rest-review-notes article {
  min-width: 0;
  max-height: 86px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
}

.crew-rest-review-notes p {
  margin: 5px 0 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.crew-rest-review-notes strong {
  display: inline-block;
  margin-right: 8px;
  color: var(--ink);
}

.crew-attention-list {
  display: grid;
  gap: 14px;
}

.crew-attention-member {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}

.crew-attention-member header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.crew-attention-member header strong,
.crew-attention-member header span {
  display: block;
}

.crew-attention-member header strong {
  color: var(--ink);
}

.crew-attention-member header span,
.crew-attention-issue small {
  margin-top: 4px;
  color: var(--steel);
  font-size: 13px;
}

.crew-attention-member header em,
.crew-attention-issue em {
  align-self: start;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.crew-attention-issues {
  display: grid;
}

.crew-attention-issue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.crew-attention-issue:last-child {
  border-bottom: 0;
}

.crew-attention-issue:hover,
.crew-attention-issue:focus-visible {
  background: rgba(209, 170, 71, 0.1);
  outline: none;
}

.crew-attention-issue span,
.crew-attention-issue strong,
.crew-attention-issue small {
  display: block;
  min-width: 0;
}

.crew-attention-issue span {
  overflow-wrap: anywhere;
}

.vessel-details-layout {
  display: grid;
  gap: 18px;
}

.vessel-details-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.vessel-details-toolbar p {
  max-width: 820px;
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

#vessel-details-view .sheet-heading {
  display: none;
}

.vessel-passport-page {
  display: grid;
  gap: 14px;
}

.vessel-passport-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 10px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.vessel-passport-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.vessel-passport-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 4.7vw, 72px);
  letter-spacing: 0;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.vessel-passport-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vessel-passport-summary span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 248, 247, 0.86);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.1;
  padding: 6px 10px;
  text-transform: uppercase;
}

.vessel-passport-hero .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-align: center;
}

.vessel-passport-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.vessel-passport-strip .vessel-detail-field {
  gap: 5px;
  min-height: 76px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  letter-spacing: 0;
}

.vessel-passport-strip .vessel-detail-field:last-child {
  border-right: 0;
}

.vessel-passport-strip .vessel-detail-field input {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: clamp(16px, 1.2vw, 20px);
}

.vessel-passport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: stretch;
}

.vessel-details-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 22px;
}

.vessel-details-card h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.vessel-passport-card {
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
}

.vessel-passport-card--safety {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.vessel-passport-card h3 {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.72);
  font-size: 20px;
  letter-spacing: 0;
}

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

.vessel-passport-card .vessel-details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.vessel-passport-card--safety .vessel-details-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vessel-passport-card--build .vessel-details-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vessel-passport-card .vessel-detail-field {
  gap: 7px;
  min-height: 92px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0;
}

.vessel-passport-card--safety .vessel-detail-field {
  min-height: 154px;
  align-content: start;
}

.vessel-passport-card .vessel-detail-field:nth-child(2n) {
  border-right: 0;
}

.vessel-passport-card--build .vessel-detail-field:nth-child(2n) {
  border-right: 1px solid var(--line);
}

.vessel-passport-card--build .vessel-detail-field:nth-child(5n) {
  border-right: 0;
}

.vessel-passport-card .vessel-detail-field--wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.vessel-passport-card--safety .vessel-detail-field--wide {
  min-height: 210px;
}

.vessel-passport-card .vessel-detail-field input,
.vessel-passport-card .vessel-detail-field textarea {
  min-height: 38px;
  border-radius: 10px;
  font-size: 15px;
  padding: 8px 10px;
}

.vessel-passport-card .vessel-detail-field textarea {
  min-height: 78px;
}

.vessel-passport-card--safety .vessel-detail-field textarea {
  min-height: 96px;
}

.vessel-passport-card--safety .vessel-equipment-link-list {
  max-height: 58px;
  align-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  gap: 6px;
}

.vessel-passport-card--safety .vessel-equipment-chip {
  padding: 7px 9px;
}

.vessel-detail-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vessel-equipment-links {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  text-transform: none;
  letter-spacing: 0;
}

.vessel-equipment-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vessel-equipment-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(209, 170, 71, 0.36);
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--ink);
}

.vessel-equipment-chip button:first-child {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(9, 32, 54, 0.18);
  text-underline-offset: 3px;
}

.vessel-equipment-chip small {
  grid-column: 1 / 2;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.vessel-equipment-remove {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(155, 58, 52, 0.12);
  color: var(--red);
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
}

.vessel-equipment-empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
}

.vessel-equipment-links select {
  min-height: 40px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

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

.vessel-detail-field input,
.vessel-detail-field textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  padding: 13px 15px;
}

.vessel-detail-field textarea {
  min-height: 120px;
  resize: vertical;
}

.vessel-detail-field input:read-only,
.vessel-detail-field textarea:read-only {
  background: var(--mist);
  color: var(--steel);
}

.property-card,
.quote-card,
.overview-card,
.history-card,
.gallery-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.property-card {
  padding: 16px;
}

.property-card span,
.quote-card span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.property-card strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.property-card--editable {
  padding: 13px 16px 16px;
}

.property-card--editable label {
  display: grid;
  gap: 8px;
}

.property-card--editable input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  padding: 9px 12px;
}

.property-card--editable input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(209, 170, 71, 0.16);
  outline: none;
}

.overview-card,
.history-card,
.gallery-card {
  margin-top: 18px;
  padding: 22px;
}

.overview-card h3,
.history-card h3,
.gallery-card h3 {
  margin-bottom: 14px;
  font-size: 28px;
}

.technical-manual-box {
  display: grid;
  gap: 14px;
}

.technical-manual-list {
  display: grid;
  gap: 10px;
}

.technical-manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 241, 232, 0.55);
}

.technical-manual-row strong,
.technical-manual-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.technical-manual-row strong {
  color: var(--ink);
  font-size: 15px;
}

.technical-manual-row small {
  margin-top: 4px;
  color: var(--steel);
  font-weight: 750;
}

.technical-manual-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.technical-manual-actions > * {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

.technical-manual-actions .table-link,
.technical-manual-actions .danger-link {
  padding: 0 4px;
}

.technical-manual-upload {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(9, 32, 54, 0.26);
  border-radius: 18px;
  background: rgba(232, 237, 242, 0.46);
  color: var(--steel);
  font-weight: 900;
}

.technical-manual-upload input {
  min-height: 46px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  line-height: 32px;
}

.technical-manual-upload input::file-selector-button {
  min-height: 32px;
  margin: 0 12px 0 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}

.equipment-photo-box {
  display: grid;
  gap: 14px;
}

.equipment-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.equipment-photo-tile {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.equipment-photo-tile a {
  display: block;
  outline: 0;
}

.equipment-photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.equipment-photo-tile figcaption {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.equipment-photo-tile figcaption small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.equipment-photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(155, 58, 52, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(9, 32, 54, 0.1);
}

.equipment-photo-upload {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(9, 32, 54, 0.26);
  border-radius: 18px;
  background: rgba(232, 237, 242, 0.46);
  color: var(--steel);
  font-weight: 900;
}

.equipment-photo-upload input {
  min-height: 46px;
  width: 100%;
  color: var(--ink);
  font-weight: 850;
}

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

.crm-section-heading h3 {
  margin-bottom: 6px;
}

.crm-section-heading p {
  margin: 0;
  color: var(--steel);
  font-weight: 700;
}

.technical-manual-card .crm-section-heading {
  align-items: center;
}

.technical-manual-card .technical-system-file-action {
  margin-left: auto;
}

.history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.history-heading h3 {
  margin-bottom: 6px;
}

.history-heading p,
.empty-history {
  margin: 0;
  color: var(--steel);
  font-weight: 700;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-entry {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--cream);
  padding: 18px;
}

.history-entry__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 12px;
}

.history-entry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.history-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.history-entry-person {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.history-entry__top strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.history-entry__top small {
  color: var(--steel);
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}

.history-entry p {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.history-details {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.history-details div {
  display: grid;
  gap: 4px;
}

.history-details dt {
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-details dd {
  margin: 0;
  color: var(--ink);
}

.history-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.history-photo-grid figure {
  margin: 0;
}

.history-photo-link {
  display: block;
  border-radius: 14px;
  outline: 0;
}

.history-photo-link:hover img,
.history-photo-link:focus-visible img {
  box-shadow: 0 0 0 4px rgba(213, 173, 67, 0.28);
  transform: translateY(-1px);
}

.history-photo-grid img {
  width: 100%;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.history-photo-grid figcaption {
  margin-top: 5px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.history-file-chip {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.history-file-chip span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.history-file-chip strong {
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.job-file-list {
  display: grid;
  gap: 10px;
}

.job-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 241, 232, 0.58);
}

.job-file-main {
  display: flex;
  min-width: 0;
  border: 0;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.job-file-main strong,
.job-file-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-file-main strong {
  font-size: 15px;
  line-height: 1.2;
}

.job-file-main small {
  margin-top: 4px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.job-file-type {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.job-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.gallery-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-heading h3 {
  margin-bottom: 6px;
}

.gallery-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--steel);
  font-weight: 700;
}

.upload-button {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.core-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.guest-detail-grid--notes {
  grid-template-columns: 1fr;
}

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

.worklist-detail-edit-grid,
.worklist-detail-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.worklist-detail-edit-grid label,
.worklist-detail-edit-grid .field-label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.worklist-detail-edit-grid .wide-field,
.worklist-detail-readonly-grid .wide-field {
  grid-column: 1 / -1;
}

.technical-link-selector-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.technical-link-selector-group label {
  min-width: 0;
  align-content: start;
  align-self: start;
}

.technical-link-selector-group--job {
  grid-template-columns: minmax(260px, 0.85fr);
}

.technical-link-selector-group--rail-system,
.technical-link-selector-group--rail-equipment {
  grid-template-columns: 1fr;
}

.technical-link-selector-group--rail-equipment {
  grid-template-columns: 1fr;
}

.technical-link-equipment-field {
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: start;
}

.technical-link-system-field select {
  height: auto;
  min-height: 54px !important;
}

.technical-equipment-search {
  min-height: 42px !important;
  margin-bottom: 0;
  font-size: 15px !important;
}

.technical-equipment-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.technical-equipment-results {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 248, 247, 0.72);
}

.technical-equipment-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(82, 105, 129, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.technical-equipment-result:hover,
.technical-equipment-result:focus-visible {
  border-color: rgba(209, 170, 71, 0.72);
  background: var(--gold-soft);
  outline: 0;
}

.technical-equipment-result strong {
  font-size: 14px;
  font-weight: 950;
}

.technical-equipment-result small,
.technical-equipment-empty {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.technical-inventory-link-panel {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(209, 170, 71, 0.34);
  border-radius: 14px;
  background: rgba(245, 241, 232, 0.62);
  padding: 8px;
}

.technical-inventory-link-panel[hidden] {
  display: none;
}

.technical-inventory-link-search {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.technical-inventory-link-panel > .technical-inventory-link-search:first-child {
  grid-column: 1 / -1;
}

.technical-inventory-link-results {
  grid-column: 1 / -1;
  max-height: 160px;
  border-radius: 10px;
}

.technical-inventory-link-result {
  border-radius: 10px;
  padding: 8px 10px;
}

.technical-inventory-link-panel .inline-button,
.technical-inventory-link-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.technical-inventory-link-panel .inline-button {
  white-space: nowrap;
}

.technical-inventory-link-result {
  display: grid;
  justify-content: stretch;
  text-align: left;
}


@media (max-width: 680px) {
  .technical-inventory-link-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .technical-inventory-link-results {
    grid-column: 1;
  }
}

.technical-equipment-empty {
  margin: 4px;
}

.technical-equipment-add-button {
  min-height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}

.job-equipment-remove {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(167, 67, 60, 0.28);
  border-radius: 999px;
  background: rgba(167, 67, 60, 0.1);
  color: var(--red);
  font-weight: 950;
  cursor: pointer;
}

.job-equipment-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.job-equipment-cell .technical-link-cell {
  max-width: 170px;
  overflow-wrap: anywhere;
}

.drawer[data-detail-type="work"],
.drawer[data-detail-type="worklist"] {
  width: min(1540px, calc(100vw - 36px));
}

.drawer[data-detail-type="work"] .detail-page,
.drawer[data-detail-type="worklist"] .detail-page {
  width: min(calc(100% - 36px), 1540px);
  max-width: none;
}

.job-detail-view {
  width: 100%;
}

.job-detail-view #detail-content {
  width: 100%;
}

.detail-body--job {
  padding: clamp(16px, 3vw, 28px);
}

.job-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.job-detail-header > div:first-child {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.job-detail-header .eyebrow {
  margin: 0;
}

.job-detail-header h2,
.job-title-input {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.job-title-input {
  width: min(100%, 1040px);
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0 0 4px;
}

.job-title-input:focus {
  border-bottom-color: var(--gold);
  box-shadow: none;
  outline: 0;
}

.job-detail-header .detail-action-buttons {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.job-detail-header .primary-button,
.job-detail-header .danger-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.job-page-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.job-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 14px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.job-detail-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.job-detail-rail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  min-width: 0;
  justify-self: end;
}

.job-rail-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.job-detail-main > .overview-card,
.job-detail-main > .history-card {
  margin-top: 0;
}

.job-core-card,
.job-history-card,
.job-subtask-card,
.job-detail-rail .job-rail-card {
  padding: 12px 14px;
  border-radius: 14px;
}

.job-core-card .core-edit-grid,
.job-core-card .worklist-detail-readonly-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.job-core-card .short-textarea {
  min-height: 66px;
}

.job-core-card .property-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.job-core-card .property-card strong {
  font-size: 17px;
  line-height: 1.35;
}

.job-rail-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.detail-body--job .history-heading {
  gap: 10px;
  margin-bottom: 10px;
}

.detail-body--job .history-heading h3 {
  margin-bottom: 3px;
  font-size: 24px;
  line-height: 1;
}

.detail-body--job .history-heading p,
.detail-body--job .empty-history {
  font-size: 15px;
  line-height: 1.35;
}

.job-rail-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.job-rail-card-heading .inline-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.shipyard-quote-accounting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(8, 35, 56, 0.12);
  border-radius: 12px;
  background: #f7fafc;
  min-width: 0;
}

.shipyard-quote-accounting > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.shipyard-quote-accounting__label,
.shipyard-quote-accounting small,
.shipyard-quote-accounting-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.shipyard-quote-accounting strong,
.shipyard-quote-accounting small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipyard-quote-accounting__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.shipyard-quote-accounting-note {
  margin: 0;
}

.job-detail-rail .upload-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.job-detail-save-note {
  margin: 0;
  padding: 0 4px;
}

.job-detail-rail .quote-grid,
.job-detail-rail .quote-outcome-grid,
.job-detail-rail .accounting-rollup__summary,
.job-detail-rail .gallery-grid {
  margin-top: 0;
}

.job-detail-rail .quote-grid--rail,
.job-detail-rail .quote-outcome-grid {
  grid-template-columns: minmax(0, 1fr);
}

.job-detail-rail .quote-outcome-grid {
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 16px;
}

.job-detail-rail .quote-card {
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
}

.job-detail-rail .quote-card h3 {
  font-size: 17px;
}

.job-detail-rail .quote-card textarea {
  min-height: 70px;
}

.job-detail-rail .job-file-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.job-detail-rail .job-file-actions {
  justify-content: flex-start;
}

.job-detail-rail .gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.job-detail-rail .gallery-grid img {
  height: 92px;
}

.job-detail-rail .gallery-grid figcaption {
  padding: 8px 9px;
  font-size: 12px;
}

.job-rail-kicker {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.job-rail-edit-list {
  display: grid;
  gap: 12px;
}

.job-rail-edit-list label,
.job-rail-edit-list .field-label,
.job-rail-readonly-field {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.job-rail-edit-list input,
.job-rail-edit-list select {
  min-height: 38px;
}

.job-rail-readonly-value {
  display: grid;
  min-height: 38px;
  align-content: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(246, 248, 247, 0.78);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.job-system-rail-list,
.job-equipment-rail-list {
  display: grid;
  gap: 8px;
}

.job-equipment-rail-item {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 44px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 248, 247, 0.72);
}

.job-equipment-rail-item .table-link {
  justify-self: start;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.job-equipment-rail-item small {
  min-width: 0;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  overflow-wrap: anywhere;
}

.job-equipment-rail-item .job-equipment-remove {
  position: absolute;
  top: 12px;
  right: 12px;
}

.job-detail-rail .accounting-rollup__summary {
  grid-template-columns: 1fr;
}

.job-detail-rail .technical-linked-row {
  grid-template-columns: 1fr;
}

.job-detail-rail .technical-linked-row span,
.job-detail-rail .technical-linked-row em {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .job-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-detail-rail {
    position: static;
    max-width: none;
    justify-self: stretch;
  }

  .job-detail-rail .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .job-detail-header {
    display: grid;
  }

  .job-detail-header h2,
  .job-title-input {
    font-size: 32px;
    min-height: 42px;
  }

  .job-detail-header .detail-action-buttons {
    justify-content: flex-start;
  }

  .job-detail-rail .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.job-subtask-card {
  display: grid;
  gap: 14px;
}

.job-subtask-card .history-heading {
  margin-bottom: 0;
}

.job-subtask-toggle {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.job-subtask-content {
  display: grid;
  gap: 14px;
}

.job-subtask-content[hidden] {
  display: none;
}

.job-subtask-add-form {
  --job-subtask-check-column: 34px;
  --job-subtask-date-column: minmax(150px, 190px);
  --job-subtask-action-column: 86px;
  display: grid;
  grid-template-columns: var(--job-subtask-check-column) minmax(0, 1fr) var(--job-subtask-date-column) var(--job-subtask-action-column);
  gap: 10px;
  align-items: start;
}

.job-subtask-add-form::before {
  content: "";
}

.job-subtask-add-form input,
.job-subtask-add-form button {
  min-height: 38px;
}

.job-subtask-list {
  display: grid;
  gap: 10px;
}

.job-subtask-row {
  --job-subtask-check-column: 34px;
  --job-subtask-date-column: minmax(150px, 190px);
  --job-subtask-action-column: 42px;
  display: grid;
  grid-template-columns: var(--job-subtask-check-column) minmax(0, 1fr) var(--job-subtask-date-column) var(--job-subtask-action-column);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 248, 247, 0.72);
}

.job-subtask-check {
  display: grid;
  min-height: 38px;
  place-items: center;
}

.job-subtask-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.job-subtask-check span {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.job-subtask-check input:checked + span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 5px #fff;
}

.job-subtask-main {
  display: grid;
  grid-template-rows: 38px;
  min-width: 0;
}

.job-subtask-main input,
.job-subtask-due input {
  min-height: 38px;
}

.job-subtask-due {
  display: grid;
  grid-template-rows: 38px;
}

.crm-edit-grid,
.crm-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

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

.crm-edit-grid label {
  display: grid;
  gap: 7px;
  align-self: start;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-edit-grid input,
.crm-edit-grid select {
  min-height: 54px;
  border-radius: 16px;
  background: #fff;
}

.crm-edit-grid textarea {
  min-height: 116px;
  border-radius: 16px;
  background: #fff;
}

.crm-edit-grid .short-textarea {
  min-height: 92px;
}

.crm-tag-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.crm-tag-editor .primary-button {
  min-width: 130px;
}

.crm-note-form {
  display: grid;
  grid-template-columns: 150px 150px minmax(180px, 1fr) minmax(240px, 1.2fr) 178px;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--cream);
  padding: 16px;
}

.crm-note-form input,
.crm-note-form select {
  min-height: 54px;
  border-radius: 16px;
  background: #fff;
}

.crm-note-upload {
  display: grid;
  grid-column: 1 / 5;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-note-upload input {
  padding: 13px 14px;
}

.crm-note-form textarea {
  grid-column: 1 / 5;
  min-height: 104px;
  border-radius: 16px;
  background: #fff;
}

.crm-note-form .primary-button {
  grid-column: 5;
  grid-row: 3;
  align-self: center;
  justify-self: stretch;
  min-height: 58px;
  padding: 0 22px;
}

.crm-timeline-attachments {
  margin-top: 14px;
}

.crm-timeline-attachments figure {
  margin: 0;
}

.crm-timeline-attachments figcaption {
  margin-top: 6px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.crm-timeline-technical-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.crm-timeline-technical-links > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-timeline-technical-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-timeline-technical-link {
  display: grid;
  gap: 1px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mist);
  color: var(--ink);
  padding: 7px 10px;
  text-align: left;
}

.crm-timeline-technical-link small {
  color: var(--steel);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-timeline-technical-link strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.crm-linked-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.crm-linked-table {
  min-width: 820px;
}

.crm-linked-table th:nth-child(n),
.crm-linked-table td:nth-child(n) {
  width: auto;
}

.crm-linked-table th:nth-child(1),
.crm-linked-table td:nth-child(1) {
  width: 110px;
}

.core-edit-grid label,
.core-edit-grid .field-label,
.quote-outcome-grid label,
.quote-card label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.core-edit-grid small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

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

.medication-signout-check {
  align-items: center;
}

.medication-signout-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(167, 67, 60, 0.24);
  border-radius: 18px;
  background: rgba(167, 67, 60, 0.06);
}

.medication-signout-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.medication-signout-panel > div:first-child strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.medication-signout-panel > div:first-child span {
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

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

.medication-signout-log {
  display: grid;
  gap: 8px;
}

.medication-signout-log article {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(82, 105, 129, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--steel);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.medication-signout-log strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.medication-signout-log small,
.medication-signout-log em {
  color: var(--muted);
  font-style: normal;
  overflow-wrap: anywhere;
}

.equipment-date-field {
  min-width: 0;
}

.equipment-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.equipment-date-control input {
  min-width: 0;
}

.equipment-date-control .date-placeholder-control {
  min-width: 0;
}

.date-clear-button {
  min-height: 46px;
  padding: 0 16px;
  white-space: nowrap;
}

.date-clear-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.crew-edit-grid input,
.crew-edit-grid select,
.crew-edit-grid textarea {
  background: #fff;
}

.crew-rest-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.crew-rest-daily-card,
.crew-rest-review-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  padding: 22px;
}

.crew-rest-view-heading {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, auto);
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.crew-rest-view-heading h4,
.crew-rest-review-card h4,
.crew-rest-history h4 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.crew-rest-history h4 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.crew-rest-view-heading p,
.crew-rest-review-card p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.45;
}

.crew-rest-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rest-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rest-week-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.crew-rest-week-controls button,
.crew-rest-week-controls span,
.crew-rest-submit-month {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-week-controls button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
}

.crew-rest-submit-month {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  padding: 0 14px;
}

.crew-rest-week-controls button:hover:not(:disabled) {
  border-color: rgba(209, 170, 71, 0.8);
  background: var(--gold-soft);
}

.crew-rest-week-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.crew-rest-week-controls span {
  background: var(--navy);
  color: #fff;
  padding: 0 14px;
}

.crew-rest-week-total {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-timeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.crew-rest-time-labels,
.crew-rest-day {
  display: grid;
  grid-template-columns: 110px minmax(560px, 1fr) 110px;
  gap: 12px;
  align-items: center;
}

.crew-rest-time-scale {
  position: relative;
  min-height: 20px;
}

.crew-rest-time-labels span,
.crew-rest-time-scale span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
}

.crew-rest-time-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.crew-rest-time-scale span:first-child {
  transform: none;
}

.crew-rest-day {
  grid-template-columns: 110px minmax(560px, 1fr) 110px;
}

.crew-rest-day > strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.crew-rest-bar {
  position: relative;
  display: block;
  min-height: 38px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 95, 77, 0.12);
  cursor: crosshair;
  touch-action: none;
}

.crew-rest-bar span {
  min-width: 0;
}

.crew-rest-bar::before {
  position: absolute;
  inset: 0;
  z-index: 5;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(4.166666% - 1px),
      rgba(9, 32, 54, 0.09) calc(4.166666% - 1px),
      rgba(9, 32, 54, 0.09) 4.166666%
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(16.666666% - 1px),
      rgba(9, 32, 54, 0.21) calc(16.666666% - 1px),
      rgba(9, 32, 54, 0.21) 16.666666%
    );
  content: "";
  pointer-events: none;
}

.crew-rest-bar-night {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--night-rest, 28%);
  background: var(--navy);
}

.crew-rest-bar-work {
  position: absolute;
  inset: 0 auto 0 var(--night-rest, 28%);
  z-index: 1;
  width: var(--work-block, 38%);
  background: var(--gold);
}

.crew-rest-bar-day {
  background: rgba(47, 95, 77, 0.12);
}

.crew-rest-bar--empty {
  background: repeating-linear-gradient(
    135deg,
    rgba(91, 111, 132, 0.14),
    rgba(91, 111, 132, 0.14) 10px,
    rgba(91, 111, 132, 0.06) 10px,
    rgba(91, 111, 132, 0.06) 20px
  );
}

.crew-rest-work-period,
.crew-rest-drag-preview {
  position: absolute;
  inset-block: 0;
  border-radius: 999px;
}

.crew-rest-work-period {
  display: grid;
  min-width: 26px;
  z-index: 2;
  place-items: center;
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  padding: 0 8px;
}

.crew-rest-work-period span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-rest-work-period:hover {
  filter: brightness(0.96);
}

.crew-rest-drag-preview {
  left: var(--drag-left, 0);
  z-index: 4;
  width: var(--drag-width, 0);
  background: rgba(212, 171, 73, 0.56);
  box-shadow: inset 0 0 0 2px rgba(9, 32, 54, 0.14);
  opacity: 0;
  pointer-events: none;
}

.crew-rest-bar.is-dragging .crew-rest-drag-preview {
  opacity: 1;
}

.crew-rest-day--pending .crew-rest-bar-work,
.crew-rest-day--warning .crew-rest-bar-work {
  background: var(--gold);
}

.crew-rest-day--exception .crew-rest-bar-work {
  background: #a43d39;
}

.crew-rest-day--missing .crew-rest-bar {
  display: block;
  background: repeating-linear-gradient(
    135deg,
    rgba(91, 111, 132, 0.14),
    rgba(91, 111, 132, 0.14) 10px,
    rgba(91, 111, 132, 0.06) 10px,
    rgba(91, 111, 132, 0.06) 20px
  );
}

.crew-rest-day--missing .crew-rest-bar > span:not(.crew-rest-drag-preview) {
  display: none;
}

.crew-rest-day-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(47, 95, 77, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-day--pending .crew-rest-day-badge,
.crew-rest-day--warning .crew-rest-day-badge {
  background: var(--gold-soft);
  color: #74520f;
}

.crew-rest-day--off .crew-rest-day-badge {
  background: rgba(91, 111, 132, 0.12);
  color: var(--steel);
}

.crew-rest-day--exception .crew-rest-day-badge,
.crew-rest-day--missing .crew-rest-day-badge {
  background: rgba(164, 61, 57, 0.12);
  color: #9b3430;
}

.crew-rest-exception-note {
  display: grid;
  grid-column: 2 / -1;
  gap: 8px;
  margin-top: -2px;
  padding: 12px 14px;
  border: 1px solid rgba(164, 61, 57, 0.22);
  border-radius: 18px;
  background: rgba(164, 61, 57, 0.06);
}

.crew-rest-exception-note span {
  color: #9b3430;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.crew-rest-exception-note textarea {
  min-height: 78px;
  border-radius: 16px;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
}

.crew-rest-entry {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(180px, 0.7fr) minmax(320px, 1.5fr) minmax(190px, 0.65fr);
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--cream);
  padding: 16px;
}

.crew-rest-entry label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-rest-entry input,
.crew-rest-entry select {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  background: #fff;
}

.crew-rest-entry .primary-button {
  min-height: 54px;
  padding: 0 18px;
}

.crew-rest-period-entry {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
  border: 1px solid rgba(209, 170, 71, 0.34);
  border-radius: 24px;
  background: var(--cream);
  padding: 18px;
}

.crew-rest-period-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.28fr);
  gap: 16px;
  align-items: end;
}

.crew-rest-period-heading h5 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.crew-rest-period-heading p {
  margin: 6px 0 0;
  color: var(--steel);
  font-weight: 750;
}

.crew-rest-period-heading label,
.crew-rest-period-row label,
.crew-rest-period-note {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-rest-period-heading input,
.crew-rest-period-row input,
.crew-rest-period-row select,
.crew-rest-period-note input {
  min-height: 52px;
  border-radius: 16px;
  background: #fff;
}

.crew-rest-period-row select {
  width: 100%;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
  padding: 0 42px 0 16px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--steel) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--steel) 50%, transparent 50%) calc(100% - 17px) 50% / 7px 7px no-repeat,
    #fff;
}

.crew-rest-period-row select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(209, 170, 71, 0.18);
}

.crew-rest-period-rows {
  display: grid;
  gap: 10px;
}

.crew-rest-period-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.82);
  padding: 12px;
}

.crew-rest-period-remove {
  min-height: 52px;
  border: 1px solid rgba(164, 61, 57, 0.24);
  border-radius: 16px;
  background: rgba(164, 61, 57, 0.08);
  color: #8e302c;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-period-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) auto;
  gap: 12px;
  align-items: end;
}

.crew-rest-period-summary {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.crew-rest-period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rest-period-actions .primary-button,
.crew-rest-period-actions .ghost-button {
  min-height: 52px;
}

.crew-rest-review-card {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
}

.crew-rest-review-card h4 {
  margin-top: 8px;
}

.crew-rest-alert-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.crew-rest-monthly-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.crew-rest-record-sheet {
  overflow: hidden;
  margin-top: 22px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.crew-rest-sheet-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.crew-rest-sheet-toolbar .ghost-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.crew-rest-sheet-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
}

.crew-rest-sheet-field {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  min-height: 28px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  line-height: 1.15;
}

.crew-rest-sheet-field:nth-child(2n),
.crew-rest-sheet-field:last-child {
  border-right: 0;
}

.crew-rest-sheet-field span {
  display: flex;
  align-items: center;
  background: #d9d9d9;
  padding: 5px 7px;
  font-weight: 700;
}

.crew-rest-sheet-field strong,
.crew-rest-sheet-field b {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px 7px;
  font-weight: 500;
}

.crew-rest-sheet-watchkeeper {
  grid-column: 1 / -1;
  grid-template-columns: minmax(150px, 0.2fr) 88px 46px 88px 46px 1fr;
  border-right: 0;
}

.crew-rest-sheet-watchkeeper b {
  justify-content: center;
  font-size: 16px;
}

.crew-rest-sheet-scroll {
  overflow: auto;
  max-height: 760px;
}

.crew-rest-sheet-table {
  width: 100%;
  min-width: 2180px;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.crew-rest-sheet-table col.crew-rest-sheet-day-column {
  width: 88px;
}

.crew-rest-sheet-table col.crew-rest-sheet-quarter-column {
  width: 14px;
}

.crew-rest-sheet-table col.crew-rest-sheet-rest-hours-column {
  width: 140px;
}

.crew-rest-sheet-table col.crew-rest-sheet-comment-column,
.crew-rest-sheet-table col.crew-rest-sheet-seven-day-column {
  width: 170px;
}

.crew-rest-sheet-table th,
.crew-rest-sheet-table td {
  height: 22px;
  border: 1px solid var(--ink);
  padding: 2px 3px;
  text-align: center;
  vertical-align: middle;
}

.crew-rest-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #d9d9d9;
  color: #000;
  font-weight: 700;
}

.crew-rest-sheet-table .crew-rest-sheet-admin-row th {
  height: 18px;
  background: #e6e6e6;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
}

.crew-rest-sheet-table .crew-rest-sheet-admin-row th:first-child {
  background: #fff;
}

.crew-rest-sheet-table .day-col,
.crew-rest-sheet-table tbody th {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 88px;
  min-width: 88px;
  border-right: 2px solid var(--ink);
  background: #d9d9d9;
  color: #000;
  font-weight: 700;
  white-space: nowrap;
}

.crew-rest-sheet-table .day-col {
  z-index: 5;
}

.crew-rest-sheet-table tbody th {
  z-index: 1;
}

.crew-rest-sheet-table .quarter-col {
  width: 14px;
  min-width: 14px;
  padding: 0;
  border-left-color: #c7cdd4;
  border-right-color: #c7cdd4;
}

.crew-rest-sheet-table .crew-rest-hour-heading,
.crew-rest-sheet-table .hour-col {
  border-left: 2px solid var(--ink);
}

.crew-rest-sheet-table .quarter-label {
  color: #617081;
  font-size: 7px;
  font-weight: 700;
}

.crew-rest-sheet-table thead th:nth-last-child(3) {
  width: 140px;
}

.crew-rest-sheet-table thead th:nth-last-child(2) {
  width: 170px;
}

.crew-rest-sheet-table thead th:last-child {
  width: 170px;
}

.crew-rest-sheet-table td.is-worked {
  background: var(--gold);
  color: transparent;
}

.crew-rest-record-sheet.is-editable .crew-rest-sheet-slot {
  cursor: crosshair;
  touch-action: none;
}

.crew-rest-record-sheet.is-editable .crew-rest-sheet-slot:hover {
  background: rgba(209, 170, 71, 0.22);
}

.crew-rest-record-sheet.is-editable .crew-rest-sheet-slot.is-worked:hover,
.crew-rest-record-sheet.is-editable .crew-rest-sheet-slot.is-sheet-drag-preview {
  background: #c99e32;
}

.crew-rest-sheet-table tr.is-exception td:nth-last-child(2) {
  background: rgba(164, 61, 57, 0.09);
}

.crew-rest-sheet-table tbody td:nth-last-child(2) {
  text-align: left;
  font-size: 10px;
}

.crew-rest-sheet-table td.crew-rest-sheet-comment-cell {
  padding: 0;
}

.crew-rest-sheet-comment {
  display: block;
  width: 100%;
  min-height: 22px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 1.25;
  padding: 3px 4px;
  resize: vertical;
}

.crew-rest-sheet-comment:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  background: #fffdf7;
}

.crew-rest-sheet-declaration {
  margin: 0;
  border-top: 2px solid var(--ink);
  padding: 12px 18px 18px;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.crew-rest-sheet-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(180px, 0.55fr);
  border-top: 2px solid var(--ink);
}

.crew-rest-sheet-signatures .crew-rest-sheet-field {
  border-bottom: 0;
}

.crew-rest-month-sign-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  padding: 16px;
}

.crew-rest-month-sign-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crew-rest-monthly-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.crew-rest-monthly-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  padding: 14px 16px;
}

.crew-rest-monthly-group header strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
}

.crew-rest-monthly-group header span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crew-rest-monthly-items {
  display: grid;
}

.crew-rest-monthly-item {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.crew-rest-monthly-item:last-child {
  border-bottom: 0;
}

.crew-rest-monthly-item > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.crew-rest-monthly-item strong {
  color: var(--ink);
  font-size: 15px;
}

.crew-rest-monthly-item span,
.crew-rest-monthly-item small,
.crew-rest-monthly-item p {
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
}

.crew-rest-monthly-item p {
  margin: 0;
  line-height: 1.35;
}

.crew-rest-sign-button {
  min-height: 38px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-rest-alert {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
}

.crew-rest-alert span {
  display: block;
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.crew-rest-alert strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.crew-rest-alert p {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}

.crew-rest-alert--clear {
  background: rgba(47, 95, 77, 0.08);
}

.crew-rest-lock-note {
  margin-top: auto;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--ink);
  padding: 18px;
  font-weight: 950;
  line-height: 1.35;
}

.crew-rest-history {
  margin-top: 18px;
}

.crew-rest-drag-help {
  margin: 12px 0 0;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
}

.crew-rest-list,
.crew-document-grid,
.crew-training-list {
  display: grid;
  gap: 12px;
}

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

.crew-rest-record,
.crew-document-card,
.crew-training-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--cream);
  padding: 16px;
}

.crew-rest-record {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px 14px;
}

.crew-rest-record p,
.crew-training-card p,
.crew-document-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--steel);
  font-weight: 700;
}

.crew-rest-record small {
  grid-column: 1 / -1;
  color: var(--steel);
  font-weight: 800;
}

.crew-document-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-document-card strong,
.crew-training-card strong,
.crew-rest-record strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 18px;
}

.crew-document-card small,
.crew-training-card span,
.crew-rest-record span {
  display: block;
  margin-top: 5px;
  color: var(--steel);
  font-weight: 800;
}

.crew-training-card > small {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-training-card--linked {
  border-color: rgba(209, 170, 71, 0.46);
}

.short-textarea {
  min-height: 84px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quote-outcome-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.quote-outcome-grid--editable {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--cream);
  padding: 16px;
}

.quote-payment-check {
  display: flex !important;
  min-height: 52px;
  align-items: center;
  gap: 10px !important;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink) !important;
  letter-spacing: 0 !important;
  padding: 0 14px;
  text-transform: none !important;
}

.quote-payment-check input {
  width: 24px;
  min-height: 24px;
  accent-color: var(--gold);
}

.quote-payment-check span {
  font-size: 14px;
  font-weight: 950;
}

.quote-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.quote-card.is-locked {
  background: #f6f7f8;
}

.quote-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.quote-card input,
.quote-card textarea {
  border-radius: 13px;
}

.quote-card textarea {
  min-height: 96px;
}

.quote-parts-summary,
.quote-parts-editor {
  display: grid;
  gap: 8px;
}

.quote-parts-summary > span,
.quote-parts-editor-heading > span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-parts-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-part-add-button {
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
}

.quote-part-summary-row,
.quote-part-editor-row {
  display: grid;
  align-items: center;
  gap: 6px;
}

.quote-part-summary-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quote-part-summary-row strong,
.quote-part-summary-row span,
.quote-part-summary-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-part-summary-row span {
  grid-column: 1 / -1;
  color: var(--ink);
  font-weight: 950;
}

.quote-part-editor-row {
  grid-template-columns: minmax(0, 1fr) 106px minmax(96px, 0.8fr) 30px;
}

.quote-part-editor-row input,
.quote-part-editor-row select {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.quote-part-remove {
  display: inline-grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
  border: 1px solid #e6bfbd;
  border-radius: 50%;
  background: #fbefee;
  color: #a33c36;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

#quote-file-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
}

.quote-file-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-grid;
  width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--steel);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(7, 31, 53, 0.1);
}

.quote-file-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 10px 58px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.quote-file-heading {
  flex: 0 0 auto;
  min-width: 0;
}

.quote-file-heading h2 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-file-heading .eyebrow {
  margin-bottom: 4px;
}

.quote-file-heading p:not(.eyebrow) {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-file-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.quote-file-assistant-note {
  margin: 8px 4px 10px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 850;
}

.quote-file-frame {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
}

.quote-file-frame iframe,
.quote-file-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.quote-file-frame img {
  object-fit: contain;
  padding: 16px;
}

.quote-file-fallback {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}

.quote-file-fallback h3 {
  margin: 0;
  font-size: 28px;
}

.quote-file-fallback p {
  max-width: 520px;
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.quote-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(212, 171, 73, 0.65);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  padding: 0 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(9, 32, 54, 0.1);
}

.quote-download-button:hover {
  filter: brightness(0.98);
}

.quote-file-actions {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.quote-file-label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.quote-eye-button,
.quote-upload-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.quote-eye-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.quote-upload-button {
  border-color: rgba(212, 171, 73, 0.7);
  background: var(--gold);
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.quote-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.quote-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
}

.gallery-grid img {
  display: block;
  width: 100%;
  height: 135px;
  object-fit: cover;
}

.gallery-grid figcaption {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
}

.gallery-grid figcaption span {
  color: var(--ink);
}

.gallery-grid figcaption small {
  color: var(--muted);
  font-size: 12px;
}

.gallery-grid figcaption button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.detail-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.save-note {
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.empty-state {
  padding: 40px 28px;
  color: var(--steel);
  font-size: 18px;
  font-weight: 800;
}

.receipt-review-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.crew-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 22px;
}

.crew-profile-tab {
  border: 1px solid rgba(9, 37, 58, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--slate);
  font: inherit;
  font-weight: 900;
  padding: 13px 20px;
  cursor: pointer;
}

.crew-profile-tab.is-active {
  background: var(--navy);
  color: #fff;
}

.crew-payroll-actions,
.crew-payroll-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.crew-payroll-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.crew-leave-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.crew-leave-entitlement-grid {
  margin: 14px 0 20px;
  align-items: start;
}

.crew-leave-entitlement-grid .crew-payroll-field {
  grid-template-rows: minmax(44px, auto) auto;
  align-content: start;
}

.crew-payroll-profile-grid,
.crew-payroll-record-grid,
.crew-payroll-expense-form-grid,
.crew-payroll-leave-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.crew-payroll-field {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crew-payroll-leave-form-grid label {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crew-payroll-field input,
.crew-payroll-field select,
.crew-payroll-field textarea,
.crew-payroll-expense-form input,
.crew-payroll-expense-form select,
.crew-payroll-leave-form input,
.crew-payroll-leave-form select,
.crew-payroll-leave-row input,
.crew-payroll-leave-row select {
  width: 100%;
  border: 1px solid rgba(9, 37, 58, 0.2);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.crew-payroll-field textarea {
  min-height: 120px;
  resize: vertical;
}

.crew-payroll-field--wide {
  grid-column: span 2;
}

.crew-payroll-table,
.crew-payroll-expense-table,
.crew-payroll-leave-table {
  overflow-x: auto;
  border: 1px solid rgba(9, 37, 58, 0.16);
  border-radius: 24px;
}

.crew-payroll-row,
.crew-payroll-expense-row,
.crew-payroll-leave-row {
  width: 100%;
  min-width: 1180px;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr 0.9fr 1fr 1fr 1.4fr;
  gap: 14px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(9, 37, 58, 0.14);
  background: #fff;
  color: var(--navy);
  text-align: left;
  padding: 18px 20px;
  font: inherit;
}

.crew-payroll-row:not(.crew-payroll-row--head) {
  cursor: pointer;
}

.crew-payroll-row:not(.crew-payroll-row--head):hover {
  background: rgba(213, 173, 70, 0.12);
}

.crew-payroll-row--head,
.crew-payroll-expense-row--head,
.crew-payroll-leave-row--head {
  background: #f4f6f8;
  color: var(--slate);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crew-payroll-expense-row {
  grid-template-columns: 0.8fr 1fr 0.9fr 1.5fr 0.9fr 0.7fr 1fr 0.7fr;
}

.crew-payroll-leave-row {
  grid-template-columns: 0.85fr 0.85fr 0.7fr 1fr 1fr 1.25fr 1.8fr 0.7fr;
  align-items: stretch;
}

.crew-payroll-leave-row span {
  min-width: 0;
  align-content: center;
}

.crew-payroll-leave-row span small {
  display: block;
  margin-top: 4px;
  color: var(--slate);
  font-size: 11px;
  font-weight: 900;
}

.crew-payroll-leave-row input,
.crew-payroll-leave-row select {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.crew-payroll-record-detail {
  border-color: rgba(213, 173, 70, 0.45);
  background: linear-gradient(180deg, #fff, rgba(213, 173, 70, 0.08));
}

.crew-payroll-posting {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.crew-payroll-payslip-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.crew-payroll-posting article,
.crew-payroll-attachment-list a {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(9, 37, 58, 0.14);
  border-radius: 20px;
  background: #fff;
  padding: 18px;
  color: var(--navy);
  text-decoration: none;
}

.crew-payroll-posting span,
.crew-payroll-attachment-list span {
  color: var(--slate);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crew-payroll-attachments,
.crew-payroll-history {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.crew-payroll-upload {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.crew-payroll-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.crew-payroll-upload.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.crew-payroll-attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.crew-payroll-history p {
  margin: 0;
  border: 1px solid rgba(9, 37, 58, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
}

.crew-payroll-expense-form,
.crew-payroll-leave-form {
  border: 1px solid rgba(9, 37, 58, 0.14);
  border-radius: 22px;
  background: rgba(246, 241, 228, 0.72);
  padding: 16px;
  margin-bottom: 16px;
}

.crew-payroll-expense-form summary,
.crew-payroll-leave-form summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.crew-payroll-expense-form-grid,
.crew-payroll-leave-form-grid {
  margin-top: 16px;
  align-items: end;
}

.crew-payroll-form-note {
  margin: 0;
  color: var(--slate);
  font-weight: 800;
  line-height: 1.35;
}

.crew-payroll-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 900;
}

.crew-payroll-check input {
  width: 26px;
  height: 26px;
}

/* Keep the paired Payroll support forms inside equal-width cards. These
   selectors intentionally follow the shared legacy payroll rules above. */
.crew-payroll-support-grid .crew-payroll-expense-form-grid,
.crew-payroll-support-grid .crew-payroll-leave-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  min-height: 207px;
}

.crew-payroll-support-grid .crew-payroll-expense-form-grid > label,
.crew-payroll-support-grid .crew-payroll-leave-form-grid > label {
  min-width: 0;
  gap: 5px;
}

.crew-payroll-support-grid .crew-payroll-expense-form-grid .crew-payroll-field--wide {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .crew-payroll-support-grid .crew-payroll-expense-form-grid,
  .crew-payroll-support-grid .crew-payroll-leave-form-grid {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .crew-payroll-support-grid .crew-payroll-expense-form-grid,
  .crew-payroll-support-grid .crew-payroll-leave-form-grid {
    grid-template-columns: 1fr;
  }

  .crew-payroll-support-grid .crew-payroll-expense-form-grid .crew-payroll-field--wide {
    grid-column: auto;
  }
}

.files-board {
  display: grid;
  gap: 18px;
  padding: 0 24px 24px;
}

.files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.files-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.files-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-breadcrumb__item {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  padding: 0 14px;
}

.file-breadcrumb__item::after {
  content: "/";
  margin-left: 10px;
  color: var(--muted);
}

.file-breadcrumb__item.is-current {
  background: var(--navy);
  color: #fff;
}

.file-breadcrumb__item.is-current::after {
  content: "";
  margin: 0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.file-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  box-shadow: 0 16px 32px rgba(8, 34, 54, 0.08);
}

.file-card--folder {
  background:
    linear-gradient(135deg, rgba(213, 173, 67, 0.18), rgba(255, 255, 255, 0.82) 54%),
    rgba(255, 255, 255, 0.82);
}

.file-card__main {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.file-card__icon {
  display: inline-grid;
  width: fit-content;
  min-width: 68px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
}

.file-card--folder .file-card__icon {
  border-color: rgba(209, 170, 71, 0.52);
  background: rgba(213, 173, 67, 0.18);
  color: var(--ink);
}

.file-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.08;
}

.file-card small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.file-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.file-card__actions .ghost-button,
.file-card__actions .danger-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.file-empty-state {
  display: grid;
  gap: 8px;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.file-empty-state strong {
  color: var(--ink);
  font-size: 24px;
}

.file-empty-state span {
  max-width: 520px;
  font-weight: 800;
}

@media (max-width: 1320px) {
  .accounting-page-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .accounting-page-layout {
    grid-template-columns: 1fr;
  }

  .accounting-page-side-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }
}

@media (max-width: 900px) {
  .accounting-page {
    width: 100%;
    padding-inline: 12px;
  }

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

  .accounting-page-card--sheet .accounting-edit-grid {
    grid-template-columns: 1fr;
  }

  .accounting-page .accounting-line-row {
    grid-template-columns: 1fr;
  }

  .accounting-page .accounting-line-row--head {
    display: none;
  }
}

@media (max-width: 640px) {
  .accounting-page-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .toolbar {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(180px, 1fr));
  }

  .vessel-passport-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vessel-passport-strip .vessel-detail-field:nth-child(3n) {
    border-right: 0;
  }

  .vessel-passport-card--build .vessel-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vessel-passport-card--build .vessel-detail-field:nth-child(5n) {
    border-right: 1px solid var(--line);
  }

  .vessel-passport-card--build .vessel-detail-field:nth-child(3n) {
    border-right: 0;
  }

  .inventory-filter-panel {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .toolbar .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .app-shell,
  .app-shell[data-sidebar-collapsed="true"] {
    grid-template-columns: 1fr;
  }

  .view-tabs {
    position: static;
    grid-column: 1;
    grid-row: auto;
    display: flex;
    align-items: stretch;
    gap: 10px;
    height: auto;
    max-height: none;
    margin: 18px 20px 16px;
    max-width: calc(100vw - 40px);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-heading {
    display: none;
  }

  .nav-group {
    flex: 0 0 auto;
    min-width: 220px;
    scroll-snap-align: start;
  }

  .nav-subsections {
    display: flex;
    gap: 8px;
    overflow: visible;
  }

  .app-shell[data-sidebar-collapsed="true"] .nav-group summary {
    display: flex;
  }

  .app-shell[data-sidebar-collapsed="true"] .view-tab {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 13px;
    font-size: inherit;
  }

  .app-shell[data-sidebar-collapsed="true"] .view-tab::before {
    content: none;
  }

  .toolbar,
  .sheet-card {
    grid-column: 1;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .search-field {
    grid-column: 1 / -1;
  }

  .quote-grid,
  .quote-outcome-grid,
  .detail-summary,
  .crm-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .accounting-line-row {
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(82px, 0.7fr)) minmax(220px, 1fr) 44px;
  }

  .add-project-card,
  .add-account-card,
  .project-access-field {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .planner-calendar--week {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }

  .planner-calendar--month {
    grid-template-columns: repeat(7, minmax(112px, 1fr));
  }

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

  .vessel-passport-grid {
    grid-template-columns: 1fr;
  }

  .vessel-passport-card--safety {
    height: auto;
    max-height: none;
  }

  .vessel-passport-card--safety .vessel-details-grid {
    overflow-y: visible;
  }

  .vessel-passport-card--build .vessel-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vessel-passport-card--build .vessel-detail-field:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .vessel-passport-card--build .vessel-detail-field:nth-child(2n) {
    border-right: 0;
  }

  .ism-overview-grid,
  .ism-simple-grid,
  .ism-equipment-grid {
    grid-template-columns: 1fr;
  }

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

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

  .vessel-details-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .accounting-payment-form .primary-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .accounting-page-header {
    display: grid;
  }

  .accounting-page-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .accounting-page-side-stack {
    grid-template-columns: 1fr;
  }

  .accounting-page-card--sheet .accounting-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technical-linked-row {
    grid-template-columns: 100px minmax(160px, 1fr);
  }

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

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

  .crm-note-upload,
  .crm-note-form textarea,
  .crm-note-form .primary-button {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .crm-note-form .primary-button {
    justify-self: end;
    width: min(100%, 180px);
  }

  .crew-rest-dashboard {
    grid-template-columns: 1fr;
  }

  .crew-rest-view-heading {
    grid-template-columns: 1fr;
  }

  .crew-rest-chip-row,
  .crew-rest-status-row,
  .crew-rest-week-controls {
    justify-content: flex-start;
  }

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

.crew-profile-layout {
  grid-template-columns: 1fr;
}

.yacht-atlas-board {
  padding: 0 24px 24px;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}

.atlas-plan-card,
.atlas-detail-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.atlas-plan-card {
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr);
  min-height: 660px;
  padding: 18px;
}

.atlas-plan-toolbar {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
}

.atlas-plan-toolbar h3,
.atlas-detail-heading h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

.atlas-plan-toolbar p,
.atlas-detail-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.atlas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.atlas-plan-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 280px;
}

.atlas-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.atlas-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.atlas-dot--job { background: #a7433c; }
.atlas-dot--storage { background: #2f604d; }
.atlas-dot--system { background: var(--gold); }
.atlas-dot--equipment { background: #2e6684; }

.atlas-stage {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(7, 31, 53, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(7, 31, 53, 0.045) 1px, transparent 1px),
    rgba(255, 253, 248, 0.86);
  background-size: 28px 28px;
  cursor: grab;
  touch-action: none;
}

.atlas-stage.is-placing {
  cursor: crosshair;
  outline: 3px solid rgba(213, 173, 67, 0.45);
  outline-offset: -5px;
}

.atlas-stage.is-placing-area {
  cursor: crosshair;
  user-select: none;
}

.atlas-stage.is-dragging-marker {
  cursor: grabbing;
  user-select: none;
}

.atlas-stage.is-panning {
  cursor: grabbing;
  user-select: none;
}

.atlas-stage--xray,
.atlas-stage--xray-sync {
  min-height: 0;
}

.atlas-stage-viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.atlas-plan-file,
.atlas-placeholder-plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.atlas-plan-file--pdf {
  background: var(--paper);
}

.atlas-svg-deck-label {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.atlas-marker {
  position: absolute;
  z-index: 4;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 28px rgba(7, 31, 53, 0.24);
  cursor: grab;
  font: inherit;
  font-weight: 900;
  padding: 0;
  touch-action: none;
  user-select: none;
}

.atlas-view-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.atlas-view-controls button,
.atlas-view-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.atlas-view-controls button {
  min-width: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.atlas-view-controls span {
  min-width: 62px;
  padding: 0 12px;
  background: rgba(213, 173, 67, 0.14);
}

.atlas-view-controls button:hover {
  border-color: rgba(213, 173, 67, 0.82);
  box-shadow: 0 0 0 4px rgba(213, 173, 67, 0.16);
}

.atlas-marker:active,
.atlas-marker.is-dragging {
  cursor: grabbing;
}

.atlas-marker.is-dragging {
  z-index: 8;
  box-shadow: 0 0 0 5px rgba(213, 173, 67, 0.28), 0 22px 44px rgba(7, 31, 53, 0.32);
}

.atlas-marker span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.atlas-marker strong {
  position: absolute;
  left: 31px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 190px;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-marker--area {
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 90px;
  min-height: 52px;
  width: auto;
  height: auto;
  transform: none;
  border-radius: 18px;
  background: rgba(213, 173, 67, 0.2);
  color: var(--ink);
  outline: 2px solid rgba(213, 173, 67, 0.76);
  padding: 8px;
}

.atlas-marker--area strong {
  position: static;
  transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: normal;
}

.atlas-marker--job { background: #a7433c; }
.atlas-marker--storage { background: #2f604d; }
.atlas-marker--system { background: var(--gold); color: var(--ink); }
.atlas-marker--equipment { background: #2e6684; }

.atlas-marker.is-selected {
  box-shadow: 0 0 0 4px rgba(213, 173, 67, 0.35), 0 18px 36px rgba(7, 31, 53, 0.28);
}

/* Keep Yacht Atlas annotations sized against the plan, so pins and areas scale with the vessel. */
.atlas-marker:not(.atlas-marker--area) {
  width: var(--atlas-pin-size, 2.8%);
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  gap: 0.2em;
}

.atlas-marker:not(.atlas-marker--area) span {
  width: 72%;
  height: 72%;
  font-size: 0.72em;
}

.atlas-marker:not(.atlas-marker--area) strong {
  left: calc(100% + 0.35em);
  max-width: 12em;
  padding: 0.35em 0.55em;
  font-size: 0.72em;
}

.atlas-marker--area {
  min-width: 0;
  min-height: 0;
  padding: 0.7%;
  border-radius: 1.2%;
}

.atlas-marker--area strong {
  font-size: clamp(10px, 1.2vw, 14px);
  line-height: 1.15;
}

.atlas-detail-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.atlas-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.atlas-detail-grid article {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.atlas-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.atlas-detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.atlas-marker-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.atlas-marker-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-marker-form input,
.atlas-marker-form select,
.atlas-marker-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 12px;
  text-transform: none;
}

.atlas-marker-form textarea {
  min-height: 86px;
  resize: vertical;
}

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

.atlas-detail-actions {
  justify-content: flex-start;
}

.files-board {
  display: grid;
  gap: 18px;
  padding: 0 24px 24px;
}

.files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.files-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.files-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-breadcrumb__item {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  padding: 0 14px;
}

.file-breadcrumb__item::after {
  content: "/";
  margin-left: 10px;
  color: var(--muted);
}

.file-breadcrumb__item.is-current {
  background: var(--navy);
  color: #fff;
}

.file-breadcrumb__item.is-current::after {
  content: "";
  margin: 0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.file-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  box-shadow: 0 16px 32px rgba(8, 34, 54, 0.08);
}

.file-card--folder {
  background:
    linear-gradient(135deg, rgba(213, 173, 67, 0.18), rgba(255, 255, 255, 0.82) 54%),
    rgba(255, 255, 255, 0.82);
}

.file-card__main {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.file-card__icon {
  display: inline-grid;
  width: fit-content;
  min-width: 68px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
}

.file-card--folder .file-card__icon {
  border-color: rgba(209, 170, 71, 0.52);
  background: rgba(213, 173, 67, 0.18);
  color: var(--ink);
}

.file-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.08;
}

.file-card small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.file-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.file-card__actions .ghost-button,
.file-card__actions .danger-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.file-empty-state {
  display: grid;
  gap: 8px;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.file-empty-state strong {
  color: var(--ink);
  font-size: 24px;
}

.file-empty-state span {
  max-width: 520px;
  font-weight: 800;
}

.file-browser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: stretch;
  min-height: 520px;
}

.file-column-strip {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 38px rgba(8, 34, 54, 0.08);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.file-column {
  flex: 0 0 clamp(240px, 26vw, 320px);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  scroll-snap-align: start;
}

.file-column:last-child {
  border-right: 0;
}

.file-column__heading {
  display: grid;
  gap: 4px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 228, 0.72);
}

.file-column__heading strong,
.file-list-row__text strong,
.file-inspector__header h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-column__heading strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.file-column__heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.file-column__list {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 8px;
}

.file-column__empty {
  margin: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  padding: 14px;
}

.file-list-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 12px;
  padding: 3px;
}

.file-list-row.is-active {
  background: rgba(9, 37, 58, 0.1);
}

.file-list-row__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
}

.file-list-row__main:hover,
.file-list-row.is-active .file-list-row__main {
  background: var(--navy);
  color: #fff;
}

.file-list-row__icon {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.file-list-row__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-list-row__text strong {
  font-size: 14px;
  line-height: 1.15;
}

.file-list-row__text small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.file-list-row__main:hover .file-list-row__text small,
.file-list-row.is-active .file-list-row__text small {
  color: rgba(255, 255, 255, 0.78);
}

.file-list-row__chevron {
  color: inherit;
  font-size: 22px;
  font-weight: 900;
}

.file-list-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 7px 68px;
}

.file-list-row__actions .ghost-button,
.file-list-row__actions .danger-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.file-inspector {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 38px rgba(8, 34, 54, 0.08);
  padding: 16px;
}

.file-inspector__header {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.file-inspector__badge {
  justify-self: start;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  padding: 6px 10px;
}

.file-inspector__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.file-inspector__header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.file-inspector__stats {
  display: grid;
  gap: 10px;
  margin: 0;
}

.file-inspector__stats div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.file-inspector__stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.file-inspector__stats dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
}

.file-inspector__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-inspector__actions .primary-button,
.file-inspector__actions .ghost-button,
.file-inspector__actions .danger-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .file-browser {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .file-column-strip {
    min-height: 420px;
  }

  .file-inspector {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .files-board {
    padding: 0 12px 18px;
  }

  .files-toolbar {
    border-radius: 16px;
    padding: 12px;
  }

  .file-breadcrumb__item {
    min-height: 34px;
    padding: 0 11px;
  }

  .file-column-strip {
    min-height: 380px;
    border-radius: 14px;
  }

  .file-column {
    flex-basis: min(82vw, 300px);
  }

  .file-inspector {
    border-radius: 14px;
    padding: 14px;
  }

  .file-inspector__header h3 {
    font-size: 20px;
  }

  .file-list-row__actions {
    padding-left: 10px;
  }
}

  .crew-rest-entry .primary-button {
    grid-column: 1 / -1;
    justify-self: end;
    width: min(100%, 180px);
  }
}

@media (max-width: 720px) {
  .login-shell {
    width: min(100% - 18px, 1480px);
    margin: 9px auto;
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .app-shell,
  .app-shell[data-sidebar-collapsed="true"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar,
  .toolbar,
  .view-tabs,
  .sheet-card {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .toolbar,
  .toolbar label,
  .toolbar input,
  .toolbar select {
    width: 100%;
    min-width: 0;
  }

  .view-tabs {
    position: relative;
    grid-row: auto;
    display: flex;
    gap: 8px;
    width: auto;
    height: auto;
    max-height: none;
    max-width: calc(100vw - 18px);
    margin: 14px 0 12px;
    padding: 10px 9px;
    border-radius: 22px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .nav-group {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .nav-group summary {
    display: none;
  }

  .nav-subsections {
    display: flex;
    gap: 8px;
    overflow: visible;
  }

  .view-tab,
  .app-shell[data-sidebar-collapsed="true"] .view-tab {
    flex: 0 0 auto;
    justify-content: center;
    width: auto;
    min-width: max-content;
    min-height: 42px;
    padding: 0 15px;
    font-size: 13px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .topbar,
  .sheet-heading,
  .planner-heading,
  .gallery-heading,
  .history-heading,
  .detail-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 20px;
  }

  .user-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    width: 100%;
  }

  .save-status-indicator {
    width: 100%;
    max-width: none;
  }

  .stale-session-banner {
    top: 12px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
  }

  .stale-session-banner .primary-button {
    width: 100%;
  }

  .toolbar,
  .sheet-card {
    margin-left: 14px;
    margin-right: 14px;
  }

  .worklist-heading {
    padding: 12px;
  }

  .worklist-command-bar {
    grid-template-columns: 1fr;
    border-radius: 18px;
    gap: 10px;
    padding: 12px;
  }

  .worklist-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .worklist-command-bar .row-count {
    margin: 0;
  }

  .worklist-command-bar > .primary-button {
    justify-content: center;
    width: 100%;
  }

  .worklist-command-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .worklist-command-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .worklist-view-switch {
    overflow-x: auto;
  }

  .inventory-filter-panel {
    grid-template-columns: 1fr;
    margin-left: 14px;
    margin-right: 14px;
    padding: 12px;
  }

  .toolbar,
  .quote-grid,
  .quote-outcome-grid,
  .detail-summary,
  .core-edit-grid,
  .guest-detail-grid,
  .technical-link-selector-group,
  .crm-edit-grid,
  .crm-readonly-grid,
  .crm-note-form,
  .crew-summary-grid,
  .ism-metric-grid,
  .ism-simple-grid,
  .ism-equipment-grid,
  .ism-create-form-grid,
  .ism-filter-row,
  .ism-incident-detail-grid,
  .ism-incident-investigation,
  .crew-status-panel,
  .crew-rest-entry,
  .vessel-details-grid,
  .vessel-passport-strip,
  .vessel-passport-card .vessel-details-grid,
  .vessel-passport-card--build .vessel-details-grid,
  .crew-document-grid,
  .gallery-grid,
  .add-project-card,
  .add-account-card,
  .project-access-field,
  .history-entry-form,
  .work-history-form,
  .history-photo-grid {
    grid-template-columns: 1fr;
  }

  .vessel-passport-strip .vessel-detail-field,
  .vessel-passport-card .vessel-detail-field,
  .vessel-passport-card--build .vessel-detail-field,
  .vessel-passport-card--build .vessel-detail-field:nth-child(2n),
  .vessel-passport-card--build .vessel-detail-field:nth-child(3n),
  .vessel-passport-card--build .vessel-detail-field:nth-child(5n) {
    border-right: 0;
  }

  .vessel-passport-strip .vessel-detail-field {
    min-height: 78px;
  }

  .job-file-row {
    grid-template-columns: 1fr;
  }

  .job-file-actions {
    justify-content: flex-start;
  }

  .crew-rest-chip-row {
    justify-content: flex-start;
  }

  .ism-board {
    padding: 0 14px 20px;
  }

  .ism-source-banner,
  .ism-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ism-source-banner .ghost-button {
    margin-left: 0;
  }

  .ism-queue-row,
  .ism-detail-list div {
    grid-template-columns: 1fr;
  }

  .ism-queue-row--equipment {
    grid-template-areas:
      "status"
      "title"
      "context"
      "dates";
    min-height: 0;
  }

  .ism-queue-row--files {
    grid-template-areas:
      "main"
      "detail"
      "actions"
      "files";
    grid-template-columns: 1fr;
  }

  .ism-incident-card {
    grid-template-areas:
      "main"
      "details"
      "investigation"
      "files"
      "actions";
    grid-template-columns: 1fr;
  }

  .ism-safety-register-head {
    display: none;
  }

  .ism-safety-register-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    min-height: 0;
    padding: 15px;
  }

  .ism-safety-expiry::before,
  .ism-safety-location::before {
    display: block;
    margin-bottom: 4px;
    color: var(--steel);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .ism-safety-expiry::before {
    content: "Expiry date";
  }

  .ism-safety-location::before {
    content: "Location";
  }

  .ism-row-actions--stacked {
    align-items: stretch;
  }

  .ism-service-dates {
    justify-self: stretch;
    min-width: 0;
  }

  .ism-file-row {
    grid-template-columns: 1fr;
  }

  .ism-file-actions {
    justify-content: flex-start;
  }

  .crew-rest-status-row,
  .crew-rest-week-controls {
    justify-content: flex-start;
  }

  .crew-rest-period-entry {
    padding: 14px;
    border-radius: 18px;
  }

  .crew-rest-period-heading,
  .crew-rest-period-row,
  .crew-rest-period-footer {
    grid-template-columns: 1fr;
  }

  .crew-rest-period-row {
    gap: 9px;
  }

  .crew-rest-period-remove,
  .crew-rest-period-actions .primary-button,
  .crew-rest-period-actions .ghost-button {
    width: 100%;
  }

  .crew-rest-period-actions {
    justify-content: stretch;
  }

  .crew-info-row,
  .crew-file-table-row {
    grid-template-columns: 1fr;
  }

  .crew-info-row--notifications,
  .crew-notification-grid {
    grid-template-columns: 1fr;
  }

  .crew-file-table-head {
    display: none;
  }

  .crew-file-row-actions {
    justify-content: flex-start;
  }

  .crew-info-row > span {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .crew-rest-time-labels {
    display: none;
  }

  .crew-rest-day {
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--cream);
    padding: 12px;
  }

  .crew-rest-exception-note {
    grid-column: 1 / -1;
  }

  .crew-rest-day-badge {
    width: fit-content;
  }

  .planner-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .planner-control-deck {
    justify-self: stretch;
    width: 100%;
  }

  .planner-control-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planner-date-control {
    flex: 1 1 180px;
  }

  .planner-date-control input {
    width: 100%;
  }

  .planner-category-controls {
    flex: 1 0 100%;
    overflow: hidden;
    white-space: normal;
  }

  .planner-board {
    padding-left: 14px;
    padding-right: 14px;
  }

  .planner-option-three-layout {
    grid-template-columns: 1fr;
  }

  .planner-agenda-panel {
    position: static;
  }

  .planner-period-label {
    padding: 0;
  }

  .planner-calendar {
    border-radius: 18px;
    overflow-x: auto;
  }

  .planner-calendar--week {
    grid-template-columns: repeat(7, minmax(220px, 78vw));
  }

  .planner-calendar--month {
    grid-template-columns: repeat(7, minmax(118px, 38vw));
  }

  .planner-day {
    min-height: 420px;
  }

  .planner-calendar--month .planner-day {
    min-height: 148px;
  }

  .systems-equipment-board {
    padding-left: 14px;
    padding-right: 14px;
  }

  .systems-summary-grid,
  .accounting-edit-grid,
  .system-mini-meta,
  .technical-linked-row {
    grid-template-columns: 1fr;
  }

  .accounting-payment-form,
  .accounting-payment-row,
  .accounting-ledger-list article,
  .accounting-rollup__summary {
    grid-template-columns: 1fr;
  }

  .equipment-chip {
    max-width: none;
    width: 100%;
  }

  .add-menu__panel {
    left: 0;
    right: auto;
  }

  .crm-profile-header {
    grid-template-columns: 1fr;
  }

  .crm-tag-editor {
    grid-template-columns: 1fr;
  }

  .login-panel h1 {
    font-size: 46px;
  }

  .detail-page {
    width: 100%;
  }

  .permissions-heading {
    padding-right: 0;
  }

  .quote-file-panel {
    width: min(calc(100vw - 20px), 1180px);
    height: min(calc(100vh - 20px), 920px);
    padding: 10px;
  }

  .quote-file-close {
    top: 18px;
    right: 18px;
  }

  .quote-file-toolbar {
    flex-direction: column;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 12px 54px 12px 12px;
  }

  .quote-file-toolbar-actions {
    flex-wrap: wrap;
  }

  .quote-file-heading h2 {
    font-size: 24px;
  }

  .quote-download-button,
  .bridge-mate-file-button,
  .quote-file-toolbar-actions .danger-button {
    flex: 1 1 140px;
  }

  .permissions-panel > .close-button {
    top: 14px;
    right: 14px;
  }
}

/* Yacht Atlas */
.yacht-atlas-board {
  padding: 0 24px 24px;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}

.atlas-plan-card,
.atlas-detail-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.atlas-plan-card {
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr);
  min-height: 660px;
  padding: 18px;
}

.atlas-plan-toolbar {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
}

.atlas-plan-toolbar h3,
.atlas-detail-heading h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

.atlas-plan-toolbar p,
.atlas-detail-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.atlas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.atlas-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.atlas-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.atlas-dot--job { background: #a7433c; }
.atlas-dot--storage { background: #2f604d; }
.atlas-dot--system { background: var(--gold); }
.atlas-dot--equipment { background: #2e6684; }

.atlas-stage {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(7, 31, 53, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(7, 31, 53, 0.045) 1px, transparent 1px),
    rgba(255, 253, 248, 0.86);
  background-size: 28px 28px;
}

.atlas-stage.is-placing {
  cursor: crosshair;
  outline: 3px solid rgba(213, 173, 67, 0.45);
  outline-offset: -5px;
}

.atlas-stage.is-dragging-marker {
  cursor: grabbing;
  user-select: none;
}

.atlas-plan-file,
.atlas-placeholder-plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.atlas-plan-file--pdf {
  background: var(--paper);
}

.atlas-svg-deck-label {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.atlas-marker {
  position: absolute;
  z-index: 4;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 28px rgba(7, 31, 53, 0.24);
  cursor: grab;
  font: inherit;
  font-weight: 900;
  padding: 0;
  touch-action: none;
  user-select: none;
}

.atlas-marker:active,
.atlas-marker.is-dragging {
  cursor: grabbing;
}

.atlas-marker.is-dragging {
  z-index: 8;
  box-shadow: 0 0 0 5px rgba(213, 173, 67, 0.28), 0 22px 44px rgba(7, 31, 53, 0.32);
}

.atlas-marker span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.atlas-marker strong {
  position: absolute;
  left: 31px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 190px;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-marker--area {
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 90px;
  min-height: 52px;
  width: auto;
  height: auto;
  transform: none;
  border-radius: 18px;
  background: rgba(213, 173, 67, 0.2);
  color: var(--ink);
  outline: 2px solid rgba(213, 173, 67, 0.76);
  padding: 8px;
}

.atlas-marker--area strong {
  position: static;
  transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: normal;
}

.atlas-marker--job { background: #a7433c; }
.atlas-marker--storage { background: #2f604d; }
.atlas-marker--system { background: var(--gold); color: var(--ink); }
.atlas-marker--equipment { background: #2e6684; }

.atlas-marker.is-selected {
  box-shadow: 0 0 0 4px rgba(213, 173, 67, 0.35), 0 18px 36px rgba(7, 31, 53, 0.28);
}

/* Keep Yacht Atlas annotations sized against the plan, so pins and areas scale with the vessel. */
.atlas-marker:not(.atlas-marker--area) {
  width: var(--atlas-pin-size, 2.8%);
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  gap: 0.2em;
}

.atlas-marker:not(.atlas-marker--area) span {
  width: 72%;
  height: 72%;
  font-size: 0.72em;
}

.atlas-marker:not(.atlas-marker--area) strong {
  left: calc(100% + 0.35em);
  max-width: 12em;
  padding: 0.35em 0.55em;
  font-size: 0.72em;
}

.atlas-marker--area {
  min-width: 0;
  min-height: 0;
  padding: 0.7%;
  border-radius: 1.2%;
}

.atlas-marker--area strong {
  font-size: clamp(10px, 1.2vw, 14px);
  line-height: 1.15;
}

.atlas-detail-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.atlas-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.atlas-detail-grid article {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.atlas-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.atlas-detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.atlas-marker-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.atlas-marker-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-marker-form input,
.atlas-marker-form select,
.atlas-marker-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 12px;
  text-transform: none;
}

.atlas-marker-form textarea {
  min-height: 86px;
  resize: vertical;
}

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

.atlas-detail-actions {
  justify-content: flex-start;
}

.atlas-plan-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 280px;
}

.atlas-stage {
  cursor: grab;
  touch-action: none;
}

.atlas-stage.is-panning {
  cursor: grabbing;
  user-select: none;
}

.atlas-stage-viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.atlas-view-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.atlas-view-controls button,
.atlas-view-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.atlas-view-controls button {
  min-width: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.atlas-view-controls span {
  min-width: 62px;
  padding: 0 12px;
  background: rgba(213, 173, 67, 0.14);
}

.atlas-view-controls button:hover {
  border-color: rgba(213, 173, 67, 0.82);
  box-shadow: 0 0 0 4px rgba(213, 173, 67, 0.16);
}

@media (max-width: 1080px) {
  .atlas-layout {
    grid-template-columns: 1fr;
  }

  .atlas-plan-toolbar {
    flex-direction: column;
  }

  .atlas-plan-actions {
    justify-items: start;
    min-width: 0;
  }

  .atlas-legend,
  .atlas-view-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .yacht-atlas-board {
    padding: 0 14px 18px;
  }

  .atlas-plan-card {
    min-height: 560px;
  }

  .atlas-stage {
    min-height: 440px;
  }

  .atlas-detail-grid,
  .atlas-marker-form {
    grid-template-columns: 1fr;
  }
}

/* Yacht Atlas workflow layer. Kept late so it overrides the earlier Atlas base rules. */
.atlas-plan-card {
  grid-template-rows: auto auto minmax(520px, 1fr);
}

.atlas-filter-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) max-content;
  gap: 10px;
  align-items: end;
  padding: 12px 0 16px;
}

.atlas-filter-strip label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-filter-strip select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 12px;
  text-transform: none;
}

.atlas-status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.atlas-status-strip span {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(238, 242, 245, 0.8);
}

.atlas-status-strip em,
.atlas-section-heading .eyebrow {
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.atlas-status-strip strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.atlas-marker-chips {
  position: absolute;
  left: 31px;
  top: calc(50% + 18px);
  display: flex;
  gap: 3px;
  max-width: 220px;
  pointer-events: none;
}

.atlas-marker-chips small {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.atlas-marker:not(.atlas-marker--area) .atlas-marker-chips {
  left: calc(100% + 0.35em);
  top: calc(50% + 1.15em);
}

.atlas-marker--area .atlas-marker-chips {
  position: static;
  flex-wrap: wrap;
  margin-top: 5px;
}

.atlas-workflow-panel,
.atlas-evidence-panel,
.atlas-comments-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.atlas-workflow-panel h4,
.atlas-section-heading h4 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.atlas-workflow-panel p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.atlas-workflow-actions,
.atlas-section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.atlas-upload-button {
  cursor: pointer;
}

.atlas-evidence-list,
.atlas-comment-list {
  display: grid;
  gap: 8px;
}

.atlas-evidence-item,
.atlas-comment {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid rgba(7, 31, 53, 0.08);
  border-radius: 14px;
  background: #fff;
}

.atlas-evidence-item strong,
.atlas-comment p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.atlas-evidence-item small,
.atlas-comment small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.atlas-comment {
  display: grid;
  justify-content: stretch;
}

.atlas-comment-form {
  display: grid;
  gap: 8px;
}

.atlas-comment-form textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

@media (max-width: 1180px) {
  .atlas-filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .atlas-plan-card {
    grid-template-rows: auto auto minmax(440px, 1fr);
  }

  .atlas-filter-strip {
    grid-template-columns: 1fr;
  }

  .atlas-status-strip {
    grid-template-columns: 1fr;
  }
}

/* Files column browser polish. Kept at the end so it wins over older Files rules above. */
.files-board .files-toolbar {
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: none;
}

.files-board .file-browser {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 12px;
  min-height: 0;
}

.files-board .file-column-strip {
  min-height: 360px;
  max-height: 62vh;
  border-color: rgba(9, 32, 54, 0.16);
  border-radius: 12px;
  background: #f7f8f8;
  box-shadow: none;
}

.files-board .file-column {
  flex-basis: clamp(250px, 24vw, 310px);
  background: #fffdfa;
}

.files-board .file-column__heading {
  padding: 11px 12px;
  background: #eef2f4;
}

.files-board .file-column__heading strong {
  font-size: 14px;
}

.files-board .file-column__heading span {
  font-size: 11px;
}

.files-board .file-column__list {
  gap: 1px;
  padding: 6px;
}

.files-board .file-list-row {
  display: block;
  padding: 0;
}

.files-board .file-list-row__main {
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  padding: 6px 8px;
}

.files-board .file-list-row__main:hover,
.files-board .file-list-row.is-active .file-list-row__main {
  background: #0b65d8;
  color: #fff;
}

.files-board .file-list-row__icon {
  min-width: 26px;
  min-height: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(9, 32, 54, 0.08);
  color: var(--steel);
  font-size: 9px;
  line-height: 1;
}

.files-board .file-list-row__icon--folder {
  position: relative;
  background: #4aa3ef;
  box-shadow: inset 0 -8px 0 rgba(7, 31, 53, 0.12);
}

.files-board .file-list-row__icon--folder::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -3px;
  width: 11px;
  height: 6px;
  border-radius: 3px 3px 0 0;
  background: #4aa3ef;
}

.files-board .file-list-row__main:hover .file-list-row__icon,
.files-board .file-list-row.is-active .file-list-row__icon {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.files-board .file-list-row__main:hover .file-list-row__icon--folder,
.files-board .file-list-row.is-active .file-list-row__icon--folder,
.files-board .file-list-row__main:hover .file-list-row__icon--folder::before,
.files-board .file-list-row.is-active .file-list-row__icon--folder::before {
  background: #d9ebff;
}

.files-board .file-list-row__text strong {
  font-size: 13px;
  font-weight: 850;
}

.files-board .file-list-row__text small {
  font-size: 11px;
  font-weight: 750;
}

.files-board .file-list-row__chevron {
  font-size: 18px;
  opacity: 0.72;
}

.files-board .file-list-row__actions {
  display: none;
}

.files-board .file-inspector {
  gap: 14px;
  border-color: rgba(9, 32, 54, 0.16);
  border-radius: 12px;
  background: #fffdfa;
  box-shadow: none;
  padding: 14px;
}

.files-board .file-inspector__badge {
  border-radius: 8px;
  background: #eef2f4;
  color: var(--steel);
  font-size: 10px;
  padding: 5px 8px;
}

.files-board .file-inspector__header h3 {
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.1;
}

.files-board .file-inspector__header p {
  font-size: 12px;
}

.files-board .file-inspector__stats {
  gap: 0;
  border-top: 1px solid var(--line);
}

.files-board .file-inspector__stats div {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.files-board .file-inspector__stats dt {
  font-size: 10px;
}

.files-board .file-inspector__stats dd {
  margin: 0;
  margin-inline-start: 0;
  font-size: 13px;
}

.files-board .file-inspector__actions {
  gap: 7px;
}

.files-board .file-inspector__actions .primary-button,
.files-board .file-inspector__actions .ghost-button,
.files-board .file-inspector__actions .danger-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.files-board .file-inspector__actions .ghost-button {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.files-board .file-folder-create-form {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(209, 170, 71, 0.42);
  border-radius: 12px;
  background: rgba(243, 232, 204, 0.42);
  padding: 12px;
}

.files-board .file-folder-create-form label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.files-board .file-folder-create-form input {
  min-height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.files-board .file-folder-create-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.files-board .file-folder-create-form__actions .primary-button,
.files-board .file-folder-create-form__actions .ghost-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .files-board .file-browser {
    grid-template-columns: 1fr;
  }

  .files-board .file-column-strip {
    min-height: 300px;
    max-height: none;
  }

  .files-board .file-inspector {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .files-board .file-column-strip {
    min-height: 260px;
  }

  .files-board .file-column {
    flex-basis: min(86vw, 320px);
  }

  .files-board .file-list-row__main {
    min-height: 40px;
  }

  .files-board .file-inspector__stats div {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

/* Final Files corrections: compact Finder-style columns, including mobile. */
.files-board .file-column-strip {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  gap: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  width: 100% !important;
}

.files-board .file-column {
  flex: 0 0 280px !important;
  width: 280px !important;
  max-width: 280px !important;
  min-width: 0 !important;
}

.files-board .file-list-row__main {
  min-height: 34px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 5px 7px !important;
}

.files-board .file-list-row__main:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(11, 101, 216, 0.35) !important;
}

.files-board .file-list-row__text {
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 1px !important;
  min-width: 0 !important;
}

.files-board .file-list-row__text strong,
.files-board .file-list-row__text small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

.files-board .file-list-row__text strong {
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

.files-board .file-list-row__text small {
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1.12 !important;
}

.files-board .file-list-row__icon {
  width: 24px !important;
  min-width: 24px !important;
  height: 22px !important;
  min-height: 22px !important;
}

.files-board .file-list-row__chevron {
  justify-self: end !important;
  font-size: 16px !important;
}

.files-board .file-column__heading {
  min-height: 48px !important;
  padding: 9px 10px !important;
}

.files-board .file-column__heading strong {
  font-size: 13px !important;
  letter-spacing: 0 !important;
  line-height: 1.1 !important;
}

.files-board .file-column__heading span {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

@media (max-width: 720px) {
  .files-board .file-browser {
    gap: 10px !important;
  }

  .files-board .file-column-strip {
    min-height: 250px !important;
  }

  .files-board .file-column {
    flex-basis: 228px !important;
    width: 228px !important;
    max-width: 228px !important;
  }

  .files-board .file-column__list {
    padding: 5px !important;
  }

  .files-board .file-list-row__main {
    grid-template-columns: 24px minmax(0, 1fr) 14px !important;
    gap: 6px !important;
  }

  .files-board .file-inspector {
    padding: 12px !important;
  }
}

/* SYS Bridge Files desktop workspace, aligned to the approved mockup direction. */
.files-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
}

.files-card .sheet-heading {
  display: none;
}

.files-board {
  gap: 0 !important;
  padding: 0 0 22px !important;
}

.files-commandbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(9, 32, 54, 0.1);
  background: #fff;
}

.files-commandbar__title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.files-commandbar__title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.files-commandbar__title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.files-commandbar__icon {
  position: relative;
  width: 34px;
  height: 25px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.files-commandbar__icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -8px;
  width: 15px;
  height: 8px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #fff;
}

.file-search-results {
  display: grid;
  gap: 18px;
  min-height: 420px;
  margin: 0 20px;
  padding: 22px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 14px;
  background: #fff;
}

.file-search-results__header,
.file-search-results__group-heading,
.file-search-result {
  display: flex;
  align-items: center;
}

.file-search-results__header {
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(9, 32, 54, 0.1);
}

.file-search-results__header .eyebrow {
  margin: 0 0 5px;
}

.file-search-results__header h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.file-search-results__group {
  display: grid;
  gap: 8px;
}

.file-search-results__group-heading {
  justify-content: space-between;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.file-search-results__group-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 22px;
  border-radius: 999px;
  background: #eef2f4;
  color: var(--ink);
  font-size: 11px;
}

.file-search-results__list {
  display: grid;
  border: 1px solid rgba(9, 32, 54, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.file-search-result {
  width: 100%;
  min-width: 0;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(9, 32, 54, 0.08);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 12px 14px;
  text-align: left;
}

.file-search-result:last-child {
  border-bottom: 0;
}

.file-search-result:hover,
.file-search-result:focus-visible {
  background: #f4f7f8;
  outline: none;
}

.file-search-result__content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.file-search-result__content strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-search-result__content small {
  overflow: hidden;
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-search-result__action {
  margin-left: auto;
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.file-search-result:hover .file-search-result__action {
  color: var(--ink);
}

.files-commandbar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.files-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 0 18px;
}

.files-action--secondary {
  border: 1px solid rgba(9, 32, 54, 0.12);
  background: #fff;
  color: var(--ink);
}

.files-action--secondary.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.files-action--primary {
  border: 1px solid rgba(160, 117, 29, 0.28);
  background: #d7a73e;
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(209, 170, 71, 0.25);
}

.files-board .file-browser {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px) !important;
  gap: 0 !important;
  min-height: 640px !important;
  margin: 0 20px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.files-board .file-column-strip {
  display: flex !important;
  flex-flow: row nowrap !important;
  min-height: 640px !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.files-board .file-column {
  flex: 1 0 280px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 260px !important;
  border-right: 1px solid rgba(9, 32, 54, 0.1) !important;
  background: #fff !important;
}

@media (min-width: 721px) {
  .files-board .file-column {
    flex: 0 0 max(280px, calc(100% / 3)) !important;
    width: max(280px, calc(100% / 3)) !important;
    min-width: 0 !important;
  }
}

@media (min-width: 1081px) {
  .files-board .file-browser:not(.is-inspector-hidden) .file-column {
    flex-basis: max(280px, 50%) !important;
    width: max(280px, 50%) !important;
  }
}

.files-board .file-column__heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 68px !important;
  border-bottom: 1px solid rgba(9, 32, 54, 0.1) !important;
  background: #fff !important;
  padding: 0 20px !important;
}

.files-board .file-column__heading strong {
  color: var(--ink);
  font-size: 17px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.files-board .file-column__heading span {
  max-width: 56%;
  overflow: hidden;
  color: var(--steel);
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-board .file-column__heading::after {
  content: "...";
  margin-left: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 2px;
}

.files-board .file-column__list {
  display: grid !important;
  align-content: start !important;
  gap: 0 !important;
  padding: 10px 14px !important;
}

.files-board .file-list-row {
  border-bottom: 1px solid rgba(9, 32, 54, 0.08);
}

.files-board .file-list-row__main {
  grid-template-columns: 30px minmax(0, 1fr) auto 16px !important;
  gap: 10px !important;
  min-height: 54px !important;
  border-radius: 7px !important;
  color: var(--ink);
  padding: 0 10px !important;
}

.files-board .file-list-row__main:hover {
  background: rgba(9, 32, 54, 0.04) !important;
  color: var(--ink) !important;
}

.files-board .file-list-row.is-active .file-list-row__main {
  background: #0b65d8 !important;
  color: #fff !important;
}

.files-board .file-list-row__icon {
  width: 24px !important;
  min-width: 24px !important;
  height: 22px !important;
  min-height: 22px !important;
  color: #a63b36;
  font-size: 9px !important;
  font-weight: 950;
}

.files-board .file-list-row__icon--folder {
  background: linear-gradient(#75b7f2, #569de3) !important;
  box-shadow: inset 0 -6px 0 rgba(7, 31, 53, 0.1) !important;
}

.files-board .file-list-row__icon--folder::before {
  background: #75b7f2 !important;
}

.files-board .file-list-row__text {
  gap: 3px !important;
}

.files-board .file-list-row__text strong {
  color: inherit;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}

.files-board .file-list-row__text small {
  color: var(--muted);
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
}

.files-board .file-list-row.is-active .file-list-row__text small {
  color: rgba(255, 255, 255, 0.82) !important;
}

.files-board .file-list-row__chevron {
  align-self: center;
  color: inherit;
  opacity: 0.62;
}

.files-board .file-list-row__meta {
  align-self: center;
  min-width: 42px;
  overflow: hidden;
  color: var(--steel);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-board .file-list-row.is-active .file-list-row__meta {
  color: rgba(255, 255, 255, 0.82);
}

.files-board .file-inspector {
  align-content: start !important;
  gap: 10px !important;
  min-height: 0;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 0 !important;
  border-left: 1px solid rgba(9, 32, 54, 0.1) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  padding: 18px !important;
}

.files-board .file-inspector::before {
  content: "Inspector";
  display: flex;
  align-items: center;
  min-height: 18px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.files-board .file-inspector__header {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.files-board .file-inspector__preview {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  color: #a63b36;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.files-board .file-inspector__preview--folder {
  position: relative;
  background: linear-gradient(#7dbdf3, #5da4e7);
  box-shadow: inset 0 -16px 0 rgba(7, 31, 53, 0.08);
}

.files-board .file-inspector__preview--folder::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -4px;
  width: 20px;
  height: 8px;
  border-radius: 5px 5px 0 0;
  background: #7dbdf3;
}

.files-board .file-inspector__preview--file {
  border: 1px solid rgba(9, 32, 54, 0.12);
  background: #fff;
}

.files-board .file-inspector__header h3 {
  color: var(--ink);
  font-size: 16px !important;
  font-weight: 950;
  letter-spacing: 0 !important;
  line-height: 1.15 !important;
}

.files-board .file-inspector__header p {
  margin-top: 3px;
  color: var(--steel);
  font-size: 11px !important;
  font-weight: 700;
}

.files-board .file-inspector__stats {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px !important;
  overflow: hidden;
  border: 1px solid rgba(9, 32, 54, 0.1) !important;
  border-radius: 8px;
  background: rgba(9, 32, 54, 0.1);
}

.files-board .file-inspector__stats div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 3px !important;
  min-width: 0;
  border: 0 !important;
  background: #fff;
  padding: 7px 9px !important;
}

.files-board .file-inspector__stats .file-inspector__stat--wide {
  grid-column: 1 / -1;
}

.files-board .file-inspector__stats dt {
  color: var(--steel);
  font-size: 10px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.files-board .file-inspector__stats dd {
  color: var(--ink);
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.25;
}

.files-board .file-inspector__actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px !important;
  border-top: 1px solid rgba(9, 32, 54, 0.1);
  padding-top: 9px;
}

.files-board .file-inspector__actions::before {
  content: "Actions";
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.files-board .file-inspector__actions .primary-button,
.files-board .file-inspector__actions .ghost-button,
.files-board .file-inspector__actions .danger-button,
.files-board .file-inspector__actions .inline-button {
  justify-content: center;
  width: 100%;
  min-height: 34px !important;
  border: 1px solid rgba(9, 32, 54, 0.14) !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  padding: 0 8px !important;
}

.files-board .file-inspector__actions .primary-button {
  border-color: var(--navy) !important;
  background: var(--navy) !important;
  color: #fff !important;
}

.files-board .file-inspector__actions .bridge-mate-file-button {
  border-color: rgba(209, 170, 71, 0.46) !important;
  background: rgba(209, 170, 71, 0.14) !important;
}

.files-board .file-inspector__actions .danger-button {
  color: var(--red) !important;
}

.files-board .file-folder-create-form {
  border-color: rgba(9, 32, 54, 0.12) !important;
  background: #f8fafb !important;
}

@media (max-width: 1080px) {
  .files-commandbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .files-commandbar__actions {
    justify-content: flex-start;
  }

  .files-board .file-browser {
    grid-template-columns: 1fr !important;
  }

  .files-board .file-inspector {
    min-height: 0;
    border-left: 0 !important;
    border-top: 1px solid rgba(9, 32, 54, 0.1) !important;
  }
}

@media (max-width: 720px) {
  .files-commandbar {
    gap: 12px;
    padding: 16px;
  }

  .files-commandbar__title h3 {
    font-size: 24px;
  }

  .files-commandbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .files-action {
    min-height: 42px;
    padding: 0 12px;
  }

  .file-search-results {
    gap: 14px;
    min-height: 0;
    margin: 0 12px;
    padding: 16px;
  }

  .file-search-result {
    align-items: flex-start;
    padding: 12px;
  }

  .file-search-result__action {
    font-size: 0;
    padding-top: 2px;
  }

  .file-search-result__action span {
    font-size: 18px;
  }

  .files-board .file-browser {
    margin: 0 12px;
  }

  .files-board .file-column-strip {
    min-height: 330px !important;
  }

  .files-board .file-column {
    flex: 0 0 78vw !important;
    width: 78vw !important;
    min-width: 245px !important;
    max-width: 320px !important;
  }

  .files-board .file-list-row__main {
    min-height: 48px !important;
  }

  .bridge-mate-file-context {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
  }

  .bridge-mate-file-context__open {
    display: none;
  }

  .files-board .file-inspector {
    max-height: none;
    padding: 18px !important;
  }

  .files-board .file-inspector__header {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .files-board .file-inspector__preview {
    width: 44px;
    height: 44px;
  }

  .files-board .file-inspector__stats {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .files-board .file-inspector__stats div {
    grid-column: 1 / -1;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    align-items: center;
  }
}

/* Finder-style inline naming and consistent SYS Bridge folder icons. */
.files-board .file-list-row__icon--folder {
  position: relative !important;
  width: 26px !important;
  min-width: 26px !important;
  height: 20px !important;
  min-height: 20px !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #7fbeef 0%, #5ba5e8 100%) !important;
  box-shadow:
    inset 0 -5px 0 rgba(7, 31, 53, 0.08),
    0 1px 2px rgba(7, 31, 53, 0.12) !important;
}

.files-board .file-list-row__icon--folder::before {
  content: "" !important;
  position: absolute !important;
  left: 3px !important;
  top: -5px !important;
  width: 12px !important;
  height: 7px !important;
  border-radius: 4px 4px 0 0 !important;
  background: #7fbeef !important;
}

.files-board .file-list-row.is-active .file-list-row__icon--folder,
.files-board .file-list-row.is-active .file-list-row__icon--folder::before {
  background: #d9ebff !important;
}

.files-board .file-inspector__preview--folder {
  background: linear-gradient(180deg, #7fbeef 0%, #5ba5e8 100%) !important;
}

.files-board .file-inspector__preview--folder::before {
  background: #7fbeef !important;
}

.files-board .file-inline-folder-form {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) auto auto !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 54px !important;
  border-bottom: 1px solid rgba(9, 32, 54, 0.08) !important;
  border-radius: 7px !important;
  background: rgba(11, 101, 216, 0.06) !important;
  padding: 0 10px !important;
}

.files-board .file-inline-folder-form input {
  min-height: 34px !important;
  border: 1px solid rgba(11, 101, 216, 0.42) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  padding: 0 10px !important;
}

.files-board .file-inline-folder-form input:focus {
  border-color: #0b65d8 !important;
  box-shadow: 0 0 0 3px rgba(11, 101, 216, 0.14) !important;
}

.files-board .file-inline-folder-form__save,
.files-board .file-inline-folder-form__cancel {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  padding: 0 10px !important;
}

.files-board .file-inline-folder-form__save {
  border: 0 !important;
  background: #0b65d8 !important;
  color: #fff !important;
}

.files-board .file-inline-folder-form__cancel {
  width: 30px !important;
  border: 1px solid rgba(9, 32, 54, 0.12) !important;
  background: #fff !important;
  color: var(--steel) !important;
  padding: 0 !important;
}

@media (max-width: 720px) {
  .files-board .file-inline-folder-form {
    grid-template-columns: 26px minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  .files-board .file-inline-folder-form__cancel {
    display: none !important;
  }
}

/* Final simplification: Finder rows are icon + text, with optional folder chevron. */
.files-board .file-list-row {
  min-width: 0 !important;
  border-bottom: 1px solid rgba(9, 32, 54, 0.08) !important;
}

.files-board .file-list-row__main {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) 14px !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 38px !important;
  width: 100% !important;
  border-radius: 6px !important;
  padding: 0 8px !important;
  text-align: left !important;
}

.files-board .file-list-row__text {
  display: block !important;
  min-width: 0 !important;
}

.files-board .file-list-row__text strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.files-board .file-list-row__text small,
.files-board .file-list-row__meta {
  display: none !important;
}

.files-board .file-list-row__chevron {
  display: block !important;
  justify-self: end !important;
  font-size: 16px !important;
}

.files-board .file-list-row__icon {
  place-self: center start !important;
}

.files-board .file-list-row__icon--folder {
  width: 23px !important;
  min-width: 23px !important;
  height: 18px !important;
  min-height: 18px !important;
  border-radius: 3px !important;
}

.files-board .file-list-row__icon--folder::before {
  left: 3px !important;
  top: -5px !important;
  width: 11px !important;
  height: 7px !important;
}

.files-board .file-list-row__icon--file {
  width: 22px !important;
  min-width: 22px !important;
  height: 24px !important;
  min-height: 24px !important;
  border: 1px solid rgba(9, 32, 54, 0.18) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--red) !important;
  font-size: 7px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.files-board .file-list-row:not(:has(.file-list-row__chevron)) .file-list-row__main {
  grid-template-columns: 28px minmax(0, 1fr) 14px !important;
}

.files-board .file-list-row:not(:has(.file-list-row__chevron)) .file-list-row__main::after {
  content: "";
}

.files-board .file-inline-folder-form {
  grid-template-columns: 28px minmax(0, 1fr) auto auto !important;
  min-height: 38px !important;
  padding: 0 8px !important;
}

.files-board .file-inline-folder-form input {
  min-height: 30px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

.files-board .file-inline-folder-form__save,
.files-board .file-inline-folder-form__cancel {
  min-height: 28px !important;
}

@media (max-width: 720px) {
  .files-board .file-list-row__main {
    min-height: 40px !important;
  }
}

/* Drag-to-move feedback for Files. */
.files-board .file-list-row[draggable="true"] .file-list-row__main {
  cursor: grab;
}

.files-board .file-list-row.is-dragging {
  opacity: 0.46;
}

.files-board .file-list-row.is-dragging .file-list-row__main {
  cursor: grabbing;
}

.files-board .file-list-row.is-drop-target .file-list-row__main {
  background: rgba(11, 101, 216, 0.12) !important;
  box-shadow: inset 0 0 0 2px rgba(11, 101, 216, 0.32) !important;
  color: var(--ink) !important;
}

.files-board .file-list-row.is-active.is-drop-target .file-list-row__main {
  background: #0b65d8 !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
}

.files-board .file-column.is-drop-target {
  background: rgba(11, 101, 216, 0.035) !important;
  box-shadow: inset 0 0 0 2px rgba(11, 101, 216, 0.2) !important;
}

/* Keep the Yacht Atlas legend compact without horizontal scrolling. */
.atlas-plan-actions {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.atlas-legend {
  display: flex !important;
  flex-flow: row wrap !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  scrollbar-width: none;
}

.atlas-legend span {
  flex: 0 1 auto !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

.atlas-legend::-webkit-scrollbar {
  display: none;
}

.atlas-dot {
  flex: 0 0 auto !important;
}

@media (max-width: 720px) {
  .atlas-plan-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .atlas-legend {
    justify-content: flex-start !important;
    width: 100% !important;
  }
}

@media (max-width: 720px) {
  .bridge-mate-toggle {
    right: 16px;
    bottom: 16px;
    width: 64px;
    height: 64px;
    min-height: 64px;
    padding: 6px;
    border-radius: 22px;
  }

  .bridge-mate-toggle__icon {
    border-radius: 15px;
  }

  .bridge-mate-panel {
    right: 10px;
    bottom: 92px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 112px);
    border-radius: 20px;
    padding: 10px;
  }

  .bridge-mate-panel__heading h2 {
    font-size: 21px;
  }

  .bridge-mate-tabs {
    grid-template-columns: 1fr;
  }

  .bridge-mate-source {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .bridge-mate-source .inline-button {
    grid-column: 2;
    justify-self: start;
  }
}

#defect-table {
  min-width: 1280px;
}

#defect-table th,
#defect-table td {
  display: table-cell !important;
  vertical-align: top;
}

#defect-table th:nth-child(1),
#defect-table td:nth-child(1) {
  width: 120px;
}

#defect-table th:nth-child(2),
#defect-table td:nth-child(2),
#defect-table th:nth-child(3),
#defect-table td:nth-child(3) {
  width: 120px;
}

#defect-table th:nth-child(4),
#defect-table td:nth-child(4) {
  width: 30%;
  min-width: 260px;
}

#defect-table th:nth-child(5),
#defect-table td:nth-child(5) {
  width: 14%;
  min-width: 150px;
}

#defect-table th:nth-child(9),
#defect-table td:nth-child(9) {
  width: 190px;
}

#defect-table td.empty-state {
  display: table-cell !important;
}

.defect-title-cell strong,
.defect-title-cell span,
.defect-title-cell small {
  display: block;
}

.defect-title-cell span,
.defect-title-cell small {
  margin-top: 4px;
  color: var(--steel);
  font-size: 0.86rem;
  line-height: 1.35;
}

.defect-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.defect-evidence-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.defect-evidence-item {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.defect-evidence-item img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.defect-evidence-item figcaption {
  margin-top: 8px;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
}

.galley-card {
  background: var(--cream);
}

.galley-board {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.galley-summary-card,
.galley-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.galley-summary-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
  border-top: 4px solid var(--gold);
}

.galley-summary-card--warning {
  border-top-color: var(--red);
}

.galley-summary-card span,
.galley-table-row small,
.galley-preference-item span,
.galley-recipe-card span,
.galley-upload-zone small {
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.galley-summary-card strong {
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 0.95;
}

.galley-summary-card small {
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
}

.galley-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(260px, 0.85fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.galley-lower-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
}

.galley-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: min(720px, calc(100vh - 150px));
  overflow: hidden;
  padding: 18px;
}

.inventory-receipt-panel {
  margin: 0 0 18px;
}

.inventory-receipt-panel:empty,
.inventory-receipt-panel[hidden] {
  display: none;
}

.inventory-receipt-card.galley-panel {
  max-height: none;
  overflow: visible;
}

.inventory-receipt-list {
  max-height: clamp(220px, 35vh, 440px);
}

.galley-panel-heading {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.galley-panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.15;
}

.galley-menu-days,
.galley-table,
.galley-preference-list,
.galley-recipe-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: clamp(240px, 42vh, 520px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.galley-menu-form {
  flex: 0 0 auto;
  display: grid;
  gap: 12px;
}

.galley-menu-meta {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.35fr);
  gap: 10px;
}

.galley-menu-week {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: clamp(260px, 42vh, 520px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.galley-saved-menu-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.galley-menu-form + .galley-saved-menu-list,
.galley-menu-week + .galley-saved-menu-list {
  margin-top: 12px;
}

.galley-saved-menu-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.78);
}

.galley-saved-menu-card.is-expanded {
  border-color: rgba(215, 174, 64, 0.64);
  background: rgba(255, 255, 255, 0.92);
}

.galley-saved-menu-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.galley-saved-menu-summary div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.galley-saved-menu-summary small,
.galley-saved-menu-summary span {
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.galley-saved-menu-summary small {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.galley-saved-menu-summary strong {
  color: var(--ink);
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.galley-saved-menu-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.galley-menu-day-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.galley-menu-day-card:hover,
.galley-menu-day-card:focus-visible {
  border-color: rgba(215, 174, 64, 0.72);
  box-shadow: 0 0 0 3px rgba(215, 174, 64, 0.16);
  outline: none;
}

.galley-menu-day-card strong {
  color: var(--ink);
  font-weight: 950;
  line-height: 1.25;
}

.galley-menu-day-card span,
.galley-menu-day-card small {
  min-width: 0;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.galley-menu-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--steel);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.galley-menu-form input,
.galley-menu-form select,
.galley-menu-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 9px 10px;
}

.galley-menu-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 26px);
}

.galley-menu-editor-panel {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100vw - 28px));
  height: min(900px, calc(100vh - 28px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.galley-menu-form--modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  gap: 0;
}

.galley-menu-editor-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: clamp(18px, 3vw, 32px);
  border-bottom: 1px solid rgba(10, 36, 58, 0.1);
}

.galley-menu-editor-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 0.98;
}

.galley-menu-editor-header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--steel);
  font-weight: 850;
  line-height: 1.35;
}

.galley-menu-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.galley-menu-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  min-height: 0;
  padding: clamp(16px, 2.4vw, 28px);
}

.galley-menu-editor-main,
.galley-menu-stock-rail {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.galley-menu-editor-main {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.galley-menu-editor-main .galley-menu-meta {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.32fr);
}

.galley-menu-editor-main .galley-menu-week {
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.galley-menu-stock-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.galley-menu-stock-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.galley-menu-stock-header h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
}

.galley-menu-stock-search {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.galley-menu-stock-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 36, 58, 0.16);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.galley-menu-stock-search input::placeholder {
  color: rgba(87, 110, 134, 0.72);
}

.galley-menu-stock-search input:focus {
  border-color: rgba(215, 174, 64, 0.78);
  box-shadow: 0 0 0 4px rgba(215, 174, 64, 0.14);
  outline: none;
}

.galley-menu-stock-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.galley-menu-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(10, 36, 58, 0.11);
  border-radius: 10px;
  background: var(--white);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.galley-menu-stock-row:hover,
.galley-menu-stock-row:focus-visible {
  border-color: rgba(215, 174, 64, 0.72);
  box-shadow: 0 0 0 3px rgba(215, 174, 64, 0.16);
  outline: none;
}

.galley-menu-stock-row span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.galley-menu-stock-row strong {
  color: var(--ink);
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.galley-menu-stock-row small {
  color: var(--steel);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.galley-menu-stock-qty {
  justify-self: end;
  max-width: 120px;
  color: var(--steel);
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
}

.galley-menu-stock-qty.is-low {
  color: #9c3f18;
}

.galley-menu-stock-empty {
  margin: 0;
}

@media (max-width: 1080px) {
  .galley-menu-editor-panel {
    height: min(940px, calc(100vh - 20px));
  }

  .galley-menu-editor-header {
    align-items: stretch;
    flex-direction: column;
  }

  .galley-menu-editor-actions {
    justify-content: flex-start;
  }

  .galley-menu-editor-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .galley-menu-editor-main,
  .galley-menu-stock-rail {
    overflow: visible;
  }

  .galley-menu-stock-list {
    max-height: 360px;
  }
}

@media (max-width: 720px) {
  .galley-menu-editor-modal {
    padding: 8px;
  }

  .galley-menu-editor-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .galley-menu-editor-header,
  .galley-menu-editor-layout {
    padding: 14px;
  }

  .galley-menu-editor-header h2 {
    font-size: clamp(1.7rem, 12vw, 2.6rem);
  }

  .galley-menu-editor-actions,
  .galley-menu-editor-actions .primary-button,
  .galley-menu-editor-actions .secondary-button {
    width: 100%;
  }

  .galley-menu-editor-main .galley-menu-meta,
  .galley-menu-editor-main .galley-menu-week,
  .galley-menu-stock-row {
    grid-template-columns: 1fr;
  }

  .galley-menu-stock-qty {
    justify-self: start;
    max-width: none;
    text-align: left;
  }
}

.galley-menu-day-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 22px;
}

.galley-menu-day-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
}

.galley-menu-day-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.galley-menu-day-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.galley-menu-day-form input,
.galley-menu-day-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 12px;
}

.galley-menu-day-form textarea {
  resize: vertical;
}

.galley-menu-day-form textarea[name="breakfast"],
.galley-menu-day-form textarea[name="lunch"],
.galley-menu-day-form textarea[name="dinner"] {
  min-height: 148px;
}

.galley-menu-day-form .wide-field,
.galley-menu-day-form .galley-card-actions {
  grid-column: 1 / -1;
}

.galley-menu-day,
.galley-table-row,
.galley-preference-item,
.galley-recipe-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
}

.galley-preference-item {
  gap: 10px;
}

.galley-preference-item__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.galley-preference-item__heading span {
  flex: 0 0 auto;
}

.galley-preference-item__details {
  display: grid;
  gap: 8px;
}

.galley-preference-detail {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(10, 36, 58, 0.08);
}

.galley-table-row--button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.galley-table-row--button:hover,
.galley-table-row--button:focus-visible {
  border-color: rgba(213, 174, 64, 0.65);
  box-shadow: 0 0 0 3px rgba(213, 174, 64, 0.16);
  outline: none;
}

.galley-menu-day strong,
.galley-table-row strong,
.galley-preference-item strong,
.galley-recipe-card strong {
  min-width: 0;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.galley-menu-day span,
.galley-table-row span,
.galley-preference-item p,
.galley-recipe-card p,
.galley-note {
  margin: 0;
  color: var(--steel);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.galley-receipt-lines {
  display: grid;
  gap: 6px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.galley-receipt-lines li,
.galley-receipt-empty {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(10, 36, 58, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.galley-receipt-lines span,
.galley-receipt-empty span {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.25;
}

.galley-receipt-empty small {
  color: var(--steel);
  font-weight: 750;
  line-height: 1.35;
}

.galley-receipt-empty--extracting {
  border-color: rgba(213, 174, 64, 0.34);
  background: rgba(250, 244, 226, 0.82);
}

.galley-receipt-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.galley-receipt-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--steel);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.galley-receipt-form input,
.galley-receipt-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 8px 10px;
  text-overflow: ellipsis;
}

.galley-receipt-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.galley-receipt-line-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(10, 36, 58, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.galley-receipt-line-editor label:first-child {
  grid-column: 1 / -1;
}

.galley-receipt-line-editor label:nth-child(2) {
  grid-column: 1 / 2;
}

.galley-receipt-line-editor label:nth-child(3) {
  grid-column: 2 / 3;
}

.galley-receipt-line-editor .icon-button {
  grid-column: 3 / 4;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  justify-self: end;
}

.galley-receipt-help {
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.galley-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.galley-receipt-form .galley-card-actions {
  align-items: stretch;
}

.galley-receipt-form .primary-button,
.galley-receipt-form .secondary-button,
.galley-receipt-form .inline-button {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
}

.galley-receipt-form .primary-button {
  min-width: 132px;
}

.receipt-review-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.receipt-review-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.receipt-review-row-main small {
  color: var(--steel);
  font-weight: 850;
  line-height: 1.3;
}

.receipt-review-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.receipt-review-modal {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  align-items: stretch;
  justify-items: center;
  padding: clamp(8px, 1vw, 14px);
  overflow: hidden;
  isolation: isolate;
}

.receipt-review-modal__backdrop {
  background: rgba(7, 31, 53, 0.62);
  backdrop-filter: blur(6px);
}

.receipt-review-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.2vw, 16px);
  width: min(1760px, calc(100vw - 20px));
  height: min(940px, calc(100dvh - 20px));
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(5, 19, 32, 0.32);
  padding: clamp(14px, 1.8vw, 24px);
}

.receipt-review-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(10, 36, 58, 0.12);
}

.receipt-review-modal__header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 0.95;
}

.receipt-review-modal__header p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--steel);
  font-weight: 780;
  line-height: 1.35;
}

.receipt-review-modal__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
  color: var(--steel);
  font-weight: 900;
}

.receipt-review-modal__meta .close-button {
  min-height: 42px;
  padding: 0 18px;
}

.receipt-review-modal__body {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.receipt-review-modal__body > .galley-receipt-form {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 0;
}

.receipt-review-defaults {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 10px;
}

.receipt-review-defaults--inventory {
  grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.92fr) minmax(170px, 0.92fr) minmax(150px, 0.72fr) minmax(110px, 0.52fr);
}

.receipt-review-table {
  display: grid;
  gap: 0;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  scrollbar-gutter: stable;
}

.receipt-review-table-head,
.receipt-review-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.75fr) minmax(150px, 0.82fr) minmax(170px, 0.9fr) 78px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 9px 12px;
}

.receipt-review-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(10, 36, 58, 0.12);
  background: rgba(239, 244, 248, 0.84);
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-review-table-row {
  border: 0;
  border-bottom: 1px solid rgba(10, 36, 58, 0.08);
  border-radius: 0;
  background: transparent;
}

.receipt-review-table-row:last-child {
  border-bottom: 0;
}

.receipt-review-table-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.receipt-review-table-row label.receipt-review-table-cell,
.receipt-review-table-row .receipt-review-table-cell {
  grid-column: auto;
}

.receipt-review-table-cell > span {
  display: none;
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-review-table-cell--delete {
  justify-items: center;
}

.inventory-receipt-editor .receipt-review-table-head,
.inventory-receipt-editor .receipt-review-table-row {
  grid-template-columns:
    minmax(230px, 1.6fr)
    minmax(138px, 0.78fr)
    minmax(112px, 0.58fr)
    minmax(138px, 0.78fr)
    minmax(118px, 0.62fr)
    minmax(76px, 0.36fr)
    minmax(136px, 0.7fr)
    78px;
  min-width: 1020px;
}

.inventory-receipt-editor input,
.inventory-receipt-editor select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.receipt-review-code-input {
  min-height: 34px !important;
  font-size: 0.76rem !important;
  color: var(--steel);
}

.receipt-review-line-meta {
  display: block;
  margin-top: 2px;
  color: var(--steel);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: none;
}

.receipt-review-delete-button {
  grid-column: auto;
  justify-self: center;
  width: auto;
  min-width: 70px;
  height: 36px;
  min-height: 36px;
  border: 1px solid rgba(160, 48, 45, 0.2);
  border-radius: 999px;
  background: rgba(160, 48, 45, 0.08);
  color: #a0302d;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  text-transform: none;
}

.receipt-review-row-delete {
  width: auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(160, 48, 45, 0.24);
  border-radius: 999px;
  background: rgba(160, 48, 45, 0.08);
  color: #a0302d;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  text-transform: none;
}

.receipt-review-modal .galley-card-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 0;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(249, 247, 242, 0), var(--paper) 24%);
}

.galley-recipe-editor {
  gap: 12px;
}

.galley-recipe-editor label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.galley-recipe-editor input,
.galley-recipe-editor select,
.galley-recipe-editor textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 12px;
}

.galley-recipe-editor textarea {
  resize: vertical;
}

.galley-upload-zone {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px dashed rgba(10, 36, 58, 0.32);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(10, 36, 58, 0.08), rgba(215, 174, 64, 0.12));
  cursor: pointer;
}

.galley-upload-zone input {
  width: 100%;
  color: var(--steel);
}

.galley-upload-zone span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.galley-fridge-form {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
  margin-bottom: 12px;
}

.galley-fridge-form label {
  display: grid;
  gap: 6px;
}

.galley-fridge-form label:first-child,
.galley-fridge-form label:nth-child(3),
.galley-fridge-form button {
  grid-column: 1 / -1;
}

.galley-fridge-form span {
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .galley-summary-grid,
  .galley-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .galley-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .receipt-review-defaults--inventory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-review-table-head,
  .receipt-review-table-row {
    grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 0.8fr) minmax(170px, 0.9fr) 60px;
  }
}

@media (max-width: 980px) {
  .galley-summary-grid,
  .galley-lower-grid {
    grid-template-columns: 1fr;
  }

  .galley-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .receipt-review-modal {
    padding: 8px;
  }

  .receipt-review-modal__panel {
    display: block;
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
    overflow-y: auto;
    padding: 16px;
  }

  .receipt-review-modal__body {
    overflow: visible;
  }

  .receipt-review-modal__body > .galley-receipt-form {
    display: block;
  }

  .receipt-review-modal__header {
    flex-direction: column;
    margin-bottom: 16px;
  }

  .receipt-review-modal__meta {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .receipt-review-defaults,
  .receipt-review-defaults--inventory {
    grid-template-columns: 1fr;
  }

  .receipt-review-table {
    gap: 10px;
    max-height: none;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .receipt-review-table-head {
    display: none;
  }

  .receipt-review-table-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(10, 36, 58, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
  }

  .inventory-receipt-editor .receipt-review-table-head,
  .inventory-receipt-editor .receipt-review-table-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    min-width: 0;
  }

  .receipt-review-table-row label.receipt-review-table-cell,
  .receipt-review-table-row .receipt-review-table-cell {
    grid-column: 1 / -1;
  }

  .receipt-review-table-cell > span {
    display: block;
  }

  .receipt-review-table-row .receipt-review-table-cell--delete {
    grid-column: 1 / -1;
    justify-items: end;
  }

  .galley-receipt-line-editor {
    grid-template-columns: 1fr 34px;
  }

  .receipt-review-table-row.galley-receipt-line-editor {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .galley-receipt-line-editor label:first-child,
  .galley-receipt-line-editor label:nth-child(2),
  .galley-receipt-line-editor label:nth-child(3) {
    grid-column: 1 / -1;
  }

  .galley-receipt-line-editor .icon-button {
    grid-column: 2 / 3;
  }

  .receipt-review-delete-button {
    grid-column: auto;
    min-width: 68px;
    height: 34px;
  }

  .galley-receipt-form .galley-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .galley-receipt-form .primary-button,
  .galley-receipt-form .secondary-button,
  .galley-receipt-form .inline-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .receipt-review-modal__header h2 {
    font-size: clamp(1.45rem, 9vw, 2.15rem);
  }

  .receipt-review-modal__meta .status-pill,
  .receipt-review-modal__meta span {
    font-size: 0.78rem;
  }
}

/* Yacht Atlas full-page Steve X-ray model launcher. */
.atlas-layout--xray {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
}

.atlas-layout--xray .atlas-plan-card {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(244, 240, 232, 0.76)),
    var(--paper);
}

.atlas-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 6px;
  min-width: min(100%, 260px);
  border: 1px solid rgba(9, 32, 54, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  padding: 6px;
}

.atlas-mode-switch button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 7px 14px;
  text-align: left;
}

.atlas-mode-switch button.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 31, 53, 0.18);
}

.atlas-mode-switch button[data-yacht-atlas-mode="xray"].is-active {
  background: var(--gold);
  color: var(--ink);
}

.atlas-mode-switch span {
  font-size: 0.92rem;
  font-weight: 950;
}

.atlas-mode-switch small {
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0.78;
  text-transform: uppercase;
}

.atlas-xray-model-embed {
  overflow: hidden;
  border: 1px solid rgba(7, 31, 53, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 16%, rgba(213, 173, 67, 0.2), transparent 28%),
    linear-gradient(135deg, #061c31 0%, #0b2a45 48%, #081725 100%);
  box-shadow: 0 22px 54px rgba(7, 31, 53, 0.18);
}

.atlas-xray-model-embed__heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12);
  padding: 18px 20px 14px;
}

.atlas-xray-model-embed__heading h4 {
  margin: 0;
  color: #fffdf8;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1;
}

.atlas-xray-model-embed__heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: rgba(255, 253, 248, 0.76);
  font-weight: 850;
  line-height: 1.35;
}

.atlas-xray-model-embed__heading .eyebrow {
  color: rgba(255, 253, 248, 0.7);
}

.atlas-xray-model-embed__heading span {
  border: 1px solid rgba(213, 173, 67, 0.5);
  border-radius: 999px;
  color: #f6df93;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.atlas-xray-model-launcher__body {
  display: grid;
  grid-template-columns: minmax(220px, max-content) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.atlas-xray-model-launcher__body .primary-button {
  min-width: 240px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.atlas-xray-model-launcher__body p {
  margin: 0;
  color: rgba(255, 253, 248, 0.78);
  font-weight: 850;
  line-height: 1.35;
}

.xray-room-rail {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.xray-room {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.xray-room__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.xray-room label,
.xray-record-pin label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.xray-room input,
.xray-record-pin input,
.xray-record-pin textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
  padding: 10px 12px;
}

.xray-record-pin {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(10, 36, 58, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.xray-plan-drafts {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.xray-plan-drafts__heading,
.xray-plan-draft__heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.xray-plan-drafts__heading h4,
.xray-plan-draft__heading h5 {
  margin: 2px 0 0;
}

.xray-plan-draft__heading > div {
  min-width: 0;
}

.xray-plan-draft__heading p,
.xray-plan-draft__decks,
.xray-plan-analysis-progress p {
  margin: 4px 0 0;
  color: var(--steel);
  line-height: 1.4;
}

.xray-plan-analysis-progress {
  position: relative;
  display: grid;
  gap: 6px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(24, 115, 132, 0.24);
  border-radius: var(--radius-md);
  background: rgba(24, 115, 132, 0.07);
}

.xray-plan-analysis-progress__bar {
  position: absolute;
  inset: 0 auto 0 -36%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(213, 173, 67, 0.2), transparent);
  animation: xray-plan-analysis-sweep 1.8s ease-in-out infinite;
}

@keyframes xray-plan-analysis-sweep {
  to { transform: translateX(380%); }
}

.xray-plan-draft {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.xray-plan-draft--applied {
  border-color: rgba(28, 128, 87, 0.3);
  background: rgba(28, 128, 87, 0.05);
}

.xray-plan-draft .status-pill {
  flex: 0 0 auto;
}

.status-pill--ready {
  color: #176a4b;
  background: rgba(35, 145, 98, 0.12);
}

.status-pill--working {
  color: #0d6373;
  background: rgba(24, 115, 132, 0.12);
}

.xray-plan-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.xray-plan-preview__deck {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.xray-plan-preview__deck > span {
  overflow: hidden;
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xray-plan-preview__deck svg {
  display: block;
  width: 100%;
  height: 88px;
  border: 1px solid rgba(10, 36, 58, 0.12);
  border-radius: 8px;
  background: #eef4f5;
}

.xray-plan-preview__deck rect {
  fill: rgba(20, 105, 124, 0.26);
  stroke: #176c7d;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.xray-plan-preview__deck rect.needs-review {
  fill: rgba(213, 173, 67, 0.34);
  stroke: #a97808;
}

.xray-plan-draft__warning {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--gold);
  color: #775200;
  background: rgba(213, 173, 67, 0.1);
  font-weight: 800;
  line-height: 1.35;
}

.xray-plan-draft details summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.xray-plan-draft details ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--steel);
  line-height: 1.45;
}

@media (max-width: 520px) {
  .xray-plan-preview {
    grid-template-columns: 1fr;
  }

  .xray-plan-draft .atlas-workflow-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.app-shell:not([data-sidebar-collapsed="true"]) .yacht-atlas-card .atlas-layout,
.app-shell:not([data-sidebar-collapsed="true"]) .yacht-atlas-card .atlas-plan-toolbar,
.app-shell:not([data-sidebar-collapsed="true"]) .yacht-atlas-card .sheet-actions {
  min-width: 0;
}

@media (max-width: 1180px) {
  .atlas-layout--xray {
    grid-template-columns: 1fr;
  }

  .atlas-layout--xray .atlas-plan-toolbar {
    display: grid;
  }

  .crew-logbook-layout {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 260px);
    overflow: auto;
  }

  .crew-rest-review-header,
  .crew-rest-review-layout,
  .crew-rest-review-notes {
    grid-template-columns: 1fr;
  }

  .crew-rest-review-header__actions {
    justify-items: start;
  }

  .crew-rest-review-layout {
    overflow: auto;
  }

  .crew-rest-review-month-panel {
    min-height: 620px;
  }

  .crew-logbook-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crew-logbook-main {
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .crew-logbook-panel,
  .crew-rest-review-panel {
    width: min(calc(100vw - 24px), 100%);
    padding: 18px;
  }

  .crew-logbook-heading,
  .crew-logbook-form__header {
    display: grid;
  }

  .crew-logbook-summary,
  .crew-logbook-filter-panel,
  .crew-logbook-form-grid,
  .crew-rest-review-metrics,
  .crew-rest-review-notes {
    grid-template-columns: 1fr;
  }

  .crew-rest-review-header,
  .crew-rest-review-selected-heading {
    display: grid;
  }

  .crew-rest-review-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-mode-switch {
    width: 100%;
  }

  .atlas-xray-model-embed__heading {
    display: grid;
  }

  .atlas-xray-model-embed__heading span {
    width: max-content;
  }

  .atlas-xray-model-launcher__body {
    grid-template-columns: 1fr;
  }

  .atlas-xray-model-launcher__body .primary-button {
    width: 100%;
    min-width: 0;
  }
}


/* Compact job-sheet detail layout */
.drawer[data-detail-type="work"],
.drawer[data-detail-type="worklist"] {
  width: calc(100vw - 88px);
  max-width: none;
}

.drawer[data-detail-type="work"] .detail-page,
.drawer[data-detail-type="worklist"] .detail-page {
  width: 100%;
  max-width: none;
  box-shadow: 0 0 70px rgba(7, 31, 53, 0.18);
}

.job-sheet-page {
  width: 100%;
  min-height: 100%;
  padding: 10px 14px 22px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.job-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
}

.job-detail-breadcrumb strong {
  color: var(--ink);
}

.job-breadcrumb-back {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 900;
  padding: 0 8px 0 0;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.job-sheet-page .job-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.job-sheet-title-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-sheet-page .job-detail-header h2,
.job-sheet-page .job-title-input {
  width: 100%;
  min-height: 32px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 1.8vw, 32px);
  line-height: 1.05;
}

.job-sheet-page .job-title-input {
  max-width: 960px;
  padding: 0 0 2px;
  border-bottom-width: 2px;
}

.job-top-media-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.job-top-media-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.job-top-media-panel[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.job-top-media-heading {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 0;
  background: rgba(246, 248, 247, 0.58);
  cursor: pointer;
  list-style: none;
}

.job-top-media-panel[open] > .job-top-media-heading {
  border-bottom: 1px solid var(--line);
}

.job-top-media-heading::-webkit-details-marker {
  display: none;
}

.job-media-summary-main {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.job-media-summary-main small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.job-media-toggle-label::before {
  content: "Show";
}

.job-top-media-panel[open] .job-media-toggle-label::before {
  content: "Hide";
}

.job-media-toggle-label {
  flex: 0 0 auto;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
}

.job-sheet-page .job-top-media-heading .job-rail-kicker {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.job-top-media-actions {
  display: flex;
  justify-content: flex-end;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.job-top-media-actions .upload-button {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
}

.job-media-file-list {
  display: grid;
  gap: 0;
  min-width: 0;
}

.job-media-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 6px 8px 6px 10px;
  border-bottom: 1px solid var(--line);
}

.job-media-file-item:last-child {
  border-bottom: 0;
}

.job-media-file-main {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.job-media-file-main > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.job-media-file-main strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-media-file-main small,
.job-media-more,
.job-media-empty,
.job-media-photo-thumb figcaption {
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.job-media-remove {
  display: grid;
  width: 22px;
  height: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(172, 66, 61, 0.25);
  border-radius: 999px;
  background: rgba(172, 66, 61, 0.08);
  color: #ac423d;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.job-media-empty,
.job-media-more {
  margin: 0;
  padding: 9px 10px;
}

.job-media-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  padding: 7px 9px;
}

.job-media-photo-thumb {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
}

.job-media-photo-thumb img {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: cover;
}

.job-media-photo-thumb figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 24px;
  padding: 3px 5px;
}

.job-media-photo-thumb figcaption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-media-photo-thumb .job-media-remove {
  width: 18px;
  height: 18px;
  min-height: 18px;
  font-size: 13px;
}

.job-media-more--photo {
  display: grid;
  place-items: center;
  min-height: 80px;
  padding: 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: rgba(246, 248, 247, 0.58);
}

.job-sheet-field > span,
.job-sheet-section-header h3 {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.job-sheet-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  padding-top: 44px;
  padding-right: clamp(14px, 1.2vw, 22px);
}

.job-sheet-page .job-sheet-actions .primary-button,
.job-sheet-page .job-sheet-actions .secondary-button,
.job-sheet-page .job-sheet-actions .danger-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
}

.job-sheet-page .job-complete-button {
  background: var(--gold);
  color: var(--ink);
}

.job-sheet-page .job-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

.job-sheet-page .job-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.job-sheet-page .job-detail-row--activity {
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  align-items: stretch;
}

.job-sheet-page .job-linked-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.job-sheet-page .job-detail-financial-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.job-sheet-card,
.job-sheet-page .job-rail-card,
.job-sheet-page .job-subtask-card {
  display: grid;
  gap: 0;
  min-width: 0;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.job-sheet-fields-card {
  align-self: start;
  align-content: start;
  grid-template-rows: auto auto auto;
}

.job-sheet-section-header,
.job-sheet-page .job-rail-card-heading,
.job-sheet-page .job-subtask-card .history-heading {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.58);
}

.job-sheet-section-header h3,
.job-sheet-page .job-subtask-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.job-sheet-page .job-scope-section {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.job-sheet-page .job-scope-section-header {
  min-height: 38px;
}

.job-sheet-page .job-subtask-card .history-heading p {
  display: none;
}

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

.job-sheet-field {
  display: grid;
  grid-template-columns: minmax(124px, 0.36fr) minmax(0, 1fr);
  align-items: center;
  min-height: 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.job-sheet-field:nth-child(2n) {
  border-right: 0;
}

.job-sheet-field:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.job-sheet-field > span {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 6px 10px;
  border-right: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.62);
  overflow-wrap: anywhere;
}

.job-sheet-field > div {
  min-width: 0;
  padding: 4px 8px;
}

.job-sheet-value {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.job-sheet-page input,
.job-sheet-page select,
.job-sheet-page textarea {
  min-height: 28px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
}

.job-sheet-page .due-date-control {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  min-height: 28px;
  width: 100%;
}

.job-sheet-page .due-date-control input.table-input--date {
  width: 100%;
  min-height: 28px;
}

.job-sheet-page .due-date-clear {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.job-scope-body {
  padding: 8px 10px;
}

.job-scope-body p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.job-scope-textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
}

.job-sheet-page .job-history-card .history-list {
  gap: 0;
}

.job-sheet-page .job-detail-row--activity > .job-history-card,
.job-sheet-page .job-detail-row--activity > .job-subtask-card {
  grid-template-rows: auto minmax(0, 1fr);
  height: 292px;
  min-height: 0;
}

.job-sheet-page .job-history-card .history-list,
.job-sheet-page .job-history-card > .empty-history,
.job-sheet-page .job-subtask-content,
.job-sheet-page .job-subtask-list {
  min-height: 0;
  overflow-y: auto;
}

.job-sheet-page .job-history-card .empty-history,
.job-sheet-page .job-subtask-card .equipment-system-empty,
.job-sheet-page .job-rail-card .equipment-system-empty,
.job-sheet-page .job-rail-card .empty-history {
  margin: 0;
  padding: 12px;
  color: var(--steel);
  font-size: 14px;
  font-weight: 850;
}

.job-sheet-page .history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.job-sheet-page .history-entry:last-child {
  border-bottom: 0;
}

.job-sheet-page .history-entry__top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin: 0;
}

.job-sheet-page .history-entry-pills {
  gap: 4px;
}

.job-sheet-page .history-entry-person {
  gap: 3px 8px;
  min-width: min(180px, 100%);
  margin-left: auto;
  justify-content: flex-end;
}

.job-sheet-page .history-entry__top strong {
  font-size: 14px;
  line-height: 1.25;
}

.job-sheet-page .history-entry__top small {
  color: var(--steel);
  font-size: 13px;
}

.job-sheet-page .history-entry p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.job-sheet-page .history-details,
.job-sheet-page .history-photo-grid {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.job-sheet-page .status-pill {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.job-sheet-page .job-rail-kicker {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.58);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.job-sheet-page .job-rail-card-heading .job-rail-kicker {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.job-sheet-page .job-rail-card-heading .inline-button,
.job-sheet-page .job-subtask-toggle,
.job-sheet-page .upload-button,
.job-sheet-page .inline-button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.job-sheet-page .job-linked-card-heading {
  gap: 8px;
}

.job-sheet-page .job-link-add-toggle {
  flex: 0 0 auto;
  min-width: 48px;
}

.job-sheet-page .job-linked-current {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.job-sheet-page .job-linked-card {
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.job-sheet-page .job-link-add-panel {
  padding: 7px 10px 8px;
  border-top: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.36);
}

.job-sheet-page .job-link-add-panel[hidden] {
  display: none;
}

.job-sheet-page .job-system-rail-list,
.job-sheet-page .job-equipment-rail-list,
.job-sheet-page .technical-equipment-results,
.job-sheet-page .job-subtask-list {
  display: grid;
  gap: 0;
}

.job-sheet-page .job-equipment-rail-item,
.job-sheet-page .technical-equipment-result,
.job-sheet-page .job-file-row,
.job-sheet-page .job-subtask-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.job-sheet-page .job-equipment-rail-item:last-child,
.job-sheet-page .technical-equipment-result:last-child,
.job-sheet-page .job-file-row:last-child,
.job-sheet-page .job-subtask-row:last-child {
  border-bottom: 0;
}

.job-sheet-page .job-equipment-rail-item {
  padding: 7px 34px 7px 10px;
}

.job-sheet-page .job-equipment-rail-item .table-link {
  font-size: 13px;
  line-height: 1.18;
}

.job-sheet-page .job-equipment-rail-item small {
  font-size: 11px;
  line-height: 1.22;
}

.job-sheet-page .technical-link-selector-group {
  padding: 6px 10px 7px;
  border-top: 1px solid var(--line);
}

.job-sheet-page .technical-equipment-search {
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  padding: 5px 10px;
  line-height: 1.1;
}

.job-sheet-page .technical-equipment-result {
  padding: 7px 9px;
  text-align: left;
}

.job-sheet-page .technical-link-selector-group label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
}

.job-sheet-page .technical-equipment-results {
  max-height: 142px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.job-sheet-page .technical-equipment-results[hidden] {
  display: none;
}

.job-sheet-page .technical-equipment-result strong {
  font-size: 13px;
  line-height: 1.15;
}

.job-sheet-page .technical-equipment-result small {
  font-size: 11px;
  line-height: 1.2;
}

.job-sheet-page .job-equipment-remove {
  top: 50%;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0;
  line-height: 1;
  transform: translateY(-50%);
}

.job-sheet-page .job-subtask-content {
  gap: 0;
}

.job-sheet-page .job-subtask-add-form {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 155px) 64px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.job-sheet-page .job-subtask-add-form::before {
  display: none;
}

.job-sheet-page .job-subtask-row {
  grid-template-columns: 26px minmax(0, 1fr) minmax(112px, 150px) 30px;
  gap: 7px;
  align-items: center;
  padding: 5px 10px;
}

.job-sheet-page .job-subtask-check,
.job-sheet-page .job-subtask-main,
.job-sheet-page .job-subtask-due {
  min-height: 30px;
}

.job-sheet-page .job-subtask-main,
.job-sheet-page .job-subtask-due {
  grid-template-rows: 30px;
  gap: 0;
}

.job-sheet-page .job-subtask-main input,
.job-sheet-page .job-subtask-due input,
.job-sheet-page .job-subtask-add-form input,
.job-sheet-page .job-subtask-add-form button {
  min-height: 30px;
}

.job-sheet-page .job-file-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px 10px;
}

.job-sheet-page .job-file-actions {
  justify-content: flex-end;
}

.job-sheet-page .gallery-grid,
.job-sheet-page .quote-grid--rail,
.job-sheet-page .quote-outcome-grid,
.job-sheet-page .accounting-rollup__summary {
  padding: 8px 10px;
}

.job-sheet-page .gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.job-sheet-page .gallery-grid img {
  height: 74px;
  border-radius: 6px;
}

.job-sheet-page .quote-grid--rail,
.job-sheet-page .quote-outcome-grid,
.job-sheet-page .accounting-rollup__summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.job-sheet-page .job-detail-financial-row .quote-grid--rail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-sheet-page .job-detail-financial-row .accounting-rollup__summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-sheet-page .quote-card {
  padding: 10px;
  border-radius: 6px;
}

.job-sheet-page .quote-card h3 {
  font-size: 14px;
}

.job-sheet-page .quote-part-editor-row {
  grid-template-columns: minmax(0, 1fr) 86px minmax(78px, 0.8fr) 28px;
  gap: 5px;
}

.job-sheet-page .quote-part-editor-row input,
.job-sheet-page .quote-part-editor-row select {
  min-height: 32px;
  font-size: 12px;
}

.job-sheet-page .quote-part-remove {
  width: 28px;
  min-height: 28px;
}

.job-sheet-page .job-detail-save-note {
  margin: 0;
  padding: 6px 2px;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 1320px) {
  .job-top-media-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-top-media-panel--photos {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .drawer[data-detail-type="work"],
  .drawer[data-detail-type="worklist"] {
    width: 100%;
  }

  .job-sheet-page {
    padding: 12px;
  }

  .job-sheet-page .job-detail-header {
    grid-template-columns: 1fr;
  }

  .job-sheet-actions {
    justify-content: flex-start;
    padding-top: 0;
    padding-right: 0;
  }

  .job-top-media-band,
  .job-sheet-page .job-detail-row,
  .job-sheet-grid {
    grid-template-columns: 1fr;
  }

  .job-sheet-page .job-linked-stack {
    height: auto;
  }

  .job-sheet-field {
    border-right: 0;
  }

  .job-sheet-field {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .job-top-media-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .job-top-media-panel:last-child {
    border-bottom: 0;
  }

    .job-sheet-page .job-subtask-add-form,
  .job-sheet-page .job-subtask-row {
    grid-template-columns: 1fr;
  }
}

.desktop-sync-centre-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: 16px;
}

.desktop-sync-centre-button[hidden] {
  display: none;
}

.desktop-sync-centre-button[data-sync-state="pending"],
.desktop-sync-centre-button[data-sync-state="local"] {
  border-color: rgba(209, 170, 71, 0.55);
  color: var(--gold);
}

.desktop-sync-centre-button[data-sync-state="stale"],
.desktop-sync-centre-button[data-sync-state="error"] {
  border-color: rgba(164, 55, 52, 0.52);
  color: #ffd8d5;
}

.desktop-sync-centre-modal {
  position: fixed;
  inset: 0;
  z-index: 68;
  display: grid;
  place-items: center;
  padding: 22px;
}

.desktop-sync-centre-modal[hidden] {
  display: none;
}

.desktop-sync-centre-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
}

.desktop-sync-centre-content {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

.sync-centre-grid article,
.sync-centre-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
}

.sync-centre-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.sync-centre-grid p,
.sync-centre-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.sync-centre-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.sync-centre-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
}

.sync-centre-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.desktop-sync-centre-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .sync-centre-grid {
    grid-template-columns: 1fr;
  }

  .desktop-sync-centre-button {
    padding-inline: 12px;
  }
}

.history-view-switch {
  margin: 0 28px 18px;
  max-width: calc(100% - 56px);
}

.history-table .quote-pill + .quote-pill {
  margin-left: 6px;
}


.history-inventory-usage {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(214, 176, 68, 0.45);
  border-radius: 18px;
  background: rgba(255, 249, 232, 0.72);
}

.history-inventory-usage[hidden] {
  display: none;
}

.history-inventory-usage__header {
  display: grid;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.history-inventory-usage__header span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-inventory-usage__header small,
.history-inventory-empty {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.history-entry-form .history-inventory-usage__search {
  text-transform: uppercase;
}

.history-inventory-usage__results,
.history-inventory-usage__selected {
  display: grid;
  gap: 8px;
}

.history-inventory-result,
.history-inventory-used-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.history-inventory-result {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.history-inventory-result strong,
.history-inventory-used-row strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.history-inventory-result span,
.history-inventory-used-row small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.history-inventory-used-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px auto 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.history-inventory-used-row label {
  gap: 4px;
  font-size: 10px;
}

.history-inventory-used-row input {
  min-height: 42px;
  padding: 0 10px;
  font-size: 14px;
}

.history-inventory-used-row > span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 900;
}

/* Bridge Mate AI-first Home workspace. */
.bridge-home {
  grid-column: 2;
  grid-row: 2 / span 2;
  min-width: 0;
  min-height: calc(100vh - 132px);
  margin: 0 20px 28px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fffdfa;
  box-shadow: 0 24px 64px rgba(7, 31, 53, 0.1);
}

.bridge-home[hidden],
.bridge-home-review-modal[hidden] {
  display: none;
}

.bridge-home__inner {
  display: grid;
  gap: 18px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 58px);
}

.bridge-home__heading {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.bridge-home__mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 20px;
  background: var(--navy);
  box-shadow: 0 16px 30px rgba(7, 31, 53, 0.2);
}

.bridge-home__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bridge-home__heading .eyebrow {
  margin: 0 0 4px;
}

.bridge-home__heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
}

.bridge-home-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(7, 31, 53, 0.18);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(7, 31, 53, 0.1);
  padding: 10px;
}

.bridge-home-composer__mode {
  grid-column: 1 / -1;
  justify-self: end;
  width: 250px;
}

.bridge-home-composer__field {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
}

.bridge-home-composer textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  max-height: 240px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  padding: 18px;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  resize: vertical;
}

.bridge-home-composer textarea:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(212, 173, 63, 0.55);
}

.bridge-home-composer__attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid rgba(7, 31, 53, 0.1);
  padding: 8px 14px 4px;
}

.bridge-home-composer__attachment > button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.bridge-home-composer__attachment > button:hover,
.bridge-home-composer__attachment > button:focus-visible {
  border-color: var(--gold);
  background: rgba(212, 173, 63, 0.08);
}

.bridge-home-composer__attachment-note {
  min-width: 0;
  overflow: hidden;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-home-attachment-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 8px;
  align-items: center;
  width: min(100%, 520px);
  min-height: 34px;
  border: 1px solid rgba(212, 173, 63, 0.45);
  border-radius: 8px;
  background: rgba(212, 173, 63, 0.1);
  padding: 5px 6px 5px 10px;
}

.bridge-home-attachment-chip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-home-attachment-chip small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.bridge-home-attachment-chip button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 31, 53, 0.08);
  color: var(--steel);
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

#bridge-mate-home-receipt-root:empty {
  display: none;
}

.bridge-home-composer__send {
  align-self: end;
  min-width: 168px;
  min-height: 48px;
  height: 48px;
  border: 0;
  border-radius: 15px;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(212, 173, 63, 0.24);
}

.bridge-home-composer__send:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bridge-home-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.bridge-home-starters button,
.bridge-home-live__item {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 900;
}

.bridge-home-starters button:hover,
.bridge-home-starters button:focus-visible,
.bridge-home-live__item:hover,
.bridge-home-live__item:focus-visible {
  border-color: var(--gold);
  background: rgba(212, 173, 63, 0.09);
}

.bridge-home-starters button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.bridge-home-starters .bridge-home-starters__reset {
  border-color: rgba(7, 31, 53, 0.18);
  background: rgba(7, 31, 53, 0.06);
  color: var(--steel);
}

.bridge-home-starters .bridge-home-starters__reset:hover,
.bridge-home-starters .bridge-home-starters__reset:focus-visible {
  border-color: var(--steel);
  background: rgba(7, 31, 53, 0.1);
}

.bridge-home-status {
  min-height: 20px;
  margin: 0;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.4;
}

.bridge-home-live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bridge-home-live:empty {
  display: none;
}

.bridge-home-live__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border-radius: 15px;
  text-align: left;
}

.bridge-home-live__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(7, 31, 53, 0.08);
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
}

.bridge-home-live__copy {
  min-width: 0;
}

.bridge-home-live__copy strong,
.bridge-home-live__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-home-live__copy strong {
  color: var(--ink);
  font-size: 14px;
}

.bridge-home-live__copy small {
  margin-top: 3px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
}

.bridge-home-live__arrow {
  color: var(--muted);
  font-size: 17px;
}

.bridge-home-result {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.bridge-home-result[hidden] {
  display: none;
}

.bridge-home-result__prompt {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  font-weight: 850;
}

.bridge-home-result__prompt strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.bridge-home-result__section {
  display: grid;
  gap: 10px;
}

.bridge-home-result__section > h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.bridge-home-result .bridge-mate-source-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bridge-home-result__answer {
  border-left: 4px solid var(--gold);
  border-radius: 0 15px 15px 0;
  background: rgba(248, 250, 252, 0.72);
  padding: 18px 20px;
}

.bridge-home-result__answer p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-line;
}

.bridge-home-result__answer p + p {
  margin-top: 12px;
}

.bridge-home-result__review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(212, 173, 63, 0.35);
  border-radius: 16px;
  background: rgba(212, 173, 63, 0.08);
  padding: 14px 16px;
}

.bridge-home-result__review p {
  margin: 0;
  color: var(--steel);
  font-weight: 800;
}

.bridge-home-review-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.bridge-home-review-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 53, 0.58);
  backdrop-filter: blur(4px);
}

.bridge-home-review-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdfa;
  box-shadow: 0 38px 100px rgba(7, 31, 53, 0.36);
}

.bridge-home-review-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px 18px;
}

.bridge-home-review-panel__heading h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 30px;
}

.bridge-home-review-panel__heading p {
  margin: 0;
  color: var(--steel);
  line-height: 1.4;
}

.bridge-home-review-content {
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 26px;
}

.bridge-home-review-content .bridge-mate-suggestion-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.bridge-home-review-content .bridge-mate-suggestion-list.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.bridge-home-review-content .bridge-mate-suggestion-heading {
  grid-column: 1 / -1;
}

.view-tab--home {
  border-color: rgba(212, 173, 63, 0.5);
}

@media (max-width: 1080px) {
  .view-tabs > .view-tab--home {
    position: sticky;
    left: 0;
    z-index: 2;
    align-self: flex-start;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 42px;
  }

  .view-tabs > .view-tab--home:not(.is-active) {
    background: #fffdfa;
  }

  .bridge-home {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    margin: 0 20px 24px;
  }

  .bridge-home-live,
  .bridge-home-result .bridge-mate-source-list,
  .bridge-home-review-content .bridge-mate-suggestion-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .bridge-home {
    margin: 0 10px 18px;
    border-radius: 20px;
  }

  .bridge-home__inner {
    gap: 14px;
    padding: 20px 16px 24px;
  }

  .bridge-home__heading {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
  }

  .bridge-home__mark {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .bridge-home__heading h1 {
    font-size: clamp(34px, 11vw, 46px);
    white-space: normal;
  }

  .bridge-home-composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .bridge-home-composer__mode {
    width: 100%;
  }

  .bridge-home-composer textarea {
    min-height: 104px;
    padding: 14px;
    font-size: 17px;
  }

  .bridge-home-composer__attachment {
    padding-inline: 10px;
  }

  .bridge-home-attachment-chip {
    width: 100%;
  }

  .bridge-home-composer__send {
    width: 100%;
    min-height: 48px;
    height: 48px;
  }

  .bridge-home-starters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bridge-home-starters button {
    width: 100%;
    border-radius: 13px;
    white-space: normal;
  }

  .bridge-home-result__review,
  .bridge-home-review-panel__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bridge-mate-answer-feedback__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .bridge-home-result__review .primary-button,
  .bridge-home-review-panel__heading .close-button {
    width: 100%;
  }

  .bridge-home-review-modal {
    padding: 8px;
  }

  .bridge-home-review-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  .bridge-home-review-panel__heading,
  .bridge-home-review-content {
    padding: 16px;
  }

  .bridge-home-review-content .bridge-mate-suggestion__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bridge-home-review-content .bridge-mate-suggestion__grid .wide-field {
    grid-column: 1;
  }
}

@media (max-width: 780px) {
  .history-inventory-used-row {
    grid-template-columns: minmax(0, 1fr) 104px 42px;
  }

  .history-inventory-used-row > span {
    display: none;
  }
}


.news2-safety-note,
.news2-score-preview {
  border: 1px solid rgba(15, 48, 68, 0.16);
  border-left: 4px solid var(--accent, #d4ad42);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(255, 248, 224, 0.58);
  color: var(--muted, #596b78);
}

.news2-score-preview {
  display: grid;
  gap: 0.45rem;
}

.news2-score-preview.is-escalation {
  border-left-color: #bd3030;
  background: rgba(189, 48, 48, 0.08);
}

.news2-score-preview div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.news2-score-preview strong {
  color: var(--navy, #0b2638);
}

.news2-form .check-row,
.news2-oxygen-check {
  align-items: center;
}

/* Files: document controls edit directly inside the existing inspector rows. */
.files-board .file-inspector__stat--editable {
  align-items: center !important;
}

.files-board .file-inspector__inline-editor {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.files-board .file-inspector__inline-control {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(9, 32, 54, 0.18);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  padding: 0 6px;
  text-transform: none;
}

.files-board .file-inspector__inline-control:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(209, 170, 71, 0.16);
}

.files-board .file-inspector__inline-editor small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.file-expiry-review {
  display: grid;
  gap: 16px;
  min-height: 420px;
  margin: 20px;
  padding: 22px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 14px;
  background: #fff;
}

.file-expiry-review__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(9, 32, 54, 0.1);
}

.file-expiry-review__header .eyebrow,
.file-expiry-review__header h4,
.file-expiry-review__header p {
  margin: 0;
}

.file-expiry-review__header .eyebrow {
  margin-bottom: 5px;
}

.file-expiry-review__header h4 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.file-expiry-review__header h4 + p {
  margin-top: 4px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
}

.file-expiry-review__count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f4;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
}

.file-expiry-review__list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 10px;
}

.file-expiry-review__row {
  display: grid;
  grid-template-columns: 28px minmax(200px, 1fr) 100px 92px 52px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(9, 32, 54, 0.08);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 12px 14px;
  text-align: left;
}

.file-expiry-review__row:last-child {
  border-bottom: 0;
}

.file-expiry-review__row:hover,
.file-expiry-review__row:focus-visible {
  background: #f4f7f8;
  outline: none;
}

.file-expiry-review__document,
.file-expiry-review__date {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.file-expiry-review__document strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-expiry-review__document small,
.file-expiry-review__date small {
  overflow: hidden;
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-expiry-review__date strong {
  font-size: 13px;
  font-weight: 850;
}

.file-expiry-review__date {
  width: 100%;
  justify-self: start;
}

.file-expiry-status {
  justify-self: start;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  white-space: nowrap;
}

.file-expiry-status--expired {
  background: rgba(181, 60, 55, 0.12);
  color: #a23934;
}

.file-expiry-status--due {
  background: rgba(213, 174, 66, 0.2);
  color: #705511;
}

.file-expiry-status--current {
  background: rgba(54, 118, 90, 0.12);
  color: #2d7057;
}

.file-expiry-review__action {
  justify-self: end;
  color: var(--steel);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .file-expiry-review__row {
    grid-template-columns: 28px minmax(0, 1fr) 100px 92px;
  }

  .file-expiry-review__action {
    display: none;
  }
}

@media (max-width: 720px) {
  .file-expiry-review {
    min-height: 0;
    margin: 0 12px;
    padding: 16px;
  }

  .file-expiry-review__header {
    align-items: center;
  }

  .file-expiry-review__row {
    grid-template-columns: 28px minmax(0, 1fr) 92px;
    align-items: start;
  }

  .file-expiry-review__date {
    display: none;
  }
}

/* Accounting: compact control cockpit, register and approval workflow. */
.accounting-control-summary {
  margin: 0 0 12px;
}

#accounting-view .sheet-heading {
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
}

#accounting-view .sheet-heading > div:first-child {
  flex: 0 0 210px;
  min-width: 0;
}

#accounting-view .sheet-heading h2 {
  margin: 0;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1;
}

#accounting-view .sheet-heading .row-count {
  margin: 5px 0 0;
  font-size: 12px;
}

#accounting-view .sheet-actions {
  flex: 1 1 auto;
  gap: 6px;
}

#accounting-view .sheet-actions .ghost-button,
#accounting-view .sheet-actions .primary-button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 11px;
  white-space: nowrap;
}

.accounting-cockpit {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.accounting-cockpit__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.accounting-cockpit__heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.accounting-cockpit__heading span,
.accounting-budget-strip__heading span,
.accounting-cockpit-metric > span,
.accounting-budget-strip__totals span,
.accounting-review-panel header span,
.accounting-quote-match small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.accounting-cockpit__heading strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-cockpit__heading small,
.accounting-budget-strip__heading > span,
.accounting-budget-strip__note {
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
}

.accounting-cockpit__metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.accounting-cockpit-metric {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 82px;
  align-content: center;
  gap: 3px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.accounting-cockpit-metric:last-child {
  border-right: 0;
}

.accounting-cockpit-metric:hover,
.accounting-cockpit-metric:focus-visible,
.accounting-cockpit-metric.is-active {
  background: #f5f7f8;
  outline: none;
}

.accounting-cockpit-metric.is-active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  background: var(--gold);
  content: "";
}

.accounting-cockpit-metric > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-cockpit-metric > small {
  overflow: hidden;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-cockpit-metric--danger > strong {
  color: var(--red);
}

.accounting-cockpit-metric--warning > strong {
  color: #8a6610;
}

.accounting-budget-strip {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.accounting-budget-strip__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.accounting-budget-strip__heading > div {
  display: grid;
  gap: 2px;
}

.accounting-budget-strip__heading strong {
  color: var(--ink);
  font-size: 15px;
}

.accounting-budget-strip__heading .inline-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.accounting-budget-strip__totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.accounting-budget-strip__totals article {
  min-width: 0;
  padding: 2px 12px;
  border-right: 1px solid var(--line);
}

.accounting-budget-strip__totals article:last-child {
  border-right: 0;
}

.accounting-budget-strip__totals strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-budget-strip__totals .is-over strong {
  color: var(--red);
}

.accounting-budget-strip__departments {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.accounting-budget-strip__departments > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 9px;
  background: #fff;
}

.accounting-budget-strip__departments strong,
.accounting-budget-strip__departments small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-budget-strip__departments strong {
  color: var(--ink);
  font-size: 11px;
}

.accounting-budget-strip__departments small,
.accounting-budget-strip > p {
  margin: 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.accounting-budget-strip__note {
  grid-column: 1 / -1;
}

.accounting-funding-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.accounting-funding-summary > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.accounting-funding-summary > header strong {
  color: var(--ink);
  font-size: 12px;
}

.accounting-funding-summary > header small,
.accounting-funding-summary__note {
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}

.accounting-funding-summary__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.accounting-funding-summary__grid article {
  display: grid;
  grid-template-columns: minmax(90px, 0.72fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  background: #fff;
}

.accounting-funding-summary__grid article > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.accounting-funding-summary__grid article > span:last-child {
  text-align: right;
}

.accounting-funding-summary__grid strong,
.accounting-funding-summary__grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-funding-summary__grid strong {
  color: var(--ink);
  font-size: 12px;
}

.accounting-funding-summary__grid small {
  color: var(--steel);
  font-size: 9px;
  font-weight: 800;
}

.accounting-funding-summary__grid .is-over strong {
  color: var(--red);
}

.accounting-quote-summary {
  gap: 0;
  margin-bottom: 12px;
}

.accounting-quote-summary__details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.accounting-quote-summary__details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) 18px;
  gap: 16px;
  align-items: center;
  min-height: 50px;
  padding: 9px 14px;
  list-style: none;
  cursor: pointer;
}

.accounting-quote-summary__details > summary::-webkit-details-marker {
  display: none;
}

.accounting-quote-summary__details > summary::after {
  color: var(--steel);
  font-size: 18px;
  line-height: 1;
  content: "+";
}

.accounting-quote-summary__details[open] > summary::after {
  content: "-";
}

.accounting-quote-summary__details > summary > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.accounting-quote-summary__details > summary > span:nth-child(2) {
  justify-items: end;
}

.accounting-quote-summary__details > summary strong,
.accounting-quote-summary__details > summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-quote-summary__details > summary strong {
  color: var(--ink);
  font-size: 14px;
}

.accounting-quote-summary__details > summary small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.accounting-quote-summary__body {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.accounting-quote-summary__header,
.accounting-quote-summary__empty,
.accounting-quote-summary__cards article,
.accounting-quote-summary__table-wrap {
  border-radius: 8px;
}

.accounting-table {
  min-width: 1080px;
  table-layout: fixed;
}

.accounting-table th,
.accounting-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.accounting-table th:nth-child(1),
.accounting-table td:nth-child(1) {
  width: 210px;
}

.accounting-table th:nth-child(2),
.accounting-table td:nth-child(2) {
  width: 250px;
}

.accounting-table th:nth-child(3),
.accounting-table td:nth-child(3) {
  width: 195px;
}

.accounting-table th:nth-child(4),
.accounting-table td:nth-child(4),
.accounting-table th:nth-child(5),
.accounting-table td:nth-child(5),
.accounting-table th:nth-child(6),
.accounting-table td:nth-child(6) {
  width: 125px;
}

.accounting-table th:nth-child(7),
.accounting-table td:nth-child(7) {
  width: 66px;
  text-align: center;
}

.accounting-table .cell-primary,
.accounting-table .cell-muted {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.accounting-table .cell-primary {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.accounting-table .cell-muted {
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  white-space: normal;
}

.accounting-table .accounting-status {
  min-height: 22px;
  margin-right: 4px;
  padding: 0 7px;
  font-size: 9px;
}

.accounting-table .quote-pill {
  display: block;
  overflow: hidden;
  max-width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-date-overdue {
  color: var(--red) !important;
}

.accounting-review-panel {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff;
}

.accounting-review-panel.is-ready {
  border-left-color: var(--green);
}

.accounting-review-panel.has-blockers {
  border-left-color: var(--red);
}

.accounting-review-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.accounting-review-panel > header > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.accounting-review-panel > header strong {
  color: var(--ink);
  font-size: 15px;
}

.accounting-review-panel > header small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
}

.accounting-review-panel__findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.accounting-review-finding {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 10px 12px;
  background: #fff;
}

.accounting-review-finding > span {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
}

.accounting-review-finding--blocker > span {
  background: var(--red);
}

.accounting-review-finding--warning > span {
  background: var(--gold);
}

.accounting-review-finding strong,
.accounting-review-finding small {
  display: block;
}

.accounting-review-finding strong {
  color: var(--ink);
  font-size: 12px;
}

.accounting-review-finding small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.accounting-quote-match {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.accounting-quote-match > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 9px 12px;
  background: #fff;
}

.accounting-quote-match strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-quote-match .is-over strong {
  color: var(--red);
}

.accounting-controls-panel {
  width: min(940px, calc(100vw - 32px));
  max-width: 940px;
  max-height: min(880px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 22px;
}

.accounting-controls-heading {
  margin-bottom: 10px;
  padding-right: 72px;
}

.accounting-controls-heading h2,
.accounting-controls-heading p {
  margin: 0;
}

.accounting-controls-heading h2 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.accounting-controls-heading p:not(.eyebrow) {
  margin-top: 7px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
}

.accounting-controls-form {
  display: grid;
  gap: 0;
}

.accounting-controls-section,
.accounting-controls-advanced {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.accounting-controls-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.accounting-controls-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.accounting-controls-section > header span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 850;
}

.accounting-controls-section > header .inline-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.accounting-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.accounting-controls-grid label,
.accounting-budget-inputs label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accounting-controls-grid input,
.accounting-controls-grid select,
.accounting-controls-grid textarea,
.accounting-budget-inputs input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  text-transform: none;
}

.accounting-controls-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.accounting-controls-grid label small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.accounting-control-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.accounting-control-check input {
  width: 18px;
  height: 18px;
}

.accounting-budget-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.accounting-funding-pot-controls {
  display: grid;
  gap: 7px;
}

.accounting-funding-pot-control {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) 120px 110px 140px 36px;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.accounting-funding-pot-control label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accounting-funding-pot-control input,
.accounting-funding-pot-control select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 0 9px;
  text-transform: none;
}

.accounting-funding-pot-remove {
  width: 36px;
  min-width: 36px;
  height: 38px;
  border-radius: 6px;
  color: var(--red);
}

.accounting-budget-inputs label {
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
}

.accounting-budget-inputs label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-controls-advanced > summary {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.accounting-controls-grid--mappings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.accounting-controls-grid--mappings label:last-child {
  align-content: start;
}

@media (max-width: 1080px) {
  #accounting-view .sheet-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  #accounting-view .sheet-heading > div:first-child {
    flex-basis: auto;
  }

  #accounting-view .sheet-actions {
    justify-content: flex-start;
  }

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

  .accounting-cockpit-metric:nth-child(3) {
    border-right: 0;
  }

  .accounting-cockpit-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .accounting-budget-strip__departments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .accounting-controls-grid,
  .accounting-budget-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .accounting-funding-summary__grid {
    grid-template-columns: 1fr;
  }

  .accounting-funding-pot-control {
    grid-template-columns: minmax(170px, 1fr) 110px 100px 120px 36px;
  }
}

@media (max-width: 760px) {
  .accounting-cockpit__heading,
  .accounting-budget-strip__heading,
  .accounting-review-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .accounting-cockpit-metric,
  .accounting-cockpit-metric:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .accounting-cockpit-metric:nth-child(2n) {
    border-right: 0;
  }

  .accounting-cockpit-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .accounting-budget-strip {
    grid-template-columns: 1fr;
  }

  .accounting-budget-strip__totals,
  .accounting-review-panel__findings,
  .accounting-quote-match {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
  }

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

  .accounting-quote-summary__details > summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .accounting-quote-summary__details > summary > span:nth-child(2) {
    display: none;
  }

  .accounting-controls-grid,
  .accounting-budget-inputs,
  .accounting-controls-grid--mappings {
    grid-template-columns: 1fr;
  }

  .accounting-funding-pot-control {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  }

  .accounting-funding-pot-control label:nth-child(1),
  .accounting-funding-pot-control label:nth-child(4) {
    grid-column: 1 / -1;
  }

  .accounting-funding-pot-control .accounting-funding-pot-remove {
    grid-column: 3;
    grid-row: 2;
  }

  .accounting-controls-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Compact ISM register: selected Option B. */
.ism-register-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ism-register-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.ism-register-heading p,
.ism-register-heading h3,
.ism-register-timeline header p,
.ism-register-timeline header h3,
.accounting-line-items-card--primary .eyebrow,
.accounting-compact-balance .eyebrow {
  margin: 0;
}

.ism-register-heading h3,
.ism-register-timeline h3 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.ism-register-shortcuts {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.ism-register-shortcuts button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.ism-register-shortcuts button:hover,
.ism-register-row:not(.ism-register-row--head):hover,
.ism-register-timeline button:hover {
  background: #f3f6f8;
}

.ism-register-shortcuts strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: #e9eef2;
  font-size: 10px;
}

.ism-register-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.ism-register-metric {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  border-left: 3px solid var(--steel);
}

.ism-register-metric:last-child {
  border-right: 0;
}

.ism-register-metric span {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ism-register-metric strong {
  color: var(--ink);
  font-size: 25px;
}

.ism-register-metric--danger { border-left-color: var(--red); }
.ism-register-metric--warning { border-left-color: var(--gold); }
.ism-register-metric--blue { border-left-color: #2b7898; }
.ism-register-metric--green { border-left-color: var(--green); }

.ism-register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 0;
}

.ism-register-table-wrap {
  min-width: 0;
  height: min(585px, calc(100vh - 335px));
  min-height: 390px;
  overflow: auto;
}

.ism-register-table {
  min-width: 800px;
}

.ism-register-row {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: minmax(240px, 1.5fr) 90px 130px minmax(130px, 0.75fr) 78px 16px;
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  text-align: left;
}

.ism-register-row--head {
  position: sticky;
  z-index: 3;
  top: 0;
  min-height: 34px;
  background: #eef2f5;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ism-register-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-register-row > span:first-child strong,
.ism-register-row > span:first-child small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ism-register-row > span:first-child strong {
  font-size: 12px;
}

.ism-register-row > span:first-child small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 700;
}

.ism-register-row > span:nth-child(3) {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ism-register-status {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--steel);
}

.ism-register-status--danger { background: var(--red); }
.ism-register-status--warning { background: var(--gold); }
.ism-register-status--blue { background: #2b7898; }
.ism-register-status--green { background: var(--green); }

.ism-register-timeline {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: #fbfcfd;
}

.ism-register-timeline header,
.ism-register-timeline > .ghost-button {
  padding: 12px;
}

.ism-register-timeline > div {
  min-height: 0;
  overflow-y: auto;
}

.ism-register-timeline button:not(.ghost-button) {
  display: grid;
  width: 100%;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.ism-register-timeline time {
  color: var(--gold-dark, #92701e);
  font-size: 10px;
  font-weight: 950;
}

.ism-register-timeline strong,
.ism-register-timeline small {
  display: block;
}

.ism-register-timeline strong {
  font-size: 11px;
}

.ism-register-timeline small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 9px;
  font-weight: 750;
}

/* Compact Accounting invoice: selected Option A. */
.accounting-compact-page {
  width: min(calc(100% - 20px), 1920px);
  padding: 10px;
}

.accounting-compact-header {
  display: grid;
  min-height: 74px;
  grid-template-columns: 38px minmax(220px, 1fr) minmax(420px, 1.25fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.accounting-compact-header .job-breadcrumb-back {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  font-size: 24px;
}

.accounting-compact-identity {
  min-width: 0;
}

.accounting-compact-identity p,
.accounting-compact-identity h2,
.accounting-compact-identity > span {
  margin: 0;
}

.accounting-compact-identity h2 {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-compact-identity > span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-compact-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.accounting-compact-facts > span {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
}

.accounting-compact-facts > span:last-child {
  border-right: 0;
}

.accounting-compact-facts small,
.accounting-compact-facts strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-compact-facts small {
  color: var(--steel);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accounting-compact-facts strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
}

.accounting-compact-actions {
  max-width: none;
  flex-wrap: nowrap;
  gap: 5px;
}

.accounting-compact-actions .primary-button,
.accounting-compact-actions .ghost-button,
.accounting-compact-actions .danger-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 10px;
}

.accounting-compact-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
  align-items: start;
}

.accounting-compact-main,
.accounting-compact-rail {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.accounting-compact-page .accounting-page-card,
.accounting-compact-details,
.accounting-compact-balance,
.accounting-compact-page .accounting-review-panel {
  border-radius: 8px;
  box-shadow: none;
}

.accounting-line-items-card--primary {
  margin: 0;
}

.accounting-line-items-card--primary .accounting-page-card__header {
  min-height: 43px;
  padding: 7px 10px;
}

.accounting-line-items-card--primary .accounting-page-card__header h3 {
  margin-top: 2px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.accounting-line-items-card--primary > .accounting-line-table {
  max-height: min(390px, calc(100vh - 330px));
  min-height: 220px;
  overflow: auto;
  padding: 7px;
}

.accounting-compact-page .accounting-line-row {
  grid-template-columns: minmax(170px, 1.5fr) 54px 82px 74px 86px minmax(205px, 1fr) 32px;
  gap: 5px;
  padding: 5px;
  border-radius: 6px;
}

.accounting-compact-page .accounting-line-row--head {
  position: sticky;
  z-index: 2;
  top: -7px;
  min-height: 30px;
}

.accounting-compact-page .accounting-line-row input,
.accounting-compact-page .accounting-line-row select {
  min-height: 32px;
  padding-inline: 7px;
  border-radius: 5px;
  font-size: 10px;
}

.accounting-compact-page .accounting-line-allocation {
  gap: 4px;
}

.accounting-compact-page .accounting-line-delete {
  width: 32px;
  height: 32px;
}

.accounting-compact-details {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.accounting-compact-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.accounting-compact-details > summary::-webkit-details-marker {
  display: none;
}

.accounting-compact-details > summary strong,
.accounting-compact-details > summary small {
  display: block;
}

.accounting-compact-details > summary strong {
  font-size: 13px;
}

.accounting-compact-details > summary small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
}

.accounting-compact-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.accounting-compact-details > div {
  max-height: 390px;
  overflow: auto;
  padding: 10px;
}

.accounting-compact-details .accounting-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

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

.accounting-compact-support {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.accounting-compact-support .accounting-page-card__header,
.accounting-compact-rail .accounting-page-card__header {
  min-height: 42px;
  padding: 7px 10px;
}

.accounting-compact-support .accounting-page-card__header h3,
.accounting-compact-rail .accounting-page-card__header h3 {
  font-size: 10px;
}

.accounting-compact-support .accounting-page-card--payments .accounting-payment-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px;
}

.accounting-compact-support .accounting-page-card--payments .accounting-payment-form .primary-button {
  grid-column: auto;
  min-height: 36px;
}

.accounting-compact-rail {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 165px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.accounting-compact-balance {
  padding: 12px;
  border: 1px solid rgba(209, 170, 71, 0.65);
  background: #fff9e9;
}

.accounting-compact-balance > strong,
.accounting-compact-balance > span {
  display: block;
}

.accounting-compact-balance > strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.accounting-compact-balance > span {
  margin-top: 5px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}

.accounting-compact-rail .accounting-review-panel {
  margin: 0;
}

.accounting-compact-rail .accounting-review-panel > header {
  min-height: 43px;
  padding: 7px 9px;
}

.accounting-compact-rail .accounting-review-panel > header > div {
  display: grid;
  gap: 1px;
}

.accounting-compact-rail .accounting-review-panel__findings {
  grid-template-columns: 1fr;
  max-height: 180px;
  overflow-y: auto;
}

.accounting-compact-rail .accounting-review-finding {
  padding: 7px 9px;
}

.accounting-compact-rail .accounting-quote-match {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-compact-rail .accounting-workflow-strip {
  padding: 9px;
}

.accounting-compact-rail .accounting-ledger-list {
  gap: 0;
  padding: 0;
}

.accounting-compact-rail .accounting-ledger-list article {
  grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1fr);
  gap: 5px 8px;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.accounting-compact-rail .accounting-ledger-list article:last-child {
  border-bottom: 0;
}

.accounting-compact-rail .accounting-ledger-list small {
  grid-column: 1 / -1;
  font-size: 9px;
}

.accounting-compact-page .accounting-page-save-note {
  margin: 6px 0 0;
}

@media (max-width: 1280px) {
  .accounting-compact-header {
    grid-template-columns: 38px minmax(200px, 1fr) minmax(360px, 1.2fr);
  }

  .accounting-compact-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .accounting-compact-workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 980px) {
  .ism-register-layout,
  .accounting-compact-workspace {
    grid-template-columns: 1fr;
  }

  .ism-register-timeline {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .accounting-compact-header {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .accounting-compact-facts,
  .accounting-compact-actions {
    grid-column: 2;
  }

  .accounting-compact-rail {
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .accounting-compact-rail .accounting-review-panel,
  .accounting-compact-rail .accounting-ledger-card {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .ism-register-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ism-register-shortcuts {
    overflow-x: auto;
  }

  .ism-register-metrics,
  .accounting-compact-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ism-register-metric:nth-child(2),
  .accounting-compact-facts > span:nth-child(2) {
    border-right: 0;
  }

  .accounting-compact-support,
  .accounting-compact-rail,
  .accounting-compact-details .accounting-edit-grid {
    grid-template-columns: 1fr;
  }

  .accounting-compact-rail .accounting-review-panel,
  .accounting-compact-rail .accounting-ledger-card {
    grid-column: auto;
  }

  .accounting-compact-facts,
  .accounting-compact-actions {
    grid-column: 1 / -1;
  }

  .accounting-compact-header .job-breadcrumb-back {
    grid-column: 1;
  }

  .accounting-compact-identity {
    grid-column: 2;
  }
}

/* Final compact-detail overrides. Keep these after legacy detail rules. */
.crm-profile-header.crew-profile-header--compact {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 8px;
}

.crm-profile-header.crew-profile-header--compact p:not(.eyebrow) {
  margin-top: 3px;
  font-size: 13px;
}

.crew-profile-header-controls {
  display: grid;
  min-width: min(100%, 460px);
  justify-items: end;
  gap: 8px;
}

.crew-profile-header-controls .crew-profile-header-status {
  width: 100%;
}

.crew-profile-archive-button {
  min-height: 34px;
  padding: 0 16px;
  line-height: 1;
}

.crew-profile-tabs {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px 0 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.crew-profile-tab {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
}

.crew-profile-layout.crew-profile-layout--compact {
  display: grid;
  grid-template-columns: minmax(330px, 1.2fr) minmax(250px, 0.9fr) minmax(210px, 0.62fr);
  gap: 10px;
  align-items: start;
  margin: 10px 0 0;
}

.crew-profile-layout.crew-profile-layout--compact > .overview-card,
.crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
  height: min(610px, calc(100vh - 290px));
  min-height: 430px;
  overflow-y: auto;
}

.vessel-passport-hero.vessel-passport-hero--compact {
  min-height: 66px;
  align-items: center;
  padding: 7px 8px;
}

.vessel-passport-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.2fr);
  gap: 10px;
  min-height: 0;
}

.vessel-passport-grid.vessel-passport-grid--compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.vessel-passport-grid.vessel-passport-grid--compact .vessel-passport-card {
  height: min(620px, calc(100vh - 255px));
  min-height: 460px;
}

.vessel-passport-grid.vessel-passport-grid--compact .vessel-details-grid,
.vessel-passport-grid.vessel-passport-grid--compact .vessel-passport-card--build .vessel-details-grid {
  display: block;
  height: calc(100% - 40px);
  overflow-y: auto;
}

@media (max-width: 1180px) {
  .crew-profile-layout.crew-profile-layout--compact {
    grid-template-columns: minmax(340px, 1.2fr) minmax(270px, 0.9fr);
  }

  .crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
  }

  .vessel-passport-workspace {
    grid-template-columns: 1fr;
  }

  .vessel-particulars-status {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .crm-profile-header.crew-profile-header--compact {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-profile-header-controls {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .crew-profile-archive-button {
    justify-self: end;
  }

  .crew-profile-layout.crew-profile-layout--compact,
  .vessel-passport-grid.vessel-passport-grid--compact {
    grid-template-columns: 1fr;
  }

  .crew-profile-layout.crew-profile-layout--compact > .overview-card,
  .crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary,
  .vessel-passport-grid.vessel-passport-grid--compact .vessel-passport-card {
    height: auto;
    min-height: 0;
  }

  .crew-compact-summary,
  .vessel-particulars-status {
    grid-template-columns: 1fr;
  }

  .vessel-passport-grid.vessel-passport-grid--compact .vessel-details-grid,
  .vessel-passport-grid.vessel-passport-grid--compact .vessel-passport-card--build .vessel-details-grid {
    height: auto;
    max-height: none;
  }
}

/* Final crew administration sizing overrides. */
.crew-leave-compact-page .crew-leave-entitlement-grid .crew-payroll-field textarea,
.crew-payroll-compact-page .crew-payroll-contract-grid .crew-payroll-field textarea,
.crew-payroll-compact-page .crew-payroll-record-grid .crew-payroll-field textarea {
  height: 52px;
  min-height: 52px;
}

/* Unified compact Crew Leave workspace. This final scoped layer replaces
   legacy payroll/table treatments without changing any leave controls. */
.crew-leave-compact-page .crew-leave-overview-card,
.crew-leave-compact-page .crew-leave-periods-card {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.crew-leave-compact-page .crew-admin-heading {
  min-height: 42px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.crew-leave-compact-page .crew-admin-heading h3 {
  font-size: 18px;
}

.crew-leave-compact-page .crew-leave-summary.crew-admin-metrics {
  gap: 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.crew-leave-compact-page .crew-admin-metrics article,
.crew-leave-compact-page .crew-admin-metrics article:last-child {
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
}

.crew-leave-compact-page .crew-admin-metrics .crew-admin-metric--emphasis {
  border-color: rgba(209, 170, 71, 0.52);
  background: rgba(209, 170, 71, 0.15);
}

.crew-leave-compact-page .crew-leave-current-status {
  background: var(--mist);
}

.crew-leave-compact-page .crew-leave-control-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(244, 247, 249, 0.72);
}

.crew-leave-compact-page .crew-leave-control-panel,
.crew-leave-compact-page .crew-leave-current-panel {
  padding: 10px;
  border: 0;
  background: transparent;
}

.crew-leave-compact-page .crew-leave-current-panel {
  border-left: 1px solid var(--line);
}

.crew-leave-compact-page .crew-payroll-subheading {
  min-height: 24px;
  margin-bottom: 8px;
}

.crew-leave-compact-page .crew-payroll-subheading h4 {
  font-size: 12px;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-table {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row,
.crew-leave-compact-page .crew-leave-current-panel .crew-info-row:nth-child(3),
.crew-leave-compact-page .crew-leave-current-panel .crew-info-row:nth-child(n + 4) {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-height: 0;
  border: 0;
  background: transparent;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row:nth-child(n + 4) {
  grid-column: span 3;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row > span {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row input,
.crew-leave-compact-page .crew-leave-current-panel .crew-info-row select,
.crew-leave-compact-page .crew-leave-current-panel .crew-info-row textarea,
.crew-leave-compact-page .crew-leave-current-panel .crew-info-row--static > strong {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row--static > strong {
  display: flex;
  align-items: center;
}

.crew-leave-compact-page .crew-leave-current-panel .crew-info-row textarea {
  height: 52px;
  min-height: 52px;
  resize: vertical;
}

.crew-leave-compact-page .crew-leave-periods-card .crew-payroll-leave-form {
  margin: 0 0 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  box-shadow: none;
}

.crew-leave-compact-page .crew-leave-periods-card .crew-payroll-leave-form summary {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.crew-leave-compact-page .crew-leave-periods-card .crew-payroll-leave-table {
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 1180px) {
  .crew-leave-compact-page .crew-leave-current-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .crew-leave-compact-page .crew-leave-current-panel .crew-info-table {
    grid-template-columns: 1fr;
  }

  .crew-leave-compact-page .crew-leave-current-panel .crew-info-row,
  .crew-leave-compact-page .crew-leave-current-panel .crew-info-row:nth-child(3),
  .crew-leave-compact-page .crew-leave-current-panel .crew-info-row:nth-child(n + 4) {
    grid-column: 1;
  }
}

/* Compact crew document workspace. Overview shows readiness only; the full
   document register keeps the existing upload, status and file action hooks. */
.crew-profile-layout.crew-profile-layout--compact {
  height: min(610px, calc(100vh - 290px));
  grid-template-columns: minmax(480px, 1.35fr) minmax(340px, 0.75fr);
  grid-template-rows: minmax(198px, 0.58fr) minmax(0, 1fr);
}

.crew-profile-layout.crew-profile-layout--compact > .crew-personal-card {
  height: 100%;
  grid-row: 1 / 3;
}

.crew-profile-layout.crew-profile-layout--compact > .crew-document-status-card {
  height: 100%;
  min-height: 0;
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  padding: 0;
}

.crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
  height: 100%;
  min-height: 0;
  grid-column: 2;
  grid-row: 2;
  overflow-y: auto;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary section {
  padding: 7px 10px;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__metric {
  margin: 3px 0;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__metric strong {
  font-size: 20px;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__metric small,
.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__row span {
  font-size: 9px;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__row {
  padding: 3px 0;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__row strong {
  font-size: 10px;
}

.crew-profile-layout.crew-profile-layout--compact .crew-compact-summary__status {
  margin: 4px 0;
}

.crew-document-status-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.crew-document-status-heading > div {
  display: grid;
  gap: 1px;
}

.crew-document-status-heading .eyebrow {
  font-size: 8px;
  line-height: 1;
}

.crew-document-status-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
}

.crew-document-status-heading .table-link {
  flex: 0 0 auto;
  font-size: 10px;
}

.crew-document-status-metrics,
.crew-documents-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--mist);
}

.crew-document-status-metrics > span,
.crew-documents-metrics > span {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
}

.crew-document-status-metrics > span:last-child,
.crew-documents-metrics > span:last-child {
  border-right: 0;
}

.crew-document-status-metrics strong,
.crew-documents-metrics strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.crew-document-status-metrics small,
.crew-documents-metrics small {
  overflow: hidden;
  color: var(--steel);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.crew-document-status-metrics .is-attention strong,
.crew-documents-metrics .is-attention strong {
  color: var(--red);
}

.crew-document-status-list {
  display: grid;
}

.crew-document-status-row {
  display: grid;
  min-width: 0;
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
}

.crew-document-status-row > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.crew-document-status-row strong,
.crew-document-status-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-document-status-row strong {
  color: var(--ink);
  font-size: 10px;
}

.crew-document-status-row small,
.crew-document-status-more,
.crew-document-status-empty {
  color: var(--steel);
  font-size: 8px;
  font-weight: 800;
}

.crew-document-status-more,
.crew-document-status-empty {
  margin: 0;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
}

.crew-document-status-tone {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.crew-document-status-tone--ready {
  background: rgba(43, 105, 82, 0.11);
  color: #2b6952;
}

.crew-document-status-tone--warning {
  background: rgba(216, 174, 66, 0.18);
  color: #725811;
}

.crew-document-status-tone--danger {
  background: rgba(164, 61, 57, 0.11);
  color: #a43d39;
}

.crew-documents-page {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.crew-documents-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.52fr);
  align-items: center;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.crew-documents-header > div:first-child {
  display: grid;
  gap: 2px;
}

.crew-documents-header h3,
.crew-documents-subheading h4 {
  margin: 0;
  color: var(--ink);
}

.crew-documents-header h3 {
  font-size: 25px;
  line-height: 1;
}

.crew-documents-header p,
.crew-documents-subheading p {
  margin: 0;
  color: var(--steel);
  font-weight: 750;
}

.crew-documents-header p {
  font-size: 11px;
}

.crew-documents-metrics {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.crew-documents-metrics > span {
  padding: 8px 10px;
  background: #fff;
}

.crew-documents-metrics strong {
  font-size: 18px;
}

.crew-documents-workspace {
  display: grid;
  gap: 14px;
  padding: 12px 16px 16px;
}

.crew-document-categories,
.crew-document-register {
  display: grid;
  gap: 7px;
}

.crew-documents-subheading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.crew-documents-subheading h4 {
  font-size: 14px;
}

.crew-documents-subheading p {
  font-size: 10px;
}

.crew-file-list.crew-file-list--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.crew-documents-page .crew-file-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.crew-documents-page .crew-file-section[open] {
  grid-column: 1 / -1;
}

.crew-documents-page .crew-file-section summary {
  display: grid;
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  justify-content: initial;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(244, 247, 249, 0.72);
  font-size: 11px;
}

.crew-documents-page .crew-file-section summary::after {
  content: "+";
  font-size: 15px;
  line-height: 1;
  text-align: center;
  transform: none;
}

.crew-documents-page .crew-file-section[open] summary::after {
  content: "-";
  transform: none;
}

.crew-documents-page .crew-file-section summary span,
.crew-documents-page .crew-file-section summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-documents-page .crew-file-section summary em {
  font-size: 8px;
  letter-spacing: 0.04em;
}

.crew-documents-page .crew-file-section-body {
  gap: 9px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.crew-documents-page .crew-file-section-body > p {
  font-size: 10px;
}

.crew-documents-page .crew-file-actions {
  gap: 8px;
}

.crew-documents-page .crew-file-actions label:not(.crew-file-upload-button) {
  min-width: 170px;
  gap: 3px;
}

.crew-documents-page .crew-file-upload-button,
.crew-documents-page .crew-file-actions select {
  min-height: 36px;
  border-radius: 6px;
  font-size: 11px;
}

.crew-documents-page .crew-file-upload-button {
  padding: 0 14px;
}

.crew-documents-page .crew-certificate-upload-form {
  gap: 9px;
  padding: 10px;
  border-radius: 6px;
}

.crew-documents-page .crew-certificate-upload-heading strong {
  font-size: 14px;
}

.crew-documents-page .crew-certificate-upload-heading span,
.crew-documents-page .crew-certificate-message {
  font-size: 10px;
}

.crew-documents-page .crew-certificate-upload-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crew-documents-page .crew-certificate-type-field,
.crew-documents-page .crew-certificate-file-field {
  grid-column: auto;
}

.crew-documents-page .crew-certificate-upload-grid label {
  min-width: 0;
  gap: 3px;
}

.crew-documents-page .crew-certificate-upload-grid input,
.crew-documents-page .crew-certificate-upload-grid select {
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  font-size: 11px;
}

.crew-documents-page .crew-file-table {
  border-color: var(--line);
  border-radius: 6px;
}

.crew-documents-page .crew-file-table-row {
  gap: 8px;
  padding: 8px 10px;
  border-bottom-color: var(--line);
}

.crew-documents-page .crew-file-table-head {
  font-size: 8px;
  letter-spacing: 0.05em;
}

.crew-documents-page .crew-file-table-row:not(.crew-file-table-head) span {
  font-size: 11px;
}

.crew-documents-page .crew-file-empty {
  min-height: 48px;
  font-size: 11px;
}

.crew-document-register-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.crew-document-register-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1.5fr) minmax(100px, 0.55fr) minmax(110px, 0.55fr) minmax(80px, 0.35fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.crew-document-register-row:last-child {
  border-bottom: 0;
}

.crew-document-register-row > span {
  display: grid;
  min-width: 0;
  gap: 1px;
  color: var(--ink);
  font-size: 11px;
}

.crew-document-register-row > span strong,
.crew-document-register-row > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-document-register-row > span small,
.crew-document-register-empty {
  color: var(--steel);
  font-size: 9px;
  font-weight: 750;
}

.crew-document-register-head {
  background: var(--mist);
}

.crew-document-register-head > span {
  color: var(--steel);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crew-document-register-empty {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
}

@media (max-width: 1180px) {
  .crew-profile-layout.crew-profile-layout--compact {
    grid-template-columns: minmax(380px, 1.2fr) minmax(300px, 0.8fr);
  }

  .crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .crew-profile-layout.crew-profile-layout--compact {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .crew-profile-layout.crew-profile-layout--compact > .crew-personal-card,
  .crew-profile-layout.crew-profile-layout--compact > .crew-document-status-card,
  .crew-profile-layout.crew-profile-layout--compact > .crew-compact-summary {
    height: auto;
    min-height: 0;
    grid-column: 1;
    grid-row: auto;
  }

  .crew-documents-header {
    grid-template-columns: 1fr;
  }

  .crew-file-list.crew-file-list--compact,
  .crew-documents-page .crew-certificate-upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crew-documents-page .crew-file-section[open] {
    grid-column: 1;
  }

  .crew-documents-page .crew-certificate-type-field,
  .crew-documents-page .crew-certificate-file-field {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .crew-documents-header,
  .crew-documents-workspace {
    padding-right: 10px;
    padding-left: 10px;
  }

  .crew-documents-metrics {
    grid-template-columns: 1fr;
  }

  .crew-documents-metrics > span {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .crew-documents-metrics > span:last-child {
    border-bottom: 0;
  }

  .crew-document-register-head {
    display: none;
  }

  .crew-document-register-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .crew-document-register-row > span:nth-child(3),
  .crew-document-register-row > span:nth-child(4) {
    grid-column: auto;
  }
}

/* Crew training and vessel familiarisation */
.crew-training-page {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.crew-training-page > .overview-card {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
}

.crew-training-heading,
.crew-training-section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crew-training-heading h3,
.crew-training-section-heading h4 {
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 1.05;
}

.crew-training-heading h3 {
  font-size: 22px;
}

.crew-training-section-heading h4 {
  font-size: 16px;
}

.crew-training-heading p,
.crew-training-section-heading p {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.crew-familiarisation-overall {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.crew-familiarisation-overall--ready {
  border-color: rgba(47, 95, 77, 0.2);
  background: rgba(47, 95, 77, 0.1);
  color: var(--green);
}

.crew-familiarisation-overall--warning {
  border-color: rgba(209, 170, 71, 0.35);
  background: var(--gold-soft);
  color: var(--ink);
}

.crew-training-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
}

.crew-training-metrics > span {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}

.crew-training-metrics > span:last-child {
  border-right: 0;
}

.crew-training-metrics strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.crew-training-metrics small {
  color: var(--steel);
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.crew-training-section-heading > strong {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 16px;
}

.crew-familiarisation-progress {
  height: 6px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mist);
}

.crew-familiarisation-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.crew-familiarisation-list {
  display: grid;
  gap: 5px;
}

.crew-familiarisation-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.crew-familiarisation-row.is-complete {
  border-color: rgba(47, 95, 77, 0.22);
  background: rgba(47, 95, 77, 0.045);
}

.crew-familiarisation-check {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  cursor: pointer;
}

.crew-familiarisation-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.crew-familiarisation-check > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.crew-familiarisation-check input:checked + span {
  border-color: var(--green);
  background: var(--green);
}

.crew-familiarisation-check input:checked + span::after {
  content: "";
  width: 7px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.crew-familiarisation-check input:focus-visible + span {
  outline: 3px solid rgba(209, 170, 71, 0.3);
  outline-offset: 2px;
}

.crew-familiarisation-check input:disabled + span {
  cursor: default;
  opacity: 0.72;
}

.crew-familiarisation-copy {
  min-width: 0;
}

.crew-familiarisation-copy strong,
.crew-familiarisation-copy p,
.crew-familiarisation-copy small {
  display: block;
  margin: 0;
}

.crew-familiarisation-copy strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.crew-familiarisation-copy p {
  margin-top: 2px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.crew-familiarisation-copy small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 8px;
  font-weight: 900;
}

.crew-familiarisation-row > em {
  min-width: 62px;
  color: var(--steel);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-align: right;
  text-transform: uppercase;
}

.crew-familiarisation-row.is-complete > em {
  color: var(--green);
}

.crew-familiarisation-remove {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--mist);
  color: var(--steel);
  font-size: 16px;
  line-height: 1;
}

.crew-familiarisation-add {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.crew-familiarisation-add summary {
  width: fit-content;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
}

.crew-familiarisation-add form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.crew-familiarisation-add label {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.crew-familiarisation-add label > span {
  color: var(--steel);
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.crew-familiarisation-add input,
.crew-familiarisation-add button {
  min-width: 0;
  min-height: 36px;
  border-radius: 6px;
  font-size: 10px;
}

.crew-familiarisation-add button {
  padding: 0 13px;
}

.crew-familiarisation-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
}

.crew-training-records-card .crew-training-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.crew-training-records-card .crew-training-card {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: #fff;
}

.crew-training-records-card .crew-training-card strong {
  margin-top: 0;
  font-size: 12px;
}

.crew-training-records-card .crew-training-card > small {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 8px;
}

.crew-training-records-card .crew-training-card span,
.crew-training-records-card .crew-training-card p {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.3;
}

@media (max-width: 760px) {
  .crew-familiarisation-add form,
  .crew-training-records-card .crew-training-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .crew-familiarisation-add button {
    width: fit-content;
  }
}

@media (max-width: 520px) {
  .crew-training-page > .overview-card {
    padding: 11px;
  }

  .crew-training-heading {
    align-items: flex-start;
  }

  .crew-training-heading h3 {
    font-size: 19px;
  }

  .crew-training-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .crew-training-metrics > span {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .crew-training-metrics > span:last-child {
    border-bottom: 0;
  }

  .crew-familiarisation-row {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  .crew-familiarisation-row > em {
    display: none;
  }
}

/* Compact Inventory item workspace */
.drawer[data-detail-type="inventory"] {
  place-items: stretch;
}

.drawer[data-detail-type="inventory"] .detail-page {
  position: relative;
  width: 100%;
  max-width: none;
  box-shadow: 0 0 90px rgba(7, 31, 53, 0.28);
}

.drawer[data-detail-type="inventory"] .close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 12;
  margin: 0;
}

.drawer[data-detail-type="inventory"] .detail-body {
  width: min(calc(100% - 36px), 1720px);
  margin: 0 auto;
}

.inventory-item-page {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 28px);
}

.inventory-item-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 108px 12px 0;
}

.inventory-item-title-block {
  min-width: 0;
}

.inventory-item-title-block .eyebrow {
  margin: 0 0 4px;
}

.inventory-item-title-block h2 {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 4vw, 64px);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.inventory-item-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.inventory-item-page__actions {
  display: flex;
  justify-content: flex-end;
}

.inventory-item-page__actions .danger-button {
  min-height: 40px;
  padding: 8px 13px;
}

.inventory-item-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.inventory-item-details-card .inventory-edit-grid,
.inventory-item-details-card .inventory-readonly-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-item-details-card .inventory-edit-grid label,
.inventory-item-details-card .inventory-readonly-grid .property-card,
.inventory-item-details-card .inventory-edit-grid label:nth-child(2n),
.inventory-item-details-card .inventory-readonly-grid .property-card:nth-child(2n) {
  border-right: 1px solid var(--line);
}

.inventory-item-details-card .inventory-edit-grid label:nth-child(3n),
.inventory-item-details-card .inventory-readonly-grid .property-card:nth-child(3n),
.inventory-item-details-card .inventory-edit-grid label.wide-field,
.inventory-item-details-card .inventory-readonly-grid .property-card.wide-field {
  border-right: 0;
}

.inventory-item-details-card .inventory-edit-grid textarea,
.inventory-item-details-card .inventory-edit-grid textarea:not(.short-textarea) {
  min-height: 70px;
}

.inventory-item-page__rail {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.inventory-item-page__rail .technical-system-tile {
  height: auto;
  min-height: 0;
}

.inventory-item-page__rail .technical-system-tile__body {
  max-height: 210px;
}

.inventory-item-page__rail .technical-link-selector-group {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.inventory-item-page__rail .technical-link-selector-group label {
  display: grid;
  gap: 5px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.inventory-item-page__rail .technical-link-selector-group input,
.inventory-item-page__rail .technical-link-selector-group select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 7px 9px;
  text-transform: none;
}

.inventory-item-link-editor,
.inventory-item-linked-records {
  display: grid;
  gap: 9px;
}

.inventory-item-linked-records {
  margin-top: 9px;
}

.inventory-item-linked-record {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(246, 248, 247, 0.72);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.inventory-item-linked-record span {
  grid-row: 1 / 3;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inventory-item-linked-record strong,
.inventory-item-linked-record small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item-linked-record strong {
  font-size: 13px;
  font-weight: 950;
}

.inventory-item-linked-record small {
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}

.inventory-item-linked-record:hover,
.inventory-item-linked-record:focus-visible {
  border-color: var(--gold);
  background: var(--gold-soft);
  outline: 0;
}

.inventory-item-page__rail .medication-signout-panel {
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.inventory-item-page__rail .medication-signout-panel .primary-button {
  min-height: 38px;
  padding: 8px 12px;
}

.inventory-item-page__rail .medication-signout-log {
  max-height: 142px;
  overflow-y: auto;
}

.inventory-item-save-note {
  margin: 0;
  padding: 0 2px;
}

@media (max-width: 1180px) {
  .inventory-item-page__layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 760px) {
  .drawer[data-detail-type="inventory"] .detail-body {
    width: 100%;
  }

  .inventory-item-page {
    gap: 12px;
    padding: 14px;
  }

  .inventory-item-page__header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding-right: 76px;
  }

  .inventory-item-title-block h2 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .inventory-item-page__actions {
    justify-content: flex-start;
  }

  .inventory-item-details-card .inventory-edit-grid,
  .inventory-item-details-card .inventory-readonly-grid,
  .inventory-item-page__rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-item-details-card .inventory-edit-grid label,
  .inventory-item-details-card .inventory-readonly-grid .property-card,
  .inventory-item-details-card .inventory-edit-grid label:nth-child(2n),
  .inventory-item-details-card .inventory-readonly-grid .property-card:nth-child(2n) {
    border-right: 0;
  }
}

/* Yacht Atlas operational register. */
.atlas-work-register-toolbar {
  display: grid;
  gap: 9px;
  padding: 10px 0 12px;
}

.atlas-work-register-toolbar__primary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.atlas-register-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
}

.atlas-presentation-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  padding: 3px;
}

.atlas-presentation-switch button,
.atlas-attention-filter,
.atlas-view-reset,
.atlas-clear-filters,
.atlas-detail-flag {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--steel);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  padding: 6px 10px;
}

.atlas-presentation-switch button.is-active {
  background: var(--navy);
  color: #fff;
}

.atlas-attention-filter,
.atlas-view-reset,
.atlas-clear-filters,
.atlas-detail-flag {
  border-color: var(--line-strong);
  background: var(--paper);
}

.atlas-attention-filter span,
.atlas-detail-flag span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--steel);
}

.atlas-attention-filter.is-active,
.atlas-detail-flag.is-active {
  border-color: rgba(155, 58, 52, 0.46);
  background: color-mix(in srgb, var(--red) 10%, var(--paper));
  color: var(--red);
}

.atlas-attention-filter.is-active span,
.atlas-detail-flag.is-active span {
  background: var(--red);
  color: #fff;
}

.atlas-work-register-toolbar .atlas-filter-strip {
  grid-template-columns: repeat(4, minmax(105px, 1fr)) minmax(120px, .8fr) minmax(120px, .8fr) auto;
  gap: 7px;
  padding: 0;
}

.atlas-work-register-toolbar .atlas-filter-strip select {
  min-height: 34px;
  border-radius: 7px;
  font-size: 11px;
  padding: 0 8px;
}

.atlas-work-register-toolbar .atlas-filter-strip label {
  gap: 3px;
  font-size: 9px;
}

.atlas-clear-filters {
  align-self: end;
  white-space: nowrap;
}

.atlas-workspace {
  display: grid;
  min-width: 0;
  min-height: 520px;
  gap: 10px;
}

.atlas-workspace--plan,
.atlas-workspace--list {
  grid-template-columns: minmax(0, 1fr);
}

.atlas-workspace--split {
  grid-template-columns: minmax(430px, 1.45fr) minmax(290px, .55fr);
}

.atlas-workspace .atlas-stage {
  min-width: 0;
  min-height: 520px;
}

.atlas-register {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 520px;
  max-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 94%, var(--mist));
}

.atlas-register__header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.atlas-register__header h4 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
}

.atlas-register__header > span {
  color: var(--steel);
  font-size: 10px;
  font-weight: 900;
  text-transform: capitalize;
}

.atlas-register__scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 7px;
}

.atlas-register-group {
  display: grid;
  gap: 5px;
}

.atlas-register-group + .atlas-register-group {
  margin-top: 9px;
}

.atlas-register-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--steel);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .1em;
  padding: 2px 4px;
  text-transform: uppercase;
}

.atlas-register-group > header span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  background: var(--mist);
}

.atlas-register-group__rows {
  display: grid;
  gap: 5px;
}

.atlas-register-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 7px;
}

.atlas-register-row.is-selected {
  border-color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}

.atlas-register-row.is-flagged {
  background: color-mix(in srgb, var(--red) 5%, var(--paper));
}

.atlas-register-row__flag {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--mist);
  color: var(--steel);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  padding: 0;
}

button.atlas-register-row__flag[aria-pressed="true"],
.atlas-register-row__flag.is-read-only {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.atlas-register-row__flag.is-empty {
  visibility: hidden;
}

.atlas-register-row__main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 1px 0;
  text-align: left;
}

.atlas-register-row__main strong,
.atlas-register-row__main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-register-row__main strong {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.atlas-register-row__main small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 750;
}

.atlas-register-row__meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.atlas-register-row__meta i {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--steel);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  padding: 3px 6px;
}

.atlas-register-row__meta .atlas-register-chip--high {
  background: color-mix(in srgb, var(--red) 12%, var(--paper));
  color: var(--red);
}

.atlas-register-row__meta .atlas-register-chip--medium {
  background: var(--gold-soft);
  color: var(--ink);
}

.atlas-register-row__meta .atlas-register-chip--low {
  background: color-mix(in srgb, var(--green) 12%, var(--paper));
  color: var(--green);
}

.atlas-register__empty {
  display: grid;
  gap: 3px;
  place-content: center;
  min-height: 220px;
  color: var(--steel);
  text-align: center;
}

.atlas-register__empty strong {
  color: var(--ink);
}

.atlas-detail-flag {
  min-height: 40px;
}

@media (max-width: 1480px) {
  .atlas-workspace--split {
    grid-template-columns: minmax(0, 1fr);
  }

  .atlas-workspace--split .atlas-register {
    min-height: 310px;
    max-height: 390px;
  }

  .atlas-work-register-toolbar .atlas-filter-strip {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }
}

@media (max-width: 900px) {
  .atlas-work-register-toolbar__primary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .atlas-presentation-switch {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .atlas-work-register-toolbar .atlas-filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .atlas-work-register-toolbar__primary,
  .atlas-work-register-toolbar .atlas-filter-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .atlas-presentation-switch {
    grid-column: auto;
    grid-row: auto;
  }

  .atlas-attention-filter,
  .atlas-view-reset,
  .atlas-clear-filters {
    width: 100%;
  }

  .atlas-workspace,
  .atlas-workspace .atlas-stage {
    min-height: 440px;
  }
}

/* Narrow-screen navigation uses the full sidebar as an off-canvas drawer. */
.mobile-navigation-toggle,
.mobile-navigation-backdrop {
  display: none;
}

body[data-mobile-navigation-open="true"] {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .mobile-navigation-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-navigation-toggle:hover,
  .mobile-navigation-toggle:focus-visible {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.17);
  }

  .mobile-navigation-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .mobile-navigation-backdrop {
    position: fixed;
    inset: 0;
    z-index: 119;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(4, 18, 31, 0.58);
    backdrop-filter: blur(2px);
  }

  .view-tabs,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    grid-column: auto;
    grid-row: auto;
    display: grid;
    align-content: start;
    align-items: stretch;
    gap: 12px;
    width: min(350px, calc(100vw - 36px));
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0 24px 24px 0;
    background: var(--paper);
    box-shadow: 22px 0 54px rgba(4, 18, 31, 0.3);
    opacity: 0;
    pointer-events: none;
    scroll-snap-type: none;
    touch-action: pan-y;
    transform: translateX(calc(-100% - 28px));
    visibility: hidden;
    transition:
      transform 180ms ease,
      opacity 150ms ease,
      visibility 0s linear 180ms;
  }

  .app-shell[data-mobile-navigation-open="true"] .view-tabs {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
    transition:
      transform 180ms ease,
      opacity 150ms ease,
      visibility 0s linear 0s;
  }

  .view-tabs .sidebar-heading,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs .sidebar-heading {
    position: sticky;
    top: -18px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    margin: -18px -18px 0;
    padding: 18px 18px 14px;
    background: var(--paper);
  }

  .app-shell[data-sidebar-collapsed="true"] .sidebar-heading > div,
  .app-shell[data-sidebar-collapsed="true"] .nav-group summary {
    display: block;
  }

  .app-shell[data-sidebar-collapsed="true"] .sidebar-heading {
    justify-content: space-between;
  }

  .view-tabs > .view-tab--home,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs > .view-tab--home {
    position: static;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .view-tabs > .view-tab--home:not(.is-active) {
    background: var(--paper);
  }

  .view-tabs .nav-group,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs .nav-group {
    display: block;
    flex: none;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(9, 32, 54, 0.08);
    border-radius: 18px;
    background: color-mix(in srgb, var(--paper) 74%, var(--mist));
    overflow: visible;
    scroll-snap-align: none;
  }

  .view-tabs .nav-group summary,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs .nav-group summary {
    display: flex;
  }

  .view-tabs .nav-subsections,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs .nav-subsections {
    display: grid;
    gap: 7px;
    margin-top: 8px;
    padding: 0 10px 12px;
    overflow: visible;
  }

  .view-tabs .view-tab,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs .view-tab {
    flex: none;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell[data-sidebar-collapsed="true"] .view-tabs .view-tab::before {
    content: none;
  }
}

@media (max-width: 720px) {
  .mobile-navigation-toggle {
    align-self: flex-start;
  }

  .view-tabs,
  .app-shell[data-sidebar-collapsed="true"] .view-tabs {
    width: min(340px, calc(100vw - 24px));
  }
}

/* Atomic yacht provisioning and first-login onboarding */
.add-project-card__captain {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 2px 0 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 74%, var(--mist));
  padding: 14px;
}

.add-project-card__captain > div {
  grid-column: 1 / -1;
}

.add-project-card__captain h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.add-project-card__captain p {
  margin: 4px 0 0;
  font-size: 13px;
}

.provisioning-receipt,
.provisioning-error-panel {
  display: grid;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--green) 8%, var(--paper));
  padding: 16px;
}

.provisioning-receipt__head,
.provisioning-receipt__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.provisioning-receipt h4,
.provisioning-error-panel strong {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.provisioning-result-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 18%, var(--paper));
  padding: 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
}

.provisioning-receipt__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.provisioning-receipt__grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 10px 12px;
}

.provisioning-receipt dt,
.provisioning-receipt dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.provisioning-receipt dt {
  color: var(--steel);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.provisioning-receipt dd {
  margin-top: 3px;
  color: var(--ink);
  font-weight: 900;
}

.provisioning-receipt__actions {
  align-items: center;
}

.provisioning-receipt__actions small {
  color: var(--steel);
  font-weight: 800;
}

.provisioning-inline-error {
  margin: 0;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  color: var(--ink);
  font-weight: 800;
}

.provisioning-error-panel {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--red) 9%, var(--paper));
}

.provisioning-error-panel p,
.provisioning-error-panel small {
  margin: 0;
  color: var(--ink);
}

.captain-access-test {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.captain-access-test strong,
.captain-access-test p {
  margin: 0;
  color: var(--ink);
}

.captain-access-test ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.captain-access-test li {
  border-radius: 10px;
  background: color-mix(in srgb, var(--mist) 76%, var(--paper));
  padding: 7px 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.captain-access-test li.is-passed {
  color: var(--green);
}

.captain-access-test li.is-failed {
  color: var(--red);
}

.onboarding-checklist {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 92%, var(--mist));
  padding: 16px;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--ink) 8%, transparent);
}

.onboarding-checklist[hidden] {
  display: none;
}

.onboarding-checklist__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.onboarding-checklist__head h2,
.onboarding-checklist__head p {
  margin: 0;
}

.onboarding-checklist__head h2 {
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
}

.onboarding-checklist__head p:not(.eyebrow),
.onboarding-checklist__hint {
  margin-top: 3px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
}

.onboarding-checklist__count {
  display: grid;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 950;
}

.onboarding-checklist__progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--steel) 16%, var(--paper));
}

.onboarding-checklist__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 180ms ease;
}

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

.onboarding-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-content: start;
  min-width: 0;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 10px;
}

.onboarding-step.is-complete {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
}

.onboarding-step__number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mist) 80%, var(--paper));
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
}

.onboarding-step.is-complete .onboarding-step__number {
  background: var(--green);
  color: #fff;
}

.onboarding-step__copy {
  min-width: 0;
}

.onboarding-step__copy strong,
.onboarding-step__copy small {
  display: block;
}

.onboarding-step__copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-step__copy small {
  margin-top: 3px;
  color: var(--steel);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.onboarding-step__action {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 74%, var(--mist));
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.onboarding-step__action:hover:not(:disabled) {
  border-color: var(--gold);
}

.onboarding-step__action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.onboarding-checklist__hint {
  margin: 0;
}

.record-create-panel {
  width: min(880px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  overflow: auto;
}

.record-create-form {
  display: grid;
  gap: 14px;
}

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

.record-create-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.record-create-field > span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.record-create-field input,
.record-create-field select,
.record-create-field textarea {
  width: 100%;
  min-width: 0;
}

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

.record-create-actions {
  justify-content: flex-end;
}

.module-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: left;
}

.module-empty-state__copy {
  display: grid;
  gap: 4px;
  max-width: 520px;
}

.module-empty-state__copy strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.module-empty-state__copy span,
.module-empty-state__message {
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.module-empty-state__message {
  margin: 0;
  text-align: center;
}

.module-empty-state__action {
  flex: 0 0 auto;
}

.empty-state--action {
  padding: 0 !important;
}

/* Vessel logbooks */
.logbooks-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.logbooks-heading,
.logbook-entry-form__heading,
.logbook-entry-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.logbooks-heading h2,
.logbook-entry-form h3 {
  margin: 0;
}

.logbooks-heading__copy {
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
  margin: 3px 0 0;
}

.logbooks-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
}

.logbooks-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.logbooks-tabs button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 6px 12px;
}

.logbooks-tabs button.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.logbooks-search input {
  min-height: 38px;
  width: 100%;
}

.logbook-entry-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.logbook-entry-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.logbook-entry-grid label {
  color: var(--steel);
  display: grid;
  font-size: 11px;
  font-weight: 950;
  gap: 5px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.logbook-entry-grid input,
.logbook-entry-grid select,
.logbook-entry-grid textarea {
  font-size: 14px;
  min-height: 40px;
  text-transform: none;
}

.logbook-entry-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.logbook-entry-grid .wide-field {
  grid-column: span 2;
}

.logbook-entry-actions .form-message {
  margin: 0;
}

.logbooks-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: min(58vh, 650px);
  overflow: auto;
}

.logbooks-table {
  min-width: 1040px;
  width: 100%;
}

.logbooks-table th {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1;
}

.logbooks-table th,
.logbooks-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.logbooks-table td strong,
.logbooks-table td small {
  display: block;
}

.logbooks-table td small {
  color: var(--steel);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
  max-width: 420px;
}

.logbook-type {
  background: color-mix(in srgb, var(--gold) 17%, var(--paper));
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  padding: 5px 8px;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .logbooks-toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1180px) {
  .onboarding-checklist__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .logbooks-card {
    padding: 12px;
  }

  .logbooks-heading,
  .logbook-entry-form__heading,
  .logbook-entry-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-entry-grid {
    grid-template-columns: 1fr;
  }

  .logbook-entry-grid .wide-field {
    grid-column: auto;
  }

  .add-project-card__captain,
  .onboarding-checklist__steps,
  .provisioning-receipt__grid,
  .captain-access-test ul {
    grid-template-columns: 1fr;
  }

  .provisioning-receipt__head,
  .provisioning-receipt__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-checklist {
    padding: 12px;
  }

  .onboarding-step {
    min-height: 96px;
  }

  .record-create-grid {
    grid-template-columns: 1fr;
  }

  .record-create-field--wide {
    grid-column: auto;
  }

  .record-create-actions,
  .module-empty-state {
    align-items: stretch;
    flex-direction: column;
  }

  .module-empty-state {
    text-align: center;
  }
}
