* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f5f6f8;
    color: #1c1f24;
}

.topnav {
    background: #1c1f24;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topnav .brand {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    margin-right: 1rem;
}

.topnav a {
    color: #b9c0cc;
    text-decoration: none;
    font-size: 0.95rem;
}

.topnav a:hover, .topnav a.active {
    color: #fff;
}

main {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

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

.card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.card .valor {
    font-size: 1.6rem;
    font-weight: 700;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.bar-label {
    width: 90px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    background: #e5e7eb;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
    display: flex;
}

.bar-fill {
    height: 100%;
}

.bar-fill.baixado { background: #2e7d32; }
.bar-fill.pendente { background: #c9a227; }
.bar-fill.erro_download { background: #c0392b; }

.bar-count {
    width: 140px;
    font-size: 0.8rem;
    color: #4b5563;
    text-align: right;
    flex-shrink: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

th, td {
    padding: 0.5rem 0.7rem;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

th {
    background: #f0f1f3;
    font-weight: 600;
}

.status-baixado { color: #2e7d32; font-weight: 600; }
.status-pendente { color: #a87d00; font-weight: 600; }
.status-erro_download { color: #c0392b; font-weight: 600; }

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filtros label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #4b5563;
    gap: 0.25rem;
}

.filtros select, .filtros input {
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
}

.filtros button {
    align-self: flex-end;
    padding: 0.4rem 1rem;
    background: #1c1f24;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.aviso {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}
