/* =====================================================================
   CRECI Eventos — Folha de estilos
   Direção: Institucional moderno editorial
   Paleta: navy profundo + champagne sóbrio + bege quente
   Tipografia: Fraunces (display serifada) + Inter (corpo)
   ===================================================================== */

:root {
  --bg:               hsl(40, 30%, 97%);
  --bg-elevated:      hsl(0, 0%, 100%);
  --bg-muted:         hsl(40, 20%, 93%);
  --surface:          hsl(0, 0%, 100%);
  --surface-alt:      hsl(40, 25%, 95%);

  --ink:              hsl(215, 40%, 12%);
  --ink-soft:         hsl(215, 25%, 30%);
  --ink-mute:         hsl(215, 15%, 50%);

  --line:             hsl(40, 15%, 86%);
  --line-strong:      hsl(40, 15%, 75%);

  --navy:             hsl(215, 55%, 22%);
  --navy-deep:        hsl(215, 65%, 13%);
  --navy-mid:         hsl(215, 45%, 32%);

  --champagne:        hsl(40, 45%, 58%);
  --champagne-deep:   hsl(35, 55%, 42%);
  --champagne-soft:   hsl(40, 50%, 88%);

  --success:          hsl(155, 45%, 35%);
  --success-soft:     hsl(155, 35%, 92%);
  --danger:           hsl(355, 65%, 48%);
  --danger-soft:      hsl(355, 65%, 95%);

  --shadow-xs:        0 1px 2px hsla(215, 40%, 12%, 0.04);
  --shadow-sm:        0 1px 3px hsla(215, 40%, 12%, 0.06), 0 1px 2px hsla(215, 40%, 12%, 0.04);
  --shadow-md:        0 4px 8px -2px hsla(215, 40%, 12%, 0.08), 0 2px 4px -2px hsla(215, 40%, 12%, 0.06);
  --shadow-lg:        0 12px 24px -8px hsla(215, 40%, 12%, 0.12), 0 4px 8px -4px hsla(215, 40%, 12%, 0.08);
  --shadow-xl:        0 24px 48px -12px hsla(215, 40%, 12%, 0.18);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1100px;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  --bg:               hsl(215, 35%, 8%);
  --bg-elevated:      hsl(215, 30%, 12%);
  --bg-muted:         hsl(215, 28%, 14%);
  --surface:          hsl(215, 30%, 12%);
  --surface-alt:      hsl(215, 28%, 15%);

  --ink:              hsl(40, 25%, 92%);
  --ink-soft:         hsl(40, 15%, 75%);
  --ink-mute:         hsl(215, 10%, 55%);

  --line:             hsl(215, 25%, 20%);
  --line-strong:      hsl(215, 25%, 28%);

  --navy:             hsl(40, 45%, 60%);
  --navy-deep:        hsl(215, 65%, 13%);
  --navy-mid:         hsl(215, 45%, 35%);

  --champagne:        hsl(40, 55%, 65%);
  --champagne-deep:   hsl(40, 45%, 55%);
  --champagne-soft:   hsl(40, 30%, 20%);

  --success:          hsl(155, 50%, 55%);
  --success-soft:     hsl(155, 30%, 15%);
  --danger:           hsl(355, 70%, 65%);
  --danger-soft:      hsl(355, 40%, 18%);

  --shadow-xs:        0 1px 2px hsla(0, 0%, 0%, 0.3);
  --shadow-sm:        0 1px 3px hsla(0, 0%, 0%, 0.4), 0 1px 2px hsla(0, 0%, 0%, 0.3);
  --shadow-md:        0 4px 8px -2px hsla(0, 0%, 0%, 0.5);
  --shadow-lg:        0 12px 24px -8px hsla(0, 0%, 0%, 0.55);
  --shadow-xl:        0 24px 48px -12px hsla(0, 0%, 0%, 0.7);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 20% 0%, hsla(40, 45%, 58%, 0.04), transparent 40%),
    radial-gradient(circle at 100% 80%, hsla(215, 55%, 22%, 0.03), transparent 50%);
}

:root[data-theme="dark"] body::before {
  background-image:
    radial-gradient(circle at 20% 0%, hsla(40, 45%, 58%, 0.06), transparent 40%),
    radial-gradient(circle at 100% 80%, hsla(215, 55%, 60%, 0.04), transparent 50%);
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

/* Safety net — sem isso, SVGs sem largura definida ocupam a viewport toda */
svg { display: inline-block; width: 1.25rem; height: 1.25rem; flex-shrink: 0; vertical-align: middle; }
img { max-width: 100%; height: auto; }

.font-display,
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }

::selection {
  background: var(--champagne);
  color: var(--navy-deep);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .login-page { grid-template-columns: 1.1fr 1fr; }
}

.login-brand {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 70%);
  color: hsl(40, 30%, 95%);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(40, 45%, 58%, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
  opacity: 0.4;
}

.login-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-monogram {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid hsla(40, 45%, 58%, 0.4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--champagne);
}

.login-org-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.login-org-sub {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: hsla(40, 30%, 95%, 0.55);
  text-transform: uppercase;
  margin-top: 0.125rem;
}

.login-hero {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin: 3rem 0;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 1.25rem;
}

.login-eyebrow::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--champagne);
}

.login-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 400;
  font-variation-settings: 'opsz' 48, 'SOFT' 30;
  line-height: 1.05;
  color: hsl(40, 30%, 96%);
  margin-bottom: 1.25rem;
}

.login-hero h1 em {
  font-style: italic;
  color: var(--champagne);
  font-weight: 400;
}

.login-hero p {
  font-size: 1.0625rem;
  color: hsla(40, 30%, 95%, 0.7);
  line-height: 1.5;
  max-width: 26rem;
}

.login-footer-brand {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  color: hsla(40, 30%, 95%, 0.5);
  letter-spacing: 0.04em;
}

.login-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

.login-form-card {
  width: 100%;
  max-width: 26rem;
}

.login-form-header {
  margin-bottom: 2rem;
}

.login-form-header h2 {
  font-size: 1.875rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}

.login-form-header p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.login-theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

@media (max-width: 899px) {
  .login-brand {
    min-height: auto;
    padding: 2rem 1.5rem 2.5rem;
  }
  .login-hero { margin: 2rem 0 1rem; }
  .login-hero h1 { font-size: 1.875rem; }
  .login-hero p { font-size: 0.95rem; }
  .login-form-area { min-height: auto; padding: 2.5rem 1.5rem 4rem; }
}

/* =====================================================================
   FORM CONTROLS
   ===================================================================== */
.field { margin-bottom: 1.25rem; }

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.9375rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.input:hover:not(:focus),
.textarea:hover:not(:focus),
.select:hover:not(:focus) { border-color: var(--line-strong); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px hsla(215, 55%, 22%, 0.1);
}

:root[data-theme="dark"] .input:focus,
:root[data-theme="dark"] .textarea:focus,
:root[data-theme="dark"] .select:focus {
  border-color: var(--champagne);
  box-shadow: 0 0 0 4px hsla(40, 45%, 60%, 0.15);
}

.input::placeholder,
.textarea::placeholder { color: var(--ink-mute); }

.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

.input-cpf {
  text-align: center;
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  padding: 1rem;
  font-weight: 500;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 24, 'SOFT' 50;
}

/* =====================================================================
   BOTÕES
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  border: 1.5px solid transparent;
  position: relative;
  isolation: isolate;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: hsl(40, 30%, 96%);
}
.btn-primary:hover:not(:disabled) { background: var(--navy-deep); }

:root[data-theme="dark"] .btn-primary {
  background: var(--champagne);
  color: var(--navy-deep);
}
:root[data-theme="dark"] .btn-primary:hover:not(:disabled) {
  background: var(--champagne-deep);
}

.btn-gold {
  background: var(--navy);
  color: hsl(40, 30%, 96%);
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--champagne-deep), var(--champagne));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: -1;
}

.btn-gold:hover:not(:disabled)::before { opacity: 1; }
.btn-gold:hover:not(:disabled) { color: var(--navy-deep); }

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-muted);
  border-color: var(--ink-mute);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-muted); color: var(--ink); }

.btn-danger {
  background: transparent;
  border-color: hsla(355, 65%, 48%, 0.3);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 8px;
}

.btn-large {
  width: 100%;
  padding: 0.875rem 1.25rem;
}

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.875rem; }

.btn-on-dark {
  background: hsla(40, 30%, 96%, 0.08);
  border-color: hsla(40, 30%, 96%, 0.2);
  color: hsl(40, 30%, 96%);
  backdrop-filter: blur(8px);
}
.btn-on-dark:hover:not(:disabled) {
  background: hsla(40, 30%, 96%, 0.15);
  border-color: hsla(40, 30%, 96%, 0.35);
}

.btn-ghost-on-dark {
  background: transparent;
  color: hsla(40, 30%, 96%, 0.8);
}
.btn-ghost-on-dark:hover:not(:disabled) {
  background: hsla(40, 30%, 96%, 0.1);
  color: hsl(40, 30%, 96%);
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.app-header {
  background: linear-gradient(180deg, var(--navy-deep), var(--navy));
  color: hsl(40, 30%, 96%);
  position: relative;
  border-bottom: 1px solid hsla(0, 0%, 0%, 0.2);
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--champagne) 50%, transparent 95%);
  opacity: 0.5;
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.app-monogram {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid hsla(40, 45%, 58%, 0.4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--champagne);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.app-brand-text { min-width: 0; }

.app-brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: hsl(40, 30%, 96%);
  font-variation-settings: 'opsz' 18, 'SOFT' 50;
}

.app-brand-text p {
  font-size: 0.75rem;
  color: hsla(40, 30%, 96%, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.125rem;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: hsla(40, 30%, 96%, 0.7);
  background: hsla(40, 30%, 96%, 0.06);
  border: 1px solid hsla(40, 30%, 96%, 0.15);
  transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
  background: hsla(40, 30%, 96%, 0.12);
  color: hsl(40, 30%, 96%);
}

.theme-toggle svg { width: 1.125rem; height: 1.125rem; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.theme-toggle.theme-toggle-light {
  color: var(--ink-soft);
  background: var(--surface-alt);
  border-color: var(--line);
}
.theme-toggle.theme-toggle-light:hover {
  background: var(--bg-muted);
  color: var(--ink);
}

/* =====================================================================
   MAIN
   ===================================================================== */
main.app-main {
  padding: 2.5rem 0 4rem;
}

.page-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.page-toolbar-text { flex: 1; }

.page-toolbar h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  font-variation-settings: 'opsz' 28, 'SOFT' 50;
}

.page-toolbar p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =====================================================================
   USER STATUS
   ===================================================================== */
.user-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.user-status::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--champagne);
}

.user-status-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--champagne-soft);
  color: var(--champagne-deep);
  flex-shrink: 0;
}

.user-status-icon svg { width: 1.25rem; height: 1.25rem; }

.user-status-text { flex: 1; min-width: 0; }

.user-status-text .primary {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.user-status-text .meta {
  font-size: 0.8125rem;
  color: var(--ink-mute);
  margin-top: 0.125rem;
  letter-spacing: 0.02em;
}

.user-status-text .registered {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.user-status-text .registered svg { width: 0.875rem; height: 0.875rem; }

/* =====================================================================
   EVENTO CARDS
   ===================================================================== */
.evento-grid {
  display: grid;
  gap: 1.25rem;
  animation: fadeIn 0.5s var(--ease-out);
}

.sol-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease);
  animation: cardIn 0.5s var(--ease-out) backwards;
}

.sol-card:nth-child(1) { animation-delay: 0.05s; }
.sol-card:nth-child(2) { animation-delay: 0.12s; }
.sol-card:nth-child(3) { animation-delay: 0.19s; }
.sol-card:nth-child(4) { animation-delay: 0.26s; }
.sol-card:nth-child(5) { animation-delay: 0.33s; }
.sol-card:nth-child(n+6) { animation-delay: 0.4s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sol-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sol-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--line);
  transition: background-color 0.25s var(--ease);
}

.sol-card[data-status="open"]::before    { background: var(--champagne); }
.sol-card[data-status="full"]::before    { background: var(--danger); }
.sol-card[data-status="enrolled"]::before { background: var(--success); }

.sol-card-body { padding: 1.5rem 1.75rem; }

.sol-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sol-card-title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.375rem;
  font-variation-settings: 'opsz' 22, 'SOFT' 50;
}

.sol-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 56ch;
}

.sol-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.sol-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sol-meta-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--ink-mute);
  flex-shrink: 0;
}

.vagas-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
}

.vagas-bar {
  flex: 1;
  height: 0.375rem;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.vagas-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--champagne);
  transition: width 0.5s var(--ease-out);
}

.sol-card[data-status="full"] .vagas-bar-fill { background: var(--danger); }
.sol-card[data-status="enrolled"] .vagas-bar-fill { background: var(--success); }

.vagas-text {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.vagas-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}

/* =====================================================================
   BADGES
   ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge svg { width: 0.875rem; height: 0.875rem; }

.badge-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: hsla(155, 45%, 35%, 0.2);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: hsla(355, 65%, 48%, 0.2);
}

.badge-neutral {
  background: var(--bg-muted);
  color: var(--ink-soft);
  border-color: var(--line);
}

/* =====================================================================
   TABELA
   ===================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

table.table thead { background: var(--surface-alt); }

table.table th {
  text-align: left;
  padding: 0.875rem 1.125rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

table.table td {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr { transition: background-color 0.15s var(--ease); }
table.table tbody tr:hover { background: var(--surface-alt); }

/* =====================================================================
   EMPTY STATE
   ===================================================================== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ink-mute);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--ink-mute);
}

.empty-state-icon svg { width: 1.5rem; height: 1.5rem; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

.empty-state p { font-size: 0.9375rem; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: hsla(215, 40%, 8%, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: backdropIn 0.2s var(--ease-out);
}

.modal-backdrop.open { display: flex; }

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
  animation: modalIn 0.3s var(--ease-out);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header { margin-bottom: 1.5rem; }

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
  font-variation-settings: 'opsz' 24, 'SOFT' 50;
}

.modal-body { display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* =====================================================================
   TOASTS
   ===================================================================== */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: calc(100vw - 2.5rem);
}

.toast {
  pointer-events: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.875rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 240px;
  animation: toastIn 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--navy);
}

.toast.toast-success::before { background: var(--success); }
.toast.toast-error::before { background: var(--danger); }

.toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error .toast-icon { color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =====================================================================
   FORM ERROR
   ===================================================================== */
.form-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--danger);
  padding: 0.75rem 1rem;
  background: var(--danger-soft);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  animation: shake 0.4s var(--ease);
}

.form-error svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-sol-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  gap: 1rem;
}

.admin-sol-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.admin-sol-card[data-selected="true"] {
  border-color: var(--navy);
  background: var(--surface-alt);
  box-shadow: 0 0 0 3px hsla(215, 55%, 22%, 0.08);
}

:root[data-theme="dark"] .admin-sol-card[data-selected="true"] {
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px hsla(40, 45%, 60%, 0.12);
}

.admin-sol-info { flex: 1; min-width: 0; cursor: pointer; }

.admin-sol-info h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-variation-settings: 'opsz' 20, 'SOFT' 50;
}

.admin-sol-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

.admin-sol-info .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.admin-sol-info .meta svg { width: 0.875rem; height: 0.875rem; }

.admin-sol-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2.5rem;
}

.inscritos-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.inscritos-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.inscritos-section-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-variation-settings: 'opsz' 22, 'SOFT' 50;
}

.inscritos-section-header h3 svg { color: var(--champagne-deep); }

.inscritos-count {
  font-size: 0.8125rem;
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.text-danger { color: var(--danger); }

/* =====================================================================
   UTILITÁRIOS
   ===================================================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.flex-1 { flex: 1; min-width: 0; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-muted { color: var(--ink-mute); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (max-width: 640px) {
  .app-brand-text h1 { font-size: 0.9375rem; }
  .app-brand-text p { font-size: 0.6875rem; }
  .sol-card-body { padding: 1.25rem; }
  .sol-card-title { font-size: 1.125rem; }
  .modal { padding: 1.5rem; }
  .user-status { flex-direction: column; align-items: flex-start; gap: 0.875rem; }
  .admin-sol-card { flex-direction: column; align-items: stretch; }
  .admin-sol-actions { justify-content: flex-end; }
}

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

/* =====================================================================
   SPRINT 1 — Componentes adicionais
   ===================================================================== */

/* Tabs do admin (Eventos / Participantes) */
.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s var(--ease);
  border-radius: 6px 6px 0 0;
}

.admin-tab:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.admin-tab.active {
  color: var(--navy);
  border-bottom-color: var(--champagne);
  background: var(--surface);
}

:root[data-theme="dark"] .admin-tab.active {
  color: var(--champagne);
}

.admin-tab svg {
  width: 1rem;
  height: 1rem;
}

/* Filtros de período (Futuras / Passadas / Todas) */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  width: fit-content;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: calc(var(--radius) - 4px);
  transition: all 0.2s var(--ease);
}

.filter-tab:hover {
  color: var(--ink);
}

.filter-tab.active {
  background: var(--bg-elevated);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.filter-count {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--ink-mute);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.filter-tab.active .filter-count {
  background: var(--champagne-soft);
  color: var(--champagne-deep);
}

/* Filtro de busca */
.filters-bar {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.filter-field {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-field .filter-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--ink-mute);
  pointer-events: none;
}

.filter-field .input {
  padding-left: 2.5rem;
}

/* Badge mini (status compactos) */
.badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  background: var(--champagne-soft);
  color: var(--champagne-deep);
}

.badge-mini-mute {
  background: var(--bg-muted);
  color: var(--ink-mute);
}

.badge-mini-warning {
  background: hsla(35, 80%, 50%, 0.15);
  color: hsl(35, 80%, 35%);
}

:root[data-theme="dark"] .badge-mini-warning {
  background: hsla(35, 80%, 50%, 0.2);
  color: hsl(35, 80%, 65%);
}

/* Evento passado — sutil opacidade */
.admin-sol-card.is-past {
  opacity: 0.7;
}

.admin-sol-card.is-past:hover {
  opacity: 1;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: all 0.15s var(--ease);
}

.pagination-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-alt);
}

.pagination-link.active {
  background: var(--navy);
  color: hsl(40, 30%, 96%);
  border-color: var(--navy);
}

:root[data-theme="dark"] .pagination-link.active {
  background: var(--champagne);
  color: var(--navy-deep);
  border-color: var(--champagne);
}

/* Checkbox row */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--ink);
  user-select: none;
}

.checkbox-row input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--navy);
  cursor: pointer;
}

:root[data-theme="dark"] .checkbox-row input[type="checkbox"] {
  accent-color: var(--champagne);
}

/* Modal — grid de 2 colunas para campos curtos */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .modal-grid { grid-template-columns: 1fr; }
}

/* Alertas em página (não toasts) */
.alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid;
  line-height: 1.5;
}

.alert svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-success {
  background: var(--success-soft);
  border-color: hsla(155, 45%, 35%, 0.25);
  color: var(--success);
}

.alert-error {
  background: var(--danger-soft);
  border-color: hsla(355, 65%, 48%, 0.25);
  color: var(--danger);
}

.alert-warning {
  background: hsla(35, 80%, 50%, 0.1);
  border-color: hsla(35, 80%, 50%, 0.3);
  color: hsl(35, 70%, 35%);
}

:root[data-theme="dark"] .alert-warning {
  color: hsl(35, 80%, 70%);
}

.alert ul {
  list-style: disc;
}
