/* ============================================= */
/* CSS UNIFICADO - PAINEL ADMINISTRATIVO         */
/* ============================================= */
/* ÍNDICE:
1. ESTILOS GERAIS
2. CABEÇALHO E RODAPÉ
3. FORMULÁRIOS
4. TABELAS
5. COMPONENTES COMUNS
6. MENSAGENS
7. RESPONSIVIDADE
*/

/* ============================================= */
/* 1. ESTILOS GERAIS                            */
/* ============================================= */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================= */
/* 2. CABEÇALHO E RODAPÉ                        */
/* ============================================= */
.admin-header {
    background: #2c3e50;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

.admin-header a:hover {
    color: #3498db;
}

.admin-footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #7f8c8d;
    font-size: 14px;
}

/* ============================================= */
/* 3. FORMULÁRIOS                               */
/* ============================================= */
.form-cadastro {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="time"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

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

.categorias-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.categoria-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 10px;
}

.categoria-item input {
    margin-right: 8px;
}

/* ============================================= */
/* 4. TABELAS                                   */
/* ============================================= */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

/* ============================================= */
/* 5. COMPONENTES COMUNS                        */
/* ============================================= */
.btn {
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.botao-voltar {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

/* ============================================= */
/* 6. MENSAGENS                                 */
/* ============================================= */
.msg {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msg-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.msg-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================= */
/* 7. RESPONSIVIDADE                            */
/* ============================================= */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-header a {
        margin: 8px 0;
        display: block;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
    }
    
    td {
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
}

/* ============================================= */
/* ESTILOS PARA PÁGINA DE LOGIN                  */
/* ============================================= */

body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f7fa;
    padding: 20px;
}

body.login-page form {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.login-page h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
    text-align: center;
    display: block; /* Remove flex do estilo base */
}

body.login-page input[type="text"],
body.login-page input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

body.login-page input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.login-page button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

body.login-page button[type="submit"]:hover {
    background: #2980b9;
}

/* Ajuste para mensagens de erro no login */
body.login-page .msg {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}
