: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;
}

.agency-fees-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.app-main:has(.agency-fees-page) {
    max-width: none;
    width: 100%;
}

.agency-fees-page__title {
    margin: 0;
}

.agency-fees-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.agency-fees-filters__actions {
    display: flex;
    justify-content: flex-start;
}

.agency-fees-period-header__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.agency-fees-period-header__label {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.agency-fees-period-header__actions {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.5rem;
    max-width: 42rem;
}

.agency-fees-period-header__actions > .pelican-btn {
    width: 100%;
}

.agency-fees-summary__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.agency-fees-summary__grid {
    display: grid;
    gap: 0.75rem;
}

.agency-fees-summary__row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 0.5rem 1rem;
    align-items: baseline;
    padding: 0.65rem 0.85rem;
    background: #eef3f8;
    border-radius: 4px;
}

.agency-fees-summary__row--wide {
    grid-template-columns: minmax(180px, 1fr) auto;
}

.agency-fees-summary__row--highlight {
    background: #dce8f3;
    font-weight: 600;
}

.agency-fees-summary__row--wide .agency-fees-summary__detail {
    grid-column: 1 / -1;
    font-size: 0.875rem;
    color: #555;
}

.agency-fees-summary__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.agency-fees-summary__value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.agency-fees-validation-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.agency-fees-validation-badge--inline {
    width: 0.65rem;
    height: 0.65rem;
    padding: 0;
    border-radius: 50%;
}

.agency-fees-validation-badge--inline::before {
    content: "";
}

.agency-fees-validation-badge--complete {
    background: #2e7d32;
    color: #fff;
}

.agency-fees-validation-badge--partial {
    background: #c62828;
    color: #fff;
}

.agency-fees-validation-badge--none {
    background: #9e9e9e;
    color: #fff;
}

.agency-fees-comments__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.agency-fees-comments__textarea {
    resize: vertical;
    min-height: 6rem;
}

.agency-fees-comments__actions {
    display: flex;
    justify-content: flex-start;
}

.agency-fees-seaman-grid__amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.agency-fees-seaman-grid__duration {
    text-align: center;
}

.agency-fees-seaman-grid__status {
    white-space: nowrap;
}

.agency-fees-seaman-grid__status .agency-fees-validation-badge--inline + .agency-fees-validation-badge--inline {
    margin-left: 0.25rem;
}

.agency-fees-seaman-grid__seaman-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.agency-fees-seaman-grid__seaman-link:hover {
    color: var(--pelican-primary, #006699);
}

.agency-fees-summary__value--with-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.agency-fees-line-link {
    background: none;
    border: none;
    padding: 0;
    color: #4369d1;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.agency-fees-line-link:hover {
    color: var(--pelican-primary, #006699);
}

.agency-fees-edit-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.agency-fees-edit-form__full {
    grid-column: 1 / -1;
}

.agency-fees-edit-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.agency-fees-fee-form {
    max-width: 34rem;
    margin: 0 auto;
}

.agency-fees-fee-form__heading {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pelican-primary, #006699);
}

.agency-fees-fee-form__readonly-notice {
    text-align: center;
}

.agency-fees-fee-form__table {
    display: grid;
    gap: 0.75rem;
}

.agency-fees-fee-form__row {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
}

.agency-fees-fee-form__row--top {
    align-items: start;
}

.agency-fees-fee-form__label {
    margin: 0;
    font-weight: 600;
}

.agency-fees-fee-form__field {
    min-width: 0;
}

.agency-fees-fee-form__amount :deep(input) {
    text-align: right;
}

.agency-fees-fee-form__invoice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
}

.agency-fees-fee-form__invoice .form-control {
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.agency-fees-fee-form__invoice-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
}

.agency-fees-fee-form__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.agency-fees-fee-form__actions .pelican-btn {
    min-width: 9.5rem;
}

.agency-fees-invoice-upload {
    display: grid;
    gap: 0.5rem;
}

.agency-fees-invoice-upload__label {
    font-weight: 600;
}

.agency-fees-invoice-upload__input {
    display: none;
}

.agency-fees-invoice-upload__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.agency-fees-invoice-upload__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    background: #eef3f8;
    border: 1px solid #c7d4e0;
    cursor: pointer;
    font: inherit;
}

.agency-fees-invoice-upload__link {
    color: #4369d1;
    text-decoration: underline;
}

.agency-fees-invoice-upload__hint {
    margin: 0;
    font-size: 0.875rem;
    color: #555;
}

.agency-fees-pms-lock {
    display: flex;
    justify-content: center;
    margin: 0.25rem 0 1rem;
}

.agency-fees-pms-lock__icon {
    width: 48px;
    height: 48px;
}

.agency-fees-excel-preview-modal .pelican-modal__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    min-height: 70vh;
    overflow: hidden;
}

.agency-fees-excel-preview__frame {
    border: 0;
    width: 100%;
    min-height: 70vh;
    flex: 1 1 auto;
    background: #fff;
    overflow: auto;
}

.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;
    position: relative;
}

.app-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f8fafc;
    padding: 0.75rem 0 1.25rem;
    overflow-y: auto;
    transition: width 0.2s ease, padding 0.2s ease, opacity 0.15s ease;
}

html.nav-collapsed .app-sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.app-body:has(.app-sidebar)::before,
.customer-edit-nav-host::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background-image: repeating-linear-gradient(
        to bottom,
        #c5d4e0 0,
        #f0f2f2 3px,
        transparent 3px,
        transparent 10px
    );
    pointer-events: none;
}

.app-body:has(.app-sidebar)::before {
    left: 256px;
    z-index: 3;
    transition: left 0.2s ease;
}

html.nav-collapsed .app-body:has(.app-sidebar)::before {
    left: 0;
}

.pane-collapse-toggle {
    position: fixed;
    top: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    height: 52px;
    padding: 0;
    border: none;
    background: #0b3d6e;
    box-shadow: 1px 1px 4px rgba(11, 61, 110, 0.28);
    cursor: pointer;
    user-select: none;
    appearance: none;
}

.pane-collapse-toggle:hover,
.pane-collapse-toggle:focus-visible {
    background: #0a4f8a;
    outline: none;
}

.pane-collapse-toggle:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0b3d6e;
}

.pane-collapse-toggle__arrow {
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 5px 4px 0;
    border-color: transparent #fff transparent transparent;
}

html.nav-collapsed .pane-collapse-toggle--nav .pane-collapse-toggle__arrow,
html.customer-nav-collapsed .pane-collapse-toggle--customer .pane-collapse-toggle__arrow {
    border-width: 4px 0 4px 5px;
    border-color: transparent transparent transparent #fff;
}

.pane-collapse-toggle--nav {
    top: 50%;
    left: 260px;
    transform: translate(-50%, -50%);
    border-radius: 0 4px 4px 0;
    transition: left 0.2s ease, transform 0.2s ease;
}

html.nav-collapsed .pane-collapse-toggle--nav {
    left: 0;
    transform: translateY(-50%);
}

.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__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: pelican-spin 0.8s linear infinite;
    flex-shrink: 0;
    opacity: 0.85;
}

.pelican-btn--sm .pelican-btn__spinner {
    width: 0.875rem;
    height: 0.875rem;
}

.pelican-btn--loading {
    pointer-events: none;
}

.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--wide {
    grid-column: 1 / -1;
}

.seaman-civil-status,
.seaman-edit-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1100px;
}

.seaman-civil-status .seaman-form-grid,
.seaman-edit-sections .seaman-form-grid {
    max-width: none;
}

.seaman-civil-section,
.seaman-edit-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.95rem 1.15rem 1.1rem;
}

.seaman-civil-section__title,
.seaman-edit-section__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d7e2ee;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b3d6e;
}

.seaman-civil-section__subtitle,
.seaman-edit-section__subtitle {
    margin: 1rem 0 0.7rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: #0b175c;
}

.seaman-edit-section__actions,
.seaman-child-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d7e2ee;
}

.seaman-form-field--wide {
    grid-column: 1 / -1;
}

.seaman-civil-status .seaman-form-field--address {
    grid-column: 1 / -1;
    grid-row: auto;
}

.seaman-civil-status .seaman-form-field--country-residence {
    grid-column: auto;
}

.seaman-civil-status .seaman-form-field--row-start {
    grid-column-start: 1;
}

.seaman-civil-status .seaman-form-field--married {
    margin-bottom: 0.25rem;
}

.seaman-civil-status .seaman-required-hint {
    margin: 0;
}

.seaman-civil-status .seaman-civil-status-doc-actions {
    margin-top: 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,
    .seaman-civil-status .seaman-form-field--row-start {
        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-civil-status .seaman-form-field--address textarea.form-control {
    min-height: 3.4rem;
}

.seaman-wife-section {
    margin-top: 1rem;
    max-width: 1100px;
}

.seaman-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #0b175c;
}

.seaman-portal-info-section,
.seaman-consent-section {
    margin-top: 1.25rem;
}

.seaman-readonly-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #555;
}

.seaman-readonly-value {
    display: block;
    font-size: 0.95rem;
}

.seaman-civil-status-doc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.seaman-form-field--married-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: calc(0.5rem * 2 + 1.35rem);
}

.seaman-form-field--married-controls .pelican-field {
    flex: 0 0 auto;
}

.seaman-civil-status-doc-actions--marriage {
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.seaman-consent-section__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

.seaman-consent-section__status--present {
    color: #fff;
    background: #198754;
}

.seaman-consent-section__status--missing {
    color: #fff;
    background: #dc3545;
}

.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,
.seaman-passport-item-divider {
    display: none;
}

.seaman-children-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1100px;
}

.seaman-child-card.seaman-civil-section {
    margin: 0;
}

.seaman-child-card .seaman-form-grid {
    max-width: none;
}

.seaman-child-card--add {
    margin-top: 1rem;
    max-width: 1100px;
}

.seaman-child-card__title {
    gap: 0.45rem;
}

.seaman-child-card__gender {
    font-size: 1.05rem;
    line-height: 1;
}

.seaman-child-card__gender--boy {
    color: #1565c0;
}

.seaman-child-card__gender--girl {
    color: #c2185b;
}

.seaman-child-card__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seaman-child-card__age {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #64748b;
    white-space: nowrap;
}

.seaman-child-card__social-cover {
    justify-content: flex-end;
}

.seaman-child-card__social-cover .pelican-field {
    min-height: calc(0.5rem * 2 + 1.35rem);
    display: flex;
    align-items: center;
}

.seaman-children-logs-section {
    margin-top: 0.85rem;
}

.seaman-passport-collapsible {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    box-shadow: none;
    max-width: 1100px;
}

.seaman-passport-collapsible.panel {
    padding: 0.95rem 1.15rem 1.1rem;
    box-shadow: none;
}

.seaman-passport-collapsible__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d7e2ee;
}

.seaman-passport-collapsible__summary::-webkit-details-marker {
    display: none;
}

.seaman-passport-collapsible__summary::after {
    content: none;
}

.seaman-passport-collapsible__content {
    margin-top: 0;
}

.seaman-passport-doc-actions__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-passport-doc-actions__upload {
    cursor: pointer;
    text-align: center;
}

.seaman-passport-doc-actions__uploading {
    font-size: 0.75rem;
    color: #64748b;
}

.seaman-passport-doc-actions__error {
    margin: 0;
    font-size: 0.8125rem;
}

.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__controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.seaman-passport-row-legacy {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1.25rem;
    min-height: 0;
}

.seaman-passport-row-legacy__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.seaman-passport-row-legacy--spaced {
    margin-top: 0.75rem;
}

.seaman-passport-block-legacy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1.25rem;
    align-items: start;
}

.seaman-passport-block-legacy__fields {
    grid-column: 1;
    min-width: 0;
}

.seaman-passport-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 0.75rem;
    align-items: start;
}

.seaman-passport-fields-grid__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    min-width: 0;
}

.seaman-passport-fields-grid__field:nth-child(even) {
    grid-template-columns: unset;
}

.seaman-passport-fields-grid__field--section-start {
    margin-top: 0.5rem;
}

.seaman-passport-fields-grid__field .seaman-passport-row-legacy__label {
    min-width: 0;
}

.seaman-passport-fields-grid__field .pelican-field {
    margin: 0;
    min-width: 0;
}

.seaman-passport-fields-grid__field .form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.seaman-passport-block-legacy__actions {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    align-self: start;
}

.seaman-passport-block-legacy__actions .seaman-passport-row-legacy__docs {
    margin-left: 0;
    min-width: 0;
    width: 100%;
}

.seaman-passport-doc-actions__inline {
    display: contents;
}

.seaman-passport-row-legacy__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.seaman-passport-row-legacy__field .pelican-field {
    margin: 0;
}

.seaman-passport-row-legacy__field .form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}
    max-width: 11rem;
}

.seaman-passport-row-legacy__field--wide {
    flex: 1 1 100%;
    max-width: 100%;
}

.seaman-passport-row-legacy__field--wide .form-control {
    min-width: 16rem;
    max-width: 28rem;
}

.seaman-passport-row-legacy__label {
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a3a5c;
}

.seaman-passport-row-legacy__docs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-left: auto;
    min-width: 10rem;
}

.seaman-passport-item-legacy {
    margin-bottom: 0.75rem;
    padding: 0.95rem 1.15rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: none;
}

.seaman-passport-item-legacy__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1.25rem;
    align-items: start;
}

.seaman-passport-item-legacy__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    grid-column: 1;
}

.seaman-passport-item-legacy__row--full {
    width: 100%;
}

.seaman-passport-item-legacy__actions {
    grid-column: 2;
    grid-row: 1 / span 4;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 10rem;
}

.seaman-passport-item-divider {
    display: none;
}

.seaman-passport-logs-section {
    margin-top: 0.75rem;
}

@media (max-width: 992px) {
    .seaman-passport-block-legacy {
        grid-template-columns: 1fr;
    }

    .seaman-passport-block-legacy__actions {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }

    .seaman-passport-fields-grid {
        grid-template-columns: 1fr;
    }

    .seaman-passport-row-legacy__docs,
    .seaman-passport-item-legacy__actions {
        margin-left: 0;
        width: 100%;
        grid-column: 1;
        grid-row: auto;
    }

    .seaman-passport-item-legacy__grid {
        grid-template-columns: 1fr;
    }
}

.seaman-social-cover-row {
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.seaman-social-cover-row .seaman-passport-row-legacy__field--compact .form-control,
.seaman-social-cover-row .seaman-passport-row-legacy__field--compact select {
    min-width: 2rem;
    max-width: 4rem;
}

.seaman-social-cover-row .seaman-passport-row-legacy__field .form-control,
.seaman-social-cover-row .seaman-passport-row-legacy__field select {
    min-width: 7.5rem;
    max-width: 11rem;
}

.seaman-bank-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seaman-bank-fields-stack .seaman-passport-row-legacy__field--wide {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr);
    align-items: start;
    gap: 0.35rem;
    width: 100%;
}

.seaman-bank-fields-stack .seaman-passport-row-legacy__field--wide.seaman-passport-row-legacy__field--compact {
    align-items: center;
}

.seaman-bank-fields-stack .seaman-bank-address-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.seaman-social-cover-readonly-value {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: #334155;
}

.seaman-social-cover-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 10rem;
}

.seaman-social-cover-add-actions {
    margin-top: 0.75rem;
}

.seaman-passport-section__title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b3d6e;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.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-coc-card__header {
    margin-bottom: 0.85rem;
}

.seaman-coc-collapsible > .seaman-passport-collapsible__summary::after {
    content: none;
}

.seaman-coc-card__summary {
    min-height: 1.75rem;
}

.seaman-coc-toggle,
.seaman-coc-toggle-link {
    color: #0b3d6e;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight: 600;
}

.seaman-coc-toggle-link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.seaman-coc-toggle-link:hover,
.seaman-coc-card__summary:hover .seaman-coc-toggle,
.seaman-passport-collapsible__summary:hover .seaman-coc-toggle {
    text-decoration: underline;
}

.seaman-coc-collapsible:not([open]) {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.seaman-coc-block {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.seaman-coc-block:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.seaman-coc-block__title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #0b3d6e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seaman-coc-block__title--nested {
    font-size: 0.9rem;
}

.seaman-coc-flag {
    margin-bottom: 0.75rem;
    padding: 0.85rem;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.seaman-coc-flag:last-child {
    margin-bottom: 0;
}

.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 {
    box-sizing: border-box;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.passport-update-page--review {
    max-width: 56rem;
}

.passport-update-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.passport-update-card__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 1.15rem 1.25rem 1rem;
    background: #1a4f8b;
    color: #fff;
    text-align: center;
}

.passport-update-card__logo {
    display: block;
    width: auto;
    max-width: 180px;
    height: 40px;
    object-fit: contain;
}

.passport-update-card__brand-name {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.92;
}

.passport-update-card__culture {
    display: flex;
    justify-content: center;
    padding: 0.85rem 1rem 0;
}

.passport-update-card__body {
    padding: 0.5rem 1.25rem 1.5rem;
}

.passport-update-card__title {
    margin: 0 0 0.65rem;
    font-size: 1.45rem;
    line-height: 1.25;
    color: #0f2744;
    text-align: center;
}

.passport-update-card__lead {
    margin: 0 0 1.1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #475569;
    text-align: center;
}

.passport-update-card__section-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: #1a4f8b;
}

.passport-update-alert {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.passport-update-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.passport-update-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.5rem 0.5rem;
    text-align: center;
}

.passport-update-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 1.5rem;
    font-weight: 700;
}

.passport-update-success__title {
    margin: 0.35rem 0 0;
    font-size: 1.1rem;
    font-weight: 650;
    color: #166534;
}

.passport-update-success__hint {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
}

.passport-update-upload {
    position: relative;
}

.passport-update-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 11.5rem;
    padding: 1.35rem 1rem;
    border: 2px dashed #93b4d4;
    border-radius: 14px;
    background: #f5f8fc;
    color: #1a4f8b;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.passport-update-dropzone:hover,
.passport-update-dropzone:focus-within {
    border-color: #1a4f8b;
    background: #eef4fb;
}

.passport-update-dropzone.is-busy {
    pointer-events: none;
    opacity: 0.72;
}

.passport-update-dropzone__icon {
    color: #1a4f8b;
}

.passport-update-dropzone__action {
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.35;
}

.passport-update-dropzone__hint,
.passport-update-dropzone__file {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #5b6b80;
}

.passport-update-dropzone__file {
    margin-top: 0.15rem;
    word-break: break-word;
    font-weight: 600;
    color: #1a4f8b;
}

.passport-update-review {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e2e8f0;
}

.passport-update-review__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
}

.passport-update-review__preview {
    min-width: 0;
}

.passport-update-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.passport-update-page .form-control {
    min-height: 2.75rem;
    font-size: 16px;
}

.passport-update-review__note {
    margin: 0.9rem 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #64748b;
}

.passport-update-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.passport-update-actions .pelican-btn {
    min-height: 2.85rem;
    justify-content: center;
}

@media (min-width: 720px) {
    .passport-update-page {
        padding: 2rem 1.25rem 3rem;
    }

    .passport-update-card__body {
        padding: 0.65rem 1.75rem 1.75rem;
    }

    .passport-update-page--review .passport-update-review__layout {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        align-items: start;
    }

    .passport-update-fields {
        grid-template-columns: 1fr 1fr;
    }

    .passport-update-actions {
        flex-direction: row;
    }

    .passport-update-actions .pelican-btn {
        flex: 1 1 0;
    }
}

.passport-update-review-note {
    margin-top: 0.75rem;
}

.seaman-passport-add {
    margin-top: 0.75rem;
    padding: 0.95rem 1.15rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: none;
}

.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;
}

.pelican-field--required .pelican-field__control,
.pelican-field--required .form-control,
.pelican-field--required textarea,
.pelican-field--required select,
.pelican-field--required input:not([type="hidden"]):not([type="checkbox"]) {
    border: 2px solid #1565c0;
}

.pelican-field--required.pelican-field--filled .pelican-field__control,
.pelican-field--required.pelican-field--filled .form-control,
.pelican-field--required.pelican-field--filled textarea,
.pelican-field--required.pelican-field--filled select,
.pelican-field--required.pelican-field--filled input:not([type="hidden"]):not([type="checkbox"]) {
    border-color: #0d7a3e;
}

.pelican-field--required.pelican-field--invalid .pelican-field__control,
.pelican-field--required.pelican-field--invalid .form-control,
.pelican-field--required.pelican-field--invalid textarea,
.pelican-field--required.pelican-field--invalid select,
.pelican-field--required.pelican-field--invalid input:not([type="hidden"]):not([type="checkbox"]) {
    border-color: #b42318;
}

.pelican-field--required .form-label .required-star {
    margin-left: 0.15rem;
}

.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;
}

.page-access-badge--entry-kind {
    background: #e2e8f0;
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.page-access-badge--entry-kind-menu {
    background: #dbeafe;
    color: #1e40af;
}

.page-access-badge--entry-kind-page {
    background: #e2e8f0;
    color: #475569;
}

.page-access-badge--entry-kind-redirect {
    background: #fef3c7;
    color: #92400e;
}

.page-access-badge--entry-kind-tab {
    background: #f1f5f9;
    color: #64748b;
}

.page-access-badge--entry-kind-external {
    background: #ede9fe;
    color: #5b21b6;
}

.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;
}

.pelican-loading--compact {
    flex-direction: row;
    gap: 0;
    padding: 0;
}

.pelican-loading--compact .pelican-loading__spinner {
    width: 1.75rem;
    height: 1.75rem;
}

@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;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.role-access-matrix__page-title {
    font-weight: 500;
}

.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;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.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;
}

.home-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-roles__label {
    font-weight: 600;
}

.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;
    width: 100%;
    max-width: none;
}

.customer-edit-page--table .customer-edit-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.customer-edit-page--table .customer-edit-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    margin-top: 0;
}

.customer-edit-page--table .customer-edit-nav-host {
    max-height: none;
    min-height: 0;
    overflow: visible;
}

.customer-edit-page--table .customer-edit-sidebar {
    max-height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.customer-edit-page--table .customer-edit-content > .customer-ranks-panel {
    display: flex;
    flex-direction: column;
    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:has(.customer-wage-scale-panel) .customer-edit-layout {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
}

html.customer-nav-collapsed .customer-edit-page:has(.customer-wage-scale-panel) .customer-edit-layout {
    grid-template-columns: 8px auto;
}

.customer-wage-scale-panel .customer-data-layout {
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    align-items: start;
}

.customer-wage-scale-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.customer-wage-scale-panel .customer-data-detail {
    min-width: min-content;
}

.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;
}

.customer-edit-nav-host {
    position: relative;
    z-index: 2;
    min-width: 0;
    align-self: stretch;
    overflow: visible;
}

.customer-edit-nav-host::after {
    right: 0;
    z-index: 1;
}

.pane-collapse-toggle--customer {
    left: var(--customer-toggle-left, -9999px);
    transform: translate(-50%, -50%);
    border-radius: 0 4px 4px 0;
}

html.customer-nav-collapsed .customer-edit-layout {
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 0.65rem;
}

html.customer-nav-collapsed .customer-edit-nav-host::after {
    right: auto;
    left: 0;
}

html.customer-nav-collapsed .customer-edit-nav-host > .customer-edit-sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

html.customer-nav-collapsed .pane-collapse-toggle--customer {
    transform: translateY(-50%);
}

@media (max-width: 900px) {
    .customer-edit-layout {
        grid-template-columns: 1fr;
    }

    .pane-collapse-toggle--customer {
        position: absolute;
        top: auto;
        bottom: -8px;
        right: 12px;
        left: auto;
        transform: none;
        width: 52px;
        height: 8px;
        border-radius: 0 0 4px 4px;
    }

    .customer-edit-nav-host::after {
        display: none;
    }

    html.customer-nav-collapsed .customer-edit-layout,
    html.customer-nav-collapsed .customer-edit-page:has(.customer-wage-scale-panel) .customer-edit-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    html.customer-nav-collapsed .customer-edit-nav-host {
        height: 20px;
        min-height: 20px;
    }

    html.customer-nav-collapsed .pane-collapse-toggle--customer {
        top: 0;
        bottom: auto;
        left: 12px;
        right: auto;
    }
}

.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;
}

.crew-matrix-settings-grid {
    grid-template-columns: minmax(12rem, 1.4fr) auto minmax(10rem, 1fr);
}

.crew-matrix-vessels {
    margin: 0.35rem 0 1rem;
}

.crew-matrix-vessels__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0.2rem 0.75rem;
    max-height: 12rem;
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

.crew-matrix-vessels__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0b3d6e;
}

.crew-matrix-vessels__item.is-desarme {
    opacity: 0.65;
}

.crew-matrix-vessels__other {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 400;
}

.crew-matrix-req-section {
    margin-bottom: 0.9rem;
}

.crew-matrix-req-section--compact {
    margin: 0;
}

.crew-matrix-req-section__title {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a6f86;
}

.crew-matrix-req-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem 0.3rem;
    align-items: center;
    margin-bottom: 0.3rem;
}

.crew-matrix-req-row__catalog,
.crew-matrix-req-row__label {
    flex: 1 1 auto;
    min-width: 8rem;
}

.crew-matrix-req-row__status {
    flex: 0 0 8.2rem;
}

.crew-matrix-req-row__note {
    flex: 1 1 7rem;
    min-width: 6rem;
}

.crew-matrix-req-row__condition-kind,
.crew-matrix-req-row__vessel-type {
    flex: 0 0 8.5rem;
    min-width: 8.5rem;
}

.crew-matrix-req-row__meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem 0.3rem;
    align-items: center;
    flex: 0 1 auto;
}

.crew-matrix-req-row__delete {
    flex: 0 0 auto;
    margin-left: 0.1rem;
}

.crew-matrix-req-row__limits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.3rem;
    align-items: center;
    flex: 1 1 10rem;
    min-width: 0;
}

.crew-matrix-req-row__area,
.crew-matrix-req-row__limitation {
    flex: 1 1 6.5rem;
    min-width: 0;
}

.crew-matrix-req-row__sep {
    color: #5a6f86;
    font-weight: 600;
    line-height: 1;
}

.crew-matrix-req-section--compact .crew-matrix-req-add .pelican-btn {
    min-width: 1.85rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.crew-matrix-req-section--compact .crew-matrix-req-add .pelican-btn__label {
    display: none;
}

.crew-matrix-req-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.crew-matrix-req-add-all .pelican-btn {
    white-space: nowrap;
}

.crew-matrix-req-duplicate {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.crew-matrix-req-duplicate__label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.crew-matrix-req-duplicate__select {
    min-width: 8rem;
    max-width: 12rem;
    height: 1.85rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.78rem;
}

.crew-matrix-add-obligation {
    display: grid;
    grid-template-columns: minmax(9rem, 12rem) minmax(12rem, 1fr) minmax(8rem, 11rem) auto;
    gap: 0.75rem 1rem;
    align-items: end;
    margin: 0.75rem 0 1rem;
}

.crew-matrix-add-obligation__action {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.1rem;
}

.crew-matrix-table-wrap {
    overflow: auto;
    max-height: min(75vh, 48rem);
    margin: 0.35rem 0 1.25rem;
}

.crew-matrix-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}

.crew-matrix-table--requirements th,
.crew-matrix-table--requirements td {
    border: 1px solid #2f3d4d;
    padding: 0.45rem 0.5rem;
    vertical-align: top;
    text-align: left;
}

.crew-matrix-col-rank {
    position: sticky;
    left: 0;
    z-index: 2;
    box-sizing: border-box;
    width: 15rem;
    min-width: 15rem;
    max-width: 15rem;
    background: #fff;
    box-shadow: 1px 0 0 #2f3d4d;
    font-weight: 600;
    color: #0b3d6e;
}

.crew-matrix-rank-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.crew-matrix-rank-name {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.crew-matrix-table--requirements tbody .crew-matrix-col-rank .pelican-btn {
    font-weight: 600;
    white-space: nowrap;
}

.crew-matrix-compatible__filter {
    margin: 0 0 0.75rem;
}

.crew-matrix-compatible__table-wrap {
    max-height: 28rem;
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.crew-matrix-compatible__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.crew-matrix-compatible__table th,
.crew-matrix-compatible__table td {
    padding: 0.4rem 0.55rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
}

.crew-matrix-compatible__table thead th {
    position: sticky;
    top: 0;
    background: #e6e6e6;
    color: #0b3d6e;
    font-weight: 700;
    z-index: 1;
}

.crew-matrix-compatible__table tbody tr:hover {
    background: #e8f0f8;
}

.crew-matrix-compatible__table a {
    color: #0b3d6e;
    text-decoration: none;
    font-weight: 600;
}

.crew-matrix-compatible__id {
    color: #64748b;
    font-weight: 600;
    margin-left: 0.35rem;
}

.crew-matrix-compatible__percent {
    display: inline-block;
    min-width: 3.1rem;
    font-weight: 700;
}

.crew-matrix-compatible__diag {
    display: block;
    margin-top: 0.15rem;
    color: #475569;
    font-size: 0.74rem;
    text-decoration: underline;
}

.crew-matrix-diag__seaman-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.crew-matrix-diag__seaman-search .form-control {
  flex: 1;
  min-width: 0;
}

.crew-matrix-diag__seaman-hint {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
}

.crew-matrix-diag__seaman-selected {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0b3d6e;
}

.crew-matrix-diag__section th {
  background: #0b3d6e;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.65rem;
}

.crew-matrix-diag__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.crew-matrix-diag__kpi {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 11rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dbe3ec;
    border-radius: 0.4rem;
    background: #f8fafc;
}

.crew-matrix-diag__kpi.is-warning {
    border-color: #f0b429;
    background: #fffaf0;
}

.crew-matrix-diag__kpi-value {
    color: #0b3d6e;
    font-size: 1.25rem;
    font-weight: 800;
}

.crew-matrix-diag__kpi-label {
    color: #475569;
    font-size: 0.76rem;
}

.crew-matrix-diag__alert {
    margin: 0 0 0.6rem;
    padding: 0.5rem 0.7rem;
    border-left: 3px solid #f0b429;
    background: #fffaf0;
    color: #7c5700;
    font-size: 0.82rem;
}

.crew-matrix-diag__table-wrap {
    overflow-x: auto;
}

.crew-matrix-diag__table td {
    vertical-align: top;
}

.crew-matrix-diag__table tr.is-disagree {
    background: #fff1f2;
}

.crew-matrix-diag__table tr.is-skipped {
    background: #fffaf0;
}

.crew-matrix-diag__table tr.is-equivalence {
    background: #f0f9ff;
}

.crew-matrix-diag__table tr.is-informative {
    background: #f8fafc;
}

.crew-matrix-diag__label {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.crew-matrix-diag__meta {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
    overflow-wrap: anywhere;
}

.crew-matrix-diag__rule {
    display: block;
    font-weight: 600;
}

.crew-matrix-diag__badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.crew-matrix-diag__badge.is-ok {
    background: #dcfce7;
    color: #166534;
}

.crew-matrix-diag__badge.is-ko {
    background: #fee2e2;
    color: #991b1b;
}

.crew-matrix-diag__badge.is-skipped {
    background: #fef3c7;
    color: #92400e;
}

.crew-matrix-compatible__percent-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.crew-matrix-compatible__percent-btn:hover .crew-matrix-compatible__percent,
.crew-matrix-compatible__percent-btn:focus-visible .crew-matrix-compatible__percent {
    text-decoration: underline;
}

.crew-matrix-compatible__table tr.is-expanded {
    background: #e8f0f8;
}

.crew-matrix-compatible__detail-row td {
    padding: 0 0.55rem 0.7rem;
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
}

.crew-matrix-compatible__detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.75rem 1.25rem;
    padding: 0.55rem 0.2rem 0.15rem;
}

.crew-matrix-compatible__context {
    grid-column: 1 / -1;
    margin: 0 0 0.35rem;
    color: #475569;
    font-size: 0.82rem;
}

.crew-matrix-compatible__group h4 {
    margin: 0 0 0.35rem;
    color: #0b3d6e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.crew-matrix-compatible__group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.crew-matrix-compatible__doc {
    display: grid;
    grid-template-columns: 5.6rem 5.8rem minmax(0, 1fr);
    gap: 0.15rem 0.45rem;
    padding: 0.28rem 0;
    border-top: 1px solid #e2e8f0;
    font-size: 0.78rem;
}

.crew-matrix-compatible__doc-status {
    font-weight: 700;
}

.crew-matrix-compatible__doc--held .crew-matrix-compatible__doc-status {
    color: #166534;
}

.crew-matrix-compatible__doc--expired .crew-matrix-compatible__doc-status {
    color: #9a3412;
}

.crew-matrix-compatible__doc--missing .crew-matrix-compatible__doc-status {
    color: #b91c1c;
}

.crew-matrix-compatible__doc--skipped .crew-matrix-compatible__doc-status {
    color: #64748b;
}

.crew-matrix-compatible__doc-label {
    color: #0f172a;
}

.crew-matrix-compatible__doc-requirement {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.crew-matrix-compatible__doc-requirement--mandatory {
    color: #0b3d6e;
}

.crew-matrix-compatible__doc-requirement--recommended {
    color: #0369a1;
}

.crew-matrix-compatible__doc-requirement--conditional {
    color: #92400e;
}

.crew-matrix-compatible__doc-dates {
    grid-column: 2 / -1;
    color: #64748b;
    font-size: 0.72rem;
}

.crew-matrix-compatible__percent--high {
    color: #166534;
}

.crew-matrix-compatible__percent--mid {
    color: #9a3412;
}

.crew-matrix-compatible__matched {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
}

.crew-matrix-table thead .crew-matrix-col-rank,
.crew-matrix-table--requirements thead .crew-matrix-col-rank {
    z-index: 4;
    background: #e6e6e6;
    color: #0b3d6e;
    text-align: center;
}

.crew-matrix-table--requirements thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    font-weight: 700;
    text-align: center;
}

.crew-matrix-source-group {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #111;
    background: #e8f0fa;
    min-width: 16rem;
}

.crew-matrix-source-group--stcw,
.crew-matrix-source-group--generalstcw,
.crew-matrix-source-group--specialstcw {
    background: #d4eaf7;
}

.crew-matrix-source-group--coc {
    background: #f6e0c4;
    min-width: 22rem;
}

.crew-matrix-source-group--flag {
    background: #f3e8d8;
}

.crew-matrix-source-group--client {
    background: #e4f0e4;
}

.crew-matrix-source-group--pmsrequirement,
.crew-matrix-source-group--pmsapplication {
    background: #ece4f5;
}

.crew-matrix-table--requirements .crew-matrix-cell {
    min-width: 14rem;
}

.crew-matrix-table--requirements .crew-matrix-cell.is-editing {
    min-width: 42rem;
}

.crew-matrix-table--requirements .crew-matrix-cell.is-readable {
    padding: 0.35rem 0.45rem;
}

.crew-matrix-cell__view {
    display: block;
    width: 100%;
    min-height: 2rem;
    margin: 0;
    padding: 0.1rem 0.15rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    border-radius: 3px;
}

.crew-matrix-cell__view:hover,
.crew-matrix-cell__view:focus-visible {
    outline: 1px dashed #0b3d6e;
    background: rgb(255 255 255 / 0.45);
}

.crew-matrix-cell__view:disabled {
    cursor: default;
    outline: none;
}

.crew-matrix-read-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.crew-matrix-read-line {
    padding: 0.12rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.crew-matrix-read-line--mandatory {
    color: #14532d;
}

.crew-matrix-read-line--recommended {
    color: #854d0e;
}

.crew-matrix-read-line--conditional {
    color: #1e3a8a;
}

.crew-matrix-read-empty {
    color: #94a3b8;
}

.crew-matrix-cell.is-editing {
    box-shadow: inset 0 0 0 2px #0b3d6e;
    background: #fff;
}

.crew-matrix-cell__edit-actions {
    margin-top: 0.45rem;
}

.crew-matrix-table--requirements .form-control {
    background: #fff;
    font-size: 0.78rem;
    padding: 0.12rem 0.3rem;
    height: 1.75rem;
    min-height: 1.75rem;
    max-height: 1.75rem;
    width: auto;
    max-width: 100%;
}

.crew-matrix-table--requirements select.form-control {
    appearance: auto;
    field-sizing: fixed;
}

.crew-matrix-status {
    min-width: 6rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
}

.crew-matrix-condition {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
}

.crew-matrix-cell--mandatory {
    background: #e7f6ea;
}

.crew-matrix-cell--recommended {
    background: #fff6db;
}

.crew-matrix-cell--notapplicable {
    background: #eef1f4;
}

.crew-matrix-cell--conditional {
    background: #e7f0fb;
}

.crew-matrix-value {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
}

.crew-matrix-block {
    margin: 1rem 0 1.25rem;
}

.crew-matrix-block__title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b3d6e;
}

.crew-matrix-ranks {
    margin: 0.75rem 0 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
}

.crew-matrix-ranks > summary {
    cursor: pointer;
    font-weight: 600;
    color: #0b3d6e;
}

.crew-matrix-ranks__table-wrap {
    max-height: 16rem;
    overflow: auto;
    margin-top: 0.65rem;
}

.crew-matrix-ranks-table {
    width: 100%;
}

.crew-matrix-footnotes {
    margin: 1rem 0;
}

.crew-matrix-footnotes__row {
    display: grid;
    grid-template-columns: 5rem minmax(12rem, 1fr) auto;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    align-items: center;
}

.crew-matrix-footnotes__marker {
    max-width: 5rem;
}

.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-ranks-panel {
        overflow: visible;
        min-height: auto;
    }
}

.customer-wage-scale-create-bar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customer-wage-scale-create-bar__title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.customer-wage-scale-create-bar .pelican-field {
    margin: 0;
}

.customer-wage-scale-create-bar .form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.customer-wage-scale-create-bar .pelican-btn {
    width: 100%;
    justify-content: center;
}

.customer-wage-scale-list__title {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.customer-wage-scale-list__empty {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
}

.customer-wage-scale-settings {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.customer-wage-scale-settings__grid {
    display: grid;
    grid-template-columns: minmax(10rem, 1.4fr) auto minmax(9rem, 1fr);
    gap: 0.75rem 1.25rem;
    align-items: end;
}

.customer-wage-scale-settings__item {
    min-width: 0;
}

.customer-wage-scale-settings__item .pelican-field {
    margin: 0;
}

.customer-wage-scale-settings__item .form-label,
.customer-wage-scale-settings__label {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.customer-wage-scale-settings__item--hidden {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 0.35rem;
}

.customer-wage-scale-settings__checkbox {
    display: flex;
    align-items: center;
    min-height: 2rem;
}

.customer-wage-scale-settings__checkbox .pelican-field {
    margin: 0;
}

.customer-wage-scale-settings .validation-message {
    margin: 0.5rem 0 0;
}

.customer-wage-scale-position-filter {
    min-width: 0;
    width: 100%;
    max-width: none;
    font-size: 0.8125rem;
}

@media (max-width: 900px) {
    .customer-wage-scale-settings__grid {
        grid-template-columns: 1fr;
    }

    .customer-wage-scale-settings__item--hidden {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        padding-bottom: 0;
    }

    .customer-wage-scale-settings__item--hidden .customer-wage-scale-settings__label {
        margin: 0;
    }
}

.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 {
    margin: 0.75rem 0 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.customer-wage-scale-panel .customer-wage-scale-table-wrap {
    width: fit-content;
    min-width: 100%;
    max-width: none;
}

.customer-wage-scale-panel {
    width: 100%;
    min-width: 0;
}

.customer-data-layout {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.customer-data-layout .customer-vessel-list {
    max-height: none;
    height: auto;
}

.customer-data-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.customer-wage-scale-form {
    display: flex;
    flex-direction: column;
}

.customer-wage-scale-form .customer-wage-scale-settings,
.customer-wage-scale-form .form-actions {
    flex-shrink: 0;
}

.customer-ranks-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.customer-ranks-panel > .customer-rank-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 0.5rem;
    width: max-content;
    max-width: 100%;
    overflow: auto;
}

.customer-rank-table.customer-wage-scale-table {
    width: max-content;
    min-width: 0;
    max-width: 100%;
}

.customer-rank-table.customer-wage-scale-table td:first-child,
.customer-rank-table.customer-wage-scale-table thead th:first-child {
    position: static;
}

.customer-rank-table.customer-wage-scale-table thead th {
    background: #f1f5f9;
}

.customer-wage-scale-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.customer-wage-scale-panel .customer-wage-scale-table {
    --wage-scale-sticky-position-width: 5.5rem;
    width: max-content;
    min-width: 100%;
    font-size: 0.6875rem;
    border-collapse: separate;
    border-spacing: 0;
}

.customer-wage-scale-panel .customer-wage-scale-table th,
.customer-wage-scale-panel .customer-wage-scale-table td {
    padding: 0.2rem 0.3rem;
}

.customer-wage-scale-panel .customer-wage-scale-table .pelican-field {
    margin: 0;
}

.customer-wage-scale-panel .customer-wage-scale-table .pelican-field__control,
.customer-wage-scale-panel .customer-wage-scale-table .form-control {
    min-width: 3.25rem;
    max-width: 4.25rem;
    width: 4.25rem;
    padding: 0.12rem 0.2rem;
    font-size: 0.6875rem;
    line-height: 1.2;
}

.customer-wage-scale-panel .customer-wage-scale-table .customer-wage-scale-col--category .form-control {
    min-width: 2rem;
    max-width: 2.5rem;
    width: 2.5rem;
}

.customer-wage-scale-panel .customer-wage-scale-table .customer-wage-scale-col--position {
    width: var(--wage-scale-sticky-position-width);
    min-width: var(--wage-scale-sticky-position-width);
    max-width: var(--wage-scale-sticky-position-width);
    white-space: normal;
    line-height: 1.25;
    box-sizing: border-box;
}

.customer-wage-scale-panel .customer-wage-scale-table .customer-wage-scale-col--rank {
    min-width: 5rem;
    max-width: 7rem;
    white-space: normal;
    line-height: 1.25;
}

.customer-wage-scale-panel .customer-wage-scale-table th {
    font-size: 0.6875rem;
    line-height: 1.25;
    white-space: normal;
    max-width: 4.5rem;
}

.customer-wage-scale-panel .customer-wage-scale-table th.customer-wage-scale-col--position,
.customer-wage-scale-panel .customer-wage-scale-table th.customer-wage-scale-col--rank {
    max-width: none;
}

.customer-wage-scale-panel .customer-wage-scale-table td:first-child,
.customer-wage-scale-panel .customer-wage-scale-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #fff;
    box-shadow: 1px 0 0 #e2e8f0;
}

.customer-wage-scale-panel .customer-wage-scale-table td:nth-child(2),
.customer-wage-scale-panel .customer-wage-scale-table th:nth-child(2) {
    position: sticky;
    left: var(--wage-scale-sticky-position-width);
    z-index: 2;
    background-color: #fff;
    box-shadow: 2px 0 4px -1px rgba(15, 23, 42, 0.14);
}

.customer-wage-scale-panel .customer-wage-scale-table th:first-child,
.customer-wage-scale-panel .customer-wage-scale-table th:nth-child(2) {
    z-index: 4;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--illness td {
    background: #fff7ed;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--signed-on td {
    background: #eff6ff;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--illness .customer-wage-scale-col--position {
    color: #c2410c;
    font-weight: 700;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--signed-on .customer-wage-scale-col--position {
    color: #0369a1;
    font-weight: 700;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--illness td:first-child,
.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--illness td:nth-child(2) {
    background: #fff7ed;
}

.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--signed-on td:first-child,
.customer-wage-scale-panel .customer-wage-scale-table tr.customer-wage-scale-row--signed-on td:nth-child(2) {
    background: #eff6ff;
}

.customer-wage-scale-panel .customer-wage-scale-table th:first-child {
    background: #f1f5f9;
}

.customer-wage-scale-panel .customer-wage-scale-table th:nth-child(2) {
    background: #f1f5f9;
}

.customer-wage-scale-panel .customer-wage-scale-table__actions .pelican-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.6875rem;
}

.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;
}

/* Agency fees — wide tables with horizontal scroll inside panel */
.agency-fees-seaman-grid {
    min-width: 0;
    overflow: hidden;
}

.agency-fees-seaman-grid__scroll.customer-wage-scale-table-wrap {
    display: block;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.agency-fees-seaman-grid__table.customer-wage-scale-table {
    width: max-content;
    min-width: 100%;
}

/* PMS Fees — 16 colonnes sur 100 % de la largeur, sans scroll horizontal */
.pms-fees-seaman-grid.agency-fees-seaman-grid {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pms-fees-seaman-grid__wrap.customer-wage-scale-table-wrap.agency-fees-seaman-grid__scroll {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.pms-fees-seaman-grid__table.customer-wage-scale-table.agency-fees-seaman-grid__table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
}

.pms-fees-seaman-grid__table.customer-wage-scale-table th,
.pms-fees-seaman-grid__table.customer-wage-scale-table td {
    padding: 0.3rem 0.25rem;
    font-size: 0.75rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.pms-fees-seaman-grid__table.customer-wage-scale-table th {
    font-size: 0.6875rem;
    line-height: 1.15;
    vertical-align: bottom;
}

.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-prejoining { width: 2%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-seaman { width: 24%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-vessel { width: 5%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-rank { width: 9%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-category { width: 3%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-date { width: 5%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-duration { width: 3%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-amount { width: 5.5%; }
.pms-fees-seaman-grid__table col.pms-fees-seaman-grid__col-comment { width: 4%; }

.pms-fees-seaman-grid__col-prejoining {
    width: 2rem;
    min-width: 0;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.pms-fees-prejoining-legend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
}

.pms-fees-prejoining-legend .pms-fees-prejoining-indicator {
    flex-shrink: 0;
}

.pms-fees-seaman-grid__col-seaman {
    min-width: 0;
    max-width: none;
}

.pms-fees-seaman-grid__col-seaman .agency-fees-seaman-grid__seaman-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pms-fees-seaman-grid__col-vessel {
    min-width: 0;
    white-space: nowrap;
}

.pms-fees-seaman-grid__col-rank {
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pms-fees-seaman-grid__col-category {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.pms-fees-seaman-grid__col-date {
    min-width: 0;
    white-space: nowrap;
    font-size: 0.6875rem;
}

.pms-fees-seaman-grid__col-duration {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.pms-fees-seaman-grid__col-amount {
    min-width: 0;
}

.pms-fees-seaman-grid__amount-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0.15rem 0.2rem;
    text-align: right;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.pms-fees-seaman-grid__usd-hint {
    color: #c62828;
    font-size: 0.75rem;
    font-weight: 600;
}

.pms-fees-results {
    min-width: 0;
}

.pms-fees-results__body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
    min-width: 0;
}

.pms-fees-results .pms-fees-save-actions {
    display: flex;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.pms-fees-results .pms-fees-manual-row {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.pms-fees-seaman-grid {
    margin-top: 0.25rem;
    min-width: 0;
    max-width: 100%;
}

.pms-fees-seaman-grid > .customer-form-section-title {
    margin-bottom: 0.75rem;
}

.pms-fees-filters__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 15rem));
    justify-content: space-between;
    gap: 1rem;
}

.pms-fees-filters__actions > .pelican-btn {
    width: 100%;
}

.pms-fees-page .agency-fees-period-header__top {
    align-items: center;
}

.pms-fees-period-header__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    max-width: none;
    margin-left: auto;
}

.pms-fees-period-header__actions > .pelican-btn {
    width: auto;
    min-width: 15rem;
}

.pms-fees-summary__currency-select,
.pms-fees-summary__change-rate-input {
    max-width: 10rem;
}

.pms-fees-save-actions {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.pms-fees-results .pms-fees-save-actions {
    padding-top: 0;
    padding-bottom: 0;
}

.pms-fees-manual-row {
    margin-top: 0.75rem;
}

.pms-fees-manual-row__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.pms-fees-manual-row__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.75rem 1rem;
}

.pms-fees-manual-row__field--seaman {
    grid-column: span 2;
    min-width: 12rem;
}

.pms-fees-manual-row__field--category {
    max-width: 6rem;
}

.pms-fees-manual-row__actions {
    margin-top: 0.75rem;
}

.pms-fees-seaman-grid__col-comment {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.pms-fees-seaman-grid__comment-wrap {
    display: inline-flex;
    justify-content: center;
}

.pms-fees-seaman-grid__comment-wrap .pelican-btn {
    min-width: 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.pms-fees-seaman-grid__comment-wrap--has-comment .pelican-btn {
    border-color: var(--pelican-color-primary, #0d6efd);
    box-shadow: inset 0 0 0 1px var(--pelican-color-primary, #0d6efd);
}

.pms-fees-comment-modal__label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.pms-fees-comment-modal__textarea {
    width: 100%;
    min-width: 18rem;
    resize: vertical;
}

.pms-fees-comment-modal__notice {
    margin: 0.75rem 0 1rem;
    color: var(--pelican-text-muted, #6c757d);
    font-size: 0.9rem;
}

.pms-fees-recap__legend {
    margin: 0 0 1rem;
    color: var(--pelican-text-muted, #6c757d);
    font-size: 0.9rem;
}

.pms-fees-recap__summary {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e3e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.pms-fees-recap__summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.pms-fees-recap__summary-label {
    font-weight: 600;
    color: #1f2937;
}

.pms-fees-recap__summary-percent {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #2e7d32;
}

.pms-fees-recap__progress {
    height: 0.55rem;
    margin-bottom: 0.65rem;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.pms-fees-recap__progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #43a047, #2e7d32);
    transition: width 0.2s ease;
}

.pms-fees-recap__summary-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.pms-fees-recap__summary-count {
    font-weight: 600;
}

.pms-fees-recap__summary-count--locked {
    color: #2e7d32;
}

.pms-fees-recap__summary-count--unlocked {
    color: #e65100;
}

.pms-fees-recap__summary-count--absent {
    color: #616161;
}

.pms-fees-recap__summary-count--todo {
    color: #c62828;
}

.pms-fees-recap__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pms-fees-recap__filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pms-fees-recap__filter-btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.pms-fees-recap__filter-btn:hover {
    border-color: #94a3b8;
}

.pms-fees-recap__filter-btn--active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.pms-fees-recap__search {
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 20rem;
    font-size: 0.875rem;
}

.pms-fees-recap__clients {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pms-fees-recap__client {
    border: 1px solid #e5e7eb;
    border-radius: 0.45rem;
    background: #fff;
}

.pms-fees-recap__client-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    list-style: none;
}

.pms-fees-recap__client-summary::-webkit-details-marker {
    display: none;
}

.pms-fees-recap__client-name {
    color: #4b5563;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8125rem;
}

.pms-fees-recap__client-count {
    color: #6b7280;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pms-fees-recap__vessel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0 0.75rem 0.75rem;
}

.pms-fees-recap__vessel {
    min-width: 0;
}

.pms-fees-recap__status-badge {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 0.35rem;
    border-left: 3px solid transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pms-fees-recap__status-badge--locked {
    border-left-color: #2e7d32;
    background: #e8f5e9;
    color: #1b5e20;
}

.pms-fees-recap__status-badge--unlocked {
    border-left-color: #ef6c00;
    background: #fff3e0;
    color: #e65100;
}

.pms-fees-recap__status-badge--absent {
    border-left-color: #9e9e9e;
    background: #f5f5f5;
    color: #424242;
}

.customer-wage-scale-table th.agency-fees-line-table__center,
.customer-wage-scale-table td.agency-fees-line-table__center {
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.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;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
}

.customer-rank-toolbar__search {
    margin: 0;
    min-width: 12rem;
    flex: 1 1 14rem;
    max-width: 22rem;
}

.customer-rank-toolbar__search-input {
    width: 100%;
    min-height: 2rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8125rem;
}

.customer-rank-toolbar__count {
    color: #64748b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.customer-rank-toolbar__hidden {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0 auto;
    cursor: pointer;
    white-space: nowrap;
}

.customer-rank-toolbar__hidden .pelican-field {
    margin: 0;
}

.customer-rank-table.customer-wage-scale-table th,
.customer-rank-table.customer-wage-scale-table td {
    padding: 0.28rem 0.55rem;
    vertical-align: middle;
}

.customer-rank-table__col-rank {
    min-width: 11rem;
}

.customer-rank-table__col-label {
    min-width: 10rem;
}

.customer-rank-table__col-actions,
.customer-rank-table__actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.customer-rank-table__actions .pelican-btn {
    padding: 0.28rem;
    min-width: 1.85rem;
}

.customer-rank-table__name {
    font-weight: 600;
    color: #0f172a;
}

.customer-rank-table__empty {
    color: #cbd5e1;
}

.customer-rank-table__group th {
    position: sticky;
    top: 1.85rem;
    z-index: 1;
    padding: 0.4rem 0.55rem;
    background: #eef4fb;
    color: #0b175c;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    border-top: 1px solid #dbe7f3;
    box-shadow: none;
}

.customer-rank-table__group-name {
    margin-right: 0.45rem;
}

.customer-rank-table__group-count {
    margin-left: 0.35rem;
    color: #64748b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.customer-rank-table__group-count::before {
    content: "· ";
}

.customer-rank-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    vertical-align: middle;
}

.customer-rank-badge--officer {
    background: #dbeafe;
    color: #1d4ed8;
}

.customer-rank-badge--rating {
    background: #d1fae5;
    color: #047857;
}

.customer-rank-badge--hidden {
    background: #f1f5f9;
    color: #64748b;
}

.customer-rank-table__row.is-hidden-item td {
    opacity: 0.72;
}

.customer-rank-table__row--officer td:first-child {
    box-shadow: inset 3px 0 0 #3b82f6;
}

.customer-rank-table__row--rating td:first-child {
    box-shadow: inset 3px 0 0 #10b981;
}

.customer-rank-table__row.is-editing td {
    background: #f8fafc;
    vertical-align: top;
}

.customer-rank-table__row.is-editing .pelican-field {
    margin: 0 0 0.4rem;
}

.customer-rank-table__row.is-editing .pelican-field:last-child {
    margin-bottom: 0;
}

.customer-rank-table__hidden-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #475569;
    cursor: pointer;
}

.customer-rank-table__hidden-edit .pelican-field {
    margin: 0;
}

.customer-rank-table .pelican-field__control,
.customer-rank-table .form-control {
    min-width: 8rem;
    width: 100%;
    padding: 0.25rem 0.4rem;
    font-size: 0.8125rem;
}

.customer-wage-scale-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;
    width: 100%;
    min-width: 0;
}

.app-main:has(.planning-shell--previsional) {
    max-width: none;
    width: 100%;
}

.planning-previsional-board {
    width: 100%;
    min-width: 0;
}

.planning-previsional-block {
    margin-bottom: 2rem;
}

.planning-previsional-block-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.planning-previsional-block-title--provisional {
    color: #006699;
}

.planning-previsional-block--onboard .planning-previsional-group-title {
    color: #006699;
}

.planning-previsional-block--on-leave .planning-previsional-group-title {
    color: #006699;
}

.planning-previsional-group {
    margin-bottom: 1.25rem;
}

.planning-previsional-group-title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.planning-table--previsional-layout {
    table-layout: fixed;
    width: 100%;
}

.planning-table--previsional-layout .planning-col-id,
.planning-table--previsional-layout col.planning-col-id {
    width: 4%;
}

.planning-table--previsional-layout .planning-col-date,
.planning-table--previsional-layout col.planning-col-date {
    width: 8%;
}

.planning-table--previsional-layout .planning-col-rem,
.planning-table--previsional-layout col.planning-col-rem {
    width: 4%;
}

.planning-table--previsional-layout .planning-col-seaman,
.planning-table--previsional-layout col.planning-col-seaman {
    width: 14%;
}

.planning-table--previsional-layout .planning-col-vessel,
.planning-table--previsional-layout col.planning-col-vessel {
    width: 10%;
}

.planning-table--previsional-layout .planning-col-separator,
.planning-table--previsional-layout col.planning-col-separator {
    width: 1%;
}

.planning-table--previsional-layout .planning-col-relief-seaman,
.planning-table--previsional-layout col.planning-col-relief-seaman {
    width: 14%;
}

.planning-table--previsional-layout .planning-col-relief-date,
.planning-table--previsional-layout col.planning-col-relief-date {
    width: 9%;
}

.planning-table--previsional-layout .planning-col-relief-port,
.planning-table--previsional-layout col.planning-col-relief-port {
    width: 8%;
}

.planning-table--previsional-layout .planning-col-relief-comments,
.planning-table--previsional-layout col.planning-col-relief-comments {
    width: 18%;
}

.planning-table--previsional-layout .planning-col-relief-contract,
.planning-table--previsional-layout col.planning-col-relief-contract {
    width: 5%;
}

.planning-table--previsional-layout .planning-col-relief-contract-date,
.planning-table--previsional-layout col.planning-col-relief-contract-date {
    width: 8%;
}

.planning-table--previsional-layout .planning-col-relief-track,
.planning-table--previsional-layout col.planning-col-relief-track {
    width: 4%;
}

.planning-table--previsional-layout .planning-relief-track-cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.15rem 0.25rem;
}

.planning-table--previsional-layout .planning-relief-track-cell .boarding-track-light {
    margin: 0 auto;
}

.planning-table--previsional-layout .planning-relief-seaman-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-table--previsional-layout td,
.planning-table--previsional-layout th {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.planning-table--on-leave td {
    background: #fff7ed;
}

.planning-table--relief tbody tr:not(.planning-relief-error-row) td:nth-child(-n+5) {
    background: #fefce8;
}

.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-previsional-replacement-cell {
    white-space: nowrap;
    text-align: right;
}

.planning-previsional-section-title--rank {
    color: #006699;
    margin-top: 1rem;
}

.planning-previsional-rank-block + .planning-previsional-rank-block {
    margin-top: 1.25rem;
}

.planning-previsional-rank-loading {
    margin: 0.25rem 0 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.planning-table--relief th:last-child,
.planning-table--relief td:last-child {
    min-width: 12rem;
}

.planning-remaining-days--low {
    color: #ea580c !important;
    font-weight: 600;
}

.planning-previsional-merged-group {
    margin-bottom: 2rem;
}

.planning-previsional-merged-group .planning-previsional-group--on-leave {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.planning-previsional-section-title--ashore {
    color: #64748b;
    font-style: italic;
    margin-top: 0.5rem;
}

.planning-relief-seaman-cell {
    min-width: 14rem;
}

.planning-relief-seaman-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.planning-relief-select {
    min-width: 11rem;
    min-height: 2rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.planning-relief-date,
.planning-relief-port {
    min-height: 2rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.planning-relief-comments {
    min-width: 12rem;
    min-height: 2rem;
    resize: vertical;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.planning-table--relief tbody tr:not(.planning-relief-error-row) td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.planning-days-ashore--low {
    color: #ea580c !important;
    font-weight: 600;
}

.planning-days-ashore--medium {
    color: #dc2626 !important;
    font-weight: 600;
}

.planning-days-ashore--high {
    color: #991b1b !important;
    font-weight: 700;
}

.planning-previsional-subtitle {
    margin: 0 0 0.5rem;
    color: #64748b;
}

.planning-relief-clear {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.planning-relief-clear:hover:not(:disabled) {
    background: #fecaca;
}

.planning-relief-clear:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.planning-relief-row--saving td {
    opacity: 0.7;
}

.planning-relief-error-row td {
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.875rem;
}

.planning-replacement-filter {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.planning-replacement-filter__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.planning-replacement-filter__toggle + .planning-replacement-filter__toggle {
    margin-top: 0.5rem;
}

.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-filters {
    margin-bottom: 1rem;
}

.planning-vessel-positions-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    align-items: end;
}

.planning-vessel-positions-filters-actions {
    display: flex;
    align-items: flex-end;
}

.planning-vessel-positions-filter-locked {
    margin: 0;
    font-weight: 600;
}

.planning-vessel-positions-api-sources__hint {
    margin: 0 0 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
}

.planning-vessel-positions-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem 1.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.planning-vessel-positions-summary__left {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    padding-right: 1rem;
    border-right: 1px solid #e2e8f0;
}

.planning-vessel-positions-summary__filters {
    flex: 0 0 11.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 10rem;
    padding-right: 1rem;
    border-right: 1px solid #e2e8f0;
}

.planning-vessel-positions-summary__filters .form-group {
    margin: 0;
}

.planning-vessel-positions-summary__filters label {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.planning-vessel-positions-summary__filters .form-control {
    min-height: 1.85rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.82rem;
}

.planning-vessel-positions-summary__filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.1rem;
}

.planning-vessel-positions-summary__recap {
    flex: 0 1 auto;
    min-width: 11rem;
    max-width: 18rem;
    padding-left: 1rem;
}

.planning-vessel-positions-summary__recap-title {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.planning-vessel-positions-summary__recap-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.planning-vessel-positions-summary__recap-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.3;
}

.planning-vessel-positions-summary__recap-list strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-align: right;
}

.planning-vessel-positions-summary__recap-warning {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    color: #b45309;
}

.planning-vessel-positions-alert {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.92rem;
    font-weight: 500;
}

.planning-vessel-positions-summary__recap-renew {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e2e8f0;
}

.planning-vessel-positions-summary__recap-renew-label {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    color: #64748b;
}

.planning-vessel-positions-summary__recap-renew-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.planning-vessel-positions-summary__recap-renew-current {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
}

.planning-vessel-positions-summary__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    flex: 1 1 20rem;
    min-width: 0;
}

.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) 30rem;
    gap: 1rem;
    align-items: stretch;
}

.vessel-fleet-map__map-column {
    position: relative;
    min-width: 0;
}

.vessel-fleet-map__freshness-legend {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 500;
    max-width: calc(100% - 1.5rem);
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    font-size: 0.78rem;
    color: #334155;
    pointer-events: none;
}

.vessel-fleet-map__freshness-legend-title {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: #0f172a;
}

.vessel-fleet-map__freshness-legend-list {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vessel-fleet-map__freshness-legend-list li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.25;
}

.vessel-fleet-marker-icon {
    background: transparent;
    border: none;
}

.vessel-fleet-marker-icon__arrow {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    transform-origin: center center;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.35));
}

.vessel-fleet-marker-icon__legend {
    display: inline-block;
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    transform: rotate(-90deg);
    transform-origin: center center;
}

.vessel-fleet-marker-icon__dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.35);
}

.vessel-fleet-map__freshness-legend .vessel-fleet-marker-icon__dot {
    width: 11px;
    height: 11px;
    border-width: 1.5px;
    flex-shrink: 0;
}

.vessel-fleet-marker-icon__dot--green {
    background: #22c55e;
}

.vessel-fleet-marker-icon__dot--yellow {
    background: #eab308;
}

.vessel-fleet-marker-icon__dot--orange {
    background: #f97316;
}

.vessel-fleet-marker-icon__dot--red {
    background: #ef4444;
}

.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;
    min-width: 0;
    overflow-x: auto;
    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__header-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.vessel-fleet-map-detail__photo {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dbeafe;
    flex-shrink: 0;
    background: #f8fafc;
}

.vessel-fleet-map-detail__header-text {
    min-width: 0;
    flex: 1;
}

.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;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vessel-fleet-map-detail__section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.vessel-fleet-map-detail__section-heading .pelican-btn {
    flex-shrink: 0;
    min-width: 2rem;
    padding-inline: 0.45rem;
}

.planning-vessel-edit-modal__position {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.vessel-fleet-map-detail__refresh-message {
    margin: -0.15rem 0 0.55rem;
    font-size: 0.82rem;
    color: #64748b;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.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__section--history {
    margin-top: 0;
}

.vessel-fleet-map-detail__history {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background: #fff;
    padding: 0.35rem 0.5rem 0.5rem;
}

.vessel-fleet-map-detail__history-summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0b3d6e;
    list-style-position: outside;
}

.vessel-fleet-map-detail__history-scroll {
    margin-top: 0.45rem;
    max-height: 9rem;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
}

.vessel-fleet-map-detail__history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
}

.vessel-fleet-map-detail__history-table th,
.vessel-fleet-map-detail__history-table td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.vessel-fleet-map-detail__history-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.vessel-fleet-map-detail__history-table tbody tr:last-child td {
    border-bottom: none;
}

.vessel-fleet-map-detail__history-actions {
    margin-top: 0.5rem;
}

.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.5rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.vessel-fleet-map-detail__crew-table .crew-col-id {
    width: 3.25rem;
    white-space: nowrap;
}

.vessel-fleet-map-detail__crew-table .crew-col-name {
    white-space: normal;
    word-break: break-word;
}

.vessel-fleet-map-detail__crew-table .crew-col-date {
    width: 6.75rem;
    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;
}

.leaflet-tooltip.vessel-mt-hover-tooltip {
    padding: 0;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    pointer-events: none;
}

.leaflet-tooltip.vessel-mt-hover-tooltip::before {
    border-top-color: #fff;
}

.vessel-mt-hover {
    width: 11rem;
    font-family: inherit;
    color: #0f172a;
}

.vessel-mt-hover__photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e2e8f0;
}

.vessel-mt-hover__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.55rem 0.5rem;
}

.vessel-mt-hover__flag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
}

.vessel-mt-hover__name {
    font-size: 0.78rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vessel-mt-hover__imo {
    font-size: 0.72rem;
    color: #64748b;
}

.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-endpoints {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.vessel-mt-card__route-endpoint {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.vessel-mt-card__route-endpoint--departure {
    text-align: left;
    align-items: flex-start;
}

.vessel-mt-card__route-endpoint--arrival {
    text-align: right;
    align-items: flex-end;
}

.vessel-mt-card__route-code {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b3d6e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.vessel-mt-card__route-time {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: nowrap;
}

.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-mt-card__port-facts {
    margin: 0;
    padding: 0.55rem 0.9rem 0.65rem;
    display: grid;
    gap: 0.35rem;
}

.vessel-mt-card__port-facts div {
    display: grid;
    grid-template-columns: minmax(5.5rem, 38%) 1fr;
    gap: 0.45rem;
    font-size: 0.74rem;
    line-height: 1.3;
}

.vessel-mt-card__port-facts dt {
    margin: 0;
    color: #64748b;
    font-weight: 600;
}

.vessel-mt-card__port-facts dd {
    margin: 0;
    color: #0f172a;
}

.vessel-mt-card__port-country {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.vessel-mt-card__port-flag {
    display: inline-block;
    width: 1.25rem;
    height: 0.94rem;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
    vertical-align: -0.1em;
}

.vessel-mt-card__port-facilities {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vessel-mt-card__port-facilities li {
    line-height: 1.35;
}

.vessel-photo-upload {
    margin-bottom: 1rem;
}

.vessel-photo-position-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
    align-items: start;
}

.vessel-photo-position-panel .vessel-photo-upload {
    margin-bottom: 0;
}

.vessel-photo-position-panel .vessel-photo-upload__wrap {
    width: 100%;
    max-width: none;
}

@media (max-width: 900px) {
    .vessel-photo-position-panel {
        grid-template-columns: 1fr;
    }
}

.vessel-edit-position-mini-map {
    min-width: 0;
}

.vessel-edit-position-mini-map__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.vessel-edit-position-mini-map__label {
    display: block;
    margin-bottom: 0;
    font-weight: 600;
    color: #0b3d6e;
}

.vessel-edit-position-mini-map__link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0b3d6e;
    text-decoration: none;
}

.vessel-edit-position-mini-map__link:hover {
    text-decoration: underline;
}

.vessel-edit-position-mini-map__meta {
    margin: 0 0 0.5rem;
    font-size: 0.84rem;
    color: #64748b;
}

.vessel-edit-position-mini-map__map-area {
    position: relative;
    width: 100%;
}

.vessel-edit-position-mini-map__canvas {
    width: 100%;
    height: 280px;
    min-height: 280px;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    overflow: hidden;
    background: #e8f4fc;
}

.vessel-edit-position-mini-map__canvas.leaflet-container {
    width: 100%;
    height: 280px;
}

.vessel-edit-position-mini-map__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    z-index: 2;
}

.vessel-edit-position-mini-map__overlay.is-hidden {
    display: none;
}

.vessel-edit-position-mini-map__empty {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    padding: 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-vessel-link {
    border: none;
    padding: 0;
    background: none;
    color: #0b3d6e;
    font: inherit;
    font-weight: 600;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    cursor: pointer;
}

.planning-vessel-positions-vessel-link:hover {
    color: #0f4c8a;
}

.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__status {
    margin: 0 0 0.75rem;
}

.boarding-preparation-workflow-status {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.boarding-preparation-workflow-status--preparation {
    background: #fef3c7;
    color: #92400e;
}

.boarding-preparation-workflow-status--provisional {
    background: #dbeafe;
    color: #1d4ed8;
}

.boarding-preparation-workflow-status--under_contract {
    background: #dcfce7;
    color: #166534;
}

.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-visa {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.boarding-preparation-visa__title {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.boarding-preparation-visa__hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
}

.boarding-preparation-visa__list {
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.boarding-preparation-visa__table {
    margin: 0;
}

.boarding-preparation-visa__table th:last-child,
.boarding-preparation-visa__table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.boarding-preparation-visa__actions {
    text-align: right;
}

.boarding-preparation-visa__status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.boarding-preparation-visa__status--valid {
    background: #dcfce7;
    color: #166534;
}

.boarding-preparation-visa__status--missing {
    background: #fee2e2;
    color: #991b1b;
}

.boarding-preparation-visa__status--expiring {
    background: #fef3c7;
    color: #92400e;
}

.boarding-preparation-visa__add {
    align-items: end;
}

.boarding-preparation-visa__add-action {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.boarding-preparation-visa-follow-up-panel__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.boarding-preparation-visa-follow-up-panel__hint {
    margin: 0;
    flex: 1 1 16rem;
}

.boarding-preparation-visa-follow-up-panel__status {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.boarding-preparation-visa-follow-up-panel__option {
    margin: 0;
}

.boarding-preparation-visa-follow-up-panel__clear {
    padding: 0;
    font-size: 0.875rem;
}

.boarding-preparation-visa-follow-up-panel__auto-check,
.boarding-preparation-visa-follow-up-panel__details {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.boarding-track-dot {
    flex: 0 0 auto;
    width: 0.75rem;
    height: 0.75rem;
    margin-top: 0.2rem;
    border-radius: 50%;
    box-shadow:
        inset 0 -1px 3px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.85);
}

.boarding-track-dot--green {
    background: radial-gradient(circle at 35% 35%, #86efac, #16a34a 65%, #15803d);
}

.boarding-track-dot--red {
    background: radial-gradient(circle at 35% 35%, #fca5a5, #dc2626 65%, #b91c1c);
}

.boarding-preparation-visa-follow-up-table td {
    vertical-align: middle;
}

.boarding-preparation-follow-up-detail__visa {
    margin-top: 1rem;
}

.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;
}

.boarding-preparation-flight-follow-up__summary {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    list-style: none;
    user-select: none;
}

.boarding-preparation-flight-follow-up__summary::-webkit-details-marker {
    display: none;
}

.boarding-preparation-flight-follow-up__summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.2rem;
    color: #64748b;
    transition: transform 0.15s ease;
}

.boarding-preparation-flight-follow-up[open] > .boarding-preparation-flight-follow-up__summary::before {
    transform: rotate(90deg);
}

.boarding-preparation-flight-follow-up__content {
    margin-top: 0.85rem;
}

.boarding-preparation-flight-follow-up__inline {
    margin-top: 1rem;
}

.boarding-preparation-flight-mode {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    background: #f9fafb;
}

.boarding-preparation-flight-mode__option {
    display: inline-flex;
    align-items: center;
    margin-right: 1.25rem;
}

.boarding-preparation-flight-mode__hint {
    margin: 0.65rem 0 0;
    font-size: 0.875rem;
}

.boarding-preparation-manual-flight-follow-up {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color, #e5e7eb);
}

.boarding-preparation-manual-flight--embedded {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.boarding-preparation-manual-flight__title,
.boarding-preparation-manual-flight__subtitle {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.boarding-preparation-manual-flight__hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
}

.boarding-preparation-manual-flight__body {
    display: grid;
    gap: 1rem;
}

.boarding-preparation-manual-flight__row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .boarding-preparation-manual-flight__row--split {
        grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
        align-items: start;
    }
}

.boarding-preparation-manual-flight__status,
.boarding-preparation-manual-flight__ticket-block {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    background: #f9fafb;
}

.boarding-preparation-manual-flight__status legend,
.boarding-preparation-manual-flight__ticket-block legend {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 0.25rem;
}

.boarding-preparation-manual-flight__status-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.boarding-preparation-manual-flight__option {
    margin: 0;
}

.boarding-preparation-manual-flight__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;
}

.boarding-preparation-manual-flight__upload {
    position: relative;
}

.boarding-preparation-manual-flight__upload .pelican-btn.is-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.boarding-preparation-manual-flight__upload .pelican-btn {
    cursor: pointer;
}

.boarding-preparation-manual-flight__ticket-hint {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
}

.boarding-preparation-manual-flight__ticket {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.boarding-preparation-manual-flight .flight-request-global-summary {
    margin-top: 0;
    margin-bottom: 1rem;
}

.boarding-preparation-collapsible-section__summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
}

.boarding-preparation-collapsible-section__heading {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.boarding-preparation-collapsible-section__summary .boarding-track-light {
    flex-shrink: 0;
    min-width: 0;
    flex-direction: row;
    gap: 0;
}

.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: 0.85rem;
    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.45rem 0.75rem 0.55rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #1f2937;
    overflow-x: auto;
    word-break: break-word;
}

.flight-mail-message__body pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
    line-height: 1.35;
}

.flight-mail-message__body p,
.flight-mail-message__body div,
.flight-mail-message__body li,
.flight-mail-message__body blockquote {
    line-height: 1.35 !important;
}

.flight-mail-message__body p,
.flight-mail-message__body div:not([class]) {
    margin: 0 0 0.55rem !important;
}

.flight-mail-message__body p:last-child,
.flight-mail-message__body div:last-child {
    margin-bottom: 0 !important;
}

.flight-mail-message__body blockquote {
    margin: 0.35rem 0 0 !important;
    padding-left: 0.65rem !important;
}

.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-seaman-ticket-draft__header h4 {
    margin: 0 0 0.25rem;
}

.flight-seaman-ticket-draft__preview {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    overflow: hidden;
}

.flight-seaman-ticket-draft__preview-frame {
    display: block;
    width: 100%;
    min-height: 12rem;
    border: 0;
    background: #fff;
}

.flight-seaman-ticket-draft__attachments-hint {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.flight-seaman-ticket-draft__attachment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flight-seaman-ticket-draft__attachment-option {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #fff;
}

.flight-seaman-ticket-draft__attachment-option.is-selected {
    border-color: var(--pelican-primary, #2563eb);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.flight-seaman-ticket-draft__attachment-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.flight-seaman-ticket-draft__attachment-input {
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.flight-seaman-ticket-draft__attachment-choice {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flight-seaman-ticket-draft__attachment-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
}

.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-mail-message__footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.55rem 0.75rem 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.flight-mail-reply-compose {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #fff;
}

.flight-mail-reply-compose--inline {
    max-width: 88%;
    align-self: flex-start;
}

.flight-mail-reply-compose__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.flight-mail-reply-compose__header h4 {
    margin: 0;
    font-size: 1rem;
}

.flight-mail-reply-compose__message {
    min-height: 8rem;
    resize: vertical;
}

.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-wrap {
    position: relative;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    max-width: 100%;
}

.company-experience-table-wrap--past {
    overflow: auto;
    max-height: min(32rem, calc(100vh - 16rem));
}

.company-experience-table__loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2.5rem;
    background: rgba(255, 255, 255, 0.78);
    pointer-events: all;
}

.company-experience-table-wrap--past .company-experience-table__loading-overlay {
    align-items: center;
    padding-top: 0;
}

.company-experience-table__loading-overlay .pelican-loading {
    position: sticky;
    top: max(1rem, 20vh);
}

.company-experience-table-wrap--past .company-experience-table__loading-overlay .pelican-loading {
    position: static;
}

.company-experience-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.company-experience-table th,
.company-experience-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-experience-table th {
    background: #f1f5f9;
    color: #0b3d6e;
    font-weight: 700;
    text-align: left;
}

.company-experience-table th:nth-child(1),
.company-experience-table td:nth-child(1) {
    position: static;
    width: 3.25rem;
}

.company-experience-table th:nth-child(5),
.company-experience-table td:nth-child(5),
.company-experience-table th:nth-child(6),
.company-experience-table td:nth-child(6) {
    width: 5.5rem;
}

.company-experience-table th:nth-child(7),
.company-experience-table td:nth-child(7) {
    width: 3.25rem;
    text-align: center;
    white-space: nowrap;
}

.company-experience-table__actions {
    width: 7rem;
    overflow: visible;
    white-space: nowrap;
    text-align: right;
    padding-right: 0.35rem;
}

.previous-experience-table-wrap {
    position: relative;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    max-width: 100%;
}

.previous-experience-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.previous-experience-table th,
.previous-experience-table td {
    padding: 0.3rem 0.35rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.previous-experience-table th {
    background: #f1f5f9;
    color: #0b3d6e;
    font-weight: 700;
    text-align: left;
    white-space: normal;
    line-height: 1.15;
    font-size: 0.75rem;
}

.previous-experience-table__date {
    width: 1%;
    white-space: nowrap;
}

.previous-experience-table__doc {
    width: 1%;
    white-space: nowrap;
    overflow: visible;
}

.previous-experience-table__empty {
    color: #64748b;
    text-align: center;
    padding: 1rem;
}

.previous-experience-table .pelican-field {
    margin: 0;
    min-width: 0;
}

.previous-experience-table .pelican-field__control {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.2rem 0.3rem;
    font-size: 0.75rem;
    box-sizing: border-box;
}

.previous-experience-table__date .pelican-field__control {
    width: auto;
    min-width: 6.75rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.8125rem;
}

.previous-experience-table__doc .company-experience-doc-actions {
    flex-wrap: wrap;
    gap: 0.2rem;
}

.previous-experience-table__doc .pelican-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.6875rem;
    min-width: 0;
}

.previous-experience-table__doc .pelican-btn__label {
    white-space: normal;
    line-height: 1.1;
}

.previous-experience-table__actions,
.previous-experience-table__actions-header {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    overflow: visible;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.application-documents-table-wrap {
    position: relative;
    margin: 0.5rem 0 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow-x: auto;
    max-width: 100%;
}

.application-documents-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.application-documents-table th,
.application-documents-table td {
    padding: 0.9rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.application-documents-table thead th {
    vertical-align: middle;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.application-documents-table th {
    background: #f1f5f9;
    color: #0b3d6e;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    font-size: 0.75rem;
}

.application-documents-table__label {
    font-weight: 600;
    color: #0b3d6e;
    min-width: 11rem;
    line-height: 1.45;
}

.application-documents-table__status {
    width: 1%;
    white-space: nowrap;
}

.application-documents-table__status-header {
    width: 1%;
    white-space: nowrap;
}

.application-documents-table__actions-header {
    width: 13rem;
    min-width: 13rem;
}

.application-documents-table__badge {
    display: inline-block;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.3;
}

.application-documents-table__badge--present {
    background: #dcfce7;
    color: #166534;
}

.application-documents-table__badge--missing {
    background: #fee2e2;
    color: #b91c1c;
}

.application-documents-table__badge--tool {
    background: #e0e7ff;
    color: #3730a3;
}

.application-documents-table__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 13rem;
    min-width: 13rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.application-documents-table__actions .company-experience-doc-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
}

.application-documents-table__actions .company-experience-doc-actions--import-only {
    width: 100%;
}

.application-documents-table__actions .pelican-btn,
.application-documents-table__actions .company-experience-doc-actions__replace {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
    min-height: 2rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.application-documents-table__actions .pelican-btn__label {
    white-space: normal;
    line-height: 1.25;
    text-align: center;
}

.application-documents-preview-modal.pelican-modal__panel {
    width: min(56rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.application-documents-preview-modal .pelican-modal__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.application-documents-preview-modal .my-seaman-doc-preview {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    align-items: stretch;
    margin-top: 0;
    gap: 0;
}

.application-documents-preview-modal .my-seaman-doc-preview__pdf-wrap,
.application-documents-preview-modal .my-seaman-doc-preview__link {
    width: 100%;
    max-width: none;
}

.application-documents-preview-modal .my-seaman-doc-preview__pdf {
    width: 100%;
    max-width: none;
    height: min(75vh, 52rem);
    min-height: min(75vh, 52rem);
}

.application-documents-preview-modal .my-seaman-doc-preview__image {
    display: block;
    width: 100%;
    max-width: none;
    max-height: min(75vh, 52rem);
    height: auto;
    object-fit: contain;
}

.application-documents-preview-modal .my-seaman-doc-preview__pdf-placeholder {
    width: 100%;
    max-width: none;
    min-height: min(75vh, 52rem);
}

.company-experience-table__row--current {
    background: #eff6ff;
}

.company-experience-table__row--clickable {
    cursor: pointer;
}

.company-experience-table__row--clickable:hover {
    background: #f8fafc;
}

.company-experience-table__row--navigating {
    opacity: 0.65;
}

.company-experience-details-page-header__seaman-meta {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.company-experience-details-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
    align-items: start;
}

.company-experience-details-grid--boarding-extension {
    gap: 0.75rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.company-experience-details-grid > .company-experience-boarding-section,
.company-experience-details-grid > .company-experience-extension-section,
.company-experience-details-grid > .company-experience-complaint-section,
.company-experience-details-grid > .company-experience-training-section {
    margin-top: 0;
}

.company-experience-boarding-extension-panel {
    margin-top: 1rem;
}

.company-experience-boarding-extension-panel > .boarding-preparation-flight-follow-up__summary.customer-form-section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.company-experience-boarding-extension-panel .company-experience-details-grid {
    margin-top: 0;
}

@media (max-width: 960px) {
    .company-experience-details-grid {
        grid-template-columns: 1fr;
    }
}

.company-experience-contract-section {
    margin-top: 1rem;
}

.company-experience-contract-section.boarding-preparation-flight-follow-up > .boarding-preparation-flight-follow-up__summary.customer-form-section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.company-experience-contract-section__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .company-experience-contract-section__body {
        grid-template-columns: 1fr;
    }
}

.company-experience-contract-section__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.company-experience-contract-section__hint {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.company-experience-contract-section__dates,
.company-experience-contract-section__duration-hint {
    grid-column: 1 / -1;
    max-width: none;
}

.company-experience-contract-dates {
    grid-template-columns: minmax(13rem, 1.1fr) minmax(13rem, 1.1fr) minmax(18rem, 2.2fr);
}

.company-experience-contract-dates__group {
    min-width: 0;
    overflow: hidden;
}

.company-experience-contract-dates__label,
.company-experience-contract-dates .pelican-field .form-label {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-experience-contract-dates__termination {
    color: #b91c1c;
    font-weight: 600;
}

.company-experience-contract-section__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.company-experience-ready-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 600;
}

.company-experience-legacy-panel {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.company-experience-legacy-panel__title {
    margin: 0 0 0.75rem;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.company-experience-details-grid--boarding-extension > .company-experience-extension-section {
    padding-left: 1rem;
    border-left: 1px solid #e2e8f0;
}

@media (max-width: 960px) {
    .company-experience-details-grid--boarding-extension > .company-experience-extension-section {
        padding-left: 0;
        padding-top: 1rem;
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
}

.company-experience-legacy-panel__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.65rem;
}

.company-experience-legacy-panel__row:last-child {
    margin-bottom: 0;
}

.company-experience-legacy-panel__field {
    flex: 0 1 auto;
    min-width: 0;
}

.company-experience-legacy-panel__field--date {
    flex: 0 1 9.5rem;
    max-width: 9.5rem;
}

.company-experience-legacy-panel__field--duration {
    flex: 0 1 7.5rem;
    max-width: 7.5rem;
}

.company-experience-legacy-panel__field--checkbox {
    flex: 0 1 auto;
}

.company-experience-legacy-panel__field .pelican-field .form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
}

.company-experience-legacy-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-left: auto;
}

.company-experience-legacy-panel__actions--start {
    margin-left: 0;
}

.company-experience-legacy-doc-actions,
.company-experience-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.company-experience-legacy-doc-actions__file-input,
.company-experience-doc-actions__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;
}

.company-experience-legacy-doc-actions__uploading,
.company-experience-doc-actions__uploading {
    font-size: 0.75rem;
    color: #64748b;
}

.company-experience-legacy-doc-actions__error,
.company-experience-doc-actions__error {
    flex-basis: 100%;
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
}

.company-experience-doc-actions__replace {
    cursor: pointer;
}

@media (max-width: 960px) {
    .company-experience-legacy-panel__actions {
        margin-left: 0;
        flex-basis: 100%;
    }
}

.company-experience-signing-off-panel {
    margin-top: 1rem;
}

.company-experience-signing-off-panel > .boarding-preparation-flight-follow-up__summary.customer-form-section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.company-experience-signing-off-section__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

@media (max-width: 960px) {
    .company-experience-signing-off-section__body {
        grid-template-columns: 1fr;
    }
}

.company-experience-signing-off-section__fields {
    min-width: 0;
}

.company-experience-signing-off-section__reason {
    flex: 1 1 12rem;
    min-width: 10rem;
}

.company-experience-signing-off-section__promotion-row {
    align-items: flex-end;
}

.company-experience-signing-off-section__promotion-rank {
    flex: 1 1 12rem;
    min-width: 10rem;
}

.company-experience-signing-off-section__full-width {
    width: 100%;
}

.company-experience-signing-off-section__promotion-result {
    margin-bottom: 0.65rem;
}

.company-experience-signing-off-section__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-width: 12.5rem;
    padding-top: calc(0.8125rem * 1.25 + 0.2rem);
}

.company-experience-signing-off-section__actions > .pelican-btn,
.company-experience-signing-off-section__actions > .company-experience-doc-actions {
    width: 100%;
}

.company-experience-doc-actions--import-only {
    display: block;
}

.company-experience-doc-actions--block .company-experience-doc-actions__replace {
    width: 100%;
    justify-content: center;
}

.company-experience-doc-actions--block .company-experience-doc-actions__error {
    width: 100%;
}

.company-experience-promotion-result {
    margin: 0;
    font-weight: 600;
}

.company-experience-promotion-result--promoted {
    color: #166534;
}

.company-experience-promotion-result--rejected {
    color: #b91c1c;
}

.company-experience-illness-placeholder {
    margin-top: 1rem;
    background: #eff6ff;
    border: 1px solid #93c5fd;
}

.company-experience-illness-placeholder__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #1e40af;
}

.company-experience-extension-section {
    margin-top: 0;
}

.company-experience-illness-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #045fb4;
    color: #fff;
    border-radius: 0.375rem;
}

.company-experience-illness-section__title {
    margin: 0 0 1rem;
    color: #fff;
}

.company-experience-illness-section__extensions {
    margin-top: 1.5rem;
}

.company-experience-illness-section__extensions-title {
    margin: 0 0 0.75rem;
    color: #fff;
}

.company-experience-illness-extensions-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.company-experience-illness-extensions-table th,
.company-experience-illness-extensions-table td {
    padding: 0.5rem;
    vertical-align: top;
}

.company-experience-illness-section__comment {
    grid-column: 1 / -1;
}

.company-experience-illness-section__add-extension {
    margin-top: 0.5rem;
}

.company-experience-complaint-panel {
    margin-top: 0;
}

.company-experience-complaint-panel > .boarding-preparation-flight-follow-up__summary.customer-form-section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.company-experience-complaint-section__form {
    max-width: 32rem;
}

.company-experience-complaint-section__full-width {
    width: 100%;
    margin-bottom: 0.65rem;
}

.company-experience-complaint-section__full-width:last-of-type {
    margin-bottom: 0;
}

.company-experience-complaint-section__full-width .pelican-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.company-experience-training-panel {
    margin-top: 0;
}

.company-experience-training-panel > .boarding-preparation-flight-follow-up__summary.customer-form-section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.company-experience-training-section__layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 31rem;
}

.company-experience-training-section__select {
    width: 100%;
    min-height: 6.25rem;
}

.company-experience-training-section__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-experience-training-section__hint {
    margin: 0;
    font-size: 0.8125rem;
}

.company-experience-logs-section {
    margin-top: 1.5rem;
    font-size: 0.75rem;
}

.company-experience-logs-section .customer-form-section-title {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
}

.company-experience-logs-section.panel {
    padding: 0.7rem 0.8rem;
}

.seaman-child-card .company-experience-logs-section {
    margin-top: 0.85rem;
    box-shadow: none;
}

.company-experience-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.company-experience-logs-table th,
.company-experience-logs-table td {
    padding: 0.28rem 0.4rem;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #edf1f6;
}

.company-experience-logs-table th {
    font-weight: 650;
    color: #475569;
    white-space: nowrap;
}

.company-experience-logs-table__year td {
    padding: 0.35rem 0.4rem;
    background: #eef3f8;
    border-bottom: 1px solid #d7e2ee;
}

.company-experience-logs-table__year-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0.15rem 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
}

.company-experience-logs-table__year-label {
    color: #0b3d6e;
    font-size: 0.82rem;
    font-weight: 700;
}

.company-experience-logs-table__year-count {
    margin-left: 0.35rem;
    color: #64748b;
    font-weight: 600;
}

.company-experience-logs-table__year-btn:hover .seaman-coc-toggle {
    text-decoration: underline;
}

.company-experience-logs-table__type {
    width: 1.6rem;
    padding-right: 0.15rem;
    text-align: center;
}

.company-experience-logs-table__icon {
    display: inline-flex;
    width: 0.95rem;
    height: 0.95rem;
    vertical-align: middle;
}

.company-experience-logs-table__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.company-experience-logs-table__icon--insert {
    color: #0d7a3e;
}

.company-experience-logs-table__icon--update {
    color: #1565c0;
}

.company-experience-logs-table__icon--delete {
    color: #b42318;
}

.company-experience-logs-table__icon--unknown {
    color: #64748b;
}

.company-experience-logs-table__date {
    white-space: nowrap;
}

.company-experience-logs-table__value {
    max-width: 8.5rem;
    word-break: break-word;
}

.company-experience-logs-table__value--new {
    color: #0b3d6e;
    font-weight: 600;
}

.company-experience-logs-table__command {
    width: 2.4rem;
    text-align: center;
    white-space: nowrap;
}

.company-experience-logs-table__command-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #0b3d6e;
    cursor: pointer;
}

.company-experience-logs-table__command-btn svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.company-experience-logs-table__command-btn:hover,
.company-experience-logs-table__command-btn:focus-visible {
    background: #e8eef5;
    color: #082a4d;
}

.company-experience-logs-command-modal {
    width: min(36rem, calc(100vw - 2rem));
}

.company-experience-logs-command-modal__sql {
    margin: 0;
    padding: 0.75rem 0.85rem;
    max-height: min(18rem, 50vh);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.company-experience-print-section {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.company-experience-print-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-experience-print-section__hint {
    margin-top: 0.75rem;
}

.company-experience-delete-modal__summary {
    margin: 0.75rem 0 1rem;
    padding-left: 1.25rem;
}

.company-experience-contract-dates__readonly {
    color: #b91c1c;
    font-weight: 600;
    text-align: center;
}

.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: top;
}

.boarding-track-light {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    text-align: center;
    min-width: 6.5rem;
    padding: 0.35rem 0.5rem;
    box-sizing: border-box;
}

.boarding-track-light--clickable {
    border: 0;
    background: transparent;
    margin: 0;
    border-radius: 0.5rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.boarding-track-light--clickable:hover {
    background: var(--surface-muted, #f3f4f6);
}

.boarding-track-light--clickable:focus-visible {
    outline: 2px solid var(--focus-ring, #2563eb);
    outline-offset: 2px;
}

.boarding-track-light__dot {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    flex-shrink: 0;
    display: block;
    border-radius: 50%;
    box-sizing: border-box;
    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--orange {
    background: radial-gradient(circle at 35% 35%, #fdba74, #ea580c 65%, #c2410c);
}

.boarding-track-light__dot--red {
    background: radial-gradient(circle at 35% 35%, #fca5a5, #dc2626 65%, #b91c1c);
}

.boarding-track-light__dot--gray {
    background: radial-gradient(circle at 35% 35%, #e2e8f0, #94a3b8 65%, #64748b);
}

.boarding-track-light__label {
    font-size: 0.72rem;
    line-height: 1.25;
    color: #64748b;
    max-width: 7rem;
    min-height: 2.6em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.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-toolbar {
    margin: 0 0 0.75rem;
}

.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 var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    background: #f9fafb;
}

.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;
    align-items: center;
    margin-top: 1.25rem;
}

.pelican-modal__actions--split {
    justify-content: space-between;
}

.pelican-modal__actions-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.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;
}

.kpi-monthly-indicators-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-main:has(.kpi-monthly-page) {
    max-width: none;
}

.kpi-monthly-page {
    width: 100%;
}

.kpi-monthly-detail {
    margin-top: 1rem;
    width: 100%;
}

.kpi-monthly-detail .kpi-indicator-detail {
    width: 100%;
}

.kpi-monthly-detail .kpi-indicator-detail__table-wrap {
    width: 100%;
}

.kpi-monthly-filters-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.kpi-monthly-filters-dirty {
    margin: 0;
}

.kpi-monthly-filters__locked-client {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d5dee8;
    border-radius: 6px;
    background: #f8fafc;
    font-weight: 600;
    color: #0b3d6e;
}

.kpi-monthly-indicator {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: min(100%, 12rem);
}

.kpi-indicator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 9.5rem;
    min-height: 9.5rem;
    padding: 1rem;
    border: 1px solid #d5dee8;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.kpi-indicator-card:hover:not(:disabled),
.kpi-indicator-card:focus-visible {
    border-color: #1a4f8b;
    box-shadow: 0 4px 14px rgba(11, 61, 110, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.kpi-indicator-card--expanded {
    border-color: #1a4f8b;
    box-shadow: 0 0 0 2px rgba(26, 79, 139, 0.15);
}

.kpi-indicator-card--selected {
    border-color: #1a4f8b;
    box-shadow: 0 0 0 2px rgba(26, 79, 139, 0.15);
}

.kpi-monthly-detail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.kpi-monthly-detail__header .kpi-indicator-detail__title {
    margin: 0;
}

.kpi-indicator-card--warn .kpi-indicator-card__value {
    color: #b45309;
}

.kpi-indicator-card--ok .kpi-indicator-card__value {
    color: #15803d;
}

.kpi-indicator-card:disabled {
    cursor: wait;
    opacity: 0.75;
}

.kpi-indicator-card__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #0b3d6e;
}

.kpi-indicator-card__value--amount {
    font-size: 1.35rem;
    line-height: 1.15;
    text-align: center;
    word-break: break-word;
}

.kpi-indicator-card--payroll {
    width: 11rem;
    min-height: 10.5rem;
}

.kpi-indicator-card__payroll-values {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.kpi-indicator-card__payroll-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.kpi-indicator-card__payroll-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.1;
}

.kpi-monthly-detail__totals-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.kpi-monthly-detail__totals-row .kpi-monthly-detail__total {
    margin: 0;
}

.kpi-monthly-detail__view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.kpi-monthly-detail__view-tab {
    padding: 0.4rem 0.85rem;
    border: 1px solid #d5dee8;
    border-radius: 999px;
    background: #fff;
    color: #0b3d6e;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.kpi-monthly-detail__view-tab:hover,
.kpi-monthly-detail__view-tab:focus-visible {
    border-color: #1a4f8b;
    outline: none;
}

.kpi-monthly-detail__view-tab--active {
    border-color: #1a4f8b;
    background: #1a4f8b;
    color: #fff;
}

.kpi-monthly-detail__total {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #0b3d6e;
}

.kpi-indicator-card__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0b3d6e;
    text-align: center;
}

.kpi-indicator-card__hint {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.kpi-indicator-card__variation {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0f766e;
    text-align: center;
    line-height: 1.2;
}

.kpi-indicator-card__variation--neg {
    color: #c65911;
}

.kpi-indicator-detail {
    width: 100%;
}

.kpi-indicator-detail__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0b3d6e;
}

.kpi-indicator-detail__table-wrap {
    overflow-x: auto;
}

.kpi-indicator-detail__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    line-height: 1.25;
}

.kpi-indicator-detail__table th,
.kpi-indicator-detail__table td {
    padding: 0.28rem 0.45rem;
    border: 1px solid #d5dee8;
    text-align: left;
    white-space: nowrap;
}

.kpi-indicator-detail__table th.kpi-indicator-detail__name-cell,
.kpi-indicator-detail__table td.kpi-indicator-detail__name-cell {
    white-space: normal;
    min-width: 6.5rem;
    max-width: 11rem;
}

.kpi-indicator-detail__table th {
    background: #f1f5f9;
    color: #0b3d6e;
    font-weight: 600;
}

.kpi-indicator-detail__row--clickable {
    cursor: pointer;
}

.kpi-indicator-detail__row--clickable:hover td {
    background: #f8fafc;
}

.kpi-indicator-detail__seaman-link {
    color: #1a4f8b;
    font-weight: 600;
    text-decoration: none;
}

.kpi-indicator-detail__seaman-link:hover {
    text-decoration: underline;
}

.kpi-indicator-detail__sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.kpi-indicator-detail__sort-button:hover {
    color: #1a4f8b;
}

.kpi-indicator-detail__sort-indicator {
    font-size: 0.62rem;
    line-height: 1;
}

.kpi-indicator-detail__table-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
}

.kpi-indicator-detail__table-columns .kpi-indicator-detail__table-wrap {
    min-width: 0;
}

.kpi-indicator-detail__table-columns--compact {
    gap: 0.4rem;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table-wrap {
    overflow-x: hidden;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table {
    font-size: 0.68rem;
    table-layout: fixed;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th,
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td {
    padding: 0.18rem 0.28rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th {
    font-size: 0.62rem;
    line-height: 1.15;
    white-space: normal;
    vertical-align: bottom;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th.kpi-indicator-detail__name-cell,
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td.kpi-indicator-detail__name-cell {
    min-width: 0;
    max-width: none;
    white-space: nowrap;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__sort-button {
    gap: 0.12rem;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__sort-indicator {
    font-size: 0.55rem;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__seaman-link {
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(1),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(1) {
    width: 6%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(2),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(2) {
    width: 9%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(3),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(3) {
    width: 24%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(4),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(4) {
    width: 17%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(5),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(5) {
    width: 17%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(6),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(6) {
    width: 14%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table th:nth-child(7),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table td:nth-child(7) {
    width: 13%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 th:nth-child(1),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 td:nth-child(1) {
    width: 8%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 th:nth-child(2),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 td:nth-child(2) {
    width: 12%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 th:nth-child(3),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 td:nth-child(3) {
    width: 34%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 th:nth-child(4),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 td:nth-child(4) {
    width: 24%;
}

.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 th:nth-child(5),
.kpi-indicator-detail__table-columns--compact .kpi-indicator-detail__table--cols-5 td:nth-child(5) {
    width: 22%;
}

.kpi-monthly-indicator__error {
    margin: 0;
}

.kpi-overstay-days--yellow {
    background-color: #fef9c3;
    color: #854d0e;
    font-weight: 600;
}

.kpi-overstay-days--orange {
    background-color: #ffedd5;
    color: #c2410c;
    font-weight: 600;
}

.kpi-overstay-days--red {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

.app-main:has(.kpi-dashboard-page) {
    max-width: none;
}

.kpi-dashboard-page {
    width: 100%;
    max-width: 76rem;
    margin-inline: auto;
}

.kpi-dashboard-page > h1 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.kpi-dashboard-page .kpi-monthly-filters.panel {
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem 1rem;
}

.kpi-dashboard-page .kpi-monthly-filters .customer-form-section-title {
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
}

.kpi-dashboard-report {
    margin-top: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.kpi-dashboard-report--rolling {
    margin-top: 0.85rem;
}

.kpi-dashboard-kpis--rolling {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-dashboard-kpis--contracts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-dashboard-kpi--contracts {
    background: #e8f4fc;
}

.kpi-dashboard-kpi--duration {
    background: #e8f8ef;
}

.kpi-dashboard-kpi--fidelity {
    background: #fef9e7;
}

.kpi-dashboard-kpi--onboard {
    background: #e8f8ef;
}

.kpi-dashboard-kpi--unique {
    background: #f1f5f9;
}

.kpi-dashboard-report__header--secondary {
    margin-top: 0.85rem;
}

.kpi-dashboard-report__title--secondary {
    font-size: 0.95rem;
}

.kpi-dashboard-tables--single {
    grid-template-columns: 1fr;
}

.kpi-dashboard-tables--contracts-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    position: relative;
    gap: 0.65rem;
}

.kpi-dashboard-contracts-left {
    grid-column: 1;
    grid-row: 1;
    position: absolute;
    inset: 0 auto 0 0;
    width: calc((100% - 0.65rem) / 2);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.kpi-dashboard-contracts-left > .kpi-dashboard-table-panel--rank-fill {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
}

.kpi-dashboard-contracts-left > .kpi-dashboard-table-panel--rank-fill .kpi-dashboard-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.kpi-dashboard-contracts-left > .kpi-dashboard-table-panel--embarked-trend {
    flex: 0 0 auto;
    max-height: none;
}

.kpi-dashboard-contracts-right {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
}

.kpi-dashboard-contracts-right > .kpi-dashboard-table-panel {
    max-height: none;
    flex: 0 0 auto;
}

.kpi-dashboard-table-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 100%;
}

.kpi-dashboard-table-panel--rank-fill {
    max-height: none;
    height: 100%;
}

.kpi-dashboard-table-panel--rank-fill .kpi-dashboard-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    max-height: none;
}

.kpi-dashboard-table-stack .kpi-dashboard-table-panel {
    max-height: none;
    flex: 1 1 auto;
}

.kpi-dashboard-table-panel--embarked-trend {
    max-height: none;
}

.kpi-dashboard-table-panel--embarked-trend .kpi-embarked-trend-chart {
    width: 100%;
}

.kpi-embarked-trend-chart {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    gap: 0.1rem 0.35rem;
    padding: 0.3rem 0.45rem 0.15rem;
    min-height: 9.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.kpi-embarked-trend-chart--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.kpi-embarked-trend-chart__axis-title {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 700;
    color: #0b3d6e;
    letter-spacing: 0.02em;
}

.kpi-embarked-trend-chart__axis-title--y {
    grid-column: 1;
    grid-row: 2;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    justify-self: center;
    align-self: center;
    white-space: nowrap;
}

.kpi-embarked-trend-chart__axis-title--x {
    grid-column: 1 / span 2;
    grid-row: 4;
    text-align: center;
}

.kpi-embarked-trend-chart__plot {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem;
    min-height: 6.5rem;
    min-width: 0;
}

.kpi-embarked-trend-chart__chart-area {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 6.5rem;
}

.kpi-embarked-trend-chart__chart-area .kpi-embarked-trend-chart__svg {
    flex: 1 1 auto;
    min-height: 7rem;
}

.kpi-embarked-trend-chart__y-labels {
    position: relative;
    width: 1.65rem;
    min-height: 6.5rem;
}

.kpi-embarked-trend-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.58rem;
    line-height: 1;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kpi-embarked-trend-chart__x-labels {
    position: relative;
    flex: 0 0 auto;
    height: 0.75rem;
}

.kpi-embarked-trend-chart__x-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.48rem;
    line-height: 1;
    color: #64748b;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 2.2rem;
}

.kpi-embarked-trend-chart__svg {
    width: 100%;
    display: block;
}

.kpi-embarked-trend-chart__empty {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-style: italic;
}

.kpi-embarked-trend-chart__grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.kpi-embarked-trend-chart__axis-line {
    stroke: #64748b;
    stroke-width: 1.25;
}

.kpi-embarked-trend-chart__line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.25;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.kpi-embarked-trend-chart__point {
    fill: #2563eb;
    stroke: #fff;
    stroke-width: 1.5;
    cursor: pointer;
    transition: fill 0.12s ease;
}

.kpi-embarked-trend-chart__point:hover {
    fill: #1d4ed8;
}

.kpi-embarked-trend-chart__label {
    font-size: 8px;
    fill: #64748b;
    text-anchor: middle;
}

.kpi-embarked-trend-chart__axis-label {
    font-size: 7px;
    fill: #64748b;
    text-anchor: end;
}

.kpi-embarked-trend-chart__axis-title {
    font-size: 8px;
    fill: #0b3d6e;
    font-weight: 600;
}

.kpi-embarked-trend-chart__axis-title--x {
    text-anchor: middle;
}

.kpi-embarked-trend-chart__tooltip {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    background: #0b3d6e;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(11, 61, 110, 0.28);
    transform: translate(-50%, calc(-100% - 0.45rem));
}

.kpi-embarked-trend-chart__tooltip strong {
    display: block;
    font-weight: 600;
}

.kpi-embarked-trend-chart__tooltip span {
    opacity: 0.92;
}

.kpi-dashboard-table__date-muted {
    color: #94a3b8;
    font-size: 0.78rem;
}

.kpi-dashboard-trend--up {
    color: #166534;
    font-weight: 700;
}

.kpi-dashboard-trend--down {
    color: #166534;
    font-weight: 700;
}

.kpi-dashboard-trend--flat {
    color: #64748b;
    font-weight: 700;
}

.kpi-dashboard-table__bar-cell {
    min-width: 5rem;
    width: 8rem;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.kpi-dashboard-table--monthly-contracts thead th:first-child,
.kpi-dashboard-table--monthly-contracts tbody td:first-child {
    max-width: 5.5rem;
    width: 24%;
}

.kpi-dashboard-table--monthly-contracts thead th:nth-child(2),
.kpi-dashboard-table--monthly-contracts tbody td:nth-child(2) {
    min-width: 4.5rem;
    text-align: center;
}

.kpi-dashboard-table--monthly-contracts thead th.kpi-dashboard-table__num:nth-child(2),
.kpi-dashboard-table--monthly-contracts tbody td.kpi-dashboard-table__num:nth-child(2) {
    text-align: center;
}

.kpi-dashboard-table--monthly-contracts thead th:nth-child(3),
.kpi-dashboard-table--monthly-contracts tbody td:nth-child(3) {
    min-width: 2.75rem;
    width: 2.75rem;
    text-align: center;
}

.kpi-dashboard-table--monthly-contracts thead th.kpi-dashboard-table__num:nth-child(3),
.kpi-dashboard-table--monthly-contracts tbody td.kpi-dashboard-table__num:nth-child(3) {
    text-align: center;
}

.kpi-dashboard-bar-track {
    width: 100%;
    height: 0.65rem;
    border-radius: 0.2rem;
    background: #e8eef4;
    overflow: hidden;
}

.kpi-dashboard-bar {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: 0.2rem;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.kpi-dashboard-table-panel--age-pyramid {
    max-height: none;
}

.kpi-dashboard-table-panel--category-chart,
.kpi-dashboard-table-panel--nationality-chart {
    max-height: none;
}

.kpi-category-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.kpi-category-chart-layout__table {
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #e2e8f0;
}

.kpi-category-chart-layout__table .kpi-dashboard-table-wrap {
    max-height: 17.5rem;
}

.kpi-category-chart-layout__chart {
    min-width: 0;
    min-height: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.kpi-category-pie-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 100%;
    padding: 0.65rem 0.55rem 0.45rem;
}

.kpi-category-pie-chart--disc-only {
    padding: 0.75rem;
}

.kpi-category-pie-chart--disc-only .kpi-category-pie-chart__disc {
    width: min(100%, 11rem);
}

.kpi-share-pie-chart {
    position: relative;
}

.kpi-share-pie-chart__svg {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(11, 61, 110, 0.14);
}

.kpi-share-pie-chart__slice {
    cursor: pointer;
    transition: opacity 0.12s ease;
}

.kpi-share-pie-chart__slice:hover {
    opacity: 0.88;
}

.kpi-share-pie-chart__tooltip {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    background: #0b3d6e;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(11, 61, 110, 0.28);
    transform: translate(-50%, calc(-100% - 0.45rem));
}

.kpi-share-pie-chart__tooltip strong {
    display: block;
    font-weight: 600;
}

.kpi-share-pie-chart__tooltip span {
    opacity: 0.92;
}

.kpi-share-table__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
}

.kpi-share-table__swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 0.12rem;
    flex-shrink: 0;
}

.kpi-share-table__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-category-pie-chart__disc {
    width: min(100%, 8.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(11, 61, 110, 0.14);
}

.kpi-category-pie-chart__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-height: 8.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kpi-category-pie-chart__legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.62rem;
    line-height: 1.2;
    color: #334155;
}

.kpi-category-pie-chart__swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 0.12rem;
    flex-shrink: 0;
}

.kpi-category-pie-chart__legend-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-category-pie-chart__legend-value {
    font-weight: 600;
    color: #0b3d6e;
    white-space: nowrap;
}

.kpi-category-pie-chart__empty {
    flex: 1 1 auto;
    min-height: 8rem;
}

.kpi-age-pyramid-layout {
    --kpi-age-pyramid-head-height: 1.55rem;
    --kpi-age-pyramid-row-height: 1.46rem;
    --kpi-age-pyramid-total-height: 1.55rem;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    align-items: start;
}

.kpi-age-pyramid-layout__table {
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #e2e8f0;
}

.kpi-age-pyramid-layout__table .kpi-dashboard-table-wrap {
    max-height: none;
    overflow: visible;
}

.kpi-age-pyramid-layout__table .kpi-dashboard-table {
    border-collapse: separate;
    border-spacing: 0;
}

.kpi-age-pyramid-layout__table .kpi-dashboard-table thead th {
    position: static;
    height: var(--kpi-age-pyramid-head-height);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    vertical-align: middle;
}

.kpi-age-pyramid-layout__table .kpi-dashboard-table tbody tr:not(.kpi-dashboard-table__total-row) td {
    height: var(--kpi-age-pyramid-row-height);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    vertical-align: middle;
}

.kpi-age-pyramid-layout__table .kpi-dashboard-table__total-row td {
    position: static;
    box-shadow: none;
    height: var(--kpi-age-pyramid-total-height);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    vertical-align: middle;
}

.kpi-age-pyramid-layout__chart {
    min-width: 0;
    min-height: 0;
    padding: 0 0.45rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.kpi-age-pyramid-chart {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}

.kpi-age-pyramid-chart__head-spacer {
    flex: 0 0 auto;
    height: var(--kpi-age-pyramid-head-height);
    box-sizing: border-box;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 0;
}

.kpi-age-pyramid-chart__row {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    align-items: center;
    flex: 0 0 auto;
    height: var(--kpi-age-pyramid-row-height);
    box-sizing: border-box;
    border-bottom: 1px solid #eef2f7;
}

.kpi-age-pyramid-chart__row:nth-child(even) {
    background: transparent;
}

.kpi-age-pyramid-chart__row:nth-child(odd) {
    background: #fafbfc;
}

.kpi-age-pyramid-chart__side {
    display: flex;
    align-items: center;
    height: 100%;
}

.kpi-age-pyramid-chart__side--left {
    justify-content: flex-end;
    padding-right: 0.15rem;
}

.kpi-age-pyramid-chart__side--right {
    justify-content: flex-start;
    padding-left: 0.15rem;
}

.kpi-age-pyramid-chart__axis {
    width: 2px;
    align-self: stretch;
    background: #94a3b8;
    border-radius: 1px;
}

.kpi-age-pyramid-chart__bar {
    display: block;
    height: 0.72rem;
    min-width: 0;
    border-radius: 0.15rem;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

.kpi-age-pyramid-chart__side--left .kpi-age-pyramid-chart__bar {
    background: linear-gradient(270deg, #1d4ed8 0%, #3b82f6 100%);
}

.kpi-age-pyramid-chart__total-spacer {
    flex: 0 0 auto;
    height: var(--kpi-age-pyramid-total-height);
    box-sizing: border-box;
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
}

.kpi-age-pyramid-chart__empty {
    flex: 1 1 auto;
    min-height: 8rem;
}

.kpi-dashboard-table-panel--wide {
    max-height: none;
}

.kpi-dashboard-table__row--missing td {
    color: #94a3b8;
    font-style: italic;
}

.kpi-dashboard-report__header {
    background: linear-gradient(180deg, #0b3d6e 0%, #0a3560 100%);
    color: #fff;
    padding: 0.65rem 1rem;
}

.kpi-dashboard-report__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.25;
}

.kpi-dashboard-report__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    opacity: 0.92;
}

.kpi-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: #fef08a;
    border-top: 1px solid #facc15;
}

.kpi-dashboard-kpis--primary {
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.75rem 0.65rem;
    align-items: stretch;
}

.kpi-dashboard-kpi-slot {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
}

.kpi-dashboard-kpi-slot .kpi-monthly-indicator,
.kpi-dashboard-kpi-slot .kpi-dashboard-band-card {
    width: 100%;
    min-width: 0;
    gap: 0;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card {
    width: 100%;
    min-width: 0;
    min-height: 7.25rem;
    padding: 0.45rem 0.35rem;
    gap: 0.2rem;
    background: #fff;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card--payroll {
    width: 100%;
    min-height: 7.25rem;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card__value {
    font-size: 1.45rem;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card__value--amount {
    font-size: 0.95rem;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card__label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.kpi-dashboard-kpis--primary .kpi-indicator-card__hint {
    font-size: 0.58rem;
}

.kpi-dashboard-kpis--primary .kpi-monthly-indicator__error {
    margin: 0;
    font-size: 0.7rem;
}

.kpi-indicator-card--static {
    cursor: default;
}

.kpi-indicator-card--static:hover,
.kpi-indicator-card--static:focus-visible {
    border-color: #d5dee8;
    box-shadow: none;
    transform: none;
}

.kpi-indicator-card--static:disabled,
.kpi-dashboard-kpis--primary .kpi-indicator-card:disabled:not([aria-busy="true"]) {
    cursor: default;
}

.kpi-dashboard-kpis--workforce .kpi-dashboard-kpi {
    padding: 0.9rem 0.55rem;
    gap: 0.15rem;
}

.kpi-dashboard-kpis--workforce .kpi-dashboard-kpi__label {
    font-size: 0.72rem;
}

.kpi-dashboard-kpis--workforce .kpi-dashboard-kpi__value {
    font-size: 2rem;
}

.kpi-dashboard-kpis--workforce .kpi-dashboard-kpi__hint {
    font-size: 0.7rem;
}

.kpi-dashboard-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-right: 1px solid rgba(11, 61, 110, 0.08);
    min-width: 0;
}

.kpi-dashboard-kpi:last-child {
    border-right: none;
}

.kpi-dashboard-kpi__label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0b3d6e;
    line-height: 1.2;
}

.kpi-dashboard-kpi__value {
    font-size: 1.35rem;
    line-height: 1.1;
    color: #0b3d6e;
}

.kpi-dashboard-kpi__hint {
    font-size: 0.65rem;
    color: #475569;
    line-height: 1.15;
}

.kpi-dashboard-kpi--embarked .kpi-dashboard-kpi__value {
    color: #166534;
}

.kpi-dashboard-kpi--leave .kpi-dashboard-kpi__value {
    color: #b45309;
}

.kpi-dashboard-kpis--primary > .kpi-dashboard-kpi {
    justify-content: center;
}

.kpi-dashboard-kpis--workforce > .kpi-dashboard-kpi {
    justify-content: center;
}

.kpi-dashboard-kpi--interactive {
    width: 100%;
    border: none;
    cursor: pointer;
    font: inherit;
    transition: background-color 0.15s ease;
}

.kpi-dashboard-kpi--interactive:hover:not(:disabled),
.kpi-dashboard-kpi--interactive:focus-visible {
    background: rgba(255, 255, 255, 0.35);
    outline: none;
}

.kpi-dashboard-kpi--interactive:disabled {
    cursor: default;
}

.kpi-dashboard-kpi--selected {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 2px rgba(11, 61, 110, 0.18);
}

.kpi-dashboard-detail {
    margin: 0;
    border-top: none;
    border-radius: 0;
}

.kpi-indicator-card--leave .kpi-indicator-card__value {
    color: #b45309;
}

.kpi-dashboard-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.65rem;
    background: #f1f5f9;
}

.kpi-dashboard-table-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 0.375rem;
    overflow: hidden;
    max-height: 17.5rem;
}

.kpi-dashboard-table-panel__title {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.4rem 0.65rem;
    background: #0b3d6e;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
}

.kpi-dashboard-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.kpi-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    line-height: 1.25;
}

.kpi-dashboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #e2e8f0;
    color: #0b3d6e;
    font-weight: 700;
    text-align: left;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid #cbd5e1;
    white-space: nowrap;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.kpi-dashboard-table tbody td {
    padding: 0.22rem 0.5rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.kpi-dashboard-table tbody tr:nth-child(even):not(.kpi-dashboard-table__total-row) td {
    background: #fafbfc;
}

.kpi-dashboard-table tbody td:first-child {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-dashboard-table__num {
    width: 3.25rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kpi-dashboard-table thead th.kpi-dashboard-table__num {
    width: 3.25rem;
}

.kpi-dashboard-table__col--embarked {
    background: rgba(220, 252, 231, 0.55) !important;
}

.kpi-dashboard-table__col--leave {
    background: rgba(254, 226, 226, 0.55) !important;
}

.kpi-dashboard-table__total-row td {
    position: sticky;
    bottom: 0;
    font-weight: 700;
    background: #f1f5f9 !important;
    border-top: 2px solid #cbd5e1;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    box-shadow: 0 -1px 0 #e2e8f0;
}

.kpi-dashboard-table__empty {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 0.75rem !important;
}

.kpi-dashboard-table__value-strong {
    font-weight: 700;
    color: #0b3d6e;
}

.kpi-dashboard-table__comment {
    font-size: 0.78rem;
    font-style: italic;
    color: #64748b;
}

.kpi-dashboard-table--fidelity tbody td:first-child {
    font-weight: 600;
}

@media (max-width: 1400px) {
    .kpi-dashboard-kpis--primary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(3) {
        border-right: none;
    }

    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(4),
    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(5) {
        border-top: 1px solid rgba(11, 61, 110, 0.08);
    }
}

@media (max-width: 960px) {
    .kpi-dashboard-page {
        max-width: none;
    }

    .kpi-indicator-detail__table-columns {
        grid-template-columns: 1fr;
    }

    .kpi-dashboard-tables {
        grid-template-columns: 1fr;
    }

    .kpi-dashboard-tables--contracts-split {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .kpi-dashboard-contracts-left,
    .kpi-dashboard-contracts-right {
        position: static;
        width: auto;
        inset: auto;
        grid-column: auto;
        grid-row: auto;
    }

    .kpi-dashboard-contracts-left > .kpi-dashboard-table-panel--rank-fill .kpi-dashboard-table-wrap {
        max-height: 15rem;
    }

    .kpi-dashboard-table-panel {
        max-height: 15rem;
    }

    .kpi-age-pyramid-layout {
        grid-template-columns: 1fr;
    }

    .kpi-category-chart-layout {
        grid-template-columns: 1fr;
    }

    .kpi-age-pyramid-layout__table {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .kpi-category-chart-layout__table {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(2n) {
        border-right: none;
    }

    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(3),
    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(4),
    .kpi-dashboard-kpis:not(.kpi-dashboard-kpis--primary) .kpi-dashboard-kpi:nth-child(5) {
        border-top: 1px solid rgba(11, 61, 110, 0.08);
    }

    .kpi-dashboard-kpis--primary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .kpi-dashboard-table-panel {
        max-height: 19rem;
    }
}


/* KPI PMS Direction dashboard */
.kpi-pms-summary-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0 0 1.1rem;
}

.kpi-pms-summary-kpis .kpi-indicator-card__variation {
    font-size: 0.62rem;
}

@media (max-width: 1400px) {
    .kpi-pms-summary-kpis.kpi-dashboard-kpis--primary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .kpi-pms-summary-kpis.kpi-dashboard-kpis--primary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kpi-pms-dashboard-period {
    margin: 0.25rem 0 1rem;
}

.kpi-pms-period-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    margin: 0 0 0.9rem;
}

.kpi-pms-period-bar__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.kpi-pms-period-bar__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.kpi-pms-period-pill {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0b3d6e;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.kpi-pms-period-pill:hover {
    border-color: #0b3d6e;
}

.kpi-pms-period-pill--active {
    background: #0b3d6e;
    border-color: #0b3d6e;
    color: #fff;
}

.kpi-pms-period-bar__manual {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.kpi-pms-period-select {
    min-width: 7.5rem;
    width: auto;
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
}

.kpi-pms-period-bar__arrow {
    color: #64748b;
    font-weight: 600;
}

.kpi-pms-filters-grid {
    grid-template-columns: minmax(12rem, 16rem);
}

.kpi-pms-section {
    margin-bottom: 1.25rem;
}

.kpi-pms-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin: 1rem 0 0.5rem;
}

.kpi-pms-table {
    font-size: 0.82rem;
    white-space: nowrap;
}

.kpi-pms-table th,
.kpi-pms-table td {
    padding: 0.35rem 0.5rem;
}

.kpi-pms-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.kpi-pms-table--recap .kpi-pms-num,
.kpi-pms-table--recap td.kpi-pms-num {
    text-align: center;
}

.kpi-pms-num--total {
    font-weight: 600;
}

.kpi-pms-avg-row {
    background: #f8fafc;
    font-style: italic;
}

.kpi-pms-total-row {
    background: #eef2ff;
    font-weight: 600;
}

.kpi-pms-table--recap thead th {
    font-size: 0.75rem;
    text-align: center;
    vertical-align: bottom;
}

.kpi-pms-recap-cat-header {
    line-height: 1.15;
}

.kpi-pms-recap-cat-header__name,
.kpi-pms-recap-cat-header__code {
    display: block;
}

.kpi-pms-recap-cat-header__code {
    margin-top: 0.15rem;
    font-weight: 700;
    color: #334155;
}

/* Teintes par type client (Recap) — entête groupe + colonne TOTAL */
.kpi-pms-ctype-header {
    font-weight: 700;
    text-align: center;
}

.kpi-pms-ctype-total {
    font-weight: 600;
}

.kpi-pms-ctype--0 {
    --kpi-pms-ctype-bg: #fff2cc;
    --kpi-pms-ctype-bg-strong: #ffe599;
    --kpi-pms-ctype-bg-soft: #fff9e6;
}

.kpi-pms-ctype--1 {
    --kpi-pms-ctype-bg: #cfe2f3;
    --kpi-pms-ctype-bg-strong: #9fc5e8;
    --kpi-pms-ctype-bg-soft: #e8f1fa;
}

.kpi-pms-ctype--2 {
    --kpi-pms-ctype-bg: #d9ead3;
    --kpi-pms-ctype-bg-strong: #b6d7a8;
    --kpi-pms-ctype-bg-soft: #eef6eb;
}

.kpi-pms-ctype--3 {
    --kpi-pms-ctype-bg: #fce5cd;
    --kpi-pms-ctype-bg-strong: #f9cb9c;
    --kpi-pms-ctype-bg-soft: #fef3e6;
}

.kpi-pms-ctype--4 {
    --kpi-pms-ctype-bg: #ead1dc;
    --kpi-pms-ctype-bg-strong: #d5a6bd;
    --kpi-pms-ctype-bg-soft: #f6e8ef;
}

.kpi-pms-ctype--5 {
    --kpi-pms-ctype-bg: #d0e0e3;
    --kpi-pms-ctype-bg-strong: #a2c4c9;
    --kpi-pms-ctype-bg-soft: #e8f1f3;
}

.kpi-pms-ctype--6 {
    --kpi-pms-ctype-bg: #d9d2e9;
    --kpi-pms-ctype-bg-strong: #b4a7d6;
    --kpi-pms-ctype-bg-soft: #ebe7f4;
}

.kpi-pms-ctype--7 {
    --kpi-pms-ctype-bg: #f4cccc;
    --kpi-pms-ctype-bg-strong: #ea9999;
    --kpi-pms-ctype-bg-soft: #fae8e8;
}

.kpi-pms-ctype--x {
    --kpi-pms-ctype-bg: #e8eaed;
    --kpi-pms-ctype-bg-strong: #d0d4da;
    --kpi-pms-ctype-bg-soft: #f3f4f6;
}

.kpi-pms-ctype-header.kpi-pms-ctype,
.kpi-pms-ctype-total.kpi-pms-ctype {
    background: var(--kpi-pms-ctype-bg-strong);
}

.kpi-pms-ctype-sub.kpi-pms-ctype {
    background: var(--kpi-pms-ctype-bg-soft);
}

td.kpi-pms-ctype-total.kpi-pms-ctype {
    background: var(--kpi-pms-ctype-bg);
}

.kpi-pms-cell--clickable.kpi-pms-ctype-total:hover,
.kpi-pms-cell--clickable.kpi-pms-ctype-total:focus-visible {
    filter: brightness(0.95);
    background: var(--kpi-pms-ctype-bg-strong);
}

.kpi-pms-recap-hint {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.kpi-pms-cell--clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.15em;
}

.kpi-pms-cell--clickable:hover,
.kpi-pms-cell--clickable:focus-visible {
    background: #e0f2fe;
    outline: none;
}

.kpi-pms-cell--active {
    background: #bae6fd !important;
    font-weight: 600;
}

.kpi-pms-detail {
    margin-top: 1rem;
}

.kpi-pms-detail-count {
    margin: 0 0 0.5rem;
}

.kpi-pms-posts-chart-panel {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    min-width: 0;
}

.kpi-pms-charts-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.25rem;
    align-items: stretch;
}

.kpi-pms-charts-row .kpi-pms-posts-chart-panel {
    margin: 0;
}

@media (max-width: 1400px) {
    .kpi-pms-charts-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .kpi-pms-charts-row {
        grid-template-columns: 1fr;
    }
}

.kpi-pms-posts-chart-panel__eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #2563eb;
    text-transform: uppercase;
}

.kpi-pms-posts-chart-panel__title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b3d6e;
}

.kpi-pms-posts-chart-panel .kpi-pms-posts-trend-chart {
    width: 100%;
    min-height: 11rem;
    background: #fff;
}

.kpi-pms-posts-trend-chart .kpi-embarked-trend-chart__line {
    stroke-width: 1.15;
}

.kpi-pms-posts-trend-chart .kpi-embarked-trend-chart__point {
    stroke-width: 1;
}

.kpi-pms-stacked-bar-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 12rem;
}

.kpi-pms-stacked-bar-chart--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 11rem;
}

.kpi-pms-stacked-bar-chart__plot {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.4rem;
    min-height: 10rem;
}

.kpi-pms-stacked-bar-chart__y-labels {
    position: relative;
    width: 2.4rem;
}

.kpi-pms-stacked-bar-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1;
}

.kpi-pms-stacked-bar-chart__chart-area {
    position: relative;
    min-height: 10rem;
}

.kpi-pms-stacked-bar-chart__svg {
    width: 100%;
    height: 10rem;
    display: block;
}

.kpi-pms-stacked-bar-chart__grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.kpi-pms-stacked-bar-chart__axis {
    stroke: #94a3b8;
    stroke-width: 1;
}

.kpi-pms-stacked-bar-chart__segment {
    cursor: pointer;
}

.kpi-pms-stacked-bar-chart__segment:hover {
    filter: brightness(1.08);
}

.kpi-pms-stacked-bar-chart__x-labels {
    position: relative;
    height: 2.1rem;
    margin-top: 0.15rem;
}

.kpi-pms-stacked-bar-chart__x-label {
    position: absolute;
    top: 0.2rem;
    transform: translateX(-50%) rotate(-35deg);
    transform-origin: top center;
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.kpi-pms-stacked-bar-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpi-pms-stacked-bar-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #334155;
}

.kpi-pms-stacked-bar-chart__swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.1rem;
    flex: 0 0 auto;
}

.kpi-pms-movements-row {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    margin: 0 0 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .kpi-pms-movements-row {
        grid-template-columns: 1fr;
    }
}

.kpi-pms-movements-charts {
    display: grid;
    grid-template-rows: auto auto;
    gap: 1rem;
    min-width: 0;
}

.kpi-pms-movements-chart-panel {
    margin: 0;
}

.kpi-pms-table--movements .kpi-pms-num {
    text-align: center;
}

.kpi-pms-table--movements thead th {
    text-align: center;
}

.kpi-pms-movements-col--signin {
    background: #c6efce;
}

.kpi-pms-movements-col--signoff {
    background: #fce4d6;
}

.kpi-pms-movements-col--total {
    background: #fff2cc;
}

.kpi-pms-movements-variation-row {
    font-style: italic;
    font-weight: 600;
    background: #f8fafc;
}

.kpi-pms-variation-neg {
    background: #fce4d6 !important;
    color: #c65911;
    font-weight: 600;
}

.kpi-pms-movements-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 12rem;
}

.kpi-pms-movements-chart__plot {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.4rem;
    min-height: 10rem;
}

.kpi-pms-movements-chart__y-labels {
    position: relative;
    width: 2.4rem;
}

.kpi-pms-movements-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1;
}

.kpi-pms-movements-chart__chart-area {
    position: relative;
    min-height: 10rem;
}

.kpi-pms-movements-chart__svg {
    width: 100%;
    height: 10rem;
    display: block;
}

.kpi-pms-movements-chart__grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.kpi-pms-movements-chart__axis {
    stroke: #94a3b8;
    stroke-width: 1;
}

.kpi-pms-movements-chart__line {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.kpi-pms-movements-chart__point {
    stroke: #fff;
    stroke-width: 1;
    cursor: pointer;
}

.kpi-pms-movements-chart__x-labels {
    position: relative;
    height: 2.1rem;
    margin-top: 0.15rem;
}

.kpi-pms-movements-chart__x-label {
    position: absolute;
    top: 0.2rem;
    transform: translateX(-50%) rotate(-35deg);
    transform-origin: top center;
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.kpi-pms-movements-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpi-pms-movements-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #334155;
}

.kpi-pms-movements-chart__swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.1rem;
    flex: 0 0 auto;
}

.kpi-pms-movements-avg-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 12rem;
}

.kpi-pms-movements-avg-chart__plot {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.4rem;
    min-height: 10rem;
}

.kpi-pms-movements-avg-chart__y-labels {
    position: relative;
    width: 2.4rem;
}

.kpi-pms-movements-avg-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1;
}

.kpi-pms-movements-avg-chart__chart-area {
    position: relative;
    min-height: 10rem;
}

.kpi-pms-movements-avg-chart__svg {
    width: 100%;
    height: 10rem;
    display: block;
}

.kpi-pms-movements-avg-chart__grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.kpi-pms-movements-avg-chart__axis {
    stroke: #94a3b8;
    stroke-width: 1;
}

.kpi-pms-movements-avg-chart__bar {
    cursor: pointer;
}

.kpi-pms-movements-avg-chart__bar:hover {
    filter: brightness(1.08);
}

.kpi-pms-movements-avg-chart__x-labels {
    position: relative;
    height: 1.4rem;
    margin-top: 0.2rem;
}

.kpi-pms-movements-avg-chart__x-label {
    position: absolute;
    top: 0.15rem;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.kpi-pms-movements-avg-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpi-pms-movements-avg-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #334155;
}

.kpi-pms-movements-avg-chart__swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.1rem;
    flex: 0 0 auto;
}

.kpi-pms-agents-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

.kpi-pms-agents-chart-panel {
    margin: 0;
    width: 100%;
}

.kpi-pms-agents-chart-panel .kpi-pms-agent-chart__svg {
    height: 14rem;
}

.kpi-pms-table--agents .kpi-pms-num {
    text-align: center;
}

.kpi-pms-table--agents thead th {
    text-align: center;
    vertical-align: bottom;
    font-size: 0.72rem;
}

.kpi-pms-agent-col {
    color: #1e293b;
    font-weight: 600;
    white-space: normal;
    max-width: 6.5rem;
    line-height: 1.15;
}

.kpi-pms-agent-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 13rem;
}

.kpi-pms-agent-chart__plot {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.4rem;
    min-height: 11rem;
}

.kpi-pms-agent-chart__y-labels {
    position: relative;
    width: 2.4rem;
}

.kpi-pms-agent-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1;
}

.kpi-pms-agent-chart__chart-area {
    position: relative;
    min-height: 11rem;
}

.kpi-pms-agent-chart__svg {
    width: 100%;
    height: 11rem;
    display: block;
}

.kpi-pms-agent-chart__grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.kpi-pms-agent-chart__axis {
    stroke: #94a3b8;
    stroke-width: 1;
}

.kpi-pms-agent-chart__bar {
    cursor: pointer;
}

.kpi-pms-agent-chart__bar:hover {
    filter: brightness(1.08);
}

.kpi-pms-agent-chart__x-labels {
    position: relative;
    height: 2.1rem;
    margin-top: 0.15rem;
}

.kpi-pms-agent-chart__x-label {
    position: absolute;
    top: 0.2rem;
    transform: translateX(-50%) rotate(-35deg);
    transform-origin: top center;
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.kpi-pms-agent-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpi-pms-agent-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    color: #334155;
}

.kpi-pms-agent-chart__swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 0.1rem;
    flex: 0 0 auto;
}

.kpi-pms-amount-section {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.kpi-pms-amount-chart-panel {
    margin: 0;
    position: sticky;
    top: 0.75rem;
}

.kpi-pms-amount-chart-panel .kpi-pms-amount-chart__svg {
    height: 15rem;
}

.kpi-pms-amount-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 14rem;
}

.kpi-pms-amount-chart--empty {
    min-height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-pms-amount-chart__plot {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 0.25rem;
    align-items: stretch;
    min-height: 12rem;
}

.kpi-pms-amount-chart__y-labels {
    position: relative;
}

.kpi-pms-amount-chart__y-label {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.kpi-pms-amount-chart__chart-area {
    position: relative;
    min-width: 0;
}

.kpi-pms-amount-chart__svg {
    width: 100%;
    height: 12.5rem;
    display: block;
}

.kpi-pms-amount-chart__grid {
    stroke: #e2e8f0;
    stroke-width: 0.6;
}

.kpi-pms-amount-chart__zero {
    stroke: #94a3b8;
    stroke-width: 0.9;
}

.kpi-pms-amount-chart__axis {
    stroke: #94a3b8;
    stroke-width: 0.8;
}

.kpi-pms-amount-chart__bar {
    opacity: 0.92;
}

.kpi-pms-amount-chart__bar:hover {
    opacity: 1;
}

.kpi-pms-amount-chart__total-line {
    stroke: #385723;
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.kpi-pms-amount-chart__total-dot {
    fill: #385723;
    cursor: pointer;
}

.kpi-pms-amount-chart__x-labels {
    position: relative;
    height: 1.3rem;
    margin-top: 0.15rem;
}

.kpi-pms-amount-chart__x-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.58rem;
    color: #64748b;
    white-space: nowrap;
}

.kpi-pms-amount-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kpi-pms-amount-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    color: #334155;
}

.kpi-pms-amount-chart__swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 0.1rem;
    flex: 0 0 auto;
}

.kpi-pms-amount-chart__swatch--line {
    height: 0.18rem;
    width: 0.9rem;
    border-radius: 0;
    background: #385723;
}

@media (max-width: 1100px) {
    .kpi-pms-amount-section {
        grid-template-columns: 1fr;
    }

    .kpi-pms-amount-chart-panel {
        position: static;
    }
}
