.ros-fids-board,
.ros-fids-board * {
    box-sizing: border-box;
}

.ros-fids-board {
    --ros-fids-bg: #f3f6f7;
    --ros-fids-surface: #ffffff;
    --ros-fids-surface-alt: #e9f1f2;
    --ros-fids-border: rgba(20, 54, 62, 0.12);
    --ros-fids-text: #2f3339;
    --ros-fids-muted: #6b7280;
    --ros-fids-accent: #397f87;
    --ros-fids-accent-dark: #2f6f77;
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ros-fids-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.35;
    isolation: isolate;
}

.ros-fids-board button {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    box-shadow: none;
}

.ros-fids-board button:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.ros-fids-board__controls {
    padding: 14px 20px 0;
    border-bottom: 0;
    background: #484B64;
    border-radius: 10px 10px 0 0;
}

.ros-fids-board__tabs {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 3px;
    margin: 0;
}

.ros-fids-board__tab {
    min-width: 0;
    padding: 9px 26px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    background: #5a5e7e !important;
    color: #e0e1ed !important;
    font-size: 0.95rem;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

.ros-fids-board__tab.is-active {
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-bottom: none !important;
    background: var(--ros-fids-bg) !important;
    color: #484B64 !important;
    font-weight: 800 !important;
}

.ros-fids-board__status {
    display: none !important;
}

.ros-fids-board__content {
    overflow-x: visible;
    padding: 14px 20px 8px;
    background: var(--ros-fids-bg);
    border-radius: 0 0 0 0;
}

.ros-fids-board__marquee {
    overflow: hidden;
    padding: 7px 0;
    background: #3a3d56;
    border-radius: 0 0 10px 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    margin-bottom: 20px;
}

.ros-fids-board__marquee-inner {
    display: inline-block;
    padding-left: 100%;
    animation: ros-fids-marquee 40s linear infinite;
}

@keyframes ros-fids-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.ros-fids-board__table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 16px !important;
    table-layout: fixed;
    background: transparent !important;
    color: var(--ros-fids-text) !important;
}

.ros-fids-board__table th,
.ros-fids-board__table td {
    height: auto !important;
    padding: 20px 18px !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font: inherit !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.ros-fids-board__head-row th {
    padding: 0 18px 4px !important;
    background: transparent !important;
    color: var(--ros-fids-muted) !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) {
    background: var(--ros-fids-surface) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.11);
}

.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) td:first-child {
    border-bottom-left-radius: 8px;
    border-top-left-radius: 8px;
}

.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) td:last-child {
    border-bottom-right-radius: 8px;
    border-top-right-radius: 8px;
}

/* col order: AEROLINEA, VUELO, ORIGEN, HORA, ESTADO */
.ros-fids-board__head-row > :nth-child(1),
.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(1) { width: 22%; }
.ros-fids-board__head-row > :nth-child(2),
.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(2) { width: 13%; }
.ros-fids-board__head-row > :nth-child(3),
.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(3) { width: 33%; }
.ros-fids-board__head-row > :nth-child(4),
.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(4) { width: 10%; }
.ros-fids-board__head-row > :nth-child(5),
.ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(5) { width: 22%; }

.ros-fids-board__date-row,
.ros-fids-board__date-row td,
.ros-fids-board__head-row {
    background: transparent !important;
    box-shadow: none !important;
}

.ros-fids-board__date-row td {
    padding: 10px 20px !important;
    border-radius: 5px !important;
    background: #484B64 !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.ros-fids-board__airline-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 185px;
    height: 44px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 600;
}

.ros-fids-board__airline-badge img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
}

.ros-fids-board__flight,
.ros-fids-board__time {
    font-variant-numeric: tabular-nums;
}

.ros-fids-board__table td.ros-fids-board__flight,
.ros-fids-board__table td.ros-fids-board__time {
    font-weight: 600 !important;
}


.ros-fids-board__table td.ros-fids-board__time {
    color: var(--ros-fids-accent-dark) !important;
}

.ros-fids-board__location {
    color: var(--ros-fids-text) !important;
}

.ros-fids-board__table td.ros-fids-board__location {
    font-weight: 600 !important;
}

.ros-fids-board__flight-status {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.ros-fids-board__flight-status--scheduled { background: #eef2f7; color: #334155; }
.ros-fids-board__flight-status--on-time { background: #dff5e9; color: #24734b; }
.ros-fids-board__flight-status--delayed { background: #fff1c2; color: #8a5a00; }
.ros-fids-board__flight-status--boarding { background: #dbeafe; color: #1d4ed8; }
.ros-fids-board__flight-status--completed { background: #dff5e9; color: #24734b; }
.ros-fids-board__flight-status--cancelled { background: #fee2e2; color: #b42318; }

.ros-fids-board__empty {
    margin: 0 !important;
    padding: 48px 20px !important;
    color: var(--ros-fids-muted) !important;
    text-align: center;
}

@media (min-width: 769px) and (max-width: 900px) {
    .ros-fids-board__table th,
    .ros-fids-board__table td {
        padding-inline: 10px !important;
    }

    .ros-fids-board__head-row > :nth-child(1),
    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(1) { width: 26%; }
    .ros-fids-board__head-row > :nth-child(2),
    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(2) { width: 14%; }
    .ros-fids-board__head-row > :nth-child(3),
    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(3) { width: 27%; }
    .ros-fids-board__head-row > :nth-child(4),
    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(4) { width: 12%; }
    .ros-fids-board__head-row > :nth-child(5),
    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) > :nth-child(5) { width: 21%; }
}

@media (max-width: 768px) {
    .ros-fids-board {
        border-radius: 0;
        width: calc(100vw - 24px);
    }

    .ros-fids-board__controls {
        padding: 14px 10px;
    }

    .ros-fids-board__tab {
        flex: 1 1 50%;
        padding-inline: 10px;
        text-align: center;
    }

    .ros-fids-board__status {
        min-height: 44px;
        margin-bottom: 12px;
        padding-inline: 12px;
        font-size: 0.9rem;
        text-align: center;
    }

    .ros-fids-board__table,
    .ros-fids-board__table tbody,
    .ros-fids-board__table tr,
    .ros-fids-board__table td {
        display: block !important;
        width: 100% !important;
    }

    .ros-fids-board__table tbody {
        padding: 0;
    }

    /* Higher specificity than .ros-fids-board__table tr { display:block !important } (0,1,1) */
    .ros-fids-board__table tr.ros-fids-board__head-row {
        display: none !important;
    }

    .ros-fids-board__table tbody tr:not(.ros-fids-board__date-row):not(.ros-fids-board__head-row) {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--ros-fids-border);
        border-radius: 8px;
        background: var(--ros-fids-surface) !important;
        box-shadow: 0 6px 15px rgba(15, 23, 42, 0.1);
    }

    .ros-fids-board__table tbody tr:last-child {
        margin-bottom: 0;
    }

    .ros-fids-board__table td {
        min-width: 0;
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--ros-fids-border) !important;
        border-radius: 0 !important;
    }

    /* Per-record labels — small caps above each value */
    .ros-fids-board__table td::before {
        display: block;
        margin-bottom: 2px;
        color: var(--ros-fids-muted);
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .ros-fids-board__date-row {
        display: block !important;
        margin: 4px 0 8px;
        border: 0 !important;
        box-shadow: none !important;
    }

    .ros-fids-board__date-row td {
        display: block !important;
        padding: 10px 20px !important;
    }

    .ros-fids-board__date-row td::before {
        display: none !important;
    }

    /* Card layout: badge full-width top → vuelo | hora → destino → status */

    .ros-fids-board__airline {
        grid-column: 1 / -1;
        grid-row: 1;
        display: flex !important;
        padding: 0 !important;
    }

    .ros-fids-board__airline::before {
        display: none !important;
    }

    .ros-fids-board__airline-badge {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
        height: 54px;
        border: 0 !important;
        border-radius: 7px 7px 0 0 !important;
    }

    .ros-fids-board__table td.ros-fids-board__flight {
        grid-column: 1;
        grid-row: 2;
    }

    .ros-fids-board__table td.ros-fids-board__time {
        grid-column: 2;
        grid-row: 2;
        border-left: 1px solid var(--ros-fids-border) !important;
    }

    .ros-fids-board__status-cell {
        grid-column: 1;
        grid-row: 3;
        border-bottom: 0 !important;
    }

    .ros-fids-board__location {
        grid-column: 2;
        grid-row: 3;
        border-bottom: 0 !important;
    }

    .ros-fids-board__table td.ros-fids-board__location {
        border-left: 1px solid var(--ros-fids-border) !important;
    }

    .ros-fids-board__table td.ros-fids-board__time {
        color: var(--ros-fids-text) !important;
    }

    .ros-fids-board__status-cell::before {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ros-fids-board *,
    .ros-fids-board *::before,
    .ros-fids-board *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
