@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --border: #E2E5E9;
  --text: #1A1F24;
  --text-muted: #5B6670;
  --brand: #17323D;
  --brand-hover: #0F232B;
  --accent: #2F8F73;
  --accent-hover: #257A61;
  --warning: #C1682E;
  --warning-bg: #FBEEE4;
  --danger: #B3413B;
  --danger-bg: #FBEBEA;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(23, 50, 61, 0.08), 0 1px 2px rgba(23, 50, 61, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand);
  margin: 0 0 0.4em 0;
}

a { color: var(--brand); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--brand);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-hover); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface); border-color: var(--brand); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #96322D; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok { background: #E4F3EC; color: var(--accent); }
.badge-warn { background: var(--warning-bg); color: var(--warning); }
.badge-muted { background: #EEF0F2; color: var(--text-muted); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 600;
}
tr:last-child td { border-bottom: none; }

.erro-msg {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}
.aviso-msg {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}
.sucesso-msg {
  background: #E4F3EC;
  color: var(--accent-hover);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
