/* Admin Specific Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.login-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--card-border);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Dashboard Section */
.dashboard-section {
    display: none;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.dashboard-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    outline: none;
    background: white;
}

.dashboard-actions {
    display: flex;
    gap: 0.5rem;
}

.dashboard-actions .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid #dbe3ee;
    padding: 0.6rem 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.btn-back-home:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-back-home i {
    font-size: 1rem;
}

.btn-export-pdf { background: #0f172a; color: white; border: none; }
.btn-export-pdf:hover { background: #334155; }

.btn-export-csv { background: #10b981; color: white; border: none; }
.btn-export-csv:hover { background: #059669; }

.btn-logout { background: #f87171; color: white; border: none; }
.btn-logout:hover { background: #ef4444; }

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.overview-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.overview-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.overview-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.detail-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.detail-total {
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-label {
    width: 60px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-bar-container {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-bar.alto { background: #0ea5e9; }
.stat-bar.medio { background: #94a3b8; }
.stat-bar.baixo { background: #cbd5e1; }

.stat-value {
    width: 40px;
    text-align: right;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.loading-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
}

.report-toolbar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-label,
.justification-filter label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.category-filter,
.report-content-filter {
    flex: 1;
    min-width: 280px;
}

.category-filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-filter-btn {
    appearance: none;
    border: 1px solid #dbe3ea;
    background: #f8fafc;
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.category-filter-btn.active {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

.justification-filter select {
    min-width: 230px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #dbe3ea;
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-family);
    outline: none;
}

.justifications-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

.panel-kicker {
    display: block;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.panel-count {
    background: #f1f5f9;
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.justification-body {
    display: grid;
    gap: 1rem;
}

.justification-group {
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 1rem;
    background: #fcfdff;
}

.justification-group h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.35;
}

.justification-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.justification-item:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.justification-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.justification-item strong {
    display: block;
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.justification-item p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.55;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 1rem;
}

@media (max-width: 768px) {
    .report-toolbar {
        align-items: stretch;
    }

    .category-filter-actions,
    .dashboard-actions,
    .filter-group {
        width: 100%;
    }

    .category-filter-btn,
    .justification-filter,
    .justification-filter select {
        width: 100%;
    }
}
