/* 1. Reset e Configurações Globais */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #3b82f6;
    --text-color: #1f2937;
    --text-color-light: #6b7280;
    --background-color: #f9fafb;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --font-family: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
}

/* 2. Estilos de Autenticação (Login/Cadastro) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-background);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.auth-header { text-align: center; margin-bottom: 25px; }
.auth-title { font-size: 1.8rem; font-weight: 600; margin-bottom: 8px; }
.auth-subtitle { font-size: 1rem; color: var(--text-color-light); }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.input-group { display: flex; flex-direction: column; }
.input-group label { font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}
.input-group input:focus, .input-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff; border: none; padding: 14px 25px;
    cursor: pointer; font-size: 1rem; font-weight: 600;
    border-radius: 8px; text-decoration: none; text-align: center;
    transition: all 0.3s; width: 100%;
    margin-top: 10px;
}
.btn:hover { background-color: #4338ca; transform: translateY(-2px); }
.auth-footer-link { margin-top: 25px; font-size: 0.9rem; color: var(--text-color-light); text-align: center; }
.auth-footer-link a { color: var(--primary-color); text-decoration: none; font-weight: 500; }

/* 3. Estilos do Portal da Transparência */
.portal-wrapper { max-width: 1000px; margin: 40px auto; padding: 20px; }
.portal-header { text-align: center; margin-bottom: 40px; }
.portal-header h1 { font-size: 2.5rem; color: var(--primary-color); }
.portal-header p { font-size: 1.1rem; color: var(--text-color-light); margin-top: 8px; }
.search-bar { position: relative; margin-bottom: 30px; }
.search-bar i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-color-light); }
.search-bar input {
    width: 100%; padding: 15px 15px 15px 45px;
    font-size: 1rem; border: 1px solid var(--border-color);
    border-radius: 8px;
}
.accordion-item {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.accordion-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.accordion-header {
    width: 100%; padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
    background: none; border: none; font-size: 1.2rem;
    font-weight: 600; cursor: pointer; text-align: left;
}
.accordion-header .chevron { transition: transform 0.3s; }
.accordion-item.active .chevron { transform: rotate(180deg); }
.accordion-content { max-height: 0; transition: max-height 0.3s ease-out; }
.file-list-portal { list-style: none; padding: 0 20px 20px; }
.file-item {
    display: flex; align-items: center;
    padding: 15px 0; border-top: 1px solid var(--border-color);
}
.file-icon { color: var(--primary-color); margin-right: 15px; }
.file-info { flex-grow: 1; }
.file-name { display: block; font-weight: 500; }
.file-date { font-size: 0.85rem; color: var(--text-color-light); }
.btn-download {
    display: flex; align-items: center;
    background-color: #f3f4f6; color: var(--text-color);
    padding: 8px 15px; border-radius: 6px; text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: background-color 0.2s;
}
.btn-download:hover { background-color: #e5e7eb; }
.btn-download i { margin-right: 8px; width: 16px; height: 16px; }
.no-files-message { text-align: center; padding: 40px; color: var(--text-color-light); }

/* 4. Estilos da Área Administrativa */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px; background-color: #111827;
    color: #d1d5db; padding: 20px;
    display: flex; flex-direction: column;
}
.sidebar-title { font-size: 1.5rem; color: #fff; margin-bottom: 30px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.nav-link {
    color: #d1d5db; text-decoration: none;
    padding: 12px 15px; border-radius: 6px;
    transition: background-color 0.2s;
}
.nav-link:hover { background-color: #1f2937; color: #fff; }
.nav-link.active { background-color: var(--primary-color); color: #fff; }
.nav-link-logout { margin-top: auto; color: #d1d5db; text-decoration: none; padding: 12px 15px; }
.admin-content { flex-grow: 1; padding: 40px; }
.admin-card { background: var(--card-background); padding: 30px; border-radius: 12px; }
.admin-title { font-size: 2rem; margin-bottom: 25px; }
.admin-form .input-group small { font-size: 0.85rem; color: var(--text-color-light); margin-top: 5px; }
.admin-form .input-group small a { color: var(--primary-color); }
.input-file { padding: 8px; }

.category-manager { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.category-list-box, .category-form-box { background: #f9fafb; padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
.category-list-box h3, .category-form-box h3 { margin-bottom: 15px; font-weight: 600; }
.category-list { list-style: none; }
.category-list li { padding: 10px; border-bottom: 1px solid var(--border-color); }
.category-list li:last-child { border: none; }

/* 5. Mensagens de Feedback */
.error-message, .success-message {
    padding: 12px; border-radius: 8px; margin-bottom: 20px;
    font-size: 0.9rem;
}
.error-message { color: var(--error-color); background: #fee2e2; border: 1px solid #fca5a5; }
.success-message { color: var(--success-color); background: #d1fae5; border: 1px solid #6ee7b7; }
