/* ============================================================
   IWO TECNOLOGIA – ENGENHARIA
   CSS OFICIAL
============================================================ */

/* ===== BASE ===== */
body {
    background: #E3E3E3;
    font-family: "Montserrat", sans-serif;
    color: #222;
    margin: 0;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
#engineeringContent {
    padding: 40px 60px;
    margin-left: 90px;
    transition: margin-left .25s ease;
    position: relative;
    z-index: 1;
    width: auto;
    min-width: 0;
    max-width: none;
    pointer-events: auto;
}

#engineeringContent * {
    pointer-events: auto !important;
}

.sidebar-aberta + #engineeringContent {
    margin-left: 260px;
}

/* ===== TÍTULOS ===== */
.titulo {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 35px;
    color: #222;
}

.titulo-secao {
    font-size: 22px;
    font-weight: 700;
    color: #C7A437;
    margin-bottom: 25px;
    border-bottom: 2px solid #C7A437;
    padding-bottom: 15px;
}

/* Seções - Padrão oculto */
.secao {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Seção ativa - Mostrar */
.secao.ativa,
.secao[style*="display: block"] {
    display: block !important;
}

/* ===== CARDS DE NAVEGAÇÃO ===== */
.cards-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.card-nav {
    background: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0px 2px 6px rgba(0,0,0,.12);
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.card-nav:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 16px rgba(0,0,0,.2);
    border-color: #C7A437;
}

.card-nav h3 {
    font-size: 18px;
    font-weight: 700;
    color: #C7A437;
    margin: 0 0 10px 0;
}

.card-nav p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ===== CARDS KPI ===== */
.cards-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all .3s ease;
    border-left: 4px solid #C7A437;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.kpi-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: #C7A437;
    margin: 0;
}

.kpi-label {
    font-size: 0.95rem;
    color: #666;
    margin: 5px 0 0 0;
    font-weight: 500;
}

/* ===== SEÇÕES ===== */
.secao {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0px 2px 6px rgba(0,0,0,.12);
    margin-bottom: 30px;
}

.secao.ativa {
    display: block;
}

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.toolbar input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #C0C0C0;
    border-radius: 10px;
    font-size: 14px;
}

/* ===== BOTÕES ===== */
.btn-primary {
    background: #C7A437;
    color: white;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;
}

.btn-primary:hover {
    background: #b49430;
}

.btn-danger {
    background: #C96868;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger:hover {
    background: #A95353;
}

.btn-small {
    background: #333;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-small:hover {
    background: #111;
}

/* ===== TABELAS ===== */
.tabela-dados {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tabela-dados thead {
    background: #F1F1F1;
}

.tabela-dados th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #DDD;
}

.tabela-dados td {
    padding: 12px;
    border-bottom: 1px solid #E0E0E0;
    font-size: 14px;
}

.tabela-dados tbody tr:hover {
    background: #F9F9F9;
}

/* ===== CAMPOS ===== */
.campo {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.campo label {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.campo input,
.campo select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #C0C0C0;
    background: #fff;
    font-size: 15px;
    outline: none;
}

.campo input:focus,
.campo select:focus {
    border-color: #C0C0C0 !important;
}

/* ===== GRID CÁLCULOS ===== */
.grid-calculos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card-calculo {
    background: #F6F6F6;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #DDD;
}

.card-calculo h3 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-top: 0;
    margin-bottom: 20px;
}

.card-calculo form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resultado {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    padding: 12px;
    border-radius: 6px;
    display: none;
    font-weight: 600;
    color: #2E7D32;
}

.resultado.show {
    display: block;
}

/* ===== STATUS BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ativo {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge.inativo {
    background: #FFEBEE;
    color: #C62828;
}

.badge.pendente {
    background: #FFF3E0;
    color: #E65100;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 920px) {
    #engineeringContent {
        padding: 20px;
        margin-left: 90px;
    }

    .cards-nav {
        grid-template-columns: 1fr;
    }

    .grid-calculos {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
    }

    .toolbar input {
        width: 100%;
    }

    .titulo {
        font-size: 28px;
    }

    .titulo-secao {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .tabela-dados {
        font-size: 12px;
    }

    .tabela-dados th,
    .tabela-dados td {
        padding: 8px;
    }

    .btn-primary {
        padding: 10px 16px;
        font-size: 13px;
    }
}
/* ============================================================
   DASHBOARD ENGENHARIA - REQUISIÇÕES, CHAT, PAGAMENTOS
============================================================ */

.hidden {
    display: none !important;
}

/* Alerta Requisições */
.alerta-requisicoes {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    color: #6D4C41;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.alerta-titulo {
    font-weight: 700;
    margin-bottom: 4px;
}

.alerta-texto {
    margin: 0;
    color: #5D4037;
}

.alerta-actions {
    display: flex;
    gap: 8px;
}

/* Modais */
.modal-eng {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal-eng.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-eng {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #EEE;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

/* Chat */
.chat-container {
    display: flex;
    gap: 15px;
    height: 600px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-sidebar {
    width: 250px;
    border-right: 1px solid #EEE;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-y: auto;
}

.chat-sidebar h3 {
    margin-top: 0;
    font-size: 14px;
    color: #333;
}

.search-chat {
    width: 100%;
    padding: 8px;
    border: 1px solid #DDD;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
}

.cliente-chat-item {
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 8px;
    background: #F9F9F9;
}

.cliente-chat-item:hover,
.cliente-chat-item.ativo {
    background: #E3F2FD;
}

.cliente-chat-item strong {
    display: block;
    font-size: 13px;
}

.cliente-chat-item small {
    color: #999;
    font-size: 11px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #EEE;
}

.chat-header h3 {
    margin: 0;
    font-size: 14px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin: 10px 0;
    padding: 10px;
    background: #F9F9F9;
    border-radius: 6px;
}

.chat-msg {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    max-width: 70%;
}

.msg-eng {
    background: #E3F2FD;
    color: #1565C0;
    margin-left: auto;
}

.msg-cliente {
    background: #F0F0F0;
    color: #333;
}

.chat-msg p {
    margin: 0 0 5px 0;
    font-size: 13px;
}

.chat-msg small {
    font-size: 11px;
    opacity: 0.7;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid #DDD;
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
}

/* Status Badges */
.status-enviado {
    background: #E3F2FD;
    color: #1565C0;
}

.status-analise {
    background: #FFF3E0;
    color: #E65100;
}

.status-aprovado {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-rejeitado {
    background: #FFEBEE;
    color: #C62828;
}

.status-pendente {
    background: #FFF3E0;
    color: #E65100;
}

.status-boleto_enviado {
    background: #E3F2FD;
    color: #1565C0;
}

.status-pago {
    background: #E8F5E9;
    color: #2E7D32;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    border: 1px solid #DDD;
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
    font-family: "Montserrat", sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #C7A437;
    box-shadow: 0 0 0 3px rgba(199, 164, 55, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    background: #EEE;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.btn-secondary:hover {
    background: #DDD;
}

.btn-mini {
    background: #C7A437;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.btn-mini:hover {
    background: #b49430;
}

/* ============================================================
   GARANTIR CLICKABILIDADE GLOBAL
============================================================ */
button,
a,
[onclick],
.btn-primary,
.btn-secondary,
.btn-mini,
.card-nav,
.secao,
input,
select,
textarea {
    pointer-events: auto !important;
}