:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --line: #d7ded8;
  --line-strong: #b8c3bc;
  --text: #172125;
  --muted: #5c686c;
  --green: #1f6f5b;
  --green-2: #e2f1eb;
  --amber: #a86712;
  --amber-2: #fff1d6;
  --red: #a33b35;
  --red-2: #fae5e3;
  --blue: #2f6690;
  --blue-2: #e5eff6;
  --navigation-blue: #294c73;
  --navigation-blue-light: #b8cce3;
  --navigation-blue-soft: #e8eef5;
  --home-bar-surface: color-mix(in srgb, var(--navigation-blue-soft) 78%, transparent);
  --table-hover-surface: color-mix(in srgb, var(--navigation-blue-soft) 48%, transparent);
  --table-active-surface: var(--home-bar-surface);
  --shadow: 0 12px 32px rgba(31, 45, 39, 0.08);

  /* UX foundation: shared spacing and typography. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --font-size-body: 14px;
  --font-size-help: 12px;
  --font-size-page-title: 18px;
  --font-size-section-title: 15px;
  --font-size-subsection-title: 13px;
  --line-height-body: 1.45;
  --line-height-heading: 1.2;

  /* UX foundation: controls, panels and dialogs. */
  --control-height-compact: 32px;
  --control-height: 38px;
  --control-height-touch: 44px;
  --radius-small: 4px;
  --radius-control: 6px;
  --radius-panel: 8px;
  --radius-pill: 999px;
  --dialog-width-small: 560px;
  --dialog-width-medium: 720px;
  --dialog-width-large: 900px;
  --dialog-width-xlarge: 1060px;
  --dialog-viewport-gap: 20px;
  --content-max-width: 1800px;
  --page-padding: 18px;

  /* UX foundation: focus and documented layer hierarchy. */
  --focus-ring-color: color-mix(in srgb, var(--navigation-blue) 72%, white);
  --focus-ring-width: 3px;
  --z-content: 1;
  --z-navigation: 30;
  --z-menu: 80;
  --z-dialog-base: 1200;
  --z-dialog: 1230;
  --z-dialog-raised: 1250;
  --z-notification: 1300;
  --z-update: 1400;
  --z-popover: 1600;
  --z-tooltip: 2200;

  /* Documentation tokens; media queries use the same literal values below. */
  --breakpoint-mobile: 600px;
  --breakpoint-compact: 900px;
  --navigation-shell-height: 150px;
  --table-max-height: max(260px, calc(100vh - 320px));
  --primary-table-max-height: max(260px, calc(100vh - 260px));
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Arbejdstidsregistrering */
.work-time-main-header {
  align-items: stretch;
  flex-direction: column;
  gap: var(--space-3);
}

.work-time-main-header h2,
.work-time-main-header p,
.work-time-employer-heading h2,
.work-time-employer-heading p,
.work-time-period-header h3,
.work-time-period-header p {
  margin: 0;
}

.work-time-employer-area {
  padding-top: var(--space-3);
  border-top: 2px solid var(--line);
}

.work-time-employer-heading {
  display: grid;
  gap: var(--space-1);
}

.work-time-view-switcher {
  align-self: flex-start;
  flex-wrap: nowrap;
}

.work-time-view-switcher button {
  min-height: var(--control-height);
  white-space: nowrap;
}

.work-time-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 1fr) minmax(180px, auto);
  gap: var(--space-3);
  align-items: end;
}

.work-time-month-control {
  display: grid;
  grid-template-columns: 44px minmax(150px, 1fr) 44px;
  gap: var(--space-1);
}

.work-time-month-control .icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--navigation-blue);
  font-size: 25px;
  line-height: 1;
}

.work-time-toolbar-status {
  display: grid;
  min-height: 44px;
  align-content: center;
  gap: 2px;
}

.work-time-toolbar-status span {
  color: var(--muted);
  font-size: var(--font-size-help);
}

.work-time-toolbar-status strong {
  text-transform: capitalize;
}

.work-time-agreement-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.input-with-unit:focus-within {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.input-with-unit input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
}

.input-with-unit > span {
  padding: 0 var(--space-2);
  color: var(--muted);
  font-size: var(--font-size-help);
}

.work-time-agreement-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.work-time-norm-schedule {
  display: grid;
  min-inline-size: 0;
  grid-column: 1 / -1;
  gap: var(--space-3);
  margin: var(--space-2) 0 0;
  padding: var(--space-4) 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.work-time-norm-schedule legend {
  padding: 0 var(--space-2) 0 0;
  font-weight: 700;
}

.work-time-norm-builder {
  display: grid;
  grid-template-columns: minmax(105px, 0.75fr) 132px 132px minmax(340px, 2fr) 110px auto;
  align-items: end;
  gap: var(--space-2);
}

.work-time-norm-weekdays .weekday-row {
  display: grid;
  grid-template-columns: repeat(7, max-content);
  min-height: var(--control-height);
  gap: var(--space-2);
  align-items: center;
}

.work-time-norm-add {
  min-height: var(--control-height);
  white-space: nowrap;
}

.work-time-norm-list-header,
.work-time-norm-rule {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(205px, 1.25fr) minmax(145px, 1fr) minmax(105px, 0.6fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.work-time-norm-list-header {
  padding: 0 var(--space-2);
  color: var(--muted);
  font-size: var(--font-size-help);
  font-weight: 700;
}

.work-time-norm-list {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--line);
}

.work-time-norm-rule {
  min-height: 48px;
  padding: var(--space-2);
}

.work-time-norm-rule + .work-time-norm-rule {
  border-top: 1px solid var(--line);
}

.work-time-norm-rule button {
  min-height: 40px;
}

.work-time-norm-empty {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.work-time-norm-total {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.work-time-employee-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: end;
}

.work-time-employee-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.work-time-period-header {
  align-items: flex-start;
  gap: var(--space-3);
}

.work-time-period-navigation {
  display: grid;
  grid-template-columns: 44px auto 44px;
  align-items: center;
  gap: var(--space-2);
}

.work-time-period-navigation h3 {
  min-width: 150px;
  text-align: center;
  text-transform: capitalize;
}

.work-time-period-navigation .icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.work-time-period-header h3,
.work-time-summary-table th:first-child {
  text-transform: capitalize;
}

.work-time-approval-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.work-time-approval-status small {
  color: var(--muted);
}

.work-time-table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.work-time-table-wrap:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.work-time-month-table {
  --work-time-week-gap: 8px;
  width: max-content;
  min-width: calc(190px + var(--work-time-day-count) * 68px + var(--work-time-week-gap-count) * var(--work-time-week-gap) + 78px);
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.work-time-month-table th,
.work-time-month-table td {
  height: 54px;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}

.work-time-month-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised, #fff);
}

.work-time-month-table .work-time-week-row th {
  height: 50px;
  padding-block: 5px;
}

.work-time-month-table .work-time-week-column {
  border: 1px solid rgba(121, 141, 153, 0.42);
  border-radius: 6px 6px 0 0;
  background: rgba(219, 235, 247, 0.72);
  color: var(--navigation-blue);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.work-time-month-table .work-time-week-column span,
.work-time-month-table .work-time-week-column small {
  display: block;
}

.work-time-month-table .work-time-week-column small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.work-time-month-table .work-time-date-row th {
  top: 50px;
}

.work-time-month-table .work-time-week-gap {
  width: var(--work-time-week-gap);
  min-width: var(--work-time-week-gap);
  max-width: var(--work-time-week-gap);
  padding: 0;
  border: 0;
  background: var(--surface-raised, #fff) !important;
}

.work-time-month-table .is-week-first {
  border-left: 1px solid rgba(121, 141, 153, 0.42);
}

.work-time-month-table .is-week-last {
  border-right: 1px solid rgba(121, 141, 153, 0.42);
}

.work-time-month-table tfoot tr:last-child .is-week-first {
  border-radius: 0 0 0 6px;
}

.work-time-month-table tfoot tr:last-child .is-week-last {
  border-radius: 0 0 6px 0;
}

.work-time-month-table .work-time-product-column {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  padding-inline: 12px;
  background: var(--surface-raised, #fff);
  text-align: left;
}

.work-time-month-table thead .work-time-product-column {
  z-index: 4;
}

.work-time-product-column span,
.work-time-day-column strong,
.work-time-day-column small {
  display: block;
}

.work-time-day-column small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.work-time-day-column {
  width: 68px;
  min-width: 68px;
}

.work-time-total-column,
.work-time-total-cell {
  width: 78px;
  min-width: 78px;
  font-weight: 700;
}

.work-time-month-table td.is-weekend,
.work-time-month-table th.is-weekend {
  background: color-mix(in srgb, var(--blue-2) 58%, var(--surface));
}

.work-time-month-table input {
  width: 56px;
  min-width: 56px;
  min-height: 40px;
  padding: 6px 4px;
  appearance: textfield;
  -moz-appearance: textfield;
  text-align: center;
}

.work-time-month-table input[type="number"]::-webkit-inner-spin-button,
.work-time-month-table input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.work-time-month-table input:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
}

.work-time-month-table .work-time-vacation-cell label {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
}

.work-time-month-table .work-time-vacation-cell input {
  position: absolute;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
}

.work-time-month-table .work-time-vacation-cell span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: transparent;
  font-weight: 700;
}

.work-time-month-table .work-time-vacation-cell input:checked + span {
  border-color: var(--navigation-blue);
  background: var(--navigation-blue);
  color: #fff;
}

.work-time-month-table .work-time-vacation-cell input:focus-visible + span {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.work-time-month-table .work-time-vacation-cell input:disabled + span {
  cursor: default;
  opacity: 0.75;
}

.work-time-month-table tfoot th,
.work-time-month-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface-raised, #fff);
  font-weight: 700;
}

.work-time-month-table tfoot .work-time-daily-total-row th,
.work-time-month-table tfoot .work-time-daily-total-row td {
  bottom: 162px;
}

.work-time-month-table .work-time-daily-norm-row th,
.work-time-month-table .work-time-daily-norm-row td {
  background: color-mix(in srgb, var(--blue-2) 42%, var(--surface-raised, #fff));
}

.work-time-month-table tfoot .work-time-daily-norm-row th,
.work-time-month-table tfoot .work-time-daily-norm-row td {
  bottom: 108px;
}

.work-time-month-table tfoot .work-time-weekly-total-row th,
.work-time-month-table tfoot .work-time-weekly-total-row td {
  bottom: 54px;
  border-top: 2px solid color-mix(in srgb, var(--navigation-blue) 34%, var(--line));
}

.work-time-month-table .work-time-weekly-norm-row th,
.work-time-month-table .work-time-weekly-norm-row td {
  background: color-mix(in srgb, var(--blue-2) 58%, var(--surface-raised, #fff));
}

.work-time-month-table .work-time-week-summary-cell {
  text-align: center;
}

.work-time-month-table tfoot .work-time-product-column {
  z-index: 4;
}

.work-time-note textarea {
  width: 100%;
  resize: vertical;
}

.work-time-month-summary-panel .work-time-note {
  padding: var(--space-3);
  border-top: 1px solid var(--line);
}

.work-time-month-summary-panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.work-time-month-summary-panel > summary {
  display: grid;
  min-height: var(--control-height-touch);
  padding: var(--space-2) var(--space-3);
  grid-template-columns: 20px auto auto minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  list-style: none;
}

.work-time-month-summary-panel > summary::-webkit-details-marker {
  display: none;
}

.work-time-month-summary-panel > summary::before {
  content: "›";
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transform-origin: center;
}

.work-time-month-summary-panel[open] > summary::before {
  transform: rotate(90deg);
}

.work-time-month-summary-panel > summary > span {
  grid-column: 2;
  grid-row: 1;
  font-weight: 400;
}

.work-time-month-summary-panel > summary > strong {
  grid-column: 3;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.work-time-month-summary-panel > summary:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: -2px;
}

.work-time-month-summary {
  display: grid;
  width: 100%;
  border-top: 1px solid var(--line);
}

.work-time-month-summary-row {
  display: grid;
  min-height: 46px;
  padding: var(--space-2) var(--space-3);
  grid-template-columns: minmax(220px, 280px) auto;
  justify-content: start;
  align-items: center;
  gap: var(--space-4);
}

.work-time-month-summary-row + .work-time-month-summary-row {
  border-top: 1px solid var(--line);
}

.work-time-month-summary-row span {
  font-weight: 400;
}

.work-time-month-summary-row strong {
  text-align: left;
  white-space: nowrap;
}

.work-time-vacation-summary-label {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.work-time-vacation-summary-label small {
  color: var(--muted);
  font-size: 12px;
}

.work-time-month-summary-actions {
  justify-content: flex-end;
  padding: var(--space-3);
  border-top: 1px solid var(--line);
}

.work-time-summary-navigation {
  justify-content: flex-start;
  padding: var(--space-3);
  border-top: 1px solid var(--line);
}

.work-time-month-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.work-time-month-total {
  display: grid;
  gap: 2px;
}

.work-time-month-total span {
  color: var(--muted);
  font-size: var(--font-size-help);
}

.work-time-month-total strong {
  font-size: 20px;
}

.work-time-summary-table {
  min-width: 790px;
}

.work-time-summary-table th:first-child {
  min-width: 145px;
}

.work-time-summary-table td,
.work-time-summary-table th:not(:first-child) {
  text-align: right;
}

.work-time-summary-table td:last-child,
.work-time-summary-table th:last-child {
  text-align: left;
}

.work-time-summary-table tfoot {
  font-weight: 700;
}

.work-time-negative {
  color: var(--red);
}

.work-time-vacation-table {
  min-width: 680px;
}

.work-time-vacation-balance-metric {
  border-color: color-mix(in srgb, var(--navigation-blue) 40%, var(--line));
}

.work-time-holiday-admin {
  padding-top: var(--space-4);
  border-top: 2px solid var(--line);
}

.work-time-holiday-admin > form + form {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .work-time-toolbar {
    grid-template-columns: minmax(190px, 1fr) minmax(240px, 1fr);
  }

  .work-time-toolbar-status {
    grid-column: 1 / -1;
  }

  .work-time-agreement-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-time-norm-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-time-norm-weekdays {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .work-time-main-header,
  .work-time-period-header,
  .work-time-month-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .work-time-view-switcher {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-time-view-switcher button {
    min-width: 0;
    min-height: var(--control-height-touch);
    padding-inline: 6px;
    white-space: normal;
  }

  .work-time-toolbar,
  .work-time-agreement-form,
  .work-time-employee-form,
  .work-time-norm-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-time-norm-weekdays {
    grid-column: auto;
  }

  .work-time-norm-weekdays .weekday-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }

  .work-time-norm-weekdays .weekday-option {
    min-width: 0;
    min-height: var(--control-height-touch);
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 12px;
  }

  .work-time-norm-list-header {
    display: none;
  }

  .work-time-norm-rule {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .work-time-norm-rule span {
    grid-column: 1;
    overflow-wrap: anywhere;
  }

  .work-time-norm-rule span::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: var(--font-size-help);
    font-weight: 700;
  }

  .work-time-norm-rule button {
    min-width: 76px;
    min-height: var(--control-height-touch);
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  .work-time-norm-add {
    width: 100%;
    min-height: var(--control-height-touch);
  }

  .work-time-norm-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-time-toolbar-status,
  .work-time-agreement-actions {
    grid-column: auto;
  }

  .work-time-month-control input,
  .work-time-agreement-form input,
  .work-time-agreement-form select,
  .work-time-note textarea,
  .work-time-toolbar select {
    font-size: 16px;
  }

  .work-time-approval-status {
    justify-items: start;
    text-align: left;
  }

  .work-time-period-navigation {
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .work-time-period-navigation h3 {
    min-width: 0;
  }

  .work-time-month-table {
    min-width: calc(124px + var(--work-time-day-count) * 62px + var(--work-time-week-gap-count) * var(--work-time-week-gap) + 70px);
  }

  .work-time-month-table .work-time-product-column {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    padding-inline: 8px;
    overflow-wrap: anywhere;
  }

  .work-time-day-column {
    width: 62px;
    min-width: 62px;
  }

  .work-time-total-column,
  .work-time-total-cell {
    width: 70px;
    min-width: 70px;
  }

  .work-time-month-table input {
    width: 52px;
    min-width: 52px;
    min-height: 44px;
    font-size: 16px;
  }

  .work-time-month-footer .form-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .work-time-month-footer .form-actions button,
  .work-time-agreement-actions button {
    width: 100%;
    min-height: var(--control-height-touch);
  }

  .work-time-month-summary {
    width: 100%;
  }

  .work-time-month-summary-row {
    min-height: var(--control-height-touch);
    padding-inline: var(--space-2);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
  }

  .work-time-month-summary-actions,
  .work-time-summary-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .work-time-month-summary-actions button,
  .work-time-summary-navigation button {
    width: 100%;
    min-height: var(--control-height-touch);
  }

  .work-time-vacation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-time-holiday-admin .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-time-holiday-admin .span-2 {
    grid-column: auto;
  }
}

/* UX phase 3: shared dialog architecture. */
body.dialog-open {
  overflow: hidden;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  min-width: 0;
  padding: var(--dialog-viewport-gap);
  place-items: center;
  overflow: hidden;
  background: rgba(17, 31, 43, 0.42);
  z-index: var(--z-dialog);
}

.dialog-backdrop--base {
  z-index: var(--z-dialog-base);
}

.dialog-backdrop--raised {
  z-index: var(--z-dialog-raised);
}

.dialog-shell {
  display: grid;
  width: min(100%, var(--dialog-width-medium));
  min-width: 0;
  max-height: calc(100dvh - (2 * var(--dialog-viewport-gap)));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 34, 45, 0.28);
}

.dialog-shell--small {
  width: min(100%, var(--dialog-width-small));
}

.dialog-shell--large {
  width: min(100%, var(--dialog-width-large));
}

.dialog-shell--full {
  width: min(100%, var(--dialog-width-xlarge));
}

.dialog-header {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-heading {
  min-width: 0;
}

.dialog-header-actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
}

.dialog-heading h2,
.dialog-heading p {
  margin: 0;
  overflow-wrap: anywhere;
}

.dialog-heading h2 {
  color: var(--navigation-blue);
  font-size: var(--font-size-page-title);
  line-height: var(--line-height-heading);
}

.dialog-heading p {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: var(--line-height-body);
}

.dialog-close {
  display: inline-grid;
  width: var(--control-height-touch);
  min-width: var(--control-height-touch);
  height: var(--control-height-touch);
  min-height: var(--control-height-touch);
  flex: 0 0 var(--control-height-touch);
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.dialog-body {
  min-width: 0;
  min-height: 0;
  padding: var(--space-5);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dialog-body--flush {
  padding: 0;
}

.dialog-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.dialog-footer:empty {
  display: none;
}

.dialog-shell :is(button, a[href], input, select, textarea, [tabindex]):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .dialog-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .dialog-shell,
  .dialog-shell--small,
  .dialog-shell--medium,
  .dialog-shell--large,
  .dialog-shell--full {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dialog-header {
    min-height: 64px;
    padding: max(var(--space-3), env(safe-area-inset-top)) var(--space-4) var(--space-3);
  }

  .dialog-body {
    padding: var(--space-4);
  }

  .dialog-footer {
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4) max(var(--space-3), env(safe-area-inset-bottom));
  }

  .dialog-footer > *,
  .dialog-footer .activity-calendar-detail-actions {
    min-width: 0;
    max-width: 100%;
  }

  .dialog-shell :is(button, input, select, textarea) {
    min-height: var(--control-height-touch);
  }

  .dialog-shell :is(input, select, textarea) {
    max-width: 100%;
    font-size: 16px;
  }
}

.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4,
.ergometer-booking-dialog h1,
.ergometer-booking-dialog h2,
.ergometer-booking-dialog h3,
.ergometer-booking-dialog h4 {
  color: var(--navigation-blue) !important;
}

/* Varevogn og trailere */
.vehicle-booking-form-body {
  padding: 14px;
}

.vehicle-resource-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.vehicle-resource-picker legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.vehicle-resource-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.vehicle-resource-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.vehicle-resource-option:has(input:checked) {
  border-color: #78a895;
  background: var(--green-2);
}

.vehicle-resource-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.vehicle-booking-form textarea {
  min-height: 58px;
}

.vehicle-booking-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.vehicle-booking-form-footer span {
  color: var(--muted);
  font-size: 12px;
}

.vehicle-calendar-header > div:first-child {
  display: grid;
  gap: 3px;
}

.vehicle-calendar-header > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.vehicle-calendar-mobile-create {
  display: none;
}

.vehicle-calendar-toolbar-extras {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
}

.vehicle-calendar-resource-filter {
  display: grid;
  width: min(100%, 280px);
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.vehicle-calendar-resource-filter select {
  width: 100%;
  min-height: 44px;
}

.vehicle-booking-list {
  max-height: var(--table-max-height);
}

.vehicle-booking-status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf0ee;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.vehicle-booking-status.is-approved {
  background: var(--green-2);
  color: var(--green);
}

.vehicle-booking-status.is-pending {
  background: var(--amber-2);
  color: #7d4b08;
}

.vehicle-booking-status.is-rejected,
.vehicle-booking-status.is-cancelled {
  background: var(--red-2);
  color: var(--red);
}

.vehicle-booking-row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.vehicle-booking-contact {
  display: grid;
  gap: 3px;
  min-width: 180px;
  line-height: 1.35;
}

.vehicle-booking-contact strong {
  color: var(--text);
  font-weight: 600;
}

.vehicle-booking-contact-label {
  color: var(--muted);
  font-size: 11px;
}

.vehicle-calendar-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .vehicle-resource-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-booking-form-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@supports (height: 100dvh) {
  :root {
    --table-max-height: max(260px, calc(100dvh - 320px));
    --primary-table-max-height: max(260px, calc(100dvh - 260px));
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  letter-spacing: 0;
}

#app {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.app-notification {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-notification);
  width: max-content;
  max-width: min(520px, calc(100vw - 24px));
  padding: 11px 15px;
  border: 1px solid #9bc7b6;
  border-radius: var(--radius-panel);
  background: #e2f1eb;
  color: #145343;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 24px rgba(31, 45, 39, 0.16);
  transform: translateX(-50%);
  pointer-events: none;
  animation: app-notification-in 180ms ease-out;
}

.application-update-banner {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-update);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(520px, calc(100vw - 24px));
  padding: 10px 11px 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-panel);
  background: rgba(22, 67, 98, 0.96);
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 43, 59, 0.24);
  transform: translateX(-50%);
  animation: app-notification-in 180ms ease-out;
}

.application-update-banner[hidden] {
  display: none;
}

.application-update-banner span {
  min-width: 0;
}

.application-update-banner button {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.62);
  background: #fff;
  color: #164362;
  font-weight: 700;
}

@keyframes app-notification-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

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

input.plain-number-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

input.plain-number-input::-webkit-inner-spin-button,
input.plain-number-input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

button {
  min-height: var(--control-height);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-control);
  padding: 7px var(--space-3);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

button:not(:disabled):hover {
  border-color: var(--navigation-blue);
}

button:not(:disabled):active {
  box-shadow: inset 0 1px 2px rgba(23, 33, 43, 0.16);
}

.contact-link {
  color: var(--navigation-blue);
  text-decoration: none;
}

.contact-link:hover,
.contact-link:focus-visible {
  text-decoration: underline;
}

button.primary,
button[data-button-variant="primary"] {
  background: var(--navigation-blue);
  border-color: var(--navigation-blue);
  color: white;
}

button.primary:not(:disabled):hover,
button[data-button-variant="primary"]:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--navigation-blue) 82%, black);
  background: color-mix(in srgb, var(--navigation-blue) 88%, black);
}

button.primary.approve {
  background: var(--green);
  border-color: var(--green);
}

button.secondary,
button.edit,
button[data-button-variant="secondary"] {
  background: var(--blue-2);
  border-color: #bad2e3;
  color: var(--blue);
}

button.neutral,
button.subtle,
button[data-button-variant="neutral"] {
  background: transparent;
  border-color: transparent;
}

button.destructive,
button.danger,
button[data-button-variant="destructive"] {
  background: var(--red-2);
  border-color: #dfaaa5;
  color: var(--red);
}

button.secondary:not(:disabled):hover,
button.edit:not(:disabled):hover,
button[data-button-variant="secondary"]:not(:disabled):hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue-2) 80%, white);
}

button.neutral:not(:disabled):hover,
button.subtle:not(:disabled):hover,
button[data-button-variant="neutral"]:not(:disabled):hover {
  border-color: var(--line);
  background: var(--surface-2);
}

button.destructive:not(:disabled):hover,
button.danger:not(:disabled):hover,
button[data-button-variant="destructive"]:not(:disabled):hover {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red-2) 82%, white);
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text);
  padding: 8px 9px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--navigation-blue);
}

input:not(:disabled):hover,
select:not(:disabled):hover,
textarea:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--navigation-blue) 55%, var(--line-strong));
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-2);
}

:is(input, select, textarea)[aria-invalid="true"],
:is(input, select, textarea).is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--red-2) 84%, transparent);
}

.field-error,
.form-error,
[data-field-error] {
  color: var(--red);
  font-size: var(--font-size-help);
}

:where(
  button,
  a[href],
  input,
  select,
  textarea,
  [role="button"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f0;
}

.auth-panel {
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel-registration {
  width: min(100%, 680px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--navigation-blue);
  color: #fff;
}

.auth-brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 15px;
}

.auth-brand span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.auth-form h1 {
  margin: 0;
  font-size: 22px;
}

.auth-form p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form .auth-remember-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: fit-content;
  cursor: pointer;
}

.auth-remember-choice input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
}

.auth-registration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-registration-grid > label {
  min-width: 0;
}

.auth-registration-grid > .span-2 {
  grid-column: 1 / -1;
}

.auth-form .auth-privacy-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  line-height: 1.4;
}

.auth-privacy-choice input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
}

.registration-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-registration-success {
  min-height: 250px;
  align-content: center;
}

.auth-submit {
  width: 100%;
  min-height: 42px;
}

.auth-error {
  border: 1px solid #dfaaa5;
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--red-2);
  color: var(--red);
}

.auth-loading {
  padding: 30px 22px;
  color: var(--muted);
  text-align: center;
}

.field-help {
  color: var(--muted);
  font-size: var(--font-size-help);
}

.app-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: block;
}

.app-navigation-shell {
  position: sticky;
  top: 0;
  z-index: var(--z-navigation);
}

.app-header {
  min-height: 72px;
  background: var(--navigation-blue);
  color: white;
  padding: 9px 16px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(20, 31, 28, 0.18);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.1);
}

.brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  object-fit: cover;
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin-top: 2px;
}

.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
}

.nav-website-link {
  min-height: var(--control-height-touch);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-control);
  padding: 10px 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-website-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-website-link:hover,
.nav-website-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-logout-button {
  min-height: var(--control-height-touch);
  border: 0;
  border-radius: var(--radius-control);
  padding: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.nav-logout-button:hover,
.nav-logout-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-group {
  position: relative;
}

.nav-group-button {
  min-height: var(--control-height-touch);
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: center;
  padding: 10px 24px 10px 10px;
  border-radius: var(--radius-control);
  white-space: nowrap;
  position: relative;
}

.nav-group-button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 140ms ease;
}

.nav-group.open .nav-group-button::after {
  transform: translateY(-25%) rotate(225deg);
}

.nav-group.active > .nav-group-button,
.nav-group.open > .nav-group-button,
.nav-group-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-group.active > .nav-group-button {
  box-shadow: inset 0 -2px 0 var(--navigation-blue-light);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 230px;
  max-width: 310px;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #ccd6d0;
  border-radius: var(--radius-control);
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 31, 28, 0.2);
}

.nav-group:nth-last-child(-n + 2) .nav-dropdown {
  right: 0;
  left: auto;
}

.nav-group.open .nav-dropdown {
  display: grid;
  gap: 2px;
}

.nav-group[data-nav-group="administration"] .nav-dropdown {
  right: 0;
  left: auto;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  width: min(620px, calc(100vw - 24px));
  max-width: 620px;
}

.nav-dropdown button,
.nav-dropdown a {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 0;
  min-height: var(--control-height-touch);
  border-radius: var(--radius-small);
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  text-align: left;
}

.nav-dropdown-section-label {
  grid-column: 1 / -1;
  margin: var(--space-2) var(--space-2) var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-linked-view-group {
  display: grid;
  gap: var(--space-2);
}

.admin-linked-view-group-title {
  margin: var(--space-2) 0 0;
}

.admin-linked-view-button {
  width: 100%;
  min-height: var(--control-height-touch);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-linked-view-button:hover,
.admin-linked-view-button:focus-visible {
  border-color: var(--navigation-blue);
  background: var(--navigation-blue-soft);
}

.admin-linked-view-label {
  font-weight: 700;
}

.admin-linked-view-action {
  color: var(--navigation-blue);
  font-size: var(--font-size-help);
  font-weight: 700;
}

.nav-group-button:focus-visible,
.nav-website-link:focus-visible,
.nav-logout-button:focus-visible,
.mobile-nav-toggle:focus-visible {
  outline-color: rgba(255, 255, 255, 0.92);
}

.nav-dropdown button:focus-visible,
.nav-dropdown a:focus-visible {
  outline-color: var(--navigation-blue-light);
  outline-offset: -2px;
}

.nav-dropdown button:hover,
.nav-dropdown button.active,
.nav-dropdown a:hover,
.nav-dropdown a.active {
  background: var(--navigation-blue-soft);
  color: var(--navigation-blue);
}

.nav-dropdown button.active,
.nav-dropdown a.active {
  font-weight: 700;
}

.mobile-nav-toggle {
  display: none;
  width: var(--control-height-touch);
  min-width: var(--control-height-touch);
  height: var(--control-height-touch);
  min-height: var(--control-height-touch);
  padding: 9px;
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
}

.mobile-nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: #fff;
}

.main {
  min-width: 0;
  min-height: calc(100vh - var(--navigation-shell-height));
  display: block;
  position: relative;
  isolation: isolate;
}

.main::before {
  content: "";
  position: fixed;
  inset: var(--navigation-shell-height) 0 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--home-background-image, url("./assets/dsr-logo.jpg"));
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(82vw, calc(100vh - var(--navigation-shell-height) - 32px));
  opacity: var(--home-background-opacity, 0.15);
  filter: saturate(0.7) contrast(0.9);
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.8fr) minmax(210px, 1fr) auto;
  gap: 10px;
  align-items: center;
  position: static;
}

.server-topbar {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
}

.server-test-topbar {
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.4fr) repeat(2, minmax(160px, 0.8fr)) auto;
}

.active-role-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.active-role-summary span {
  color: var(--muted);
  font-size: 12px;
}

.active-role-summary strong {
  overflow-wrap: anywhere;
}

.content {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding: var(--page-padding);
  display: grid;
  gap: var(--space-4);
  align-content: start;
  position: relative;
  z-index: var(--z-content);
}

[data-nav-section] {
  scroll-margin-top: 170px;
}

.nav-target-highlight {
  animation: nav-target-highlight 1.35s ease-out;
}

@keyframes nav-target-highlight {
  0% {
    box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.3), var(--shadow);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-dashboard {
  --home-form-bar-width: min(calc(50vw - 18px), 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  width: 100%;
}

.home-form-entry {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  width: 100%;
}

.home-form-shortcut.home-form-shortcut-button {
  min-height: 50px;
  width: var(--home-form-bar-width);
  margin-inline: auto;
}

.home-form-shortcut-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 32%);
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--home-bar-surface);
  color: var(--navigation-blue);
  text-align: left;
  box-shadow: var(--shadow);
}

.home-form-shortcut-button:hover {
  border-color: var(--navigation-blue-light);
  background: color-mix(in srgb, var(--navigation-blue-soft) 92%, transparent);
}

.home-form-shortcut-button:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: 2px;
}

.home-form-entry.expanded .home-form-shortcut-button {
  border-color: var(--navigation-blue-light);
  background: var(--home-bar-surface);
}

.home-form-shortcut-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--navigation-blue);
  font-size: var(--font-size-page-title);
  font-weight: 400;
  line-height: var(--line-height-heading);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-form-shortcut-area {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: color-mix(in srgb, var(--navigation-blue) 78%, transparent);
  font-size: var(--font-size-help);
  text-align: right;
}

.home-form-content {
  min-width: 0;
}

.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] {
  width: var(--home-form-bar-width);
  max-width: 100%;
  min-height: 50px;
  margin-inline: auto;
  border-bottom-color: var(--line);
  background: var(--home-bar-surface);
  color: var(--navigation-blue);
}

.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h1,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h2,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h3,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h4,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] span,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] strong,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] small {
  color: var(--navigation-blue) !important;
}

.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h1,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h2,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h3,
.home-form-entry.expanded .section-header[data-action="toggleHomeForm"] h4 {
  font-weight: 400;
}

.home-form-content > .stack {
  gap: 10px;
}

.profile-home-admin .table-wrap {
  container-name: profile-home-admin-table;
}

.profile-home-admin-table {
  table-layout: fixed;
  min-width: 0;
}

.profile-home-admin th:first-child,
.profile-home-admin td:first-child {
  width: 64px;
  text-align: center;
}

.profile-home-admin th:last-child,
.profile-home-admin td:last-child {
  width: 190px;
}

.profile-home-admin-table th,
.profile-home-admin-table td,
.home-admin-title-button {
  overflow-wrap: anywhere;
  white-space: normal;
}

.profile-home-admin-table th:nth-child(2) {
  width: 38%;
}

.profile-home-admin input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navigation-blue);
}

.profile-home-admin tr.home-admin-selected td {
  background: var(--navigation-blue-soft);
}

.home-admin-title-button {
  min-width: 0;
  min-height: 32px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--navigation-blue);
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.home-admin-title-button:hover,
.home-admin-title-button:focus-visible {
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-order-controls {
  display: grid;
  grid-template-columns: minmax(58px, 1fr) 34px 34px;
  gap: 6px;
  align-items: center;
}

.home-order-controls span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.home-order-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--navigation-blue);
  font-size: 17px;
}

@container profile-home-admin-table (max-width: 680px) {
  .profile-home-admin-table .home-admin-order-column {
    display: none;
  }

  .profile-home-admin-table th:first-child,
  .profile-home-admin-table td:first-child {
    width: 46px;
    padding-inline: 4px;
  }

  .profile-home-admin-table th:nth-child(2) {
    width: 58%;
  }

  .profile-home-admin-table th:nth-child(3) {
    width: auto;
  }
}

@media (max-width: 700px) {
  .profile-home-admin-table .home-admin-order-column {
    display: none;
  }

  .profile-home-admin-table th:first-child,
  .profile-home-admin-table td:first-child {
    width: 46px;
    padding-inline: 4px;
  }

  .profile-home-admin-table th:nth-child(2) {
    width: 58%;
  }

  .profile-home-admin-table th:nth-child(3) {
    width: auto;
  }
}

.section-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.section-header > :first-child,
.section-header > :is(h1, h2, h3, h4) {
  min-width: 0;
}

.clickable-section-header {
  cursor: pointer;
  user-select: none;
}

.clickable-section-header:hover {
  background: #fafbf9;
}

.clickable-section-header:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.section-header h1,
.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: var(--font-size-page-title);
  line-height: var(--line-height-heading);
  overflow-wrap: anywhere;
}

.section-header h3 {
  font-size: var(--font-size-section-title);
}

.admin-group-title,
.section-header .admin-group-title {
  color: var(--navigation-blue);
  font-size: var(--font-size-section-title);
  font-weight: 700;
  line-height: var(--line-height-heading);
}

.admin-linked-view-button .admin-linked-view-label,
.admin-option-section > .admin-option-header h3 {
  color: var(--text) !important;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-heading);
}

.section-title-dropdown {
  position: relative;
  min-width: 0;
}

.section-title-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.section-title-dropdown-toggle:hover,
.section-title-dropdown-toggle[aria-expanded="true"] {
  background: transparent;
  color: var(--navigation-blue);
}

.section-title-dropdown-toggle:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: 3px;
}

.section-title-dropdown-toggle span {
  font-size: 12px;
  transition: transform 140ms ease;
}

.section-title-dropdown-toggle[aria-expanded="true"] span {
  transform: rotate(180deg);
}

.section-title-dropdown-menu {
  position: absolute;
  z-index: var(--z-menu);
  top: calc(100% + 8px);
  left: 0;
  min-width: 205px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(24, 42, 56, 0.16);
}

.section-title-dropdown-menu button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.section-title-dropdown-menu button:hover,
.section-title-dropdown-menu button:focus-visible,
.section-title-dropdown-menu button.active {
  background: var(--navigation-blue-soft);
  color: var(--navigation-blue);
}

.section-title-dropdown-menu button:disabled {
  color: var(--muted);
  background: transparent;
}

.assignment-boat-category {
  margin-left: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-body {
  padding: var(--space-4);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 9px;
  align-items: end;
  margin-bottom: 12px;
}

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

.toolbar.oar-filter-toolbar {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.overview-filter-toolbar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  min-height: 120px;
  max-height: 70vh;
  overflow: auto;
  resize: vertical;
}

.boat-filter-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.assignment-filter-toolbar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.boat-request-filter-toolbar {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movable-filter-toolbar {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.rowing-machine-filter-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.team-filter-toolbar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.issue-filter-toolbar {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.table-filter-toolbar {
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #f7f9f7;
  margin-bottom: 12px;
}

.table-filter-toolbar .label {
  min-width: 0;
}

.table-filter-toolbar input,
.table-filter-toolbar select {
  height: 38px;
  min-width: 0;
}

.table-filter-toolbar .filter-actions button {
  height: 38px;
}

.excel-filter-heading {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.excel-filter-heading > .sort-button {
  flex: 1 1 auto;
  min-width: 0;
}

button.excel-filter-toggle {
  flex: 0 0 25px;
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

button.excel-filter-toggle:hover,
button.excel-filter-toggle[aria-expanded="true"] {
  border-color: #aac6dc;
  background: var(--navigation-blue-soft);
  color: var(--navigation-blue);
}

button.excel-filter-toggle.active {
  border-color: var(--navigation-blue);
  background: var(--navigation-blue);
  color: #fff;
}

.excel-filter-popover {
  position: fixed;
  z-index: var(--z-popover);
  display: grid;
  gap: 10px;
  max-height: min(420px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px;
  border: 1px solid #9fb9cc;
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text);
  box-shadow: 0 12px 32px rgba(17, 42, 59, 0.24);
}

.excel-filter-popover[hidden] {
  display: none;
}

.excel-filter-title {
  color: var(--navigation-blue);
  font-size: 13px;
  font-weight: 600;
}

.excel-filter-popover .table-value-filter-anchor {
  display: none;
}

.excel-filter-values {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.excel-filter-values-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.excel-filter-selection-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.excel-filter-selection-actions button {
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  background: transparent;
  color: var(--navigation-blue);
  font-size: 12px;
}

.excel-filter-value-search {
  width: 100%;
  height: 34px;
  min-width: 0;
}

.excel-filter-value-list {
  display: grid;
  gap: 2px;
  max-height: 190px;
  overflow: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.excel-filter-value-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 5px 4px;
  border-radius: 3px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.excel-filter-value-option:hover {
  background: var(--navigation-blue-soft);
}

.excel-filter-value-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.excel-filter-value-option span {
  overflow-wrap: anywhere;
}

.excel-filter-row-count {
  color: var(--muted);
  font-size: 11px;
}

.excel-filter-popover .filter-actions {
  align-items: stretch;
}

.excel-filter-popover .filter-actions button,
.excel-filter-clear {
  width: 100%;
  min-height: 36px;
}

.excel-filter-clear {
  background: transparent;
  color: var(--navigation-blue);
}

.compact-table-filter-status {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.assignment-filter-toolbar .label > span,
.boat-request-filter-toolbar .label > span,
.movable-filter-toolbar .label > span,
.rowing-machine-filter-toolbar .label > span,
.team-filter-toolbar .label > span,
.issue-filter-toolbar .label > span,
.overview-filter-toolbar .label > span {
  display: flex;
  align-items: flex-end;
  min-height: 30px;
}

.loan-filter-toolbar {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 12px;
}

.loan-table table {
  min-width: 0;
  table-layout: fixed;
}

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

.loan-table th:nth-child(1) { width: 17%; }
.loan-table th:nth-child(2) { width: 14%; }
.loan-table th:nth-child(3) { width: 20%; }
.loan-table th:nth-child(4) { width: 21%; }
.loan-table th:nth-child(5) { width: 14%; }
.loan-table th:nth-child(6) { width: 14%; }

.loan-table th:nth-child(2) .sort-button span:first-child {
  white-space: nowrap;
}

.loan-table th,
.loan-table td {
  overflow-wrap: anywhere;
}

.loan-table .loan-row td:first-child .row-button,
.loan-table .loan-row td:nth-child(3) .row-button {
  display: block;
  width: 100%;
  text-align: left;
}

.loan-table .loan-row td:nth-child(3) .row-button {
  color: inherit;
  font-weight: inherit;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.filter-actions button {
  min-height: 36px;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.segmented button {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--line);
}

.segmented button.active {
  background: var(--blue-2);
  color: var(--navigation-blue);
  border-color: #bad2e3;
  font-weight: 700;
}

.label {
  display: grid;
  gap: var(--space-1);
  color: var(--muted);
  font-size: var(--font-size-help);
}

[data-assignment-external-contact][hidden] {
  display: none !important;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 14px;
  align-items: start;
}

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

.detail-stack {
  display: grid;
  gap: 14px;
}

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

.paired-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  align-items: stretch;
}

.paired-detail-grid h3 {
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
  background: var(--surface);
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(2px);
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:hover td {
  background: var(--table-hover-surface);
}

tr.selected-row td {
  background: var(--table-active-surface);
}

.oars-table .oar-row {
  cursor: pointer;
}

.boats-table [data-boat-row],
.overview-table [data-boat-row],
.boat-requests-table [data-boat-request-row],
.movables-table [data-movable-row],
.rowing-machines-table [data-rowing-machine-row],
.issues-table [data-issue-row] {
  cursor: pointer;
}

.oars-table .oar-row:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.boats-table .inline-detail-row > td,
.overview-table .inline-detail-row > td,
.oars-table .inline-detail-row > td,
.assignments-table .inline-detail-row > td,
.boat-requests-table .inline-detail-row > td,
.movables-table .inline-detail-row > td,
.rowing-machines-table .inline-detail-row > td,
.teams-table .inline-detail-row > td,
.issues-table .inline-detail-row > td {
  padding: 0;
  background: var(--table-active-surface);
  border-bottom-color: var(--navigation-blue-light);
}

.boats-table .inline-detail-row:hover > td,
.overview-table .inline-detail-row:hover > td,
.oars-table .inline-detail-row:hover > td,
.assignments-table .inline-detail-row:hover > td,
.boat-requests-table .inline-detail-row:hover > td,
.movables-table .inline-detail-row:hover > td,
.rowing-machines-table .inline-detail-row:hover > td,
.teams-table .inline-detail-row:hover > td,
.issues-table .inline-detail-row:hover > td {
  background: var(--table-active-surface);
}

.inline-boat-detail,
.inline-oar-detail,
.inline-assignment-detail,
.inline-movable-detail,
.inline-rowing-machine-detail,
.inline-actor-detail,
.inline-issue-detail {
  padding: 12px 12px 14px;
  background: color-mix(in srgb, var(--navigation-blue-soft) 92%, var(--surface) 8%);
  border-left: 4px solid var(--navigation-blue);
  box-sizing: border-box;
}

.inline-boat-detail .section,
.inline-oar-detail .section,
.inline-assignment-detail .section,
.inline-movable-detail .section,
.inline-rowing-machine-detail .section,
.inline-actor-detail .section,
.inline-issue-detail .section {
  box-shadow: none;
  border-color: var(--navigation-blue-light);
}

.inline-boat-detail .section-header,
.inline-oar-detail .section-header,
.inline-assignment-detail .section-header,
.inline-movable-detail .section-header,
.inline-rowing-machine-detail .section-header,
.inline-actor-detail .section-header,
.inline-issue-detail .section-header {
  background: #f8fafd;
}

.assignment-detail-stack {
  display: grid;
  gap: 12px;
}

.assignment-plan-section {
  min-width: 0;
}

.inline-assignment-detail .section.assignment-planned-use-section > .section-header {
  background: #f8fafd;
}

.overview-table .inline-boat-detail {
  position: sticky;
  left: 0;
  width: calc(100vw - 68px);
  max-width: calc(100vw - 68px);
}

@supports (width: 100cqw) {
  .overview-table .inline-boat-detail {
    width: 100cqw;
    max-width: 100cqw;
  }
}

tr.calendar-boat-overlap td {
  background: #fde8ef;
}

tr.calendar-boat-overlap:hover td {
  background: #fbdde7;
}

.boat-calendar-column--period,
.calendar-agenda.boat-calendar-mobile-agenda {
  display: none;
}

.boat-calendar-overlap-status {
  display: inline-flex;
  min-height: 28px;
  padding: 3px 8px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  font-size: var(--font-size-help);
  font-weight: 700;
  white-space: nowrap;
}

.boat-calendar-overlap-status.has-overlap {
  border-color: color-mix(in srgb, var(--red) 42%, var(--line));
  background: color-mix(in srgb, #fde8ef 82%, transparent);
  color: var(--red);
}

.boat-calendar-agenda-events {
  gap: 0;
  padding: 0;
}

.boat-calendar-agenda-item {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.boat-calendar-agenda-item:last-child {
  border-bottom: 0;
}

.boat-calendar-agenda-item.has-overlap {
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--red) 70%, transparent);
}

.boat-calendar-agenda-item-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.boat-calendar-agenda-item-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--font-size-section-title);
}

.boat-calendar-agenda-meta {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
  margin: 0;
}

.boat-calendar-agenda-meta > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(98px, 0.42fr) minmax(0, 1fr);
  gap: var(--space-2);
}

.boat-calendar-agenda-meta dt,
.boat-calendar-agenda-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.boat-calendar-agenda-meta dt {
  color: var(--muted);
  font-size: var(--font-size-help);
}

.boat-calendar-agenda-actions {
  display: flex;
  min-width: 0;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

@media (min-width: 601px) and (max-width: 900px) {
  .boat-calendar-list-table :is(.boat-calendar-column--start, .boat-calendar-column--end) {
    display: none;
  }

  .boat-calendar-list-table .boat-calendar-column--period {
    display: table-cell;
  }
}

@media (max-width: 600px) {
  .boat-calendar-table-view {
    display: none;
  }

  .calendar-agenda.boat-calendar-mobile-agenda {
    display: grid;
  }

  .boat-calendar-agenda-item-header {
    align-items: flex-start;
  }

  .boat-calendar-agenda-actions button {
    flex: 1 1 132px;
    min-height: var(--control-height-touch);
  }
}

.profile-assignment-row {
  cursor: pointer;
}

.boat-subline {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.table-wrap {
  max-height: var(--table-max-height);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  container-type: inline-size;
}

.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) {
  background: transparent;
}

.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) > .section-header {
  background: var(--table-active-surface);
  color: var(--navigation-blue);
}

.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) > .section-header h1,
.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) > .section-header h2,
.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) > .section-header h3,
.section:has(.table-wrap:not(.ergometer-schedule-table-wrap)) > .section-header span {
  color: var(--navigation-blue) !important;
}

.content:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) {
  padding: 0;
  gap: 0;
}

.content:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) > .stack {
  gap: 0;
}

.section:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.section:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) > .section-body {
  padding: 0;
}

.section:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) .table-filter-toolbar {
  margin: 14px 14px 12px;
}

.section:has(.viewport-pinned-table:not(.ergometer-schedule-table-wrap)) .viewport-pinned-table {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.content:has(.home-form-entry.expanded [data-nav-section="profile-ergometer"]) {
  padding: 18px 0 0;
  gap: 0;
}

.home-form-entry.expanded:has([data-nav-section="profile-ergometer"]) {
  gap: 0;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] {
  --profile-ergometer-home-width: var(--home-form-bar-width);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] > .section-header[data-action="toggleHomeForm"] {
  width: var(--profile-ergometer-home-width);
  min-height: 50px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-active-surface);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] > .section-body {
  padding: 0;
  background: transparent;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] .profile-ergometer-booking,
.home-form-entry.expanded [data-nav-section="profile-ergometer"] .ergometer-simple-booking {
  background: transparent;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] .ergometer-simple-week {
  width: var(--profile-ergometer-home-width);
  margin-inline: auto;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] .profile-ergometer-controls {
  margin: 14px 14px 0;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] .ergometer-schedule-table-wrap {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer-bookings"],
.home-form-entry.expanded [data-nav-section="profile-calendar"] {
  --profile-ergometer-home-width: var(--home-form-bar-width);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer-bookings"] > .section-header[data-action="toggleHomeForm"],
.home-form-entry.expanded [data-nav-section="profile-calendar"] > .section-header[data-action="toggleHomeForm"] {
  width: var(--profile-ergometer-home-width);
  min-height: 50px;
  margin-inline: auto;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer-bookings"] > .section-body,
.home-form-entry.expanded [data-nav-section="profile-calendar"] > .section-body {
  padding: 12px 0 0;
  background: transparent;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer-bookings"] .ergometer-my-bookings,
.home-form-entry.expanded [data-nav-section="profile-ergometer-bookings"] .empty,
.home-form-entry.expanded [data-nav-section="profile-calendar"] .ergometer-my-bookings,
.home-form-entry.expanded [data-nav-section="profile-calendar"] .empty {
  width: calc(var(--profile-ergometer-home-width) - 24px);
  margin-inline: auto;
}

.home-form-entry.expanded [data-nav-section="profile-calendar"] .profile-usage-plan-detail {
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(2px);
}

.home-form-entry.expanded:has([data-nav-section="profile-activity-calendar"]) {
  gap: 0;
}

.home-form-entry.expanded [data-nav-section="profile-activity-calendar"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded [data-nav-section="profile-activity-calendar"] > .section-header[data-action="toggleHomeForm"] {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--home-bar-surface);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded [data-nav-section="profile-activity-calendar"] > .section-body {
  padding: 14px 0 0;
  background: transparent;
}

@media screen and (min-width: 981px) {
  .table-wrap.viewport-pinned-table {
    position: sticky;
    top: calc(var(--navigation-shell-height) + 18px);
    z-index: 7;
    max-height: var(
      --viewport-table-height,
      max(220px, calc(100dvh - var(--navigation-shell-height) - 36px))
    );
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: transparent;
  }

}

.inline-form-header-actions {
  margin-left: auto;
}

.inline-form-header-actions button {
  min-width: 96px;
}

@supports (width: 100cqw) {
  .inline-detail-row > td > :is(
    .inline-boat-detail,
    .inline-oar-detail,
    .inline-assignment-detail,
    .inline-movable-detail,
    .inline-rowing-machine-detail,
    .inline-actor-detail,
    .inline-issue-detail
  ) {
    position: sticky;
    left: 0;
    width: 100cqw;
    max-width: 100cqw;
  }
}

.overview-table,
.movables-table,
.rowing-machines-table {
  max-height: var(--table-max-height);
  container-type: inline-size;
}

.movables-table table {
  min-width: 1600px;
}

.movables-table .inline-movable-detail {
  position: sticky;
  left: 0;
  width: calc(100vw - 68px);
  max-width: calc(100vw - 68px);
}

.rowing-machines-table table {
  min-width: 720px;
  table-layout: fixed;
}

.rowing-machines-table .inline-rowing-machine-detail {
  position: sticky;
  left: 0;
  width: calc(100vw - 68px);
  max-width: calc(100vw - 68px);
}

.movable-attachments-group {
  gap: 10px;
}

.movable-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.movable-image-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.movable-image-card > a,
.movable-image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}

.movable-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movable-image-placeholder {
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

.movable-attachment-meta,
.movable-file-name {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.movable-attachment-meta {
  padding: 9px;
  padding-right: 68px;
}

.movable-attachment-meta strong,
.movable-file-name a,
.movable-file-name strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movable-file-name a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.movable-file-name a:hover,
.movable-file-name a:focus-visible {
  text-decoration: underline;
}

.movable-attachment-meta span,
.movable-file-name span,
.movable-upload-hint {
  color: var(--muted);
  font-size: 12px;
}

.movable-image-card .movable-remove-attachment {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
}

.movable-file-list {
  display: grid;
  gap: 7px;
}

.movable-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.movable-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.movable-upload-row button {
  min-height: 38px;
}

.movable-upload-hint {
  margin-top: -3px;
}

.movable-create-upload {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.movable-create-upload .label > span {
  color: var(--text);
  font-weight: 700;
}

.movable-attachment-empty {
  min-height: 42px;
  display: flex;
  align-items: center;
}

@supports (width: 100cqw) {
  .movables-table .inline-movable-detail {
    width: 100cqw;
    max-width: 100cqw;
  }

  .rowing-machines-table .inline-rowing-machine-detail {
    width: 100cqw;
    max-width: 100cqw;
  }
}

.home-form-entry.expanded [data-nav-section="profile-boat-request"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded [data-nav-section="profile-boat-request"] > .section-header[data-action="toggleHomeForm"] {
  width: var(--home-form-bar-width);
  min-height: 50px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-active-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded [data-nav-section="profile-boat-request"] > .section-body {
  width: calc(var(--home-form-bar-width) - 24px);
  max-width: 100%;
  margin: 12px auto 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

@media (max-width: 700px) {
  .profile-boat-request-dialog-backdrop {
    padding: 10px;
  }

  .profile-boat-request-dialog {
    max-height: calc(100vh - 20px);
  }

  .boat-request-form .responsible-contact {
    grid-template-columns: 1fr;
  }

  .boat-request-rower-tools {
    grid-template-columns: 1fr;
  }

  .boat-request-rower-tools .actor-create-member-count {
    grid-column: auto;
    justify-self: start;
  }
}

.boats-table,
.assignments-table,
.boat-requests-table,
.movables-table,
.rowing-machines-table,
.teams-table {
  max-height: var(--primary-table-max-height);
}

.boats-list-section {
  --boats-active-surface: var(--table-active-surface);
  background: transparent;
}

.boats-list-section > .section-header {
  background: var(--boats-active-surface);
  color: var(--navigation-blue);
}

.boats-list-section > .section-header h2,
.boats-list-section > .section-header .header-actions > span {
  color: var(--navigation-blue) !important;
}

.home-form-entry.expanded .boats-list-section > .section-header[data-action="toggleHomeForm"] {
  padding-block: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--home-bar-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded .boats-list-section > .section-header[data-action="toggleHomeForm"] h2,
.home-form-entry.expanded .boats-list-section > .section-header[data-action="toggleHomeForm"] span {
  color: var(--navigation-blue) !important;
}

.home-form-entry.expanded:has(.boats-list-section) {
  gap: 0;
}

.home-form-entry.expanded .boats-list-section {
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-form-entry.expanded .boats-list-section > .section-body {
  padding: 0;
}

.home-form-entry.expanded .boats-list-section .boat-filter-toolbar {
  margin: 14px 14px 12px;
}

.home-form-entry.expanded .boats-list-section .boats-table {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.home-form-entry.expanded .issues-list-section,
.home-form-entry.expanded [data-nav-section="profile-teams"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded .issues-list-section > .section-header[data-action="toggleHomeForm"],
.home-form-entry.expanded [data-nav-section="profile-teams"] > .section-header[data-action="toggleHomeForm"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--home-bar-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.profile-presented-section,
.home-form-entry.expanded [data-nav-section="profile-contact"],
.home-form-entry.expanded [data-nav-section="profile-confirmation"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-presented-section > .section-header,
.home-form-entry.expanded [data-nav-section="profile-contact"] > .section-header[data-action="toggleHomeForm"],
.home-form-entry.expanded [data-nav-section="profile-confirmation"] > .section-header[data-action="toggleHomeForm"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-active-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded [data-nav-section="profile-contact"] > .section-header[data-action="toggleHomeForm"],
.home-form-entry.expanded [data-nav-section="profile-confirmation"] > .section-header[data-action="toggleHomeForm"] {
  width: var(--home-form-bar-width);
  min-height: 50px;
  margin-inline: auto;
}

.home-form-entry.expanded [data-nav-section="profile-teams"] > .section-body {
  width: var(--home-form-bar-width);
  max-width: 100%;
  margin-inline: auto;
  padding: 12px 0 0;
  background: transparent;
}

.profile-presented-section > .section-body {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(2px);
}

.home-form-entry.expanded [data-nav-section="profile-contact"] > .section-body,
.home-form-entry.expanded [data-nav-section="profile-confirmation"] > .section-body {
  width: calc(var(--home-form-bar-width) - 24px);
  max-width: 100%;
  margin: 12px auto 0;
  padding: 14px;
}

.home-form-entry.expanded [data-nav-section="profile-contact"] .person-detail-primary-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.profile-presented-section .detail-group h3,
.home-form-entry.expanded [data-nav-section="profile-contact"] .detail-group h3,
.home-form-entry.expanded [data-nav-section="profile-confirmation"] .detail-group h3 {
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.home-form-entry.expanded [data-nav-section="profile-contact"] .line-item,
.home-form-entry.expanded [data-nav-section="profile-confirmation"] .line-item {
  grid-template-columns: 118px minmax(0, 1fr);
}

.home-form-entry.expanded [data-nav-section="profile-contact"] .line-item + .line-item,
.home-form-entry.expanded [data-nav-section="profile-confirmation"] .line-item + .line-item {
  border-top: 1px solid var(--line);
}

.boats-table,
.boats-table.viewport-pinned-table,
.boats-table table,
.boats-table thead,
.boats-table tbody,
.boats-table th,
.boats-table td {
  background-color: transparent;
}

.boats-table th {
  background-color: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(2px);
}

.boats-table tr:hover > td {
  background-color: var(--table-hover-surface);
}

.boats-table tr.selected-row > td {
  background-color: var(--boats-active-surface);
}

.boats-table .inline-detail-row > td,
.boats-table .inline-detail-row:hover > td {
  background-color: var(--boats-active-surface);
}

.boats-table .inline-boat-detail {
  background: color-mix(in srgb, var(--navigation-blue-soft) 92%, var(--surface) 8%);
}

.assignments-table {
  overflow: auto;
  position: relative;
}

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

.overview-table th,
.overview-table td {
  font-size: 14px;
  line-height: 1.35;
}

.overview-table th {
  white-space: nowrap;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 7px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
}

.sort-button:hover,
.sort-button.active {
  color: var(--navigation-blue);
}

.row-button {
  color: var(--navigation-blue);
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0;
}

.assignments-table .assignment-row td:first-child .row-button {
  display: block;
  width: 100%;
  text-align: left;
}

.assignments-table th .sort-button:hover,
.assignments-table th .sort-button.active {
  color: inherit;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-help);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

.pill.a { background: #e3f3ea; color: #14573e; border-color: #b8dbc9; }
.pill.b { background: var(--blue-2); color: #244f72; border-color: #bad2e3; }
.pill.c { background: var(--amber-2); color: #764707; border-color: #eccb8e; }
.pill.d { background: #f0e7f5; color: #5b4769; border-color: #d6c5df; }
.pill.warn { background: var(--amber-2); color: var(--amber); border-color: #e9c57b; }
.pill.bad { background: var(--red-2); color: var(--red); border-color: #e7b4af; }
.pill.ok { background: var(--green-2); color: var(--green); border-color: #b9dacd; }
.pill.info { background: var(--blue-2); color: var(--blue); border-color: #bad2e3; }

.stack {
  display: grid;
  gap: var(--space-3);
}

.line-list {
  display: grid;
  gap: var(--space-2);
}

.line-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--space-2);
  background: #fff;
}

.profile-field-gap {
  height: 8px;
}

.profile-assignment-plan {
  display: grid;
  gap: 16px;
}

.gdpr-log {
  display: grid;
  gap: 18px;
}

.gdpr-log table {
  min-width: 920px;
}

.gdpr-log td:last-child {
  min-width: 280px;
  white-space: normal;
}

.profile-subsection {
  display: grid;
  gap: 8px;
}

.profile-subsection + .profile-subsection {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-subsection-header h3,
.profile-subsection-header h4 {
  margin: 0;
  font-size: var(--font-size-section-title);
  line-height: 1.3;
}

.profile-subsection-header span {
  color: var(--muted);
  font-size: var(--font-size-help);
}

.profile-boat-request-row {
  cursor: pointer;
}

.profile-boat-request-row:hover,
.profile-boat-request-row:focus-visible {
  background: var(--table-active-surface);
}

.profile-boat-request-row:focus-visible {
  outline: 2px solid var(--navigation-blue-light);
  outline-offset: -2px;
}

.profile-ergometer-booking {
  display: grid;
  gap: 16px;
}

.profile-ergometer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-ergometer-controls > button {
  min-width: 178px;
  white-space: nowrap;
}

.ergometer-membership-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.ergometer-membership-chip {
  display: inline-flex;
  min-height: 28px;
  padding: 5px 9px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color) 58%, #8b9690);
  border-radius: 5px;
  background: color-mix(in srgb, var(--ergometer-group-color) 34%, white);
  color: var(--text);
  font-size: 13px;
}

.ergometer-simple-booking {
  background: transparent;
}

.ergometer-simple-week {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.ergometer-simple-group {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color) 60%, #9aa6a0);
  border-radius: 7px;
}

.ergometer-simple-group-bar {
  display: grid;
  width: 100%;
  min-height: 74px;
  padding: 10px 14px;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--ergometer-group-color) 42%, transparent);
  color: var(--text);
  text-align: center;
}

.ergometer-simple-group-bar:hover,
.ergometer-simple-group-bar:focus-visible,
.ergometer-simple-group.is-selected > .ergometer-simple-group-bar {
  background: color-mix(in srgb, var(--ergometer-group-color) 58%, transparent);
}

.ergometer-simple-group-bar:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.ergometer-simple-group-heading {
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.ergometer-simple-group-schedule,
.ergometer-simple-group-status {
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: normal;
}

.ergometer-simple-group-schedule {
  color: var(--muted);
}

.ergometer-simple-group-status {
  color: rgba(23, 33, 43, 0.72);
}

.ergometer-training-program-fields {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color, var(--line)) 48%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--ergometer-group-color, var(--line)) 26%, rgba(255, 255, 255, 0.82));
}

.ergometer-training-program-fields.is-compact {
  max-width: 880px;
  margin: 6px auto 0;
}

.ergometer-training-program-field {
  display: grid;
  min-width: 0;
  padding: 6px 8px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.54);
  text-align: left;
}

.ergometer-training-program-field.is-trainer {
  grid-column: 1 / -1;
}

.ergometer-training-program-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.ergometer-training-program-field strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: pre-line;
}

.ergometer-simple-group-detail {
  display: grid;
  gap: 12px;
  padding: 10px 12px 12px;
  border-top: 1px solid color-mix(in srgb, var(--ergometer-group-color) 55%, #aeb8b3);
  background: color-mix(in srgb, var(--ergometer-group-color) 18%, transparent);
}

.ergometer-simple-waitlist-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ergometer-simple-waitlist-summary {
  display: flex;
  min-height: 38px;
  padding: 8px 11px;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
}

button.ergometer-simple-waitlist-summary:hover,
button.ergometer-simple-waitlist-summary:focus-visible {
  border-color: var(--navigation-blue);
  background: #fff;
}

.ergometer-simple-waitlist-summary > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.ergometer-simple-waitlist-action {
  min-width: 150px;
}

.ergometer-simple-capacity-row {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.ergometer-simple-capacity-button {
  min-width: 0;
  min-height: 44px;
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
}

.ergometer-simple-capacity-summary {
  display: flex;
  padding: 8px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
}

button.ergometer-simple-capacity-summary:hover,
button.ergometer-simple-capacity-summary:focus-visible {
  border-color: var(--navigation-blue);
  background: #fff;
}

.ergometer-simple-booking-action {
  width: 100%;
  min-height: 44px;
}

.ergometer-simple-empty {
  margin: 10px 14px 14px;
}

.home-form-entry.expanded [data-nav-section="profile-ergometer"] .ergometer-simple-booking {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.ergometer-membership-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.ergometer-membership-choice {
  display: flex;
  min-height: 38px;
  padding: 8px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color) 55%, #c7cfca);
  border-radius: 5px;
  background: color-mix(in srgb, var(--ergometer-group-color) 22%, white);
}

.ergometer-membership-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.role-edit-row {
  align-items: flex-start;
}

.role-edit-row > span {
  min-width: 120px;
  padding-top: 9px;
}

.role-choice-list {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.role-choice {
  display: flex;
  min-height: 38px;
  padding: 8px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.role-choice:has(input:checked) {
  border-color: var(--navigation-blue-light);
  background: var(--navigation-blue-soft);
}

.role-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.ergometer-my-bookings {
  display: grid;
  gap: 9px;
}

.ergometer-my-bookings-header {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-active-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.ergometer-my-bookings-header h2 {
  color: var(--navigation-blue);
  font-size: 18px;
  font-weight: 400;
}

.ergometer-my-bookings-header .header-actions span {
  color: var(--navigation-blue);
  font-size: 12px;
}

.ergometer-my-booking {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color) 60%, #9aa6a0);
  border-radius: 7px;
}

.ergometer-my-booking-bar {
  display: grid;
  width: 100%;
  min-height: 74px;
  padding: 10px 14px;
  min-width: 0;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--ergometer-group-color) 42%, transparent);
  color: var(--text);
  text-align: center;
}

.ergometer-my-booking-bar:hover,
.ergometer-my-booking-bar:focus-visible,
.ergometer-my-booking.is-selected > .ergometer-my-booking-bar {
  background: color-mix(in srgb, var(--ergometer-group-color) 58%, transparent);
}

.ergometer-my-booking-bar:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.ergometer-my-booking-heading {
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.ergometer-my-booking-schedule,
.ergometer-my-booking-status {
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: normal;
}

.ergometer-my-booking-schedule {
  color: var(--muted);
}

.ergometer-my-booking-status {
  color: rgba(23, 33, 43, 0.72);
}

.ergometer-my-booking-detail {
  display: grid;
  gap: 12px;
  padding: 10px 12px 12px;
  border-top: 1px solid color-mix(in srgb, var(--ergometer-group-color) 55%, #aeb8b3);
  background: color-mix(in srgb, var(--ergometer-group-color) 18%, transparent);
}

.profile-team-membership-detail h3 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 13px;
  font-weight: 600;
}

.profile-team-membership-detail {
  background: color-mix(in srgb, #fff 72%, transparent);
}

.profile-team-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.profile-team-detail-section {
  display: grid;
  gap: 0;
  min-width: 0;
}

.profile-team-detail-list {
  gap: 0;
}

.profile-team-detail-list .line-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  justify-content: start;
  gap: 8px;
  align-items: flex-start;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
  font-size: 13px;
}

.profile-team-detail-list .line-item:first-child {
  border-top: 0;
}

.profile-team-detail-list .line-item > span:first-child {
  color: var(--muted);
}

.profile-team-detail-list .line-item > :last-child {
  min-width: 0;
  max-width: none;
  text-align: left;
  overflow-wrap: anywhere;
}

.profile-team-detail-list .profile-team-definition-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.profile-team-definition {
  white-space: pre-wrap;
}

.profile-team-boats-section,
.profile-team-members-section {
  padding-top: 14px;
  border-top: 2px solid color-mix(in srgb, var(--ergometer-group-color) 78%, #9ca9b4);
}

.profile-team-boat-assignments {
  display: grid;
}

.profile-team-assignment-label {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.profile-team-boat-assignment {
  padding: 9px 0;
}

.profile-team-boat-assignment + .profile-team-boat-assignment {
  border-top: 1px solid color-mix(in srgb, var(--ergometer-group-color) 62%, #abb5bd);
}

.profile-team-boat-detail-list {
  padding-top: 2px;
}

.profile-team-assigned-oar-numbers {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-x: auto;
  white-space: nowrap;
}

.profile-team-crew {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  margin-top: 10px;
}

.profile-team-crew > .profile-team-assignment-label {
  display: block;
  padding: 4px 0 0;
}

.profile-team-crew-members,
.profile-team-crew-empty {
  min-width: 0;
}

.profile-team-members {
  display: grid;
  gap: 0;
}

.profile-team-member-header,
.profile-team-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, 0.85fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: start;
  padding: 5px 0;
}

.profile-team-member-header {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.profile-team-member-row {
  color: var(--text);
  font-size: 13px;
}

.profile-team-member-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .profile-team-member-header,
  .profile-team-member-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .profile-team-member-header {
    display: none;
  }

  .profile-team-member-row {
    padding: 7px 0;
    font-size: 11px;
  }

}

.actor-create-member-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 200px) minmax(120px, 160px) auto;
  align-items: end;
  gap: 8px;
  width: min(100%, 760px);
  margin-bottom: 8px;
}

.actor-create-member-tools input,
.actor-create-member-tools select {
  height: 34px;
  min-width: 0;
}

.actor-create-member-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.team-member-count,
.assignment-crew-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.team-member-count:focus-visible,
.assignment-crew-count:focus-visible {
  border-radius: var(--radius-small);
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.team-member-count-tooltip {
  position: fixed;
  z-index: var(--z-tooltip);
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(79, 120, 150, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(29, 52, 68, 0.18);
  color: var(--text, #172733);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
}

.team-member-count-tooltip[hidden] {
  display: none;
}

.actor-create-member-table-wrap {
  width: min(100%, 760px);
  max-height: 218px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.actor-create-member-table {
  table-layout: fixed;
}

.actor-create-member-table th,
.actor-create-member-table td {
  padding: 5px 8px;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.25;
}

.actor-create-member-table th:first-child { width: 42%; }
.actor-create-member-table th:nth-child(2) { width: 19%; }
.actor-create-member-table th:nth-child(3) { width: 29%; }
.actor-create-member-table th:last-child { width: 10%; }

.actor-create-member-checkbox-cell,
.actor-create-member-table th:last-child {
  text-align: center;
}

.actor-create-member-checkbox-cell label {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  cursor: pointer;
}

.actor-create-member-checkbox-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
}

@media (max-width: 700px) {
  .actor-create-member-tools {
    grid-template-columns: 1fr 1fr;
  }

  .actor-create-member-count {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .actor-create-member-table {
    min-width: 540px;
  }
}

.ergometer-my-booking-actions {
  display: flex;
  justify-content: flex-end;
}

.profile-usage-plan-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--navigation-blue) 18%, transparent);
}

.profile-usage-plan-people-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.profile-usage-plan-people-group {
  min-width: 0;
}

.profile-usage-plan-people-group h3 {
  margin: 0 0 6px;
  color: var(--navigation-blue);
  font-size: 13px;
  font-weight: 600;
}

.profile-usage-plan-people-table-wrap {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--ergometer-group-color) 42%, var(--line));
  border-radius: 6px;
  background: transparent;
}

.profile-usage-plan-people-table {
  width: 100%;
  min-width: 260px;
  table-layout: fixed;
  background: transparent;
}

.profile-usage-plan-people-table thead,
.profile-usage-plan-people-table tbody,
.profile-usage-plan-people-table tr {
  background: transparent;
}

.profile-usage-plan-people-table th,
.profile-usage-plan-people-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  vertical-align: middle;
  background: transparent;
}

.profile-usage-plan-people-table.has-status:not(.has-action) th:last-child,
.profile-usage-plan-people-table.has-status:not(.has-action) td:last-child,
.profile-usage-plan-people-table.has-action th:nth-last-child(2),
.profile-usage-plan-people-table.has-action td:nth-last-child(2) {
  width: 82px;
}

.profile-usage-plan-people-table.has-action {
  min-width: 560px;
}

.profile-usage-plan-people-table.has-action th:last-child,
.profile-usage-plan-people-table.has-action td:last-child {
  width: 250px;
}

.profile-usage-plan-people-table.has-phone {
  min-width: 360px;
}

.profile-usage-plan-people-table.has-phone th:last-child,
.profile-usage-plan-people-table.has-phone td:last-child {
  width: 150px;
}

.usage-plan-participation-status {
  display: inline-block;
  color: var(--muted);
  white-space: nowrap;
}

.usage-plan-participation-status.is-cancelled {
  color: var(--danger, #a23939);
  font-weight: 600;
}

.usage-plan-cancel-participation,
.usage-plan-resume-participation {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.usage-plan-cancel-participation.is-manager-action,
.usage-plan-resume-participation {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.usage-plan-cancel-participation.is-manager-action:hover,
.usage-plan-resume-participation:hover {
  border-color: var(--navigation-blue-light);
  background: color-mix(in srgb, var(--navigation-blue-soft) 40%, transparent);
  color: var(--navigation-blue);
}

.usage-plan-participation-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.usage-plan-participation-result > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ergometer-my-booking-cancel {
  min-width: 150px;
}

.training-programs-body {
  display: grid;
  gap: 14px;
}

.team-import-body {
  display: grid;
  gap: 12px;
}

.team-import-workflow {
  display: grid;
  grid-template-columns: minmax(250px, auto) minmax(280px, 1fr) minmax(150px, auto);
  align-items: end;
  gap: 12px;
}

.team-import-workflow > button,
.team-import-file input {
  min-height: 38px;
}

.team-import-file input {
  padding: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.team-import-result {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.team-import-result ul {
  margin: 0;
  padding-left: 22px;
}

.person-import-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.person-import-panel h3 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.team-admin-action-column {
  width: 160px;
  text-align: right;
}

.team-admin-action-column button {
  white-space: nowrap;
}

.training-program-import {
  display: grid;
  gap: 10px;
}

.training-program-workflow {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 482px));
  grid-template-areas:
    "group file"
    "dates upload"
    "period-actions .";
  align-items: start;
  justify-content: space-between;
  gap: 10px 16px;
}

.training-program-workflow.is-read-only {
  width: min(100%, 720px);
  grid-template-columns: 1fr;
  grid-template-areas:
    "group"
    "dates"
    "period-actions";
  justify-content: start;
}

.training-program-group {
  grid-area: group;
}

.training-program-file {
  grid-area: file;
}

.training-program-date-range {
  display: grid;
  grid-area: dates;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.training-program-scope-actions {
  display: grid;
  width: 100%;
  grid-area: period-actions;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.training-program-upload-actions {
  display: flex;
  grid-area: upload;
  align-self: start;
  justify-content: flex-end;
  gap: 10px;
}

.training-program-scope-actions > button,
.training-program-upload-actions > button {
  min-height: 38px;
  white-space: nowrap;
}

.training-program-scope-actions > button {
  width: 100%;
  white-space: normal;
}

.training-program-scope-actions > button:only-child {
  grid-column: 1 / -1;
}

.training-program-file input {
  min-height: 38px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.training-program-table-wrap {
  max-height: var(--primary-table-max-height);
}

.training-program-table {
  min-width: 1120px;
  table-layout: fixed;
}

.training-program-table .training-program-date-column {
  width: 112px;
  white-space: nowrap;
}

.training-program-table th:nth-child(2) {
  width: 82px;
}

.training-program-table th:nth-child(3) {
  width: 250px;
}

.training-program-table th:nth-child(4) {
  width: 90px;
}

.training-program-table th:nth-child(5) {
  width: 90px;
}

.training-program-table th:nth-child(6) {
  width: 220px;
}

.training-program-table th:nth-child(7) {
  width: 150px;
}

.training-program-table .training-program-action-column {
  width: 72px;
}

.training-program-table .training-program-trainer-column {
  width: 130px;
}

.training-program-table td {
  vertical-align: top;
}

.training-program-table .training-program-updated-column {
  white-space: nowrap;
}

.training-program-table .training-program-row[data-training-program-row] {
  cursor: pointer;
}

.training-program-table .training-program-row[data-training-program-row]:focus-visible {
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.training-program-table .training-program-inline-detail-row > td,
.training-program-table .training-program-inline-detail-row:hover > td {
  padding: 0;
  background: var(--table-active-surface);
  border-bottom-color: var(--navigation-blue-light);
}

.inline-training-program-detail {
  padding: 12px 12px 14px;
  background: color-mix(in srgb, var(--navigation-blue-soft) 92%, var(--surface) 8%);
  border-left: 4px solid var(--navigation-blue);
}

.training-program-edit-form {
  display: grid;
  gap: 12px;
}

.training-program-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.training-program-edit-grid .is-wide {
  grid-column: 1 / -1;
}

.training-program-edit-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.training-program-edit-actions {
  margin-top: 0;
}

.training-program-text {
  overflow-wrap: anywhere;
  line-height: 1.4;
  white-space: pre-line;
}

.detail-edit-row {
  align-items: center;
}

.detail-edit-row > span {
  min-width: 120px;
}

.detail-edit-row > input,
.detail-edit-row > select,
.detail-edit-row > textarea {
  max-width: 420px;
}

.team-definition-field {
  align-items: flex-start;
}

.definition-field {
  min-height: 76px;
  white-space: pre-wrap;
}

.member-list-header,
.member-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.75fr) minmax(190px, 1.15fr) 112px;
  gap: 10px;
  align-items: center;
}

.member-list-header {
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.member-row > strong,
.member-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.member-form {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 112px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.member-form-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.member-form select {
  min-width: 0;
  height: 36px;
}

.member-action-button {
  width: 112px;
  min-width: 112px;
  height: 36px;
  min-height: 36px;
  padding: 8px 6px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .member-list {
    overflow-x: auto;
  }

  .member-list-header,
  .member-row {
    min-width: 620px;
  }

  .member-form {
    grid-template-columns: 1fr 112px;
  }

  .member-form-label {
    grid-column: 1 / -1;
  }
}

.admin-option-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.admin-option-header {
  box-shadow: none;
  background: #fafbf9;
}

.admin-table {
  max-height: var(--table-max-height);
  border-width: 1px 0;
  border-radius: 0;
}

.admin-table input {
  min-width: 150px;
}

.admin-actions {
  display: flex;
  gap: 7px;
  white-space: nowrap;
}

.glossary-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
}

.glossary-result-count {
  align-self: end;
  padding: 9px 0;
  color: var(--muted);
  white-space: nowrap;
}

.glossary-table-wrap {
  max-height: calc(100vh - 235px);
}

.glossary-table {
  min-width: 900px;
}

.glossary-table th:nth-child(1),
.glossary-table td:nth-child(1) {
  width: 18%;
}

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

.glossary-table th:nth-child(3),
.glossary-table td:nth-child(3) {
  width: 18%;
}

.glossary-table th:nth-child(5),
.glossary-table td:nth-child(5) {
  width: 86px;
  text-align: right;
}

.glossary-table textarea {
  min-width: 320px;
  min-height: 54px;
  line-height: 1.35;
  resize: vertical;
}

.view-descriptions-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 280px) auto;
  gap: 10px;
  align-items: end;
}

.view-descriptions-result-count {
  align-self: end;
  padding: 9px 0;
  color: var(--muted);
  white-space: nowrap;
}

.view-descriptions-table-wrap {
  max-height: calc(100vh - 235px);
}

.view-descriptions-table {
  min-width: 1180px;
}

.view-descriptions-table th:nth-child(1),
.view-descriptions-table td:nth-child(1) {
  width: 16%;
}

.view-descriptions-table th:nth-child(2),
.view-descriptions-table td:nth-child(2) {
  width: 14%;
}

.view-descriptions-table th:nth-child(3),
.view-descriptions-table td:nth-child(3) {
  width: 25%;
}

.view-descriptions-table th:nth-child(4),
.view-descriptions-table td:nth-child(4) {
  width: 39%;
}

.view-descriptions-table th:nth-child(5),
.view-descriptions-table td:nth-child(5) {
  width: 86px;
  text-align: right;
}

.view-descriptions-table textarea {
  width: 100%;
  min-width: 240px;
  min-height: 62px;
  line-height: 1.4;
  resize: vertical;
}

.view-descriptions-table td:nth-child(4) textarea {
  min-width: 380px;
  min-height: 82px;
}

@media (max-width: 760px) {
  .glossary-filter-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .glossary-filter-toolbar .label:first-child {
    grid-column: 1 / -1;
  }

  .view-descriptions-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .view-descriptions-result-count {
    padding-top: 0;
  }
}

.permission-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
  color: var(--muted);
}

.permission-legend span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.permission-admin-note {
  margin: 10px 0 0;
  color: var(--navigation-blue);
}

.permission-shared-note {
  margin: 4px 0 0;
  color: var(--muted);
}

.permission-table table {
  min-width: 1120px;
  table-layout: fixed;
}

.permission-table th small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

.permission-table th:first-child,
.permission-table td:first-child {
  position: sticky;
  left: 0;
  width: 260px;
  min-width: 260px;
}

.permission-table th:first-child {
  z-index: 4;
}

.permission-table td:first-child {
  z-index: 1;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.permission-table th:not(:first-child),
.permission-table td:not(:first-child) {
  width: 190px;
  text-align: center;
}

.permission-table .permission-group-cell {
  position: static;
  width: auto;
  min-width: 0;
  padding: 10px 12px;
  color: var(--navigation-blue);
  background: color-mix(in srgb, var(--navigation-blue) 10%, var(--surface));
  text-align: left;
  font-weight: 600;
}

.permission-table select {
  width: 100%;
  min-width: 0;
}

.permission-area-cell strong,
.permission-area-cell small {
  display: block;
  text-align: left;
}

.permission-area-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}

.admin-add-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) auto;
  gap: 9px;
  align-items: end;
  padding: 12px;
}

.assignment-note {
  align-items: flex-start;
}

.assignment-note > span:last-child {
  display: grid;
  gap: 3px;
  text-align: right;
}

.assignment-grid,
.calendar-grid {
  display: grid;
  gap: 7px;
}

.assignment-grid-header,
.assignment-grid-row,
.calendar-grid-header,
.calendar-grid-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.assignment-grid-header,
.calendar-grid-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 9px;
}

.assignment-grid-header,
.assignment-grid-row,
.calendar-grid-header,
.calendar-grid-row {
  grid-template-columns: minmax(120px, 1fr) minmax(170px, 1.5fr) minmax(100px, 0.75fr) minmax(100px, 0.75fr);
}

.calendar-person-cell {
  grid-column: span 2;
}

.assignment-grid-row,
.calendar-grid-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.boat-detail-simple {
  display: grid;
  gap: 14px;
}

.detail-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.boat-detail-simple > .detail-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.detail-group h3 {
  margin: 0;
  color: var(--text);
  font-size: var(--font-size-subsection-title);
  line-height: 1.3;
}

.boat-detail-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.boat-detail-primary-row > .detail-group,
.person-detail-primary-row > .detail-group,
.team-detail-primary-row > .detail-group {
  padding-top: 0;
  border-top: 0;
}

.boat-detail-stack {
  display: grid;
  gap: 14px;
}

.boat-detail-simple .line-list {
  gap: 0;
}

.boat-detail-simple .line-item,
.boat-detail-simple .assignment-grid-row,
.boat-detail-simple .calendar-grid-row {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 0;
}

.boat-detail-simple .line-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  justify-content: start;
  gap: 14px;
}

.boat-detail-simple .member-row {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.75fr) minmax(190px, 1.15fr) 112px;
  gap: 10px;
}

.boat-detail-simple .line-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.boat-detail-simple .line-item strong {
  text-align: left;
  overflow-wrap: anywhere;
}

.boat-detail-simple .assigned-oar-row span {
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

.boat-detail-simple .assignment-grid-header,
.boat-detail-simple .assignment-grid-row,
.boat-detail-simple .calendar-grid-header,
.boat-detail-simple .calendar-grid-row {
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr);
}

.boat-detail-simple .calendar-grid-header,
.boat-detail-simple .calendar-grid-row {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr);
}

.assignment-recipient-cell {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.assignment-recipient-cell > strong,
.assignment-detail-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.assignment-detail-note {
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
}

.assignment-detail-note > span {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.boat-damage-area {
  display: grid;
  gap: 8px;
}

.issue-note-cell {
  display: grid;
  gap: 8px;
}

.issues-table .issue-note-preview:disabled {
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  cursor: default;
  resize: none;
}

.damage-history-empty,
.damage-history summary {
  font-size: 12px;
}

.damage-history summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.damage-history-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.damage-history-entry {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.damage-history-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.damage-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.damage-history-meta span {
  color: var(--muted);
  text-align: right;
}

.damage-history-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.responsibility-list {
  display: grid;
  gap: 10px;
}

.responsibility-entry {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.responsibility-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.responsibility-name {
  display: grid;
  gap: 2px;
}

.responsibility-name span {
  color: var(--muted);
  font-size: 12px;
}

.boat-damage-area textarea {
  min-height: var(--control-height);
  max-height: min(180px, 30dvh);
  field-sizing: content;
  overflow-y: auto;
}

.boat-damage-area textarea:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
  cursor: default;
  resize: none;
}

.detail-section-actions {
  display: flex;
  justify-content: flex-end;
}

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

.warning-list {
  display: grid;
  gap: 8px;
}

.warning-list[hidden] {
  display: none;
}

.warning {
  border-left: 4px solid var(--amber);
  background: var(--amber-2);
  padding: 9px 10px;
  border-radius: 6px;
}

.warning.bad {
  border-left-color: var(--red);
  background: var(--red-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.oar-assignment-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, auto) repeat(2, 120px);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.oar-link-summary {
  display: grid;
  gap: 2px;
  align-self: center;
}

.oar-link-summary span {
  color: var(--muted);
  font-size: 12px;
}

.oar-assignment-toolbar button {
  width: 120px;
  min-height: 36px;
  white-space: nowrap;
}

button[data-action="newOarDetail"] {
  width: 120px;
  min-height: 36px;
}

.oar-link-cell {
  width: 92px;
  text-align: center;
  vertical-align: middle;
}

.oar-link-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.oar-link-cell input:disabled {
  cursor: not-allowed;
}

.oars-table tr.oar-link-added td {
  background: #edf7f2;
}

.oars-table tr.oar-link-removed td {
  background: #fff2f1;
}

.oars-table tr.oar-link-added td:first-child {
  box-shadow: inset 4px 0 var(--green);
}

.oars-table tr.oar-link-removed td:first-child {
  box-shadow: inset 4px 0 var(--red);
}

.datetime-pair {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px;
  gap: 8px;
}

.plan-assignment-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.plan-assignment-details {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.plan-assignment-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-assignment-period .datetime-pair {
  grid-template-columns: minmax(0, 1fr) 94px;
}

.plan-fixed-assignment-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.plan-fixed-assignment-layout.without-actor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-fixed-assignment-layout .datetime-pair {
  grid-template-columns: minmax(0, 1fr) 94px;
}

.checkbox-line,
.weekday-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox-line input,
.weekday-option input {
  width: auto;
  min-width: 18px;
  height: 18px;
}

.weekday-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.plan-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.rowing-machine-form-actions .danger {
  margin-right: auto;
}

.confirmation-form,
.confirmation-admin-form {
  display: grid;
  gap: 18px;
}

.privacy-policy-admin-form {
  display: grid;
  gap: 12px;
}

.privacy-policy-link-preview {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 24px;
}

.privacy-policy-link-preview > span {
  color: var(--muted);
  font-size: 12px;
}

.privacy-policy-profile-link {
  display: inline-block;
  font-size: 15px;
}

.home-background-admin-body {
  display: grid;
  gap: 20px;
}

.home-background-preview-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.home-background-preview {
  min-height: 230px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f6f3;
  color: var(--muted);
}

.home-background-preview img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.home-background-settings-form {
  display: grid;
  align-content: center;
  gap: 16px;
}

.home-background-opacity-control > span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.home-background-opacity-control output {
  color: var(--navigation-blue);
  font-variant-numeric: tabular-nums;
}

.home-background-opacity-control input[type="range"] {
  width: 100%;
  padding: 0;
  accent-color: var(--navigation-blue);
}

.home-background-library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.home-background-library-heading h4 {
  margin: 0 0 4px;
}

.home-background-library-heading > div > span {
  color: var(--muted);
  font-size: 12px;
}

.home-background-upload-form {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 520px);
}

.home-background-file-picker {
  display: grid;
  gap: 5px;
  min-width: 260px;
  color: var(--muted);
  font-size: 12px;
}

.home-background-file-picker input {
  width: 100%;
  min-height: 40px;
}

.home-background-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.home-background-library-item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.home-background-library-item.selected {
  border-color: var(--navigation-blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--navigation-blue-light) 60%, transparent);
}

.home-background-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f6f3;
}

.home-background-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-background-thumbnail > span:last-child {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(41, 76, 115, 0.9);
  color: #fff;
  font-size: 11px;
}

.home-background-none {
  background: #f5f6f3;
}

.home-background-none::before {
  content: "Ingen";
  color: var(--muted);
  font-size: 13px;
}

.home-background-library-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-background-library-meta strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.home-background-library-meta span,
.home-background-protected {
  color: var(--muted);
  font-size: 11px;
}

.home-background-delete {
  justify-self: start;
}

.home-background-updated {
  margin: 0;
  font-size: 12px;
}

.confirmation-information {
  width: 100%;
  line-height: 1.55;
}

.confirmation-information-copy {
  display: grid;
  gap: 8px;
}

.confirmation-information-copy p {
  margin: 0;
}

.confirmation-references {
  margin: 16px 0;
}

.confirmation-reference-list {
  display: grid;
  gap: 0;
}

.confirmation-reference-sentence {
  margin: 0;
  padding: 7px 0;
  line-height: 1.45;
}

.confirmation-reference-sentence + .confirmation-reference-sentence {
  border-top: 1px solid var(--line);
}

.confirmation-reference-sentence a {
  font-weight: 400;
}

.confirmation-reference-view {
  margin-top: 10px;
  max-height: none;
}

.confirmation-reference-view table {
  table-layout: fixed;
}

.confirmation-reference-view th:last-child,
.confirmation-reference-view td:last-child {
  width: 90px;
}

.confirmation-reference-editor,
.confirmation-statement-editor {
  display: grid;
  gap: 10px;
}

.confirmation-reference-admin-table {
  max-height: none;
}

.confirmation-reference-admin-table table {
  min-width: 980px;
  table-layout: fixed;
}

.confirmation-reference-admin-table th:nth-child(1) {
  width: 24%;
}

.confirmation-reference-admin-table th:nth-child(2) {
  width: 30%;
}

.confirmation-reference-admin-table th:nth-child(3) {
  width: 31%;
}

.confirmation-reference-admin-table th:nth-child(4) {
  width: 15%;
}

.confirmation-reference-admin-table input {
  width: 100%;
  min-width: 0;
}

.confirmation-reference-admin-table button {
  width: 100%;
}

.confirmation-statement-admin-table {
  max-height: none;
}

.confirmation-statement-admin-table table {
  table-layout: fixed;
}

.confirmation-statement-admin-table th:last-child,
.confirmation-statement-admin-table td:last-child {
  width: 150px;
}

.confirmation-statement-admin-table input {
  width: 100%;
  min-height: 38px;
}

.confirmation-statement-admin-table button {
  width: 100%;
}

.confirmation-reference-add-action,
.confirmation-statement-add-action {
  display: flex;
  justify-content: flex-end;
  justify-self: stretch;
  width: 100%;
}

.confirmation-reference-add-action button,
.confirmation-statement-add-action button {
  min-width: 170px;
  margin-left: auto;
}

.confirmation-statements {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-confirmation-body .confirmation-statements {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.confirmation-statements legend {
  margin-bottom: 10px;
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.confirmation-statements label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.confirmation-instruction {
  margin: 0 0 2px;
  color: var(--muted);
}

.confirmation-choice {
  min-height: 46px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
  cursor: pointer;
}

.confirmation-choice:first-of-type {
  border-top: 1px solid var(--line);
}

.confirmation-choice input {
  width: 20px;
  height: 20px;
}

.confirmation-statements input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.confirmation-latest {
  line-height: 1.45;
}

.profile-confirmation-body .form-actions {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.confirmation-admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.confirmation-admin-form small {
  color: var(--muted);
  font-weight: 400;
}

.confirmation-detail-statement strong {
  max-width: 760px;
  font-weight: 500;
}

.plan-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.plan-row-actions button {
  min-width: 104px;
}

.plan-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 150px));
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.plan-edit-actions button {
  min-height: 36px;
}

.assignment-actions {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.assignment-actions button {
  min-height: 36px;
  padding: 8px 14px;
}

.assignment-create-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 150px));
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.assignment-create-actions button {
  min-height: 36px;
  padding: 8px 14px;
}

.team-assignment-create-primary {
  min-width: 0;
}

.team-assignment-create-fields {
  width: 100%;
}

.team-assignment-create-fields textarea {
  min-height: 70px;
}

.team-assignment-form .team-assignment-crew {
  margin-top: 0;
}

.team-assignment-form .team-assignment-responsible-fields {
  gap: 0;
}

.team-assignment-form .team-assignment-responsible-contact-row {
  align-items: center;
}

.team-assignment-form .responsible-contact {
  width: 100%;
}

.team-assignment-form .responsible-contact > span {
  color: var(--text);
  font-size: inherit;
  font-weight: 400;
}

.team-assignment-form .detail-edit-row > input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0;
}

.team-assignment-form .team-assignment-form-actions {
  margin-top: 4px;
}

.assignment-crew {
  min-width: 0;
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.assignment-crew legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.assignment-crew-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr);
  gap: 14px;
  align-items: end;
}

.responsible-contact {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(110px, 0.8fr);
  gap: 10px;
  align-items: center;
}

.crew-rower-section {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.crew-rower-section[hidden] {
  display: none;
}

.crew-rower-heading {
  color: var(--muted);
  font-size: 12px;
}

.assignment-rower-tools,
.assignment-rower-table-wrap {
  width: 100%;
}

.assignment-rower-table-wrap {
  max-height: 218px;
}

.boat-request-form {
  gap: 10px;
  padding: 0;
}

.boat-request-form .detail-group {
  gap: 7px;
}

.boat-request-form .boat-request-contact-row {
  align-items: center;
}

.boat-request-form .responsible-contact {
  width: 100%;
}

.boat-request-form .responsible-contact > span {
  color: var(--text);
  font-size: inherit;
  font-weight: 400;
}

.boat-request-rower-tools,
.boat-request-rower-table-wrap {
  width: 100%;
  min-width: 0;
}

.boat-request-rower-section {
  min-width: 0;
}

.boat-request-rower-tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boat-request-rower-tools .actor-create-member-count {
  grid-column: 1 / -1;
  justify-self: end;
}

.boat-request-rower-table-wrap {
  max-height: 218px;
}

.boat-request-rower-selected-count {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.boat-request-form-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.crew-checklist {
  max-height: 210px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.crew-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
}

.crew-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
}

.crew-option span {
  overflow-wrap: anywhere;
}

.actor-actions {
  display: grid;
  grid-template-columns: repeat(3, 112px);
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.actor-actions button {
  width: 112px;
  min-height: 36px;
  padding: 8px 14px;
}

.actor-actions.two-actions {
  grid-template-columns: repeat(2, 112px);
}

.boat-actions {
  display: grid;
  grid-template-columns: repeat(2, 112px);
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.boat-actions.single-action {
  grid-template-columns: 112px;
}

.boat-actions button {
  width: 112px;
  height: 36px;
  min-height: 36px;
  padding: 8px 8px;
  white-space: nowrap;
}

.oar-actions {
  display: grid;
  grid-template-columns: repeat(3, 112px);
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.oar-actions.single-action {
  grid-template-columns: 112px;
}

.oar-actions button {
  width: 112px;
  min-height: 36px;
  padding: 8px 14px;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.audit {
  max-height: 240px;
  overflow: auto;
  font-size: 12px;
}

.audit div {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.ergometer-schedule-header > div:first-child {
  display: grid;
  gap: 4px;
}

.ergometer-schedule-header > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.ergometer-screen-actions .label {
  min-width: 210px;
}

.ergometer-layout-switch {
  align-self: end;
  flex-wrap: nowrap;
}

.ergometer-layout-switch button {
  min-height: 38px;
  white-space: nowrap;
}

.ergometer-schedule-body {
  display: grid;
  gap: 12px;
}

.ergometer-next-visual-workspace {
  min-height: 0;
  background: transparent;
}

.ergometer-next-visual-workspace > .section-header {
  background: rgba(219, 235, 247, 0.72);
}

.ergometer-next-visual-workspace > .section-header > div {
  display: grid;
  gap: 2px;
}

.ergometer-next-visual-workspace > .section-header span {
  color: var(--muted);
  font-size: 12px;
}

.ergometer-next-visual-canvas {
  min-height: 0;
  padding: 16px;
}

.content:has(.ergometer-plan-only-view) {
  padding: 0;
  gap: 0;
}

.ergometer-plan-only-view {
  width: 100%;
  min-width: 0;
  padding: 12px 12px 0;
}

.ergometer-plan-only-view .ergometer-percentage-plan {
  gap: 8px;
}

.ergometer-plan-only-view .ergometer-percentage-days {
  width: 100%;
  padding-bottom: 0;
}

.ergometer-plan-only-view .ergometer-percentage-day {
  min-width: calc(var(--ergometer-day-slots) * var(--ergometer-slot-width));
  flex-basis: 0;
  flex-grow: var(--ergometer-day-slots);
  flex-shrink: 1;
}

.ergometer-plan-only-view .ergometer-percentage-group-key {
  padding: 0 16px;
}

.ergometer-plan-only-view .ergometer-percentage-key {
  padding: 0 16px 12px;
}

.ergometer-percentage-plan {
  --ergometer-slot-width: 70px;
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ergometer-percentage-plan-scroll {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.ergometer-percentage-days {
  width: max-content;
  min-width: 100%;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-bottom: 6px;
}

.ergometer-percentage-day {
  flex: 0 0 calc(var(--ergometer-day-slots) * var(--ergometer-slot-width));
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(121, 141, 153, 0.42);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
}

.ergometer-percentage-day h3 {
  min-height: 38px;
  margin: 0;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(121, 141, 153, 0.42);
  color: var(--navigation-blue);
  background: rgba(219, 235, 247, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.ergometer-percentage-day-slots {
  display: grid;
  grid-template-columns: repeat(var(--ergometer-day-slots), minmax(var(--ergometer-slot-width), 1fr));
}

.ergometer-percentage-slot {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.ergometer-percentage-slot + .ergometer-percentage-slot {
  border-left: 1px solid rgba(121, 141, 153, 0.42);
}

.ergometer-percentage-time {
  min-height: 46px;
  display: grid;
  place-content: center;
  gap: 1px;
  border-bottom: 1px solid rgba(121, 141, 153, 0.42);
  color: var(--text);
  background: rgba(248, 250, 251, 0.78);
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

.ergometer-percentage-time span + span::before {
  content: "";
  width: 14px;
  display: block;
  margin: 0 auto 2px;
  border-top: 1px solid var(--muted);
}

.ergometer-percentage-zones {
  min-width: 0;
}

.ergometer-percentage-zone {
  min-width: 0;
  display: block;
}

.ergometer-percentage-zone + .ergometer-percentage-zone {
  border-top: 2px solid rgba(86, 104, 115, 0.58);
}

.ergometer-percentage-stack {
  height: calc(var(--ergometer-zone-positions) * 11px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.ergometer-percentage-segment {
  width: 100%;
  min-height: 0;
  flex: 0 0 var(--ergometer-segment-share);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  margin: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(39, 55, 65, 0.22);
  border-left: 0;
  border-radius: 0;
  padding: 1px 2px;
  color: #000;
  background: var(--ergometer-segment-color);
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  appearance: none;
}

.ergometer-percentage-segment:last-child {
  border-bottom: 0;
}

.ergometer-percentage-segment.is-free {
  color: var(--muted);
  background: rgba(244, 247, 248, 0.7);
}

.ergometer-percentage-segment-value {
  flex: 0 0 auto;
  color: #000;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ergometer-percentage-segment.is-interactive {
  cursor: pointer;
}

.ergometer-percentage-segment.is-interactive:hover {
  filter: brightness(0.94);
}

.ergometer-percentage-segment.is-interactive:focus-visible {
  z-index: 1;
  outline: 2px solid var(--navigation-blue);
  outline-offset: -2px;
}

.ergometer-percentage-group-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--text);
  font-size: 11px;
}

.ergometer-percentage-group-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ergometer-percentage-group-key i {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid rgba(39, 55, 65, 0.28);
  border-radius: 3px;
  background: var(--ergometer-key-color);
}

.ergometer-percentage-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 11px;
}

.ergometer-percentage-key span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.ergometer-percentage-key strong {
  color: var(--navigation-blue);
  font-weight: 600;
}

.ergometer-admin-visual {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.ergometer-admin-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.ergometer-admin-visual-header h4 {
  margin: 0;
  color: var(--navigation-blue);
}

.ergometer-admin-visual-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ergometer-combined-schedule {
  min-width: 0;
}

.ergometer-schedule-table-wrap {
  max-height: none;
  background: #fff;
}

.ergometer-schedule-table {
  min-width: 965px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.ergometer-schedule-table th,
.ergometer-schedule-table td {
  border-right: 1px solid #c9d0cb;
  border-bottom: 1px solid #c9d0cb;
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
}

.ergometer-schedule-table thead th {
  top: 0;
  height: 38px;
  z-index: 4;
  color: var(--text);
  background: #f0f4f1;
}

.ergometer-time-heading,
.ergometer-slot-time {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.ergometer-row-heading,
.ergometer-row-name {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}

.ergometer-time-heading {
  left: 0;
  z-index: 6 !important;
}

.ergometer-row-heading {
  left: 92px;
  z-index: 6 !important;
}

.ergometer-slot-time {
  position: sticky;
  top: auto;
  left: 0;
  z-index: 3;
  color: var(--text);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ergometer-slot-time span + span::before {
  content: "-";
  padding: 0 2px;
  color: var(--muted);
}

.ergometer-row-name {
  position: sticky;
  top: auto;
  left: 92px;
  z-index: 3;
  color: var(--text);
  background: #f7f9f7;
  font-size: 11px;
  text-align: center !important;
  white-space: nowrap;
}

.ergometer-slot-start > * {
  border-top: 1px solid #9da9a2;
}

.ergometer-day-banner th {
  position: static;
  height: auto;
  padding: 9px 10px 7px;
  border-top: 8px solid #fff;
  border-right: 0;
  color: var(--text);
  background: #e9efeb;
  font-size: 13px;
  text-align: left;
}

.ergometer-schedule-table tbody .ergometer-day-banner:first-child th {
  border-top: 0;
}

.ergometer-position-number {
  color: var(--text);
  font-size: 11px;
  background: #f7f9f7;
}

.ergometer-group-cell {
  height: 38px;
  padding: 5px 3px;
  background: var(--ergometer-group-color);
  color: var(--ergometer-group-text);
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

.ergometer-group-cell span {
  display: block;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ergometer-schedule-table tr:hover td.ergometer-group-cell {
  background-color: var(--ergometer-group-color);
}

.ergometer-schedule-table tr:hover td.ergometer-free-cell {
  background: #f7faf8;
}

.ergometer-schedule-table tr:hover td.ergometer-unavailable-cell {
  background: #fff;
}

.ergometer-free-cell,
.ergometer-unavailable-cell {
  height: 38px;
  background: #fff;
}

.ergometer-v2-table-wrap {
  max-height: calc(100vh - 285px);
}

.ergometer-schedule-table.ergometer-v2-table {
  min-width: 1450px;
}

.ergometer-v2-table thead tr:first-child th {
  top: 0;
  height: 36px;
}

.ergometer-v2-table thead tr:nth-child(2) th {
  top: 36px;
  height: 46px;
}

.ergometer-v2-row-heading,
.ergometer-v2-zone-name {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}

.ergometer-v2-position-heading,
.ergometer-v2-position-number {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}

.ergometer-v2-row-heading {
  left: 0;
  z-index: 6 !important;
}

.ergometer-v2-position-heading {
  left: 52px;
  z-index: 6 !important;
}

.ergometer-v2-zone-name {
  position: sticky;
  top: auto;
  left: 0;
  z-index: 3;
  color: var(--text);
  background: #f7f9f7;
  text-align: center !important;
}

.ergometer-v2-position-number {
  position: sticky;
  top: auto;
  left: 52px;
  z-index: 3;
  color: var(--text);
  background: #fff;
  font-size: 11px;
  text-align: center !important;
}

.ergometer-v2-time-heading {
  min-width: 82px;
}

.ergometer-v2-time-heading span {
  display: block;
  font-size: 11px;
  line-height: 1.35;
}

.ergometer-v2-time-heading span + span::before {
  content: "- ";
}

.ergometer-v2-zone-start > * {
  border-top: 2px solid #76847c;
}

.ergometer-v2-group-cell {
  height: 28px;
  padding: 4px 2px;
  background: var(--ergometer-group-color);
  color: var(--ergometer-group-text);
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

.ergometer-v2-group-cell span {
  display: inline-block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
}

.ergometer-v2-free-cell {
  height: 28px;
  background: #fff;
}

.ergometer-v2-table tr:hover td.ergometer-v2-group-cell {
  background: var(--ergometer-group-color);
}

.ergometer-v2-table tr:hover td.ergometer-v2-free-cell {
  background: #f7faf8;
}

.ergometer-schedule-table.ergometer-v4-table {
  --ergometer-v4-label-font-size: 8px;
  min-width: 1140px;
}

.ergometer-v4-table thead tr:first-child th {
  top: 0;
  height: 34px;
}

.ergometer-v4-table thead tr:nth-child(2) th {
  top: 34px;
  height: 42px;
}

.ergometer-v4-table .ergometer-v2-time-heading {
  min-width: 76px;
  padding: 3px 2px 2px;
  vertical-align: bottom;
}

.ergometer-v4-table .ergometer-v2-time-heading .ergometer-v4-time-range {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.ergometer-v4-table .ergometer-v2-time-heading .ergometer-v4-time-range span {
  display: inline;
  font-size: var(--ergometer-v4-label-font-size);
  font-weight: 400;
  line-height: 1;
}

.ergometer-v4-table .ergometer-v2-time-heading .ergometer-v4-time-range span + span::before {
  content: none;
}

.ergometer-v4-table .ergometer-v2-zone-start > * {
  border-top: 1px solid #bcc5c0;
}

.ergometer-v4-position-row {
  height: 36px;
}

.ergometer-v4-free-cell,
.ergometer-v4-group-cell {
  height: 36px;
  padding: 2px !important;
  background: #fff;
  vertical-align: middle !important;
}

.ergometer-v4-free-square {
  display: block;
  width: 24px;
  max-width: 100%;
  margin: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid #d1d8d4;
  border-radius: 3px;
  background: #fff;
}

.ergometer-v4-group-card {
  display: grid;
  width: 100%;
  min-height: calc(var(--ergometer-v4-span) * 36px - 4px);
  grid-template-rows: 18px minmax(0, 1fr);
  gap: 2px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid #c4ccc7;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ergometer-group-color) 28%, white);
}

.ergometer-v4-group-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 3px;
  background: var(--ergometer-group-color);
  color: #000;
  font-size: var(--ergometer-v4-label-font-size);
  font-weight: 400;
  line-height: 1;
  padding: 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ergometer-v4-group-machines {
  display: grid;
  grid-template-rows: repeat(var(--ergometer-v4-span), minmax(0, 1fr));
  align-items: center;
  gap: 2px;
}

.ergometer-v4-machine-square {
  display: block;
  width: 24px;
  max-width: 100%;
  margin: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(23, 33, 43, 0.18);
  border-radius: 3px;
  background: var(--ergometer-group-color);
}

.ergometer-v4-table tr:hover td.ergometer-v4-free-cell,
.ergometer-v4-table tr:hover td.ergometer-v4-group-cell {
  background: #fff;
}

.ergometer-schedule-table.ergometer-v3-table {
  --ergometer-v3-label-font-size: 11px;
  min-width: 900px;
}

.ergometer-v3-time-column {
  width: 48px;
}

.ergometer-v3-table thead tr:first-child th {
  top: 0;
  height: 32px;
}

.ergometer-v3-table thead tr:nth-child(2) th {
  top: 32px;
  height: 30px;
}

.ergometer-v3-time-heading {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  left: 0;
  z-index: 6 !important;
}

.ergometer-v3-zone-heading {
  color: var(--text);
  background: #e9efeb !important;
  font-size: 11px;
}

.ergometer-v3-position-number {
  padding: 3px 1px !important;
  color: var(--text);
  background: #f7f9f7 !important;
  font-size: 9px;
}

.ergometer-v3-zone-boundary {
  border-left: 1px solid #d7ddd9 !important;
}

.ergometer-v3-cell {
  height: auto;
  padding: 0 !important;
  border-right: 0 !important;
  border-bottom-color: #dde2df !important;
}

.ergometer-v3-square {
  display: block;
  width: min(calc(100% - 4px), 24px);
  min-height: 0;
  margin: 2px auto;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid #d1d8d4;
  border-radius: 3px;
}

.ergometer-v3-label-spacer,
.ergometer-v3-group-label {
  display: flex;
  width: 100%;
  height: 18px;
  padding: 0 3px;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid #dde2df;
  font-size: 8px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ergometer-v3-label-spacer {
  background: #fff;
}

.ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-label {
  display: flex;
  justify-content: flex-start;
  background: var(--ergometer-group-color);
  color: #000;
  font-size: var(--ergometer-v3-label-font-size);
  font-weight: 400;
  text-align: left;
}

.ergometer-v3-group-label.is-booking-list-trigger {
  cursor: pointer;
}

.ergometer-v3-group-label.is-booking-list-trigger:hover,
.ergometer-v3-group-label.is-booking-list-trigger:focus-visible {
  outline: 2px solid rgba(23, 33, 43, 0.5);
  outline-offset: -2px;
}

.ergometer-v3-group-label > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ergometer-booking-status {
  margin-left: auto;
  padding-left: 4px;
  color: rgba(23, 33, 43, 0.72);
  font-size: 10px;
  white-space: nowrap;
}

.ergometer-waitlist-button {
  min-height: 16px;
  margin-left: 4px;
  padding: 1px 4px;
  border: 1px solid rgba(23, 33, 43, 0.28);
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  font-size: 9px;
  line-height: 1.15;
}

.ergometer-v3-table .ergometer-group-cell {
  padding: 2px !important;
}

.ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid #c4ccc7;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ergometer-group-color) 28%, white);
}

.ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-squares {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--ergometer-v3-span), minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: color-mix(in srgb, var(--ergometer-group-color) 28%, white);
}

.ergometer-v3-table .ergometer-group-cell .ergometer-v3-machine-square {
  position: relative;
  display: block;
  width: min(100%, 24px);
  min-width: 0;
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(23, 33, 43, 0.18);
  border-radius: 3px;
  background: var(--ergometer-group-color);
}

button.ergometer-v3-machine-square {
  width: min(100%, 24px);
  margin-inline: auto;
  appearance: none;
}

button.ergometer-v3-machine-square.is-bookable {
  cursor: pointer;
}

button.ergometer-v3-machine-square.is-bookable:hover,
button.ergometer-v3-machine-square.is-bookable:focus-visible {
  border-color: #17212b;
  box-shadow: inset 0 0 0 1px #17212b;
  outline: 0;
}

.ergometer-v3-machine-square.is-booked {
  border-color: #6f7974;
  background: #89938e;
}

button.ergometer-v3-machine-square.is-booked {
  cursor: not-allowed;
}

button.ergometer-v3-machine-square.is-mine {
  border: 2px solid #0c6245;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--ergometer-group-color);
  cursor: pointer;
}

.ergometer-v3-machine-square.is-booked::after,
.ergometer-v3-machine-square.is-mine::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: "×";
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.ergometer-v3-machine-square.is-mine::after {
  color: #0c6245;
}

button.ergometer-v3-machine-square.is-locked {
  opacity: 0.52;
  cursor: not-allowed;
}

.ergometer-v3-table .ergometer-group-cell .ergometer-v3-machine-zone-boundary {
  box-shadow: -2px 0 0 #d7ddd9;
}

.ergometer-v3-table .ergometer-group-cell {
  color: #000;
  background: #fff;
}

.ergometer-v3-table tr:hover td.ergometer-group-cell {
  background: #fff;
}

.ergometer-v3-slot-row > * {
  border-top: 0 !important;
  border-bottom: 1px solid #c7cfca !important;
  box-shadow: none;
}

.ergometer-v3-slot-row {
  outline: 0;
}

.ergometer-v3-table .ergometer-day-banner th {
  border-bottom: 1px solid #c7cfca;
}

.ergometer-v3-table .ergometer-day-banner th > span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.ergometer-v3-slot-time {
  position: relative;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: auto;
  padding: 0 !important;
  border-right: 0 !important;
  vertical-align: middle !important;
}

.ergometer-v3-time-stack {
  position: absolute;
  inset: 3px 5px;
  display: flex !important;
  width: auto;
  height: auto;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--ergometer-v3-label-font-size);
  line-height: 1;
}

.ergometer-v3-time-stack > span {
  display: block;
}

.ergometer-v3-time-stack > span:first-child {
  display: flex;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
}

.ergometer-v3-time-stack > span:last-child {
  color: var(--muted);
}

.ergometer-v3-time-stack > span + span::before {
  content: none;
  padding: 0;
}

body.ergometer-fullscreen-open {
  overflow: hidden;
}

.activity-calendar-section {
  min-width: 0;
}

.activity-calendar-header > div:first-child {
  display: grid;
  gap: 3px;
}

.activity-calendar-header > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.activity-calendar-body {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.activity-calendar-navigation {
  display: grid;
  grid-template-columns: 36px auto minmax(180px, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.activity-calendar-navigation h3 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.activity-calendar-navigation .icon-button,
.activity-calendar-panel-header .icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.calendar-view-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.calendar-view-switcher {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.calendar-view-switcher button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.68);
}

.calendar-view-switcher button:last-child {
  border-right: 0;
}

.calendar-view-switcher button.is-active {
  background: var(--navigation-blue);
  color: #fff;
}

.calendar-period-navigation {
  display: grid;
  grid-template-columns: 44px minmax(160px, 1fr) 44px auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-period-navigation h3 {
  min-width: 0;
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.calendar-period-navigation button {
  min-height: 44px;
}

.calendar-period-navigation .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.calendar-week-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--line);
  overscroll-behavior-inline: contain;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
}

.calendar-week-day {
  min-width: 0;
  min-height: 220px;
  background: rgba(255, 255, 255, 0.94);
}

.calendar-week-day > header {
  display: flex;
  min-height: 48px;
  padding: 4px;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.calendar-week-day > header > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.calendar-week-day > header span {
  color: var(--muted);
  font-size: 10px;
}

.calendar-week-day > header strong {
  font-size: 14px;
}

.calendar-week-day.is-today > header strong {
  color: var(--navigation-blue);
}

.calendar-week-events {
  display: grid;
  padding: 5px;
  align-content: start;
  gap: 5px;
}

.calendar-period-create {
  min-width: 58px;
  min-height: 44px;
  padding: 7px 10px;
}

.calendar-period-create.is-compact {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 22px;
}

.calendar-period-event {
  display: grid;
  min-width: 0;
  min-height: 44px;
  padding: 7px 8px;
  gap: 2px;
  border: 1px solid rgba(61, 132, 178, 0.3);
  border-left: 3px solid var(--navigation-blue-light);
  border-radius: 5px;
  background: var(--navigation-blue-soft);
  color: var(--text);
  text-align: left;
}

.calendar-period-event:hover {
  border-color: var(--navigation-blue-light);
  background: rgba(205, 228, 242, 0.82);
}

.calendar-period-event span,
.calendar-period-event strong,
.calendar-period-event small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-period-event-time,
.calendar-period-event small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-period-event strong {
  font-size: 13px;
  font-weight: 600;
}

.calendar-empty-day {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-agenda {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.calendar-agenda-day {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.calendar-agenda-day > header {
  display: flex;
  min-height: 54px;
  padding: 7px 9px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.calendar-agenda-day.is-today > header {
  box-shadow: inset 4px 0 0 var(--navigation-blue);
}

.calendar-agenda-day > header > div {
  min-width: 0;
}

.calendar-agenda-day h4 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
}

.calendar-agenda-day > header span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-agenda-events {
  display: grid;
  min-width: 0;
  padding: 8px;
  gap: 7px;
}

.activity-calendar-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--line);
}

.activity-calendar-weekdays,
.activity-calendar-grid {
  display: grid;
  min-width: 770px;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 1px;
}

.activity-calendar-weekdays {
  border-bottom: 1px solid var(--line-strong);
}

.activity-calendar-weekdays span {
  padding: 9px 8px;
  background: var(--surface-2);
  color: var(--navigation-blue);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.activity-calendar-day {
  position: relative;
  min-height: 118px;
  padding: 34px 6px 6px;
  background: rgba(255, 255, 255, 0.96);
}

.activity-calendar-day.is-other-month {
  background: rgba(246, 248, 247, 0.9);
}

.activity-calendar-date {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  width: 100%;
  height: 100%;
  padding: 5px 6px;
  align-items: flex-start;
  justify-content: flex-end;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.activity-calendar-date:hover {
  background: rgba(205, 228, 242, 0.28);
  color: var(--navigation-blue);
}

.activity-calendar-date span {
  display: grid;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  place-items: center;
}

.activity-calendar-day.is-other-month .activity-calendar-date {
  color: var(--muted);
}

.activity-calendar-day.is-today .activity-calendar-date span {
  background: var(--navigation-blue);
  color: #fff;
}

.activity-calendar-day-events {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.activity-calendar-event {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 5px 6px;
  gap: 2px;
  border: 1px solid rgba(61, 132, 178, 0.3);
  border-left: 3px solid var(--navigation-blue-light);
  border-radius: 5px;
  background: var(--navigation-blue-soft);
  color: var(--text);
  text-align: left;
}

.activity-calendar-event:hover {
  border-color: var(--navigation-blue-light);
  background: rgba(205, 228, 242, 0.82);
}

.activity-calendar-event span,
.activity-calendar-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-calendar-event span {
  color: var(--muted);
  font-size: 10px;
}

.activity-calendar-event strong {
  font-size: 12px;
  font-weight: 600;
}

.vehicle-calendar-event small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-calendar-event.is-approved {
  border-color: rgba(31, 111, 91, 0.28);
  border-left-color: #78a895;
  background: color-mix(in srgb, var(--green-2) 82%, transparent);
}

.vehicle-calendar-event.is-approved:hover,
.vehicle-calendar-event.is-approved.is-selected {
  border-color: #78a895;
  background: var(--green-2);
}

.vehicle-calendar-event.is-pending {
  border-color: rgba(168, 103, 18, 0.28);
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber-2) 84%, transparent);
}

.vehicle-calendar-event.is-pending:hover,
.vehicle-calendar-event.is-pending.is-selected {
  border-color: #d1a15f;
  background: var(--amber-2);
}

.profile-activity-calendar-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.profile-activity-calendar-source-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-activity-calendar-source-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  cursor: pointer;
}

.profile-activity-calendar-source-option:has(input:checked) {
  border-color: var(--navigation-blue-light);
  background: var(--navigation-blue-soft);
}

.profile-activity-calendar-source-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--navigation-blue);
}

.profile-activity-calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.profile-activity-calendar-swatch {
  width: 18px;
  height: 10px;
  border: 1px solid rgba(61, 132, 178, 0.34);
  border-radius: 3px;
  background: #afcde0;
}

.profile-activity-calendar-swatch.is-ergometer {
  border-color: rgba(86, 102, 110, 0.28);
  background: #e2efd9;
}

.profile-activity-calendar-swatch.is-appointment {
  border-color: rgba(110, 71, 120, 0.28);
  background: #d6bedc;
}

.profile-activity-calendar-swatch.is-activity {
  border-color: rgba(149, 104, 29, 0.28);
  background: #e7c58a;
}

.profile-activity-calendar-swatch.is-vehicle {
  border-color: rgba(55, 108, 86, 0.28);
  background: #8fb7a7;
}

.profile-activity-calendar-event {
  border-left-color: var(--profile-activity-color, var(--navigation-blue-light));
  background: color-mix(in srgb, var(--profile-activity-color, var(--navigation-blue-light)) 28%, transparent);
}

.profile-activity-calendar-event:hover,
.profile-activity-calendar-event.is-selected {
  border-color: var(--profile-activity-color, var(--navigation-blue-light));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--profile-activity-color, var(--navigation-blue-light)) 50%, transparent);
}

.profile-activity-calendar-section div.activity-calendar-date {
  cursor: default;
}

.profile-activity-calendar-section div.activity-calendar-date:hover {
  background: transparent;
  color: inherit;
}

.profile-activity-calendar-section button.activity-calendar-date {
  cursor: pointer;
}

.profile-activity-calendar-section button.activity-calendar-date span {
  position: absolute;
  top: 5px;
  right: 6px;
  cursor: pointer;
}

.profile-activity-calendar-section button.activity-calendar-date:hover {
  background: rgba(205, 228, 242, 0.28);
  color: var(--navigation-blue);
}

.profile-activity-calendar-section,
.profile-activity-calendar-section > .section-body {
  background: transparent;
}

.profile-activity-calendar-section .activity-calendar-scroll {
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.profile-activity-calendar-section .activity-calendar-weekdays span {
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
}

.profile-activity-calendar-section .activity-calendar-day,
.profile-activity-calendar-section .activity-calendar-day.is-other-month {
  background: color-mix(in srgb, var(--surface) 18%, transparent);
}

.profile-activity-calendar-section .activity-calendar-panel {
  background: color-mix(in srgb, #f5fafd 62%, transparent);
}

.activity-calendar-section,
.activity-calendar-section > .section-body {
  background: transparent;
}

.activity-calendar-section .activity-calendar-scroll {
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.activity-calendar-section .activity-calendar-weekdays span {
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
}

.activity-calendar-section .activity-calendar-day,
.activity-calendar-section .activity-calendar-day.is-other-month {
  background: color-mix(in srgb, var(--surface) 18%, transparent);
}

.activity-calendar-section .calendar-week-scroll,
.profile-activity-calendar-section .calendar-week-scroll {
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.activity-calendar-section .calendar-week-day,
.profile-activity-calendar-section .calendar-week-day,
.activity-calendar-section .calendar-agenda-day,
.profile-activity-calendar-section .calendar-agenda-day {
  background: color-mix(in srgb, var(--surface) 18%, transparent);
}

.activity-calendar-section .calendar-week-day > header,
.profile-activity-calendar-section .calendar-week-day > header,
.activity-calendar-section .calendar-agenda-day > header,
.profile-activity-calendar-section .calendar-agenda-day > header {
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
}

.activity-calendar-panel {
  border: 1px solid var(--navigation-blue-light);
  border-radius: 6px;
  background: rgba(245, 250, 253, 0.96);
}

.activity-calendar-panel-header {
  display: flex;
  min-height: 58px;
  padding: 11px 13px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.activity-calendar-panel-header h3 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 16px;
  font-weight: 600;
}

.activity-calendar-panel-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.activity-calendar-form {
  padding: 13px;
}

.activity-calendar-form textarea {
  min-height: 76px;
  resize: vertical;
}

.activity-calendar-form-actions {
  justify-content: flex-end;
}

.personal-calendar-appointment-actions {
  align-items: center;
  justify-content: space-between;
}

.personal-calendar-appointment-primary-actions {
  display: flex;
  gap: 8px;
}

.activity-calendar-detail-list {
  display: grid;
  margin: 0;
  padding: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}

.activity-calendar-detail-list div {
  min-width: 0;
}

.activity-calendar-detail-list dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.activity-calendar-detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.activity-calendar-detail-actions {
  display: flex;
  padding: 12px 13px 13px;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.vehicle-booking-dialog-actions {
  justify-content: flex-end;
}

.table-detail-dialog {
  width: min(var(--dialog-width-large), 100%);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.table-detail-dialog--wide {
  width: min(var(--dialog-width-xlarge), 100%);
}

.table-detail-dialog-header {
  flex: 0 0 auto;
  display: flex;
  min-height: 62px;
  padding: 11px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.table-detail-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.table-detail-dialog-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.table-detail-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.table-detail-dialog-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.table-detail-dialog-body > .section {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.table-detail-dialog-body > .section > .section-header {
  min-height: 0;
  justify-content: flex-end;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
}

.table-detail-dialog-body > .section > .section-header > h2 {
  display: none;
}

.table-detail-dialog-body > .section > .section-header:not(:has(.header-actions)) {
  display: none;
}

.table-detail-dialog-body > .section > .section-body,
.table-detail-dialog-body > .section > form.section-body {
  padding: 0;
}

.table-detail-dialog-body > .inline-training-program-detail > .section-header {
  display: none;
}

.table-detail-dialog .table-wrap {
  max-height: min(54dvh, 520px);
}

@media (max-width: 700px) {
  .table-detail-dialog-backdrop {
    padding: 8px;
  }

  .table-detail-dialog {
    max-height: calc(100dvh - 16px);
  }

  .table-detail-dialog-header {
    min-height: 56px;
    padding: 9px 10px;
  }

  .table-detail-dialog-header h2 {
    font-size: 16px;
  }

  .table-detail-dialog-body {
    padding: 10px;
  }
}

.activity-calendar-dialog {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.activity-calendar-detail-dialog {
  width: min(var(--dialog-width-small), 100%);
}

.activity-calendar-dialog-header {
  display: flex;
  min-height: 72px;
  padding: 15px 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.activity-calendar-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.activity-calendar-dialog-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.activity-calendar-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.assignment-create-dialog,
.assignment-plan-edit-dialog,
.boat-create-dialog,
.actor-create-dialog {
  width: min(800px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.assignment-create-dialog-header,
.assignment-plan-edit-dialog-header,
.boat-create-dialog-header,
.actor-create-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 54px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.assignment-create-dialog-header h2,
.assignment-plan-edit-dialog-header h2,
.boat-create-dialog-header h2,
.actor-create-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.assignment-create-dialog-close,
.assignment-plan-edit-dialog-close,
.boat-create-dialog-close,
.actor-create-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.assignment-create-dialog {
  width: min(960px, 100%);
}

.assignment-create-dialog-body {
  padding: 14px;
}

.assignment-plan-edit-dialog {
  width: min(760px, 100%);
}

.assignment-plan-edit-dialog-body {
  padding: 14px;
}

.usage-plan-participation-dialog {
  width: min(780px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.usage-plan-participation-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 62px;
  padding: 12px 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.usage-plan-participation-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.usage-plan-participation-dialog-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.usage-plan-participation-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.usage-plan-participation-dialog-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.usage-plan-substitute-group {
  display: grid;
  gap: 7px;
}

.usage-plan-substitute-group h3,
.usage-plan-alternative-solution > span {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 13px;
  font-weight: 600;
}

.usage-plan-substitute-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.usage-plan-substitute-heading input {
  width: min(280px, 100%);
}

.usage-plan-substitute-table-wrap {
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.usage-plan-substitute-table {
  width: 100%;
  min-width: 440px;
  table-layout: fixed;
  background: transparent;
}

.usage-plan-substitute-table thead,
.usage-plan-substitute-table tbody,
.usage-plan-substitute-table tr,
.usage-plan-substitute-table th,
.usage-plan-substitute-table td {
  background: transparent;
}

.usage-plan-substitute-table th,
.usage-plan-substitute-table td {
  padding: 6px 8px;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.usage-plan-substitute-table th:nth-child(2),
.usage-plan-substitute-table td:nth-child(2) {
  width: 180px;
}

.usage-plan-substitute-table th:last-child,
.usage-plan-substitute-table td:last-child {
  width: 62px;
  text-align: center;
}

.usage-plan-substitute-choice label {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  cursor: pointer;
}

.usage-plan-substitute-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--navigation-blue);
}

.usage-plan-alternative-solution {
  display: grid;
  gap: 6px;
}

.usage-plan-alternative-solution textarea {
  min-height: 72px;
  resize: vertical;
}

.usage-plan-participation-help {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.usage-plan-participation-dialog-actions {
  justify-content: flex-end;
  margin: 0;
  padding-top: 2px;
}

@media (max-width: 700px) {
  .usage-plan-participation-dialog-backdrop {
    padding: 8px;
  }

  .usage-plan-participation-dialog {
    max-height: calc(100vh - 16px);
  }

  .usage-plan-substitute-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-plan-substitute-heading input {
    width: 100%;
  }

  .usage-plan-participation-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-plan-participation-dialog-actions > button {
    width: 100%;
  }
}

.profile-boat-request-dialog {
  width: min(var(--dialog-width-large), 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.profile-boat-request-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 54px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.profile-boat-request-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.profile-boat-request-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.profile-boat-request-dialog-header > div {
  display: grid;
  gap: 2px;
}

.profile-boat-request-dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-boat-request-dialog-body {
  padding: 12px 14px 14px;
}

.profile-boat-request-dialog-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.team-form {
  gap: 10px;
  padding: 12px 14px 14px;
}

.team-form textarea {
  min-height: 50px;
}

.team-form .detail-group {
  gap: 6px;
  padding-top: 8px;
}

.team-form .line-item {
  padding-block: 5px;
}

.team-form .actor-create-member-tools {
  margin-bottom: 4px;
}

.team-form .actor-create-member-table-wrap {
  max-height: 168px;
}

.team-form .form-actions {
  margin-top: 4px;
}

.team-form .team-form-deactivate-actions {
  align-items: center;
  justify-content: space-between;
}

.team-form-save-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.personal-settings-dialog {
  width: min(var(--dialog-width-small), 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.personal-settings-dialog--ergometer {
  width: min(var(--dialog-width-large), 100%);
}

.personal-settings-dialog-header {
  display: flex;
  min-height: 76px;
  padding: 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.personal-settings-dialog-header h2 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 18px;
}

.personal-settings-dialog-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.personal-settings-dialog-body {
  padding: 0 16px 16px;
}

.personal-settings-description {
  display: grid;
  gap: 16px;
}

.personal-settings-description-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.personal-settings-description section {
  margin: 0;
}

.personal-settings-description section + section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.personal-settings-description h3 {
  margin: 0 0 6px;
  color: var(--navigation-blue);
  font-size: 14px;
  font-weight: 600;
}

.personal-settings-description p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.personal-settings-specific {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.personal-settings-choice {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  border: 0;
}

.personal-settings-choice legend {
  margin-bottom: 8px;
  color: var(--navigation-blue);
  font-size: 14px;
  font-weight: 600;
}

.personal-settings-choice label {
  display: flex;
  min-height: 42px;
  padding: 9px 11px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.personal-settings-choice label:has(input:checked) {
  border-color: var(--navigation-blue-light);
  background: var(--navigation-blue-soft);
}

.personal-settings-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navigation-blue);
}

.personal-settings-scope-status {
  margin: 9px 0 0;
  color: var(--navigation-blue);
  font-size: 13px;
}

.personal-settings-time-section {
  display: grid;
  margin-top: 18px;
  gap: 9px;
}

.personal-settings-time-section h3 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 14px;
}

.personal-settings-time-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.personal-settings-time-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.personal-settings-time-heading button {
  flex: 0 0 auto;
}

.personal-settings-time-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.personal-settings-time-actions button {
  min-width: 152px;
}

.personal-settings-time-table-wrap {
  max-height: min(420px, calc(100vh - 300px));
  border-radius: 6px;
}

.personal-settings-time-table {
  min-width: 760px;
}

.personal-settings-time-table th,
.personal-settings-time-table td {
  padding: 8px 10px;
  text-align: left;
}

.personal-settings-time-table th:first-child,
.personal-settings-time-table td:first-child {
  width: 58px;
  text-align: center;
}

.personal-settings-time-table input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navigation-blue);
}

.personal-settings-time-table tr.is-disabled td {
  color: var(--muted);
}

.personal-settings-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.ergometer-booking-dialog {
  width: min(var(--dialog-width-medium), 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(23, 33, 43, 0.24);
}

.ergometer-booking-dialog-header {
  display: flex;
  min-height: 68px;
  padding: 14px 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.ergometer-booking-dialog-header h2 {
  margin: 0;
  font-size: 18px;
}

.ergometer-booking-dialog-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.ergometer-booking-dialog-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.ergometer-booking-dialog-summary {
  display: flex;
  padding: 12px 16px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.ergometer-booking-dialog-summary strong {
  color: var(--text);
}

.ergometer-booking-list-table-wrap {
  max-height: min(480px, calc(100vh - 210px));
  border: 0;
  border-radius: 0;
}

.ergometer-booking-list-table th,
.ergometer-booking-list-table td {
  text-align: left;
}

.ergometer-booking-list-table button {
  min-height: 40px;
  white-space: nowrap;
}

.ergometer-guest-list-actions {
  display: flex;
  min-height: 68px;
  padding: 12px 16px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.ergometer-guest-list-actions:empty {
  display: none;
}

.ergometer-guest-list-actions button {
  min-width: 150px;
}

.ergometer-booking-list-empty {
  margin: 16px;
}

.ergometer-booking-dialog-options {
  padding: 14px 16px;
}

.ergometer-booking-dialog-options .ergometer-simple-group-detail {
  padding: 0;
  border-top: 0;
}

.ergometer-booking-dialog-actions {
  display: flex;
  min-height: 60px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.ergometer-booking-dialog-actions span {
  color: var(--muted);
  font-size: 13px;
}

.ergometer-booking-dialog-actions button {
  min-width: 150px;
}

.ergometer-fullscreen-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 8px;
  overflow: hidden;
  background: #fff;
}

.ergometer-fullscreen-close {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 1001;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-color: rgba(23, 33, 43, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.ergometer-fullscreen-plan,
.ergometer-fullscreen-plan .ergometer-combined-schedule,
.ergometer-fullscreen-plan .ergometer-schedule-table-wrap {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-height: none;
}

.ergometer-fullscreen-plan .ergometer-schedule-table-wrap {
  overflow: hidden;
}

.ergometer-fullscreen-plan .ergometer-schedule-table.ergometer-v3-table {
  width: 100%;
  height: calc(100vh - 16px);
  min-width: 0;
}

.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-day-banner {
  height: 26px;
}

.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-day-banner th {
  height: 26px;
  padding: 3px 4px;
}

.ergometer-fullscreen-plan .ergometer-v3-slot-row {
  height: auto;
}

.ergometer-fullscreen-plan .ergometer-v3-cell,
.ergometer-fullscreen-plan .ergometer-v3-slot-time {
  height: auto;
}

.ergometer-fullscreen-plan .ergometer-v3-label-spacer,
.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-label {
  height: 15px;
  min-height: 15px;
}

.ergometer-fullscreen-plan .ergometer-v3-square {
  width: calc(100% - 4px);
  height: calc(100% - 19px);
  min-height: 0;
  aspect-ratio: auto;
}

.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-card {
  display: grid;
  height: 100%;
  grid-template-rows: 15px minmax(0, 1fr);
}

.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-squares {
  height: 100%;
  min-height: 0;
}

.ergometer-fullscreen-plan .ergometer-v3-table .ergometer-group-cell .ergometer-v3-machine-square {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-inline: 0;
  aspect-ratio: auto;
}

.ergometer-fullscreen-plan .ergometer-v3-time-stack {
  inset: 2px 4px;
}

.ergometer-fullscreen-plan .ergometer-v3-time-stack > span:first-child {
  height: 15px;
  flex-basis: 15px;
}

.ergometer-admin-body {
  gap: 24px;
}

.ergometer-admin-primary-tools {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.ergometer-admin-primary-tools > .ergometer-admin-block {
  min-width: 0;
}

.ergometer-admin-primary-tools .ergometer-admin-table table {
  min-width: 620px;
}

.ergometer-admin-primary-tools .ergometer-inline-create {
  grid-template-columns: minmax(100px, 0.45fr) minmax(180px, 1fr) auto;
}

.ergometer-admin-primary-tools #ergometerSlotCreateForm {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ergometer-admin-primary-tools #ergometerSlotCreateForm button {
  grid-column: 1 / -1;
  justify-self: end;
}

.ergometer-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.ergometer-admin-toolbar button {
  min-height: 38px;
}

.ergometer-copy-year {
  width: 130px;
}

.ergometer-admin-footer {
  display: flex;
  padding-top: 2px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ergometer-admin-footer button {
  min-width: 150px;
}

.ergometer-admin-block {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ergometer-admin-block h4 {
  margin: 0;
  font-size: 15px;
}

.ergometer-plan-settings {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 0.75fr));
  gap: 10px;
  align-items: end;
}

.ergometer-zone-setting {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr);
  gap: 10px;
  align-items: end;
}

.ergometer-plan-settings .form-actions {
  grid-column: 1 / -1;
}

.ergometer-admin-table {
  max-height: 420px;
}

.ergometer-admin-table table {
  min-width: 760px;
}

.ergometer-admin-table input[type="color"] {
  width: 54px;
  min-width: 54px;
  height: 38px;
  padding: 3px;
}

.ergometer-admin-table .admin-actions {
  min-width: 190px;
}

.ergometer-allocation-admin-table table {
  min-width: 1180px;
}

.ergometer-inline-create {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.ergometer-inline-create button {
  min-height: 38px;
}

.ergometer-allocation-create {
  grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.8fr) repeat(2, minmax(100px, 0.55fr)) minmax(180px, 1fr) auto;
}

.admin-maintenance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-maintenance-actions span {
  color: var(--muted);
}

@media (max-width: 1240px) {
  .app-header {
    gap: 10px;
  }

  .nav-group-button {
    padding-right: 21px;
    padding-left: 8px;
  }

  .nav-group-button::after {
    right: 8px;
  }
}

@media (max-width: 1080px) {
  .ergometer-admin-primary-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-navigation-shell {
    position: sticky;
    top: 0;
    width: 100%;
    max-width: 100%;
  }

  .app-navigation-shell:has(.topbar) {
    position: static;
  }

  .app-header {
    position: sticky;
    top: 0;
  }

  .profile-ergometer-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .home-background-preview-panel {
    grid-template-columns: 1fr;
  }

  .home-background-library-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .home-background-upload-form {
    justify-content: flex-start;
  }

  .profile-ergometer-controls > button {
    width: 100%;
  }

  .ergometer-simple-waitlist-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ergometer-simple-waitlist-summary {
    min-height: var(--control-height-touch);
  }

  .ergometer-simple-waitlist-action {
    width: 100%;
  }

  .ergometer-my-booking-cancel {
    width: 100%;
  }

  .profile-usage-plan-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-usage-plan-actions > button {
    width: 100%;
  }

  .profile-usage-plan-people-grid {
    grid-template-columns: 1fr;
  }

  .training-program-import {
    gap: 12px;
  }

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

  .training-program-upload-actions,
  .training-program-upload-actions > button {
    width: 100%;
  }

  .ergometer-booking-dialog-backdrop {
    padding: 8px;
  }

  .ergometer-booking-dialog {
    max-height: calc(100vh - 16px);
  }

  .ergometer-booking-dialog-summary {
    flex-wrap: wrap;
  }

  .ergometer-booking-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ergometer-booking-dialog-actions button {
    width: 100%;
  }

  .ergometer-booking-list-table button,
  .ergometer-guest-list-actions button {
    min-height: 44px;
  }

  .ergometer-guest-list-actions,
  .ergometer-guest-list-actions button {
    width: 100%;
  }

  .app-header {
    width: 100%;
    max-width: 100%;
    min-height: calc(64px + env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1fr) var(--control-height-touch);
    padding:
      calc(8px + env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      8px
      max(12px, env(safe-area-inset-left));
  }

  .brand {
    max-width: 100%;
    overflow: hidden;
  }

  .brand > div {
    min-width: 0;
  }

  .brand strong,
  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .brand strong {
    font-size: 14px;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px - env(safe-area-inset-top));
    padding:
      8px
      max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--navigation-blue);
    box-shadow: 0 14px 24px rgba(20, 31, 28, 0.22);
  }

  .main-nav.mobile-open {
    display: grid;
    gap: 3px;
  }

  .nav-website-link {
    width: 100%;
    margin-top: 4px;
    padding: 11px 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0 0 var(--radius-small) var(--radius-small);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: inherit;
    font-weight: 650;
  }

  .nav-group-button {
    width: 100%;
    padding: 11px 34px 11px 10px;
    text-align: left;
  }

  .nav-logout-button {
    width: 100%;
    padding: 11px 10px;
    text-align: left;
  }

  .nav-group-button::after {
    right: 14px;
  }

  .nav-group.active > .nav-group-button {
    box-shadow: inset 3px 0 0 var(--navigation-blue-light);
  }

  .nav-dropdown,
  .nav-group:nth-last-child(-n + 2) .nav-dropdown {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin-top: 2px;
    padding: 4px 4px 5px 18px;
    overflow-y: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-group[data-nav-group="administration"] .nav-dropdown {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
  }

  .nav-dropdown-section-label {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.68);
  }

  .nav-dropdown button,
  .nav-dropdown a {
    color: rgba(255, 255, 255, 0.82);
  }

  .nav-dropdown button:hover,
  .nav-dropdown button.active,
  .nav-dropdown a:hover,
  .nav-dropdown a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .topbar {
    grid-template-columns: 1fr;
  }
  .admin-maintenance-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .grid-2,
  .grid-3,
  .detail-grid-2,
  .boat-detail-split,
  .metrics,
  .toolbar,
  .admin-add-form,
  .permission-legend {
    grid-template-columns: 1fr;
  }
  .toolbar.oar-filter-toolbar {
    grid-template-columns: 1fr;
  }
  .assignment-filter-toolbar .label > span,
  .boat-request-filter-toolbar .label > span,
  .movable-filter-toolbar .label > span,
  .rowing-machine-filter-toolbar .label > span,
  .team-filter-toolbar .label > span,
  .issue-filter-toolbar .label > span,
  .overview-filter-toolbar .label > span {
    min-height: 0;
  }
  .oar-assignment-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .oar-assignment-toolbar button {
    width: 100%;
  }
  .assignment-crew-grid,
  .responsible-contact,
  .crew-checklist,
  .responsibility-entry {
    grid-template-columns: 1fr;
  }
  .loan-table table {
    min-width: 760px;
  }
  .overview-table .inline-boat-detail {
    width: calc(100vw - 64px);
    max-width: calc(100vw - 64px);
  }
  .rowing-machines-table .inline-rowing-machine-detail {
    width: calc(100vw - 64px);
    max-width: calc(100vw - 64px);
  }
  .movable-upload-row {
    grid-template-columns: 1fr;
  }
  .movable-upload-row button {
    width: 100%;
  }
  .ergometer-admin-toolbar,
  .ergometer-plan-settings,
  .ergometer-zone-setting,
  .ergometer-inline-create,
  .ergometer-allocation-create {
    grid-template-columns: 1fr;
  }
  .ergometer-plan-settings .form-actions,
  .ergometer-zone-setting {
    grid-column: 1;
  }
  .ergometer-schedule-header {
    align-items: stretch;
    flex-direction: column;
  }
  .ergometer-screen-actions {
    justify-content: flex-start;
  }
}

/* Fast ugeplan for motorbåde */
.motorboat-schedule-view .section-header > div:first-child {
  display: grid;
  gap: 3px;
}

.motorboat-schedule-view .section-header > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

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

.motorboat-legend span {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--motorboat-color) 70%, #9aa7a0);
  border-radius: 6px;
  background: var(--motorboat-color);
  font-size: 12px;
}

.motorboat-schedule-wrap {
  position: relative;
  max-width: 100%;
  max-height: max(420px, calc(100vh - 250px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.motorboat-week-grid {
  display: grid;
  grid-template-columns: 72px repeat(var(--motorboat-column-count), minmax(72px, 1fr));
  grid-template-rows: 42px 34px repeat(56, 18px);
  min-width: var(--motorboat-grid-min-width, 1080px);
  background: #fff;
}

.motorboat-day-selector,
.motorboat-mobile-schedule {
  display: none;
}

.motorboat-time-heading,
.motorboat-day-heading,
.motorboat-lane-heading {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f8f6;
  font-size: 12px;
  font-weight: 700;
}

.motorboat-time-heading {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 8;
}

.motorboat-day-heading {
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 7;
  font-size: 13px;
}

.motorboat-lane-heading {
  position: sticky;
  top: 42px;
  z-index: 7;
  padding: 3px;
  background: var(--motorboat-color);
  font-size: 10px;
  text-align: center;
}

.motorboat-time-label {
  position: sticky;
  left: 0;
  z-index: 4;
  grid-column: 1;
  align-self: start;
  padding-right: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  text-align: right;
  transform: translateY(-5px);
  background: #fff;
}

.motorboat-time-label.is-final {
  align-self: end;
  transform: translateY(5px);
}

.motorboat-time-label.is-first {
  transform: translateY(3px);
}

.motorboat-grid-cell {
  border-top: 1px solid #edf0ee;
  border-right: 1px solid #edf0ee;
  background: #fff;
}

.motorboat-grid-cell.is-hour {
  border-top-color: #c9d1cc;
}

.motorboat-schedule-entry {
  z-index: 5;
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  margin: 2px 3px;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--motorboat-color) 65%, #71827a);
  border-left: 4px solid color-mix(in srgb, var(--motorboat-color) 55%, #315b4c);
  border-radius: 6px;
  background: var(--motorboat-color);
}

.motorboat-schedule-entry strong,
.motorboat-schedule-entry span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motorboat-schedule-entry strong {
  font-size: 11px;
}

.motorboat-schedule-entry span {
  font-size: 12px;
}

.motorboat-schedule-form {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.motorboat-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.motorboat-admin-table {
  max-height: var(--table-max-height);
}

.motorboat-admin-table table {
  min-width: 1120px;
}

.motorboat-admin-table th:nth-child(1),
.motorboat-admin-table th:nth-child(2) {
  width: 170px;
}

.motorboat-admin-table th:nth-child(3) {
  width: 120px;
}

.motorboat-admin-table th:nth-child(4),
.motorboat-admin-table th:nth-child(5) {
  width: 105px;
}

.motorboat-admin-table th:nth-child(7) {
  width: 100px;
}

.motorboat-admin-table th:nth-child(8) {
  width: 180px;
}

.main .content:has(.home-dashboard) {
  padding-top: 18px;
}

@media (max-width: 900px) {
  .calendar-view-toolbar {
    grid-template-columns: 1fr;
  }

  .calendar-view-switcher {
    width: 100%;
  }

  .profile-activity-calendar-source-option {
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .vehicle-booking-create-section {
    display: none;
  }

  .vehicle-calendar-mobile-create {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .vehicle-calendar-header {
    align-items: stretch;
  }

  .vehicle-calendar-header .vehicle-calendar-mobile-create {
    width: 100%;
    justify-content: center;
  }

  .vehicle-calendar-toolbar-extras,
  .vehicle-calendar-resource-filter {
    width: 100%;
  }

  .vehicle-calendar-resource-filter select,
  .vehicle-booking-dialog input,
  .vehicle-booking-dialog select,
  .vehicle-booking-dialog textarea {
    font-size: 16px;
  }

  .calendar-agenda .vehicle-calendar-event small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .calendar-view-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-view-switcher button {
    min-width: 0;
    padding-inline: 6px;
  }

  .calendar-period-navigation {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .calendar-period-navigation h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .calendar-period-navigation > button:last-child {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .calendar-week-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    min-width: 672px;
  }

  .calendar-agenda-day > header {
    align-items: stretch;
  }

  .calendar-agenda-day > header > div {
    align-self: center;
  }

  .calendar-period-event,
  .activity-calendar-event {
    min-height: 44px;
  }

  .profile-activity-calendar-source-picker,
  .profile-activity-calendar-legend {
    align-items: stretch;
    gap: 7px;
  }

  .profile-activity-calendar-source-option {
    flex: 1 1 100%;
  }

  .profile-activity-calendar-legend {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  html,
  body,
  #app,
  .app-shell,
  .main,
  .content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px;
  }

  .plan-assignment-layout,
  .plan-assignment-period,
  .plan-fixed-assignment-layout,
  .plan-fixed-assignment-layout.without-actor,
  .plan-time-fields {
    grid-template-columns: 1fr;
  }

  .activity-calendar-dialog-backdrop {
    padding: 8px;
  }

  .activity-calendar-dialog {
    max-height: calc(100dvh - 16px);
  }

  .activity-calendar-header {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-calendar-header > button {
    width: 100%;
  }

  .activity-calendar-navigation {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .activity-calendar-navigation > button:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .activity-calendar-navigation h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
  }

  .activity-calendar-navigation > button:last-child {
    grid-column: 3;
    grid-row: 1;
  }

  .activity-calendar-form,
  .activity-calendar-detail-list {
    grid-template-columns: 1fr;
  }

  .activity-calendar-form .span-2,
  .activity-calendar-detail-list .span-2 {
    grid-column: 1;
  }

  .activity-calendar-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .activity-calendar-form-actions button {
    width: 100%;
  }

  .activity-calendar-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-calendar-detail-actions button {
    width: 100%;
  }

  .personal-calendar-appointment-actions,
  .personal-calendar-appointment-primary-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .home-form-shortcut.home-form-shortcut-button {
    width: var(--home-form-bar-width);
  }

  .home-dashboard {
    --home-form-bar-width: min(calc(100vw - 20px), 100%);
  }

  .main .content:has(.home-dashboard) {
    padding-inline: 10px;
  }

  .home-background-upload-form {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

  .home-background-file-picker {
    min-width: 0;
  }

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

  .inline-detail-row .section-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inline-form-header-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .inline-form-header-actions button {
    min-width: 0;
    flex: 1 1 110px;
    max-width: 160px;
  }

  .ergometer-training-program-fields {
    grid-template-columns: 1fr;
  }

  .training-program-edit-grid {
    grid-template-columns: 1fr;
  }

  .team-import-workflow {
    grid-template-columns: 1fr;
  }

  .team-import-workflow > button {
    width: 100%;
  }

  .training-program-workflow {
    grid-template-columns: 1fr;
    grid-template-areas:
      "group"
      "dates"
      "period-actions"
      "file"
      "upload";
  }

  .training-program-date-range {
    grid-template-columns: 1fr;
  }

  .training-program-upload-actions {
    flex-direction: column;
  }

  .motorboat-legend {
    width: 100%;
  }

  .motorboat-week-schedule-wrap {
    border-block: 1px solid var(--line);
    scrollbar-width: thin;
  }

  .motorboat-time-fields {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .motorboat-week-schedule-wrap {
    display: none;
  }

  .motorboat-mobile-schedule {
    display: grid;
    min-width: 0;
    gap: var(--space-2);
  }

  .motorboat-day-selector {
    display: flex;
    min-width: 0;
    gap: var(--space-1);
    padding: 2px 0 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .motorboat-day-selector-button {
    flex: 1 0 54px;
    min-width: 54px;
    min-height: var(--control-height-touch);
    padding: 7px 8px;
    scroll-snap-align: start;
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    font-weight: 700;
  }

  .motorboat-day-selector-button.is-selected {
    border-color: var(--navigation-blue);
    background: var(--navigation-blue);
    color: #fff;
  }

  .motorboat-day-schedule-wrap {
    max-height: max(430px, calc(100dvh - 250px));
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
  }

  .motorboat-day-grid {
    grid-template-columns: 60px repeat(var(--motorboat-column-count), minmax(96px, 1fr));
    min-width: max(100%, var(--motorboat-grid-min-width));
  }

  .motorboat-day-grid .motorboat-time-heading {
    min-width: 60px;
  }

  .motorboat-day-grid .motorboat-day-heading {
    font-size: var(--font-size-body);
  }

  .motorboat-day-grid .motorboat-lane-heading {
    padding-inline: 5px;
    font-size: var(--font-size-help);
  }
}

@media print {
  .main::before {
    display: none !important;
  }

  .ergometer-booking-dialog-backdrop {
    display: none !important;
  }

  .activity-calendar-dialog-backdrop {
    display: none !important;
  }

  @page {
    size: A3 landscape;
    margin: 7mm;
  }

  :root {
    --bg: #fff;
  }

  body {
    background: #fff;
    font-size: 9pt;
  }

  body * {
    visibility: hidden;
  }

  html,
  body,
  #app,
  .app-shell,
  .main,
  .content,
  .ergometer-schedule-view {
    width: 100%;
    min-height: 0 !important;
    margin: 0 !important;
  }

  body,
  .ergometer-print-section,
  .ergometer-print-section * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .ergometer-print-section,
  .ergometer-print-section * {
    visibility: visible;
  }

  .app-header,
  .topbar,
  .app-notification,
  .application-update-banner,
  .ergometer-screen-actions {
    display: none !important;
  }

  .app-shell,
  .main {
    min-height: 0;
    display: block;
  }

  .content {
    padding: 0;
  }

  .ergometer-schedule-view,
  .ergometer-print-section {
    display: block;
  }

  .ergometer-print-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .ergometer-schedule-header {
    display: none !important;
  }

  .ergometer-schedule-body {
    padding: 0;
    gap: 4mm;
  }

  .ergometer-schedule-table-wrap {
    max-height: none;
    overflow: visible;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ergometer-schedule-table {
    width: 100%;
    min-width: 0;
    font-size: 7pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ergometer-schedule-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ergometer-schedule-table th,
  .ergometer-schedule-table td {
    position: static;
    height: auto;
    padding: 1mm 0.5mm;
  }

  .ergometer-time-heading,
  .ergometer-slot-time {
    width: 18mm;
    min-width: 18mm;
    max-width: 18mm;
  }

  .ergometer-row-heading,
  .ergometer-row-name {
    width: 10mm;
    min-width: 10mm;
    max-width: 10mm;
  }

  .ergometer-group-cell span {
    font-size: 6pt;
  }

  .ergometer-v2-row-heading,
  .ergometer-v2-zone-name {
    width: 8mm;
    min-width: 8mm;
    max-width: 8mm;
  }

  .ergometer-v2-position-heading,
  .ergometer-v2-position-number {
    width: 9mm;
    min-width: 9mm;
    max-width: 9mm;
  }

  .ergometer-v2-group-cell span {
    font-size: 6pt;
  }

  .ergometer-schedule-table.ergometer-v4-table {
    --ergometer-v4-label-font-size: 5pt;
    min-width: 0;
  }

  .ergometer-v4-position-row,
  .ergometer-v4-free-cell,
  .ergometer-v4-group-cell {
    height: 7mm;
  }

  .ergometer-v4-group-card {
    min-height: calc(var(--ergometer-v4-span) * 7mm - 1mm);
    grid-template-rows: 3.2mm minmax(0, 1fr);
    gap: 0.5mm;
    padding: 0.5mm;
  }

  .ergometer-v4-free-square,
  .ergometer-v4-machine-square {
    width: 5mm;
  }

  .ergometer-v3-table .ergometer-group-cell span {
    font-size: 5.5pt;
  }

  .ergometer-schedule-table.ergometer-v3-table {
    --ergometer-v3-label-font-size: 5.5pt;
  }

  .ergometer-v3-label-spacer,
  .ergometer-v3-group-label {
    height: 3.2mm;
    padding: 0 0.5mm;
    font-size: 5.5pt;
  }

  .ergometer-v3-square {
    width: calc(100% - 0.8mm);
    height: 5.5mm;
    min-height: 0;
    margin: 0.4mm;
    aspect-ratio: auto;
  }

  .ergometer-v3-table .ergometer-group-cell {
    padding: 0.4mm !important;
  }

  .ergometer-v3-table .ergometer-group-cell .ergometer-v3-group-squares {
    gap: 0.35mm;
    padding: 0.4mm;
  }

  .ergometer-v3-table .ergometer-group-cell .ergometer-v3-machine-square {
    width: 100%;
    height: 5.5mm;
    margin-inline: 0;
    aspect-ratio: auto;
  }

  .ergometer-v3-machine-square.is-booked::after,
  .ergometer-v3-machine-square.is-mine::after {
    font-size: 7pt;
  }

  .ergometer-v3-position-number {
    padding: 0.6mm 0.2mm !important;
    font-size: 6pt;
  }

  .ergometer-schedule-table .ergometer-v3-slot-time {
    position: relative !important;
    width: 12mm;
    min-width: 12mm;
    max-width: 12mm;
    padding: 0 !important;
  }

  .ergometer-v3-time-column {
    width: 12mm;
  }

  .ergometer-v3-time-heading {
    width: 12mm;
    min-width: 12mm;
    max-width: 12mm;
  }

  .ergometer-v3-time-stack {
    position: absolute;
    inset: 0.7mm 0.8mm;
    width: auto;
    height: auto;
    padding: 0;
    transform: none;
    font-size: var(--ergometer-v3-label-font-size);
  }

  .ergometer-v3-time-stack > span:first-child {
    height: 3.2mm;
    flex-basis: 3.2mm;
  }

  .ergometer-day-banner th {
    padding: 0.8mm 1mm;
    border-top-width: 1mm;
    font-size: 8pt;
    line-height: 1;
  }

}

.user-account-filter-toolbar {
  grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr);
}

.account-request-filter-toolbar {
  grid-template-columns: minmax(180px, 280px);
}

.account-request-public-link {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
}

.account-request-public-link > div:first-child {
  display: grid;
  gap: 3px;
}

.account-request-public-link-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.account-request-public-link-controls input {
  width: 100%;
  min-width: 0;
}

.account-requests-table table {
  min-width: 1120px;
}

.account-requests-table td:nth-child(2) span,
.account-requests-table td:nth-child(3) span,
.account-requests-table td:nth-child(4) span,
.account-requests-table td:nth-child(5) span {
  display: block;
  margin-top: 3px;
}

.account-requests-table th:first-child,
.account-requests-table td:first-child {
  width: 145px;
  white-space: nowrap;
}

.account-requests-table th:last-child,
.account-requests-table td:last-child {
  width: 180px;
}

.account-request-match-note {
  font-size: 11px;
}

.account-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.account-request-actions button {
  min-width: 0;
}

.user-accounts-table table {
  min-width: 980px;
}

.user-accounts-table th:last-child,
.user-accounts-table td:last-child {
  width: 170px;
  text-align: right;
}

.user-accounts-table td:last-child button {
  width: 100%;
  white-space: nowrap;
}

.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.account-status-active {
  border-color: #a9cbb9;
  background: #e8f4ed;
  color: #285b41;
}

.account-status-invited {
  border-color: #a9bfd2;
  background: #e7eff6;
  color: #315775;
}

.account-status-expired,
.account-status-missing_email {
  border-color: #e2b5b1;
  background: #f8e9e7;
  color: #8b302b;
}

.account-status-not_invited {
  border-color: #d7c899;
  background: #f7f2df;
  color: #675a2b;
}

.account-invitation-body {
  display: grid;
  gap: 14px;
}

.account-invitation-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  color: var(--muted);
}

.account-invitation-delivery {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--navigation-blue-light);
  background: var(--navigation-blue-soft);
  color: var(--text);
}

.account-invitation-delivery.is-sent {
  border-left-color: var(--green);
  background: var(--green-2);
}

.account-invitation-delivery.is-failed {
  border-left-color: var(--red);
  background: var(--red-2);
}

.account-invitation-link input {
  width: 100%;
  font-family: inherit;
}

.account-invitation-actions {
  justify-content: flex-end;
}

.invitation-email-form {
  display: grid;
  gap: 16px;
}

.invitation-email-form textarea {
  min-height: 260px;
  line-height: 1.5;
}

.invitation-email-merge-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.invitation-email-merge-fields code {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f4f6f5;
  color: var(--text);
  font-size: 12px;
}

.invitation-email-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.invitation-email-preview h3,
.invitation-email-preview pre {
  margin: 0;
}

.invitation-email-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .auth-page {
    padding: 12px;
  }

  .auth-registration-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-registration-grid > .span-2 {
    grid-column: auto;
  }

  .user-account-filter-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-accounts-view > .section > .section-header .header-actions {
    align-items: stretch;
  }

  .account-invitation-summary {
    display: grid;
    justify-content: stretch;
  }

  .account-request-public-link-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-request-public-link-controls button {
    width: 100%;
  }
}

/* Every selected home item keeps one shared bar while its content opens below. */
.home-form-entry.expanded .home-form-content :has(> .home-expanded-bar) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-form-entry.expanded .home-form-content .home-expanded-bar {
  box-sizing: border-box;
  width: var(--home-form-bar-width);
  max-width: 100%;
  min-height: 50px;
  margin-inline: auto;
  padding: 6px var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--home-bar-surface);
  color: var(--navigation-blue);
  box-shadow: var(--shadow);
}

.home-form-entry.expanded .home-form-content .home-expanded-bar:hover {
  border-color: var(--navigation-blue-light);
  background: color-mix(in srgb, var(--navigation-blue-soft) 92%, transparent);
}

.home-form-entry.expanded .home-form-content .home-expanded-bar > :is(h1, h2, h3, h4) {
  margin: 0;
  color: var(--navigation-blue);
  font-size: var(--font-size-page-title);
  font-weight: 400;
  line-height: var(--line-height-heading);
}

.home-form-entry.expanded .home-form-content .home-expanded-bar :is(span, strong, small) {
  color: color-mix(in srgb, var(--navigation-blue) 78%, transparent);
}

.home-form-entry.expanded .home-form-content .home-expanded-bar:has(> .header-actions) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 32%);
  align-items: center;
  gap: 12px;
}

.home-form-entry.expanded .home-form-content .home-expanded-bar > :is(h1, h2, h3, h4) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-form-entry.expanded .home-form-content .home-expanded-bar > .header-actions {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  justify-content: flex-end;
  text-align: right;
}

.home-form-entry.expanded .home-form-content .home-expanded-bar > .header-actions > span:only-child {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  text-align: right;
}

/* Afskrivnings- og genkøbsmodel */
.depreciation-model-view {
  width: 100%;
}

.depreciation-model-section > .section-body {
  gap: 22px;
}

.depreciation-summary-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--navigation-blue-soft) 42%, transparent);
}

.depreciation-summary-band > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.depreciation-summary-band > div:last-child {
  border-right: 0;
}

.depreciation-summary-band span,
.depreciation-boat-preview span {
  color: var(--muted);
  font-size: 11px;
}

.depreciation-summary-band strong,
.depreciation-boat-preview strong {
  overflow-wrap: anywhere;
  color: var(--navigation-blue);
  font-size: 15px;
  font-weight: 600;
}

.depreciation-settings-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
}

.depreciation-value-settings-form {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.depreciation-subsection {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.depreciation-subsection .subsection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.depreciation-subsection .subsection-heading h3 {
  margin: 0;
  font-size: 16px;
}

.depreciation-subsection .subsection-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.depreciation-year-table th,
.depreciation-year-table td,
.depreciation-rule-table th,
.depreciation-rule-table td,
.depreciation-new-price-table th,
.depreciation-new-price-table td,
.depreciation-rig-rule-table th,
.depreciation-rig-rule-table td,
.depreciation-boat-table th,
.depreciation-boat-table td,
.depreciation-projection-table th,
.depreciation-projection-table td {
  white-space: nowrap;
}

.depreciation-projection-table {
  width: 2420px;
  min-width: 2420px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.depreciation-projection-table thead th:nth-child(n + 5) {
  min-width: 190px;
}

.depreciation-projection-boat-row td:nth-child(n + 5) {
  min-width: 190px;
  text-align: left;
}

.depreciation-projection-table thead th:first-child,
.depreciation-projection-boat-row td:first-child {
  width: 180px;
  min-width: 180px;
}

.depreciation-projection-table thead th:nth-child(2),
.depreciation-projection-boat-row td:nth-child(2) {
  width: 112px;
  min-width: 112px;
}

.depreciation-projection-table thead th:nth-child(3),
.depreciation-projection-boat-row td:nth-child(3) {
  width: 124px;
  min-width: 124px;
}

.depreciation-projection-table thead th:nth-child(4),
.depreciation-projection-boat-row td:nth-child(4) {
  width: 104px;
  min-width: 104px;
}

.depreciation-projection-table thead th:nth-child(-n + 4),
.depreciation-projection-boat-row td:nth-child(-n + 4),
.depreciation-projection-replacement-row > th:first-child {
  position: sticky;
  z-index: 3;
  background-color: var(--surface);
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--surface) var(--home-background-wash, 85%), transparent),
      color-mix(in srgb, var(--surface) var(--home-background-wash, 85%), transparent)
    ),
    var(--home-background-image, url("./assets/dsr-logo.jpg"));
  background-position: center, center calc(50% + (var(--navigation-shell-height) / 2));
  background-repeat: no-repeat;
  background-size: auto, min(82vw, calc(100vh - var(--navigation-shell-height) - 32px));
  background-attachment: fixed;
}

.depreciation-projection-table thead th:nth-child(-n + 4) {
  z-index: 5;
}

.depreciation-projection-table thead th:first-child,
.depreciation-projection-boat-row td:first-child {
  left: 0;
}

.depreciation-projection-table thead th:nth-child(2),
.depreciation-projection-boat-row td:nth-child(2) {
  left: 180px;
}

.depreciation-projection-table thead th:nth-child(3),
.depreciation-projection-boat-row td:nth-child(3) {
  left: 292px;
}

.depreciation-projection-table thead th:nth-child(4),
.depreciation-projection-boat-row td:nth-child(4) {
  left: 416px;
  box-shadow: 8px 0 10px -10px color-mix(in srgb, var(--text) 55%, transparent);
}

.depreciation-projection-replacement-row > th:first-child {
  left: 0;
  box-shadow: 8px 0 10px -10px color-mix(in srgb, var(--text) 55%, transparent);
}

.depreciation-projection-boat-row {
  cursor: pointer;
}

.depreciation-projection-boat-row:hover,
.depreciation-projection-boat-row:focus-visible {
  background: var(--table-hover-surface);
  outline: none;
}

.depreciation-projection-boat-row:hover td:nth-child(-n + 4),
.depreciation-projection-boat-row:focus-visible td:nth-child(-n + 4) {
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--navigation-blue-soft) 72%, transparent);
}

.depreciation-projection-boat-row td:first-child .depreciation-boat-name-button,
.depreciation-projection-boat-row td:first-child small,
.depreciation-projection-replacement-row th strong,
.depreciation-projection-replacement-row th small {
  display: block;
}

.depreciation-boat-name-button {
  appearance: none;
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navigation-blue);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.depreciation-boat-name-button:hover,
.depreciation-boat-name-button:focus-visible {
  color: color-mix(in srgb, var(--navigation-blue) 76%, black);
  text-decoration: underline;
  outline: none;
}

.depreciation-projection-boat-row td:first-child small,
.depreciation-projection-replacement-row th small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.depreciation-projection-chevron {
  display: inline-block;
  width: 16px;
  color: var(--navigation-blue);
}

.depreciation-projection-replacement-row th,
.depreciation-projection-replacement-row td {
  background: color-mix(in srgb, var(--navigation-blue-soft) 35%, transparent);
}

.depreciation-projection-replacement-row > th:first-child {
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--navigation-blue-soft) 35%, transparent);
}

.depreciation-projection-replacement-heading-row th,
.depreciation-projection-replacement-heading-row td {
  padding-top: 8px;
  padding-bottom: 5px;
  border-bottom: 0;
}

.depreciation-projection-replacement-metric-row th,
.depreciation-projection-replacement-metric-row td {
  padding-top: 4px;
  padding-bottom: 4px;
}

.depreciation-projection-replacement-metric-row td {
  text-align: left;
}

.depreciation-projection-replacement-metric-row th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.depreciation-replacement-amount {
  display: block;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.depreciation-projection-replacement-result-row th,
.depreciation-projection-replacement-result-row td {
  padding-bottom: 8px;
  border-bottom-color: var(--line-strong);
}

.depreciation-projection-total-row th,
.depreciation-projection-total-row td {
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 2px solid color-mix(in srgb, var(--navigation-blue) 55%, transparent);
  background: color-mix(in srgb, white 82%, transparent);
  color: var(--navigation-blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.depreciation-projection-total-row th {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: right;
  box-shadow: 8px 0 10px -10px color-mix(in srgb, var(--text) 55%, transparent);
}

.depreciation-replacement-amount.is-expense {
  color: color-mix(in srgb, var(--red) 72%, var(--text));
}

.depreciation-replacement-amount.is-income,
.depreciation-replacement-amount.is-neutral {
  color: var(--text);
}

.depreciation-formula {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--navigation-blue) 24%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, white 70%, transparent);
}

.depreciation-formula span,
.depreciation-basis-note {
  color: var(--muted);
  font-size: 12px;
}

.depreciation-formula strong {
  color: var(--navigation-blue);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.depreciation-price-settings-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.depreciation-price-settings {
  flex: 0 0 min(100%, 260px);
}

.depreciation-price-settings .label {
  width: min(100%, 260px);
}

.depreciation-price-settings-row .depreciation-formula {
  flex: 1 1 auto;
}

.depreciation-price-dialog-content {
  display: grid;
  gap: 16px;
}

.depreciation-price-dialog-content > .depreciation-subsection {
  padding-top: 0;
  border-top: 0;
}

.depreciation-price-dialog-content > .depreciation-model-actions {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.depreciation-year-table tfoot th {
  border-top: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--navigation-blue-soft) 40%, transparent);
}

.depreciation-year-bar {
  width: clamp(100px, 15vw, 230px);
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--navigation-blue-light) 38%, transparent);
}

.depreciation-year-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--navigation-blue);
}

.depreciation-rule-table input {
  box-sizing: border-box;
  width: 100%;
  min-width: 92px;
}

.depreciation-value-rule-table {
  min-width: 1080px;
}

.depreciation-new-price-table input,
.depreciation-new-price-table select {
  box-sizing: border-box;
  width: 100%;
  min-width: 105px;
}

.depreciation-new-price-table {
  min-width: 660px;
}

.depreciation-new-price-table td:first-child input {
  min-width: 150px;
}

.depreciation-new-price-table .icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.depreciation-rule-table td:first-child input {
  min-width: 130px;
}

.depreciation-rule-table .icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.depreciation-rig-formulas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.depreciation-rig-rule-table {
  min-width: 940px;
}

.depreciation-rig-rule-table input,
.depreciation-rig-rule-table select {
  box-sizing: border-box;
  width: 100%;
  min-width: 130px;
}

.depreciation-rig-rule-table th:nth-child(4),
.depreciation-rig-rule-table th:nth-child(5),
.depreciation-rig-rule-table td:nth-child(4),
.depreciation-rig-rule-table td:nth-child(5) {
  width: 145px;
}

.depreciation-rig-rule-table .icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.depreciation-rule-create-form {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(130px, 200px) auto;
  align-items: end;
  gap: 8px;
}

.depreciation-new-price-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) 110px minmax(150px, 0.8fr) auto;
  align-items: end;
  gap: 8px;
}

.depreciation-rig-rule-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) repeat(2, minmax(125px, 0.65fr)) auto;
  align-items: end;
  gap: 8px;
}

.depreciation-price-register-heading {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.depreciation-price-register-heading h4 {
  margin: 0;
  color: var(--navigation-blue);
  font-size: 14px;
}

.depreciation-price-import {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.depreciation-price-import form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-left: auto;
}

.depreciation-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(130px, 180px) minmax(140px, 190px) auto;
  align-items: end;
}

.depreciation-boat-table .clickable-row {
  cursor: pointer;
}

.depreciation-boat-table .clickable-row:hover,
.depreciation-boat-table .clickable-row:focus-visible {
  background: var(--table-hover-surface);
}

.depreciation-boat-table td:first-child strong,
.depreciation-boat-table td:first-child small {
  display: block;
}

.depreciation-boat-table td:first-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.depreciation-model-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
}

.depreciation-model-actions > div {
  display: flex;
  gap: 8px;
}

.depreciation-boat-form {
  min-width: 0;
}

.depreciation-boat-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border-block: 1px solid var(--line);
}

.depreciation-boat-preview > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.depreciation-boat-preview > div:last-child {
  border-right: 0;
}

.depreciation-boat-preview > div:nth-child(4n) {
  border-right: 0;
}

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

@media (max-width: 900px) {
  .depreciation-price-dialog-content,
  .depreciation-price-dialog-content .depreciation-subsection {
    min-width: 0;
    max-width: 100%;
  }

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

  .depreciation-summary-band > div:nth-child(2n) {
    border-right: 0;
  }

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

  .depreciation-rule-create-form,
  .depreciation-new-price-form,
  .depreciation-rig-rule-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .depreciation-model-section > .section-body {
    gap: 16px;
  }

  .depreciation-summary-band,
  .depreciation-settings-form,
  .depreciation-boat-preview,
  .depreciation-boat-fields,
  .depreciation-filter-toolbar,
  .depreciation-rule-create-form,
  .depreciation-new-price-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .depreciation-rig-formulas,
  .depreciation-rig-rule-create-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .depreciation-price-import,
  .depreciation-price-import form {
    align-items: stretch;
    flex-direction: column;
  }

  .depreciation-price-import form {
    width: 100%;
    margin-left: 0;
  }

  .depreciation-price-settings-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .depreciation-price-settings {
    flex-basis: auto;
  }

  .depreciation-formula {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .depreciation-formula strong {
    text-align: left;
  }

  .depreciation-summary-band > div,
  .depreciation-boat-preview > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .depreciation-summary-band > div:last-child,
  .depreciation-boat-preview > div:last-child {
    border-bottom: 0;
  }

  .depreciation-subsection .subsection-heading,
  .depreciation-model-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .depreciation-subsection .subsection-heading span {
    text-align: left;
  }

  .depreciation-model-actions > div,
  .depreciation-model-actions button {
    width: 100%;
  }
}

/* Existing dialog close controls share one icon-only control size. */
.table-detail-dialog-close,
.activity-calendar-dialog-close,
.assignment-create-dialog-close,
.assignment-plan-edit-dialog-close,
.boat-create-dialog-close,
.actor-create-dialog-close,
.usage-plan-participation-dialog-close,
.profile-boat-request-dialog-close,
.personal-settings-dialog-close,
.ergometer-booking-dialog-close {
  width: var(--control-height);
  min-width: var(--control-height);
  height: var(--control-height);
  min-height: var(--control-height);
  border-radius: var(--radius-control);
}

/* UX foundation, phase 2: compact and mobile spacing use the documented breakpoints. */
@media (max-width: 900px) {
  :root {
    --page-padding: var(--space-4);
  }

  .header-actions {
    gap: var(--space-2);
  }

  .home-form-shortcut-button,
  .home-form-entry.expanded .home-form-content .home-expanded-bar:has(> .header-actions) {
    grid-template-columns: minmax(0, 1fr) minmax(72px, 30%);
    gap: var(--space-2);
  }

  .home-form-shortcut-title,
  .home-form-entry.expanded .home-form-content .home-expanded-bar > :is(h1, h2, h3, h4) {
    overflow: visible;
    overflow-wrap: break-word;
    text-overflow: clip;
    white-space: normal;
  }

  .home-form-shortcut-area,
  .home-form-entry.expanded .home-form-content .home-expanded-bar > .header-actions {
    max-width: 100%;
    justify-self: end;
  }
}

@media (max-width: 600px) {
  :root {
    --page-padding: 10px;
  }

  button {
    min-height: var(--control-height-touch);
  }

  .section-title-dropdown-menu button {
    min-height: var(--control-height-touch);
  }

  input,
  select,
  textarea {
    min-height: var(--control-height-touch);
    font-size: 16px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-height: 18px;
  }

  .content {
    gap: var(--space-3);
  }

  .section-header {
    padding: var(--space-3);
  }

  .section-body {
    padding: var(--space-3);
  }

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

  .table-detail-dialog-close,
  .activity-calendar-dialog-close,
  .assignment-create-dialog-close,
  .assignment-plan-edit-dialog-close,
  .boat-create-dialog-close,
  .actor-create-dialog-close,
  .usage-plan-participation-dialog-close,
  .profile-boat-request-dialog-close,
  .personal-settings-dialog-close,
  .ergometer-booking-dialog-close {
    width: var(--control-height-touch);
    min-width: var(--control-height-touch);
    height: var(--control-height-touch);
    min-height: var(--control-height-touch);
  }
}

/* Responsive baseline, phase 1: shared mobile behavior for critical forms and views. */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .detail-edit-row,
  .boat-request-contact-row {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .boat-detail-simple .detail-edit-row,
  .boat-detail-simple .boat-request-contact-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .boat-request-form .boat-request-contact-row {
    align-items: stretch;
  }

  .detail-edit-row > span,
  .boat-request-contact-row > span {
    min-width: 0;
  }

  .detail-edit-row > input,
  .detail-edit-row > select,
  .detail-edit-row > textarea {
    width: 100%;
    max-width: none;
    min-height: 44px;
    font-size: 16px;
  }

  .boat-request-form .responsible-contact {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .boat-request-form .responsible-contact > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .boat-request-form-actions button {
    min-height: 44px;
  }

  .personal-settings-dialog-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .personal-settings-dialog,
  .personal-settings-dialog--ergometer {
    display: flex;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
  }

  .personal-settings-dialog-header {
    min-height: 64px;
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
    align-items: center;
  }

  .personal-settings-dialog-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .personal-settings-dialog-body {
    min-width: 0;
    min-height: 0;
    padding: 0 16px max(16px, env(safe-area-inset-bottom));
    flex: 1 1 auto;
    overflow-y: auto;
  }

  .personal-settings-choice label {
    min-height: 44px;
  }

  .personal-settings-time-section,
  .personal-settings-time-heading,
  .personal-settings-time-actions,
  .personal-settings-time-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .personal-settings-time-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .personal-settings-time-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-settings-time-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .personal-settings-time-table-wrap {
    max-height: min(42dvh, 420px);
    overflow: auto;
  }

  .depreciation-projection-table thead th:first-child,
  .depreciation-projection-boat-row td:first-child {
    width: 160px;
    min-width: 160px;
  }

  .depreciation-projection-table thead th:nth-child(n + 2):nth-child(-n + 4),
  .depreciation-projection-boat-row td:nth-child(n + 2):nth-child(-n + 4),
  .depreciation-projection-replacement-row > th:first-child {
    position: static;
    left: auto;
    z-index: 1;
    box-shadow: none;
  }

  .depreciation-projection-table button,
  .depreciation-boat-name-button {
    min-height: 44px;
  }

  .depreciation-projection-table .excel-filter-toggle {
    width: 44px;
    min-width: 44px;
  }

  .personal-settings-dialog :is(button, input, select, textarea):focus-visible,
  .depreciation-projection-table :is(button, [tabindex]):focus-visible,
  .form-grid :is(button, input, select, textarea):focus-visible,
  .boat-request-form :is(button, input, select, textarea, a):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--navigation-blue) 72%, white);
    outline-offset: 2px;
  }
}

/* Phase 3 normalization is kept last while legacy dialog content styles are migrated. */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  min-width: 0;
  padding: var(--dialog-viewport-gap);
  place-items: center;
  overflow: hidden;
  background: rgba(17, 31, 43, 0.42);
}

.dialog-backdrop--base { z-index: var(--z-dialog-base); }
.dialog-backdrop--standard { z-index: var(--z-dialog); }
.dialog-backdrop--raised { z-index: var(--z-dialog-raised); }

.dialog-shell,
.dialog-shell.dialog-shell--small,
.dialog-shell.dialog-shell--medium,
.dialog-shell.dialog-shell--large,
.dialog-shell.dialog-shell--full {
  display: grid;
  height: auto;
  min-width: 0;
  max-height: calc(100dvh - (2 * var(--dialog-viewport-gap)));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 34, 45, 0.28);
}

.dialog-shell.dialog-shell--small { width: min(100%, var(--dialog-width-small)); }
.dialog-shell.dialog-shell--medium { width: min(100%, var(--dialog-width-medium)); }
.dialog-shell.dialog-shell--large { width: min(100%, var(--dialog-width-large)); }
.dialog-shell.dialog-shell--full { width: min(100%, var(--dialog-width-xlarge)); }

.dialog-shell .dialog-header {
  position: static;
  top: auto;
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: auto;
}

.dialog-shell .dialog-close {
  display: inline-grid;
  width: var(--control-height-touch);
  min-width: var(--control-height-touch);
  height: var(--control-height-touch);
  min-height: var(--control-height-touch);
  flex: 0 0 var(--control-height-touch);
  padding: 0;
  place-items: center;
}

.member-list--read-only .member-list-header,
.boat-detail-simple .member-list--read-only .member-row {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr) minmax(160px, 1.2fr);
}

.dialog-shell .dialog-body {
  width: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  padding: var(--space-5);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-shell .dialog-footer {
  position: static;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.dialog-shell .activity-calendar-detail-actions,
.dialog-shell .usage-plan-participation-dialog-actions {
  width: 100%;
  margin: 0;
}

.dialog-shell .dialog-footer .activity-calendar-detail-actions,
.dialog-shell .dialog-footer .usage-plan-participation-dialog-actions {
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 600px) {
  .dialog-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .dialog-shell,
  .dialog-shell.dialog-shell--small,
  .dialog-shell.dialog-shell--medium,
  .dialog-shell.dialog-shell--large,
  .dialog-shell.dialog-shell--full {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dialog-shell .dialog-header {
    min-height: 64px;
    padding: max(var(--space-3), env(safe-area-inset-top)) var(--space-4) var(--space-3);
  }

  .dialog-shell .dialog-body {
    padding: var(--space-4);
  }

  .dialog-shell .dialog-footer {
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4) max(var(--space-3), env(safe-area-inset-bottom));
  }

  .dialog-shell .dialog-footer > *,
  .dialog-shell .dialog-footer .activity-calendar-detail-actions,
  .dialog-shell .dialog-footer .usage-plan-participation-dialog-actions {
    min-width: 0;
    max-width: 100%;
  }
}

/* UX phase 4: shared responsive data-table foundation. */
.responsive-table-frame {
  position: relative;
  max-width: 100%;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.responsive-table-frame:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.responsive-table-frame.is-horizontally-scrollable:not(.is-at-scroll-end) {
  box-shadow: inset -18px 0 14px -16px rgba(20, 54, 78, 0.62);
}

.responsive-table-frame.is-horizontally-scrollable.is-scrolled-x:not(.is-at-scroll-end) {
  box-shadow:
    inset 18px 0 14px -16px rgba(20, 54, 78, 0.42),
    inset -18px 0 14px -16px rgba(20, 54, 78, 0.62);
}

.responsive-data-table--compact { min-width: 620px; }
.responsive-data-table--medium { min-width: 760px; }
.responsive-data-table--large { min-width: 980px; }
.responsive-data-table--xlarge { min-width: 1180px; }
.responsive-data-table--huge { min-width: 1600px; }

.responsive-data-table :is(.sort-button, .row-button):focus-visible,
.responsive-table-frame :is(input, select, button, [tabindex]):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.table-checkbox-touch {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
}

.table-checkbox-touch:has(input:disabled) {
  cursor: not-allowed;
}

@media (min-width: 601px) and (max-width: 900px) {
  .responsive-table-frame--managed {
    max-height: min(var(--primary-table-max-height), calc(100dvh - var(--navigation-shell-height) - 48px));
  }

  .responsive-data-table .sort-button,
  .responsive-data-table .row-button {
    min-height: 40px;
  }
}

@media (max-width: 600px) {
  .responsive-table-frame--managed {
    width: 100%;
    max-height: min(var(--primary-table-max-height), calc(100dvh - var(--navigation-shell-height) - 32px));
  }

  .responsive-data-table th,
  .responsive-data-table td {
    padding: 7px 8px;
  }

  .responsive-data-table .sort-button,
  .responsive-data-table .row-button {
    min-height: 44px;
  }

  .responsive-data-table .row-button {
    display: inline-flex;
    min-width: 44px;
    align-items: center;
    text-align: left;
  }

  .responsive-data-table .excel-filter-heading {
    min-height: 44px;
  }

  .responsive-data-table button.excel-filter-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .responsive-data-table--mobile-sticky .responsive-table-sticky-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(4px);
  }

  .responsive-data-table--mobile-sticky thead .responsive-table-sticky-cell {
    z-index: 4;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
  }

  .responsive-data-table--mobile-sticky tr:hover > .responsive-table-sticky-cell {
    background: color-mix(in srgb, var(--table-hover-surface) 96%, var(--surface) 4%);
  }

  .responsive-data-table--mobile-sticky tr.selected-row > .responsive-table-sticky-cell {
    background: color-mix(in srgb, var(--table-active-surface) 96%, var(--surface) 4%);
  }

  .responsive-table-mobile-optional {
    display: none;
  }

  .actor-create-member-checkbox-cell label {
    width: 44px;
    height: 44px;
  }

  .actor-create-member-checkbox-cell input,
  .table-checkbox-touch input,
  .usage-plan-substitute-table input[type="radio"],
  .usage-plan-substitute-table input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .excel-filter-popover {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 12px;
  }

  .excel-filter-value-search,
  .excel-filter-selection-actions button,
  .excel-filter-value-option {
    min-height: 44px;
    font-size: 16px;
  }

  .excel-filter-value-option {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
  }

  .excel-filter-value-option input {
    width: 22px;
    height: 22px;
  }

  .excel-filter-popover button,
  .excel-filter-popover .filter-actions button,
  .excel-filter-popover .excel-filter-clear {
    min-height: 44px;
  }

  /* UX phase 4 audit: keep the primary choice visible in compact dialog tables. */
  .actor-create-member-table {
    width: 100%;
    min-width: 100%;
  }

  .actor-create-member-table th:nth-child(2),
  .actor-create-member-table td:nth-child(2),
  .actor-create-member-table th:nth-child(3),
  .actor-create-member-table td:nth-child(3) {
    display: none;
  }

  .actor-create-member-table th:first-child,
  .actor-create-member-table td:first-child {
    width: auto;
    min-width: 0;
  }

  .actor-create-member-table th:last-child,
  .actor-create-member-table td:last-child {
    width: 58px;
    min-width: 58px;
  }

  .profile-home-admin .table-checkbox-touch,
  .personal-settings-time-table .table-checkbox-touch {
    margin: 0 auto;
  }

  .profile-home-admin .home-admin-title-button {
    min-height: 44px;
  }

  .permission-table th:first-child,
  .permission-table td:first-child {
    width: 144px;
    min-width: 144px;
    max-width: 144px;
  }

  .permission-table table {
    width: var(--permission-table-mobile-width);
    min-width: var(--permission-table-mobile-width);
  }

  .permission-table .permission-area-cell small {
    display: none;
  }

  .permission-table select,
  .depreciation-rule-table :is(input, select, button),
  .depreciation-rig-rule-table :is(input, select, button),
  .depreciation-year-table :is(input, select, button) {
    min-height: 44px;
    font-size: 16px;
  }

  .depreciation-rule-table button,
  .depreciation-rig-rule-table button,
  .depreciation-year-table button {
    min-width: 44px;
  }

  .depreciation-new-price-table .icon-button,
  .depreciation-rule-table .icon-button,
  .depreciation-rig-rule-table .icon-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .usage-plan-substitute-choice label {
    width: 44px;
    height: 44px;
  }

  .usage-plan-substitute-table {
    min-width: 100%;
  }

  .vehicle-booking-list > table.responsive-data-table--xlarge {
    min-width: 700px;
  }

  .boat-calendar-list-table.responsive-data-table--medium {
    min-width: 500px;
  }

  .ergometer-percentage-stack {
    height: auto;
    min-height: calc(var(--ergometer-zone-positions) * 11px);
    overflow: visible;
  }

  .ergometer-percentage-segment {
    flex-basis: calc(var(--ergometer-segment-positions) * 11px);
  }

  .ergometer-percentage-segment.is-interactive {
    flex-basis: max(44px, calc(var(--ergometer-segment-positions) * 11px));
    min-height: 44px;
  }
}

/* UX phase 4: shared table/tablet/card presentation for object directories. */
.responsive-data-mobile-toolbar,
.responsive-data-card-list {
  display: none;
}

.oar-value-mobile {
  display: none;
}

.responsive-data-view,
.responsive-data-view-table,
.responsive-data-card-list,
.responsive-data-card,
.responsive-data-card-meta,
.responsive-data-card-meta > div {
  min-width: 0;
  max-width: 100%;
}

.responsive-data-view-table table {
  width: 100%;
  min-width: 0;
}

@media (min-width: 601px) and (max-width: 900px) {
  .actor-directory-table--Rower .actor-table-column--gender,
  .actor-directory-table--Rower .actor-table-column--lastLogin,
  .actor-directory-table--team .actor-table-column--assignedBoats,
  .boat-requests-table .boat-request-column--responsible,
  .issues-table .issue-column--brand,
  .issues-table .issue-column--year,
  .issues-table .issue-column--group,
  .user-accounts-table .user-account-column--memberNumber,
  .user-accounts-table .user-account-column--lastLogin,
  .user-accounts-table .user-account-column--invitation,
  .account-requests-table .account-request-column--contact,
  .glossary-table .glossary-column--context,
  .view-descriptions-table .view-description-column--group,
  .boats-table .boat-column--brand,
  .boats-table .boat-column--year,
  .boats-table .boat-column--weightClass,
  .boats-table .boat-column--assigned,
  .oars-table .oar-column--brand,
  .oars-table .oar-column--bladeType,
  .oars-table .oar-column--shaftType,
  .oars-table .oar-column--linkedBoats,
  .assignments-table .assignment-column--crew,
  .movables-table .movable-column--brand,
  .movables-table .movable-column--model,
  .movables-table .movable-column--serialNumber,
  .movables-table .movable-column--responsible,
  .movables-table .movable-column--purchaseDate,
  .movables-table .movable-column--remarks,
  .movables-table .movable-column--issuedTo,
  .movables-table .movable-column--issueDate,
  .training-program-table .training-program-column--tempo,
  .training-program-table .training-program-column--pause,
  .training-program-table .training-program-column--remarks,
  .training-program-table .training-program-column--updated,
  .inactive-boats-table .inactive-boat-column--brand,
  .inactive-boats-table .inactive-boat-column--year,
  .inactive-boats-table .inactive-boat-column--registration,
  .inactive-assignments-table .inactive-assignment-column--boatType,
  .inactive-assignments-table .inactive-assignment-column--group,
  .inactive-assignments-table .inactive-assignment-column--deactivated,
  .inactive-oars-table .inactive-oar-column--side,
  .inactive-oars-table .inactive-oar-column--type,
  .inactive-actors-table .inactive-actor-column--contact,
  .inactive-actors-table .inactive-actor-column--roles {
    display: none;
  }

  .responsive-data-view--glossary .glossary-table textarea,
  .responsive-data-view--viewDescriptions .view-descriptions-table textarea,
  .responsive-data-view--viewDescriptions .view-descriptions-table td:nth-child(4) textarea {
    min-width: 0;
  }
}

@media (min-width: 901px) {
  .responsive-data-view--userAccounts .user-accounts-table table {
    min-width: 980px;
  }

  .responsive-data-view--accountRequests .account-requests-table table {
    min-width: 1120px;
  }

  .responsive-data-view--glossary .glossary-table {
    min-width: 900px;
  }

  .responsive-data-view--viewDescriptions .view-descriptions-table {
    min-width: 1180px;
  }

  .responsive-data-view--boats .boats-table table {
    min-width: 900px;
  }

  .responsive-data-view--assignments .assignments-table table {
    min-width: 900px;
  }

  .responsive-data-view--movables .movables-table table {
    min-width: 1480px;
  }

  .responsive-data-view--rowingMachines .rowing-machines-table table {
    min-width: 640px;
  }

  .responsive-data-view--trainingPrograms .training-program-table {
    min-width: 1160px;
  }

  .responsive-data-view--inactiveBoats .inactive-boats-table table,
  .responsive-data-view--inactiveAssignments .inactive-assignments-table table,
  .responsive-data-view--inactiveOars .inactive-oars-table table,
  .responsive-data-view--inactiveActors .inactive-actors-table table {
    min-width: 760px;
  }
}

@media (max-width: 600px) {
  .responsive-data-view-table {
    display: none;
  }

  .responsive-data-mobile-toolbar {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .responsive-data-sort-control {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    gap: var(--space-2);
    align-items: center;
  }

  .responsive-data-sort-control--select-only {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .responsive-data-sort-control > span {
    font-size: var(--font-size-body);
    font-weight: 700;
  }

  .responsive-data-sort-control select {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height-touch);
    font-size: 16px;
  }

  .responsive-data-mobile-filters {
    display: flex;
    min-width: 0;
    gap: var(--space-2);
    padding-bottom: 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .responsive-data-mobile-filters:empty {
    display: none;
  }

  .responsive-data-view--glossary .responsive-data-mobile-filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .responsive-data-view--glossary .responsive-data-filter-toggle {
    flex: 1 1 132px;
    min-width: 0;
    white-space: normal;
  }

  .responsive-data-filter-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: var(--control-height-touch);
    gap: var(--space-2);
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
  }

  .responsive-data-filter-toggle.active {
    border-color: var(--navigation-blue);
    background: var(--navigation-blue-soft);
    color: var(--navigation-blue);
  }

  .responsive-data-card-list {
    display: grid;
    gap: var(--space-2);
  }

  .responsive-data-card {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
  }

  .responsive-data-card[hidden] {
    display: none;
  }

  .responsive-data-card.is-selected {
    border-color: color-mix(in srgb, var(--navigation-blue) 48%, var(--line));
    background: color-mix(in srgb, var(--table-active-surface) 76%, var(--surface) 24%);
  }

  .responsive-data-card-header {
    min-width: 0;
  }

  .responsive-data-card-title {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height-touch);
    padding: 8px 10px;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: var(--font-size-section-title);
    font-weight: 700;
  }

  .responsive-data-card-title-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .responsive-data-card-title-main {
    display: flex;
    min-width: 0;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
  }

  .responsive-data-card-title-badge {
    display: inline-flex;
    min-height: 24px;
    padding: 2px 7px;
    align-items: center;
    border: 1px solid #e9c57b;
    border-radius: var(--radius-pill);
    background: var(--amber-2);
    color: var(--amber);
    font-size: var(--font-size-help);
    font-weight: 600;
    line-height: 1.2;
  }

  .responsive-data-card-title-aside {
    max-width: 36vw;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: var(--font-size-body);
    font-weight: 600;
    text-align: right;
  }

  .boat-mobile-card-allocation {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }

  .boat-mobile-card-allocation > div {
    display: grid;
    grid-template-columns: minmax(82px, auto) minmax(0, auto);
    gap: var(--space-2);
    justify-content: start;
    text-align: left;
  }

  .boat-mobile-card-allocation dt,
  .boat-mobile-card-allocation dd {
    margin: 0;
    overflow-wrap: anywhere;
  }

  .boat-mobile-card-allocation dt {
    color: var(--muted);
    font-size: var(--font-size-help);
  }

  .boat-mobile-card-allocation dd {
    font-size: var(--font-size-body);
  }

  .responsive-data-card-title--static {
    display: flex;
    align-items: center;
    margin: 0;
    border: 0;
    background: transparent;
  }

  .responsive-data-card-meta {
    display: grid;
    gap: var(--space-1);
    margin: 0;
  }

  .responsive-data-card-meta > div {
    display: grid;
    grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
    gap: var(--space-2);
    align-items: start;
  }

  .responsive-data-card-meta dt,
  .responsive-data-card-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
  }

  .responsive-data-card-meta dt {
    color: var(--muted);
    font-size: var(--font-size-help);
  }

  .responsive-data-card-meta dd {
    font-size: var(--font-size-body);
  }

  .oar-mobile-beta-description {
    margin: 0 0 var(--space-2);
    overflow-wrap: anywhere;
  }

  .responsive-data-status {
    display: inline-flex;
    min-height: 28px;
    padding: 3px 8px;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
    font-weight: 700;
  }

  .responsive-data-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .responsive-data-card-meta :is(a, button),
  .responsive-data-card-actions button {
    min-height: var(--control-height-touch);
  }

  .responsive-data-selection-action {
    display: grid;
    min-width: 0;
    min-height: var(--control-height-touch);
    grid-template-columns: 24px minmax(0, 1fr);
    gap: var(--space-2);
    align-items: center;
    cursor: pointer;
  }

  .responsive-data-selection-action input {
    width: 22px;
    height: 22px;
    margin: 0;
  }

  .responsive-data-selection-action span {
    overflow-wrap: anywhere;
  }

  .responsive-data-card-body {
    display: grid;
    min-width: 0;
    gap: var(--space-3);
  }

  .responsive-data-card--editor {
    gap: var(--space-3);
  }

  .responsive-data-editor-field {
    display: grid;
    min-width: 0;
    gap: var(--space-1);
  }

  .responsive-data-editor-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 112px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.45;
    resize: vertical;
  }

  .responsive-data-card--editor .responsive-data-card-actions button {
    flex-basis: 100%;
  }

  .account-request-card-decision {
    display: grid;
    min-width: 0;
    gap: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }

  .account-request-card-decision .label,
  .account-request-card-decision select {
    min-width: 0;
    width: 100%;
  }

  .account-request-card-decision select,
  .account-request-card-decision button {
    min-height: var(--control-height-touch);
    font-size: 16px;
  }

  .account-request-card-decision .account-request-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .responsive-data-card--decision .responsive-data-card-body p {
    margin: var(--space-1) 0 0;
    overflow-wrap: anywhere;
  }

  .responsive-data-card-meta a {
    display: inline-flex;
    align-items: center;
  }

  .responsive-data-card-actions {
    display: flex;
    min-width: 0;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }

  .responsive-data-card-actions button {
    flex: 1 1 132px;
    min-width: 0;
  }

  .responsive-data-empty {
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
  }

  .responsive-data-card :is(button, a, input, select, textarea, [tabindex]):focus-visible,
  .responsive-data-mobile-toolbar :is(button, select):focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  .overview-table .responsive-data-table--mobile-sticky .responsive-table-sticky-cell {
    background: transparent;
    backdrop-filter: none;
  }

  .overview-table .responsive-data-table--mobile-sticky thead .responsive-table-sticky-cell {
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    backdrop-filter: blur(2px);
  }

  .overview-table .responsive-data-table--mobile-sticky tr:hover > .responsive-table-sticky-cell {
    background: var(--table-hover-surface);
  }

  .overview-table .responsive-data-table--mobile-sticky tr.selected-row > .responsive-table-sticky-cell {
    background: var(--table-active-surface);
  }

  .dialog-backdrop:has(.boat-detail-dialog) {
    padding: var(--space-2);
    place-items: center;
  }

  .dialog-shell.boat-detail-dialog {
    width: 100%;
    height: auto;
    max-height: calc(100dvh - (2 * var(--space-2)));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-panel);
  }

  .boat-detail-dialog .assignment-grid-header,
  .boat-detail-dialog .assignment-grid-row {
    grid-template-columns: minmax(0, 1fr) minmax(78px, 0.8fr) minmax(78px, 0.8fr);
    gap: 6px;
  }

  .boat-detail-dialog .assignment-grid-header {
    padding-inline: 0;
  }

  .boat-detail-dialog .assignment-grid-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .boat-detail-dialog .boat-actions.single-action {
    justify-content: end;
  }
}

.dialog-shell.boat-detail-dialog {
  max-height: calc(100dvh - 16px);
}

.boat-detail-dialog .dialog-header {
  min-height: 56px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
}

.boat-detail-dialog .dialog-body {
  padding: 14px;
}
