/* ============================================================
   GARRAS DE ÁGUIA — Estilos Globais
   Paleta: Azul Marinho · Branco Neve · Ouro Dourado
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ---------- Variáveis ---------- */
:root {
  --navy:       #0a1628;
  --navy-mid:   #112240;
  --navy-light: #1a3255;
  --gold:       #c9a84c;
  --gold-light: #e2c060;
  --gold-pale:  #f5e6b2;
  --snow:       #f8faff;
  --white:      #ffffff;
  --gray-light: #e8edf5;
  --gray-mid:   #a0aec0;
  --danger:     #e53e3e;
  --success:    #38a169;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.18);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.25);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.35);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: 0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background: var(--navy);
  color: var(--snow);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

a { text-decoration: none; color: inherit; }

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

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ============================================================
   BACKGROUND PATTERN
   ============================================================ */
.page-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 10%, rgba(201,168,76,0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--navy) 0%, #0d1e38 100%);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-bottom: 2px solid var(--gold);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 6px rgba(201,168,76,0.5));
}

.navbar-brand span {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.navbar-brand small {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  color: var(--gray-mid);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-light);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.12);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gray-mid);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
}

/* Hamburger */
.navbar-toggler {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggler span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.navbar-collapse {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(201,168,76,0.12) 0%, transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, #0d1e38 100%);
  padding: 1.5rem;
}

.login-card {
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(201,168,76,0.08);
  text-align: center;
}

.login-logo {
  width: 90px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 4px 12px rgba(201,168,76,0.4));
}

.login-title {
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.8rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.login-role-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.role-tab {
  flex: 1;
  padding: 0.45rem;
  border: none;
  background: transparent;
  color: var(--gray-mid);
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role-tab.active {
  background: var(--gold);
  color: var(--navy);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--snow);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-control::placeholder { color: rgba(255,255,255,0.25); }

.form-control option { background: var(--navy-mid); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(201,168,76,0.45);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--snow);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
}

.btn-danger {
  background: rgba(229,62,62,0.15);
  color: #fc8181;
  border: 1px solid rgba(229,62,62,0.3);
}

.btn-danger:hover {
  background: rgba(229,62,62,0.3);
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: linear-gradient(145deg, var(--navy-mid), rgba(26,50,85,0.6));
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover { border-color: rgba(201,168,76,0.35); }

.card-title {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.3rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.3rem;
  background: var(--gold);
  border-radius: 2px;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  padding: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.page-section { display: none; }
.page-section.active { display: block; }

/* ============================================================
   DESBRAVADOR CARD (list)
   ============================================================ */
.desb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.desb-card {
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.desb-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.2);
}

.desb-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(201,168,76,0.3);
}

.desb-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--gold);
  box-shadow: 0 4px 14px rgba(201,168,76,0.3);
}

.desb-name {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--snow);
}

.desb-unit {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(201,168,76,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.25);
}

.desb-points {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-light);
}

.desb-points-label {
  font-size: 0.68rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: -6px;
}

.desb-role-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.badge-diretoria {
  background: rgba(201,168,76,0.2);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
}

.badge-desbravador {
  background: rgba(66,153,225,0.15);
  color: #90cdf4;
  border: 1px solid rgba(66,153,225,0.3);
}

.desb-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

/* ============================================================
   MOUNT EVEREST PODIUM PAGE
   ============================================================ */
.everest-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #1a3a6e 0%, #0d2548 40%, #081828 100%);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 1.5rem 1rem 0;
  min-height: 520px;
}

.everest-title {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(201,168,76,0.5);
}

.everest-svg-wrapper {
  position: relative;
  width: 100%;
}

.everest-svg-wrapper svg {
  width: 100%;
  display: block;
}

/* Climbers on the mountain */
.climber-list {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  padding: 0 0.5rem 1rem;
}

.climber-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: var(--transition);
}

.climber-item:hover { background: rgba(201,168,76,0.08); }

.climber-rank {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.1rem;
  min-width: 32px;
  text-align: center;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }
.rank-other { color: var(--gray-mid); font-size: 0.9rem; }

.climber-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,168,76,0.5);
}

.climber-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  border: 2px solid rgba(201,168,76,0.5);
}

.climber-info { flex: 1; min-width: 0; }

.climber-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--snow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.climber-unit {
  font-size: 0.7rem;
  color: var(--gray-mid);
}

.climber-points {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--gold-light);
  white-space: nowrap;
}

.climber-pts-label {
  font-size: 0.65rem;
  color: var(--gray-mid);
  text-align: right;
}

/* Altitude marker on mountain */
.climber-flag {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  transition: transform 0.6s cubic-bezier(.34,1.56,.64,1);
}

.climber-flag-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: var(--navy-light);
  box-shadow: 0 0 10px rgba(201,168,76,0.5);
}

.climber-flag-line {
  width: 2px;
  height: 14px;
  background: var(--gold);
}

.climber-flag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,10,20,0.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-box {
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(201,168,76,0.1);
  animation: modalIn 0.3s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.1rem;
  color: var(--gold);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--gray-mid);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover { color: var(--danger); background: rgba(229,62,62,0.1); }

.modal-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  min-width: 240px;
  max-width: 340px;
}

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

.toast-success { background: #1c4532; border: 1px solid #38a169; color: #9ae6b4; }
.toast-error   { background: #742a2a; border: 1px solid #e53e3e; color: #feb2b2; }
.toast-info    { background: #1a365d; border: 1px solid #4299e1; color: #90cdf4; }

/* ============================================================
   STATS SUMMARY
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ============================================================
   POINTS HISTORY
   ============================================================ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
  gap: 0.5rem;
}

.history-item-info { flex: 1; min-width: 0; }
.history-item-name {
  font-weight: 700;
  color: var(--snow);
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-date { color: var(--gray-mid); font-size: 0.72rem; }
.history-item-desc { color: var(--gray-mid); font-size: 0.72rem; font-style: italic; }

.history-points-positive {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: #68d391;
  white-space: nowrap;
}

.history-points-negative {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: #fc8181;
  white-space: nowrap;
}

.history-points-reset {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: var(--gold);
  white-space: nowrap;
}

/* ============================================================
   IMAGE UPLOAD PREVIEW
   ============================================================ */
.avatar-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.avatar-preview:hover { border-color: var(--gold-light); }

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-icon {
  font-size: 2rem;
  color: var(--gray-mid);
}

.avatar-upload-label {
  font-size: 0.75rem;
  color: var(--gray-mid);
  cursor: pointer;
  text-decoration: underline;
}

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--gray-mid);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-mid);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-state-text { font-size: 0.9rem; }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
  margin: 1.5rem 0;
}

/* ============================================================
   SEARCH INPUT
   ============================================================ */
.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-mid);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  padding-left: 2.2rem;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-bar {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 0.45rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--gray-mid);
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--gold);
  color: var(--navy);
}

/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */
.input-group {
  position: relative;
}

.input-group .form-control { padding-right: 2.5rem; }

.pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  font-size: 0.9rem;
  padding: 0;
  transition: var(--transition);
}

.pw-toggle:hover { color: var(--gold); }

/* ============================================================
   MY POINTS VIEW (desbravador)
   ============================================================ */
.my-points-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.my-points-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 6px 24px rgba(201,168,76,0.35);
}

.my-points-value {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 30px rgba(201,168,76,0.4);
}

.my-points-label {
  font-size: 0.8rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.3rem;
}

.my-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: 0.75rem;
}

/* ============================================================
   APONTAMENTOS TABLE-LIKE
   ============================================================ */
.apont-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.apont-card {
  background: linear-gradient(145deg, var(--navy-mid), rgba(26,50,85,0.5));
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  transition: var(--transition);
}

.apont-card:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-1px);
}

.apont-last {
  font-size: 0.68rem;
  color: var(--gray-mid);
  font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .navbar-toggler { display: block; }

  .navbar-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-mid);
    border-bottom: 2px solid var(--gold);
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
  }

  .navbar-collapse.open { display: flex; }

  .navbar-nav { flex-direction: column; width: 100%; }

  .nav-link { width: 100%; padding: 0.5rem 0.75rem; }

  .nav-user-info { width: 100%; justify-content: space-between; }

  .page-content { padding: 1rem; }

  .desb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .apont-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .modal-box { padding: 1.5rem; }

  .login-card { padding: 1.75rem 1.25rem; }

  .everest-container { min-height: 400px; }

  .my-points-value { font-size: 2.8rem; }
}

@media (max-width: 480px) {
  .section-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .desb-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   GOLD SHIMMER ANIMATION
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.gold-shimmer {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-pale) 40%, var(--gold) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ============================================================
   LOGO DECORATIVE TRIANGLE
   ============================================================ */
.pathfinder-logo {
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}

/* ============================================================
   FIREBASE LOADING SCREEN
   ============================================================ */
#initial-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#initial-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 80px;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.5));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(201,168,76,0.5)); }
  50%       { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(201,168,76,0.8)); }
}

.loader-text {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
