* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
}

/* ===== Login ===== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
}
.login-box {
    background: #fff;
    padding: 32px 28px;
    border-radius: 10px;
    width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-box h2 { margin: 0 0 4px 0; color: #1e3a5f; }
.subtitle { margin: 0 0 20px 0; color: #666; font-size: 13px; }
.login-box label { display: block; margin-bottom: 14px; font-size: 13px; color: #444; }
.login-box input {
    display: block; width: 100%; padding: 9px 10px; margin-top: 4px;
    border: 1px solid #cbd2d9; border-radius: 6px; font-size: 14px;
}
.login-box button {
    width: 100%; padding: 10px; background: #1e3a5f; color: #fff; border: 0;
    border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.login-box button:hover { background: #17304d; }

/* ===== Top bar ===== */
.topbar {
    background: #1e3a5f; color: #fff; padding: 12px 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.topbar h1 { margin: 0; font-size: 18px; }
.back-link {
    color: #fff; text-decoration: none; margin-right: 6px; font-size: 18px;
}
.back-link:hover { opacity: .75; }
.user-area { font-size: 13px; }
.user-area a {
    color: #fff; margin-left: 12px; text-decoration: none;
    border: 1px solid rgba(255,255,255,.4); padding: 4px 10px; border-radius: 4px;
}
.user-area a:hover { background: rgba(255,255,255,.1); }

/* ===== Main ===== */
main { max-width: 1400px; margin: 20px auto; padding: 0 20px; }

/* ===== Filtros ===== */
.filters {
    background: #fff; padding: 18px 20px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 18px;
}
.filters .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.filters .full { grid-column: 1 / -1; }
.filters label {
    display: block; font-size: 12px; font-weight: 600; color: #444;
    text-transform: uppercase; letter-spacing: .5px;
}
.filters input, .filters select {
    display: block; width: 100%; padding: 8px 10px; margin-top: 6px;
    border: 1px solid #cbd2d9; border-radius: 5px; font-size: 14px;
    font-family: inherit; background: #fff;
}
.filters select[multiple] { padding: 4px; }

.actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.actions button, .actions .btn-export {
    padding: 9px 18px; font-size: 14px; border: 0; border-radius: 5px;
    cursor: pointer; text-decoration: none; display: inline-block;
}
.actions button { background: #1e3a5f; color: #fff; font-weight: 600; }
.actions button:hover { background: #17304d; }
.actions .btn-export { background: #2f855a; color: #fff; }
.actions .btn-export:hover { background: #276749; }
.actions .btn-pdf { background: #c05621; }
.actions .btn-pdf:hover { background: #9c4221; }

/* ===== Resultado ===== */
.result-info { margin: 0 0 8px 0; font-size: 13px; color: #555; }
.table-wrap {
    background: #fff; border-radius: 8px; overflow: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); max-height: 65vh;
}
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; white-space: nowrap; }
thead th {
    background: #f7f9fc; position: sticky; top: 0; font-weight: 600;
    color: #333; border-bottom: 2px solid #dde3ea;
}
tbody tr:hover { background: #f7fafc; }

/* ===== Seleção de relatórios ===== */
.report-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.report-card {
    display: block; background: #fff; padding: 20px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); text-decoration: none; color: inherit;
    border: 1px solid transparent; transition: box-shadow .15s, border-color .15s;
}
.report-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.12); border-color: #1e3a5f;
}
.report-card h3 { margin: 0 0 8px 0; color: #1e3a5f; font-size: 16px; }
.report-card p { margin: 0; font-size: 13px; color: #666; }
.report-card.disabled {
    opacity: .55; cursor: not-allowed;
}
.report-card.disabled p { font-style: italic; }

/* ===== Alertas ===== */
.alert-error {
    background: #fed7d7; color: #742a2a; padding: 10px 14px; border-radius: 5px;
    border: 1px solid #f5a5a5; margin-bottom: 14px; font-size: 13px;
}
