
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background-color: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-form h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.25);
}

.btn-login {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.btn-login:hover {
    background-color: #0056b3;
}

.register-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}



.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}


.dashboard-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;

    /* ✅ ADICIONE ESTAS 2 LINHAS PARA CORRIGIR O LAYOUT */
    align-items: stretch;       /* Manda os filhos (sidebar/main) esticarem */
    justify-content: flex-start; /* Manda os filhos alinharem à esquerda */
}


.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #232a34;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

.sidebar h2 {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.5rem;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-nav li .icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sidebar-nav li a:hover {
    background-color: #2c3542;
    color: #fff;
}


.sidebar-nav li.active > a {
    background-color: #313c4a;
    color: #00aaff;
    border-left-color: #00aaff;
}


.logout-form {
    margin-top: auto;
    padding: 0 1.5rem;
}

.logout-form button {
    width: 100%;
    background: #d9534f;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-form button .icon {
    margin-right: 0.5rem;
}

.logout-form button:hover {
    background: #c9302c;
}



.main-content {
    flex-grow: 1;
    background-color: #f4f7f6;
    padding: 2.5rem;
    overflow-y: auto;
}

.main-header {
    margin-bottom: 2rem;
}

.main-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
}

.welcome-message {
    font-size: 1.1rem;
    color: #555;
}


.dashboard-cards {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
}

.card a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.card a:hover {
    text-decoration: underline;
}



.form-group .error-text {
    color: #d9534f; /* Vermelho */
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
}

.form-group input.input-error {
    border-color: #d9534f;
    background-color: #fdf2f2;
}

.form-group input.input-error:focus {
    border-color: #d9534f;
    box-shadow: 0 0 5px rgba(217, 83, 79, 0.5);
}


.content-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-size: 0.9rem;
}

.content-table thead tr {
    background-color: #f9f9f9;
    color: #555;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
}

.content-table th,
.content-table td {
    padding: 1rem 1.5rem;
}

.content-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.content-table tbody tr:last-of-type {
    border-bottom: none;
}

.content-table tbody tr:hover {
    background-color: #f5f5f5;
}

.action-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    margin-right: 15px;
}

.action-links a:hover {
    text-decoration: underline;
}

.action-links a.delete {
    color: #d9534f;
}

button.delete-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit; /* Pega a fonte da tabela */
    color: #d9534f; /* Cor vermelha do seu .delete */
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

button.delete-link:hover {
    text-decoration: underline;
}


.btn-editar {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-editar:hover {
    background-color: #0056b3;
}
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-card {
    background: #fff;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.insight-card h3 {
    margin-bottom: .5rem;
    color: #333;
}

.insight-card p {
    color: #555;
}

.insight-date {
    display: block;
    margin-top: .5rem;
    font-size: .85rem;
    color: #777;
}
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-card {
    background: #fff;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.log-actions {
    margin-top: 1rem;
}

.btn-edit, .btn-delete, .btn-save, .btn-back {
    background: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-delete {
    background: #dc3545;
}

.btn-back {
    background: #6c757d;
}

.btn-edit:hover, .btn-delete:hover, .btn-save:hover, .btn-back:hover {
    opacity: 0.85;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.log-details p {
    margin: 0.3rem 0;
    color: #444;
}

.log-date {
    font-size: 0.9rem;
    color: #777;
}

.log-actions {
    margin-top: 1rem;
}

.btn-edit, .btn-delete {
    background: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-edit {
    background: #28a745;
}

.btn-delete {
    background: #dc3545;
}

.btn-edit:hover, .btn-delete:hover {
    opacity: 0.85;
}

.status-ok {
    color: #28a745;
    font-weight: bold;
}

.status-pendente {
    color: #dc3545;
    font-weight: bold;
}

.no-logs {
    text-align: center;
    color: #777;
    font-style: italic;
    margin-top: 2rem;
}
/* ==================== */
/*  FORMULÁRIO DE EDIÇÃO */
/* ==================== */

.edit-form {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edit-form label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.3rem;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.edit-form input:focus,
.edit-form textarea:focus,
.edit-form select:focus {
    outline: none;
    border-color: #007bff;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.btn-save, .btn-back {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-save {
    background-color: #28a745;
    color: white;
    margin-top: 1rem;
}

.btn-save:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-back {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    text-align: center;
    margin-top: 0.5rem;
}

.btn-back:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}
.btn-auto {
    width: auto;
    padding: 0.8rem 1.5rem;
}
/* Adicionei um estilo para um botão "secundário" */
.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}
