/* RESET + BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  color: #0f172a;
}

/* NAVBAR */

nav {
  background: #0f172a;
  padding: 12px 20px;

  display: flex;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

nav a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: 0.2s;
}

nav a:hover, nav a:focus {
  background: #1e293b;
}

nav a.ativo {
  background: white;
  color: #1e293b;
}



/* CARD */

.card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  margin-block-start: 20px;
}

/* TIPOGRAFIA */

h1 {
  margin-block-start: 0;
  font-size: 20px;
}

h2 {
  margin-block-start: 0;
  font-size: 18px;
}

p {
  color: #475569;
  font-size: 14px;
}

/* BOTÕES (base neutra) */

button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

button:focus-visible {
  outline-offset: 2px;
}

/* MODAL */

dialog {
  border: none;
  border-radius: 10px;
  padding: 20px;
  max-width: 320px;
  width: 90%;

  opacity: 0;
  transform: scale(0.5);
}

dialog.aberto {
  animation: abrir 0.2s ease forwards;
}

@keyframes abrir {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

dialog::backdrop {
  background: rgba(0,0,0,0.4);
}

/* MENU (ações do modal) */

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin-block-start: 12px;
}