:root {
    --bg: #0b0f0b;
    --surface: #11160f;
    --surface-2: #161c13;
    --text: #e8eae6;
    --muted: #9aa39a;
    --accent: #9ae600;
    --border: #1f271b;
    --pos: #9ae600;
    --neg: #ff6b6b;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 22px 48px;
}

/* ---------- Cabeçalho ---------- */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head h1 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
}
.page-head h1::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 22px;
    background: var(--accent);
    border-radius: 3px;
    margin-right: 12px;
    vertical-align: -3px;
}
.subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}
.badge-sim {
    background: rgba(154, 230, 0, 0.12);
    color: var(--accent);
    border: 1px solid rgba(154, 230, 0, 0.35);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Cartões ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.card h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: var(--text);
}

/* ---------- Sobre este case ---------- */
.about-list {
    margin: 0;
    padding-left: 20px;
}
.about-list li {
    margin-bottom: 8px;
    color: var(--text);
}
.about-list strong {
    color: var(--accent);
}
.note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
}

/* ---------- KPIs ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.kpi {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kpi-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
}
.kpi-value small {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}
.kpi-value.pos { color: var(--pos); }
.kpi-value.neg { color: var(--neg); }

/* ---------- Filtro ---------- */
.filter-card { padding: 16px 22px; }
.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.filter-form label {
    color: var(--muted);
    font-size: 0.9rem;
}
.filter-form select {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.92rem;
    min-width: 200px;
}
.filter-form select:focus {
    outline: none;
    border-color: var(--accent);
}
.filter-form button {
    background: var(--accent);
    color: #0b0f0b;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}
.filter-form button:hover { filter: brightness(1.08); }
.clear-link {
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
}
.clear-link:hover { color: var(--text); text-decoration: underline; }

/* ---------- Tabela ---------- */
.table-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.table-head h2 { margin: 0; }
.table-scroll { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
thead th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
thead th:hover { color: var(--text); }
tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody tr:hover { background: var(--surface-2); }
.num { text-align: right; }
td.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--pos); font-weight: 600; }
.neg { color: var(--neg); font-weight: 600; }
.empty {
    text-align: center;
    color: var(--muted);
    padding: 28px 12px;
}

/* ---------- Badges de status ---------- */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.st-plantio {
    background: rgba(96, 165, 250, 0.14);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
}
.st-vegetativo {
    background: rgba(154, 230, 0, 0.14);
    color: var(--accent);
    border-color: rgba(154, 230, 0, 0.3);
}
.st-colheita {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.3);
}
.st-concluido {
    background: rgba(154, 163, 154, 0.14);
    color: var(--muted);
    border-color: rgba(154, 163, 154, 0.3);
}

/* ---------- Rodapé ---------- */
.page-foot {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.82rem;
}

@media (max-width: 600px) {
    .page-head h1 { font-size: 1.3rem; }
    .kpi-value { font-size: 1.25rem; }
}
