* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Arial, sans-serif;
    background: #f2f4f7;
    margin: 0;
    color: #1f2937;
}
main { padding: 24px; max-width: 1000px; margin: 0 auto; }

/* ===== Layout com menu lateral fixo (estilo SUAS Gestão) ===== */
.app { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
    width: 252px;
    flex-shrink: 0;
    background: #0f2a4a;
    background: linear-gradient(180deg, #123a63 0%, #0a2038 100%);
    color: #d7e6f7;
    display: flex;
    flex-direction: column;
    padding: 18px 0 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 16px; }
.brand-mark {
    background: #1a4d80;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.brand-text strong { display: block; color: #fff; font-size: 15px; line-height: 1.2; }
.brand-text small { color: #a9c6e6; font-size: 11px; }
.sidebar-user {
    padding: 0 20px 14px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #b8d2ee;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-prefeitura {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.sidebar-nav { display: flex; flex-direction: column; flex: 1; }
.sidebar-section {
    margin: 14px 20px 6px;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: #6f93bf;
    font-weight: 700;
}
.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    color: #cfe0f2;
    text-decoration: none;
    font-size: 13.5px;
    border-left: 3px solid transparent;
}
.side-link .side-icon { font-size: 15px; width: 18px; text-align: center; }
.side-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-link.active {
    background: rgba(255,255,255,0.12);
    border-left-color: #4da3ff;
    color: #fff;
    font-weight: 600;
}
.side-logout {
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 14px;
    color: #f2b8b0;
}
.side-logout:hover { color: #fff; }

.content { flex: 1; padding: 26px 32px; max-width: 1200px; width: 100%; margin: 0; min-width: 0; }
.content h1 { margin-top: 0; }

.page-back { margin-bottom: 14px; }
.page-back a {
    color: #475467;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.page-back a:hover { color: #1e3a5f; }

.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.login-box h1 { font-size: 18px; margin-bottom: 24px; text-align: center; }
form label { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; }
form input, form select, form textarea {
    width: 100%;
    padding: 9px 10px;
    margin-top: 4px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
}
form button, .btn {
    margin-top: 20px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}
form button:hover, .btn:hover { background: #16304d; }
.erro { color: #b42318; background: #fef3f2; padding: 8px 12px; border-radius: 6px; font-size: 13px; }

.cards { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.card {
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eef1f4;
    flex: 1;
    min-width: 170px;
    text-align: left;
}
.card h2 { font-size: 30px; margin: 0; color: #123a63; }
.card p { margin: 4px 0 0; color: #667085; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }

.panel {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eef1f4;
    margin-bottom: 20px;
}
.panel h3 { margin-top: 0; font-size: 15px; color: #1f2937; }

.modulos { display: flex; gap: 12px; margin-top: 8px; }
.modulos a {
    background: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e3a5f;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table th, table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eaecf0; font-size: 14px; }
table th { background: #f9fafb; font-size: 12px; text-transform: uppercase; color: #667085; }
table a { color: #1e3a5f; margin-right: 10px; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
