:root {
  --navy-hi: #000070;
  --verde-hi: #00d931;
  --navy-profundo: #000042;
  --navy-50: #000050;
  --navy-medio: #0018c8;
  --navy-a8: #0014a8;
  --verde-hover: #00ee38;
  --verde-press: #00b329;
  --verde-soft: #e8fff0;
  --surface: #f4f6fb;
  --white: #ffffff;
  --text-body: #1e293b;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.9);
  --shadow-card: 0 4px 24px -4px rgba(0, 0, 80, 0.08);
  --shadow-hover: 0 20px 40px -12px rgba(0, 0, 80, 0.18);
  --glow-green: 0 0 60px -10px rgba(0, 217, 49, 0.45);
  --radius-card: 1.25rem;
  --radius-img: 1.5rem;
  --radius-pill: 9999px;
  --max-content: 1400px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: 300ms cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --bg-page: var(--surface);
  --bg-card: var(--white);
  --bg-input: var(--white);
  color-scheme: light;
}

[data-theme="dark"] {
  --surface: #0a0a1a;
  --white: #12122a;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.55);
  --verde-soft: rgba(0, 217, 49, 0.12);
  --bg-page: var(--surface);
  --bg-card: #12122a;
  --bg-input: #1a1a35;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-page);
  min-height: 100vh;
  min-height: 100dvh;
  transition: background var(--ease), color var(--ease);
  -webkit-tap-highlight-color: rgba(0, 217, 49, 0.18);
}

::selection {
  background: rgba(0, 217, 49, 0.25);
  color: var(--navy-hi);
}

h1, .h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  color: var(--navy-hi);
  margin: 0;
  overflow-wrap: anywhere;
}
h2, h3 {
  font-weight: 700;
  color: var(--navy-hi);
  letter-spacing: -0.02em;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--verde-hi);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--verde-hi);
  border-radius: 99px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.35rem;
  min-height: 44px;
  text-decoration: none;
  touch-action: manipulation;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--verde-hi);
  outline-offset: 3px;
}
.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--verde-hi);
  color: var(--navy-hi);
  box-shadow: var(--glow-green);
}
.btn-primary:hover:not(:disabled) {
  background: var(--verde-hover);
  transform: translateY(-2px);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-glass:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}
.btn-outline {
  background: var(--white);
  color: var(--navy-hi);
  border: 1px solid rgba(0, 0, 112, 0.15);
}
.btn-outline:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 217, 49, 0.35);
}
.btn-link {
  background: transparent;
  color: var(--verde-hi);
  padding: 0.4rem 0;
  box-shadow: none;
}
.btn-danger {
  background: #991b1b;
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(153, 27, 27, 0.55);
}
.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-2px);
}
.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  min-height: 40px;
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease),
    background var(--ease);
}
.card--glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
[data-theme="dark"] .card--glass {
  background: rgba(18, 18, 42, 0.75);
}
.card--interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 217, 49, 0.3);
}
.card:hover:not(.card--static) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 217, 49, 0.3);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-bar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(104deg, #000070 30%, #00d931 150%);
  color: var(--white);
}
.hero-bar::before,
.hero-bar::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}
.hero-bar::before {
  width: 280px; height: 280px;
  background: rgba(0, 217, 49, 0.2);
  top: -80px; right: 12%;
  animation: floaty 8s ease-in-out infinite;
}
.hero-bar::after {
  width: 220px; height: 220px;
  background: rgba(0, 24, 200, 0.3);
  bottom: -90px; left: 8%;
  animation: floaty 8s ease-in-out infinite reverse;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

.mesh {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 24, 200, 0.45), transparent 55%),
    radial-gradient(900px 400px at 90% 120%, rgba(0, 217, 49, 0.18), transparent 50%),
    linear-gradient(160deg, #000042, #000070 45%, #0014a8);
}

.input, .select, .textarea {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-body);
  background: var(--bg-input);
  border: 1px solid rgba(0, 0, 112, 0.12);
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea {
  border-color: rgba(255, 255, 255, 0.1);
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  border-color: rgba(0, 217, 49, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 217, 49, 0.12);
}
.textarea { min-height: 110px; resize: vertical; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.06); background: rgba(255, 255, 255, 0.14); }
.theme-toggle:focus-visible { outline: 2px solid var(--verde-hi); outline-offset: 2px; }
label.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-hi);
}
.hint { font-weight: 500; color: var(--text-muted); font-size: 0.8rem; }

.crit-p1 { background: var(--verde-hi); color: var(--navy-hi); }
.crit-p2 { background: #0018c8; color: #fff; }
.crit-p3 { background: rgba(0, 0, 112, 0.12); color: var(--navy-hi); }
.crit-p4 { background: #e2e8f0; color: var(--text-muted); }

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] .h1 { color: #f1f5f9; }
[data-theme="dark"] label.field { color: #e2e8f0; }
[data-theme="dark"] .num { color: #f1f5f9; }
[data-theme="dark"] .crit-btn { background: var(--bg-input); }
[data-theme="dark"] .check-pill { background: var(--bg-input); }
[data-theme="dark"] .alert-card { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .search-results { background: var(--bg-card); }

.status-aberto { background: rgba(0, 217, 49, 0.15); color: var(--navy-hi); }
.status-em_tratativa { background: rgba(0, 20, 168, 0.12); color: var(--navy-medio); }
.status-aguardando { background: #fff7ed; color: #9a3412; }
.status-resolvido { background: var(--verde-soft); color: #166534; }
.status-encerrado { background: #e2e8f0; color: var(--text-muted); }
