:root {
  --bg: #f6fbf8;
  --border: rgba(16, 24, 40, 0.1);
  --text: #0f172a;
  --muted: #5b6b7a;
  --primary: #16a34a;
  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #ef4444;
  --neutral: #64748b;
  --shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      900px 540px at 86% 22%,
      rgba(16, 185, 129, 0.1),
      transparent 55%
    ),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 1750px;
  margin: 24px auto;
  padding: 0 18px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.btn.primary {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.3);
  color: #0b3b1b;
}

.btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #7f1d1d;
}

.btn.ghost {
  border-color: transparent;
  box-shadow: none;
}

.pill {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 14px;
  margin-top: 14px;
}

.card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field select,
.field input {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f9fafb;
  outline: none;
}

.field select:focus,
.field input:focus {
  border-color: var(--primary);
  background: #fff;
}

.small-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.4;
  padding: 8px;
  background: #f8fafc;
  border-radius: 8px;
}

.table-wrap {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th {
  text-align: left;
  padding: 10px 8px;
  font-size: 10px;
  text-transform: uppercase;
  background: rgba(34, 197, 94, 0.06);
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

th:nth-child(1) {
  width: 10%;
}

th:nth-child(2) {
  width: 7%;
}

th:nth-child(3) {
  width: 20%;
}

th:nth-child(4) {
  width: 13%;
}

th:nth-child(5) {
  width: 12%;
}

th:nth-child(6) {
  width: 9%;
}

th:nth-child(7) {
  width: 9%;
}

th:nth-child(8) {
  width: 20%;
}

td {
  padding: 8px 8px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  font-size: 12px;
  vertical-align: middle;
}

.obs-wrapper {
  font-size: 10.5px;
  line-height: 1.3;
  color: #64748b;
  white-space: normal;
  max-height: 50px;
  overflow-y: auto;
}

.badge-status {
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid transparent;
  display: inline-block;
}

.badge-status.concluido,
.badge-status.finalizado {
  background: rgba(34, 197, 94, 0.15);
  color: #065f46;
}

.badge-status.andamento,
.badge-status.analise {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.badge-status.devolvido {
  background: rgba(239, 68, 68, 0.15);
  color: #7f1d1d;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kpi {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.kpi .value {
  font-size: 22px;
  font-weight: 900;
}

.chart-box--sidebar canvas {
  max-height: 160px;
  margin: 10px 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--warn);
}

.dot.bad {
  background: var(--bad);
}

.dot.neutral {
  background: var(--neutral);
}
