/* Crew List & Ship Certificates — aligned with Vessel Compliance hub / Ship Particulars */

.vc-legacy-workspace .sp-body {
    max-height: none;
    overflow: visible;
    max-width: min(1600px, 100%);
    margin-inline: auto;
    box-sizing: border-box;
}

.vc-legacy-workspace .sp-particulars-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--sp-white, #fff);
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(27, 58, 75, 0.07);
}

.vc-legacy-workspace .sp-particulars-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.vc-legacy-workspace .sp-particulars-next {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    white-space: nowrap;
}

.vc-legacy-workspace .sp-particulars-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: var(--sp-gray-800, #424242);
}

.vc-legacy-workspace .sp-particulars-back:hover {
    color: var(--sp-navy-700, #1b3a4b);
}

.vc-legacy-workspace .sp-particulars-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    flex: 1;
    min-width: 0;
}

.vc-legacy-workspace .sp-particulars-context-sep {
    color: var(--sp-steel-300, #b0bec5);
    font-size: 0.875rem;
    user-select: none;
}

.vc-legacy-workspace .sp-particulars-section-label,
.vc-legacy-workspace .sp-particulars-report-label {
    font-size: 0.875rem;
}

.vc-legacy-workspace .sp-particulars-section-label {
    font-weight: 600;
    color: var(--sp-navy-600, #274c63);
}

.vc-legacy-workspace .sp-particulars-report-label {
    font-weight: 400;
    color: var(--sp-gray-600, #757575);
}

.vc-legacy-workspace .vc-legacy-content {
    max-width: min(1600px, 100%);
    margin-inline: auto;
    padding: 0 0.25rem 1.5rem;
    box-sizing: border-box;
}

/* Ship particulars forms — same max content width as Ship Certificates */
.vc-legacy-workspace .sp-particulars-form-only {
    margin-top: 0;
    max-height: calc(100vh - 280px);
    overflow: auto;
    padding: 0;
}

.vc-legacy-workspace .vc-panel .sp-particulars-form-only {
    max-height: calc(100vh - 320px);
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace,
.vc-legacy-workspace .vc-panel .sp-form-editor--workspace.sp-card {
    width: 100%;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace.sp-form-editor {
    width: 100%;
    max-width: 100%;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-card-header {
    display: none;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-card-body {
    padding: 1rem 1.25rem;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-card-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--sp-steel-300, #b0bec5);
}

/* Consistent label/input columns (overrides per-form inline --sp-form-*-width variables) */
.vc-legacy-workspace .vc-panel .sp-form-editor--workspace.sp-form-editor {
    --sp-form-label-width: 22ch;
    --sp-form-input-width: 16ch;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-field {
    width: 100%;
    max-width: 44rem;
    grid-template-columns: var(--sp-form-label-width) var(--sp-form-input-width);
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-input,
.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-value,
.vc-legacy-workspace .vc-panel .sp-form-editor--workspace select.sp-input {
    width: var(--sp-form-input-width);
    max-width: var(--sp-form-input-width);
    min-width: var(--sp-form-input-width);
    box-sizing: border-box;
}

.vc-legacy-workspace .vc-panel .sp-form-editor--workspace .sp-checkbox {
    justify-self: start;
}

.vc-legacy-workspace.vm-cert-page .vm-cert-formats,
.vc-legacy-workspace.vm-cert-page .vm-cert-preview-panel {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.vc-legacy-workspace .vc-error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--sp-red-700, #b71c1c);
    background: #fff5f5;
    border: 1px solid rgba(198, 40, 40, 0.35);
    border-radius: 6px;
}

/* Panel (matches hub cd-hub-panel) */
.vc-legacy-workspace .vc-panel {
    display: flex;
    flex-direction: column;
    background: var(--sp-white, #fff);
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(27, 58, 75, 0.07);
    overflow: hidden;
}

.vc-legacy-workspace .vc-panel__titlebar {
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, var(--sp-steel-100, #e8ecef) 0%, #dfe6ea 100%);
    border-bottom: 1px solid var(--sp-steel-300, #b0bec5);
}

.vc-legacy-workspace .vc-panel__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--sp-navy-700, #1b3a4b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vc-legacy-workspace .vc-panel__title .oi {
    font-size: 1rem;
    color: var(--sp-navy-600, #274c63);
}

.vc-legacy-workspace .vc-panel__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--sp-steel-200, #d1d9e0);
    flex-wrap: wrap;
}

.vc-legacy-workspace .vc-panel__actions .vc-field-row {
    flex: 1 1 auto;
    min-width: min(100%, 14rem);
}

.vc-legacy-workspace .vc-panel__actions .vc-panel__toolbar {
    margin-left: auto;
}

.vc-legacy-workspace .vc-panel__intro {
    flex: 1;
    min-width: min(100%, 16rem);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--sp-gray-600, #757575);
}

.vc-legacy-workspace .vc-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.vc-legacy-workspace .vc-panel__body {
    padding: 0;
}

.vc-legacy-workspace .vc-field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.vc-legacy-workspace .vc-field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sp-navy-700, #1b3a4b);
    white-space: nowrap;
}

.vc-legacy-workspace .vc-select,
.vc-legacy-workspace .vc-input {
    font-family: var(--sp-font, 'Roboto', sans-serif);
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 4px;
    background: var(--sp-white, #fff);
    color: var(--sp-gray-900, #212121);
    min-height: 2.25rem;
    box-sizing: border-box;
}

.vc-legacy-workspace .vc-select {
    min-width: 12rem;
}

.vc-legacy-workspace .vc-input:focus,
.vc-legacy-workspace .vc-select:focus {
    outline: none;
    border-color: var(--sp-navy-600, #274c63);
    box-shadow: 0 0 0 2px rgba(39, 76, 99, 0.15);
}

/* Data tables */
.vc-legacy-workspace .vc-table-scroll {
    overflow: auto;
    max-height: calc(100vh - 280px);
}

.vc-legacy-workspace .vc-table-scroll table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.875rem;
}

.vc-legacy-workspace .vc-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sp-navy-700, #1b3a4b);
    background: linear-gradient(180deg, var(--sp-steel-100, #e8ecef) 0%, #dfe6ea 100%);
    border-bottom: 1px solid var(--sp-steel-300, #b0bec5);
    white-space: nowrap;
}

.vc-legacy-workspace .vc-table-scroll tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--sp-steel-200, #d1d9e0);
    color: var(--sp-gray-900, #212121);
}

.vc-legacy-workspace .vc-table-scroll tbody tr {
    background: var(--sp-white, #fff);
}

.vc-legacy-workspace .vc-table-scroll tbody tr:hover:not(.shipCertificatesSubSectionRow):not(.vc-search-row) {
    background: rgba(39, 76, 99, 0.04);
}

.vc-legacy-workspace .vc-table-scroll tbody tr.vc-search-row {
    background: var(--sp-gray-50, #fafafa);
}

.vc-legacy-workspace .vc-certificates-table tbody tr.vc-search-row {
    border-bottom: 1px solid var(--sp-steel-200, #d1d9e0);
}

.vc-legacy-workspace .vc-certificates-table tbody tr.vc-search-row td {
    border-bottom: none;
}

.vc-legacy-workspace .vc-table-scroll tbody tr.vc-search-row td {
    padding: 0.625rem 0.5rem;
}

.vc-legacy-workspace .vc-table-scroll tbody tr.vc-empty-row td {
    padding: 1.25rem 0.75rem;
    color: var(--sp-gray-600, #757575);
    font-style: italic;
}

.vc-legacy-workspace .vc-row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    white-space: nowrap;
    min-width: 9rem;
}

/* Ship certificates — full-width rows; fixed-width actions column (do not shrink icons) */
.vc-legacy-workspace .vc-certificates-table {
    table-layout: fixed;
    width: 100%;
}

.vc-legacy-workspace .vc-certificates-table .vc-col-cert-name {
    width: 32%;
}

.vc-legacy-workspace .vc-certificates-table .vc-col-authority {
    width: 22%;
}

.vc-legacy-workspace .vc-certificates-table .vc-col-date {
    width: 12%;
}

.vc-legacy-workspace .vc-certificates-table .vc-col-actions {
    width: 22%;
}

.vc-legacy-workspace .vc-certificates-table tbody tr:not(.vc-search-row):not(.shipCertificatesSubSectionRow) td {
    vertical-align: middle;
}

.vc-legacy-workspace .vc-certificates-table tbody tr:not(.vc-search-row):not(.shipCertificatesSubSectionRow) td.vc-cert-name-cell {
    vertical-align: top;
}

.vc-legacy-workspace .vc-certificates-table th.vc-col-actions-header,
.vc-legacy-workspace .vc-certificates-table td.vc-cert-actions-cell,
.vc-legacy-workspace .vc-certificates-table td.vc-cert-search-actions {
    width: 22%;
    min-width: 11rem;
    white-space: nowrap;
    padding-left: 0.375rem;
    padding-right: 0.5rem;
    vertical-align: middle;
}

.vc-legacy-workspace .vc-certificates-table .vc-cert-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    min-width: 9rem;
}

.vc-legacy-workspace .vc-certificates-table .vc-cert-actions .vc-icon-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.vc-legacy-workspace .vc-certificates-table .vc-cert-search-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.vc-legacy-workspace .vc-certificates-table .vc-cert-name-cell .vc-cert-name {
    display: block;
}

.vc-legacy-workspace .vc-certificates-table .vc-cert-name-cell .vc-cert-comment {
    display: block;
    margin-top: 0.125rem;
    padding-left: 0;
    text-indent: 0;
}

/* Voyage records — fixed columns; single border under each record group */
.vc-legacy-workspace .vc-voyage-records-table {
    table-layout: fixed;
    width: 100%;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-col-country {
    width: 32%;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-col-port {
    width: 22%;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-col-date {
    width: 14%;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-col-actions {
    width: 9rem;
    min-width: 9rem;
}

.vc-legacy-workspace .vc-voyage-records-table tbody td {
    border-bottom: none;
}

.vc-legacy-workspace .vc-voyage-records-table tbody tr.vc-voyage-record-group-end td {
    border-bottom: 1px solid var(--sp-steel-200, #d1d9e0);
}

.vc-legacy-workspace .vc-voyage-records-table .vc-voyage-record-message td {
    padding-top: 0;
    padding-bottom: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    vertical-align: top;
}

.vc-legacy-workspace .vc-voyage-records-table th.vc-col-actions,
.vc-legacy-workspace .vc-voyage-records-table td.vc-col-actions {
    padding-left: 0.375rem;
    padding-right: 0.5rem;
    white-space: nowrap;
}

/* Voyage records inline row */
.vc-legacy-workspace .vc-voyage-records-table .vc-voyage-record-row td {
    vertical-align: middle;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-voyage-record-cell .vc-port-country-field {
    margin: 0;
}

.vc-legacy-workspace .vc-voyage-records-table .vc-voyage-record-cell .form-control {
    width: 100%;
    min-width: 0;
}

.vc-legacy-workspace .vc-panel--ab6-review {
    overflow: visible;
}

.vc-legacy-workspace .vc-panel--ab6-review .vc-panel__body {
    padding: 1rem 1.25rem 1.25rem;
    overflow: visible;
}

.vc-legacy-workspace .vc-ab6-review-intro {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--sp-gray-600, #757575);
}

.vc-legacy-workspace .vc-ab6-review-banner {
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #6c757d);
}

.vc-legacy-workspace .vc-ab6-review-banner .oi {
    margin-right: 0.25rem;
}

.vc-legacy-workspace .vc-ab6-review-country {
    display: grid;
    grid-template-columns: minmax(12rem, 22rem);
    gap: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.vc-legacy-workspace .vc-ab6-review-country .form-label {
    margin-bottom: 0.35rem;
}

.vc-legacy-workspace .vc-ab6-review-stat {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    max-width: none;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--sp-gray-600, #757575);
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .vc-legacy-workspace .vc-ab6-review-stat {
        white-space: normal;
    }
}

.vc-legacy-workspace .vc-ab6-review-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .vc-legacy-workspace .vc-ab6-review-options {
        grid-template-columns: 1fr;
    }
}

.vc-legacy-workspace .vc-ab6-review-card {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 0.75rem;
    min-height: 100%;
    padding: 1rem 1.125rem;
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 8px;
    background: var(--sp-white, #fff);
    overflow: visible;
}

.vc-legacy-workspace .vc-ab6-review-card__header {
    min-height: 6.75rem;
}

.vc-legacy-workspace .vc-ab6-review-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--sp-navy-700, #1b3a4b);
}

.vc-legacy-workspace .vc-ab6-review-card__desc {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--sp-gray-600, #757575);
    margin: 0;
}

.vc-legacy-workspace .vc-ab6-review-card__picker {
    overflow: visible;
}

.vc-legacy-workspace .vc-ab6-review-card__picker .vc-port-country-field,
.vc-legacy-workspace .vc-ab6-review-country .vc-port-country-field {
    margin: 0;
}

.vc-legacy-workspace .vc-ab6-review-card__picker .form-control,
.vc-legacy-workspace .vc-ab6-review-country .form-control {
    width: 100%;
}

.vc-legacy-workspace .vc-ab6-review-card__footer {
    min-height: 1.5rem;
}

.vc-legacy-workspace .vc-ab6-review-selection {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--sp-gray-700, #616161);
}

.vc-legacy-workspace .vc-ab6-review-footer {
    margin: 1.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--sp-gray-600, #757575);
}

.vc-legacy-workspace .vc-port-subtitle-picker {
    position: relative;
    z-index: 1;
}

.vc-legacy-workspace .vc-port-subtitle-picker--open {
    z-index: 1100;
}

.vc-legacy-workspace .vc-port-subtitle-picker__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.vc-legacy-workspace .vc-port-subtitle-picker__trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.vc-legacy-workspace .vc-port-subtitle-picker__trigger.disabled,
.vc-legacy-workspace .vc-port-subtitle-picker__trigger:disabled {
    opacity: 0.65;
}

.vc-legacy-workspace .vc-port-subtitle-picker__placeholder {
    color: var(--bs-secondary-color, #6c757d);
}

.vc-legacy-workspace .vc-port-subtitle-picker__primary {
    font-weight: 500;
    line-height: 1.2;
}

.vc-legacy-workspace .vc-port-subtitle-picker__secondary {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1.2;
}

.vc-legacy-workspace .vc-port-subtitle-picker__list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 1101;
    max-height: min(18rem, 50vh);
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: var(--sp-white, #fff);
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(27, 58, 75, 0.15);
}

.vc-legacy-workspace .vc-port-subtitle-picker__option {
    padding: 0.5rem 0.875rem;
    cursor: pointer;
}

.vc-legacy-workspace .vc-port-subtitle-picker__option:hover,
.vc-legacy-workspace .vc-port-subtitle-picker__option--selected {
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.vc-legacy-workspace .vc-port-subtitle-picker__option--clear {
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.1));
}

.vc-legacy-workspace .vc-voyage-records-table .vc-voyage-record-actions {
    vertical-align: middle;
}

.vc-legacy-workspace .vc-icon-btn--compact {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.7rem;
}

.vc-legacy-workspace .vc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 4px;
    background: var(--sp-white, #fff);
    color: var(--sp-navy-600, #274c63);
    cursor: pointer;
    line-height: 1;
}

.vc-legacy-workspace .vc-icon-btn:hover:not(:disabled) {
    border-color: var(--sp-navy-600, #274c63);
    background: rgba(39, 76, 99, 0.06);
}

.vc-legacy-workspace .vc-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.vc-legacy-workspace .vc-icon-btn--danger {
    color: var(--sp-red-600, #c62828);
}

.vc-legacy-workspace .vc-icon-btn--danger:hover:not(:disabled) {
    border-color: var(--sp-red-600, #c62828);
    background: #fff5f5;
}

.vc-legacy-workspace .sp-btn-primary:hover {
    background: var(--sp-navy-600, #274c63);
    border-color: var(--sp-navy-600, #274c63);
}

.vc-legacy-workspace .sp-btn-secondary:hover {
    border-color: var(--sp-navy-600, #274c63);
    color: var(--sp-navy-700, #1b3a4b);
}

/* Subsection headers (ship certificates) */
.vc-legacy-workspace .shipCertificatesSubSectionRow {
    background: linear-gradient(180deg, var(--sp-steel-100, #e8ecef) 0%, #dfe6ea 100%) !important;
    color: var(--sp-navy-700, #1b3a4b) !important;
    font-weight: 700 !important;
    font-size: 0.8125rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vc-legacy-workspace .shipCertificatesSubSectionRow .sp-btn {
    float: right;
}

.vc-legacy-workspace .vc-cert-comment {
    color: var(--sp-blue-600, #1565c0);
    font-size: 0.8125rem;
    line-height: 1.3;
}

/* Status rows / cells — softer tints within VC workspace */
.vc-legacy-workspace .expiredCertRow,
.vc-legacy-workspace .expiredDateCell {
    background-color: rgba(198, 40, 40, 0.12) !important;
}

.vc-legacy-workspace .expiringCertRow,
.vc-legacy-workspace .expiringDateCell {
    background-color: rgba(255, 152, 0, 0.14) !important;
}

.vc-legacy-workspace .uploadedCertRow {
    background-color: rgba(39, 76, 99, 0.08) !important;
}

.vc-legacy-workspace .missingCertRow {
    background-color: var(--sp-white, #fff) !important;
}

/* Empty / upsell state */
.vc-legacy-workspace .vc-empty-state {
    margin: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--sp-white, #fff);
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(27, 58, 75, 0.07);
}

.vc-legacy-workspace .vc-empty-state h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sp-navy-700, #1b3a4b);
}

.vc-legacy-workspace .vc-empty-state p {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: var(--sp-gray-600, #757575);
}

.vc-legacy-workspace .vc-empty-state a {
    color: var(--sp-blue-600, #1565c0);
}

@media (max-width: 576px) {
    .vc-legacy-workspace .vc-panel__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .vc-legacy-workspace .vc-panel__toolbar {
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Crew add/edit modal (Blazored — AB#2 basic personal details) */
.blazored-modal .crew-member-form__editor.sp-form-editor,
.crew-member-form__editor.sp-form-editor {
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.crew-member-form__intro {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--sp-gray-600, #757575);
}

.blazored-modal .crew-member-form__grid,
.crew-member-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem 1.25rem;
}

.crew-member-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.crew-member-form__field--full {
    grid-column: 1 / -1;
}

.crew-member-form__field .sp-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sp-gray-700, #616161);
    margin: 0;
}

.crew-member-form__input {
    width: 100%;
    max-width: 100%;
    text-align: left;
    font-size: 0.9375rem;
}

/* Rank select + action: one bordered control, full width like other full-row fields */
.crew-member-form__rank-control {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 3px;
    overflow: hidden;
    background: var(--sp-white, #fff);
    box-sizing: border-box;
}

.crew-member-form__rank-control:focus-within {
    border-color: var(--sp-blue-600, #1565c0);
    outline: 1px solid var(--sp-blue-600, #1565c0);
    outline-offset: 0;
}

.crew-member-form__rank-select.form-control {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0.375rem 0.5rem;
    text-align: left;
    font-size: 0.9375rem;
    line-height: 1.5;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--sp-white, #fff);
    min-height: calc(1.5em + 0.75rem + 2px);
}

.crew-member-form__rank-select.form-control:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.crew-member-form__add-rank {
    flex-shrink: 0;
    margin: 0;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: nowrap;
    border: none;
    border-left: 1px solid var(--sp-steel-300, #b0bec5);
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    box-sizing: border-box;
    background: var(--sp-gray-50, #fafafa);
}

.crew-member-form__add-rank:focus {
    outline: none;
    box-shadow: none;
}

.crew-member-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.crew-member-form__checkbox .form-check-label {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--sp-gray-800, #424242);
}

.crew-member-form__validation {
    font-size: 0.8125rem;
    color: var(--sp-red-700, #b71c1c);
}

.crew-member-form__footer.sp-card-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0 0;
    margin-top: 0.25rem;
    border-top: 1px solid var(--sp-steel-300, #b0bec5);
    background: transparent;
}

.crew-member-form__loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

@media (max-width: 520px) {
    .crew-member-form__grid {
        grid-template-columns: 1fr;
    }

}

/* Add rank sub-modal */
.crew-rank-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.crew-rank-form__input {
    max-width: 20rem;
    text-align: left;
}

.crew-rank-form__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sp-steel-300, #b0bec5);
}

/*
 * Crew list grid (AB#19) — layout rules: docs/features/crew-list-grid-layout.md
 * Never put .vc-row-actions on <td>; use .crew-list__actions-col > .vc-row-actions
 */
.vc-legacy-workspace .crew-list-table-wrap--compact {
    overflow-x: hidden;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded {
    overflow-x: auto;
}

.vc-legacy-workspace .crew-list-table {
    table-layout: fixed;
    width: 100%;
}

.vc-legacy-workspace .crew-list-table .crew-list__actions-col,
.vc-legacy-workspace .crew-list-table .crew-list__actions-col-h {
    width: 11.75rem;
    min-width: 11.75rem;
    max-width: 11.75rem;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    overflow: visible;
}

.vc-legacy-workspace .crew-list-table .crew-list__actions-col .vc-row-actions,
.vc-legacy-workspace .crew-list-table .crew-list__actions-col-h .vc-row-actions {
    min-width: 11rem;
    justify-content: flex-end;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.vc-legacy-workspace .crew-list-table .crew-list__actions-col .vc-row-actions .vc-icon-btn {
    flex-shrink: 0;
}

.vc-legacy-workspace .crew-list-table .crew-list__header-action-slot {
    display: block;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.vc-legacy-workspace .crew-list-table .crew-list__toggle-docs-icon.oi {
    color: var(--sp-navy-600, #274c63);
}

.vc-legacy-workspace .crew-list-table .crew-list__toggle-docs-icon.oi[aria-pressed="true"] {
    border-color: var(--sp-navy-600, #274c63);
    background: rgba(39, 76, 99, 0.08);
}

.vc-legacy-workspace .crew-list-table thead th {
    overflow-wrap: anywhere;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list-table thead th {
    white-space: normal;
    line-height: 1.25;
    vertical-align: bottom;
}

.vc-legacy-workspace .crew-list-table .crew-list__col-msmc {
    width: 4.75rem;
    min-width: 4.75rem;
}

.vc-legacy-workspace .crew-list-table .crew-list__col-nationality {
    width: 6.5rem;
    min-width: 6.5rem;
}

.vc-legacy-workspace .crew-list-table .crew-list__col-embarkation,
.vc-legacy-workspace .crew-list-table .crew-list__embarkation-cell {
    width: 9.5rem;
    min-width: 9.5rem;
}

.crew-list__embarkation-text {
    display: block;
    font-size: 0.875rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crew-list__embarkation-empty {
    color: var(--vc-muted, #6c757d);
}

.crew-embarkation-modal__preview {
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.crew-embarkation-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.vc-legacy-workspace .crew-list-table .crew-list__col-status,
.vc-legacy-workspace .crew-list-table .crew-list__status-cell {
    width: 10rem;
    min-width: 10rem;
}

.crew-list__status-cell {
    vertical-align: middle;
}

.crew-list__status-select {
    width: 100%;
    max-width: 100%;
    font-size: 0.875rem;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list__doc-col--passport-no {
    width: 6.5rem;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list__doc-col--passport-exp {
    width: 6.25rem;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list__doc-col--passport-issued {
    width: 6.5rem;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list__doc-col--seaman-no {
    width: 6.25rem;
}

.vc-legacy-workspace .crew-list-table-wrap--expanded .crew-list__doc-col--seaman-exp {
    width: 7rem;
    min-width: 7rem;
}

.vc-legacy-workspace .crew-list-table .crew-list__doc-col {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vc-legacy-workspace .vc-table-scroll tbody td.vc-row-actions {
    display: table-cell;
    vertical-align: middle;
}

/* Crew ID documents modal (AB#17) */
.crew-id-documents-modal {
    box-sizing: border-box;
    max-width: 100%;
    overflow: auto;
}

.crew-id-documents-modal:focus {
    outline: none;
}

.crew-id-documents__employee-id {
    font-weight: 600;
}

.crew-id-documents-modal .vc-table-scroll.crew-id-documents__table-scroll {
    margin-bottom: 1rem;
    max-height: none;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.crew-id-documents-modal .vc-table-scroll table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.crew-id-documents-modal .vc-table-scroll thead th {
    white-space: normal;
    overflow-wrap: anywhere;
}

.crew-id-documents-modal .vc-table-scroll tbody td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.crew-id-documents-modal .vc-table-scroll th:nth-child(1),
.crew-id-documents-modal .vc-table-scroll td:nth-child(1) {
    width: 20%;
}

.crew-id-documents-modal .vc-table-scroll th:nth-child(2),
.crew-id-documents-modal .vc-table-scroll td:nth-child(2) {
    width: 26%;
}

.crew-id-documents-modal .vc-table-scroll th:nth-child(3),
.crew-id-documents-modal .vc-table-scroll td:nth-child(3) {
    width: 22%;
}

.crew-id-documents-modal .vc-table-scroll th:nth-child(4),
.crew-id-documents-modal .vc-table-scroll td:nth-child(4) {
    width: 18%;
}

.crew-id-documents-modal .crew-id-documents__actions-col {
    width: 14%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    overflow: visible;
}

.crew-id-documents-modal .crew-id-documents__actions-col .vc-row-actions {
    min-width: 0;
    justify-content: flex-end;
    gap: 0.2rem;
}

.crew-id-documents-modal .crew-id-documents__actions-col .vc-icon-btn {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
}

.crew-id-documents__empty {
    margin: 0 0 1rem;
    color: var(--sp-steel-700, #546e7a);
    font-size: 0.875rem;
}

.crew-id-documents__editor {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-steel-300, #b0bec5);
}

.crew-id-documents__editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.crew-id-documents__add {
    margin-bottom: 1rem;
}

.crew-id-documents__done {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-steel-300, #b0bec5);
}

/* AB#18 — crew certifications pages */
.crew-certifications-page .vc-panel__body.crew-certifications-page__body,
.crew-certifications-detail .vc-panel__body.crew-certifications-detail__body {
    padding: 1rem 1.25rem 1.25rem;
}

.crew-certifications-detail__intro-bar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.crew-certifications-detail__employee-id {
    display: block;
    font-weight: 600;
    color: var(--sp-navy-700, #1b3a4b);
    margin-bottom: 0.25rem;
}

.crew-certifications-index__table-scroll,
.crew-certifications-detail__table-scroll {
    border: 1px solid var(--sp-steel-200, #d1d9e0);
    border-radius: 6px;
    max-height: none;
}

.crew-certifications-index-table {
    width: 100%;
    min-width: 40rem;
    table-layout: fixed;
}

.crew-certifications-index-table__actions-col,
.crew-certifications-detail__col-actions {
    width: 6.25rem;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
    padding-right: 0.625rem !important;
}

.crew-certifications-detail__table {
    table-layout: fixed;
    width: 100%;
}

.crew-certifications-detail__col-cert {
    width: 38%;
    text-align: left;
}

.crew-certifications-detail__col-expiry {
    width: 14%;
    text-align: left;
    white-space: nowrap;
}

.crew-certifications-detail__col-pdf {
    width: 28%;
    text-align: left;
    overflow-wrap: anywhere;
}

.crew-certifications-detail__col-actions .vc-row-actions {
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
}

.crew-certifications-detail__empty {
    color: var(--sp-gray-500, #9e9e9e);
}

.crew-certifications-detail__editor {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--sp-gray-50, #fafafa);
    border: 1px solid var(--sp-steel-200, #d1d9e0);
    border-radius: 6px;
}

.crew-certifications-detail__editor-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--sp-navy-700, #1b3a4b);
}

.crew-certifications-detail__form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.crew-certifications-detail__form-grid {
    display: grid;
    gap: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.crew-certifications-detail__form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 42rem;
}

.crew-certifications-detail__form-grid--dates {
    grid-template-columns: repeat(2, minmax(0, 11.5rem));
    max-width: 24rem;
}

.crew-certifications-detail__field-block {
    margin-bottom: 1rem;
    max-width: 42rem;
}

.crew-certifications-detail__field-block .sp-label {
    display: block;
    margin-bottom: 0.375rem;
}

.crew-certifications-detail__pdf-block {
    max-width: 36rem;
}

.crew-certifications-detail__form .crew-member-form__field {
    gap: 0.375rem;
}

.crew-certifications-detail__upload.upload-area {
    min-height: 5.5rem;
    height: auto;
    min-width: 0;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-top: 0.25rem;
    border-color: var(--sp-steel-300, #b0bec5);
    background-color: rgba(39, 76, 99, 0.06);
}

.crew-certifications-detail__upload.upload-area .label {
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: center;
    padding: 0 0.5rem;
}

.crew-certifications-detail__file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.625rem;
}

.crew-certifications-detail__editor-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-steel-200, #d1d9e0);
}

.crew-certifications-index-table__actions-col {
    padding-right: 0.75rem !important;
}

@media (max-width: 640px) {
    .crew-certifications-detail__form-grid--two,
    .crew-certifications-detail__form-grid--dates {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .crew-certifications-detail__col-cert {
        width: 34%;
    }

    .crew-certifications-detail__col-expiry {
        width: 18%;
    }

    .crew-certifications-detail__col-pdf {
        width: 24%;
    }
}

.crew-list__header-action-slot--certs {
    width: 1.75rem;
}

/* AB#20 — crew rota / working arrangements */
.crew-rota-page .vc-table-scroll thead th {
    font-size: 0.875rem;
    padding: 0.35rem 0.5rem;
    white-space: normal;
    overflow: visible;
    text-transform: none;
    letter-spacing: normal;
}

.crew-rota-page .vc-table-scroll thead tr:first-child th {
    top: 0;
    z-index: 3;
}

.crew-rota-page .vc-table-scroll thead tr:nth-child(2) th {
    top: 2.1rem;
    z-index: 2;
    box-shadow: inset 0 1px 0 rgba(176, 190, 197, 0.65);
}

.crew-rota-table-wrap {
    overflow-x: auto;
}

.crew-rota-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.875rem;
}

.crew-rota-table th,
.crew-rota-table td {
    border: 1px solid var(--sp-steel-200, #d1d9e0);
    padding: 0.35rem 0.5rem;
    vertical-align: top;
}

.crew-rota-table__rank {
    min-width: 9rem;
    font-weight: 600;
}

.crew-rota-table__group--at-sea {
    text-align: center;
    background: var(--sp-sky-100, #e8f4fc);
}

.crew-rota-table__group--in-port {
    text-align: center;
    background: var(--sp-steel-100, #eef2f5);
}

.crew-rota-table__hours {
    min-width: 5rem;
    width: 5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.crew-rota-table thead .crew-rota-table__hours {
    line-height: 1.25;
    white-space: normal;
    font-weight: 600;
    vertical-align: middle;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    overflow: visible;
}

.crew-rota-table__hours-label {
    display: block;
}

.crew-rota-table tbody .crew-rota-table__hours {
    white-space: nowrap;
}

.crew-rota-table__comments {
    width: 8rem;
    max-width: 12rem;
    word-break: break-word;
}

.crew-rota-table__actions-col {
    width: 5.5rem;
    max-width: 5.5rem;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

.crew-rota-page .crew-rota-table__actions-col .vc-row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    min-width: 0;
    justify-content: center;
    width: 100%;
}

.crew-rota-page .crew-rota-table__actions-col .vc-icon-btn {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    font-size: 1rem;
    padding: 0;
}

.blazored-modal:has(.crew-rota-edit-modal) {
    max-height: 94vh;
    min-height: min(88vh, 44rem);
    display: flex;
    flex-direction: column;
}

.blazored-modal:has(.crew-rota-edit-modal) .bm-content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.crew-rota-edit-modal {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.crew-rota-edit-modal__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.crew-rota-edit-modal__scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: min(82vh, 52rem);
    padding-right: 0.25rem;
}

.crew-rota-edit-modal__intro {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--sp-steel-700, #4a5866);
}

.crew-rota-edit-modal__field-hint,
.crew-rota-edit-modal__section-hint {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--sp-steel-600, #5c6b7a);
}

.crew-rota-edit-modal__section-hint {
    grid-column: 1 / -1;
}

.crew-rota-edit-modal__grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crew-rota-edit-modal__section {
    border: 1px solid var(--sp-steel-200, #d1d9e0);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.crew-rota-edit-modal__section legend {
    grid-column: 1 / -1;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.crew-rota-edit-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.crew-rota-edit-modal__section--bands {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
}

.crew-rota-edit-modal__band {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.crew-rota-edit-modal__band .sp-label {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.crew-rota-table__row--editing > td {
    padding: 0.5rem;
    background: var(--sp-steel-50, #f6f8fa);
}

.crew-rota-inline-edit {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.crew-rota-inline-edit__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}

.crew-rota-inline-edit__rank {
    flex: 0 1 12rem;
    min-width: 10rem;
}

.crew-rota-inline-edit__rank .sp-label {
    margin-bottom: 0.15rem;
}

.crew-rota-inline-edit__totals {
    flex: 1 1 14rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8125rem;
    color: var(--sp-steel-700, #4a5866);
}

.crew-rota-inline-edit__actions {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}

.crew-rota-inline-edit__sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .crew-rota-inline-edit__sections {
        grid-template-columns: 1fr;
    }
}

.crew-rota-inline-edit__section {
    border: 1px solid var(--sp-steel-200, #d1d9e0);
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    min-width: 0;
}

.crew-rota-inline-edit__section legend {
    grid-column: 1 / -1;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0;
    padding: 0 0.15rem;
}

.crew-rota-inline-edit__band {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.crew-rota-inline-edit__band-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sp-steel-600, #5c6b7a);
}

.crew-rota-inline-edit__comments .sp-label {
    margin-bottom: 0.15rem;
}

.crew-rota-table__band-summary {
    word-break: break-word;
    font-size: 0.8125rem;
}

.crew-working-band {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crew-working-band--compact {
    gap: 0.35rem;
    font-size: 0.8125rem;
}

.crew-working-band--compact .crew-working-band__mode {
    flex-wrap: wrap;
}

.crew-working-band__mode {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.crew-working-band__mode-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.crew-working-band__preset {
    max-width: 14rem;
}

.crew-working-band__hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--sp-steel-600, #5c6b7a);
}

.crew-working-band__hint--dense {
    font-size: 0.75rem;
}

.crew-working-band__timeline-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--sp-steel-600, #5c6b7a);
    margin-bottom: 0.15rem;
}

.crew-working-band__timeline-scale--dense {
    font-size: 0.625rem;
}

.crew-working-band__timeline-track {
    position: relative;
    height: 2rem;
    min-width: 16rem;
    border: 1px solid var(--sp-steel-300, #b8c4ce);
    border-radius: 4px;
    background-color: var(--sp-steel-100, #eef2f5);
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent calc(100% / 24 - 1px),
        rgba(184, 196, 206, 0.55) calc(100% / 24 - 1px),
        rgba(184, 196, 206, 0.55) calc(100% / 24)
    );
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.crew-working-band--compact .crew-working-band__timeline-track {
    min-width: 0;
    width: 100%;
    height: 1.75rem;
}

.crew-working-band--dense {
    gap: 0.3rem;
    font-size: 0.8125rem;
}

.crew-working-band--dense .crew-working-band__mode-select {
    max-width: 100%;
}

.crew-working-band--dense .crew-working-band__timeline-track {
    min-width: 0;
    width: 100%;
    height: 1.5rem;
}


.crew-working-band__mode-select {
    max-width: 10rem;
}

.crew-working-band__timeline-segment {
    position: absolute;
    top: 2px;
    bottom: 2px;
    border-radius: 2px;
    background: var(--sp-sky-500, #3d8fc4);
    opacity: 0.85;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1;
}

.crew-working-band__timeline-segment--selected {
    opacity: 1;
    background: var(--sp-sky-600, #2a7aad);
    box-shadow: 0 0 0 2px var(--sp-white, #fff), 0 0 0 3px var(--sp-sky-500, #3d8fc4);
    z-index: 3;
}

.crew-working-band__timeline-handle {
    position: absolute;
    top: 1px;
    bottom: 1px;
    width: 4px;
    background: var(--sp-white, #fff);
    border: 1px solid var(--sp-navy-600, #274c63);
    border-radius: 1px;
    cursor: ew-resize;
    z-index: 4;
    box-sizing: border-box;
}

.crew-working-band__timeline-handle--start {
    left: -2px;
}

.crew-working-band__timeline-handle--end {
    right: -2px;
}

.crew-working-band__timeline-segment-body {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    max-width: calc(100% - 4px);
    pointer-events: none;
}

.crew-working-band__timeline-segment-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--sp-white, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
    font-variant-numeric: tabular-nums;
}

.crew-working-band__timeline-segment-remove {
    pointer-events: auto;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: var(--sp-white, #fff);
    font-size: 0.875rem;
    line-height: 1;
    padding: 0 0.2rem;
    border-radius: 2px;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.crew-working-band__timeline-segment:hover .crew-working-band__timeline-segment-remove,
.crew-working-band__timeline-segment--selected .crew-working-band__timeline-segment-remove,
.crew-working-band__timeline-segment-remove:focus-visible {
    opacity: 1;
}

.crew-working-band__timeline-segment-remove:hover {
    background: rgba(255, 255, 255, 0.45);
}

.crew-working-band__timeline-preview {
    position: absolute;
    top: 2px;
    bottom: 2px;
    border-radius: 2px;
    background: var(--sp-sky-300, #8ec4e8);
    opacity: 0.65;
    pointer-events: none;
    z-index: 2;
}

.crew-working-band__range-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crew-working-band__range-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
    background: var(--sp-sky-100, #e8f4fc);
    border: 1px solid var(--sp-sky-200, #c5e0f5);
    border-radius: 4px;
}

.crew-working-band__range-chip .crew-working-band__time {
    width: 5.75rem;
    min-width: 0;
    padding: 0.15rem 0.25rem;
}

.crew-working-band__range-sep {
    font-size: 0.75rem;
    color: var(--sp-steel-600, #5c6b7a);
}

.crew-working-band__range-remove {
    border: none;
    background: transparent;
    color: var(--sp-steel-700, #4a5866);
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
    cursor: pointer;
}

.crew-working-band__range-remove:hover {
    color: var(--sp-danger, #c0392b);
}

.crew-working-band__summary {
    margin: 0;
    font-size: 0.75rem;
    color: var(--sp-steel-600, #5c6b7a);
}
