:root {
    --bg: #F6FBF8;
    --panel: #FFFFFF;
    --panel2: #FFFFFF;
    --border: rgba(16, 24, 40, .10);
    --text: #0F172A;
    --muted: #5B6B7A;
    --primary: #16A34A;
    --primary-2: #22C55E;
    --ok: #16A34A;
    --warn: #F59E0B;
    --bad: #EF4444;
    --neutral: #64748B;

    --shadow: 0 10px 28px rgba(2, 6, 23, .08);
    --radius: 18px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(900px 540px at 12% 12%, rgba(34, 197, 94, .16), transparent 55%),
        radial-gradient(900px 540px at 86% 22%, rgba(16, 185, 129, .10), transparent 55%),
        radial-gradient(900px 540px at 50% 96%, rgba(34, 197, 94, .08), transparent 55%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none
}

.page {
    max-width: 1600px;
    margin: 28px auto;
    padding: 0 18px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90));
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.page-header h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: .2px;
}

.page-header .subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    font-size: 12px;
    color: var(--muted);
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

.pill strong {
    color: var(--text);
    font-weight: 800;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    color: var(--text);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: .15s ease;
    user-select: none;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 24, 40, .18);
}

.btn:active {
    transform: translateY(0px)
}

.btn.primary {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .35);
    color: #0B3B1B;
}

.btn.ghost {
    background: #FFFFFF;
}

.btn.danger {
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .25);
    color: #7F1D1D;
}

.layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 16px;
    margin-top: 16px;
}

.card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .92));
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.sidebar {
    padding: 14px;
    height: fit-content;
}

.sidebar h2 {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: .18em;
    color: #0B3B1B;
    opacity: .9;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.field input,
.field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(16, 24, 40, .14);
    background: #FFFFFF;
    color: var(--text);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(2, 6, 23, .03);
}

.field input:focus,
.field select:focus {
    border-color: rgba(34, 197, 94, .65);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.small-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.main {
    padding: 14px
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.kpi {
    padding: 12px 12px;
    border: 1px solid rgba(16, 24, 40, .10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

.kpi .label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.kpi .value {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .2px;
    color: #0B3B1B;
}

.split {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 10px;
}

.section-title h3 {
    margin: 0;
    font-size: 14px;
    letter-spacing: .2px;
}

.muted {
    color: var(--muted)
}

.chart-box {
    padding: 12px;
    border: 1px solid rgba(16, 24, 40, .10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

.chart-box canvas {
    width: 100% !important;
    height: 280px !important;
}

.legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 6px
}

.dot.ok {
    background: var(--ok)
}

.dot.warn {
    background: var(--warn)
}

.dot.bad {
    background: var(--bad)
}

.dot.neutral {
    background: var(--neutral)
}

.table-wrap {
    padding: 12px;
    border: 1px solid rgba(16, 24, 40, .10);
    border-radius: 14px;
    background: #FFFFFF;
    overflow: auto !important;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

table {
    width: max-content !important;
    min-width: 1400px !important;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto !important;
}

thead th {
    text-align: left;
    font-size: 12px;
    color: #0F172A;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(16, 24, 40, .10);
    background: rgba(34, 197, 94, .08);
    white-space: nowrap;
}

tbody td {
    padding: 8px 10px !important;
    border-bottom: 1px solid rgba(16, 24, 40, .08);
    font-size: 12px !important;
    color: #0F172A;
    vertical-align: middle;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

tbody tr:hover td {
    background: rgba(34, 197, 94, .06)
}

.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: .2px;
    border: 1px solid transparent;
    white-space: nowrap;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.badge-status.concluido {
    color: #0B3B1B;
    background: rgba(34, 197, 94, .20);
    border-color: rgba(34, 197, 94, .40);
}

.badge-status.andamento {
    color: #7A4A00;
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .35);
}

.badge-status.naoconcluido {
    color: #7F1D1D;
    background: rgba(239, 68, 68, .16);
    border-color: rgba(239, 68, 68, .30);
}

.tag-neutral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: .2px;
    color: #334155;
    background: rgba(100, 116, 139, .12);
    border: 1px solid rgba(100, 116, 139, .22);
    white-space: nowrap;
}

.msg {
    margin-top: 10px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(16, 24, 40, .12);
    background: #FFFFFF;
    color: var(--muted);
    box-shadow: 0 6px 16px rgba(2, 6, 23, .06);
}

.msg.err {
    border-color: rgba(239, 68, 68, .30);
    color: #7F1D1D;
    background: rgba(239, 68, 68, .08);
}

.msg.ok {
    border-color: rgba(34, 197, 94, .30);
    color: #0B3B1B;
    background: rgba(34, 197, 94, .10);
}

.footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width:980px) {
    .layout {
        grid-template-columns: 1fr
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .split {
        grid-template-columns: 1fr
    }

    table {
        min-width: 1100px !important
    }
}

.layout {
    grid-template-columns: 320px 1fr;
}

.chart-box--sidebar {
    margin-top: 12px;
}

.chart-box--sidebar canvas {
    width: 100% !important;
    height: 170px !important;
}

.split {
    grid-template-columns: 1fr;
}
