:root {
    --bg: #F6FBF8;
    --card: #FFFFFF;
    --border-subtle: rgba(16, 24, 40, .12);

    --accent: #22C55E;
    --accent-strong: #16A34A;

    --text: #0F172A;
    --text-muted: #5B6B7A;

    --radius-lg: 18px;
    --shadow-soft: 0 16px 40px rgba(2, 6, 23, .08);

    --focus-ring: 0 0 0 1px rgba(34, 197, 94, .35),
        0 0 0 4px rgba(34, 197, 94, .18);
}

*,
*::before,
*::after {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(34, 197, 94, .14) 0, transparent 55%),
        radial-gradient(circle at 86% 18%, rgba(16, 185, 129, .10) 0, transparent 55%),
        radial-gradient(circle at 40% 92%, rgba(34, 197, 94, .08) 0, transparent 60%),
        var(--bg);
    position: relative;
    overflow-x: hidden;
}

.bg-galaxy {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 20%, rgba(34, 197, 94, .12) 0, transparent 60%),
        radial-gradient(circle at 80% 10%, rgba(16, 185, 129, .10) 0, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(34, 197, 94, .10) 0, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, .08) 0, transparent 60%);
    z-index: -2;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .35));
    mix-blend-mode: normal;
    z-index: -1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, .88) 0%,
            rgba(255, 255, 255, .92) 55%,
            rgba(34, 197, 94, .10) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: conic-gradient(from 210deg, #22c55e, #16a34a, #10b981, #22c55e);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .9),
        0 10px 26px rgba(34, 197, 94, .25);
    border: 1px solid rgba(16, 24, 40, .10);
}

.brand h1 {
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: 0.02em;
}

.brand p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.top-nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.86rem;
    border: 1px solid rgba(16, 24, 40, .14);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .90));
    box-shadow: 0 10px 26px rgba(2, 6, 23, .06);
    transition: all .18s ease-out;
}

.nav-btn:hover {
    border-color: rgba(34, 197, 94, .55);
    background: linear-gradient(180deg, rgba(34, 197, 94, .12), rgba(255, 255, 255, .92));
    transform: translateY(-1px);
}

.nav-btn.ghost {
    background: transparent;
    box-shadow: none;
}

.page {
    max-width: 1120px;
    margin: 96px auto 40px;
    padding: 0 20px 40px;
}

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 18px 20px 20px;
    backdrop-filter: none;
    margin-bottom: 18px;
}

.card-header {
    margin-bottom: 14px
}

.card-header h2 {
    margin: 0 0 4px;
    font-size: 1.02rem;
}

.card-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

select {
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid rgba(16, 24, 40, .14);
    padding: 8px 10px;
    color: var(--text);
    font-size: 0.86rem;
    outline: none;
    transition: all .16s ease-out;
    box-shadow: inset 0 1px 0 rgba(2, 6, 23, .03);
}

select:focus {
    border-color: rgba(34, 197, 94, .70);
    box-shadow: var(--focus-ring);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 6px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.kpi-value {
    display: block;
    font-size: 1.6rem;
    margin-top: 4px;
    color: #0B3B1B;
}

.kpi-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.kpi-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(34, 197, 94, .22), transparent);
    opacity: .8;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.chart-wrapper {
    width: 100%;
    min-height: 260px;
}

.table-wrapper {
    margin-top: 8px;
    border-radius: 14px;
    border: 1px solid rgba(16, 24, 40, .14);
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 10px 26px rgba(2, 6, 23, .05);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

thead {
    background: linear-gradient(90deg, rgba(34, 197, 94, .14), rgba(34, 197, 94, .08));
}

th,
td {
    padding: 8px 10px;
    text-align: left;
}

th {
    font-weight: 700;
    color: #0F172A;
    border-bottom: 1px solid rgba(16, 24, 40, .12);
}

tbody tr:nth-child(odd) {
    background: rgba(2, 6, 23, .02)
}

tbody tr:nth-child(even) {
    background: rgba(2, 6, 23, .00)
}

tbody tr:hover {
    background: rgba(34, 197, 94, .10);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.nao_atendido {
    background-color: #EF4444;
    color: #fff;
}

.badge.em_andamento {
    background-color: #FACC15;
    color: #111827;
}

.badge.concluido {
    background-color: #22C55E;
    color: #052E16;
}

.empty-state {
    margin: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.site-footer {
    max-width: 1120px;
    margin: 0 auto 18px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.74rem;
    color: var(--text-muted);
    opacity: .9;
}

@media (max-width:900px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .charts-grid {
        grid-template-columns: 1fr
    }

    .filters-grid {
        grid-template-columns: 1fr
    }

    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width:600px) {
    .cards-grid {
        grid-template-columns: 1fr
    }
}
