@charset "UTF-8";

:root {
  --mata-950: #142619;
  --mata-900: #1b3320;
  --mata-800: #2c4a2e;
  --mata-700: #3a6140;
  --mata-100: #e4ece3;
  --terracota-700: #914321;
  --terracota-600: #a84e28;
  --terracota-500: #b4552d;
  --areia-50: #fdfcf8;
  --areia-100: #f7f4ed;
  --areia-200: #ece6d9;
  --neutro-950: #211f1b;
  --neutro-800: #403d36;
  --neutro-600: #68635a;
  --neutro-400: #9a9387;
  --branco: #ffffff;
  --sucesso: #28733b;
  --alerta: #9b6813;
  --erro: #a13029;
  --info: #285d78;

  --fonte: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --raio-sm: 0.4rem;
  --raio: 0.75rem;
  --raio-lg: 1.15rem;
  --sombra: 0 10px 30px rgb(27 51 32 / 0.09);
  --sombra-forte: 0 20px 55px rgb(27 51 32 / 0.16);
  --conteudo: 76rem;
  --transicao: 160ms ease;
  color-scheme: light;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--fonte);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--neutro-800);
  background: var(--areia-100);
  -webkit-font-smoothing: antialiased;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

p, h1, h2, h3 {
  overflow-wrap: break-word;
}

h1, h2, h3 {
  color: var(--mata-950);
  line-height: 1.18;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.08rem;
}

a {
  color: var(--mata-800);
}

:focus-visible {
  outline: 3px solid var(--terracota-500);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  border-radius: var(--raio-sm);
  color: var(--branco);
  background: var(--mata-950);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2rem, var(--conteudo));
  margin-inline: auto;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(44 74 46 / 0.14);
  background: rgb(247 244 237 / 0.94);
  backdrop-filter: blur(14px);
}

.app-nav {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.7rem;
  color: var(--mata-950);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50% 50% 46% 54% / 42% 53% 47% 58%;
  color: var(--areia-50);
  background: var(--mata-800);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: var(--raio-sm);
  color: var(--neutro-600);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--mata-900);
  background: var(--mata-100);
}

.page {
  padding-block: clamp(1.5rem, 4vw, 3rem) 4rem;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--terracota-700);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.muted {
  color: var(--neutro-600);
}

.small {
  font-size: 0.86rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack-lg {
  display: grid;
  gap: 1.5rem;
}

.card {
  border: 1px solid rgb(44 74 46 / 0.13);
  border-radius: var(--raio-lg);
  background: var(--branco);
  box-shadow: 0 1px 2px rgb(27 51 32 / 0.03);
}

.card-body {
  padding: 1.25rem;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--raio-sm);
  font-size: 0.93rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transicao), border-color var(--transicao), transform var(--transicao);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: var(--branco);
  background: var(--mata-800);
}

.btn-primary:hover {
  background: var(--mata-900);
}

.btn-accent {
  color: var(--branco);
  background: var(--terracota-600);
}

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

.btn-secondary {
  border-color: var(--areia-200);
  color: var(--mata-900);
  background: var(--areia-50);
}

.btn-secondary:hover {
  border-color: var(--mata-700);
  background: var(--mata-100);
}

.btn-danger {
  border-color: #e6c4c1;
  color: var(--erro);
  background: #fff7f6;
}

.btn-ghost {
  border-color: transparent;
  color: var(--neutro-600);
  background: transparent;
}

.btn-icon {
  width: 44px;
  padding-inline: 0;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field label,
.field-label {
  color: var(--neutro-800);
  font-size: 0.88rem;
  font-weight: 720;
}

.required::after {
  content: " *";
  color: var(--terracota-700);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.72rem 0.82rem;
  border: 1px solid #cfc8bb;
  border-radius: var(--raio-sm);
  color: var(--neutro-950);
  background: var(--branco);
  font-size: 1rem;
  transition: border-color var(--transicao), box-shadow var(--transicao);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--neutro-400);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--mata-700);
  outline: 0;
  box-shadow: 0 0 0 3px rgb(58 97 64 / 0.17);
}

.help {
  color: var(--neutro-600);
  font-size: 0.8rem;
}

.form-error,
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--raio-sm);
  font-size: 0.9rem;
}

.form-error,
.alert-error {
  border: 1px solid #e4bbb7;
  color: #7d241f;
  background: #fff4f2;
}

.alert-warning {
  border: 1px solid #e8d1a5;
  color: #704909;
  background: #fff9eb;
}

.alert-info {
  border: 1px solid #b9d6e3;
  color: #174c65;
  background: #f0f9fd;
}

.alert-success {
  border: 1px solid #b9d7bf;
  color: #175d2b;
  background: #f1faf3;
}

.badge {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 760;
}

.badge-success {
  color: #175d2b;
  background: #e4f3e7;
}

.badge-draft {
  color: #745017;
  background: #faefd5;
}

.badge-neutral {
  color: var(--neutro-600);
  background: var(--areia-200);
}

.empty-state {
  display: grid;
  min-height: 14rem;
  place-items: center;
  padding: 2rem;
  border: 1px dashed #c9c0b1;
  border-radius: var(--raio-lg);
  text-align: center;
}

.empty-state > div {
  max-width: 30rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  max-width: min(24rem, calc(100vw - 2rem));
  gap: 0.5rem;
}

.toast {
  padding: 0.9rem 1rem;
  border-radius: var(--raio);
  color: var(--branco);
  background: var(--mata-950);
  box-shadow: var(--sombra-forte);
}

.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.loading::after {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--branco);
  animation: girar 0.7s linear infinite;
  content: "";
}

.divider {
  height: 1px;
  border: 0;
  background: var(--areia-200);
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .nav-link-label {
    display: none;
  }

  .app-nav {
    min-height: 3.75rem;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
