*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

:root{
    --blue:#2563eb;
    --blue-dark:#1d4ed8;
    --green:#16a34a;
    --green-light:#dcfce7;
    --red:#dc2626;
    --yellow:#f59e0b;
    --dark:#111827;
    --dark-2:#1f2937;
    --gray:#6b7280;
    --gray-light:#f3f4f6;
    --border:#e5e7eb;
    --white:#ffffff;
}

body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f5f7fb;
    color:#111827;
}

/* =========================================================
   LOGIN
========================================================= */

.login-screen{
    position:fixed;
    inset:0;
    background:linear-gradient(135deg,#111827,#1f2937,#111827);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    z-index:9999;
}

.login-card{
    width:100%;
    max-width:400px;
    background:white;
    border-radius:18px;
    padding:38px 34px;
    box-shadow:0 25px 70px rgba(0,0,0,.35);
}

.login-logo{
    display:block;
    width:160px;
    max-width:100%;
    max-height:80px;
    object-fit:contain;
    margin:0 auto 12px;
}

.login-subtitle{
    text-align:center;
    font-size:11px;
    font-weight:600;
    letter-spacing:0.25em;
    text-transform:uppercase;
    color:#9ca3af;
    margin-bottom:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
}

.login-subtitle::before,
.login-subtitle::after{
    content:"";
    display:inline-block;
    width:28px;
    height:1px;
    background:#e5e7eb;
}

.form-group{
    margin-bottom:18px;
}

.form-group label{
    display:block;
    font-size:13px;
    font-weight:700;
    margin-bottom:7px;
}

.form-group input{
    width:100%;
    padding:13px 14px;
    border:1px solid #d1d5db;
    border-radius:10px;
    outline:none;
    font-size:14px;
}

.form-group input:focus{
    border-color:var(--blue);
    box-shadow:0 0 0 3px rgba(37,99,235,.1);
}

.login-password-wrap{
    position:relative;
}

.login-password-wrap input{
    padding-right:48px;
}

.login-password-toggle{
    position:absolute;
    top:50%;
    right:8px;
    display:grid;
    width:34px;
    height:34px;
    place-items:center;
    transform:translateY(-50%);
    border:0;
    border-radius:7px;
    background:transparent;
    color:#6b7280;
    cursor:pointer;
    touch-action:manipulation;
}

.login-password-toggle:hover{
    background:#f3f4f6;
    color:#374151;
}

.login-password-toggle:focus-visible{
    outline:2px solid var(--blue);
    outline-offset:1px;
}

.login-password-eye{
    width:19px;
    height:19px;
}

.remember{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13px;
    margin-bottom:18px;
}

.btn-primary{
    width:100%;
    border:0;
    background:var(--blue);
    color:white;
    padding:14px;
    border-radius:10px;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

.btn-primary:hover{
    background:var(--blue-dark);
}

.login-error{
    display:none;
    margin-top:15px;
    padding:11px;
    border-radius:8px;
    background:#fee2e2;
    color:#991b1b;
    font-size:13px;
}

.login-links{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin-top:14px;
}

.text-button{
    border:0;
    background:transparent;
    color:var(--blue);
    font:inherit;
    font-size:13px;
    cursor:pointer;
}

.text-button:hover{
    color:var(--blue-dark);
    text-decoration:underline;
}

.signup-back{
    display:block;
    margin:16px auto 0;
}

.signup-form .login-error{
    margin-top:12px;
}

.flight-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0 14px;
}

.flight-form-grid .form-group{
    margin-bottom:14px;
}

.flight-form-grid .form-group:last-child{
    grid-column:1 / -1;
}

/* =========================================================
   APP
========================================================= */

.app{
    display:none;
    min-height:100vh;
}

.sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:240px;
    background:#111827;
    color:white;
    padding:20px 14px;
    z-index:100;
}

.sidebar-logo{
    background:white;
    border-radius:12px;
    padding:8px 12px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 25px;
    width:170px;
    height:65px;
    cursor:pointer;
}

.sidebar-logo img{
    width:145px;
    max-width:100%;
    max-height:52px;
    object-fit:contain;
}

.sidebar-title{
    text-align:center;
    font-size:11px;
    color:#9ca3af;
    margin-top:-15px;
    margin-bottom:22px;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.menu button{
    width:100%;
    border:0;
    background:transparent;
    color:#d1d5db;
    padding:12px 14px;
    border-radius:9px;
    text-align:left;
    cursor:pointer;
    font-size:14px;
}

.menu button:hover,
.menu button.active{
    background:#1f2937;
    color:white;
}

.user-box{
    position:absolute;
    left:14px;
    right:14px;
    bottom:18px;
    border-top:1px solid #374151;
    padding-top:15px;
}

.user-name{
    font-size:13px;
    font-weight:700;
}

.user-role{
    font-size:11px;
    color:#9ca3af;
    margin-top:3px;
}

.logout{
    margin-top:10px;
    width:100%;
    border:1px solid #374151;
    background:transparent;
    color:#d1d5db;
    padding:8px;
    border-radius:7px;
    cursor:pointer;
}

/* =========================================================
   MAIN
========================================================= */

.main{
    margin-left:240px;
    min-height:100vh;
}

.topbar{
    height:72px;
    background:white;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 28px;
}

.topbar-title{
    font-size:20px;
    font-weight:800;
}

.topbar-heading{display:flex;align-items:center;gap:8px;min-width:0;}
.topbar-home{display:none;align-items:center;justify-content:center;width:42px;height:38px;border:0;border-radius:8px;background:transparent;cursor:pointer;}
.topbar-home img{display:block;width:38px;max-height:30px;object-fit:contain;}

.topbar-right{
    display:flex;
    align-items:center;
    gap:10px;
}

.mobile-logout{
    display:none;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 14px;
    border:1px solid #d1d5db;
    border-radius:9px;
    background:white;
    color:#374151;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.topbar-right{
    display:flex;
    align-items:center;
    gap:10px;
}

.content{
    padding:25px;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
    margin-bottom:25px;
}

.stat-card{
    background:white;
    border:1px solid var(--border);
    border-radius:14px;
    padding:20px;
}

.stat-label{
    font-size:12px;
    color:#6b7280;
    margin-bottom:8px;
}

.stat-value{
    font-size:27px;
    font-weight:800;
}

.flight-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

.flight-card{
    background:white;
    border:1px solid var(--border);
    border-radius:15px;
    padding:18px;
    cursor:pointer;
    transition:.15s;
}

.flight-card-overdue-yellow{background:#fffbeb;border-color:#facc15;}
.flight-card-overdue-red{background:#fef2f2;border-color:#ef4444;}
.flight-assignees{margin-top:7px;font-size:12px;color:#475569;}
.flight-completion-meta{margin-top:6px;font-size:11px;font-weight:600;color:#16805c;}
.weather-strip{display:flex;align-items:center;gap:8px;min-height:30px;margin:-9px 0 14px;color:#6b7280;font-size:12px;}
.weather-icon{font-size:17px;line-height:1;}
.weather-place{color:#6b7280;}
.weather-value{color:#374151;font-size:13px;}
.weather-label{color:#9ca3af;}
.assigned-host-list{display:grid;gap:8px;}
.assigned-host-row{display:flex;gap:8px;}
.assigned-host-row input{flex:1;min-width:0;padding:11px;border:1px solid #d1d5db;border-radius:8px;background:#fff;}
.history-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:18px;padding:16px;background:#fff;border:1px solid var(--border);border-radius:10px;}

.flight-card:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 25px rgba(0,0,0,.07);
}

.flight-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.flight-number{
    font-size:21px;
    font-weight:800;
}

.status{
    padding:5px 9px;
    border-radius:20px;
    font-size:10px;
    font-weight:700;
}

.status-scheduled{
    background:#dbeafe;
    color:#1d4ed8;
}

.status-boarding{
    background:#fef3c7;
    color:#92400e;
}

.status-departed,
.status-completed{
    background:#dcfce7;
    color:#166534;
}

.status-delayed{
    background:#fee2e2;
    color:#991b1b;
}

.flight-route{
    font-size:13px;
    color:#6b7280;
    margin-bottom:15px;
}

.flight-schedule{
    color:#6b7280;
    font-size:11px;
    margin-top:-8px;
    margin-bottom:10px;
}

.progress-wrap{
    margin-top:12px;
}

.progress-label{
    display:flex;
    justify-content:space-between;
    font-size:11px;
    color:#6b7280;
    margin-bottom:6px;
}

.progress{
    height:7px;
    border-radius:20px;
    background:#e5e7eb;
    overflow:hidden;
}

.progress-bar{
    height:100%;
    background:var(--blue);
    transition:.3s;
}

/* =========================================================
   FLIGHT HEADER
========================================================= */

.flight-header{
    background:white;
    border:1px solid var(--border);
    border-radius:15px;
    padding:20px;
    margin-bottom:18px;
}

.flight-header-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.flight-header-title{
    font-size:23px;
    font-weight:800;
}

.flight-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:15px;
}

.meta-item{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:8px 10px;
    font-size:11px;
}

.back-btn{
    border:1px solid #d1d5db;
    background:white;
    border-radius:8px;
    padding:8px 12px;
    cursor:pointer;
}

/* =========================================================
   CHAT
========================================================= */

.chat-panel{
    background:white;
    border:1px solid var(--border);
    border-radius:15px;
    overflow:hidden;
}

.chat-header{
    padding:16px 18px;
    border-bottom:1px solid var(--border);
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.chat-header-title{
    font-weight:800;
}

.chat-header-sub{
    color:#6b7280;
    font-size:11px;
    margin-top:3px;
}

.chat-realtime-status{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#6b7280;
    font-size:11px;
    white-space:nowrap;
}

.chat-status-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#f59e0b;
}

.chat-realtime-status.connected .chat-status-dot{
    background:#16a34a;
}

.chat-realtime-status.error .chat-status-dot{
    background:#dc2626;
}

.chat-messages{
    height:390px;
    overflow-y:auto;
    padding:18px;
    background:#f8fafc;
}

.message{
    display:flex;
    margin-bottom:12px;
}

.message.mine{
    justify-content:flex-end;
}

.message-bubble{
    max-width:75%;
    background:white;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:9px 12px;
    box-shadow:0 1px 2px rgba(0,0,0,.03);
}

.message.mine .message-bubble{
    background:#eff6ff;
    border-color:#bfdbfe;
}

.message.system{
    justify-content:center;
}

.message.system .message-bubble{
    background:#ecfdf5;
    border-color:#bbf7d0;
    color:#166534;
    font-size:12px;
}

.message-name{
    font-size:10px;
    font-weight:800;
    margin-bottom:3px;
    color:#374151;
}

.message-text{
    font-size:13px;
    line-height:1.4;
}

.message-time{
    font-size:9px;
    color:#9ca3af;
    margin-top:4px;
}

.chat-actions{
    padding:14px;
    border-bottom:1px solid var(--border);
}

.chat-actions-title{
    font-size:11px;
    font-weight:800;
    color:#6b7280;
    margin-bottom:10px;
}

.quick-message{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}

.quick-message button{
    border:1px solid #dbeafe;
    background:#eff6ff;
    color:#1d4ed8;
    border-radius:8px;
    padding:8px 10px;
    font-size:11px;
    cursor:pointer;
}

.quick-message button:hover{
    background:#dbeafe;
}

.chat-composer{
    display:flex;
    gap:10px;
    padding:14px;
}

.chat-composer input{
    flex:1;
    border:1px solid #d1d5db;
    border-radius:9px;
    padding:11px 13px;
    outline:none;
}

.chat-send{
    border:0;
    background:var(--blue);
    color:white;
    padding:0 18px;
    border-radius:9px;
    font-weight:700;
    cursor:pointer;
}

/* =========================================================
   OPERATIONAL ACTIONS
========================================================= */

.action-section{
    margin-bottom:18px;
}

.action-section-title{
    font-size:11px;
    font-weight:800;
    color:#6b7280;
    margin-bottom:9px;
}

.action-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
}

.action-button{
    border:1px solid #dbeafe;
    background:#eff6ff;
    color:#1d4ed8;
    min-height:65px;
    padding:9px;
    border-radius:10px;
    text-align:left;
    cursor:pointer;
    transition:.15s;
}

.action-button:hover{
    border-color:#93c5fd;
    background:#dbeafe;
}

.action-button.completed{
    background:#dcfce7;
    border-color:#86efac;
    color:#166534;
    cursor:default;
}

.action-button:disabled{
    opacity:1;
}

.action-button-label{
    display:block;
    font-size:11px;
    font-weight:800;
}

.action-button-meta{
    display:block;
    font-size:9px;
    margin-top:5px;
    opacity:.8;
}

/* =========================================================
   ACTION MODAL
========================================================= */

.action-modal{
    position:fixed;
    inset:0;
    background:rgba(17,24,39,.65);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    z-index:5000;
}

.action-modal-card{
    width:100%;
    max-width:460px;
    background:white;
    border-radius:18px;
    padding:24px;
    box-shadow:0 25px 80px rgba(0,0,0,.3);
}

.flight-modal-card{
    max-width:520px;
}

.flight-modal-card .form-group input{
    background:#fff;
}

.action-modal-title{
    font-size:19px;
    font-weight:800;
    margin-bottom:6px;
}

.action-modal-info{
    font-size:12px;
    color:#6b7280;
    margin-bottom:18px;
}

.action-modal-time{
    background:#f3f4f6;
    border-radius:10px;
    padding:12px;
    margin-bottom:15px;
    font-size:13px;
}

.action-note{
    width:100%;
    min-height:80px;
    border:1px solid #d1d5db;
    border-radius:9px;
    padding:10px;
    resize:vertical;
    margin-bottom:12px;
    outline:none;
}

.action-photo{
    width:100%;
    margin-bottom:18px;
    font-size:12px;
}

.action-modal-buttons{
    display:flex;
    gap:10px;
}

.action-modal-buttons button{
    flex:1;
    padding:12px;
    border-radius:9px;
    cursor:pointer;
    font-weight:700;
}

.btn-cancel{
    border:1px solid #d1d5db;
    background:white;
}

.btn-confirm{
    border:0;
    background:var(--green);
    color:white;
}

.btn-danger{
    border:0;
    background:var(--red);
    color:white;
}

.btn-danger:hover{
    background:#b91c1c;
}

.btn-secondary{
    border:1px solid #d1d5db;
    background:white;
    color:#374151;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
    transition:background .15s;
}

.btn-secondary:hover{
    background:#f3f4f6;
}

.btn-danger-outline{
    border:1px solid #fecaca;
    background:white;
    color:#dc2626;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
    transition:all .15s;
}

.btn-danger-outline:hover{
    background:#fee2e2;
    border-color:#fca5a5;
}

.btn-card-action{
    border:1px solid #e5e7eb;
    background:#ffffff;
    border-radius:6px;
    padding:4px 8px;
    font-size:12px;
    cursor:pointer;
    color:#4b5563;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:all .15s ease;
}

.btn-card-action:hover{
    background:#f3f4f6;
    border-color:#d1d5db;
}

.btn-card-action-danger:hover{
    background:#fee2e2;
    border-color:#fca5a5;
    color:#b91c1c;
}

/* =========================================================
   TEAM & USERS MANAGEMENT (SETTINGS)
========================================================= */

.user-table-wrap{
    background:white;
    border:1px solid var(--border);
    border-radius:14px;
    overflow-x:auto;
    margin-top:18px;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
}

.user-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
    text-align:left;
}

.user-table th{
    background:#f9fafb;
    padding:14px 16px;
    font-weight:700;
    color:#4b5563;
    border-bottom:1px solid var(--border);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.user-table td{
    padding:14px 16px;
    border-bottom:1px solid #f3f4f6;
    vertical-align:middle;
}

.user-table tr:last-child td{
    border-bottom:0;
}

.user-table tr:hover td{
    background:#fbfcfe;
}

.user-badge{
    display:inline-block;
    padding:3px 10px;
    border-radius:12px;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.user-badge-host{ background:#e0f2fe; color:#0369a1; }
.user-badge-coordenacao{ background:#fef3c7; color:#b45309; }
.user-badge-aviacao{ background:#dbeafe; color:#1d4ed8; }
.user-badge-coordenacao_terrestre{ background:#fef3c7; color:#b45309; }
.user-badge-concierge{ background:#fce7f3; color:#be185d; }
.user-badge-comercial{ background:#dcfce7; color:#15803d; }
.user-badge-admin{ background:#f3e8ff; color:#7e22ce; }

.user-status-tag{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
}

.user-status-dot{
    display:inline-block;
    width:8px;
    height:8px;
    border-radius:50%;
}

.user-status-dot.active{ background:#16a34a; }
.user-status-dot.inactive{ background:#9ca3af; }

/* =========================================================
   EMPTY
========================================================= */

.empty{
    text-align:center;
    padding:50px 20px;
    color:#6b7280;
}

.empty strong{
    display:block;
    color:#374151;
    margin-bottom:6px;
}

/* =========================================================
   MOBILE
========================================================= */

@media(max-width:1100px){

    .flight-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .dashboard-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .action-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:760px){

    .sidebar{
        position:fixed;
        inset:auto 0 0;
        width:auto;
        height:calc(66px + env(safe-area-inset-bottom));
        padding:7px 7px calc(7px + env(safe-area-inset-bottom));
        border-top:1px solid #263244;
    }

    .sidebar-logo{
        display:none;
    }

    .sidebar-title{
        display:none;
    }

    .menu{
        height:100%;
        flex-direction:row;
        justify-content:space-around;
        align-items:stretch;
        gap:3px;
    }

    .menu button{
        flex:1;
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        gap:2px;
        min-width:0;
        padding:5px 2px;
        text-align:center;
        font-size:10px;
        line-height:1.15;
        white-space:normal;
        border-radius:8px;
    }

    .user-box{
        display:none;
    }

    .mobile-logout{
        display:inline-flex;
    }

    .main{
        margin-left:0;
        padding-bottom:calc(72px + env(safe-area-inset-bottom));
    }

    .topbar{
        padding:0 15px;
    }

    .topbar-home{display:inline-flex;width:78px;height:46px;}
    .topbar-home img{width:72px;max-height:42px;}

    .content{
        padding:15px 14px 22px;
    }

    .flight-grid{
        grid-template-columns:1fr;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
        gap:10px;
        margin-bottom:18px;
    }

    .stat-card{
        padding:15px 17px;
    }

    .stat-value{
        font-size:24px;
    }

    .action-grid{
        grid-template-columns:1fr 1fr;
    }

    .chat-messages{
        height:min(48vh,390px);
        min-height:230px;
    }
}

/* Scrollable host selection and in-app assignment alert */
#app .assigned-host-picker{display:grid;gap:7px;}
#app .assigned-host-search{width:100%;min-height:40px;padding:9px 11px;border:1px solid #383e4b;border-radius:8px;background:#10131a;color:#f1f2f7;font-size:13px;}
#app .assigned-host-options{max-height:176px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #383e4b;border-radius:9px;background:#10131a;padding:4px;scrollbar-color:#50576a #151821;}
#app .assigned-host-option{display:flex;align-items:center;gap:10px;min-height:43px;padding:7px 8px;border-radius:6px;cursor:pointer;}
#app .assigned-host-option:hover{background:#202430;}
#app .assigned-host-option[hidden]{display:none;}
#app .assigned-host-option input[type="checkbox"]{width:17px;height:17px;flex:0 0 auto;accent-color:#7284ff;}
#app .assigned-host-option span{display:grid;min-width:0;gap:2px;}
#app .assigned-host-option strong{font-size:12px;color:#e9ebf2;font-weight:500;}
#app .assigned-host-option small{font-size:10px;color:#9298a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#app .assigned-host-empty{padding:13px 9px;color:#9298a8;font-size:11px;}
#app .assigned-host-edit-grid{margin-top:14px;}
#app .action-button.completed{cursor:pointer;}
#app .action-button.completed:hover{background:#1d433a;border-color:#3b8c70;}
#app .revo-assignment-toast{position:fixed;z-index:10020;top:84px;right:18px;display:flex;align-items:center;gap:11px;width:min(390px,calc(100vw - 28px));padding:13px 14px;text-align:left;background:#1b2030;border:1px solid #485580;border-radius:12px;color:#f4f5fa;box-shadow:0 12px 35px #0008;cursor:pointer;animation:revoToastIn .2s ease-out;}
#app .revo-assignment-toast-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;border-radius:10px;background:#30385d;color:#bdc7ff;font-size:19px;}
#app .revo-assignment-toast-copy{display:grid;gap:4px;min-width:0;}
#app .revo-assignment-toast-copy strong{font-size:12px;}
#app .revo-assignment-toast-copy small{font-size:10px;line-height:1.4;color:#b0b5c4;}
#app .revo-assignment-toast-arrow{margin-left:auto;color:#aebaff;}
#app .message-focus .message-bubble{outline:2px solid #8f9eff;outline-offset:2px;}
@keyframes revoToastIn{from{transform:translateY(-7px);opacity:0;}to{transform:translateY(0);opacity:1;}}
@media(max-width:760px){
    #app .assigned-host-search{font-size:16px;min-height:44px;}
    #app .assigned-host-options{max-height:165px;}
    #app .assigned-host-option{min-height:48px;}
    #app .revo-assignment-toast{top:78px;left:12px;right:12px;width:auto;}
}

@media(max-width:480px){

    .login-card{
        padding:25px 20px;
    }

    .flight-form-grid{
        grid-template-columns:1fr;
    }

    .flight-form-grid .form-group:last-child{
        grid-column:auto;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
    }

    .action-grid{
        grid-template-columns:1fr;
    }

    .flight-header-top{
        align-items:flex-start;
        gap:10px;
    }

    .flight-header-title{
        font-size:19px;
    }

    .chat-composer{
        padding:10px;
        padding-bottom:calc(10px + env(safe-area-inset-bottom));
    }

    .chat-send{
        padding:0 12px;
    }

    .message-bubble{
        max-width:88%;
    }
}

/* =========================================================
   REVO OPS DARK DASHBOARD — login intentionally unchanged
========================================================= */
#app{
    --ops-bg:#0c0e13;
    --ops-sidebar:#101219;
    --ops-panel:#151821;
    --ops-raised:#1c202b;
    --ops-line:#2b2f3b;
    --ops-text:#f4f5fa;
    --ops-muted:#a1a6b4;
    --ops-blue:#536dff;
    --ops-pink:#e84c97;
    --ops-green:#45c99a;
    background:var(--ops-bg);
    color:var(--ops-text);
    color-scheme:dark;
}
#app .sidebar{background:var(--ops-sidebar);border-right:1px solid var(--ops-line);}
#app .sidebar-title,#app .user-role{color:var(--ops-muted);}
#app .menu button{color:#c6c9d3;}
#app .menu button:hover,#app .menu button.active{background:#252936;color:#fff;}
#app .user-box{border-color:var(--ops-line);}
#app .logout,#app .mobile-logout{border-color:#393e4b;background:#191c25;color:#e3e5ec;}
#app .main{background:var(--ops-bg);}
#app .topbar{background:#11131a;border-color:var(--ops-line);color:var(--ops-text);}
#app .topbar-home{background:#fff;border-radius:9px;padding:3px 7px;}
#app .content{color:var(--ops-text);}
#app .stat-card,#app .flight-card,#app .flight-header,#app .chat-panel,
#app .history-toolbar,#app .user-table-wrap,#app .action-modal-card,
#app .flight-modal-card{background:var(--ops-panel);border-color:var(--ops-line);color:var(--ops-text);}
#app .flight-card:hover{border-color:#454b5b;box-shadow:0 12px 32px rgba(0,0,0,.28);}
#app .stat-label,#app .flight-route,#app .flight-schedule,#app .progress-label,
#app .chat-header-sub,#app .chat-realtime-status,#app .weather-strip,
#app .weather-place,#app .action-modal-info,#app .action-modal-time,
#app .empty{color:var(--ops-muted);}
#app .weather-value{color:#edf0f8;}
#app .weather-label{color:#858b9b;}
#app .flight-number,#app .flight-header-title,#app .stat-value,
#app .chat-header-title,#app .action-section-title,#app h2,#app h3,#app h4{color:var(--ops-text);}
#app .flight-assignees{color:#b9becb;}
#app .flight-completion-meta{color:#70d6b0;}
#app .meta-item{background:#1c202a;border-color:var(--ops-line);color:#d5d8e1;}
#app .back-btn,#app .btn-secondary{background:#202430;border-color:#383e4d;color:#e8eaf0;}
#app .progress{background:#292d38;}
#app .progress-bar{background:var(--ops-blue);}
#app .status-scheduled{background:#202c56;color:#aabaff;}
#app .status-boarding{background:#473721;color:#ffd58b;}
#app .status-departed,#app .status-completed{background:#183b34;color:#83e4c1;}
#app .status-delayed{background:#48292f;color:#ff9ba8;}
#app .flight-card-overdue-yellow{background:#282319;border-color:#886c32;}
#app .flight-card-overdue-red{background:#2d2025;border-color:#88434e;}
#app .chat-header{border-color:var(--ops-line);}
#app .chat-messages{background:#101219;}
#app .message-bubble{background:#1c202a;border-color:#343947;color:#edf0f7;box-shadow:none;}
#app .message.mine .message-bubble{background:#202b50;border-color:#394c8b;}
#app .message.system .message-bubble{background:#252934;color:#c4c8d2;}
#app .message-name{color:#e9ebf2;}
#app .message-time{color:#9298a8;}
#app .chat-actions{border-color:var(--ops-line);}
#app .quick-message button{background:#202430;border-color:#373d4b;color:#dfe2eb;}
#app .chat-composer{background:#151821;border-color:var(--ops-line);}
#app .chat-composer input,#app input:not([type="checkbox"]):not([type="radio"]),
#app select,#app textarea{background:#10131a;border-color:#383e4b;color:#f1f2f7;}
#app input::placeholder,#app textarea::placeholder{color:#858b99;}
#app input:disabled,#app select:disabled,#app textarea:disabled{background:#20232d!important;color:#a6abba!important;}
#app .chat-send,#app .btn-primary,#app .btn-confirm{background:var(--ops-blue);color:white;}
#app .action-button{background:#1b1f29;border-color:#333846;color:#e8eaf1;}
#app .action-button:hover{border-color:#6578ec;background:#202638;}
#app .action-button.completed{background:#17362f;border-color:#286b59;color:#9aebce;}
#app .action-button:disabled{background:#191c24;color:#777e8c;}
#app .action-button-label,#app .action-button-meta{color:inherit;}
#app .action-modal{background:rgba(2,4,10,.78);}
#app .action-modal-info{color:#d4d7e1!important;}
#app .btn-cancel,#app .btn-danger-outline{background:#202430;border-color:#454b59;color:#e5e7ed;}
#app .user-table{color:#e7e9f0;}
#app .user-table th{background:#1c202a;color:#bdc2ce;border-color:var(--ops-line);}
#app .user-table td{border-color:#292d38;color:#d4d7e0;}
#app .user-table tr:hover td{background:#1b1f29;}
#app .user-badge-host{background:#183449;color:#8ed6fb;}
#app .user-badge-coordenacao,#app .user-badge-coordenacao_terrestre{background:#443722;color:#f4d48c;}
#app .user-badge-aviacao{background:#202e58;color:#aabaff;}
#app .user-badge-concierge{background:#47263c;color:#f3a6d3;}
#app .user-badge-comercial{background:#183b34;color:#8ce0bd;}
#app .user-badge-admin{background:#332543;color:#d7b8fb;}
#app .empty strong{color:#edf0f7;}
#app .text-button{color:#9aabff;}
#app .assigned-host-row input{background:#10131a;border-color:#383e4b;}
#app [style*="background:#fff"],#app [style*="background: #fff"],
#app [style*="background:#f3f4f6"],#app [style*="background:#f8fafc"],
#app [style*="background:#f9fafb"],#app [style*="background:#e5e7eb"]{background:#1c202a!important;}
#app [style*="color:#111827"],#app [style*="color:#374151"],
#app [style*="color:#4b5563"],#app [style*="color:#6b7280"]{color:#c2c6d1!important;}
#app [style*="border:1px solid #e5e7eb"],#app [style*="border-top:1px solid #e5e7eb"]{border-color:var(--ops-line)!important;}
@media(max-width:760px){
    #app .sidebar{background:#101219;border-top-color:var(--ops-line);box-shadow:0 -8px 24px rgba(0,0,0,.23);}
    #app .menu button{color:#aeb3c1;}
    #app .menu button.active,#app .menu button:hover{background:#252936;color:#fff;}
    #app .mobile-logout{background:#191c25;color:#e3e5ec;}
    #app .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    #app .stat-card{min-width:0;padding:14px;}
    #app .stat-value{font-size:23px;}
}
@media(max-width:480px){
    #app .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
    #app .stat-label{font-size:11px;}
    #app .stat-value{font-size:21px;}
}

/* Dashboard composition inspired by the approved REVO concept */
#app .dashboard-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:8px 2px 21px;}
#app .dashboard-eyebrow{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:#9298a8;margin-bottom:8px;}
#app .dashboard-eyebrow span{color:#7384ff;padding:0 4px;}
#app .dashboard-welcome h1{font-size:26px;font-weight:500;letter-spacing:-.04em;color:#f5f6fb;}
#app .dashboard-welcome p{color:#a1a6b4;font-size:12px;margin-top:6px;}
#app .dashboard-welcome .weather-strip{margin:0 0 2px;padding:8px 11px;border:1px solid #292d39;border-radius:30px;background:#151821;white-space:nowrap;}
#app .dashboard-grid{gap:12px;margin-bottom:17px;}
#app .stat-card{position:relative;min-height:108px;padding:15px 16px 13px;border-radius:12px;background:linear-gradient(145deg,#191c26,#141720);}
#app .stat-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
#app .stat-card .stat-label{color:#a8adbb;font-size:11px;margin:0;}
#app .stat-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#232735;color:#a9b3ff;font-size:15px;}
#app .stat-card-pink .stat-icon{background:#352334;color:#f18abb;}
#app .stat-card-green .stat-icon{background:#20362f;color:#7cdbb6;}
#app .stat-card-violet .stat-icon{background:#2c2940;color:#c0adff;}
#app .stat-card .stat-value{font-size:27px;line-height:1;margin-top:12px;letter-spacing:-.04em;font-weight:500;}
#app .stat-foot{color:#828898;font-size:10px;margin-top:6px;}
#app .dashboard-main-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(245px,.85fr);gap:13px;align-items:start;}
#app .dashboard-panel{background:#151821;border:1px solid #292d39;border-radius:13px;overflow:hidden;}
#app .dashboard-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 16px 13px;}
#app .dashboard-panel-head h2{font-size:14px;font-weight:600;letter-spacing:-.01em;}
#app .dashboard-panel-head p{font-size:10px;color:#9298a8;margin-top:5px;}
#app .dashboard-link{border:0;background:transparent;color:#adb7ff;font-size:11px;cursor:pointer;white-space:nowrap;}
#app .dashboard-link span{font-size:15px;margin-left:4px;}
#app .dashboard-flight-list{display:grid;grid-template-columns:1fr;gap:0;}
#app .dashboard-flight-list .flight-card{border-width:1px 0 0;border-radius:0;padding:14px 16px;background:transparent;box-shadow:none;}
#app .dashboard-flight-list .flight-card:hover{transform:none;background:#1a1e28;}
#app .dashboard-flight-list .flight-number{font-size:16px;}
#app .dashboard-flight-list .flight-route{margin:6px 0;font-size:12px;color:#c2c6d1;}
#app .dashboard-flight-list .flight-schedule{margin:0 0 7px;font-size:10px;color:#9298a8;}
#app .dashboard-flight-list .flight-assignees{margin-top:5px;font-size:10px;color:#a8adbb;}
#app .dashboard-flight-list .progress-wrap{margin-top:10px;}
#app .dashboard-flight-list .progress-label{font-size:10px;}
#app .dashboard-side-stack{display:grid;gap:12px;}
#app .dashboard-overview{padding-bottom:7px;}
#app .dashboard-overview .dashboard-panel-head{padding-bottom:9px;}
#app .dashboard-live-dot{width:8px;height:8px;border-radius:50%;background:#45c99a;box-shadow:0 0 0 4px #45c99a1c;}
#app .overview-row{display:flex;align-items:center;justify-content:space-between;padding:9px 16px;color:#b4b8c5;font-size:11px;}
#app .overview-row strong{font-size:12px;color:#f3f4fa;font-weight:600;}
#app .overview-row span{display:flex;align-items:center;gap:9px;}
#app .overview-dot{width:7px;height:7px;border-radius:50%;background:#8c95a9;}
#app .dot-blue{background:#8d9aff;}.dot-pink{background:#ee7fb8;}.dot-green{background:#62d6ad;}.dot-amber{background:#efbd68;}
#app .overview-total{display:flex;align-items:center;justify-content:space-between;margin:7px 16px 0;padding:13px 0 11px;border-top:1px solid #292d39;color:#a1a6b4;font-size:10px;}
#app .overview-total strong{color:#f2f3f8;font-size:12px;}
#app .overview-total small{font-size:10px;color:#858b9a;font-weight:400;}
#app .dashboard-empty{display:grid;justify-items:center;gap:6px;padding:36px 15px;border-top:1px solid #292d39;color:#a1a6b4;text-align:center;}
#app .dashboard-empty span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#19382f;color:#67d7b0;font-size:18px;}
#app .dashboard-empty strong{color:#f3f4fa;font-size:12px;}
#app .dashboard-empty small{font-size:10px;}
@media(max-width:960px){
    #app .dashboard-main-grid{grid-template-columns:minmax(0,1.3fr) minmax(220px,.8fr);gap:10px;}
    #app .dashboard-welcome h1{font-size:23px;}
}
@media(max-width:760px){
    #app .dashboard-welcome{align-items:flex-start;padding:3px 2px 15px;}
    #app .dashboard-welcome h1{font-size:22px;}
    #app .dashboard-welcome .weather-strip{gap:5px;padding:7px 9px;font-size:10px;}
    #app .dashboard-main-grid{grid-template-columns:1fr;}
    #app .dashboard-side-stack{grid-template-columns:1fr 1fr;align-items:stretch;}
}
@media(max-width:480px){
    #app .dashboard-welcome{gap:8px;}
    #app .dashboard-welcome h1{font-size:19px;}
    #app .dashboard-welcome p{font-size:10px;}
    #app .dashboard-eyebrow{font-size:8px;letter-spacing:.1em;}
    #app .dashboard-welcome .weather-strip{max-width:145px;flex-wrap:wrap;justify-content:flex-end;gap:3px 5px;font-size:9px;}
    #app .dashboard-welcome .weather-place{display:none;}
    #app .stat-card{min-height:93px;padding:12px;}
    #app .stat-card .stat-value{font-size:23px;margin-top:9px;}
    #app .stat-foot{font-size:9px;}
    #app .dashboard-side-stack{grid-template-columns:1fr;}
}

/* iOS Safari zooms the viewport when a focused input uses text smaller than 16px.
   Keep the mobile chat composer at the safe size without changing desktop. */
@media(max-width:760px){
    #app .chat-composer input#chatInput{
        font-size:16px!important;
        line-height:1.35;
        min-height:46px;
        scroll-margin-bottom:24px;
        -webkit-text-size-adjust:100%;
    }
    #app .chat-composer .chat-send{min-height:46px;}
}
