.topnav {
  height: 60px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-petroleum-50);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-petroleum-700);
  text-decoration: none;
}

.brand-mark {
  height: 20px;
  width: 40px;
}

.brand-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.topnav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav-actions .user {
  font-size: 14px;
  color: var(--color-charcoal-600);
  margin-right: 8px;
}

.nav-link,
.topnav-actions a,
.topnav-actions button {
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-charcoal-600);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--motion-duration-fast) var(--motion-ease-out);
}

.nav-link:hover,
.topnav-actions a:hover,
.topnav-actions button:hover {
  background: var(--color-mist-50);
  color: var(--color-petroleum-700);
}

.nav-link.active {
  background: var(--color-petroleum-50);
  color: var(--color-petroleum-700);
}

.page {
  padding: 32px 24px 64px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  color: var(--color-petroleum-700);
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 16px;
  color: var(--color-petroleum-700);
}

h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--color-petroleum-700);
}

.subnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-charcoal-500);
}

.project-status {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-charcoal-500);
}

.project-status .mono {
  color: var(--color-charcoal-700);
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-petroleum-50);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.card .card {
  padding: 16px;
  margin-bottom: 16px;
}

.card .card:last-child {
  margin-bottom: 0;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card > h2 {
  padding: 20px 24px 0;
}

.table-card > p.muted {
  padding: 0 24px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: var(--color-petroleum-50);
  color: var(--color-petroleum-700);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-align: left;
  padding: 12px;
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-top: 1px solid var(--color-petroleum-50);
  vertical-align: top;
}

.table tbody tr:hover td {
  background: var(--color-mist-25);
}

.table .num,
.mono {
  font-family: 'IBM Plex Mono', monospace;
}

.table td.center,
.table th.center {
  text-align: center;
}

.table-inline {
  border-collapse: collapse;
  font-size: 14px;
}

.table-inline td {
  padding: 2px 8px 2px 0;
  vertical-align: top;
}

.table-inline td:first-child {
  color: var(--color-charcoal-500);
  white-space: nowrap;
}

.table .table-inline td {
  border-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  width: fit-content;
  text-decoration: none;
  transition: background var(--motion-duration-fast) var(--motion-ease-out), border-color var(--motion-duration-fast) var(--motion-ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-petroleum-700);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-petroleum-800);
}

.btn-secondary {
  background: var(--color-white);
  border-color: var(--color-petroleum-100);
  color: var(--color-charcoal-700);
}

.btn-secondary:hover {
  border-color: var(--color-petroleum-300);
  color: var(--color-petroleum-700);
}

.btn-ghost {
  background: transparent;
  color: var(--color-charcoal-500);
}

.btn-ghost:hover {
  background: var(--color-mist-50);
  color: var(--color-petroleum-700);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: 6px;
  color: var(--color-charcoal-400);
  background: transparent;
  border: 0;
  cursor: pointer;
  vertical-align: middle;
}

.inline-form {
  display: inline-block;
  vertical-align: middle;
}

.btn-icon:hover {
  color: var(--color-petroleum-700);
  background: var(--color-mist-50);
}

.btn-icon.danger:hover {
  color: var(--color-burntorange-600);
  background: var(--color-burntorange-50);
}

.btn-icon .material-symbols-rounded {
  font-size: 18px;
}

.btn:disabled,
.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-charcoal-700);
}

.input,
.select,
textarea.input {
  height: 36px;
  border: 1px solid var(--color-petroleum-100);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-charcoal-800);
  background: var(--color-white);
}

textarea.input {
  height: auto;
  padding: 8px 12px;
  line-height: 1.5;
}

.input::placeholder {
  color: var(--color-petroleum-400);
}

.input:focus,
.select:focus,
textarea.input:focus {
  border-color: var(--color-petroleum-700);
}

.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' width='18' height='18' fill='%23676C70'><path d='M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.select.sm,
.input.sm {
  height: 28px;
  font-size: 12px;
  padding: 0 8px;
}

.select.sm {
  padding-right: 24px;
  background-size: 16px;
  background-position: right 4px center;
}

.checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
  border: 1px solid var(--color-petroleum-100);
  border-radius: 4px;
  background: var(--color-white) center / 18px no-repeat;
  cursor: pointer;
  transition: border-color var(--motion-duration-fast) var(--motion-ease-out), background-color var(--motion-duration-fast) var(--motion-ease-out);
}

.checkbox:hover {
  border-color: var(--color-petroleum-300);
}

.checkbox:checked {
  border-color: var(--color-petroleum-500);
  background-color: var(--color-petroleum-500);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%23FFFFFF'><path d='m382-354 339-339q12-12 28-12t28 12q12 12 12 28t-12 28L410-270q-12 12-28 12t-28-12L198-426q-12-12-12-28t12-28q12-12 28-12t28 12l128 128Z'/></svg>");
}

.checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar .input {
  width: 260px;
}

.text-link {
  color: var(--color-petroleum-700);
  text-decoration: none;
}

.text-link:hover {
  color: var(--color-aqua-700);
  text-decoration: underline;
  text-decoration-color: var(--color-aqua-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-danger {
  color: var(--color-burntorange-600);
  font-weight: 500;
}

.text-success {
  color: var(--color-seagreen-500);
  font-weight: 500;
}

.muted {
  color: var(--color-charcoal-500);
}

.small {
  font-size: 12px;
}

.sticky-row td {
  background: var(--color-sunset-50);
}

.not-own td,
.template-row td {
  background: var(--color-mist-25);
}

.hide-shared .not-own,
.hide-comments .comment-row {
  display: none;
}

.comment-text {
  max-height: 1.5em;
  overflow: hidden;
}

.comment-text.show {
  max-height: none;
}

.sharing-info {
  color: var(--color-seagreen-500);
  font-size: 12px;
  margin-top: 4px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px;
  font-size: 12px;
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--color-charcoal-500);
}

.footer-links {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-top: 16px;
}

.messages {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-input {
  font-size: 13px;
  color: var(--color-charcoal-700);
  max-width: 280px;
}

.login-page {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 16px;
  text-align: center;
}

.login-title {
  font-size: 24px;
  margin-bottom: 24px;
}

.login-card {
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-error {
  margin: 16px 0 0;
}

.alert {
  color: var(--color-burntorange-600);
  font-weight: 500;
}

.red {
  color: var(--color-burntorange-600);
  font-weight: 500;
}

.green {
  color: var(--color-seagreen-500);
  font-weight: 500;
}

.hoverinfo {
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.missing {
  color: var(--color-burntorange-600);
  font-weight: 500;
  cursor: help;
}

.infobutton {
  color: var(--color-charcoal-400);
  font-size: 16px;
  vertical-align: middle;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.infobutton:hover {
  color: var(--color-petroleum-700);
}

.vessel-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(200px, 1fr) minmax(200px, 1fr);
  gap: 24px 32px;
}

.vessel-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field.half .input {
  max-width: 220px;
}

.status-wrap {
  max-width: 260px;
  margin-bottom: 16px;
}

.table.dense th,
.table.dense td {
  padding: 8px;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: middle;
}

.table.dense .rowlabel {
  font-weight: 500;
  color: var(--color-petroleum-700);
}

.table.dense .percent {
  width: 48px;
}

.table.dense .num4 {
  width: 56px;
}

.table.dense .num5 {
  width: 64px;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stepper .btn-icon {
  width: 24px;
  height: 18px;
}

.calculated_thruster_data {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--color-charcoal-700);
}

.stab-row,
.loads-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.loads-row .field {
  min-width: 260px;
}

.consumer-table .field {
  min-width: 0;
}

.version {
  text-align: center;
  margin-top: 24px;
}

.center {
  text-align: center;
}

select option.select_red {
  color: var(--color-burntorange-600);
}

select option.select_green,
select option.opt-green {
  color: var(--color-seagreen-500);
}

select option.opt-red {
  color: var(--color-burntorange-600);
}

select.is-red {
  color: var(--color-burntorange-600);
}

.result-table th:first-child,
.result-table td:first-child {
  font-weight: 500;
  color: var(--color-petroleum-700);
}

.result-table td {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

.table_border_top td {
  border-top: 2px solid var(--color-petroleum-100);
}

.cooling-grid {
  display: grid;
  grid-template-columns: 240px 220px 160px 60px;
  gap: 12px 16px;
  align-items: center;
}

@media (max-width: 900px) {
  .vessel-grid,
  .cooling-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topnav,
  .subnav,
  .banner,
  .stepper,
  .infobutton {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .topnav-actions a,
  .topnav-actions button,
  .btn,
  .checkbox {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}

@media (max-width: 600px) {
  .topnav {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 16px;
  }

  .topnav-actions {
    flex-wrap: wrap;
  }

  .page {
    padding: 24px 16px 48px;
  }

  .toolbar .input {
    width: 100%;
  }
}

.customer-line {
  font-size: 16px;
  margin: 0 0 16px;
}

.customer-line .spaced {
  margin-left: 24px;
}

.input.wide {
  width: 100%;
}

textarea.changed,
.input.changed {
  background: var(--color-burntorange-50);
  border-color: var(--color-burntorange-400);
}

.override-grid td.editable {
  min-width: 140px;
}

.override-grid .calced {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 4px;
}

.override-grid .infoleft {
  float: left;
  font-size: 11px;
  line-height: 21px;
  color: var(--color-charcoal-500);
  margin-right: 4px;
}

.override-grid input.override {
  width: 100px;
}

.spec-links {
  font-size: 16px;
  margin: 24px 0;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.radio input {
  margin: 0;
  accent-color: var(--color-petroleum-500);
}

.check-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.manual-form .field {
  margin-bottom: 16px;
}

.pvg-picker {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pvg-picker .pvg-list {
  height: auto;
  min-height: 300px;
  width: 260px;
  padding: 4px;
  background-image: none;
}

.pvg-picker-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
}

.pvg-actions {
  margin-top: 16px;
  justify-content: center;
}

.percent_bar {
  color: var(--color-white);
  padding: 5px;
  border-radius: 5px;
  white-space: nowrap;
}

.percent_bar.match {
  background: var(--color-petroleum-700);
}

.percent_bar.mismatch {
  background: var(--color-burntorange-600);
}

.pvg-ranking {
  margin-top: 20px;
}

.pvg-ranking .use-col {
  width: 25px;
}

.pvg-ranking .score-col {
  width: 500px;
}

.banner {
  padding: 10px 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--color-aqua-100);
  background: var(--color-aqua-25);
  color: var(--color-aqua-800);
}

.banner-error {
  border-bottom-color: var(--color-burntorange-100);
  background: var(--color-burntorange-25);
  color: var(--color-burntorange-800);
}

.alert-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--color-burntorange-100);
  border-radius: 8px;
  background: var(--color-burntorange-25);
  color: var(--color-burntorange-700);
  font-size: 14px;
  line-height: 1.4;
}

.alert-inline .material-symbols-rounded {
  font-size: 18px;
  color: var(--color-burntorange-500);
}

.form-card {
  max-width: 520px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.check-field .label {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-charcoal-800);
}

.required {
  color: var(--color-burntorange-500);
}

.field-error {
  margin: 0;
  font-size: 12px;
  color: var(--color-burntorange-600);
}

.help {
  margin: 0;
  font-size: 12px;
  color: var(--color-charcoal-500);
}

.help ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.user-layout {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(280px, 400px);
  gap: 24px;
  align-items: start;
}

.reset-link {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-petroleum-50);
  border-radius: 6px;
  background: var(--color-petroleum-25);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  word-break: break-all;
  user-select: all;
}

.table tr.inactive td {
  color: var(--color-charcoal-400);
}

@media (max-width: 900px) {
  .form-grid,
  .user-layout {
    grid-template-columns: 1fr;
  }
}

.login-help {
  margin: 16px 0 0;
}
