:root {
  --navy: #071f35;
  --navy-2: #0e304f;
  --ink: #092036;
  --steel: #526981;
  --muted: #6f7f8f;
  --gold: #d1aa47;
  --gold-soft: #f3e8cc;
  --cream: #f5f1e8;
  --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;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  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,
.app-shell {
  width: min(100% - 40px, 1480px);
  margin: 32px auto;
}

.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: 10px;
}

.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,
.close-button,
.table-link,
.save-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button,
.save-button {
  min-height: 52px;
  padding: 0 22px;
  background: var(--gold);
  color: var(--ink);
}

.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);
}

.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: 320px minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 34px;
  background: rgba(245, 241, 232, 0.95);
  box-shadow: var(--shadow);
  transition: grid-template-columns 180ms ease;
}

.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: wrap;
  gap: 20px;
  padding: 24px 34px;
  background: var(--navy);
}

.brand-link {
  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-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.project-switcher {
  display: grid;
  gap: 5px;
  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 {
  min-width: 210px;
  max-width: 100%;
  min-height: 42px;
  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;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  min-height: 42px;
  min-width: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  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);
}

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

.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;
}

.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;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 220px 220px auto;
  gap: 14px;
  align-items: end;
  margin: 34px 28px 22px;
}

.view-tabs {
  grid-column: 1;
  grid-row: 2 / span 2;
  display: grid;
  gap: 12px;
  align-self: start;
  height: calc(100vh - 164px);
  max-height: calc(100vh - 164px);
  margin: 0 0 34px 28px;
  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 {
  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.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: attr(data-short);
  font-size: 16px;
  font-weight: 950;
}

.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;
}

.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: 18px 22px 14px;
}

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

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

.worklist-title-group {
  display: grid;
  gap: 7px;
  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: clamp(34px, 3vw, 52px);
  line-height: 1;
  white-space: nowrap;
}

.worklist-command-bar .row-count {
  margin: 0 0 5px;
  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: 5px;
  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: 14px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(9, 32, 54, 0.08);
}

.worklist-view-tab {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--steel);
  padding: 0 13px;
  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: 44px;
  padding: 0 16px;
  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);
}

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

  .worklist-command-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

.planner-completed-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 {
  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 {
  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 {
  border-color: rgba(209, 170, 71, 0.8);
  background: var(--gold);
}

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

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

.sheet-card {
  grid-column: 2;
  margin: 0 28px 34px;
  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 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: 2030px;
}

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

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

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

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

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

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

.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;
}

.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;
}

#work-table th:nth-child(6),
#work-table td:nth-child(6) {
  width: 420px;
}

#work-table th:nth-child(7),
#work-table td:nth-child(7) {
  width: 300px;
}

#work-table th:nth-child(8),
#work-table td:nth-child(8) {
  width: 190px;
}

#work-table th:nth-child(9),
#work-table td:nth-child(9) {
  width: 180px;
}

#work-table th:nth-child(10),
#work-table td:nth-child(10),
#work-table th:nth-child(11),
#work-table td:nth-child(11) {
  width: 132px;
}

#work-table th:nth-child(12),
#work-table td:nth-child(12),
#work-table th:nth-child(15),
#work-table td:nth-child(15),
#work-table th:nth-child(18),
#work-table td:nth-child(18) {
  width: 165px;
}

#work-table th:nth-child(13),
#work-table td:nth-child(13),
#work-table th:nth-child(16),
#work-table td:nth-child(16),
#work-table th:nth-child(19),
#work-table td:nth-child(19) {
  width: 108px;
}

#work-table th:nth-child(14),
#work-table td:nth-child(14),
#work-table th:nth-child(17),
#work-table td:nth-child(17),
#work-table th:nth-child(20),
#work-table td:nth-child(20) {
  width: 150px;
}

.worklist-table th:nth-child(1),
.worklist-table td:nth-child(1),
.worklist-table th:nth-child(2),
.worklist-table td:nth-child(2),
.worklist-table th:nth-child(3),
.worklist-table td:nth-child(3),
.worklist-table th:nth-child(4),
.worklist-table td:nth-child(4) {
  display: none;
}

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

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

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

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

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

.worklist-table th:nth-child(10),
.worklist-table td:nth-child(10) {
  width: 250px;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -18px 0 24px rgba(9, 32, 54, 0.08);
}

.worklist-table th:nth-child(10) {
  z-index: 4;
  background: #f2f5f7;
}

.worklist-table tbody tr:nth-child(even) td:nth-child(10) {
  background: #fbfaf7;
}

.worklist-table tbody tr:hover td:nth-child(10) {
  background: var(--gold-soft);
}

.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] {
  display: none;
}

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

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

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

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

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

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

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

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

.inventory-table th:nth-child(9),
.inventory-table td:nth-child(9),
.inventory-table th:nth-child(10),
.inventory-table td:nth-child(10) {
  width: 200px;
}

.inventory-table th:nth-child(11),
.inventory-table td:nth-child(11),
.inventory-table th:nth-child(12),
.inventory-table td:nth-child(12) {
  width: 190px;
}

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

.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: 130px;
}

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

.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 .status-pill {
  white-space: nowrap;
}

.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-medical-wide {
  grid-column: 1 / -1;
}

.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,
.ism-med-kit-card {
  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,
.ism-med-kit-heading 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;
}

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

.ism-panel-heading h3,
.ism-selected-panel h3,
.ism-med-kit-card h4 {
  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: 14px;
  border: 1px solid rgba(8, 34, 54, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.ism-crew-selector legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  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-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-queue-row,
.ism-med-line {
  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-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 {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.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,
.ism-med-line: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,
.ism-med-line span {
  font-weight: 950;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.ism-queue-row small,
.ism-med-line 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;
}

.ism-medical-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.7fr);
  gap: 18px;
}

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

.ism-med-kit-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}

.ism-med-kit-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ism-med-kit-card h4 {
  font-size: 20px;
}

.ism-med-kit-lines {
  display: grid;
  gap: 7px;
}

.ism-med-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto) minmax(72px, auto);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  overflow: hidden;
}

.ism-med-line strong {
  overflow-wrap: anywhere;
}

.ism-med-line > * {
  min-width: 0;
  white-space: normal;
}

.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-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-edit-grid input[list],
.accounting-edit-grid select {
  background: #fff;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.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-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;
  gap: 12px;
  min-width: 0;
}

.planner-control-row--bottom {
  align-items: center;
}

.planner-control-row .primary-button {
  min-height: 46px;
  padding: 0 22px;
  white-space: nowrap;
}

.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: 0;
}

.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;
}

.due-date-control.is-empty input[type="date"]::-webkit-datetime-edit {
  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: 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,
.planner-category-controls {
  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;
}

.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-category-controls {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  box-shadow: 0 1px 0 rgba(9, 32, 54, 0.04);
}

.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-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-count {
  flex: 0 0 auto;
  white-space: nowrap;
}

.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;
  flex-wrap: wrap;
}

.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;
  overflow-x: auto;
  white-space: nowrap;
}

.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;
}

.planner-calendar {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.planner-calendar--week {
  grid-template-columns: repeat(7, minmax(168px, 1fr));
  overflow-x: auto;
}

.planner-calendar--month {
  grid-template-columns: repeat(7, minmax(132px, 1fr));
}

.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;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.planner-day-heading span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-day-heading strong {
  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 {
  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-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 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--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--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--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);
}

.systems-equipment-card {
  overflow: visible;
}

.systems-equipment-board {
  display: grid;
  gap: 18px;
  padding: 0 22px 28px;
}

.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;
}

.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-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;
}

.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;
}

.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-action-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.table-action-button--danger {
  border: 1px solid rgba(155, 58, 52, 0.28);
  background: rgba(155, 58, 52, 0.09);
  color: var(--red);
}

.table-action-button--secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.worklist-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.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;
}

.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;
}

.record-meta-strip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.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;
}

.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 {
  min-width: 118px;
  padding: 0 34px 0 10px;
  background-position:
    calc(100% - 19px) 14px,
    calc(100% - 12px) 14px;
}

.record-meta-value .status-menu__summary {
  min-width: 136px;
  padding: 0 10px;
}

.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;
}

.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,
.quote-file-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.permissions-modal[hidden],
.work-history-modal[hidden],
.quote-file-modal[hidden] {
  display: none;
}

.permissions-panel,
.work-history-panel,
.quote-file-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);
}

.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;
}

.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;
}

.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;
}

.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="crm"] .detail-body,
.drawer[data-detail-type="crew"] .detail-body {
  width: min(calc(100% - 48px), 1480px);
  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 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);
}

.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-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-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.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;
}

.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;
  justify-content: flex-end;
  gap: 8px;
}

.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%;
  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;
}

.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: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.history-entry__top > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.history-entry__top strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.history-entry__top small {
  color: var(--steel);
  font-weight: 900;
}

.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;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.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) minmax(360px, 1.15fr);
}

.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-equipment-empty {
  margin: 4px;
}

.technical-equipment-add-button {
  min-height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}

.job-equipment-chip-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
}

.job-equipment-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  max-width: min(100%, 360px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.job-equipment-chip .table-link {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.job-equipment-chip small {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  overflow-wrap: anywhere;
}

.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;
}

.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-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,
.core-overview-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,
.core-overview-label 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;
}

.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;
}

.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: 2100px;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.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 {
  width: 36px;
  background: #d9d9d9;
  color: #000;
  font-weight: 700;
}

.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 .hour-col {
  border-left: 1px solid #000;
}

.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-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-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;
}

.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-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;
}

.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: 1280px) {
  .topbar {
    align-items: flex-start;
  }

  .user-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .toolbar {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(180px, 1fr));
  }

  .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: 22px 24px 18px;
    max-width: calc(100vw - 48px);
    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));
  }

  .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));
  }

  .ism-overview-grid,
  .ism-medical-layout,
  .ism-simple-grid,
  .ism-equipment-grid {
    grid-template-columns: 1fr;
  }

  .ism-metric-grid,
  .ism-medical-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;
  }

  .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-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,
  .app-shell {
    width: min(100% - 18px, 1480px);
    margin: 9px auto;
  }

  .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: contents;
  }

  .nav-group summary {
    display: none;
  }

  .nav-subsections {
    display: contents;
  }

  .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;
  }

  .toolbar,
  .sheet-card {
    margin-left: 14px;
    margin-right: 14px;
  }

  .worklist-heading {
    padding: 14px;
  }

  .worklist-command-bar {
    grid-template-columns: 1fr;
    border-radius: 22px;
    gap: 14px;
    padding: 16px;
  }

  .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-medical-grid,
  .ism-simple-grid,
  .ism-equipment-grid,
  .ism-create-form-grid,
  .crew-status-panel,
  .crew-rest-entry,
  .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;
  }

  .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,
  .ism-med-kit-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ism-source-banner .ghost-button {
    margin-left: 0;
  }

  .ism-queue-row,
  .ism-med-line,
  .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-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 1 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .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,
  .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;
  }
}

/* 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) minmax(320px, 540px) 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;
}

.files-commandbar__search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  border: 1px solid rgba(9, 32, 54, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(8, 34, 54, 0.06);
  color: var(--steel);
  padding: 0 14px;
}

.files-commandbar__search input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  padding: 0;
}

.files-commandbar__search input:focus {
  box-shadow: none;
}

.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--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;
}

.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: 22px !important;
  min-height: 640px;
  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: 34px 26px !important;
}

.files-board .file-inspector::before {
  content: "Inspector";
  display: block;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.files-board .file-inspector__header {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.files-board .file-inspector__preview {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 62px;
  border-radius: 9px;
  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: 10px;
  top: -8px;
  width: 30px;
  height: 14px;
  border-radius: 7px 7px 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: 18px !important;
  font-weight: 950;
  letter-spacing: 0 !important;
  line-height: 1.12 !important;
}

.files-board .file-inspector__header p {
  margin-top: 6px;
  color: var(--steel);
  font-size: 13px !important;
  font-weight: 700;
}

.files-board .file-inspector__stats {
  border-top: 1px solid rgba(9, 32, 54, 0.1) !important;
}

.files-board .file-inspector__stats div {
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 16px !important;
  border-bottom: 1px solid rgba(9, 32, 54, 0.08) !important;
  padding: 12px 0 !important;
}

.files-board .file-inspector__stats dt {
  color: var(--steel);
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.files-board .file-inspector__stats dd {
  color: var(--ink);
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.35;
}

.files-board .file-inspector__actions {
  display: grid !important;
  gap: 0 !important;
  border-top: 1px solid rgba(9, 32, 54, 0.1);
  padding-top: 18px;
}

.files-board .file-inspector__actions::before {
  content: "Actions";
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.files-board .file-inspector__actions .primary-button,
.files-board .file-inspector__actions .ghost-button,
.files-board .file-inspector__actions .danger-button {
  justify-content: flex-start;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  padding: 0 !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;
  }

  .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;
  }

  .files-board .file-inspector {
    padding: 24px 18px !important;
  }

  .files-board .file-inspector__header {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .files-board .file-inspector__preview {
    width: 62px;
    height: 50px;
  }

  .files-board .file-inspector__stats div {
    grid-template-columns: 104px minmax(0, 1fr) !important;
  }
}

/* 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 and on one row where possible. */
.atlas-plan-actions {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: min(100%, 560px) !important;
}

.atlas-legend {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.atlas-legend span {
  flex: 0 0 auto !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

.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;
  }
}
