/* ============================================================
   CMP Club · assets/css/layout.css
   Shell mobile · Header · Bottom Nav · Safe Area
   ============================================================ */

/* ── APP SHELL ────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── HEADER FIXO ──────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

/* Logo */
.logo-wrap { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-text-cmp  { font-size: 14px; font-weight: 700; color: var(--white); letter-spacing: -0.3px; line-height: 1; }
.logo-text-club { font-size: 7px;  font-weight: 300; color: var(--gray);  letter-spacing: 3px; margin-top: 2px; }

/* Ações do header */
.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  position: relative;
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--gray);
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.05); }

.notif-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}

.avatar-btn {
  width: 30px; height: 30px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #111;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

/* ── CONTEÚDO PRINCIPAL ───────────────────────────────────── */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  /* Garante que o conteúdo não fique escondido atrás da bottom nav */
  padding-bottom: calc(16px + var(--bottom-h) + var(--safe-bottom));
}

/* ── BOTTOM NAV ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: calc(8px + var(--safe-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  justify-content: center;
  cursor: pointer;
  flex: 1;
  text-decoration: none;
  border: none;
  background: none;
  color: var(--gray);
  transition: color 0.15s;
}
.nav-item .nav-label  { font-size: 10px; color: #555; transition: color 0.15s; }
.nav-item.active .nav-label { color: var(--gold); }
.nav-item.active svg  { stroke: var(--gold) !important; }

.nav-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 1px;
  opacity: 0;
}
.nav-item.active .nav-dot { opacity: 1; }

/* ── AUTH LAYOUT ──────────────────────────────────────────── */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-title    { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--gray); margin-bottom: 24px; }

/* ── PAGE HEADER (dentro de app-content) ──────────────────── */
.page-header { margin-bottom: 20px; }
.page-header .greeting { font-size: 10px; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.page-header h1 { font-size: 20px; font-weight: 700; }
.page-header p  { font-size: 13px; color: var(--gray); margin-top: 3px; }
