:root {
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
    color: #1a2a3a;
    background: #f4f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.dev-database-banner {
    background: #c62828;
    color: #fff;
    text-align: center;
    font-weight: 700;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: #0b3d6e;
    color: #fff;
}

.app-header .header-nav {
    gap: 0.5rem;
}

.app-header .header-nav .pelican-btn--header {
    margin: 0;
}

.brand,
.brand:visited,
.brand:hover,
.brand:active,
.brand:focus,
.brand:focus-visible {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.brand:hover {
    opacity: 0.92;
}

.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    line-height: 1;
    color: inherit;
}

.app-body {
    display: flex;
    flex: 1;
    align-items: stretch;
}

.app-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 0 1.25rem;
    overflow-y: auto;
}

.app-main {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    width: 100%;
    min-width: 0;
}

.nav-menu {
    padding: 0 0.5rem;
}

.nav-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-list li {
    margin-bottom: 0.1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.3;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-link:hover {
    background: #e8f0f8;
    color: #0b3d6e;
    text-decoration: none;
}

.nav-link.active {
    background: #dbeafe;
    color: #0b3d6e;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #0b3d6e;
}

.nav-link__icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.75;
}

.nav-link.active .nav-link__icon,
.nav-link:hover .nav-link__icon {
    opacity: 1;
}

.nav-link__label {
    min-width: 0;
}

.login-page {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.login-page h1 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    line-height: 1.25;
    text-align: center;
}

.login-layout {
    min-height: 100vh;
    background: linear-gradient(160deg, #eef2f7 0%, #f8fafc 45%, #e8eef5 100%);
}

.login-page__culture {
    display: flex;
    justify-content: center;
    margin: 0.35rem 0 1.1rem;
}

.culture-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.65rem;
    background: #f4f7fb;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
}

.culture-switcher__flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    border-radius: 4px;
    border: 2px solid transparent;
    line-height: 0;
    transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.8;
}

.culture-switcher__flag:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.culture-switcher__flag.is-active {
    border-color: var(--pelican-primary, #1a4f8b);
    opacity: 1;
}

.culture-switcher__icon {
    display: block;
    width: 30px;
    height: 20px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.culture-switcher__icon--fr {
    background: linear-gradient(to right, #002395 0 33.33%, #ffffff 33.33% 66.66%, #ed2939 66.66% 100%);
}

.culture-switcher__icon--gb {
    background: url("/images/flags/gb.svg") center / cover no-repeat;
}

.login-page__back {
    margin-top: 1.25rem;
    text-align: center;
}

.login-page__back a {
    color: var(--pelican-primary, #1a4f8b);
    text-decoration: none;
}

.login-page__back a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #c5d0dc;
    border-radius: 4px;
    font-size: 1rem;
}

.password-field {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.password-field .form-control {
    flex: 1;
}

.password-toggle-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    border: 1px solid #c5d0dc;
    border-radius: 4px;
    background: #fff;
    color: #0b3d6e;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle-btn:hover {
    background: #f4f7fb;
}

/* ── Unified Pelican buttons ── */
.pelican-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: auto;
    margin: 0;
    padding: 0.55rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.pelican-btn:hover {
    text-decoration: none;
}

.pelican-btn:disabled,
.pelican-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.pelican-btn--block {
    width: 100%;
}

.pelican-btn--sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.pelican-btn--sm .pelican-btn__icon {
    width: 1rem;
    height: 1rem;
}

.pelican-btn__icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.pelican-btn__label {
    min-width: 0;
}

.pelican-btn--primary {
    background: #0b3d6e;
    color: #fff;
    border-color: #0b3d6e;
}

.pelican-btn--primary:hover {
    background: #094d8a;
    border-color: #094d8a;
    color: #fff;
}

.pelican-btn--secondary {
    background: #64748b;
    color: #fff;
    border-color: #64748b;
}

.pelican-btn--secondary:hover {
    background: #556275;
    border-color: #556275;
    color: #fff;
}

.pelican-btn--success {
    background: #0d7a3e;
    color: #fff;
    border-color: #0d7a3e;
}

.pelican-btn--success:hover {
    background: #0a6634;
    border-color: #0a6634;
    color: #fff;
}

.pelican-btn--danger {
    background: #b42318;
    color: #fff;
    border-color: #b42318;
}

.pelican-btn--danger:hover {
    background: #912018;
    border-color: #912018;
    color: #fff;
}

.pelican-btn--back {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
    border-style: dashed;
}

.pelican-btn--back:hover {
    background: #f0f7ff;
    color: #0b3d6e;
    border-color: #0b3d6e;
}

.pelican-btn--back .pelican-btn__icon {
    color: #0b3d6e;
}

.pelican-btn--ghost {
    background: #f8fafc;
    color: #0b3d6e;
    border-color: #e2e8f0;
}

.pelican-btn--ghost:hover {
    background: #eef4fa;
    border-color: #cbd5e1;
    color: #094d8a;
}

.pelican-btn--header {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.pelican-btn--header:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.pelican-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.btn-primary,
.pelican-btn.btn-primary {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #0b3d6e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.header-profile__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.header-profile__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.header-profile__trigger:hover,
.header-profile__trigger--active {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
}

.header-profile__trigger-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.header-profile__trigger-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-profile__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: default;
}

.header-profile__menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 1201;
    width: min(20rem, calc(100vw - 2rem));
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    color: #1a2a3a;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

.header-profile__identity {
    padding: 1.1rem 1rem 1rem;
    text-align: center;
    background: #eef6ff;
}

.header-profile__avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.header-profile__avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.header-profile__avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #64748b;
}

.header-profile__avatar-icon {
    width: 2.4rem;
    height: 2.4rem;
}

.header-profile__login {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    word-break: break-word;
}

.header-profile__email {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    word-break: break-word;
}

.header-profile__actions {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}

.header-profile__action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}

.header-profile__action:hover {
    background: #f1f5f9;
    color: #0b3d6e;
}

.header-profile__action-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    color: #334155;
}

.panel {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.success-message {
    color: #0d7a3e;
    margin-bottom: 1rem;
}

.btn-secondary {
    padding: 0.6rem 1rem;
    background: #64748b;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.form-actions .btn-primary,
.form-actions .pelican-btn {
    width: auto;
    min-width: 120px;
}

.form-actions .btn-secondary {
    margin-left: 0;
}

.module-checkboxes {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 4px;
}

.nav-menu-section {
    margin-bottom: 0.35rem;
}

.nav-menu-section > summary {
    list-style: none;
}

.nav-menu-section > summary::-webkit-details-marker {
    display: none;
}

.nav-menu-section--settings,
.nav-menu-section--settings-system,
.nav-menu-section--settings-business {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.nav-menu-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.nav-menu-section-toggle:hover {
    background: #e8f0f8;
    color: #0b3d6e;
}

.nav-menu-section-toggle::after {
    content: "▸";
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

.nav-menu-section[open] > .nav-menu-section-toggle::after {
    transform: rotate(90deg);
}

.nav-menu-section.has-active > .nav-menu-section-toggle {
    color: #0b3d6e;
    background: rgba(11, 61, 110, 0.06);
}

.nav-menu-section-toggle--locked {
    cursor: default;
}

.nav-menu-section__icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    opacity: 0.85;
}

.nav-menu-section.has-active .nav-menu-section__icon {
    opacity: 1;
}

.nav-menu-section__title {
    min-width: 0;
}

.nav-menu-list--sub {
    margin: 0.15rem 0 0.5rem;
    padding: 0;
}

.nav-menu-list--sub .nav-link {
    font-size: 0.84rem;
}

.nav-menu-list--sub > li > .nav-link {
    padding-inline-start: calc(0.65rem + 1rem);
}

.nav-menu-subgroup {
    margin: 0.15rem 0;
}

.nav-menu-subgroup > summary {
    list-style: none;
}

.nav-menu-subgroup > summary::-webkit-details-marker {
    display: none;
}

.nav-menu-subgroup-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    padding-inline-start: calc(0.65rem + 1rem);
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.nav-menu-subgroup-toggle:hover {
    background: #e8f0f8;
    color: #0b3d6e;
}

.nav-menu-subgroup-toggle::after {
    content: "▸";
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.15s ease;
}

.nav-menu-subgroup[open] > .nav-menu-subgroup-toggle::after {
    transform: rotate(90deg);
}

.nav-menu-subgroup.has-active > .nav-menu-subgroup-toggle {
    color: #0b3d6e;
    background: rgba(11, 61, 110, 0.05);
}

.nav-menu-subgroup-toggle--locked {
    cursor: default;
}

.nav-menu-list--nested {
    margin: 0.1rem 0 0.25rem;
    padding: 0;
}

.nav-menu-list--nested .nav-link {
    padding-inline-start: calc(0.65rem + 1.5rem);
    font-size: 0.84rem;
}

.nav-link--external .nav-link__label::after {
    content: " ↗";
    font-size: 0.75em;
    opacity: 0.65;
}

.seaman-page-header {
    margin-bottom: 1.25rem;
}

.seaman-page-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0b175c;
}

.seaman-page-subtitle {
    margin: 0.25rem 0 0;
}

.seaman-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
    max-width: 1100px;
}

@media (max-width: 900px) {
    .seaman-form-grid {
        grid-template-columns: 1fr;
    }
}

.seaman-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.seaman-form-field--address {
    grid-row: span 2;
}

.seaman-form-field--country-residence {
    grid-column: 2 / span 2;
}

@media (max-width: 900px) {
    .seaman-form-field--address,
    .seaman-form-field--country-residence {
        grid-row: auto;
        grid-column: auto;
    }
}

.seaman-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: #0b175c;
}

.seaman-form-field .form-control {
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
}

.seaman-form-field textarea.form-control {
    min-height: 4.5rem;
    resize: vertical;
}

.seaman-wife-section {
    margin-top: 1rem;
    max-width: 1100px;
}

.seaman-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #0b175c;
}

.seaman-required-hint {
    margin: 1rem 0 0.5rem;
    font-size: 0.85rem;
}

.required-star {
    color: #c00;
}

.seaman-submit-btn {
    width: auto;
    min-width: 160px;
}

.seaman-cancel-link {
    display: inline-block;
    padding: 0.6rem 1rem;
    margin-left: 0.5rem;
    color: #fff;
    background: #6c757d;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
}

.seaman-cancel-link:hover {
    background: #5a6268;
    color: #fff;
    text-decoration: none;
}

.seaman-select-layout {
    display: grid;
    grid-template-columns: minmax(320px, 400px) 1fr;
    gap: 1.5rem;
    align-items: start;
    max-width: 1100px;
}

@media (max-width: 800px) {
    .seaman-select-layout {
        grid-template-columns: 1fr;
    }
}

.seaman-select-filters h2,
.seaman-select-results h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: #0b175c;
}

.seaman-filter-group-title {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    color: #0b175c;
}

.seaman-filter-group-title:first-of-type {
    margin-top: 0;
}

.seaman-filter-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.seaman-filter-input {
    max-width: 265px;
}

.seaman-filter-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.seaman-results-list {
    width: 100%;
    max-width: 320px;
    min-height: 360px;
    font-size: 0.9rem;
    border: 1px solid #c5d0dc;
    border-radius: 4px;
    padding: 0.25rem;
}

.seaman-results-list option.seaman-result--local {
    color: #013adf;
    background-color: #fafafa;
}

.seaman-results-count {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.seaman-select-go {
    margin-top: 0.75rem;
}

.seaman-go-btn {
    width: auto;
    min-width: 120px;
}

/* Seaman edit — profile header */
.seaman-edit-summary {
    margin-bottom: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 1px 3px rgba(11, 61, 110, 0.06);
    overflow: hidden;
    max-width: 1200px;
}

.seaman-edit-summary__body {
    display: grid;
    grid-template-columns: 112px 1fr minmax(168px, 200px);
    gap: 1.25rem 1.5rem;
    padding: 1.25rem 1.5rem 1rem;
    align-items: start;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 48%);
}

@media (max-width: 1024px) {
    .seaman-edit-summary__body {
        grid-template-columns: 100px 1fr;
    }

    .seaman-edit-summary__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.seaman-edit-summary__photo-wrap {
    position: relative;
    width: 112px;
    margin-bottom: 2.5rem;
}

.seaman-edit-summary__photo {
    display: block;
    width: 112px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.seaman-edit-summary__photo--placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: center;
}

.seaman-edit-summary__photo-icon {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.45;
}

.seaman-edit-summary__photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.seaman-edit-summary__photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.75rem;
    font-weight: 600;
    color: #0b3d6e;
}

.seaman-edit-summary__photo-error {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2.4rem;
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #b91c1c;
}

.seaman-edit-summary__photo-btn {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #0b3d6e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    line-height: 0;
}

.seaman-edit-summary__photo-btn:hover {
    background: #e8f0f8;
}

.seaman-edit-summary__main {
    min-width: 0;
}

.seaman-edit-summary__identity {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
}

.seaman-edit-summary__name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0b3d6e;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.seaman-edit-summary__id-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0b3d6e;
    background: #e8f0f8;
    border-radius: 999px;
}

.seaman-edit-summary__status-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 720px) {
    .seaman-edit-summary__status-row {
        grid-template-columns: 1fr;
    }
}

.seaman-edit-summary__status {
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
}

.seaman-edit-summary__status-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.seaman-edit-summary__status-value {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1e3a5f;
    line-height: 1.35;
}

.seaman-edit-summary__status-value.is-on {
    color: #047857;
}

.seaman-edit-summary__status-value.is-off {
    color: #b91c1c;
}

.seaman-edit-summary__status-value.is-muted {
    color: #64748b;
    font-style: italic;
}

.seaman-edit-summary__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 1rem;
}

@media (max-width: 900px) {
    .seaman-edit-summary__meta {
        grid-template-columns: 1fr 1fr;
    }
}

.seaman-edit-summary__meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.seaman-edit-summary__meta-item--compact {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.seaman-edit-summary__meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.seaman-edit-summary__meta-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a5f;
}

.seaman-edit-summary__select {
    width: 100%;
    font-size: 0.8125rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
}

.seaman-edit-summary__checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #0b3d6e;
}

.seaman-edit-summary__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seaman-edit-summary__action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.seaman-edit-summary__action-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0b3d6e;
}

.seaman-edit-summary__action-btn.is-active {
    background: #0b3d6e;
    border-color: #0b3d6e;
    color: #fff;
}

.seaman-edit-summary__action-btn.is-active .seaman-edit-summary__action-svg {
    color: #fff;
    opacity: 1;
}

.seaman-edit-summary__action-btn--admin .seaman-edit-summary__action-svg {
    color: #2563eb;
}

.seaman-edit-summary__action-btn--cert .seaman-edit-summary__action-svg {
    color: #059669;
}

.seaman-edit-summary__action-btn--exp .seaman-edit-summary__action-svg {
    color: #d97706;
}

.seaman-edit-summary__action-btn--back {
    margin-top: 0.25rem;
    border-style: dashed;
    color: #475569;
}

.seaman-edit-summary__action-btn--back:hover {
    border-color: #0b3d6e;
    color: #0b3d6e;
    background: #f0f7ff;
}

.seaman-edit-summary__action-btn--back .seaman-edit-summary__action-svg {
    color: #0b3d6e;
}

.seaman-edit-summary__action-svg {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    opacity: 1;
}

.seaman-edit-summary__action-btn span {
    flex: 1;
    min-width: 0;
}

.seaman-edit-summary__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 1rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.seaman-edit-summary__tab {
    margin: 0;
    padding: 0.7rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.seaman-edit-summary__tab:hover {
    color: #0b3d6e;
    background: #f8fafc;
}

.seaman-edit-summary__tab.is-active {
    color: #0b3d6e;
    border-bottom-color: #0b3d6e;
    background: transparent;
}

.seaman-edit-panel {
    margin-top: 0;
    max-width: 1200px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 4px rgba(11, 61, 110, 0.04);
}

.seaman-edit-panel.panel {
    padding: 1.25rem 1.5rem;
}

.seaman-edit-tab-placeholder {
    margin: 0;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.seaman-edit-tab-placeholder strong {
    color: #0b3d6e;
}

.seaman-edit-tab-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: #0b3d6e;
}

.seaman-edit-tab-divider {
    margin: 1.25rem 0;
    border: 0;
    border-top: 1px solid #d8dee8;
}

.seaman-children-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.seaman-child-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
}

.seaman-child-row__gender {
    font-size: 1.75rem;
    line-height: 1;
    color: #0b3d6e;
    padding-top: 0.35rem;
}

.seaman-child-row__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
}

.seaman-child-row__age {
    margin: 0;
    grid-column: 1 / -1;
}

.seaman-child-row__docs {
    flex-direction: column;
    align-items: flex-start;
}

.seaman-child-add {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    max-width: 720px;
}

@media (max-width: 768px) {
    .seaman-child-row {
        grid-template-columns: 1fr;
    }
}

.seaman-passport-section {
    margin-bottom: 1rem;
}

.seaman-passport-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.seaman-passport-section__title {
    margin: 0;
    font-size: 1rem;
    color: #0b3d6e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seaman-passport-subtitle {
    margin: 1rem 0 0.75rem;
    font-size: 0.95rem;
    color: #334155;
}

.seaman-passport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.seaman-passport-grid__full {
    grid-column: 1 / -1;
}

.seaman-passport-grid__docs {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
}

.seaman-passport-item {
    margin-bottom: 0.75rem;
    padding: 1rem;
    position: relative;
}

.seaman-passport-item__status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.seaman-passport-item__actions {
    margin-top: 0.75rem;
}

.seaman-passport-update-review {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #f59e0b;
    background: #fffbeb;
}

.seaman-passport-update-review__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.seaman-passport-update-review__layout {
    margin-top: 0.75rem;
}

.seaman-passport-update-review__value {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
}

.seaman-passport-update-review__reject {
    margin-top: 0.75rem;
}

.passport-update-page {
    max-width: 960px;
    margin: 0 auto;
}

.passport-update-review-note {
    margin-top: 0.75rem;
}

.seaman-passport-add {
    margin-top: 0.75rem;
    padding: 1rem;
}

.seaman-doc-expiry {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.seaman-doc-expiry.is-valid {
    background: #16a34a;
}

.seaman-doc-expiry.is-warning {
    background: #eab308;
}

.seaman-doc-expiry.is-invalid {
    background: #dc2626;
}

.page-access-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .page-access-layout {
        grid-template-columns: 1fr;
    }
}

.page-access-group-title {
    font-size: 0.85rem;
    color: #64748b;
    margin: 1rem 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.page-access-page-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.page-access-page-list__item--tab .page-access-page-btn {
    padding-left: 1.25rem;
    border-left: 3px solid #cbd5e1;
}

.page-access-page-list__item--tab .page-access-page-title {
    font-size: 0.92rem;
}

.seaman-edit-readonly-banner {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.9rem;
}

.seaman-edit-tab-scope {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.seaman-edit-tab-scope--readonly .form-control,
.seaman-edit-tab-scope--readonly textarea,
.seaman-edit-tab-scope--readonly select,
.seaman-edit-tab-scope--readonly input:not([type="hidden"]),
.seaman-edit-tab-scope--readonly .pelican-btn,
.seaman-edit-tab-scope--readonly .checkbox-row {
    pointer-events: none;
}

.seaman-edit-tab-scope--readonly .form-control,
.seaman-edit-tab-scope--readonly textarea,
.seaman-edit-tab-scope--readonly select {
    background-color: #f8fafc;
    color: #475569;
}

.seaman-edit-tab-scope--readonly .my-seaman-doc-preview,
.seaman-edit-tab-scope--readonly .my-seaman-doc-preview *,
.seaman-edit-tab-scope--readonly .seaman-edit-doc-layout__preview,
.seaman-edit-tab-scope--readonly .seaman-edit-doc-layout__preview * {
    pointer-events: auto;
}

.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-field .pelican-field__control,
.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-field .form-control,
.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-field textarea,
.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-field select,
.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-field input:not([type="hidden"]),
.seaman-edit-tab-scope--readonly.seaman-edit-tab-scope--granular .pelican-btn {
    pointer-events: auto;
}

.pelican-field--readonly .pelican-field__control,
.pelican-field--readonly .form-control,
.pelican-field--readonly textarea,
.pelican-field--readonly select,
.pelican-field--readonly input:not([type="hidden"]) {
    background-color: #f8fafc;
    color: #475569;
}

.pelican-field--masked .pelican-field__control,
.pelican-field--masked .form-control,
.pelican-field--masked input:not([type="hidden"]) {
    background-color: #f8fafc;
    color: #475569;
    letter-spacing: 0.08em;
}

.seaman-edit-summary__photo-btn--hidden {
    display: none;
}

.page-access-page-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.page-access-page-btn:hover {
    border-color: #0b3d6e;
}

.page-access-page-btn.active {
    border-color: #0b3d6e;
    background: #eef4fa;
}

.page-access-page-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.page-access-page-route {
    font-size: 0.75rem;
    color: #64748b;
}

.page-access-badge {
    font-size: 0.7rem;
    align-self: flex-start;
    background: #0b3d6e;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.page-access-badge--module {
    background: #94a3b8;
}

.grant-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.grant-grid--users {
    max-height: 280px;
}

.grant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.grant-row__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grant-level-select {
    min-width: 10rem;
    max-width: 12rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.page-access-editor h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
}

.menu-admin-hint {
    margin-bottom: 1rem;
}

.menu-admin-section {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.menu-admin-section--disabled {
    opacity: 0.65;
}

.menu-admin-children {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0 0 0 1rem;
}

.menu-admin-children--nested {
    margin: 0 0 0.5rem 1.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e2e8f0;
}

.menu-admin-row--grandchild {
    margin-left: 0;
}

.settings-menu-smart-upload {
    margin-top: 1rem;
}

.menu-admin-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
}

.menu-admin-row--section {
    padding-top: 0;
}

.menu-admin-row--child {
    border-top: 1px dashed #e2e8f0;
}

.menu-admin-row--disabled {
    opacity: 0.65;
}

.menu-admin-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.menu-admin-row__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.menu-admin-key,
.menu-admin-route {
    font-size: 0.75rem;
    color: #64748b;
}

.menu-admin-access {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.menu-admin-grant-link {
    font-size: 0.8rem;
}

.menu-admin-enabled {
    white-space: nowrap;
}

.menu-admin-move-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    line-height: 1;
}

.menu-admin-move-btn:hover:not(:disabled) {
    border-color: #0b3d6e;
    color: #0b3d6e;
}

.menu-admin-move-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.admin-users-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.admin-users-filter__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-users-filter__label {
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-users-filter__select,
.admin-users-filter__text {
    min-width: 220px;
    max-width: 360px;
}

.admin-users-filter__count {
    font-size: 0.85rem;
    padding-bottom: 0.35rem;
}

.admin-users-hint {
    margin: 0.5rem 0 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.pelican-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
}

.pelican-loading__spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid #dbeafe;
    border-top-color: #0b3d6e;
    border-radius: 50%;
    animation: pelican-spin 0.8s linear infinite;
}

.pelican-loading__message {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

@keyframes pelican-spin {
    to {
        transform: rotate(360deg);
    }
}

.admin-user-delete__confirm {
    margin: 0.75rem 0 1rem;
    font-weight: 600;
}

.grantee-menu-access__section {
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.35rem 0.75rem 0.5rem;
}

.grantee-menu-access__section-title {
    cursor: pointer;
    font-weight: 600;
    color: #0b3d6e;
    padding: 0.35rem 0;
}

.grantee-menu-access__pages {
    list-style: none;
    margin: 0;
    padding: 0 0 0.25rem 0.5rem;
}

.grantee-menu-access__page {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.15rem 0.75rem;
    padding: 0.35rem 0;
    border-top: 1px dashed #e2e8f0;
}

.grantee-menu-access__page:first-child {
    border-top: none;
}

.grantee-menu-access__page--allowed {
    background: #f8fafc;
}

.grantee-menu-access__page-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1;
}

.grantee-menu-access__page-title {
    font-size: 0.92rem;
}

.grantee-menu-access__badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1;
}

.grantee-menu-access__route {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: #64748b;
}

.grantee-menu-access__admin-note {
    margin-bottom: 0.75rem;
}

.role-access-matrix__section {
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.role-access-matrix__section-header,
.role-access-matrix__section-title {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.role-access-matrix__section-title {
    font-weight: 600;
}

.role-access-matrix__section-header::-webkit-details-marker {
    display: none;
}

.role-access-matrix__section-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    width: 100%;
}

.role-access-matrix__section-title-text {
    font-weight: 600;
    color: #0b3d6e;
}

.role-access-matrix__section-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}

.role-access-matrix__section-body {
    border-top: 1px solid #e2e8f0;
}

.role-access-matrix__bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.role-access-matrix__bulk-btn {
    font-size: 0.78rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.role-access-matrix__bulk-btn:hover:not(:disabled) {
    border-color: #0b3d6e;
    color: #0b3d6e;
}

.role-access-matrix__bulk-btn--primary:hover:not(:disabled) {
    background: #ecfdf5;
    border-color: #059669;
    color: #047857;
}

.role-access-matrix__bulk-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.role-access-matrix__table {
    width: 100%;
    border-collapse: collapse;
}

.role-access-matrix__table th,
.role-access-matrix__table td {
    padding: 0.45rem 0.85rem;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
}

.role-access-matrix__table th {
    font-size: 0.8rem;
    color: #64748b;
    text-align: left;
}

.role-access-matrix__row--none {
    background: #fff;
}

.role-access-matrix__row--read {
    background: #f8fafc;
}

.role-access-matrix__row--write {
    background: #f0fdf4;
}

.role-access-matrix__row--tab .role-access-matrix__page-name {
    padding-left: 1.5rem;
    font-size: 0.92rem;
    border-left: 3px solid #cbd5e1;
}

.role-access-matrix__page-name {
    min-width: 12rem;
}

.ui-element-matrix__tab {
    margin: 0.5rem 0.85rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fafbfc;
}

.ui-element-matrix__tab-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    list-style: none;
}

.ui-element-matrix__tab-header::-webkit-details-marker {
    display: none;
}

.ui-element-matrix__tab-body {
    padding: 0.35rem 0.75rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.ui-element-matrix__group-title {
    margin: 0.65rem 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ui-element-matrix__table {
    margin-bottom: 0.5rem;
}

.access-level-toggle {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.access-level-toggle__btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
    border: none;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    min-width: 4.5rem;
}

.access-level-toggle__btn:last-child {
    border-right: none;
}

.access-level-toggle__btn:hover:not(:disabled):not(.access-level-toggle__btn--active) {
    background: #f8fafc;
    color: #334155;
}

.access-level-toggle__btn--active.access-level-toggle__btn--none {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.access-level-toggle__btn--active.access-level-toggle__btn--read {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.access-level-toggle__btn--active.access-level-toggle__btn--write {
    background: #bbf7d0;
    color: #047857;
    font-weight: 600;
}

.access-level-toggle__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.page-access-badge--override {
    background: #fef3c7;
    color: #92400e;
}

.effective-access-view__admin-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #047857;
    font-size: 0.92rem;
}

.effective-access-view__admin-icon {
    flex-shrink: 0;
    font-weight: 700;
}

.effective-access-view__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.75rem 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.effective-access-view__summary-stat {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0b3d6e;
}

.effective-access-view__summary-stat--override {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-weight: 500;
}

.effective-access-view__summary-note {
    font-size: 0.82rem;
    color: #64748b;
}

.effective-access-view__section {
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.effective-access-view__section-header {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.effective-access-view__section-header::-webkit-details-marker {
    display: none;
}

.effective-access-view__section-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    width: 100%;
}

.effective-access-view__section-title-text {
    font-weight: 600;
    color: #0b3d6e;
}

.effective-access-view__section-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}

.effective-access-view__section-body {
    border-top: 1px solid #e2e8f0;
}

.effective-access-view__table {
    width: 100%;
    border-collapse: collapse;
}

.effective-access-view__table th,
.effective-access-view__table td {
    padding: 0.45rem 0.85rem;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: left;
}

.effective-access-view__table th {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.effective-access-view__row--read {
    background: #f8fafc;
}

.effective-access-view__row--write {
    background: #f0fdf4;
}

.effective-access-view__page-name {
    min-width: 12rem;
}

.effective-access-view__level {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}

.effective-access-view__level--read {
    background: #e0f2fe;
    color: #0369a1;
}

.effective-access-view__level--write {
    background: #bbf7d0;
    color: #047857;
}

.effective-access-view__source {
    font-size: 0.82rem;
    color: #64748b;
}

.effective-access-view__source--override {
    display: inline-block;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}

.user-access-overrides {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.user-access-overrides__summary {
    font-weight: 600;
    cursor: pointer;
}

.admin-settings-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-settings-hub__card h2 {
    margin-top: 0;
}

.admin-reconnect-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.role-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.role-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
}

.role-badge--admin {
    background: #c62828;
}

.role-badge--bo {
    background: #1565c0;
}

.role-badge--osm {
    background: #1b5e20;
}

.role-badge--client {
    background: #6a1b9a;
}

.role-badge--seaman {
    background: #00838f;
}

.role-badge--agent {
    background: #ef6c00;
}

.role-badge--alc {
    background: #5d4037;
}

.role-badge--default {
    background: #546e7a;
}

.role-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-picker__selected,
.role-picker__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.role-picker__selected {
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.role-picker__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.role-picker__pill:focus-visible {
    outline: 2px solid #0b3d6e;
    outline-offset: 2px;
}

.role-picker__pill:hover {
    transform: translateY(-1px);
}

.role-picker__pill--selected {
    color: #fff;
}

.role-picker__pill--selected:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.role-picker__pill--available {
    background: #fff;
    color: var(--role-accent, #546e7a);
    border-color: color-mix(in srgb, var(--role-accent, #546e7a) 35%, #e2e8f0);
}

.role-picker__pill--available:hover {
    background: color-mix(in srgb, var(--role-accent, #546e7a) 8%, #fff);
    border-color: var(--role-accent, #546e7a);
}

.role-picker__remove {
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.85;
}

.role-picker__pill.role-badge--admin {
    --role-accent: #c62828;
}

.role-picker__pill.role-badge--bo {
    --role-accent: #1565c0;
}

.role-picker__pill.role-badge--osm {
    --role-accent: #1b5e20;
}

.role-picker__pill.role-badge--client {
    --role-accent: #6a1b9a;
}

.role-picker__pill.role-badge--seaman {
    --role-accent: #00838f;
}

.role-picker__pill.role-badge--agent {
    --role-accent: #ef6c00;
}

.role-picker__pill.role-badge--alc {
    --role-accent: #5d4037;
}

.role-picker__pill.role-badge--default {
    --role-accent: #546e7a;
}

.role-picker__pill--selected.role-badge--admin {
    background: #c62828;
}

.role-picker__pill--selected.role-badge--bo {
    background: #1565c0;
}

.role-picker__pill--selected.role-badge--osm {
    background: #1b5e20;
}

.role-picker__pill--selected.role-badge--client {
    background: #6a1b9a;
}

.role-picker__pill--selected.role-badge--seaman {
    background: #00838f;
}

.role-picker__pill--selected.role-badge--agent {
    background: #ef6c00;
}

.role-picker__pill--selected.role-badge--alc {
    background: #5d4037;
}

.role-picker__pill--selected.role-badge--default {
    background: #546e7a;
}

.role-form-group .text-muted {
    display: block;
    margin-top: 0.45rem;
}

.role-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.role-users-row > td {
    padding: 0;
    background: #f8fafc;
    border-top: none;
}

.role-users-panel {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #e2e8f0;
}

.role-users-panel__title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #334155;
}

.role-users-panel__table {
    box-shadow: none;
}

.text-muted {
    color: #5a6b7d;
}

.validation-message {
    color: #b00020;
    margin-bottom: 1rem;
}

.module-list {
    padding-left: 1.25rem;
}

.db-status-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.db-status-table th,
.db-status-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e8eef4;
    text-align: left;
}

.db-status-table th {
    background: #e8eef4;
}

.db-status-table .ok {
    color: #0d7a3e;
    font-weight: 600;
}

.db-status-table .error {
    color: #b00020;
    font-weight: 600;
}

.db-status-table td.db-status-table__bool,
.db-status-table th.db-status-table__bool {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.db-status-table__bool-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin-inline: auto;
}

#blazor-error-ui {
    background: #b00020;
    color: #fff;
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.6rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 0.75rem;
}

.customer-edit-page-header {
    flex-shrink: 0;
}

.customer-edit-page-header .customer-edit-page-title {
    margin-bottom: 0.5rem;
}

.customer-edit-page-header .validation-message,
.customer-edit-page-header .success-message {
    margin: 0 0 0.5rem;
}

.app-shell:has(.customer-edit-page--table) {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.app-body:has(.customer-edit-page--table) {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.app-main:has(.customer-edit-page) {
    max-width: none;
    width: 100%;
}

.app-main:has(.document-scan-page) {
    max-width: none;
    width: 100%;
}

.app-main:has(.customer-edit-page--table) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0.75rem;
}

.customer-edit-page {
    width: 100%;
    min-width: 0;
}

.customer-edit-page--table {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.customer-edit-page--table .customer-edit-layout {
    flex: 1;
    min-height: 0;
    align-items: stretch;
    margin-top: 0;
}

.customer-edit-page--table .customer-edit-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.customer-edit-page--table .customer-edit-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    margin-top: 0;
}

.customer-edit-page--table .customer-edit-sidebar {
    max-height: none;
    overflow-y: auto;
}

.customer-edit-page--table .customer-edit-content > .customer-wage-scale-panel,
.customer-edit-page--table .customer-edit-content > .customer-ranks-panel {
    flex: 1;
    min-height: 0;
}

.customer-edit-page .customer-edit-layout {
    max-width: none;
}

.customer-edit-page .customer-edit-panel {
    max-width: none;
}

.customer-edit-page-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 1rem;
}

.customer-edit-page-title__logo {
    flex-shrink: 0;
    width: auto;
    max-width: 140px;
    max-height: 52px;
    object-fit: contain;
}

.customer-edit-page-title__text {
    min-width: 0;
}

.customer-edit-page-title__id {
    font-size: 0.85em;
    font-weight: 600;
    color: #64748b;
}

.customer-edit-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.customer-edit-back-btn:hover {
    color: #0b3d6e;
    border-color: #0b3d6e;
    background: #f0f7ff;
    text-decoration: none;
}

.customer-edit-back-btn__icon {
    width: 1.1rem;
    height: 1.1rem;
    color: #0b3d6e;
    flex-shrink: 0;
}

.customer-edit-panel {
    margin-top: 1rem;
    max-width: 1100px;
}

.customer-form-section-title {
    margin: 1.25rem 0 0.75rem;
    font-size: 1rem;
    color: #0b175c;
}

.customer-edit-panel .customer-form-section-title:first-of-type {
    margin-top: 0;
}

.customer-edit-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 1rem;
    max-width: 1200px;
}

@media (max-width: 900px) {
    .customer-edit-layout {
        grid-template-columns: 1fr;
    }
}

.customer-edit-sidebar {
    margin-bottom: 0;
    padding: 1rem;
}

.customer-edit-sidebar__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #0b175c;
}

.customer-edit-sidebar__subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.customer-edit-sidebar__hidden-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #475569;
}

.customer-edit-sidebar__hidden-toggle label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.customer-edit-sidebar__filter {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.customer-edit-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: min(28rem, calc(100vh - 320px));
    overflow-y: auto;
    padding-right: 0.15rem;
}

.customer-edit-sidebar__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-edit-sidebar__item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.customer-edit-sidebar__item.is-active {
    color: #fff;
    background: #0b3d6e;
    border-color: #0b3d6e;
}

.customer-edit-sidebar__item.is-active .customer-edit-sidebar__item-meta,
.customer-edit-sidebar__item.is-active .customer-edit-sidebar__badge {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.15);
}

.customer-edit-sidebar__item.is-hidden-item {
    opacity: 0.7;
    font-style: italic;
}

.customer-edit-sidebar__item-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.customer-edit-sidebar__item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.customer-edit-sidebar__item-meta {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-edit-sidebar__badge {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0b3d6e;
    background: #e8f0f8;
    border-radius: 999px;
    text-align: center;
}

.customer-edit-content {
    margin-top: 0;
    min-width: 0;
    max-width: none;
}

.customer-ship-manager-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b175c;
}

.customer-ship-manager-title__id {
    margin-left: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.customer-vessels-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.customer-vessel-layout {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.customer-vessel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.customer-vessel-list__item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    text-align: left;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.customer-vessel-list__item:hover {
    background: #e8f0f8;
}

.customer-vessel-list__item.is-active {
    background: #dbeafe;
    color: #0b3d6e;
}

.customer-vessel-list__item.is-desarme {
    opacity: 0.65;
    font-style: italic;
}

.customer-vessel-detail {
    min-width: 0;
}

.customer-vessel-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.customer-vessel-detail-tabs__tab {
    margin: 0;
    padding: 0.55rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
}

.customer-vessel-detail-tabs__tab:hover {
    color: #0b3d6e;
    background: #f8fafc;
}

.customer-vessel-detail-tabs__tab.is-active {
    color: #0b3d6e;
    border-bottom-color: #0b3d6e;
}

.vessel-crew-list-panel {
    margin-top: 0.25rem;
}

.vessel-crew-list-subtitle,
.vessel-crew-list-matrix-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0b3d6e;
}

.vessel-crew-list-form__actions {
    display: flex;
    align-items: flex-end;
}

.vessel-crew-list-table__edit-cell {
    background: #f8fbff;
}

.vessel-crew-list-matrix-table {
    margin-top: 0.5rem;
}

.vessel-crew-list-matrix-actions {
    margin: 0.75rem 0 1rem;
}

.seaman-form-field--full {
    grid-column: 1 / -1;
}

.customer-vessel-panel {
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fbff;
}

.customer-vessel-panel__title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b3d6e;
}

.vessel-imo-check {
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
}

.vessel-imo-check__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vessel-imo-check__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0b3d6e;
}

.vessel-imo-check__ok {
    color: #166534;
}

.vessel-imo-check__warn {
    color: #b45309;
}

.vessel-imo-check__table-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.vessel-imo-check__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.vessel-imo-check__table th,
.vessel-imo-check__table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.vessel-imo-check__table th {
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
}

.vessel-imo-check__row--match {
    background: #f0fdf4;
}

.vessel-imo-check__row--mismatch {
    background: #fff7ed;
}

.vessel-imo-check__row--missing-local {
    background: #eff6ff;
}

.vessel-imo-check__apply {
    border: 1px solid #0b3d6e;
    background: #fff;
    color: #0b3d6e;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.vessel-imo-check__apply:hover {
    background: #eff6ff;
}

.vessel-imo-check__duplicate-list {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
}

.vessel-imo-check__supplementary {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.vessel-imo-check__supplementary-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.vessel-imo-check__info-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 30%) 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.vessel-imo-check__info-grid dt {
    margin: 0;
    color: #4b5563;
    font-weight: 500;
}

.vessel-imo-check__info-grid dd {
    margin: 0;
    word-break: break-word;
}

.vessel-position-map {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.vessel-position-map__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.vessel-position-map__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.vessel-position-map__link {
    font-size: 0.875rem;
}

.vessel-position-map__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.35rem 1rem;
    margin: 0 0 0.75rem;
}

.vessel-position-map__meta div {
    min-width: 0;
}

.vessel-position-map__meta dt {
    margin: 0;
    color: #4b5563;
    font-size: 0.8rem;
    font-weight: 500;
}

.vessel-position-map__meta dd {
    margin: 0;
    font-size: 0.9rem;
}

.vessel-position-map__canvas {
    position: relative;
    width: 100%;
    height: 280px;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}

.vessel-position-map__canvas .leaflet-container {
    width: 100%;
    height: 100%;
}

.seaman-form-field--fleet-exit {
    grid-column: 1 / -1;
}

.customer-vessel-fleet-exit-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.customer-vessel-fleet-exit-inline .checkbox-row {
    margin-bottom: 0;
}

.customer-vessel-fleet-exit-inline__date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-vessel-fleet-exit-inline__date .seaman-label {
    margin: 0;
    white-space: nowrap;
}

.customer-vessel-fleet-exit-inline__date .form-control {
    width: auto;
    min-width: 10rem;
}

.customer-vessel-conditions {
    margin-top: 1.25rem;
    padding: 0.75rem;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    background: #f0fdf4;
}

.customer-vessel-conditions__title {
    font-weight: 700;
    color: #0b3d6e;
    cursor: pointer;
}

.customer-vessel-conditions__subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.customer-vessel-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.customer-vessel-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
}

.customer-vessel-type-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.customer-vessel-type-group {
    margin: 0;
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.customer-vessel-type-group legend {
    padding: 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0b3d6e;
}

@media (max-width: 900px) {
    .customer-vessel-layout,
    .customer-data-layout {
        grid-template-columns: 1fr;
    }

    .customer-data-layout .customer-vessel-list {
        max-height: 12rem;
        height: auto;
    }

    .app-shell:has(.customer-edit-page--table) {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .app-body:has(.customer-edit-page--table),
    .app-main:has(.customer-edit-page--table),
    .customer-edit-page--table,
    .customer-edit-page--table .customer-edit-content,
    .customer-wage-scale-panel,
    .customer-ranks-panel {
        overflow: visible;
        min-height: auto;
    }

    .customer-wage-scale-table-wrap {
        max-height: 65vh;
    }
}

.customer-wage-scale-create {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.customer-wage-scale-create .form-control {
    min-width: min(100%, 280px);
    max-width: 360px;
}

.customer-wage-scale-header {
    margin-bottom: 1rem;
}

.customer-wage-scale-excel__input {
    display: none;
}

.customer-wage-scale-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.customer-wage-scale-actions .pelican-btn.is-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.customer-wage-scale-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin: 0.75rem 0 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.customer-wage-scale-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.customer-wage-scale-panel > .customer-form-section-title,
.customer-wage-scale-panel > .customer-wage-scale-create,
.customer-wage-scale-panel > .validation-message,
.customer-wage-scale-panel > .success-message,
.customer-wage-scale-panel > .text-muted {
    flex-shrink: 0;
}

.customer-wage-scale-panel > .customer-data-layout {
    flex: 1;
    min-height: 0;
}

.customer-data-layout {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.customer-data-layout--fill {
    align-items: stretch;
    min-height: 0;
}

.customer-data-layout .customer-vessel-list {
    max-height: none;
    height: 100%;
    overflow-y: auto;
}

.customer-data-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.customer-wage-scale-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.customer-wage-scale-form .customer-wage-scale-header,
.customer-wage-scale-form .form-actions {
    flex-shrink: 0;
}

.customer-wage-scale-form .customer-wage-scale-table-wrap {
    flex: 1;
    min-height: 0;
}

.customer-ranks-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.customer-ranks-panel > .customer-form-section-title,
.customer-ranks-panel > .validation-message,
.customer-ranks-panel > .success-message,
.customer-ranks-panel > form,
.customer-ranks-panel > .customer-rank-hint,
.customer-ranks-panel > .text-muted,
.customer-ranks-panel > .customer-rank-toolbar {
    flex-shrink: 0;
}

.customer-ranks-panel > .customer-wage-scale-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 0.75rem;
}

.customer-wage-scale-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.customer-wage-scale-table th,
.customer-wage-scale-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

.customer-wage-scale-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    color: #0b3d6e;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 1px 0 #e2e8f0;
}

.customer-wage-scale-table td:first-child,
.customer-wage-scale-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
}

.customer-wage-scale-table th:first-child {
    z-index: 3;
    background: #f1f5f9;
}

.customer-wage-scale-table__input {
    min-width: 5.5rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.8125rem;
}

.customer-vessel-list__item.is-hidden-item {
    opacity: 0.7;
    font-style: italic;
}

.customer-rank-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #0b175c;
}

.customer-rank-form {
    margin-bottom: 0.5rem;
}

.customer-rank-form__actions {
    display: flex;
    align-items: flex-end;
}

.customer-rank-hint {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.customer-rank-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
}

.customer-rank-table__actions {
    white-space: nowrap;
}

.client-seamen-panel {
    overflow: hidden;
}

.app-main:has(.client-seamen-page--table),
.app-main:has(.client-seamen-page--details),
.app-main:has(.client-home-page) {
    max-width: none;
    width: 100%;
}

.client-home-page {
    width: 100%;
}

.client-home {
    max-width: 1040px;
}

.client-home__welcome {
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
}

.client-home__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.client-home__contacts {
    flex: 1 1 320px;
    min-width: 0;
}

.client-home__title {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.client-home__hint {
    margin: 0 0 1.5rem;
    color: #64748b;
    font-style: italic;
}

.client-home__contact-block {
    margin-bottom: 1.25rem;
}

.client-home__contact-block strong {
    display: block;
    margin-bottom: 0.25rem;
}

.client-home__contact-block a {
    color: #0b3d6e;
}

.client-home__contact-block--dedicated {
    margin-top: 2rem;
}

.client-home__charge {
    margin-top: 0.5rem;
    line-height: 1.5;
}

.client-home__emergency {
    margin-top: 2rem;
    color: #dc2626;
    font-size: 1.05rem;
}

.client-home__map {
    flex: 0 0 auto;
    margin-left: auto;
}

.client-home__map-image {
    display: block;
    max-width: min(100%, 480px);
    height: auto;
    margin-top: 3rem;
}

.app-main:has(.seaman-portal-page) {
    max-width: none;
}

.seaman-portal-page {
    width: 100%;
    min-width: 0;
}

.seaman-portal-cautions {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.seaman-portal-cautions__warning {
    color: var(--pelican-danger, #c00);
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.seaman-portal-cautions__memo {
    margin: 0;
    font-weight: 600;
}

.seaman-portal-identity__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.seaman-portal-identity__details {
    flex: 1 1 320px;
    min-width: 0;
}

.seaman-portal-identity__name {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.seaman-portal-identity__photo-wrap {
    flex: 0 0 auto;
}

.seaman-portal-identity__photo {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--pelican-border, #ccc);
    border-radius: 4px;
}

.seaman-portal-identity__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pelican-surface-muted, #f4f4f4);
    color: var(--pelican-text-muted, #666);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

.seaman-portal-section {
    margin-top: 1rem;
}

.seaman-portal-section__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.seaman-portal-section__subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
}

.seaman-portal-inline-gap {
    margin-left: 1.25rem;
}

.seaman-portal-medical-block {
    margin-bottom: 1rem;
}

.seaman-portal-medical-block:last-child {
    margin-bottom: 0;
}

.client-seamen-page {
    width: 100%;
    min-width: 0;
}

.client-seamen-page--table .client-seamen-panel,
.client-seamen-page--details .client-seamen-panel {
    max-width: none;
}

.client-seamen-page--table .client-seamen-table-wrap {
    overflow-x: auto;
}

.client-seamen-page--table .client-seamen-table {
    width: max-content;
    min-width: 100%;
}

.client-seamen-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.client-seamen-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
}

.client-seamen-filters-actions {
    display: flex;
    align-items: flex-end;
}

.client-seamen-last-update {
    margin: 0;
}

.client-seamen-table-wrap {
    overflow-x: auto;
}

.client-seamen-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.client-seamen-table th,
.client-seamen-table td {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #dbe4ee;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.client-seamen-table__group-row th {
    border-bottom: none;
    padding-bottom: 0;
}

.client-seamen-table__last-boarding {
    background: #ede4fb;
}

.client-seamen-sort {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.client-seamen-sort:hover {
    color: #0b3d6e;
}

.client-seamen-row {
    cursor: pointer;
}

.client-seamen-row--alt {
    background: #f4f8ef;
}

.client-seamen-row:hover {
    background: #e8f0fa;
}

.client-seamen-empty {
    text-align: center;
    color: #64748b;
    padding: 1.5rem !important;
}

.client-seamen-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.client-seamen-status--onboard {
    background: #22c55e;
}

.client-seamen-status--offboard {
    background: #ef4444;
}

.client-seamen-status--new {
    width: 10px;
    height: 10px;
    background: #3b82f6;
}

.client-seamen-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.client-seamen-pagination__actions {
    display: flex;
    gap: 0.5rem;
}

/* Client seaman details */
.my-seaman-details__header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.my-seaman-details__photo-wrap {
    flex-shrink: 0;
}

.my-seaman-details__photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.my-seaman-details__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

.my-seaman-details__name {
    margin: 0 0 0.5rem;
}

.my-seaman-details__position--signed-on {
    color: #16a34a;
}

.my-seaman-details__position--signed-off {
    color: #dc2626;
}

.my-seaman-details__position--planned {
    color: #ea580c;
}

.my-seaman-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 1rem;
}

.my-seaman-tabs__tab {
    border: none;
    background: transparent;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    font: inherit;
    color: #475569;
    border-bottom: 2px solid transparent;
}

.my-seaman-tabs__tab.is-active {
    color: #0b3d6e;
    border-bottom-color: #0b3d6e;
    font-weight: 600;
}

.my-seaman-tab-panel {
    padding-top: 0.5rem;
}

.my-seaman-passport-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.seaman-edit-doc-layout {
    margin-bottom: 1rem;
}

.seaman-edit-doc-layout__empty {
    flex: 0 0 auto;
    width: 220px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    background: #f8fafc;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

.seaman-edit-doc-layout__preview {
    position: relative;
    flex: 0 0 auto;
}

.seaman-edit-doc-layout__file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.seaman-edit-doc-layout__replace-fab {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.95);
    color: #0b3d6e;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.seaman-edit-doc-layout__replace-fab:hover {
    background: #fff;
    border-color: #0b3d6e;
}

.seaman-edit-doc-layout__replace-fab svg {
    width: 18px;
    height: 18px;
}

.seaman-edit-doc-layout__uploading {
    position: absolute;
    left: 8px;
    bottom: 44px;
    z-index: 2;
    font-size: 0.75rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.92);
    padding: 2px 6px;
    border-radius: 4px;
}

.seaman-edit-doc-layout__error {
    margin: 0.5rem 0 0;
    max-width: 320px;
    font-size: 0.8125rem;
}

.seaman-passport-item .seaman-edit-doc-layout,
.my-seaman-seaman-book-entry .seaman-edit-doc-layout {
    width: 100%;
}

.my-seaman-passport-layout__details {
    flex: 1 1 240px;
    min-width: 0;
}

.my-seaman-passport-layout .my-seaman-doc-preview {
    margin-top: 0;
    flex: 0 0 auto;
}

.my-seaman-seaman-book-entry + .my-seaman-seaman-book-entry {
    margin-top: 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.my-seaman-doc-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.my-seaman-doc-preview__link {
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
    line-height: 0;
}

.my-seaman-doc-preview__link:hover {
    border-color: #0b3d6e;
}

.my-seaman-doc-preview__pdf-wrap {
    position: relative;
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
    line-height: 0;
}

.my-seaman-doc-preview__pdf-wrap:hover {
    border-color: #0b3d6e;
}

.my-seaman-doc-preview__open-fab {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d1d5db;
    color: #0b3d6e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    line-height: 0;
}

.my-seaman-doc-preview__open-fab:hover {
    background: #fff;
    border-color: #0b3d6e;
}

.my-seaman-doc-preview__open-fab svg {
    width: 1.1rem;
    height: 1.1rem;
}

.my-seaman-doc-preview__image {
    display: block;
    max-width: min(100%, 320px);
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.my-seaman-doc-preview__pdf {
    display: block;
    width: min(100%, 320px);
    height: 220px;
    border: none;
    background: #f8fafc;
}

.my-seaman-doc-preview__pdf-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 320px);
    height: 220px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
}

.my-seaman-doc-preview__pdf-placeholder:hover {
    color: #0b3d6e;
    background: #f1f5f9;
}

.my-seaman-doc-preview__pdf-icon {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.my-seaman-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.my-seaman-details-table th,
.my-seaman-details-table td {
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

.my-seaman-details-table th {
    background: #f8fafc;
    font-weight: 600;
}

.my-seaman-doc-status.valid {
    color: #16a34a;
}

.my-seaman-doc-status.invalid {
    color: #dc2626;
    font-weight: 600;
}

.my-seaman-endorsment--valid {
    color: #16a34a;
}

.my-seaman-endorsment--warning {
    color: #ea580c;
}

.my-seaman-endorsment--expired {
    color: #dc2626;
}

.my-seaman-company-exp-row {
    cursor: default;
}

/* Planning */
.planning-shell h1 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    color: #0b3d6e;
}

.planning-page {
    width: 100%;
}

.planning-board {
    overflow: auto;
    max-width: 100%;
}

.planning-empty {
    color: #64748b;
}

.planning-empty--prompt {
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.planning-calendar-period {
    margin: 0;
    color: #0b3d6e;
    font-weight: 600;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

h1.planning_company {
    margin: 0;
    font-size: 16px !important;
    color: rgba(11, 23, 92, 1);
    font-weight: bold;
    text-align: left;
}

h2.planning_vessel {
    margin: 0;
    font-size: 12px !important;
    color: rgba(11, 23, 92, 1);
    font-weight: bold;
    text-align: left;
}

.tb_planning th,
.planning-table th {
    font-size: 11px;
    padding: 2px 5px;
    background-color: #006699;
    border: 1px solid #d5dee8;
    color: #fff;
    white-space: nowrap;
    text-shadow: 1px 1px 0 rgba(140, 140, 140, 0.6), -1px -1px 1px rgba(0, 0, 0, 0.2);
}

.tb_planning td,
.planning-table td {
    border: 1px solid #d5dee8;
    padding: 2px 5px !important;
    font-size: 11px;
    color: rgba(11, 23, 92, 1);
    vertical-align: top;
}

.planning-company-row th,
.planning-section-row th {
    background: #e8f4fc;
    border-color: #c5d9ea;
}

.planning-header-row--sub th {
    font-size: 10px;
}

.planning-separator {
    width: 8px;
    min-width: 8px;
    padding: 0 !important;
    background: #f4f7fb !important;
    border-top: none !important;
    border-bottom: none !important;
}

.planning-link-cell {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.planning-link-cell:hover {
    color: #006699;
}

.planning-contract-ending {
    color: #dc2626 !important;
    font-weight: 600;
}

.planning-shell--previsional {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.planning-previsional-subtitle {
    margin: 0 0 0.5rem;
    color: #64748b;
}

.planning-previsional-company,
.planning-previsional-vessel {
    margin-bottom: 1.5rem;
}

.planning-previsional-section-title {
    margin: 0.75rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.planning-previsional-section-title--provisional {
    color: #006699;
}

.planning-previsional-on-leave {
    margin-top: 1rem;
}

.planning-previsional-on-leave-row td {
    background: #fff7ed;
}

.planning-previsional-contract-row td {
    background: #eff6ff;
}

.planning-table--provisional th {
    background: #006699;
}

/* Planning calendar — pleine largeur */
.app-main:has(.planning-shell--calendar) {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0.75rem 1rem 0.5rem;
}

.app-body:has(.planning-shell--calendar) {
    min-height: 0;
}

/* Planning calendar */
.planning-shell--calendar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    width: 100%;
    min-width: 0;
    height: calc(100vh - 88px);
    min-height: 480px;
}

/* Planning vessel positions map */
.app-main:has(.planning-shell--vessel-positions) {
    max-width: none;
    width: 100%;
}

.planning-shell--vessel-positions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}

.planning-vessel-positions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.planning-vessel-positions-toolbar h1 {
    margin: 0;
}

.planning-vessel-positions-subtitle {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.planning-vessel-positions-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1rem;
}

.planning-vessel-positions-api-sources {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
}

.planning-vessel-positions-api-sources__title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0b3d6e;
}

.planning-vessel-positions-api-sources__list {
    margin: 0;
    padding-left: 1.25rem;
    color: #334155;
    font-size: 0.9rem;
}

.planning-vessel-positions-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 7rem;
}

.planning-vessel-positions-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b3d6e;
    line-height: 1.1;
}

.planning-vessel-positions-stat__label {
    font-size: 0.8rem;
    color: #64748b;
}

.planning-vessel-positions-stat--ok .planning-vessel-positions-stat__value {
    color: #15803d;
}

.planning-vessel-positions-stat--warn .planning-vessel-positions-stat__value {
    color: #b45309;
}

.planning-vessel-positions-stat--muted .planning-vessel-positions-stat__value {
    color: #64748b;
}

.vessel-fleet-map {
    scroll-margin-top: 1rem;
    position: relative;
}

.vessel-fleet-map__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1rem;
    align-items: stretch;
}

.vessel-fleet-map__map-column {
    min-width: 0;
}

.vessel-fleet-map__canvas {
    width: 100%;
    min-height: 68vh;
    height: 68vh;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #e8f4fc;
    overflow: hidden;
}

.vessel-fleet-map__aside {
    display: flex;
    flex-direction: column;
    min-height: 68vh;
    max-height: 68vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
}

.vessel-fleet-map-detail {
    display: flex;
    flex-direction: column;
    min-height: min-content;
}

.vessel-fleet-map-detail--empty {
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
}

.vessel-fleet-map-detail__empty-hint {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
}

.vessel-fleet-map-detail__header {
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.vessel-fleet-map-detail__title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.vessel-fleet-map-detail__flag {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
}

.vessel-fleet-map-detail__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #0b3d6e;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vessel-fleet-map-detail__imo,
.vessel-fleet-map-detail__meta-line {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

.vessel-fleet-map-detail__external-links {
    margin-top: 0.65rem;
}

.vessel-fleet-map-detail__external-links .vessel-external-photo-links {
    margin-top: 0;
    justify-content: flex-start;
}

.vessel-fleet-map-detail__route {
    margin-bottom: 0.75rem;
}

.vessel-fleet-map-detail__route-meta {
    flex-wrap: wrap;
}

.vessel-fleet-map-detail__section {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.vessel-fleet-map-detail__section--crew {
    display: flex;
    flex-direction: column;
    border-bottom: none;
}

.vessel-fleet-map-detail__section-title {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vessel-fleet-map-detail__facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 0.75rem;
    margin: 0;
}

.vessel-fleet-map-detail__facts div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: baseline;
}

.vessel-fleet-map-detail__facts dt {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
}

.vessel-fleet-map-detail__facts dd {
    margin: 0;
    font-size: 0.85rem;
    color: #0f172a;
    word-break: break-word;
}

.vessel-fleet-map-detail__track-meta,
.vessel-fleet-map-detail__empty-list {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.vessel-fleet-map-detail__crew-scroll {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background: #fff;
}

.vessel-fleet-map-detail__crew-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.vessel-fleet-map-detail__crew-table th,
.vessel-fleet-map-detail__crew-table td {
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.vessel-fleet-map-detail__crew-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.vessel-fleet-map-detail__crew-table tbody tr:last-child td {
    border-bottom: none;
}

.vessel-fleet-map-detail__footer {
    margin-top: auto;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 1100px) {
    .vessel-fleet-map__layout {
        grid-template-columns: 1fr;
    }

    .vessel-fleet-map__aside {
        min-height: auto;
        max-height: none;
        overflow-y: visible;
    }

    .vessel-fleet-map-detail__section--crew {
        min-height: auto;
    }
}

.vessel-fleet-map__hint {
    margin: 0 0 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.vessel-fleet-map__selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
}

.vessel-fleet-map__selection-imo {
    margin-left: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.vessel-fleet-map__selection-meta {
    color: #0b3d6e;
    font-size: 0.9rem;
}

.vessel-fleet-map__track-hint {
    flex-basis: 100%;
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

.leaflet-popup.vessel-mt-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.leaflet-popup.vessel-mt-popup .leaflet-popup-content {
    margin: 0;
    width: 320px !important;
    max-width: 320px;
}

.leaflet-popup.vessel-mt-popup .leaflet-popup-tip {
    background: #fff;
}

.vessel-mt-card {
    font-family: inherit;
    color: #0f172a;
    background: #fff;
}

.vessel-mt-card--compact .vessel-mt-card__header {
    padding-bottom: 0.35rem;
}

.vessel-mt-card__header {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.85rem 0.9rem 0.55rem;
}

.vessel-mt-card__type-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #fff7ed;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.vessel-mt-card__title-block {
    min-width: 0;
    flex: 1;
}

.vessel-mt-card__name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.vessel-mt-card__flag {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
}

.vessel-mt-card__name {
    font-size: 0.98rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vessel-mt-card__type,
.vessel-mt-card__imo,
.vessel-mt-card__embarked {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.vessel-mt-card__photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
    overflow: hidden;
}

.vessel-mt-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vessel-mt-card__photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    background: linear-gradient(180deg, #dbeafe 0%, #e2e8f0 100%);
}

.vessel-mt-card__photo-upload {
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    background: #0b3d6e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.vessel-mt-card__photo-upload:hover {
    background: #0f4c8a;
}

.vessel-fleet-map__photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.vessel-mt-card__route {
    padding: 0.75rem 0.9rem 0.35rem;
    border-top: 1px solid #e2e8f0;
}

.vessel-mt-card__route-codes {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0b3d6e;
}

.vessel-mt-card__route-codes > span:first-child {
    text-align: left;
}

.vessel-mt-card__route-codes > span:last-child {
    text-align: right;
}

.vessel-mt-card__route-line {
    display: flex;
    align-items: center;
    gap: 0;
    width: 5.5rem;
}

.vessel-mt-card__route-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
}

.vessel-mt-card__route-dot--end {
    background: #cbd5e1;
}

.vessel-mt-card__route-track {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #2563eb 0%, #2563eb 55%, #cbd5e1 55%, #cbd5e1 100%);
}

.vessel-mt-card__route-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.35;
}

.vessel-mt-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.55rem 0.9rem 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.vessel-mt-card__stat {
    min-width: 0;
}

.vessel-mt-card__stat-label {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.25;
}

.vessel-mt-card__stat-value {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    line-height: 1.25;
    color: #0f172a;
}

.vessel-mt-card__footer,
.vessel-mt-card__hint {
    padding: 0.55rem 0.9rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.74rem;
}

.vessel-mt-card__hint {
    background: #fff;
}

.vessel-photo-upload {
    margin-bottom: 1rem;
}

.vessel-external-photo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.45rem;
}

.seaman-form-field .vessel-external-photo-links {
    justify-content: flex-start;
}

.vessel-photo-upload__header .vessel-external-photo-links {
    justify-content: flex-end;
    margin-top: 0;
}

.vessel-external-photo-links__link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0b3d6e;
    text-decoration: none;
}

.vessel-external-photo-links__link:hover {
    text-decoration: underline;
}

.vessel-imo-check__external-links {
    margin-top: 0.35rem;
}

.vessel-imo-check__external-links .vessel-external-photo-links {
    justify-content: flex-start;
}

.vessel-photo-upload__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.vessel-photo-upload__external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: flex-end;
}

.vessel-photo-upload__external-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0b3d6e;
    text-decoration: none;
}

.vessel-photo-upload__external-link:hover {
    text-decoration: underline;
}

.vessel-photo-upload__external-link--pending {
    color: #64748b;
    cursor: default;
    text-decoration: none;
}

.vessel-photo-upload__label {
    display: block;
    margin-bottom: 0;
    font-weight: 600;
    color: #0b3d6e;
}

.vessel-photo-upload__wrap {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 16 / 9;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.vessel-photo-upload__preview,
.vessel-photo-upload__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vessel-photo-upload__placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #94a3b8;
}

.vessel-photo-upload__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    color: #0b3d6e;
}

.vessel-photo-upload__input {
    display: none;
}

.vessel-photo-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.vessel-photo-upload__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0b3d6e;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.vessel-photo-upload__btn:hover {
    background: #f8fafc;
}

.vessel-photo-upload__hint {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.vessel-photo-upload__hint--muted {
    color: #94a3b8;
}

.planning-vessel-positions-table tr.planning-vessel-positions-row--selectable {
    cursor: pointer;
}

.planning-vessel-positions-table tr.planning-vessel-positions-row--selected {
    background: #e0f2fe;
}

.planning-vessel-positions-table tr.planning-vessel-positions-row--selectable:hover {
    background: #f0f9ff;
}

.planning-vessel-positions-table {
    overflow: auto;
}

.embarked-crew-hover__trigger {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 0.15em;
    color: #0b3d6e;
    font-weight: 600;
}

.embarked-crew-hover__popup {
    position: fixed;
    z-index: 1200;
    max-width: min(36rem, calc(100vw - 2rem));
    max-height: min(20rem, calc(100vh - 2rem));
    overflow: auto;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

.embarked-crew-hover__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.embarked-crew-hover__table th,
.embarked-crew-hover__table td {
    padding: 0.3rem 0.55rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.embarked-crew-hover__table th {
    color: #475569;
    font-weight: 600;
    background: #f8fafc;
}

.embarked-crew-hover__table tbody tr:last-child td {
    border-bottom: none;
}

.planning-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.planning-calendar-toolbar h1 {
    margin: 0;
}

.planning-calendar-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.planning-calendar-filters {
    padding: 0.75rem 1rem;
}

.planning-calendar-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.planning-calendar-filters-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.planning-calendar-filter-locked {
    margin: 0;
    font-weight: 600;
    color: #0b3d6e;
}

.planning-calendar-period-hint {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.planning-calendar {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.planning-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.planning-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.planning-calendar-legend-item::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid #cbd5e1;
}

.planning-calendar-legend-item--contract::before {
    background: #bbf7d0;
    border-color: #86efac;
}

.planning-calendar-legend-item--expired::before {
    background: #fecaca;
    border-color: #f87171;
}

.planning-calendar-legend-item--previsional::before {
    background: #bfdbfe;
    border-color: #3b82f6;
}

.planning-calendar-scroll {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: auto;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #fff;
}

.planning-calendar-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: max-content;
    --planning-indent-client: 0.5rem;
    --planning-indent-vessel: 1.75rem;
    --planning-indent-category: 3rem;
    --planning-indent-function: 4.25rem;
}

.planning-calendar-table th,
.planning-calendar-table td {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
}

.planning-calendar-sticky-col {
    position: sticky;
    z-index: 3;
    background: #fff;
    text-align: left;
    vertical-align: middle;
}

.planning-calendar-sticky-col--function {
    left: 0;
    min-width: 160px;
    max-width: 200px;
}

.planning-calendar-sticky-col--seaman {
    left: 160px;
    min-width: 170px;
    max-width: 220px;
}

.planning-calendar-rank-header,
.planning-calendar-seaman-header,
.planning-calendar-day-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #006699;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 4px 2px;
}

.planning-calendar-rank-header {
    z-index: 5;
    left: 0;
}

.planning-calendar-seaman-header {
    z-index: 5;
    left: 160px;
    text-align: left;
    padding-left: 8px;
}

.planning-calendar-table th.planning-calendar-rank-cell {
    font-weight: 700;
    font-size: 11px;
    color: rgba(11, 23, 92, 1);
    padding: 6px 8px 6px var(--planning-indent-function);
    background: #fafbfc;
    border-right: 2px solid #cbd5e1;
    vertical-align: top;
}

.planning-calendar-day-header {
    min-width: 34px;
    width: 34px;
}

.planning-calendar-day-number {
    display: block;
    line-height: 1.1;
}

.planning-calendar-day-weekday {
    display: block;
    font-size: 9px;
    font-weight: 400;
    opacity: 0.9;
}

.planning-calendar-group td {
    font-weight: 700;
    font-size: 11px;
    color: rgba(11, 23, 92, 1);
    padding: 6px 8px;
    background: #f8fafc;
    position: sticky;
    left: 0;
    border-bottom: 1px solid #e2e8f0;
}

.planning-calendar-group--client td {
    background: #dbeafe;
    font-size: 13px;
    font-weight: 700;
    padding-left: var(--planning-indent-client);
}

.planning-calendar-group--vessel td {
    background: #e8f4fc;
    font-size: 12px;
    font-weight: 700;
    padding-left: var(--planning-indent-vessel);
}

.planning-calendar-group--category td {
    background: #f1f5f9;
    padding-left: var(--planning-indent-category);
    font-size: 11px;
    font-weight: 600;
    color: #334155;
}

.planning-calendar-seaman-cell {
    padding: 4px 8px 4px 1.25rem;
    cursor: pointer;
    border-right: 2px solid #cbd5e1;
}

.planning-calendar-seaman-cell--band-0 { border-left: 4px solid #3b82f6; background: #eff6ff; }
.planning-calendar-seaman-cell--band-1 { border-left: 4px solid #d97706; background: #fffbeb; }
.planning-calendar-seaman-cell--band-2 { border-left: 4px solid #16a34a; background: #f0fdf4; }
.planning-calendar-seaman-cell--band-3 { border-left: 4px solid #db2777; background: #fdf2f8; }
.planning-calendar-seaman-cell--band-4 { border-left: 4px solid #4f46e5; background: #eef2ff; }
.planning-calendar-seaman-cell--band-5 { border-left: 4px solid #ea580c; background: #fff7ed; }

.planning-calendar-seaman-cell:hover {
    filter: brightness(0.97);
}

.planning-calendar-seaman-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(11, 23, 92, 1);
}

.planning-calendar-day {
    width: 34px;
    min-width: 34px;
    height: 28px;
}

.planning-calendar-day--empty {
    background: #fff;
}

.planning-calendar-day--band-0 { background: #dbeafe; }
.planning-calendar-day--band-1 { background: #fef3c7; }
.planning-calendar-day--band-2 { background: #dcfce7; }
.planning-calendar-day--band-3 { background: #fce7f3; }
.planning-calendar-day--band-4 { background: #e0e7ff; }
.planning-calendar-day--band-5 { background: #ffedd5; }

.planning-calendar-day--expired {
    box-shadow: inset 0 -3px 0 #dc2626;
}

.planning-calendar-day--previsional {
    background: #3b82f6 !important;
    box-shadow: inset 0 0 0 2px #1d4ed8;
}

.planning-calendar-day--weekend.planning-calendar-day--empty {
    background: #f8fafc;
}

.document-scan-page {
    width: 100%;
    max-width: none;
}

.document-scan-page__header {
    margin-bottom: 1.25rem;
}

.document-scan-page__title {
    margin: 0.75rem 0 0.25rem;
    font-size: 1.5rem;
    color: #0b3d6e;
}

.document-scan-page__subtitle {
    margin: 0;
}

.document-scan-page__body {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

.document-scan-main {
    flex: 0 1 1200px;
    width: 100%;
    max-width: 1200px;
    min-width: 0;
}

.document-scan-main .document-scan-upload {
    margin-bottom: 1rem;
}

.document-scan-main .document-scan-review {
    margin-bottom: 0;
    width: 100%;
}

.document-scan-sidebar {
    flex: 0 0 300px;
    max-width: 100%;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
}

.document-scan-sidebar .usage-manual {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .document-scan-page__body {
        flex-direction: column;
    }

    .document-scan-main {
        flex: 1 1 auto;
        width: 100%;
    }

    .document-scan-sidebar {
        position: static;
        flex: 1 1 auto;
        width: 100%;
        order: -1;
    }
}

@media (max-width: 900px) {
    .document-scan-review-layout {
        flex-wrap: wrap;
    }

    .document-scan-review-layout__preview {
        flex: 1 1 100%;
        max-width: 100%;
        position: static;
    }

    .document-scan-review-fields__row--pair {
        grid-template-columns: 1fr;
    }
}

.document-scan-review-layout {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.document-scan-review-layout__preview {
    flex: 0 0 440px;
    max-width: 440px;
    position: sticky;
    top: 1rem;
}

.document-scan-review-layout__preview .my-seaman-doc-preview__pdf-wrap,
.document-scan-review-layout__preview .my-seaman-doc-preview__link {
    width: 100%;
    max-width: 440px;
}

.document-scan-review-layout__preview .my-seaman-doc-preview {
    margin-top: 0;
}

.document-scan-preview__image,
.document-scan-preview__pdf {
    max-width: 440px;
    max-height: 600px;
}

.document-scan-preview__pdf {
    width: 100%;
    height: 440px;
}

.document-scan-review-layout__preview .my-seaman-doc-preview__image {
    width: 100%;
    max-width: 440px;
}

.document-scan-preview__filename {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
    word-break: break-all;
    max-width: 440px;
}

.document-scan-review-layout__content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.document-scan-review-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: none;
}

.document-scan-review-fields__row {
    width: 100%;
    min-width: 0;
}

.document-scan-review-fields__row--full {
    display: block;
}

.document-scan-review-fields__row--pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.document-scan-review-fields__row--doc-meta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.document-scan-review-fields .seaman-form-field {
    width: 100%;
    min-width: 0;
}

.document-scan-review-fields .form-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.document-scan-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.document-scan-upload {
    position: relative;
}

.document-scan-upload .pelican-btn.is-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.document-scan-upload__status {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    word-break: break-all;
}

.document-scan-meta {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #475569;
}

.document-scan-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.document-scan-search-row .form-control {
    flex: 1;
    min-width: 0;
}

.document-scan-manual-results {
    margin: 0.75rem 0 1rem;
}

.document-scan-candidate-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.document-scan-candidate-list__item {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.8125rem;
}

.document-scan-candidate-list__item:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.document-scan-text-preview {
    margin: 1rem 0;
}

.document-scan-text-preview__body {
    max-height: 220px;
    overflow: auto;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: pre-wrap;
}

.document-scan-ocr-status--ok {
    border-left: 4px solid #16a34a;
}

.document-scan-ocr-status--warn {
    border-left: 4px solid #d97706;
}

.document-scan-ocr-status--off {
    border-left: 4px solid #94a3b8;
}

.document-scan-provider-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.document-scan-provider-list__item {
    font-size: 0.8125rem;
    color: #475569;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: #f8fafc;
}

.document-scan-provider-list__item--ok {
    border-left: 3px solid #16a34a;
}

.document-scan-provider-list__item--warn {
    border-left: 3px solid #d97706;
}

.document-scan-provider-list__item--off {
    border-left: 3px solid #94a3b8;
}

.usage-manual {
    margin-bottom: 1.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.usage-manual__summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #0b3d6e;
    list-style: none;
}

.usage-manual__summary::-webkit-details-marker {
    display: none;
}

.usage-manual__summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s ease;
}

.usage-manual[open] .usage-manual__summary::before {
    transform: rotate(90deg);
}

.usage-manual__body {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.usage-manual__intro {
    margin: 0 0 0.75rem;
}

.usage-manual__steps {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.usage-manual__steps li + li {
    margin-top: 0.35rem;
}

.usage-manual__note {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.seaman-edit-tab-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1rem;
}

.boarding-preparation-list {
    margin-bottom: 1.5rem;
}

.boarding-preparation-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.boarding-preparation-page-header__content {
    flex: 1 1 16rem;
    min-width: 0;
}

.boarding-preparation-page-header__seaman {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    color: #475569;
}

.boarding-preparation-form__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b175c;
}

.boarding-preparation-form__intro {
    margin: 0 0 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.boarding-preparation-form-grid {
    margin-bottom: 1.35rem;
}

.boarding-preparation-dates-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 0.75rem 1.25rem;
    align-items: start;
    max-width: 1100px;
    margin-bottom: 0.35rem;
}

.boarding-preparation-dates-row__group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.boarding-preparation-dates-row__label {
    display: block;
    margin: 0;
    font-weight: inherit;
    line-height: 1.3;
}

.boarding-preparation-dates-row__control {
    min-width: 0;
}

.boarding-preparation-duration-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
    gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
}

.boarding-preparation-duration-grid .form-control,
.boarding-preparation-dates-row__control .form-control {
    width: 100%;
    min-width: 0;
}

.boarding-preparation-duration-hint {
    margin: 0 0 1rem;
    max-width: 1100px;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .boarding-preparation-dates-row {
        grid-template-columns: 1fr;
    }

    .boarding-preparation-duration-grid {
        grid-template-columns: 1fr;
    }
}

.boarding-preparation-form-grid__full {
    grid-column: 1 / -1;
}

.boarding-preparation-list__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.boarding-preparation-flight {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.boarding-preparation-flight__title {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.boarding-preparation-flight-preview__hint {
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.boarding-preparation-flight-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-muted, #f9fafb);
    border-radius: 0.375rem;
}

.boarding-preparation-flight-preview__body-editor {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 14rem;
}

.boarding-preparation-flight__agencies-hint {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.boarding-preparation-flight__agencies {
    margin-bottom: 0.5rem;
}

.boarding-preparation-flight-preview__recipients {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.boarding-preparation-flight-preview__recipients li {
    margin-bottom: 0.25rem;
}

.boarding-preparation-flight-preview__recipient {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.375rem;
    background: #fafafa;
}

.boarding-preparation-flight-preview__recipient-name {
    flex: 1 1 12rem;
    min-width: 0;
}

.boarding-preparation-flight-preview__passport-hint {
    margin: 0 0 0.75rem;
}

.boarding-preparation-flight-preview__passport-option {
    margin: 0;
    flex: 0 0 auto;
    font-size: 0.9rem;
    white-space: nowrap;
}

.boarding-preparation-flight__actions {
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.boarding-preparation-flight-sent-summary {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.boarding-preparation-flight-sent-summary__text {
    margin: 0;
    color: #047857;
    font-weight: 600;
}

.boarding-preparation-flight-additional-send {
    margin-top: 1rem;
}

.boarding-preparation-flight-follow-up {
    margin-top: 1.5rem;
}

.flight-follow-up-actions {
    margin-bottom: 1rem;
}

.flight-follow-up-threads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flight-follow-up-threads--with-draft {
    margin-top: 1rem;
}

.flight-client-proposal-draft__header h4 {
    margin: 0 0 0.25rem;
}

.flight-follow-up-thread__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.flight-follow-up-thread__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flight-follow-up-thread__token {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted, #6c757d);
    margin-top: 0.25rem;
}

.flight-follow-up-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.flight-follow-up-status--sent {
    background: #eef2ff;
    color: #3730a3;
}

.flight-follow-up-status--replied {
    background: #ecfdf5;
    color: #047857;
}

.flight-follow-up-status--approved {
    background: #eff6ff;
    color: #1d4ed8;
}

.flight-follow-up-status--closed {
    background: #f3f4f6;
    color: #4b5563;
}

.flight-follow-up-thread__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0 0 1rem;
}

.flight-follow-up-thread__meta dt {
    font-size: 0.8rem;
    color: var(--text-muted, #6c757d);
}

.flight-follow-up-thread__meta-subject {
    grid-column: 1 / -1;
}

.flight-follow-up-replies h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.flight-mail-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.flight-mail-timeline__empty {
    margin: 0.75rem 0 0;
    font-size: 0.92rem;
}

.flight-mail-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 88%;
}

.flight-mail-message--outbound {
    align-self: flex-start;
}

.flight-mail-message--inbound {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.flight-mail-message__avatar {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}

.flight-mail-message--outbound .flight-mail-message__avatar {
    background: #5b6ee1;
}

.flight-mail-message--inbound .flight-mail-message__avatar {
    background: #6b8e23;
}

.flight-mail-message__bubble {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.flight-mail-message--inbound .flight-mail-message__bubble {
    background: #f4f8ff;
    border-color: rgba(59, 130, 246, 0.25);
}

.flight-mail-message__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    background: #f3f4f6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: #374151;
}

.flight-mail-message__meta-label {
    color: #6b7280;
}

.flight-mail-message__meta-sep {
    color: #9ca3af;
}

.flight-mail-delivery-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.flight-mail-delivery-status--delivered {
    background: #dcfce7;
    color: #15803d;
}

.flight-mail-delivery-status--pending {
    background: #fee2e2;
    color: #b91c1c;
}

.flight-mail-delivery-status--failed {
    background: #fecaca;
    color: #991b1b;
}

.flight-mail-message__routing {
    margin: 0;
    padding: 0.55rem 0.75rem 0;
    font-size: 0.85rem;
    color: #4b5563;
}

.flight-mail-message__subject {
    margin: 0;
    padding: 0.35rem 0.75rem 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.flight-mail-message--inbound .flight-mail-message__subject {
    padding: 0.55rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.flight-mail-message__body {
    padding: 0.65rem 0.75rem 0.85rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #1f2937;
    overflow-x: auto;
    word-break: break-word;
}

.flight-mail-message__body pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
}

.flight-mail-message__body p {
    margin: 0 0 0.65rem;
}

.flight-mail-message__body p:last-child {
    margin-bottom: 0;
}

.flight-mail-message__body img {
    max-width: 100%;
    height: auto;
}

.flight-mail-message__body table {
    max-width: 100%;
}

.flight-client-proposal-draft__preview {
    margin-top: 0.35rem;
}

.flight-client-proposal-draft__preview-frame {
    display: block;
    width: 100%;
    min-height: 28rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
}

.flight-client-proposal-draft__attachments {
    margin: 0;
    padding: 0;
    border-top: none;
}

.flight-client-proposal-draft__attachments-hint {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.flight-mail-message__attachments {
    list-style: none;
    margin: 0;
    padding: 0.65rem 0.75rem 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flight-mail-message__attachment-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.flight-mail-message__attachment-preview {
    margin-top: 0;
}

.flight-mail-message__attachment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.flight-mail-message__attachment-link {
    font-weight: 600;
    text-decoration: none;
}

.flight-mail-message__attachment-link:hover {
    text-decoration: underline;
}

.flight-mail-message__attachment-size {
    margin-left: 0.35rem;
    font-size: 0.85rem;
}

.flight-follow-up-reply {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.flight-follow-up-reply__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.flight-follow-up-reply__body {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.92rem;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.35rem;
    max-height: 240px;
    overflow: auto;
}

.airport-search-select {
    position: relative;
}

.airport-search-select__input-wrap {
    position: relative;
}

.airport-search-select__input {
    padding-right: 2rem;
}

.airport-search-select__clear {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--pelican-muted, #6c757d);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.25rem;
    cursor: pointer;
}

.airport-search-select__clear:hover {
    color: var(--pelican-text, #212529);
}

.airport-search-select__results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: var(--pelican-surface, #fff);
    border: 1px solid var(--pelican-border, #ced4da);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.airport-search-select__hint {
    padding: 0.5rem 0.75rem;
    color: var(--pelican-muted, #6c757d);
    font-size: 0.875rem;
}

.airport-search-select__option {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
}

.airport-search-select__option:hover,
.airport-search-select__option--active {
    background: var(--pelican-surface-hover, #f1f3f5);
}

.airport-search-select__code {
    font-weight: 600;
    min-width: 2.5rem;
}

.airport-search-select__city {
    color: var(--pelican-muted, #6c757d);
    font-size: 0.875rem;
}

.travel-agency-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.travel-agency-template-hint {
    margin: 0 0 0.5rem;
}

.travel-agency-template-tokens {
    margin: 0 0 1rem;
    font-size: 0.875rem;
}

.travel-agency-template-body {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    min-height: 10rem;
}

.travel-agency-assignment {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.travel-agency-assignment__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.travel-agency-assignment__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.company-experience-list {
    margin-top: 1.5rem;
}

.company-experience-list + .company-experience-list {
    margin-top: 1rem;
}

.company-experience-list__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.company-experience-list__title--provisional {
    color: #047857;
}

.company-experience-list__title--current {
    color: #1d4ed8;
}

.company-experience-list__title--past {
    color: #6d28d9;
}

.company-experience-list__empty {
    margin: 0;
}

.company-experience-table {
    width: 100%;
}

.company-experience-table th,
.company-experience-table td {
    vertical-align: middle;
}

.company-experience-table__actions {
    white-space: nowrap;
    text-align: right;
}

.company-experience-table__row--current {
    background: #eff6ff;
}

.company-experience-table__current {
    font-weight: 600;
    color: #1d4ed8;
}

/* Planning boarding preparation follow-up — pleine largeur */
.app-main:has(.planning-shell--boarding-follow-up) {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem;
}

.planning-shell--boarding-follow-up {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.planning-shell--boarding-follow-up .customer-wage-scale-table-wrap {
    overflow-x: auto;
}

.boarding-preparation-follow-up-table {
    width: 100%;
    table-layout: auto;
}

.boarding-preparation-follow-up-table th,
.boarding-preparation-follow-up-table td {
    vertical-align: middle;
}

.boarding-preparation-follow-up-table .boarding-preparation-follow-up-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.boarding-preparation-follow-up-badges,
.boarding-preparation-follow-up-detail__badges,
.boarding-preparation-follow-up-detail__lights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.boarding-track-light-col {
    width: 7.5rem;
    min-width: 7rem;
    text-align: center;
    vertical-align: middle;
}

.boarding-track-light {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    min-width: 6.5rem;
}

.boarding-track-light__dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    box-shadow:
        inset 0 -2px 4px rgba(0, 0, 0, 0.18),
        0 0 0 2px rgba(255, 255, 255, 0.85);
}

.boarding-track-light__dot--green {
    background: radial-gradient(circle at 35% 35%, #86efac, #16a34a 65%, #15803d);
}

.boarding-track-light__dot--red {
    background: radial-gradient(circle at 35% 35%, #fca5a5, #dc2626 65%, #b91c1c);
}

.boarding-track-light__label {
    font-size: 0.72rem;
    line-height: 1.25;
    color: #64748b;
    max-width: 7rem;
}

.boarding-track-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.boarding-track-badge__category {
    opacity: 0.85;
    font-weight: 700;
}

.boarding-track-badge--flight-not-required,
.boarding-track-badge--visa-not-tracked,
.boarding-track-badge--documents-not-tracked {
    background: #f1f5f9;
    color: #64748b;
}

.boarding-track-badge--flight-in-progress,
.boarding-track-badge--flight-awaiting-quote,
.boarding-track-badge--flight-pending,
.boarding-track-badge--flight-sent,
.boarding-track-badge--visa-pending,
.boarding-track-badge--documents-pending {
    background: #fef3c7;
    color: #92400e;
}

.boarding-track-badge--flight-quote-received,
.boarding-track-badge--flight-awaiting-client-validation,
.boarding-track-badge--flight-quote-validated,
.boarding-track-badge--visa-valid,
.boarding-track-badge--documents-complete {
    background: #ecfdf5;
    color: #047857;
}

.flight-follow-up-thread__client-validation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.flight-follow-up-thread__agency-shortcut-hint {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
}

.boarding-track-badge--flight-awaiting-ticket {
    background: #eef2ff;
    color: #3730a3;
}

.boarding-track-badge--flight-completed,
.boarding-track-badge--flight-ticket-sent {
    background: #ede9fe;
    color: #6d28d9;
}

.boarding-track-badge--visa-missing,
.boarding-track-badge--documents-incomplete {
    background: #fef2f2;
    color: #b91c1c;
}

.boarding-track-badge--visa-expiring {
    background: #ffedd5;
    color: #c2410c;
}

.boarding-preparation-follow-up-detail__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0 0 1rem;
}

.boarding-preparation-follow-up-detail__meta dt {
    font-size: 0.8rem;
    color: var(--text-muted, #6c757d);
}

.boarding-preparation-follow-up-detail__flight h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.boarding-preparation-follow-up-detail .boarding-flight-follow-up-panel,
.boarding-preparation-follow-up-detail .flight-mail-timeline {
    min-width: 0;
}

.boarding-preparation-follow-up-detail .flight-mail-message__bubble {
    max-width: none;
}

.boarding-flight-follow-up-tabs {
    margin-top: 0.25rem;
}

.boarding-flight-follow-up-subtabs {
    margin-top: 0.75rem;
}

.my-seaman-tabs__tab-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.flight-agency-tab-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}

.flight-agency-tab-status svg {
    width: 100%;
    height: 100%;
}

.flight-agency-tab-status--waiting {
    color: #b45309;
}

.flight-agency-tab-status--replied {
    color: #047857;
}

.flight-agency-tab-status--approved {
    color: #1d4ed8;
}

.flight-agency-tab-status--closed {
    color: #6b7280;
}

.boarding-flight-follow-up-placeholder {
    padding: 1rem;
}

.boarding-flight-follow-up-placeholder h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.boarding-flight-follow-up-future {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.flight-request-global-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.flight-request-global-summary__status,
.flight-request-global-summary__agency {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.flight-request-global-summary__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.flight-request-global-summary__value {
    font-weight: 600;
    color: #0f172a;
}

.flight-client-thread-source {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.boarding-track-agency-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.2;
}

.boarding-preparation-follow-up-detail__agency {
    margin: 0 0 1rem;
}

.company-experience-table__contract-link {
    white-space: nowrap;
}

.pelican-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pelican-modal__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.pelican-modal__panel {
    position: relative;
    z-index: 1;
    width: min(28rem, 100%);
    padding: 1.25rem 1.5rem 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

.pelican-modal__panel.pelican-modal__panel--medium {
    width: min(40rem, calc(100vw - 2rem));
}

.pelican-modal__panel.pelican-modal__panel--wide {
    width: min(90rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.pelican-modal__panel.pelican-modal__panel--xlarge {
    width: min(96rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.pelican-modal__panel.pelican-modal__panel--xlarge .pelican-modal__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.pelican-modal__title {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    color: #0f172a;
}

.pelican-modal__body {
    color: #334155;
    line-height: 1.5;
}

.pelican-modal__body p {
    margin: 0 0 0.5rem;
}

.pelican-modal__body p:last-child {
    margin-bottom: 0;
}

.pelican-modal__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.pelican-toast {
    border-width: 1px;
    border-style: solid;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.pelican-toast--success {
    background-color: #d1e7dd !important;
    border-color: #0d7a3e !important;
    color: #0d3d22 !important;
}

.pelican-toast--warning {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #664d03 !important;
}

.pelican-toast--error {
    background-color: #f8d7da !important;
    border-color: #b00020 !important;
    color: #58151c !important;
}

.pelican-toast--info {
    background-color: #cfe2ff !important;
    border-color: #1a4f8b !important;
    color: #0b3d6e !important;
}
