:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #0f1722;
  --muted: #6b7280;
  --primary: #5e6bff;
  --primary-strong: #3f4ce0;
  --secondary: #10b981;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.12);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

.btn {
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  white-space: nowrap;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: overflow 0.3s ease;
}

body.nav-locked {
  overflow: hidden;
}

.nav-overlay {
  border-radius: 6px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  pointer-events: none;
}

.nav-overlay.is-visible {
  background: rgba(17, 24, 39, 0.45);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 70px;
  backdrop-filter: blur(12px);
  background: #2b3fbf;
  border-bottom: 4px solid #69c578;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.16);
}

.nav-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.brand-logo img {
  width: 165px;
  height: 165px;
  object-fit: contain;
}

/* .brand-logo svg {
  width: 50px;
  height: 50px;
} */

.brand-text {
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.4px;
}

/* Navegação */
.nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.nav-link[aria-current="page"] {
  color: #ffffff;
  background: #5e6bff;
}

.nav-link i {
  width: 18px;
  height: 18px;
}

.btn {
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary-strong);
  border: 1px solid rgba(94, 107, 255, 0.2);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
}

.btn-outline:hover {
  background: #fff;
  border-color: rgba(94, 107, 255, 0.35);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08);
}

.btn-solid {
  background: #10b981; /* green like Valida Inscrição */
  color: #fff;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.18);
}

.btn-solid:hover {
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22);
}

.nav-link.btn-validate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: #10b981;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
}

.nav-link.btn-event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: #5e6bff;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
}

.nav-link.btn-perfil {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #5e6bff;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
}

.nav-link.btn-validate i {
  color: #ffffff;
  width: 18px;
  height: 18px;
}

.nav-actions .nav-link,
.nav-actions .btn,
.nav-link.btn-validate,
.user-menu-btn {
  background: #10b981;
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.18);
  border-radius: 6px;
}

.nav-actions .nav-link:hover,
.nav-actions .btn:hover,
.nav-link.btn-validate:hover,
.user-menu-btn:hover {
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.user-menu-btn:hover {
  border-color: rgba(94, 107, 255, 0.35);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.1);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(94, 107, 255, 0.2);
}

.user-menu-btn i {
  width: 18px;
  height: 18px;
}

@media (min-width: 620px) {
  .user-name-short {
    display: inline;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.profile-dropdown {
  position: fixed;
  top: 72px;
  right: 16px;
  width: 280px;
  background: var(--surface-strong);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
}

.profile-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.validate-dropdown {
  width: 340px;
}

.validate-dropdown-header {
  align-items: center;
}

.validate-avatar {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.validate-avatar i {
  width: 22px;
  height: 22px;
}

.validate-dropdown-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.validate-cpf-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.validate-cpf-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.validate-cpf-input:focus {
  border-color: rgba(94, 107, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 107, 255, 0.12);
}

.validate-dropdown-actions {
  display: grid;
  gap: 8px;
}

.validate-action-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.validate-action-btn:hover,
.validate-action-btn:focus-visible {
  transform: translateY(-1px);
}

.validate-submit {
  background: linear-gradient(135deg, var(--secondary), #0ea371);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.18);
}

.validate-cancel {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
}

.dropdown-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(
    135deg,
    rgba(105, 197, 120, 0.08),
    rgba(73, 86, 224, 0.08)
  );
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(105, 197, 120, 0.25);
}

.user-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-location {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

.user-email {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-divider {
  height: 1px;
  background: rgba(20, 33, 61, 0.06);
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;

  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.dropdown-item:hover {
  background: rgba(94, 107, 255, 0.1);
  color: var(--primary);
  padding-left: 20px;
}

.dropdown-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-item:hover i {
  transform: translateX(2px);
}

.dropdown-item.logout {
  color: var(--danger);
}

.dropdown-item.logout:hover {
  background: rgba(220, 38, 38, 0.08);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.08);
}

.menu-toggle:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.menu-icon::before {
  position: absolute;
  top: -6px;
}
.menu-icon::after {
  position: absolute;
  top: 6px;
}

.menu-toggle.is-active .menu-icon {
  background: transparent;
}
.menu-toggle.is-active .menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.is-active .menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-group {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
    padding: 14px;
    flex-direction: column;
    gap: 12px;
    z-index: 60;
    animation: navSlideDown 0.25s ease;
  }

  .nav-group.is-open {
    display: flex;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .btn,
  .user-menu-btn {
    width: 100%;
    justify-content: space-between;
  }

  .nav-inner {
    width: min(1280px, calc(100% - 20px));
    gap: 16px;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 15px;
  }

  .btn {
    padding: 12px 14px;
    font-size: 15px;
  }

  .user-menu-btn {
    border-radius: 6px;
  }

  .profile-dropdown,
  .profile-dropdown.btn-perfil {
    top: 76px;
    right: 12px !important;
    left: auto !important;
    width: min(320px, calc(100vw - 24px));
    min-width: 200px;
    max-width: 320px;
    background: var(--surface-strong, #fff);
    color: var(--text, #0f1722);
    border: none;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    pointer-events: none;
  }

  .validate-dropdown {
    top: 76px;
    right: 12px !important;
    left: auto !important;
    width: min(340px, calc(100vw - 24px));
    min-width: 200px;
    max-width: 340px;
  }

  .profile-dropdown.is-open,
  .profile-dropdown.btn-perfil.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .validate-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

.brand-logo img {
  width: 165px;
  height: 165px;
}

.user-avatar-small {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

@media (max-width: 600px) {
  .profile-dropdown,
  .profile-dropdown.btn-perfil {
    width: calc(100vw - 24px);
    right: 12px !important;
    left: auto !important;
    min-width: auto;
    max-width: none;
  }

  .validate-dropdown {
    width: calc(100vw - 24px);
    right: 12px !important;
    left: auto !important;
    min-width: auto;
    max-width: none;
  }
}
