* {
    box-sizing: border-box;
}

body {

    margin: 0;

    background: #0f172a;

    font-family: Arial, sans-serif;

    color: white;

    overflow-x: hidden;
}



/* ======================================
   APP
====================================== */

.app-container {

    display: flex;

    height: 100vh;
}



/* ======================================
   MOBILE HEADER
====================================== */

.mobile-header {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    padding: 16px;

    background: #111827;

    border-bottom: 1px solid #334155;

    gap: 12px;
}

.mobile-title {

    font-size: 20px;

    font-weight: bold;

    white-space: nowrap;
}

.mobile-aircraft {

    width: 180px;
}


/* ======================================
   TABLE PANEL
====================================== */

.table-panel {

    width: 60%;

    padding: 16px;

    overflow-y: auto;
}

.table-card {

    background: #1e293b;

    border-radius: 12px;

    overflow: hidden;
}



/* ======================================
   SIDE PANEL
====================================== */

.side-panel {

    width: 40%;

    padding: 16px;

    background: #111827;

    overflow-y: auto;
}



/* ======================================
   HEADER
====================================== */

.header {

    background: #2563eb;

    padding: 16px;

    text-align: center;

    font-weight: bold;

    font-size: 18px;
}



/* ======================================
   TABLE
====================================== */

table {

    width: 100%;

    border-collapse: collapse;
}

thead {

    background: #334155;

    position: sticky;

    top: 0;

    z-index: 10;
}

th {

    padding: 14px 10px;

    font-size: 14px;
}

td {

    border-bottom: 1px solid #334155;

    padding: 8px;
}

.item-name {

    font-size: 13px;

    font-weight: bold;

    white-space: nowrap;
}



/* ======================================
   INPUTS
====================================== */

input {

    width: 100%;

    background: #0f172a;

    border: 1px solid #475569;

    color: white;

    padding: 10px;

    border-radius: 8px;

    text-align: center;

    font-size: 15px;
}

select {

    width: 100%;

    background: #0f172a;

    border: 1px solid #475569;

    color: white;

    padding: 10px;

    border-radius: 8px;

    font-size: 15px;
}



/* ======================================
   TOTAL ROW
====================================== */

.total-row {

    background: #1d4ed8;

    font-weight: bold;
}



/* ======================================
   CARDS
====================================== */

.summary-card,
.graph-card {

    background: #1e293b;

    border-radius: 12px;

    padding: 16px;

    margin-bottom: 16px;
}

.summary-title {

    font-size: 18px;

    font-weight: bold;

    margin-bottom: 20px;
}

.summary-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 0;

    border-bottom: 1px solid #334155;
}



/* ======================================
   STATUS
====================================== */

#cg-status.valid {

    color: #22c55e;
}

#cg-status.invalid {

    color: #ef4444;
}



/* ======================================
   GRAPH
====================================== */

#cg-graph {

    width: 100%;

    height: 500px;
}



/* ======================================
   MOBILE
====================================== */

@media (max-width: 900px) {

    .app-container {

        flex-direction: column;

        height: auto;
    }

.mobile-header {

    flex-direction: column;

    align-items: stretch;

 
}

    .mobile-title {

        font-size: 20px;

        font-weight: bold;

        text-align: center;
    }

    .table-panel {

        width: 100%;

        padding: 12px;
    }

    .side-panel {

        width: 100%;

        padding: 12px;
    }

    .header {

        display: none;
    }

    table {

        min-width: 700px;
    }

    .table-card {

        overflow-x: auto;
    }

    input {

        min-width: 80px;
    }

    #cg-graph {

        height: 350px;
    }
    .pax-grid {

    grid-template-columns: 1fr;
}
.pax-control-card {

    max-height: 280px;

    overflow-y: auto;
}
.pax-control-card::-webkit-scrollbar {

    width: 6px;
}

.pax-control-card::-webkit-scrollbar-thumb {

    background: #475569;

    border-radius: 10px;
}
}


.pax-control-card {

    background: #1e293b;

    padding: 14px;

    border-radius: 12px;

    margin-bottom: 14px;
}

.pax-control-title {

    font-size: 16px;

    font-weight: bold;

    margin-bottom: 16px;
}

.pax-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));

    gap: 10px;

    margin-bottom: 12px;
}


.pax-field {

    display: flex;

    flex-direction: column;
}

.pax-field label {

    margin-bottom: 6px;

    font-size: 12px;

    font-weight: bold;
}

.pax-field input,
.pax-field select {

    width: 140px;

    height: 42px;
}

.pax-buttons {

    display: flex;

    gap: 10px;

    margin-top: 8px;
}
.pax-buttons button {

    background: #2563eb;

    border: none;

    color: white;

    padding: 10px 16px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;

    white-space: nowrap;
}

.pax-buttons button:hover {

    background: #1d4ed8;
}


#btn-open-stations {

    background: #2563eb;

    border: none;

    color: white;

    padding: 10px 14px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;
}

#btn-open-layout:hover {

    background: #1d4ed8;
}

.payload-row {

    background: rgba(34, 197, 94, 0.12);
}

.payload-row:hover {

    background: rgba(34, 197, 94, 0.20);
}




/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    /*
    SWEET ALERT
    */

    .swal2-popup {

        width: 98vw !important;

        padding: 10px !important;
    }



   


  
}

  /*
    ASSENTOS
    */

    .seat {

        cursor: pointer;
    }

.seat-label {

    fill: white;

    font-size: 18px;

    font-family: Arial;

    font-weight: bold;

    text-anchor: middle;

    dominant-baseline: middle;

    pointer-events: none;
}

.cargo {

    fill: #334155;

    stroke: #64748b;

    stroke-width: 2;

    cursor: pointer;

    transition: .2s;
}


.cargo-loaded {

    fill: #22c55e;
}

.cargo-label {

    fill: white;

    font-size: 18px;

    font-weight: bold;

    pointer-events: none;
}

.cargo-weight {

    fill: white;

    font-size: 14px;

    pointer-events: none;
}

#app-version {

    font-size: 11px;

    color: #94a3b8;

    margin-left: 6px;

    font-weight: normal;
}

.btn-update {

    margin-left: 8px;

    background: transparent;

    border: none;

    color: #94a3b8;

    cursor: pointer;

    font-size: 14px;

    transition: .2s;
}

.btn-update:hover {

    color: #ffffff;

    transform: rotate(90deg);
}
/* =========================================
   LIMITS
========================================= */

.limit-normal {

    background: rgba(34, 197, 94, 0.12);

    border-left: 4px solid #22c55e;
}



.limit-warning {

    background: rgba(234, 179, 8, 0.12);

    border-left: 4px solid #eab308;
}



.limit-exceeded {

    background: rgba(239, 68, 68, 0.12);

    border-left: 4px solid #ef4444;
}

/*
CONTAINER
*/

#cabin-layout-container {


    width: 100%;
    height: calc(100vh - 120px);

    overflow: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0f172a;
}

/*
SVG CABIN
*/

#cabin-layout-container svg {

    /*
    TAMANHO BASE
    */

    width: 500px;

    height: auto;

    /*
    ZOOM REAL
    */

    transform: scale(1.7);

    transform-origin: center center;

    transition: 0.2s ease;

    flex-shrink: 0;

    /*
    IMPORTANTE
    */

    margin: 250px;
}

/*
MOBILE
*/

@media (max-width: 768px) {

    #cabin-layout-container svg {

        width: 500px;

        height: auto;

        transform:

            rotate(270deg)

            scale(1.5);

        transform-origin: center center;

        /*
        ÁREA EXTRA PARA
        NÃO CORTAR
        */

        margin: 350px;
    }
}



.cabin-toolbar {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    padding: 10px 15px;

    flex-wrap: wrap;
}

/*
DESKTOP
*/

@media (min-width: 769px) {

    .cabin-toolbar {

        justify-content: flex-start;
    }
}

/*
MOBILE
*/

@media (max-width: 768px) {

    .cabin-toolbar {

        justify-content: center;

        align-items: center;

        width: 100%;
    }

    .fuel-control {

        width: 120px;
    }
}

.fuel-control {

    display: flex;

    

    gap: 4px;

    padding: 10px;

    background: #1e293b;

    border: 1px solid #334155;

    border-radius: 10px;
}

.fuel-control label {

    color: white;

    font-size: 12px;

    font-weight: 600;
}

.fuel-control input {

    width: 110px;

    padding: 8px;

    border-radius: 6px;

    border: 1px solid #475569;

    background: #0f172a;

    color: white;
}
.toolbar-btn {

    background: #1e293b;

    color: white;

    border: 1px solid #334155;

    padding: 6px 10px;

    border-radius: 10px;

    cursor: pointer;

    font-size: 13px;

    transition: 0.2s;

}

.toolbar-btn:hover {

    background: #334155;
}

.toolbar-btn.active {

    background: #2563eb;

    border-color: #3b82f6;
}


/* ACCORDION ADVANCED STATION */

.wb-accordion {

    width: 90%;

    margin: 15px auto 30px auto;

    border-radius: 12px;


    background: #16213a;
}

.wb-accordion-header {

    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 14px 18px;

    background: #1e293b;

    color: #fff;

    border: none;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;
}

.wb-accordion-content {

    max-height: 0;

    

    transition: max-height .3s ease;
}

.wb-accordion-content.open {

    max-height: 1200px;
}

@media (max-width: 768px) {

    .wb-accordion {

        width: 95%;
    }

    .table-wrapper {

        -webkit-overflow-scrolling: touch;
    }

    #wb-table {

        min-width: 750px;
    }
}

/*
TABELA
*/

.table-wrapper {

    width: 100%;

    overflow-x: auto;
}

#wb-table {

    width: 100%;

    min-width: 650px;
}

.wb-accordion-header:hover {

    background: #24324b;
}

.wb-accordion-content {

    max-height: 0;

    overflow-y: auto;

    transition: max-height .3s ease;
}

.wb-accordion-content.open {

    max-height: 2200px;
}

#wb-table {

    width: 100%;
}




.app-menu {

    position: sticky;

    top: 0;

    z-index: 1000;

    display: flex;

    flex-wrap: nowrap;

    overflow-x: auto;

    gap: 10px;

    width: 100%;

    margin-bottom: 20px;

    margin-top: 20px;

    align-items: center;

    background: var(--card-bg);

    padding: 10px 0;
}

.app-menu-btn {

    flex: 1 0 170px;

    width: auto;

    padding: 16px;

    border: none;

    border-radius: 12px;

    background: #1e293b;

    color: white;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;
}

.app-menu-btn.active {

    background: #2563eb;
}

.app-menu-btn:hover {

    background: #3e578d;
}

.aircraft-warning {

    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 400px;

    font-size: 1.2rem;

    font-weight: 600;

    color: #f59e0b;

    border: 2px dashed #f59e0b;

    border-radius: 12px;

    background: rgba(
        245,
        158,
        11,
        0.08
    );
}

.additional-crew-card {
    background: #1e293b;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    min-width: 0;
}

.additional-crew-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
}

.additional-crew-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#btn-edit-additional-crew {
    padding: 5px 9px;
    border: 1px solid #64748b;
    border-radius: 6px;
    background: #334155;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.additional-crew-options {
    display: grid;
    gap: 8px;
}

.additional-crew-option {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
}

.additional-crew-option:hover {
    background: rgba(71, 85, 105, 0.45);
}

.additional-crew-switch {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.additional-crew-switch-control {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #475569;
    transition: background-color 160ms ease;
}

.additional-crew-switch-control::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f8fafc;
    content: '';
    transition: transform 160ms ease;
}

.additional-crew-switch:checked + .additional-crew-switch-control {
    background: #dc2626;
}

.additional-crew-switch:checked + .additional-crew-switch-control::after {
    transform: translateX(14px);
}

.additional-crew-switch:focus-visible + .additional-crew-switch-control {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.additional-crew-option-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.additional-crew-station-value {
    color: #fca5a5;
    font-weight: 600;
}

.additional-crew-swal-row {
    display: grid;
    grid-template-columns: minmax(155px, 1fr) auto minmax(110px, 1fr) minmax(110px, 1fr) 82px;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    text-align: left;
}

.additional-crew-swal-row select,
.additional-crew-swal-row input[type="number"] {
    min-width: 0;
    padding: 8px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #334155;
    color: #fff;
}

@media (max-width: 700px) {
    .additional-crew-card {
        padding: 12px;
    }

    .additional-crew-header {
        align-items: flex-start;
    }

    #btn-edit-additional-crew {
        min-height: 36px;
        padding-inline: 12px;
    }

    .additional-crew-option {
        min-height: 44px;
        padding: 8px;
    }

    .additional-crew-swal-row {
        grid-template-columns: 1fr 1fr;
    }

    .additional-crew-swal-row strong {
        grid-column: 1 / -1;
    }
}

.additional-crew-editor {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #475569;
    border-radius: 10px;
    background: #1e293b;
}

.additional-crew-editor h3 {
    margin: 0 0 12px;
    font-size: 14px;
}

.additional-crew-editor-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(120px, 1fr) minmax(120px, 1fr) 90px;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.additional-crew-editor-row select,
.additional-crew-editor-row input[type="number"] {
    min-width: 0;
    padding: 8px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #334155;
    color: #fff;
}

@media (max-width: 700px) {
    .additional-crew-editor-row {
        grid-template-columns: 1fr 1fr;
    }

    .additional-crew-editor-row strong {
        grid-column: 1 / -1;
    }
}

.aircraft-selection-notice {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 24px;
    border: 1px dashed #64748b;
    border-radius: 10px;
    color: #cbd5e1;
    text-align: center;
}

.sync-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #475569;
    border-radius: 12px;
    background: #1e293b;
    color: #e2e8f0;
    font: 700 .68rem/1.2 system-ui, sans-serif;
}

.sync-status button {
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid #64748b;
    border-radius: 6px;
    background: #334155;
    color: #f8fafc;
    font: inherit;
    cursor: pointer;
}

.sync-status button:hover { background: #475569; }

.efb-transfer-mode-list {
    display: grid;
    gap: 10px;
    text-align: left;
}

.efb-transfer-mode-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.efb-transfer-mode-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.efb-transfer-mode-control {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid #475569;
    border-radius: 7px;
    background: #25364d;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.efb-transfer-mode-control strong { color: #f8fafc; }
.efb-transfer-mode-control small { color: #b9c9dd; line-height: 1.35; }

.efb-transfer-mode-option input:checked + .efb-transfer-mode-control {
    border-color: #8b7cf6;
    background: #2f3f5a;
    box-shadow: 0 0 0 2px rgba(139, 124, 246, .2);
}

.efb-transfer-mode-option input:focus-visible + .efb-transfer-mode-control {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.offline-import-preview .efb-transfer-warning {
    display: block;
    margin-top: 10px;
}

.sync-member {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border-left: 4px solid #94a3b8;
    border-radius: 5px;
    background: #f8fafc;
    color: #0f172a;
}

.sync-member small { color: #475569; }
.sync-member--online { border-color: #22c55e; }
.sync-member--inactive { border-color: #f59e0b; }
.sync-member--offline { border-color: #94a3b8; }

.transfer-list {
    display: grid;
    gap: 8px;
    max-height: min(55vh, 420px);
    overflow-y: auto;
    text-align: left;
}

.transfer-item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-left: 4px solid #38bdf8;
    border-radius: 5px;
    background: #f8fafc;
    color: #0f172a;
}

.transfer-item small { color: #475569; }

.transfer-item button {
    justify-self: start;
    margin-top: 4px;
    padding: 5px 8px;
    border: 0;
    border-radius: 4px;
    background: #0f766e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.transfer-preview { text-align: left; line-height: 1.55; }

.swal2-popup.efb-transfer-modal {
    width: min(510px, calc(100vw - 32px));
    padding: 26px 32px 24px;
    border: 1px solid #31445f;
    border-radius: 8px;
    background: #1e2b3e;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .48);
    color: #f8fafc;
}

.efb-transfer-modal .swal2-icon { margin: 0 auto 12px; }
.efb-transfer-modal .swal2-validation-message { background: #392834; color: #fecdd3; }

.efb-transfer-title {
    margin: 0 0 18px;
    color: #f8fafc;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: .035em;
}

.efb-transfer-content {
    margin: 0;
    color: #dbeafe;
    font-size: .92rem;
}

.efb-transfer-form {
    display: grid;
    gap: 9px;
    text-align: left;
}

.efb-transfer-form label {
    margin-top: 5px;
    color: #f8fafc;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
}

.efb-transfer-input,
.efb-transfer-select {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 13px;
    border: 2px solid #86c5ef;
    border-radius: 6px;
    outline: none;
    background: #25364d;
    color: #fff;
    font: 700 1rem/1.2 inherit;
}

.efb-transfer-input:focus,
.efb-transfer-select:focus {
    border-color: #b89cff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .22);
}

.efb-transfer-input--code {
    letter-spacing: .34em;
    text-align: center;
    font-size: 1.38rem;
}

.efb-transfer-modal .swal2-actions {
    width: 100%;
    margin: 26px 0 0;
    gap: 10px;
}

.efb-transfer-button {
    min-width: 100px;
    padding: 10px 16px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font: 800 .86rem/1 inherit;
    cursor: pointer;
}

.efb-transfer-button--primary { background: #7460e8; }
.efb-transfer-button--primary:hover { background: #866ff6; }
.efb-transfer-button--secondary { background: #64748b; }
.efb-transfer-button--secondary:hover { background: #74849b; }

.efb-transfer-result {
    display: grid;
    gap: 8px;
    padding: 8px 0;
}

.efb-transfer-result span,
.efb-transfer-result small { color: #b9c9dd; }
.efb-transfer-result strong { color: #fff; font-size: 2rem; letter-spacing: .16em; }

.efb-transfer-summary {
    display: grid;
    gap: 7px;
    text-align: left;
}

.efb-transfer-summary > strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.02rem;
}

.efb-transfer-summary span {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #c9d8ea;
}

.efb-transfer-summary b { color: #fff; }
.efb-transfer-summary em { margin-top: 8px; color: #a9bdd5; font-size: .8rem; }
.efb-transfer-warning { margin: 7px 0 0; color: #fcd34d; }

.efb-transfer-list {
    display: grid;
    gap: 8px;
    max-height: min(52vh, 390px);
    overflow-y: auto;
    text-align: left;
}

.efb-transfer-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #3c506b;
    border-left: 4px solid #8b5cf6;
    border-radius: 6px;
    background: #25364d;
    color: #f8fafc;
}

.efb-transfer-item span,
.efb-transfer-item small { color: #bfd0e4; }

.efb-transfer-item button {
    justify-self: start;
    margin-top: 5px;
    padding: 7px 9px;
    border: 0;
    border-radius: 4px;
    background: #7460e8;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.efb-transfer-empty { color: #bfd0e4; }

.sync-history-title { margin: 16px 0 6px; font-size: .8rem; }
.sync-history-list { margin: 0; padding-left: 18px; text-align: left; color: #334155; font-size: .78rem; }

.sync-status--offline { color: #facc15; }
.sync-status--local { color: #cbd5e1; }
.sync-status--syncing { color: #38bdf8; }
.sync-status--synced { color: #4ade80; }
.sync-status--conflict,
.sync-status--error { color: #f87171; }

@media (max-width: 560px) {
    .sync-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
    }
    .sync-status button {
        min-height: 44px;
        padding: 9px 6px;
        font-size: .72rem;
    }
    .efb-transfer-mode-control { padding: 12px; }
    .swal2-popup.efb-transfer-modal { padding: 22px 20px 20px; }
    .efb-transfer-button { flex: 1 1 0; }
}
