/*
 * SHARED LIST SYSTEM
 * Presentation only: business permissions and contextual actions remain
 * controlled by each Yii view/controller.
 */
.can-list-page {
    --list-primary: #1769e0;
    --list-primary-dark: #0b3975;
    --list-surface: #ffffff;
    --list-soft: #f4f8fd;
    --list-border: #d9e4f1;
    --list-text: #10233f;
    --list-muted: #687c98;
    padding: clamp(16px, 2vw, 24px) !important;
    background: #f4f7fb !important;
    min-height: 100vh;
}

.can-list-page > .container-fluid {
    width: 100%;
    max-width: 1680px !important;
    margin-inline: auto;
    padding-inline: 0 !important;
}

/* SHARED LIST HEADER: one visual rhythm for every AO, MRO and Admin list. */
.can-list-page .page-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 96px;
    margin-bottom: 20px !important;
    padding: 20px 24px !important;
    border: 1px solid var(--list-border) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #fff 0%, #eef5ff 100%) !important;
    box-shadow: 0 12px 30px rgba(18, 52, 92, .07) !important;
}

.can-list-page .header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.can-list-page .header-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #087bbd;
    background: #e7f5ff;
    font-size: 22px;
}

.can-list-page .dash-title {
    margin: 0 0 4px !important;
    color: var(--list-text) !important;
    font-size: clamp(22px, 2vw, 28px) !important;
    line-height: 1.2;
}

.can-list-page .subtitle-text {
    color: var(--list-muted) !important;
    font-size: 13px;
    line-height: 1.45;
}

/* SHARED LIST SEARCH: identical hierarchy and control sizing. */
.can-list-page .search-filter-card {
    margin-bottom: 18px !important;
    padding: 14px 16px !important;
    border: 1px solid var(--list-border) !important;
    border-radius: 16px !important;
    background: var(--list-surface) !important;
    box-shadow: 0 8px 22px rgba(18, 52, 92, .05) !important;
}

.can-list-page .search-filter-form {
    display: flex;
    align-items: center;
    gap: 10px !important;
}

.can-list-page .search-input-wrap {
    position: relative;
    flex: 1 1 360px;
    min-width: 180px;
}

.can-list-page .search-input-wrap > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #68819f;
    pointer-events: none;
}

.can-list-page .search-input {
    width: 100%;
    min-height: 42px !important;
    padding-left: 42px !important;
    border: 1px solid #cbd9ea !important;
    border-radius: 11px !important;
    color: var(--list-text);
    background: #fff;
}

.can-list-page .search-input:focus {
    border-color: #5ca5ff !important;
    box-shadow: 0 0 0 3px rgba(37, 125, 236, .12) !important;
}

/*
 * FILTRE PRIORITY : largeur compacte sur ordinateur et icône cohérente avec les
 * badges. Le select reste natif pour conserver clavier, lecteur d'écran et mobile.
 */
.can-list-page .priority-filter-wrap {
    position: relative;
    flex: 0 0 190px;
}

.can-list-page .priority-filter-wrap > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #53708f;
    pointer-events: none;
}

.can-list-page .priority-filter-select {
    min-height: 42px;
    padding: 8px 34px 8px 39px;
    border: 1px solid #cbd9ea;
    border-radius: 11px;
    color: #263f5d;
    background-color: #fff;
    font-size: 12px;
}

.can-list-page .priority-filter-select:focus {
    border-color: #5ca5ff;
    box-shadow: 0 0 0 3px rgba(37, 125, 236, .12);
}

.can-list-page .active-priority-filter {
    display: inline-flex;
    gap: 4px;
    margin-left: 12px;
}

.can-list-page .btn-search,
.can-list-page .btn-reset {
    min-height: 42px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 17px !important;
    border-radius: 10px !important;
    font-weight: 750 !important;
    white-space: nowrap;
}

/* SHARED LIST TABLE: common container, density and interaction feedback. */
.can-list-page .content-card {
    overflow: hidden;
    padding: 16px !important;
    border: 1px solid var(--list-border) !important;
    border-radius: 18px !important;
    background: var(--list-surface) !important;
    box-shadow: 0 10px 28px rgba(18, 52, 92, .06) !important;
}

.can-list-page .table-responsive-custom {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e0e8f2 !important;
    border-radius: 13px !important;
    scrollbar-width: thin;
    scrollbar-color: #9bb4d2 transparent;
}

.can-list-page table {
    width: 100%;
    margin: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

.can-list-page thead th {
    padding: 13px 12px !important;
    border-bottom: 1px solid #d5e0ec !important;
    color: #324966 !important;
    background: #edf3f9 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.can-list-page tbody td {
    padding: 13px 12px !important;
    border-bottom: 1px solid #e2e9f2 !important;
    color: var(--list-text);
    vertical-align: middle !important;
}

.can-list-page tbody tr:last-child td {
    border-bottom: 0 !important;
}

.can-list-page tbody tr:not(.empty-row) {
    transition: background-color .18s ease, box-shadow .18s ease;
}

.can-list-page tbody tr:not(.empty-row):hover td {
    background: #f7fbff !important;
}

/* SHARED LIST ACTIONS: consistent size, spacing and accessible interaction states. */
.can-list-page .action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px !important;
}

.can-list-page .action-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    display: inline-grid !important;
    place-items: center;
    padding: 0 !important;
    border-radius: 9px !important;
    border: 1px solid transparent !important;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}

.can-list-page .action-btn i {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1;
}

.can-list-page .action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 7px 15px rgba(15, 48, 88, .17) !important;
}

.can-list-page .action-btn:focus-visible {
    outline: 3px solid rgba(37, 125, 236, .24);
    outline-offset: 2px;
}

/* SHARED ACTION PALETTE: colors express intent without changing action conditions or URLs. */
.can-list-page .action-btn.btn-view {
    background: #0b8fc7 !important;
    border-color: #0b8fc7 !important;
}

.can-list-page .action-btn.btn-update,
.can-list-page .action-btn.btn-update-request,
.can-list-page .action-btn.btn-reply {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.can-list-page .action-btn.btn-contact {
    background: #53657d !important;
    border-color: #53657d !important;
}

.can-list-page .action-btn.btn-reports,
.can-list-page .action-btn.btn-feedback {
    background: #6554c0 !important;
    border-color: #6554c0 !important;
}

.can-list-page .action-btn.btn-po {
    background: #d97706 !important;
    border-color: #d97706 !important;
}

.can-list-page .action-btn.btn-unban {
    background: #16834a !important;
    border-color: #16834a !important;
}

.can-list-page .action-btn.btn-delete,
.can-list-page .action-btn.btn-ban,
.can-list-page .action-btn.btn-close-dispute {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
}

.can-list-page .action-btn.disabled,
.can-list-page .action-btn:disabled,
.can-list-page .action-btn[aria-disabled="true"] {
    cursor: not-allowed !important;
    opacity: .5 !important;
    transform: none !important;
    box-shadow: none !important;
}

.can-list-page .status-badge,
.can-list-page .message-badge,
.can-list-page .request-badge,
.can-list-page .user-badge,
.can-list-page .cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.2;
    white-space: nowrap;
}

/* SHARED STATUS PALETTE: the same workflow state receives the same visual signal. */
.can-list-page .status-badge.status-created,
.can-list-page .status-badge.status-open {
    color: #075985 !important;
    background: #e0f2fe !important;
    border-color: #bae6fd !important;
}

.can-list-page .status-badge.status-answered,
.can-list-page .status-badge.status-confirmed,
.can-list-page .status-badge.status-work_accepted,
.can-list-page .status-badge.status-resolved {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #bbf7d0 !important;
}

.can-list-page .status-badge.status-po_loaded,
.can-list-page .status-badge.status-waiting_response,
.can-list-page .status-badge.status-waiting-response,
.can-list-page .status-badge.status-pending {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #fde68a !important;
}

.can-list-page .status-badge.status-update_request,
.can-list-page .status-badge.status-update_request_accepted {
    color: #5b21b6 !important;
    background: #ede9fe !important;
    border-color: #ddd6fe !important;
}

.can-list-page .status-badge.status-work_started,
.can-list-page .status-badge.status-report_submitted {
    color: #1e40af !important;
    background: #dbeafe !important;
    border-color: #bfdbfe !important;
}

.can-list-page .status-badge.status-reschedule,
.can-list-page .status-badge.status-rescheduled {
    color: #9a3412 !important;
    background: #ffedd5 !important;
    border-color: #fed7aa !important;
}

.can-list-page .status-badge.status-canceled,
.can-list-page .status-badge.status-cancelled {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fecaca !important;
}

.can-list-page .status-badge.status-closed,
.can-list-page .status-badge.status-default {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* SHARED LIST STATES: consistent empty state and pagination placement. */
.can-list-page .empty-state {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px !important;
    color: var(--list-muted);
    text-align: center;
}

.can-list-page .empty-state-title {
    color: var(--list-text);
    font-size: 17px;
    font-weight: 800;
}

.can-list-page .empty-state-text {
    max-width: 520px;
    color: var(--list-muted);
    line-height: 1.55;
}

.can-list-page .pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px !important;
}

.can-list-page .pagination {
    gap: 6px;
    margin: 0;
}

.can-list-page .pagination a,
.can-list-page .pagination span {
    min-width: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #d4dfec !important;
    border-radius: 9px !important;
    background: #fff;
}

@media (max-width: 767.98px) {
    .can-list-page {
        padding: 14px !important;
    }

    .can-list-page .page-header-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px !important;
    }

    .can-list-page .page-header-card > .btn,
    .can-list-page .page-header-card > a {
        width: 100%;
        justify-content: center;
    }

    .can-list-page .search-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .can-list-page .search-input-wrap {
        flex-basis: auto;
        width: 100%;
    }

    .can-list-page .priority-filter-wrap {
        width: 100%;
        flex-basis: auto;
    }

    .can-list-page .btn-search,
    .can-list-page .btn-reset {
        width: 100%;
    }

    .can-list-page .content-card {
        padding: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .can-list-page *,
    .can-list-page *::before,
    .can-list-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* SHARED REQUEST DETAILS: compact list cell and shared read-only modal. */
.can-list-page .can-request-summary {
    min-width: 230px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
}

.can-list-page .can-request-aircraft {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--list-text);
}

.can-list-page .can-request-aircraft > i {
    color: #087bbd;
    font-size: 17px;
}

.can-list-page .can-request-aircraft span {
    min-width: 0;
    display: grid;
}

.can-list-page .can-request-aircraft .can-request-make,
.can-list-page .can-request-aircraft small {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.can-list-page .can-request-make {
    color: #173d69;
    font-weight: 600;
}

.can-list-page .can-request-aircraft small {
    color: var(--list-muted);
}

/* SHARED REQUEST SUMMARY: serial number stays secondary but remains immediately scannable. */
.can-list-page .can-request-aircraft .can-request-serial {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    color: #62758c;
    font-size: 10px;
    letter-spacing: .015em;
}

.can-list-page .can-request-serial i {
    color: #7c8da1;
    font-size: 10px;
}

/* SHARED OPERATIONAL COLUMNS: location and maintenance window remain easy to scan. */
.can-list-page .can-location-column,
.can-list-page .can-date-column {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 450;
    white-space: nowrap;
}

.can-list-page .can-location-column {
    max-width: 230px;
    overflow: hidden;
    color: #9a5a08;
    background: #fff6e8;
    text-overflow: ellipsis;
}

.can-list-page .can-location-column i { color: #f59e0b; }
.can-list-page .can-date-column.is-eta { color: #145ea8; background: #eaf4ff; }
.can-list-page .can-date-column.is-etd { color: #137253; background: #e8f8f0; }

.can-list-page .can-row-details-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 6px 8px;
    border: 1px solid #bdd5f2;
    border-radius: 999px;
    color: #0d5eb5;
    background: #f2f8ff;
    font-size: 10px;
    font-weight: 550;
    white-space: nowrap;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

/* SHARED PO DISPLAY: availability is information; the orange Actions button owns download. */
.can-list-page .can-po-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 112px;
    padding: 7px 9px;
    border: 1px solid #f4d29a;
    border-radius: 9px;
    color: #9a5205;
    background: #fff7e8;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.15;
}

.can-list-page .can-po-meta > i {
    color: #ea8508;
    font-size: 15px;
}

.can-list-page .can-po-meta > span {
    display: grid;
    gap: 2px;
}

.can-list-page .can-po-meta small {
    color: #8c775e;
    font-size: 9px;
    font-weight: 400;
}

.can-list-page .can-po-meta.is-empty {
    color: #718096;
    border-color: #dce4ed;
    background: #f6f8fb;
}

.can-list-page .can-po-meta.is-empty > i { color: #8da0b5; }

.can-list-page .can-row-details-hint .bi-chevron-right {
    font-size: 9px;
}

/* SHARED ROW INTERACTION: visual affordance makes the row click discoverable. */
.can-list-page tr.can-request-row {
    cursor: pointer;
}

.can-list-page tr.can-request-row:hover .can-row-details-hint,
.can-list-page tr.can-request-row:focus-visible .can-row-details-hint {
    color: #fff;
    border-color: #1674d1;
    background: #1674d1;
}

.can-list-page tr.can-request-row:focus-visible {
    outline: 3px solid rgba(37, 125, 236, .24);
    outline-offset: -3px;
}

.can-list-page .can-parties {
    display: grid;
    gap: 5px;
    min-width: 130px;
    font-size: 11px;
}

.can-list-page .can-parties span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.can-list-page .can-parties strong {
    display: inline-block;
    min-width: 34px;
    color: #087bbd;
}

.can-request-modal .modal-content {
    overflow: hidden;
    border: 1px solid #cfdded;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(7, 31, 61, .22);
}

.can-request-modal .modal-header {
    padding: 18px 20px;
    color: #0c315f;
    background: linear-gradient(135deg, #fff, #edf5ff);
}

.can-request-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 19px;
    font-weight: 650;
}

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

.can-request-item,
.can-request-description {
    padding: 13px;
    border: 1px solid #dce6f1;
    border-radius: 12px;
    background: #f8fbff;
}

.can-request-item {
    position: relative;
    overflow: hidden;
}

.can-request-item::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 3px;
    background: #86a5c7;
    content: "";
}

.can-request-item.is-aircraft::before { background: #0ea5e9; }
.can-request-item.is-registration::before { background: #10b981; }
.can-request-item.is-serial::before { background: #64748b; }
.can-request-item.is-location::before { background: #f59e0b; }
.can-request-item.is-status::before { background: #8b5cf6; }

.can-request-item.is-aircraft small { color: #0378ae; }
.can-request-item.is-registration small { color: #07835d; }
.can-request-item.is-location small { color: #b56808; }
.can-request-item.is-status small { color: #6d3bd1; }

.can-request-item small,
.can-request-description small {
    display: block;
    margin-bottom: 6px;
    color: #657b96;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.can-request-value {
    display: block;
    color: #10233f;
    font-size: 13px;
    font-weight: 450;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* SHARED MAINTENANCE WINDOW: one colored ETA/ETD row keeps timing scannable. */
.can-flight-window {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid #d7e5f3;
    border-radius: 14px;
    background: linear-gradient(90deg, #eef6ff 0%, #fff 49%, #effbf5 100%);
}

.can-flight-date {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.can-flight-date > span:last-child {
    min-width: 0;
    display: grid;
}

.can-flight-date small {
    margin: 0 0 3px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.can-flight-date.is-eta small { color: #1769c2; }
.can-flight-date.is-etd small { color: #16815d; }

.can-flight-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.can-flight-date.is-eta .can-flight-icon {
    color: #1769c2;
    background: #dbeeff;
}

.can-flight-date.is-etd .can-flight-icon {
    color: #16815d;
    background: #d9f7e9;
}

.can-flight-value {
    overflow: hidden;
    color: #15324f;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.can-flight-route {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6888aa;
}

.can-flight-route span {
    flex: 1;
    height: 1px;
    background: #aac0d8;
}

.can-request-description {
    margin-top: 11px;
}

.can-request-description > div {
    min-height: 76px;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    color: #334e6c;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

@media (max-width: 575.98px) {
    .can-request-grid { grid-template-columns: 1fr; }
    .can-list-page .can-request-summary { min-width: 0; }
    .can-list-page .can-row-details-hint span { display: none; }
    .can-flight-window {
        grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
        gap: 5px;
        padding: 10px;
    }
    .can-flight-route span { display: none; }
    .can-flight-icon { display: none; }
    .can-flight-value { font-size: 11px; }
}

/* SHARED RESPONSIVE TABLE: regular rows become readable cards below desktop width. */
@media (max-width: 991.98px) {
    .can-list-page .table-responsive-custom {
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .can-list-page .table-responsive-custom table,
    .can-list-page .table-responsive-custom tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .can-list-page .table-responsive-custom thead {
        display: none !important;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) {
        display: block !important;
        overflow: hidden;
        margin-bottom: 14px !important;
        border: 1px solid #d8e3ef !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 7px 18px rgba(18, 52, 92, .06) !important;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row):last-child {
        margin-bottom: 0 !important;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) > td {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(116px, 34%) minmax(0, 1fr);
        align-items: center !important;
        gap: 12px !important;
        padding: 11px 13px !important;
        border: 0 !important;
        border-bottom: 1px solid #e7edf4 !important;
        white-space: normal !important;
        text-align: left !important;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) > td:last-child {
        border-bottom: 0 !important;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) > td::before {
        align-self: start;
        color: #647790 !important;
        content: attr(data-label) !important;
        font-size: 10px !important;
        font-weight: 650 !important;
        letter-spacing: .045em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) > td > * {
        min-width: 0;
        max-width: 100%;
    }

    .can-list-page .can-request-summary,
    .can-list-page .can-location-column,
    .can-list-page .can-date-column,
    .can-list-page .can-po-meta {
        width: fit-content;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .can-list-page .can-location-column {
        white-space: normal;
    }

    .can-list-page .action-buttons {
        justify-content: flex-start !important;
        width: 100%;
    }

    .can-list-page .empty-row,
    .can-list-page .empty-row > td {
        display: block !important;
        width: 100% !important;
    }

    .can-request-modal .modal-dialog {
        width: auto;
        max-width: calc(100vw - 24px);
        margin: 12px auto;
    }

    .can-request-modal .modal-body {
        padding: 14px;
    }
}

/* SHARED SMALL-SCREEN LAYOUT: preserve readable labels and touch targets. */
@media (max-width: 575.98px) {
    .can-list-page {
        padding: 10px !important;
    }

    .can-list-page .header-title-group {
        align-items: flex-start;
    }

    .can-list-page .header-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 19px;
    }

    .can-list-page .table-responsive-custom tbody tr:not(.empty-row) > td {
        grid-template-columns: minmax(92px, 31%) minmax(0, 1fr);
        gap: 9px !important;
        padding: 10px 11px !important;
    }

    .can-list-page .action-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .can-list-page .pagination {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .can-request-modal .modal-header {
        padding: 14px 15px;
    }

    .can-request-modal .modal-title {
        font-size: 17px;
    }
}

/* SHARED TABLET OVERFLOW: retain native horizontal navigation for dense tables. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .can-list-page .table-responsive-custom {
        overscroll-behavior-inline: contain;
        scrollbar-gutter: stable;
    }
}

/*
 * ALERTE CENTRALE DE CHANGEMENT DE STATUT
 *
 * Ces règles concernent uniquement les SweetAlert importantes produites par la
 * synchronisation des demandes. La largeur, l'icône et les marges sont réduites
 * pour garder le contexte de la liste visible. Le titre, le message et les boutons
 * utilisent une graisse forte afin que le changement métier soit compris rapidement.
 */
.swal2-popup.can-status-swal {
    width: 380px !important;
    max-width: calc(100vw - 28px) !important;
    padding: 15px 18px 14px !important;
    border: 1px solid #dbe7f3 !important;
    border-radius: 15px !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22) !important;
    font-family: inherit !important;
}

/*
 * ICÔNE COMPACTE : la taille reste suffisante pour identifier succès, information
 * ou avertissement, sans occuper le tiers supérieur de la boîte de dialogue.
 * SweetAlert dessine les traits de succès avec des dimensions exprimées en « em ».
 * Réduire seulement le cercle laissait donc la coche à sa taille d'origine : elle
 * débordait sur le titre. La taille de police du conteneur réduit maintenant toute
 * la géométrie interne dans les mêmes proportions que le cercle de 48 pixels.
 */
.swal2-popup.can-status-swal .can-status-swal-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 2px auto 9px !important;
    font-size: 9.6px !important;
    box-sizing: content-box !important;
}

.swal2-popup.can-status-swal .can-status-swal-icon .swal2-icon-content {
    /*
     * CONTENU TEXTUEL DE L'ICÔNE : les symboles information, question et
     * avertissement gardent une taille lisible malgré l'échelle interne ci-dessus.
     */
    font-size: 29px !important;
    font-weight: 800 !important;
}

/*
 * HIÉRARCHIE TYPOGRAPHIQUE : le statut devient l'information principale et le
 * passage de l'ancien au nouveau statut reste lisible sur deux lignes au maximum.
 */
.swal2-popup.can-status-swal .can-status-swal-title {
    padding: 0 8px !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

.swal2-popup.can-status-swal .can-status-swal-message {
    margin: 7px 0 0 !important;
    padding: 0 8px !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
}

/*
 * ACTIONS COURTES ET EXPLICITES : les boutons gardent leurs icônes, disposent
 * d'un espacement régulier et restent assez hauts pour être utilisables au tactile.
 */
.swal2-popup.can-status-swal .can-status-swal-actions {
    gap: 8px !important;
    margin: 14px 0 0 !important;
}

.swal2-popup.can-status-swal .can-status-swal-confirm,
.swal2-popup.can-status-swal .can-status-swal-close {
    min-height: 36px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.swal2-popup.can-status-swal .can-status-swal-confirm {
    background: #2563eb !important;
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22) !important;
}

.swal2-popup.can-status-swal .can-status-swal-close {
    color: #334155 !important;
    background: #e8eef5 !important;
}

.swal2-popup.can-logout-swal .can-status-swal-confirm {
    background: #e63946 !important;
    box-shadow: 0 7px 16px rgba(230, 57, 70, 0.22) !important;
}

.swal2-popup.can-status-swal .can-status-swal-confirm i,
.swal2-popup.can-status-swal .can-status-swal-close i {
    margin-right: 5px;
    font-size: 13px;
}

/*
 * PETITS ÉCRANS : la boîte utilise presque toute la largeur disponible tout en
 * conservant une marge extérieure et des boutons faciles à sélectionner.
 */
@media (max-width: 420px) {
    .swal2-popup.can-status-swal {
        width: 340px !important;
        padding: 14px 13px 13px !important;
    }

    .swal2-popup.can-status-swal .can-status-swal-actions {
        width: 100% !important;
        justify-content: center !important;
    }
}

/*
 * PRIORITÉ OPÉRATIONNELLE : badges réutilisés dans les listes et les détails.
 * Ils restent visuellement distincts des badges de statut afin de préserver la
 * compréhension du workflow métier.
 */
.operational-priority-display {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.operational-priority-badge {
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.operational-priority-badge.priority-aog {
    border-color: #fecaca;
    color: #b42318;
    background: #fff1f2;
}

.operational-priority-badge.priority-urgent {
    border-color: #fde68a;
    color: #a65708;
    background: #fffbeb;
}

.operational-priority-badge.priority-routine {
    border-color: #bae6fd;
    color: #0878ae;
    background: #f0f9ff;
}

.operational-priority-deadline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #61758c;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 500;
}

.operational-priority-deadline.is-overdue {
    color: #c62828;
}

/*
 * AÉROPORT DANS LES LISTES : la colonne reçoit une largeur opérationnelle réelle
 * et peut utiliser deux lignes. On supprime l'ellipse « ... », tout en conservant
 * le défilement horizontal du conteneur sur les écrans réellement trop étroits.
 */
.can-list-page .requests-table td.location-cell {
    width: 230px !important;
    min-width: 210px !important;
    max-width: 260px !important;
    overflow: visible !important;
    white-space: normal !important;
}

.can-list-page .requests-table td.location-cell .location-text {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.can-list-page .requests-table th:nth-last-child(4) {
    min-width: 210px;
}

/*
 * NOTIFICATION LATÉRALE DE STATUT
 *
 * Les changements ordinaires, comme « Answered », restent affichés en haut à
 * droite pour ne pas bloquer le travail. Ce bloc reprend toutefois les arrondis,
 * les couleurs et la hiérarchie de la fenêtre centrale afin que toutes les
 * notifications métier appartiennent clairement au même système visuel.
 */
.swal2-popup.swal2-toast.can-status-toast {
    width: 340px !important;
    max-width: calc(100vw - 24px) !important;
    padding: 14px 15px 13px !important;
    border: 1px solid #cfe3f4 !important;
    border-left: 4px solid #0ea5e9 !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f5faff 100%) !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18) !important;
    font-family: inherit !important;
}

/*
 * ICÔNE DU TOAST : la taille de police réduit également les éléments internes
 * dessinés en « em ». L'icône reste ainsi compacte et ne déforme plus les lignes.
 */
.swal2-popup.swal2-toast.can-status-toast .can-status-toast-icon {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    margin: 1px 11px 0 0 !important;
    font-size: 7.2px !important;
    box-sizing: content-box !important;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-icon .swal2-icon-content {
    font-size: 23px !important;
    font-weight: 800 !important;
}

/*
 * TEXTE DU TOAST : le titre porte le changement principal tandis que le message
 * conserve un contraste plus doux et une largeur suffisante pour rester lisible.
 */
.swal2-popup.swal2-toast.can-status-toast .can-status-toast-title {
    margin: 0 !important;
    padding: 0 24px 0 0 !important;
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-message {
    margin: 6px 0 0 !important;
    padding: 0 24px 0 0 !important;
    color: #52637a !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    text-align: left !important;
}

/*
 * ACTION DU TOAST : le bouton reprend le bleu principal de l'application avec
 * une hauteur courte. La croix demeure indépendante et facilement accessible.
 */
.swal2-popup.swal2-toast.can-status-toast .can-status-toast-actions {
    margin: 11px 0 0 !important;
    justify-content: flex-start !important;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-confirm {
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 13px !important;
    border-radius: 9px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-confirm i {
    margin-right: 5px;
    font-size: 13px;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-close {
    top: 7px !important;
    right: 7px !important;
    width: 30px !important;
    height: 30px !important;
    color: #64748b !important;
    font-size: 24px !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.swal2-popup.swal2-toast.can-status-toast .can-status-toast-close:hover {
    color: #0f172a !important;
    background: #e8f1fa !important;
}

@media (max-width: 420px) {
    /*
     * ADAPTATION MOBILE : le toast utilise la largeur disponible tout en gardant
     * une marge de sécurité avec les bords de l'écran.
     */
    .swal2-popup.swal2-toast.can-status-toast {
        width: calc(100vw - 24px) !important;
    }
}
