/* ============================================================
   1. RESET E CONFIGURAÇÕES GERAIS
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ecf0f1;
    color: #2c3e50;
    line-height: 1.6;
}

/* ============================================================
   2. TELA DE LOGIN (MODERNIZADA)
   ============================================================ */
.login-body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
}

.login-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    text-align: center;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
}


.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px; 
    border: 1px solid #dcdde1;
    border-radius: 10px; 
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}


.login-box input:focus {
    border-color: #c02424; 
    box-shadow: 0 0 0 3px rgba(192, 36, 36, 0.1);
}

.login-box:hover {
    transform: translateY(-5px);
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.login-box p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 0.9rem;
}


.forgot-password {
    display: block;
    margin-top: 20px;
    color: #c02424;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #a01d1d;
}


.btn-login {
    width: 100%;
    padding: 14px;
    background-color: #c02424;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(192, 36, 36, 0.3);
}

.btn-login:hover {
    background-color: #a01d1d;
    box-shadow: 0 6px 15px rgba(192, 36, 36, 0.4);
}

/* ============================================================
   3. LAYOUT ESTRUTURAL (Sidebar + Conteúdo)
   ============================================================ */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #c02424 0%, #8e1a1a 100%); 
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    background: #a01d1d;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    margin-top: 20px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    margin: 4px 15px; 
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.nav-links li a:hover, .nav-links li a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
    backdrop-filter: blur(4px);
}

.content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ============================================================
   4. DASHBOARD (Cards e Monitoramento)
   ============================================================ */
.main-dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr; 
    gap: 30px; 
    align-items: start;
    margin-bottom: 30px;
}

.painel-monitoramento {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mini-card {
    background: white;
    padding: 25px;
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    border: 1px solid rgba(0,0,0,0.05);
    border-left: 6px solid #c02424;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mini-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.mini-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #95a5a6;
    margin-bottom: 10px;
}

.mini-card p strong {
    font-size: 1.8rem;
    color: #2c3e50;
    display: block;
}

.card-lista-acoes {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 6px solid #e74c3c;
}

.header-lista {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.header-lista h3 {
    font-size: 1.3rem;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tabela-foco {
    width: 100%;
    border-collapse: collapse;
}

.tabela-foco th {
    background-color: #f8f9fa;
    color: #7f8c8d;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #eee;
}

.tabela-foco td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 1rem;
}

.valor-critico {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-tabela-reposicao {
    background-color: #27ae60;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-tabela-reposicao:hover {
    background-color: #219150;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* ============================================================
   5. FORMULÁRIOS E BOTÕES GERAIS
   ============================================================ */
.main-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 550px;
    margin: 40px auto;
}

.main-container h2 { margin-bottom: 5px; color: #2c3e50; text-align: center; }
.main-container p { margin-bottom: 25px; color: #7f8c8d; text-align: center; font-size: 0.95rem; }

.input-group, .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.9rem;
}

input[type="text"], 
input[type="number"], 
select, 
textarea {
    width: 100% !important;
    padding: 12px;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
}

textarea { min-height: 80px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #c02424; 
    box-shadow: 0 0 0 3px rgba(192, 36, 36, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.btn-primary { background: #27ae60; color: white; }
.btn-primary:hover { background: #219150; transform: translateY(-2px); }

.btn-secondary { background: #95a5a6; color: white; }
.btn-secondary:hover { background: #7f8c8d; }

/* ============================================================
   6. TABELAS E RELATÓRIOS (CORREÇÃO DE BOTÕES ESTICADOS)
   ============================================================ */
.main-container-lista {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 1100px; 
    margin: 30px auto;
}

/* CONTAINER PARA OS BOTÕES DE TOPO */
.header-acoes {
    display: flex;
    justify-content: flex-start; 
    gap: 15px;                   
    margin-bottom: 20px;
    width: 100%;
}


.btn-novo, .btn-voltar {
    width: auto !important;      
    flex: none !important;       
    padding: 10px 25px !important;
    min-width: 160px;            
    border-radius: 8px !important;
    font-size: 0.9rem !important;
}

.relatorio-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.relatorio-table th {
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.relatorio-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.relatorio-table tr:hover { background-color: #f8f9fa; }


.btn-acao {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.btn-edit { background-color: #3498db; color: white; }
.btn-delete { background-color: #e74c3c; color: white; }
.btn-nota { background-color: #34495e; color: white; margin-left: 5px; }

.btn-acao:hover { opacity: 0.8; transform: translateY(-1px); }

/* ============================================================
   7. RODAPÉ E SIDEBAR FOOTER
   ============================================================ */
.sidebar-footer {
    padding: 20px;
    margin-top: auto;
    width: 100%;
}

.btn-sair {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 20px 15px;
    border-radius: 12px;
    padding: 12px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    justify-content: center;
    transition: 0.3s;
}
.btn-sair:hover {
    background: #ffffff !important;
    color: #c02424 !important;
}
/* ============================================================
   AJUSTE PARA BOTÕES PEQUENOS NO RODAPÉ
   ============================================================ */
.footer-nav {
    display: flex;
    justify-content: center; 
    gap: 15px;               
    margin-top: 20px;
}

.btn-footer {
    width: auto !important;    
    flex: none !important;     
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    min-width: 130px;
    text-decoration: none !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   8. RESPONSIVIDADE (MOBILE)
   ============================================================ */

@media (max-width: 768px) {
    
    .dashboard-layout {
        flex-direction: column;
    }

    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar-header {
        padding: 20px;
    }

    .sidebar-header img {
        width: 50% !important; 
    }

    
    .main-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .content {
        padding: 15px;
    }

    
    .card-lista-acoes {
        padding: 15px;
        overflow-x: auto;
    }

    .tabela-foco {
        min-width: 600px; 
    }

    
    .main-container {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .form-actions {
        flex-direction: column; 
    }
}