/* =============================================
   STUDYQUEST — STYLE.CSS
   Tema: RPG Colorido / Game UI
   ============================================= */

/* === VARIÁVEIS & TEMA === */
:root {
  --bg-base: #0d0f1a;
  --bg-card: #161929;
  --bg-card2: #1e2238;
  --bg-sidebar: #111320;
  --border: rgba(255,255,255,0.07);
  --text: #e8eaf6;
  --text-muted: #8892b0;
  --text-dim: #4a5278;

  --primary: #7c3aed;
  --primary-light: #9d5bf4;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --xp-color: #a78bfa;
  --coins-color: #fbbf24;
  --streak-color: #fb923c;
  --level-color: #34d399;

  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(124,58,237,0.3);

  --sidebar-w: 240px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);

  font-family: 'Nunito', sans-serif;
}

[data-theme="light"] {
  --bg-base: #f0f2ff;
  --bg-card: #ffffff;
  --bg-card2: #f5f7ff;
  --bg-sidebar: #1e2238;
  --border: rgba(0,0,0,0.08);
  --text: #1a1f3c;
  --text-muted: #4a5278;
  --text-dim: #8892b0;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* === SCREENS === */
.screen { display: none !important; }
.screen.active { display: block !important; }
#app.active { display: flex !important; }

/* === SETUP SCREEN === */
#setup-screen.active {
  min-height: 100vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d0f1a 0%, #1a0533 50%, #0d1f3c 100%);
  position: relative;
  overflow: hidden;
}

#setup-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124,58,237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.setup-container {
  background: rgba(22,25,41,0.95);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 24px;
  padding: 3rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 60px rgba(124,58,237,0.1);
  animation: float-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes float-in {
  from { opacity:0; transform: translateY(40px) scale(0.95); }
  to { opacity:1; transform: translateY(0) scale(1); }
}

.setup-logo { margin-bottom: 2rem; }
.setup-logo .logo-icon {
  font-size: 4rem;
  display: block;
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,100% { filter: drop-shadow(0 0 10px rgba(124,58,237,0.5)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 30px rgba(124,58,237,0.8)); transform: scale(1.05); }
}

.setup-logo h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-logo p { color: var(--text-muted); margin-top: 0.5rem; }

.setup-form h2 { margin-bottom: 1.5rem; color: var(--text); }

.avatar-picker { margin-bottom: 1.5rem; }
.avatar-picker p { color: var(--text-muted); margin-bottom: 0.75rem; font-size: 0.9rem; }

.avatar-grid, .emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.avatar-opt, .emoji-opt {
  font-size: 1.6rem;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  background: var(--bg-card2);
  text-align: center;
}
.avatar-opt:hover, .emoji-opt:hover { border-color: var(--primary-light); transform: scale(1.1); }
.avatar-opt.selected, .emoji-opt.selected {
  border-color: var(--primary);
  background: rgba(124,58,237,0.2);
  box-shadow: 0 0 12px rgba(124,58,237,0.4);
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-base);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  margin-bottom: 1rem;
  outline: none;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
select option { background: var(--bg-card); }

/* === BOTÕES === */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,58,237,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-card2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text); }

.btn-huge {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
  background: rgba(124,58,237,0.15);
  color: var(--primary-light);
  border: 1px solid rgba(124,58,237,0.3);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  transition: var(--transition);
}
.btn-small:hover { background: rgba(124,58,237,0.25); }

/* === APP LAYOUT === */
#app { display: flex !important; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  border-right: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
}

.sidebar-user {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(124,58,237,0.05);
}

.user-avatar {
  font-size: 2rem;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,0.2);
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.4);
}

.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 800; font-size: 0.95rem; }
.user-level { font-size: 0.75rem; color: var(--level-color); font-weight: 700; }

.nav-items { flex: 1; padding: 1rem 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  margin-bottom: 2px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(124,58,237,0.08);
}

.nav-item.active {
  color: var(--primary-light);
  background: rgba(124,58,237,0.12);
  border-left-color: var(--primary);
}

/* Badge do item de notificações no sidebar */
.nav-item-notif { position: relative; }
.notif-badge-sidebar {
  position: static;
  margin-left: auto;
  transform: none;
  top: unset; right: unset;
}

.sidebar-bottom {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.theme-toggle {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}
.theme-toggle:hover { background: var(--bg-card); color: var(--text); }

/* === TOPBAR (mobile) === */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  align-items: center;
  gap: 1rem;
}

.menu-btn {
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
}

.topbar-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.topbar-stats {
  display: flex;
  gap: 1rem;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Bell da topbar — visível só no mobile */
.topbar-notif-btn {
  position: relative;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1.15rem;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124,58,237,.45);
}
.topbar-notif-btn:active { transform: scale(0.88); }
.topbar-notif-btn:hover  { box-shadow: 0 4px 14px rgba(124,58,237,.6); transform: translateY(-1px); }
.topbar-notif-btn .notif-bell-badge { top: -5px; right: -6px; }

/* Bell do dashboard — visível só no desktop */
.dash-notif-btn {
  display: none; /* visível no desktop via media query */
}

/* Linha do header do dashboard (h1 + bell) */
.dash-header-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.install-btn-topbar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  padding: 5px 8px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  flex-shrink: 0;
}
.install-btn-topbar:active { transform: scale(0.93); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* === MAIN CONTENT === */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 2rem;
  flex: 1;
  min-height: 100vh;
  max-width: 1100px;
}

/* === PAGES === */
.page { display: none; animation: page-in 0.3s ease; }
.page.active { display: block; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.page-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle { color: var(--text-muted); margin-top: 0.25rem; font-weight: 600; }

/* === BOOSTS BAR === */
.boosts-bar {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: pulse-border 2s ease-in-out infinite;
}
@keyframes pulse-border {
  0%,100% { border-color: rgba(245,158,11,0.3); }
  50% { border-color: rgba(245,158,11,0.7); }
}

.boost-item {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245,158,11,0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(245,158,11,0.2);
}

/* === NOTIFICATIONS === */
.notifications-area {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 320px;
}

.notification {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: all;
}

.notification.success { border-left: 4px solid var(--success); }
.notification.warning { border-left: 4px solid var(--warning); }
.notification.error { border-left: 4px solid var(--danger); }
.notification.info { border-left: 4px solid var(--secondary); }
.notification.xp { border-left: 4px solid var(--xp-color); }

@keyframes slide-in {
  from { opacity:0; transform: translateX(100%); }
  to { opacity:1; transform: translateX(0); }
}

@keyframes slide-out {
  from { opacity:1; transform: translateX(0); }
  to { opacity:0; transform: translateX(100%); }
}

/* === STATS GRID (dashboard) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.xp-card::before { background: linear-gradient(90deg, var(--xp-color), #c4b5fd); }
.coins-card::before { background: linear-gradient(90deg, var(--coins-color), #fde68a); }
.streak-card::before { background: linear-gradient(90deg, var(--streak-color), #fdba74); }
.level-card::before { background: linear-gradient(90deg, var(--level-color), #6ee7b7); }

.stat-icon { font-size: 2rem; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.stat-val { font-family: 'Fredoka One', cursive; font-size: 1.6rem; display: block; }

/* === XP BAR === */
.xp-bar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.xp-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.xp-bar-track {
  height: 20px;
  background: var(--bg-base);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--xp-color));
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}

.xp-bar-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
  to { left: 100%; }
}

/* === DAILY GOAL === */
.daily-goal-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.section-header h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
}

.goal-bar-track {
  height: 14px;
  background: var(--bg-base);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #34d399);
  border-radius: 7px;
  transition: width 0.5s;
}

#goal-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; }

.link-btn {
  font-size: 0.85rem;
  color: var(--primary-light);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }

/* === MISSIONS PREVIEW === */
.missions-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* === POMODORO === */
.pomodoro-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.pomodoro-widget { text-align: center; }

.pomodoro-display { display: flex; justify-content: center; margin: 1rem 0; }

.pomodoro-circle {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--bg-base) 0deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(124,58,237,0.3);
  box-shadow: 0 0 30px rgba(124,58,237,0.2), inset 0 0 20px rgba(0,0,0,0.3);
  position: relative;
  transition: box-shadow 0.3s;
}

.pomodoro-circle.active {
  box-shadow: 0 0 40px rgba(124,58,237,0.5), inset 0 0 20px rgba(0,0,0,0.3);
  animation: pomo-pulse 2s ease-in-out infinite;
}

@keyframes pomo-pulse {
  0%,100% { box-shadow: 0 0 30px rgba(124,58,237,0.4), inset 0 0 20px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 60px rgba(124,58,237,0.7), inset 0 0 20px rgba(0,0,0,0.3); }
}

#pomodoro-time {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--text);
}

#pomodoro-mode {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pomodoro-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.pomodoro-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* === PERSONAL RANKING === */
.personal-ranking {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.record-item {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  text-align: center;
  border: 1px solid var(--border);
}

.record-icon { font-size: 1.5rem; }
.record-val { font-family: 'Fredoka One', cursive; font-size: 1.4rem; margin: 0.25rem 0; display: block; }
.record-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }

/* === SUBJECTS PAGE === */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.subject-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.subject-icon { font-size: 2rem; }

.subject-name { font-family: 'Fredoka One', cursive; font-size: 1.2rem; }

.subject-level {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--level-color);
  background: rgba(16,185,129,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(16,185,129,0.2);
}

.subject-xp-bar {
  height: 8px;
  background: var(--bg-base);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.subject-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--xp-color));
  border-radius: 4px;
  transition: width 0.5s;
}

.subject-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.delete-btn {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  opacity: 0;
}
.subject-card:hover .delete-btn,
.task-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* === TASKS PAGE === */
.tasks-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active {
  background: rgba(124,58,237,0.15);
  color: var(--primary-light);
  border-color: rgba(124,58,237,0.3);
}

.tasks-list { display: flex; flex-direction: column; gap: 0.75rem; }

.task-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
}

.task-item:hover { border-color: rgba(124,58,237,0.2); }

.task-item.done { opacity: 0.6; }
.task-item.done .task-name { text-decoration: line-through; }

.task-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
  background: var(--bg-base);
}
.task-check:hover { border-color: var(--success); background: rgba(16,185,129,0.1); }
.task-item.done .task-check {
  border-color: var(--success);
  background: rgba(16,185,129,0.2);
}

.task-info { flex: 1; }
.task-name { font-weight: 700; font-size: 0.95rem; }
.task-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; font-weight: 600; }

.task-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.badge-easy { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-medium { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-hard { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

/* === EXAMS === */
.exams-list { display: flex; flex-direction: column; gap: 0.75rem; }

.exam-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exam-grade-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.grade-10 { background: rgba(16,185,129,0.2); color: var(--success); border: 2px solid var(--success); }
.grade-high { background: rgba(52,211,153,0.15); color: #34d399; border: 2px solid #34d399; }
.grade-mid { background: rgba(245,158,11,0.15); color: var(--warning); border: 2px solid var(--warning); }
.grade-low { background: rgba(239,68,68,0.15); color: var(--danger); border: 2px solid var(--danger); }

.exam-info { flex: 1; }
.exam-name { font-weight: 700; }
.exam-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-top: 0.2rem; }

.exam-xp {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--xp-color);
  background: rgba(167,139,250,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* === MISSIONS === */
.missions-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.reset-time { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

.mission-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

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

.mission-name { font-weight: 700; }
.mission-reward {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--xp-color);
}

.mission-bar-track {
  height: 8px;
  background: var(--bg-base);
  border-radius: 4px;
  overflow: hidden;
}

.mission-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--xp-color));
  border-radius: 4px;
  transition: width 0.5s;
}

.mission-progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 0.35rem;
}

.mission-item.completed {
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.05);
}

.mission-item.completed .mission-name { color: var(--success); }

/* === ACHIEVEMENTS === */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.achievement-card.unlocked {
  border-color: rgba(245,158,11,0.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(245,158,11,0.05));
}

.achievement-card.unlocked::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #fde68a);
}

.achievement-card:hover { transform: translateY(-3px); }

.achievement-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.achievement-card.locked .achievement-icon { filter: grayscale(100%) opacity(0.3); }

.achievement-name {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.achievement-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.achievement-card.locked .achievement-name,
.achievement-card.locked .achievement-desc { color: var(--text-dim); }

.badge-count {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 800;
  background: rgba(245,158,11,0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(245,158,11,0.2);
}

/* === SHOP === */
.coins-display {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--coins-color);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.shop-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coins-color), #fde68a);
}

.shop-item:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(251,191,36,0.15); }

.shop-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.shop-name { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.4rem; }
.shop-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 1rem; }

.shop-buy-btn {
  background: linear-gradient(135deg, var(--coins-color), #d97706);
  color: #1a1000;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.shop-buy-btn:hover { transform: scale(1.05); }
.shop-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* === STATS PAGE === */
.stats-charts { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 1.5rem; }

.chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.chart-section h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

canvas { max-width: 100%; border-radius: 8px; }

.subject-performance {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.perf-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.perf-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.perf-label { font-weight: 700; font-size: 0.85rem; min-width: 120px; }

.perf-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-base);
  border-radius: 5px;
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s;
}

.perf-grade { font-family: 'Fredoka One', cursive; font-size: 0.95rem; min-width: 40px; text-align: right; }

.suggestion-box {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
}

/* === CALENDAR === */
.calendar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-nav button {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.cal-nav button:hover { background: rgba(124,58,237,0.15); }
.cal-nav h2 { font-family: 'Fredoka One', cursive; font-size: 1.2rem; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  padding: 0.5rem;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: var(--bg-base);
  border: 1px solid transparent;
}

.cal-day:hover { border-color: rgba(124,58,237,0.3); }
.cal-day.today { border-color: var(--primary); color: var(--primary-light); }
.cal-day.has-activity { background: rgba(124,58,237,0.15); }
.cal-day.studied { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.2); }
.cal-day.other-month { opacity: 0.3; }

.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--success);
  margin-top: 2px;
}

.cal-day-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* === MODAIS === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-wide { max-width: 560px; }

/* ── Grupo: seção interna ───────────────────────────── */
.group-view-section-title {
  font-weight: 800;
  font-size: .9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Tarefas em Grupo ───────────────────────────────── */
#group-view-tasks {
  max-height: 420px;
  overflow-y: auto;
  padding-right: .25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary, #7c3aed) transparent;
}
#group-view-tasks::-webkit-scrollbar       { width: 5px; }
#group-view-tasks::-webkit-scrollbar-track { background: transparent; }
#group-view-tasks::-webkit-scrollbar-thumb {
  background: var(--primary, #7c3aed);
  border-radius: 999px;
}

.group-task-card {
  background: var(--bg-secondary, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  margin-bottom: .65rem;
}
.group-task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}
.group-task-title {
  font-weight: 700;
  font-size: .95rem;
  flex: 1;
}
.group-task-rewards {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary-light, #a78bfa);
  white-space: nowrap;
}
.group-task-progress-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}
.group-task-progress-bar {
  flex: 1;
  height: 7px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}
.group-task-progress-fill {
  height: 100%;
  background: var(--primary, #7c3aed);
  border-radius: 999px;
  transition: width .4s ease;
}
.group-task-progress-fill.done { background: var(--success, #22c55e); }
.group-task-pct {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 2.5rem;
  text-align: right;
}
.group-task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .55rem;
}
.group-task-rewarded { color: #f59e0b; font-weight: 700; }
.group-task-need     { color: var(--text-muted); }
.group-task-actions  { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.group-task-delete-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(239,68,68,.4);
  color: #f87171;
  border-radius: 6px;
  padding: .2rem .55rem;
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.group-task-delete-btn:hover {
  background: rgba(239,68,68,.15);
  color: #fca5a5;
}
.group-task-done-badge {
  font-size: .82rem;
  font-weight: 700;
  color: var(--success, #22c55e);
}
.group-task-rewards-row {
  font-size: .78rem;
  color: var(--primary-light, #a78bfa);
  font-weight: 600;
  margin-bottom: .5rem;
}
/* grupos-actions com 3 botões */
.groups-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.groups-actions > button { flex: 1; min-width: 120px; }

.modal h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.modal-btns {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.modal-btns button { flex: 1; }

.difficulty-picker p, .grade-picker p, .emoji-picker p {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.diff-opts { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.diff-btn {
  flex: 1;
  min-width: 100px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-base);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  text-align: center;
}

.diff-btn.active[data-diff="easy"] { border-color: var(--success); color: var(--success); background: rgba(16,185,129,0.1); }
.diff-btn.active[data-diff="medium"] { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,0.1); }
.diff-btn.active[data-diff="hard"] { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.1); }

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  margin: 0.5rem 0;
  height: 6px;
}

#grade-display {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--primary-light);
}

/* === MODAL ESPECIAIS === */
.modal-celebration {
  text-align: center;
  background: linear-gradient(135deg, #1a0533, #0d1f3c);
  border-color: rgba(167,139,250,0.4);
  position: relative;
  overflow: hidden;
}

.celebration-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.level-up-content { position: relative; z-index: 1; }
.level-up-icon { font-size: 4rem; display: block; animation: bounce 0.5s ease-in-out infinite alternate; }
@keyframes bounce { from { transform: scale(1); } to { transform: scale(1.15); } }

.level-up-content h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.level-up-text { color: var(--text-muted); margin: 0.5rem 0; }

.new-level-badge {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0 1rem;
}

.modal-achievement {
  text-align: center;
  background: linear-gradient(135deg, #1a1000, #0d0f1a);
  border-color: rgba(245,158,11,0.4);
}

.ach-unlock-icon { font-size: 4rem; margin-bottom: 1rem; animation: spin-once 0.5s ease; display: block; }
@keyframes spin-once { from { transform: rotate(-180deg) scale(0); } to { transform: rotate(0) scale(1); } }

.modal-achievement h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-lootbox { text-align: center; }
.loot-icon { font-size: 4rem; animation: shake 0.4s ease; display: block; }
@keyframes shake {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.loot-reward {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
}

/* === CONFETTI PARTICLES === */
.confetti-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: confetti-fall 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes confetti-fall {
  from { opacity: 1; transform: translateY(-50px) rotate(0deg); }
  to { opacity: 0; transform: translateY(200px) rotate(720deg); }
}

/* === XP POPUP === */
.xp-popup {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: var(--xp-color);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  animation: xp-float 1.5s ease-out forwards;
}

@keyframes xp-float {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-80px) scale(1.3); }
}

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

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.empty-state p { font-weight: 600; font-size: 0.95rem; }

/* === BOTTOM NAV (mobile) === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 95;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.5rem 0.25rem 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  min-height: 56px;
  gap: 2px;
}

.bottom-nav-item.active {
  color: var(--primary-light);
}

.bottom-nav-item .bn-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-nav-item .bn-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* === RESPONSIVE === */
/* ── Notif bell — desktop (>768px) ─────────────────────────── */
@media (min-width: 769px) {
  .topbar-notif-btn { display: none !important; }

  .dash-notif-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1.3rem;
    width: 46px; height: 46px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(124,58,237,.45);
  }
  .dash-notif-btn:hover  { box-shadow: 0 5px 18px rgba(124,58,237,.6); transform: translateY(-1px); }
  .dash-notif-btn:active { transform: scale(0.91); }
  .dash-notif-btn .notif-bell-badge { top: -6px; right: -6px; }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar { display: flex; }
  .topbar-stats { gap: 0.75rem; font-size: 0.85rem; }

  /* Bell mobile: aparece na topbar, some no dashboard */
  .topbar-notif-btn { display: flex; }
  .dash-notif-btn   { display: none !important; }

  /* Sidebar */
  .sidebar {
    transform: translateX(-100%);
    top: 0; z-index: 200;
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }

  /* Main content: espaço para topbar + bottom nav */
  .main-content {
    margin-left: 0;
    padding: 4.5rem 0.85rem 5.5rem;
  }

  /* Bottom nav visível */
  .bottom-nav { display: flex; }

  /* Grids */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .subjects-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: 1fr; }

  /* Cards */
  .card { padding: 1rem; }
  .stat-card { padding: 1rem; }

  /* Page header */
  .page-header { margin-bottom: 1rem; }
  .page-header h1 { font-size: 1.4rem; }

  /* Botões — touch target mínimo 44px */
  .btn-primary, .btn-secondary, .btn-danger {
    min-height: 44px;
    font-size: 0.9rem;
  }
  .btn-huge { min-height: 52px; font-size: 1rem; }

  /* Inputs */
  input, select, textarea {
    font-size: 16px !important; /* evita zoom automático no iOS */
    min-height: 44px;
  }

  /* Modais — sobem da parte inferior como bottom sheet */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 1.5rem 1rem 2rem;
  }

  /* Pomodoro */
  .pomodoro-timer { font-size: 3rem; }

  /* Tasks */
  .task-item { padding: 0.85rem 1rem; }

  /* Topbar stats menor */
  .topbar-stats span { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stat-card { padding: 0.85rem 0.75rem; }
  .stat-value { font-size: 1.3rem; }

  .modal { padding: 1.25rem 0.9rem 2rem; }
  .avatar-grid, .emoji-grid { grid-template-columns: repeat(5, 1fr); }

  /* Auth tela */
  .auth-card { padding: 1.25rem; }
  .auth-logo h1 { font-size: 1.75rem; }
  .auth-logo p { font-size: 0.8rem; }
  .btn-huge { padding: 0.85rem; }

  /* Page header compacto */
  .page-header h1 { font-size: 1.25rem; }
  .page-subtitle { font-size: 0.8rem; }

  /* Esconde alguns textos da topbar em telas muito pequenas */
  .topbar-logo { font-size: 1rem; }
}

/* === SCROLLBAR CUSTOM === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.5); }

/* === MISC === */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-xp { color: var(--xp-color); }
.text-coins { color: var(--coins-color); }

.fw-bold { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }

/* === PAGE HEADER ACTIONS === */
.page-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* === TASK STATUS BADGES === */
.badge-overdue {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
  animation: overdue-pulse 2s ease-in-out infinite;
}
@keyframes overdue-pulse {
  0%,100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(239,68,68,0.4); }
}

.task-due-date {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  margin-left: 0.35rem;
}
.due-today { background: rgba(245,158,11,0.15); color: var(--warning); }
.due-future { background: rgba(6,182,212,0.1); color: var(--secondary); }
.due-overdue { background: rgba(239,68,68,0.15); color: var(--danger); }
.due-done-early { background: rgba(16,185,129,0.15); color: var(--success); }

/* === TASK SECTION HEADERS === */
.task-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin: 1rem 0 0.5rem;
  border-bottom: 2px solid var(--border);
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
}
.task-section-header.overdue-header { color: var(--danger); border-color: rgba(239,68,68,0.3); }
.task-section-header.today-header { color: var(--warning); border-color: rgba(245,158,11,0.3); }
.task-section-header.future-header { color: var(--secondary); border-color: rgba(6,182,212,0.3); }
.task-section-header.done-header { color: var(--text-muted); }

.task-section-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-card2);
  font-family: 'Nunito', sans-serif;
}

/* === FOCUS MODE === */
.focus-mode-active .task-item:not(.task-focus) { opacity: 0.3; pointer-events: none; }
.focus-mode-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.1));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* === EXAM STATUS === */
.exam-item.exam-pending {
  border-left: 3px solid var(--warning);
}
.exam-item.exam-done {
  border-left: 3px solid var(--success);
}

.exam-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
}
.status-pending { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.status-excellent { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.status-approved { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.status-recovery { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.status-fail { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

.complete-exam-btn {
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  color: white;
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.complete-exam-btn:hover { transform: scale(1.05); }

/* === GRADE CLASSIFICATION === */
.grade-classification {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  transition: var(--transition);
}
.gc-excellent { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.gc-approved { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.gc-recovery { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.gc-fail { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }

/* === DATE PICKER === */
.date-picker-field { margin-bottom: 1rem; }
.date-picker-field p { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.4rem; }
.optional-label { font-weight: 600; color: var(--text-dim); font-size: 0.8rem; }

input[type="date"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-base);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 0;
  outline: none;
  transition: var(--transition);
  color-scheme: dark;
}
[data-theme="light"] input[type="date"] { color-scheme: light; }
input[type="date"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }

/* === EXPORT/IMPORT === */
.data-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.btn-data {
  flex: 1;
  padding: 0.45rem 0.5rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  transition: var(--transition);
  text-align: center;
}
.btn-data:hover { background: rgba(124,58,237,0.15); color: var(--primary-light); border-color: rgba(124,58,237,0.3); }

/* === HISTORY SECTION === */
.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.75;
}
.history-item .task-name { text-decoration: line-through; color: var(--text-muted); }
.history-badge {
  font-size: 0.72rem;
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* === BONUS EARLY NOTIFICATION === */
.bonus-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.2);
}

/* === DYNAMIC MISSIONS === */
.mission-item.dynamic { border-left: 3px solid var(--accent); }

/* === EXAM PENDING DATE === */
.exam-date-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: rgba(6,182,212,0.1);
  color: var(--secondary);
  border: 1px solid rgba(6,182,212,0.2);
}
.exam-date-tag.past { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.2); }

/* ============================================================
   PÁGINA DE NOTAS & MÉDIAS
   ============================================================ */

.grades-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.grades-subject-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.grades-subject-picker select {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
}

.grade-types-info {
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.grade-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.grade-type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  transition: var(--transition);
}

.grade-type-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.grade-type-icon {
  font-size: 1.8rem;
  width: 44px; height: 44px;
  background: rgba(124,58,237,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.grade-type-info { flex: 1; min-width: 0; }
.grade-type-name { font-weight: 800; font-size: 0.95rem; }
.grade-type-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

.grade-type-weight-badge {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: var(--primary-light);
  background: rgba(124,58,237,0.1);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(124,58,237,0.2);
  flex-shrink: 0;
}

/* Grade entries list */
.grade-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.grade-entry-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.grade-entry-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.grade-entry-title {
  font-weight: 800;
  font-size: 0.95rem;
  flex: 1;
}

.grade-entry-weight {
  font-size: 0.78rem;
  color: var(--primary-light);
  background: rgba(124,58,237,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 700;
}

.grade-inputs-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.grade-input-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 80px;
  flex: 1;
}

.grade-input-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.grade-input-cell input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.4rem;
  text-align: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  background: var(--bg-base);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  margin-bottom: 0;
  transition: var(--transition);
}

.grade-input-cell input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.grade-input-cell input[type="number"].grade-ok { border-color: var(--success); }
.grade-input-cell input[type="number"].grade-warn { border-color: var(--warning); }
.grade-input-cell input[type="number"].grade-bad { border-color: var(--danger); }

.grade-entry-subtotal {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  text-align: right;
}

/* Result card */
.grade-result-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.08));
  border: 2px solid rgba(124,58,237,0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.grade-result-card.result-excellent { border-color: rgba(16,185,129,0.4); background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(52,211,153,0.05)); }
.grade-result-card.result-approved  { border-color: rgba(52,211,153,0.35); background: linear-gradient(135deg, rgba(52,211,153,0.08), rgba(16,185,129,0.04)); }
.grade-result-card.result-recovery  { border-color: rgba(245,158,11,0.4); background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(251,191,36,0.05)); }
.grade-result-card.result-fail      { border-color: rgba(239,68,68,0.4); background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(248,113,113,0.05)); }

.grade-result-icon { font-size: 2.5rem; }

.grade-result-info { flex: 1; }
.grade-result-label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.grade-result-value { display: block; font-family: 'Fredoka One', cursive; font-size: 3rem; line-height: 1.1; }

.grade-result-status {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* Formula box */
.grade-formula-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.8;
  font-family: monospace;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Modal grade type extras */
.grade-type-weight-row,
.grade-type-count-row {
  margin-bottom: 1rem;
}

.grade-type-formula-preview {
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: monospace;
}

/* All grades history */
.history-grade-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.1rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}
.history-grade-row:hover { border-color: rgba(124,58,237,0.2); }

.hgr-grade-badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.hgr-info { flex: 1; min-width: 0; }
.hgr-name { font-weight: 800; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hgr-meta { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin-top: 0.15rem; }

.hgr-label {
  font-size: 0.73rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
}

.calc-btn {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-top: 0.5rem;
}
.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.35); }

@media (max-width: 600px) {
  .grade-types-grid { grid-template-columns: 1fr; }
  .grade-inputs-row { gap: 0.35rem; }
  .grade-input-cell { min-width: 60px; }
}

/* ============================================================
   BOTÕES DE AÇÃO (editar / excluir) inline
   ============================================================ */

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-icon-edit,
.btn-icon-delete {
  background: none;
  border: none;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition);
  opacity: 0.45;
}

.task-item:hover .btn-icon-edit,
.task-item:hover .btn-icon-delete,
.exam-item:hover .btn-icon-edit,
.exam-item:hover .btn-icon-delete { opacity: 1; }

.btn-icon-edit:hover   { background: rgba(124,58,237,0.12); opacity: 1; }
.btn-icon-delete:hover { background: rgba(239,68,68,0.12);  opacity: 1; }

/* Remove old delete-btn from task/exam items so it doesn't conflict */
.task-item .delete-btn,
.exam-item .delete-btn { display: none; }

/* Confirm delete modal */
#modal-confirm-delete .modal { border-top: 4px solid var(--danger); }

/* Edit grade picker opacity transition */
#edit-grade-picker { transition: opacity 0.2s; }

/* ============================================================
   FILTROS DE NOTAS
   ============================================================ */
.grades-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.grades-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
  flex: 1;
}
.grades-filter-group select { margin-bottom: 0; font-size: 0.88rem; }

/* ============================================================
   PÁGINA DE ESTUDO
   ============================================================ */
.study-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.study-toolbar .tasks-filter { margin-bottom: 0; }

.study-progress-bar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.1rem;
  margin-bottom: 1.25rem;
}
.study-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
#study-progress-pct { color: var(--success); }

/* Study item card */
.study-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  transition: var(--transition);
  margin-bottom: 0.6rem;
}
.study-item:hover { border-color: rgba(124,58,237,0.2); }
.study-item.studied { opacity: 0.72; }
.study-item.studied .study-content { text-decoration: line-through; color: var(--text-muted); }

.study-check {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
  background: var(--bg-base);
}
.study-check:hover { border-color: var(--success); background: rgba(16,185,129,0.1); }
.study-item.studied .study-check {
  border-color: var(--success);
  background: rgba(16,185,129,0.2);
}

.study-info { flex: 1; min-width: 0; }
.study-content { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.study-meta { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 0.2rem; }

.study-date-tag {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: rgba(6,182,212,0.1);
  color: var(--secondary);
  border: 1px solid rgba(6,182,212,0.2);
  white-space: nowrap;
}
.study-date-tag.overdue { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.study-date-tag.today   { background: rgba(245,158,11,0.1); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.study-date-tag.done-tag { background: rgba(16,185,129,0.1); color: var(--success); border-color: rgba(16,185,129,0.2); }

/* Section headers reused */
.study-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  margin: 0.875rem 0 0.4rem;
  border-bottom: 2px solid var(--border);
  font-family: 'Fredoka One', cursive;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.study-section-header.pending-hdr { color: var(--primary-light); border-color: rgba(124,58,237,0.25); }
.study-section-header.done-hdr    { color: var(--success);       border-color: rgba(16,185,129,0.2); }

/* Suggestion box */
.study-suggestion-box {
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(251,191,36,0.05));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--warning);
}
.study-suggestion-box strong { color: var(--text); }

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

  /* Filtros de notas: grid 2 colunas no mobile */
  .grades-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .grades-filter-group { min-width: 0; }

  /* Botão "Limpar" e select de ordenação ocupam a linha inteira */
  .grades-filters > .btn-small,
  .grades-filters > .sort-select-wrap {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   SORT / ORDENAÇÃO
   ============================================================ */

.sort-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.sort-filter-bar .tasks-filter { margin-bottom: 0; }

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 0.25rem 0 0.6rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.sort-select-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.sort-icon {
  font-size: 0.95rem;
  color: var(--primary-light);
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.sort-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.5rem 0.4rem 0.5rem 0;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  min-width: 190px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.8rem;
}
.sort-select option { background: var(--bg-card); color: var(--text); }

.study-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .sort-filter-bar { flex-direction: column; align-items: stretch; }
  .study-toolbar-right { width: 100%; }

  /* Tasks filter: scroll horizontal no mobile — evita overflow + zoom */
  .tasks-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none; /* Firefox */
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .tasks-filter::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .filter-btn {
    flex-shrink: 0;      /* não deixa encolher os botões */
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
    min-height: 36px;
  }

  /* Sort select: 16px para evitar zoom automático no iOS */
  .sort-select {
    font-size: 16px;
    min-width: 0;
    width: 100%;
  }
  .sort-select-wrap { width: 100%; }
}

/* ============================================================
   EDITAR PERFIL
   ============================================================ */

.profile-edit-hint {
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar-user:hover .profile-edit-hint { opacity: 1; }
.sidebar-user:hover { background: rgba(124,58,237,0.1); }

.profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.06));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.profile-preview-avatar {
  font-size: 2.8rem;
  width: 60px; height: 60px;
  background: rgba(124,58,237,0.15);
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.35);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.profile-preview-info { display: flex; flex-direction: column; gap: 0.2rem; }
.profile-preview-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--text);
}
.profile-preview-level {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--level-color);
}

.profile-field { margin-bottom: 1rem; }
.profile-field .grades-label { margin-bottom: 0.5rem; }

#profile-avatar-grid {
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

#profile-avatar-grid .avatar-opt {
  font-size: 1.4rem;
  padding: 6px;
  border-radius: 10px;
}

@media (max-width: 480px) {
  #profile-avatar-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   CONFIGURAÇÕES
   ============================================================ */

.settings-section { margin-bottom: 1.5rem; }

.settings-section-title {
  font-family: 'Fredoka One', cursive;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

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

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-card-danger {
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.03);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 0 1.25rem;
}

.settings-row-info { flex: 1; min-width: 0; }
.settings-row-label {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.settings-row-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.4;
}

/* Profile row in settings */
.settings-profile-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.settings-profile-row:hover { background: rgba(124,58,237,0.06); }

.settings-profile-avatar {
  font-size: 2rem;
  width: 52px; height: 52px;
  background: rgba(124,58,237,0.12);
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.settings-profile-row:hover .settings-profile-avatar { border-color: var(--primary); }

.settings-profile-info { flex: 1; }
.settings-profile-name { display: block; font-weight: 800; font-size: 1rem; }
.settings-profile-sub  { display: block; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 0.2rem; }
.settings-chevron { font-size: 1.4rem; color: var(--text-dim); }

/* School average stepper */
.settings-average-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.avg-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card2);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  line-height: 1;
}
.avg-btn:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(124,58,237,0.1); }

.avg-display {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  min-width: 2rem;
  text-align: center;
  color: var(--primary-light);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-slider {
  width: 44px;
  height: 24px;
  background: var(--bg-base);
  border-radius: 12px;
  border: 2px solid var(--border);
  position: relative;
  transition: var(--transition);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-dim);
  top: 2px; left: 2px;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(124,58,237,0.2);
  border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::after {
  background: var(--primary-light);
  transform: translateX(20px);
}

/* Action buttons */
.btn-settings-action {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-settings-action:hover {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.3);
  color: var(--primary-light);
}

.btn-danger-action {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-danger-action:hover {
  background: rgba(239,68,68,0.2);
  border-color: var(--danger);
}

/* App info footer */
.settings-app-info {
  text-align: center;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
}
.settings-version { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }

/* Modal: Confirm Reset */
#modal-reset-confirm .modal { border-top: 4px solid var(--danger); }

/* ============================================================
   TELAS DE AUTENTICAÇÃO (LOGIN / CADASTRO)
   ============================================================ */

/* Shared auth screen wrapper */
#auth-screen {
  min-height: 100vh;
  position: relative;
  background: linear-gradient(135deg, #0d0f1a 0%, #1a0533 45%, #0d1f3c 100%);
  overflow: hidden;
}

/* Animated background blobs */
#auth-screen::before,
#auth-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: auth-float 8s ease-in-out infinite alternate;
}
#auth-screen::before {
  width: 500px; height: 500px;
  background: rgba(124,58,237,0.15);
  top: -100px; left: -100px;
}
#auth-screen::after {
  width: 400px; height: 400px;
  background: rgba(6,182,212,0.1);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}

@keyframes auth-float {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,20px) scale(1.08); }
}

/* Panel — one is visible at a time */
.auth-panel {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}
.auth-panel.active { display: flex; animation: auth-in 0.4s cubic-bezier(0.34,1.56,0.64,1); }

@keyframes auth-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Logo area */
.auth-logo {
  text-align: center;
}
.auth-logo .logo-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: .5rem;
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.auth-logo h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .35rem;
}
.auth-logo p {
  color: rgba(255,255,255,0.45);
  font-size: .9rem;
  font-weight: 600;
}

/* Card */
.auth-card {
  background: rgba(22,25,41,0.92);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45), 0 0 50px rgba(124,58,237,0.07);
  display: flex;
  flex-direction: column;
  gap: 0;
}

[data-theme="light"] .auth-card {
  background: rgba(255,255,255,0.95);
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.auth-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Fields */
.auth-field {
  margin-bottom: 1rem;
}
.auth-label {
  display: block;
  font-size: .82rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: .4rem;
  letter-spacing: .3px;
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-password-wrap input {
  padding-right: 2.8rem;
  margin-bottom: 0;
}
.auth-eye {
  position: absolute;
  right: .6rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: .3rem;
  color: var(--text-muted);
  transition: var(--transition);
  line-height: 1;
}
.auth-eye:hover { color: var(--primary-light); }

/* Password strength bar */
.auth-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: .45rem;
  background: var(--bg-base);
  overflow: hidden;
  transition: var(--transition);
}
.auth-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 2px;
  width: var(--strength-w, 0%);
  background: var(--strength-color, var(--danger));
  transition: width .3s, background .3s;
}

/* Error message */
.auth-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: .75rem;
  animation: shake-err .35s ease;
}
@keyframes shake-err {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-5px); }
  40%,80%  { transform: translateX(5px); }
}

/* Bottom links */
.auth-demo-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Google login ──────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0 .75rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(124,58,237,0.2);
}

.btn-google {
  width: 100%;
  padding: .72rem 1rem;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  transition: box-shadow .15s ease, background .15s ease, transform .1s ease;
}
.btn-google:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  background: #f8f9fa;
  transform: translateY(-1px);
}
.btn-google:active { transform: translateY(0); }
.btn-google:disabled { opacity: .6; cursor: not-allowed; }

[data-theme="dark"] .btn-google {
  background: rgba(255,255,255,0.06);
  color: #e8eaed;
  border-color: rgba(255,255,255,0.14);
}
[data-theme="dark"] .btn-google:hover {
  background: rgba(255,255,255,0.11);
}

/* ── Botão de instalação PWA na tela de auth ──── */
.btn-install-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-top: .75rem;
  padding: .65rem 1rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(139,92,246,0.1));
  border: 1.5px dashed rgba(124,58,237,0.45);
  border-radius: 10px;
  color: var(--primary-light, #a78bfa);
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-install-auth:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(139,92,246,0.18));
  border-color: rgba(124,58,237,0.7);
  transform: translateY(-1px);
}
.btn-install-auth:active { transform: translateY(0); }

.auth-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.auth-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* Loading spinner on btn */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .8;
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Highlight input border on focus within auth */
.auth-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}

@media (max-width: 480px) {
  .auth-card { padding: 1.5rem; }
  .auth-logo h1 { font-size: 1.9rem; }
}

/* =============================================
   MISSÕES — empty state
   ============================================= */
.mission-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* =============================================
   PERFIL PÚBLICO
   ============================================= */
.profile-page-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.profile-page-avatar {
  font-size: 3.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.profile-page-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 .2rem;
}
.profile-page-level {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: .4rem;
}
.xp-bar-wrap {
  height: 8px;
  background: var(--bg-base);
  border-radius: 4px;
  overflow: hidden;
  width: 180px;
  max-width: 100%;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--xp-color));
  border-radius: 4px;
  transition: width .5s;
}
.profile-page-xptext {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: .3rem;
}
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}
.profile-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem .5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.profile-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-light);
}
.profile-stat-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 700;
}
.profile-fav-subject {
  font-size: .88rem;
  font-weight: 600;
  padding: .4rem .75rem;
  background: rgba(124,58,237,.08);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}

/* Cards de matéria favorita / melhor matéria no perfil */
.subject-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.subject-info-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1.5px solid;
}
.subject-info-card.fav-card {
  background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(236,72,153,.06));
  border-color: rgba(239,68,68,.3);
}
.subject-info-card.best-card {
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(234,179,8,.06));
  border-color: rgba(245,158,11,.3);
}
.sic-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.sic-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.profile-section-title {
  font-weight: 800;
  font-size: 1rem;
  margin: 1.25rem 0 .6rem;
}
.profile-ach-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.profile-ach-badge {
  font-size: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .45rem;
  cursor: default;
  transition: transform .15s;
}
.profile-ach-badge:hover { transform: scale(1.15); }
.profile-ach-empty {
  color: var(--text-muted);
  font-size: .88rem;
}
.social-auth-hint {
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

/* =============================================
   AMIGOS & GRUPOS — componentes compartilhados
   ============================================= */
.social-auth-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.social-auth-icon { font-size: 3rem; }
.social-loading {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
}
.social-section-title {
  font-weight: 800;
  font-size: .9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 1.25rem 0 .5rem;
}
.social-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* =============================================
   AMIGOS
   ============================================= */
/* ── Avatar com foto / molduras ─────────────────────────────── */
.avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.friend-avatar.avatar-frame { box-sizing: border-box; }
.friend-avatar.frame_silver  { border: 3px solid #c0c0c0; box-shadow: 0 0 6px #c0c0c080; }
.friend-avatar.frame_gold    { border: 3px solid #ffd700; box-shadow: 0 0 8px #ffd70090; }
.friend-avatar.frame_diamond { border: 3px solid #a8e6f0; box-shadow: 0 0 10px #a8e6f080; }
.friend-avatar.frame_fire    { border: 3px solid #ff4500; box-shadow: 0 0 8px #ff450090; }
.friend-avatar.frame_rainbow { border: 3px solid transparent;
  background: linear-gradient(#1a1a2e,#1a1a2e) padding-box,
              linear-gradient(135deg,#f00,#ff7700,#ff0,#0f0,#00f,#8b00ff) border-box;
  box-shadow: 0 0 10px #ffffff40; }

/* ── Banners de perfil ──────────────────────────────────────── */
.profile-page-banner {
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: .75rem;
  background: var(--bg-secondary, rgba(255,255,255,.04));
  position: relative;
  overflow: hidden;
}

/* Aurora Roxa */
.profile-page-banner.banner_purple {
  background:
    radial-gradient(ellipse at 25% 60%, rgba(200,80,255,.45) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 30%, rgba(100,0,220,.4)   0%, transparent 50%),
    radial-gradient(ellipse at 55% 95%, rgba(160,30,200,.3)  0%, transparent 45%),
    linear-gradient(160deg, #09001f 0%, #2a0060 40%, #5300b0 70%, #8a00d4 100%);
}

/* Chamas vivas */
.profile-page-banner.banner_fire {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255,220,50,.5)  0%, transparent 45%),
    radial-gradient(ellipse at 20%  80%, rgba(255,120,0,.4)   0%, transparent 40%),
    radial-gradient(ellipse at 80%  70%, rgba(200,30,0,.35)   0%, transparent 40%),
    linear-gradient(175deg, #1a0200 0%, #6b0f00 25%, #c43200 55%, #ff6a00 80%, #ffb800 100%);
}

/* Oceano profundo */
.profile-page-banner.banner_ocean {
  background:
    radial-gradient(ellipse at 50%  -5%, rgba(100,240,255,.35) 0%, transparent 50%),
    radial-gradient(ellipse at 15%  50%, rgba(0,180,255,.2)    0%, transparent 40%),
    radial-gradient(ellipse at 85%  70%, rgba(0,60,160,.3)     0%, transparent 45%),
    linear-gradient(175deg, #000d1a 0%, #002255 30%, #004e9a 55%, #0090c5 78%, #00c8e8 100%);
}

/* Floresta profunda */
.profile-page-banner.banner_forest {
  background:
    radial-gradient(ellipse at 50%  -5%, rgba(120,255,160,.3)  0%, transparent 50%),
    radial-gradient(ellipse at 20%  60%, rgba(30,180,80,.25)   0%, transparent 45%),
    radial-gradient(ellipse at 80%  40%, rgba(10,100,30,.3)    0%, transparent 40%),
    linear-gradient(170deg, #010e01 0%, #0a2a0a 25%, #1a5e28 50%, #30914a 72%, #5bc870 100%);
}

/* Galáxia estrelada */
.profile-page-banner.banner_galaxy {
  background:
    radial-gradient(ellipse at 30%  40%, rgba(160,0,255,.5)   0%, transparent 45%),
    radial-gradient(ellipse at 70%  60%, rgba(0,80,200,.4)    0%, transparent 50%),
    radial-gradient(ellipse at 50%  20%, rgba(120,40,255,.35) 0%, transparent 40%),
    radial-gradient(ellipse at 15%  75%, rgba(80,0,160,.3)    0%, transparent 35%),
    radial-gradient(ellipse at 85%  20%, rgba(0,120,255,.25)  0%, transparent 35%),
    linear-gradient(145deg, #00000e 0%, #05001a 30%, #0d0035 55%, #1a0050 75%, #0a0020 100%);
}
/* Estrelas sobre a galáxia via pseudo-element */
.profile-page-banner.banner_galaxy::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at  8%  12%, #fff 100%, transparent),
    radial-gradient(1px 1px at 22%  35%, #ddf 100%, transparent),
    radial-gradient(1px 1px at 38%  18%, #fff 100%, transparent),
    radial-gradient(1px 1px at 55%  42%, #fff 100%, transparent),
    radial-gradient(1px 1px at 67%   8%, #ccf 100%, transparent),
    radial-gradient(1px 1px at 74%  55%, #fff 100%, transparent),
    radial-gradient(1px 1px at 85%  28%, #ddf 100%, transparent),
    radial-gradient(1px 1px at 92%  72%, #fff 100%, transparent),
    radial-gradient(1px 1px at 14%  68%, #fff 100%, transparent),
    radial-gradient(1px 1px at 45%  78%, #ccf 100%, transparent),
    radial-gradient(2px 2px at 30%  55%, rgba(200,200,255,.8) 100%, transparent),
    radial-gradient(2px 2px at 60%  25%, rgba(255,255,255,.7) 100%, transparent),
    radial-gradient(2px 2px at 78%  82%, rgba(200,180,255,.9) 100%, transparent);
  border-radius: 14px;
  pointer-events: none;
}
/* Garante que o conteúdo do banner fica acima das estrelas */
.profile-page-banner.banner_galaxy .profile-page-hero { position: relative; z-index: 1; }

/* ── Cosméticos na loja ─────────────────────────────────────── */
.shop-tabs { display:flex; gap:.5rem; margin-bottom:1rem; }
.shop-tab-btn {
  flex: 1; padding:.55rem .75rem; border-radius: 8px; border: none; cursor: pointer;
  background: var(--bg-secondary,rgba(255,255,255,.06));
  color: var(--text-secondary, #a0a0b0); font-weight: 600; font-size:.9rem;
  transition: background .2s, color .2s;
}
.shop-tab-btn.active { background: var(--primary,#7c3aed); color: #fff; }
.cosmetics-section { margin-bottom: 1.5rem; }
.shop-section-title {
  font-weight: 700; font-size: .9rem; color: var(--text,#e0e0f0);
  text-transform: uppercase; letter-spacing: .06em;
  padding: .4rem .65rem; margin-bottom: .75rem;
  border-left: 3px solid var(--primary,#7c3aed);
  background: rgba(124,58,237,.08);
  border-radius: 0 8px 8px 0;
}
.btn-equipped { background: var(--success,#22c55e) !important; color: #fff !important; }

/* Prévia de banner na loja */
.cosmetic-banner-preview {
  width: 100%; height: 52px;
  border-radius: 8px; margin-bottom: .4rem;
  overflow: hidden; position: relative;
}
.cosmetic-banner-preview.banner_purple {
  background:
    radial-gradient(ellipse at 25% 60%, rgba(200,80,255,.45) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 30%, rgba(100,0,220,.4)   0%, transparent 50%),
    linear-gradient(160deg,#09001f 0%,#2a0060 40%,#8a00d4 100%);
}
.cosmetic-banner-preview.banner_fire {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255,220,50,.5) 0%, transparent 45%),
    radial-gradient(ellipse at 20%  80%, rgba(255,120,0,.4)  0%, transparent 40%),
    linear-gradient(175deg,#1a0200 0%,#c43200 55%,#ffb800 100%);
}
.cosmetic-banner-preview.banner_ocean {
  background:
    radial-gradient(ellipse at 50% -5%, rgba(100,240,255,.35) 0%, transparent 50%),
    linear-gradient(175deg,#000d1a 0%,#004e9a 55%,#00c8e8 100%);
}
.cosmetic-banner-preview.banner_forest {
  background:
    radial-gradient(ellipse at 50% -5%, rgba(120,255,160,.3) 0%, transparent 50%),
    linear-gradient(170deg,#010e01 0%,#1a5e28 50%,#5bc870 100%);
}
.cosmetic-banner-preview.banner_galaxy {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(160,0,255,.5)  0%, transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(0,80,200,.4)   0%, transparent 50%),
    linear-gradient(145deg,#00000e 0%,#0d0035 55%,#0a0020 100%);
  /* mini estrelas */
  background-image:
    radial-gradient(1px 1px at  10%  20%, #fff 100%, transparent),
    radial-gradient(1px 1px at  30%  50%, #ddf 100%, transparent),
    radial-gradient(1px 1px at  55%  15%, #fff 100%, transparent),
    radial-gradient(1px 1px at  75%  70%, #fff 100%, transparent),
    radial-gradient(1px 1px at  88%  35%, #ccf 100%, transparent),
    radial-gradient(ellipse at 30% 40%, rgba(160,0,255,.5)  0%, transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(0,80,200,.4)   0%, transparent 50%),
    linear-gradient(145deg,#00000e 0%,#0d0035 55%,#0a0020 100%);
}

/* ── Animação de sino com notificações ─────────────────────── */
@keyframes bell-ring {
  0%,100% { transform: rotate(0deg); }
  15%      { transform: rotate(18deg); }
  30%      { transform: rotate(-16deg); }
  45%      { transform: rotate(12deg); }
  60%      { transform: rotate(-8deg); }
  75%      { transform: rotate(4deg); }
}
.topbar-notif-btn.has-notif,
.dash-notif-btn.has-notif {
  animation: bell-ring 1.8s ease infinite;
  animation-delay: 0.5s;
}

/* ── Notificações ────────────────────────────────────────────── */
.notif-bell-badge {
  position: absolute; top: -2px; right: -4px;
  background: #ef4444; color: #fff;
  font-size: .65rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 999px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
}
.notif-section-title {
  font-weight: 700; font-size: .85rem; color: var(--primary-light,#a78bfa);
  margin: .75rem 0 .4rem;
}
.notif-card {
  display: flex; align-items: center; gap: .75rem;
  background: var(--bg-secondary,rgba(255,255,255,.04));
  border: 1px solid var(--border); border-radius: 10px;
  padding: .65rem .85rem; margin-bottom: .5rem;
}
.notif-info { flex: 1; min-width: 0; }
.notif-name { font-weight: 700; font-size: .9rem; }
.notif-sub  { font-size: .8rem; opacity: .75; margin-top: .15rem; }
.notif-btns { display:flex; gap:.4rem; flex-shrink:0; }
.notif-motivation { border-left: 3px solid var(--primary,#7c3aed); }

/* Presente surpresa do sistema */
.notif-surprise {
  border-left: 3px solid #f59e0b;
  background: rgba(245,158,11,.07);
}
/* Notif de desempenho */
.notif-perf {
  border-left: 3px solid #10b981;
  background: rgba(16,185,129,.06);
}
/* Ícone grande no card de notif do sistema */
.notif-surprise-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
/* Botão dispensar notif de desempenho */
.btn-notif-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-notif-dismiss:hover { background: rgba(255,255,255,.08); }

/* ── Presentes ────────────────────────────────────────────────── */
.gift-item-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap:.65rem; margin-bottom:.5rem; }
.gift-item {
  background: var(--bg-secondary,rgba(255,255,255,.04));
  border: 2px solid var(--border); border-radius: 10px;
  padding: .75rem .5rem; text-align: center; cursor: pointer;
  transition: border-color .2s;
}
.gift-item:hover { border-color: var(--primary,#7c3aed); }
.gift-item.active { border-color: var(--primary,#7c3aed); background: rgba(124,58,237,.12); }
.gift-item-disabled { opacity: .4; cursor: not-allowed; }
.gift-item-icon { font-size: 1.5rem; display: block; margin-bottom: .3rem; }
.gift-item-name { font-size: .78rem; font-weight: 600; margin-bottom: .2rem; }
.gift-item-cost { font-size: .72rem; opacity: .7; }

/* ── Frases motivacionais ─────────────────────────────────────── */
.motivation-phrase-list { display:flex; flex-direction:column; gap:.4rem; margin-bottom:.5rem; max-height:260px; overflow-y:auto; }
.motivation-phrase-btn {
  text-align: left; padding: .55rem .85rem; border-radius: 8px; border: none; cursor: pointer;
  background: var(--bg-secondary,rgba(255,255,255,.04));
  border: 1.5px solid var(--border); color: var(--text,#e0e0f0);
  font-size: .88rem; transition: border-color .15s, background .15s;
}
.motivation-phrase-btn:hover { border-color: var(--primary,#7c3aed); }
.motivation-phrase-btn.active { border-color: var(--primary,#7c3aed); background: rgba(124,58,237,.15); }

/* ── Avatar type selector ──────────────────────────────────────── */
.avatar-type-row { display:flex; gap:.5rem; margin-bottom:.5rem; }
.avatar-type-btn {
  flex:1; padding:.45rem .5rem; border-radius:8px; border:1.5px solid var(--border);
  background:transparent; color:var(--text,#e0e0f0); font-size:.82rem; cursor:pointer;
  transition:border-color .15s, background .15s;
}
.avatar-type-btn.active { border-color:var(--primary,#7c3aed); background:rgba(124,58,237,.15); }

/* ── Friend profile actions ────────────────────────────────────── */
.friend-profile-actions { display:flex; gap:.5rem; margin:.5rem 0 .75rem; flex-wrap:wrap; }
.friend-profile-actions .btn-sm { flex:1; min-width:100px; }

.friend-code-box {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-secondary, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.friend-code-label { font-size: .82rem; opacity: .7; }
.friend-code-val {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--primary-light, #a78bfa);
  flex: 1;
}
.friend-username {
  font-size: .75rem;
  color: var(--primary-light, #a78bfa);
  font-weight: 700;
  letter-spacing: .02em;
}

.friends-action-row {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.friends-action-row .btn-primary,
.friends-action-row .btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-size: .9rem;
  padding: .65rem .75rem;
  position: relative;
}
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: .25rem;
}
.friends-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.friends-search-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.friends-search-hint {
  font-size: .83rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 .75rem;
}
.friends-search-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: .5rem;
}
.friends-search-bar input {
  flex: 1;
  font-size: 16px;
}
.friend-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.friend-card:hover { border-color: var(--primary); transform: translateX(2px); }
.friend-card.pending  { border-color: rgba(245,158,11,.4); cursor: default; }
.friend-card.outgoing { border-color: var(--border); cursor: default; opacity: .75; }
.friend-card.search-result { cursor: default; }
.friend-avatar {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.friend-info { flex: 1; min-width: 0; }
.friend-name  { font-weight: 800; font-size: .95rem; }
.friend-level { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-top: .15rem; }
.friend-fav   { font-size: .75rem; color: var(--primary-light); margin-top: .1rem; }
.friend-req-btns { display: flex; gap: .4rem; flex-shrink: 0; }
.friend-request-btns { display: flex; gap: .4rem; flex-shrink: 0; }
.pending-tag { background: rgba(251,191,36,.15); color: #f59e0b; border: 1px solid rgba(251,191,36,.35); }
.btn-accept {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .3rem .65rem;
  font-size: .8rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.btn-reject {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .3rem .65rem;
  font-size: .8rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.btn-danger-sm {
  background: rgba(239,68,68,.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-danger-sm:hover { background: rgba(239,68,68,.3); }
.btn-add-friend {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .35rem .75rem;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .15s;
}
.btn-add-friend:hover { opacity: .85; }
.btn-add-friend:disabled { opacity: .5; cursor: not-allowed; }
.friend-tag {
  font-size: .8rem;
  font-weight: 700;
  color: var(--success);
  flex-shrink: 0;
}

/* Perfil de amigo (modal) */
.friend-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.friend-profile-avatar { font-size: 3rem; line-height: 1; }
.friend-profile-name   { font-size: 1.2rem; font-weight: 800; }
.friend-profile-level  { font-size: .85rem; color: var(--primary-light); font-weight: 700; margin-top: .2rem; }
.friend-profile-xp     { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-top: .15rem; }

/* =============================================
   GRUPOS
   ============================================= */
.groups-actions {
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.group-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.group-card:hover { border-color: var(--primary); transform: translateX(2px); }
.group-icon { font-size: 2rem; flex-shrink: 0; }
.group-info { flex: 1; min-width: 0; }
.group-name { font-weight: 800; font-size: .95rem; }
.group-desc { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.group-code { font-size: .75rem; color: var(--primary-light); font-weight: 700; margin-top: .15rem; }
.group-role { font-size: 1.2rem; flex-shrink: 0; }
.btn-sm {
  padding: .35rem .75rem;
  font-size: .82rem;
  border-radius: 8px;
}

@media (max-width: 500px) {
  .profile-stats-row { grid-template-columns: repeat(3, 1fr); }
  .profile-page-hero { flex-direction: column; text-align: center; }
  .xp-bar-wrap { width: 100%; }
  .groups-actions { flex-direction: column; }
  .subject-info-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   IA EDUCACIONAL
   ============================================================ */

/* Barra superior da IA */
.ia-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ia-balance-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(168,85,247,.15));
  border: 1.5px solid rgba(124,58,237,.4);
  border-radius: 14px;
  padding: .65rem 1rem;
  flex: 1;
  min-width: 200px;
}
.ia-balance-icon { font-size: 1.8rem; }
.ia-balance-val  { font-weight: 800; font-size: 1.1rem; }
.ia-balance-sub  { font-size: .75rem; color: var(--text-muted); }

.btn-convert {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .4rem .8rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.btn-convert:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(124,58,237,.5); }

.ia-key-warn {
  font-size: .82rem;
  color: #f59e0b;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 8px;
  padding: .5rem .8rem;
}
.ia-key-warn a { color: #f59e0b; text-decoration: underline; }

/* Modos da IA */
.ia-modes {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.ia-mode-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.ia-mode-btn:hover  { border-color: var(--primary); background: rgba(124,58,237,.1); }
.ia-mode-btn.active { border-color: var(--primary); background: rgba(124,58,237,.2); color: #a78bfa; }
.ia-mode-cost { font-size: .72rem; opacity: .75; font-weight: 600; }

.ia-mode-info {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

/* Chat */
.ia-chat {
  background: var(--bg-secondary, rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  min-height: 200px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: .75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.ia-empty { color: var(--text-muted); text-align: center; padding: 2rem 0; font-size: .9rem; }

.ia-msg { display: flex; flex-direction: column; max-width: 88%; }
.ia-msg-user { align-self: flex-end; align-items: flex-end; }
.ia-msg-ai   { align-self: flex-start; }
.ia-msg-loading { align-self: flex-start; color: var(--text-muted); font-size: .85rem; }

.ia-msg-bubble {
  padding: .65rem 1rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.ia-msg-user .ia-msg-bubble {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ia-msg-ai .ia-msg-bubble {
  background: var(--bg-card, rgba(255,255,255,.06));
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ia-cache-tag { font-size: .68rem; color: var(--text-muted); margin-top: .2rem; }
.ia-cost-tag  { font-size: .68rem; color: #f59e0b; margin-top: .2rem; }

/* Input */
.ia-input-row {
  display: flex;
  gap: .6rem;
  align-items: flex-end;
}
.ia-textarea {
  flex: 1;
  resize: none;
  border-radius: 12px;
  padding: .65rem .9rem;
  font-size: .9rem;
  font-family: inherit;
  background: var(--bg-secondary, rgba(255,255,255,.05));
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: border-color .15s;
}
.ia-textarea:focus { outline: none; border-color: var(--primary); }
.ia-send-btn { flex-shrink: 0; padding: .65rem 1.1rem; border-radius: 12px; }

.ia-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: .4rem;
}

/* ============================================================
   SISTEMA ADMIN
   ============================================================ */

.admin-section-title {
  font-weight: 800;
  font-size: .9rem;
  color: var(--primary-light, #a78bfa);
  margin: .5rem 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

.admin-suspects { display: flex; flex-direction: column; gap: .75rem; }

.admin-user-card {
  background: var(--bg-card, rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.admin-user-avatar { font-size: 2rem; }
.admin-user-name  { font-weight: 800; font-size: 1rem; }
.admin-user-stats { font-size: .78rem; color: var(--text-muted); }
.admin-penalty-badge {
  display: inline-block;
  margin-top: .25rem;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 6px;
  padding: .15rem .45rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.admin-actions button {
  padding: .35rem .7rem;
  border-radius: 8px;
  border: none;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.admin-actions button:hover { opacity: .85; transform: translateY(-1px); }

.btn-admin-ok     { background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.3) !important; }
.btn-admin-warn   { background: rgba(245,158,11,.2); color: #fbbf24; border: 1px solid rgba(245,158,11,.3) !important; }
.btn-admin-limit  { background: rgba(239,68,68,.2);  color: #f87171; border: 1px solid rgba(239,68,68,.3) !important; }
.btn-admin-reset  { background: rgba(239,68,68,.3);  color: #fca5a5; border: 1px solid rgba(239,68,68,.4) !important; }
.btn-admin-remove { background: rgba(124,58,237,.2); color: #a78bfa; border: 1px solid rgba(124,58,237,.3) !important; }

/* Histórico de ações admin */
.admin-history { display: flex; flex-direction: column; gap: .4rem; }
.admin-history-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr auto;
  gap: .5rem;
  align-items: center;
  background: var(--bg-secondary, rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .75rem;
  font-size: .8rem;
}
.admin-hist-action {
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 5px;
  text-align: center;
  font-size: .72rem;
}
.admin-act-ok            { background: rgba(16,185,129,.2);  color: #34d399; }
.admin-act-warn          { background: rgba(245,158,11,.2);  color: #fbbf24; }
.admin-act-limit         { background: rgba(239,68,68,.2);   color: #f87171; }
.admin-act-reset         { background: rgba(239,68,68,.3);   color: #fca5a5; }
.admin-act-remove_penalty{ background: rgba(124,58,237,.2);  color: #a78bfa; }
.admin-hist-reason { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-hist-date   { color: var(--text-muted); font-size: .72rem; white-space: nowrap; }

/* ============================================================
   CÓDIGOS DE RESGATE
   ============================================================ */

.redeem-result { font-size: .9rem; font-weight: 700; min-height: 1.2rem; }
.redeem-ok  { color: #34d399; }
.redeem-err { color: #f87171; }

/* Link admin na sidebar */
.nav-item-admin { color: #fbbf24 !important; }
.nav-item-admin:hover { background: rgba(251,191,36,.1) !important; }

/* ── Admin: formulário de criação de códigos ─────────────────── */
.admin-create-code-form {
  background: var(--bg-card, rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}
.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.admin-form-row input,
.admin-form-row select {
  flex: 1;
  min-width: 110px;
  font-size: .85rem;
  border-radius: 8px;
}

/* ── Admin: tabela de códigos ────────────────────────────────── */
.admin-codes-table {
  background: var(--bg-card, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.admin-codes-header,
.admin-codes-row {
  display: grid;
  grid-template-columns: 2fr 1fr 60px 70px 80px 36px;
  gap: .5rem;
  align-items: center;
  padding: .5rem .85rem;
  font-size: .8rem;
}
.admin-codes-header {
  background: rgba(124,58,237,.12);
  font-weight: 800;
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-codes-row { border-top: 1px solid var(--border); }
.admin-code-val  { font-weight: 700; letter-spacing: .04em; word-break: break-all; }
.admin-code-type { font-size: .72rem; font-weight: 700; padding: .15rem .4rem; border-radius: 5px; text-align:center; }
.admin-type-coins   { background: rgba(251,191,36,.15);  color: #fbbf24; }
.admin-type-iacoins { background: rgba(124,58,237,.15);  color: #a78bfa; }
.admin-type-xp      { background: rgba(16,185,129,.15);  color: #34d399; }
.admin-type-admin   { background: rgba(239,68,68,.15);   color: #f87171; }

/* ── Admin: badges de usuário ─────────────────────────────────── */
.admin-badge-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 5px;
  margin-left: .3rem;
  vertical-align: middle;
}
.admin-tag-admin   { background: rgba(251,191,36,.2);  color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.admin-tag-suspect { background: rgba(239,68,68,.2);   color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.admin-tag-limit   { background: rgba(124,58,237,.2);  color: #a78bfa; border: 1px solid rgba(124,58,237,.3); }

@media (max-width: 600px) {
  .admin-codes-header,
  .admin-codes-row { grid-template-columns: 2fr 1fr 50px 50px 0 36px; }
  .admin-codes-header span:nth-child(5),
  .admin-codes-row  span:nth-child(5) { display: none; }
}

/* ── Admin: tabs ─────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .35rem;
}
.admin-tab-btn {
  flex: 1;
  padding: .5rem .75rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.admin-tab-btn:hover { background: rgba(124,58,237,.12); color: var(--text-primary); }
.admin-tab-btn.active {
  background: linear-gradient(135deg,#7c3aed,#6d28d9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}

/* ── Admin: user card ────────────────────────────────────────── */
.admin-user-id {
  font-size: .7rem;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
}
.admin-card-danger {
  border-color: rgba(239,68,68,.35) !important;
  background: rgba(239,68,68,.04) !important;
}

/* ── Admin: Estatísticas ─────────────────────────────────────── */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.admin-stat-card {
  background: var(--bg-card, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem .75rem;
  text-align: center;
}
.admin-stat-icon { font-size: 1.5rem; margin-bottom: .35rem; }
.admin-stat-val  { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); }
.admin-stat-label{ font-size: .78rem; color: var(--text-secondary); font-weight: 600; margin-top: .2rem; }
.admin-stat-sub  { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; }

/* Mini gráfico de barras */
.admin-chart-wrap {
  background: var(--bg-card, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-top: .75rem;
}
.admin-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
  margin-bottom: .5rem;
}
.admin-stat-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.admin-stat-bar {
  width: 100%;
  background: linear-gradient(180deg, #a855f7, #7c3aed);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height .3s;
}
.admin-stat-bar-val {
  font-size: .55rem;
  font-weight: 700;
  color: #a78bfa;
  position: absolute;
  top: -14px;
  width: 100%;
  text-align: center;
}
.admin-chart-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Loja: card de resgate inline ────────────────────────────── */
.redeem-inline-card {
  max-width: 440px;
  margin: 2rem auto;
  background: var(--bg-card, rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* ── IA: tags de fonte da resposta ───────────────────────────────────────── */
.ia-source-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .12rem .4rem;
  border-radius: 5px;
  margin-top: .3rem;
}
.ia-src-kb     { background: rgba(16,185,129,.15);  color: #34d399; }
.ia-src-calc   { background: rgba(251,191,36,.15);  color: #fbbf24; }
.ia-src-wiki   { background: rgba(100,116,139,.18); color: #94a3b8; }
.ia-src-cache  { background: rgba(124,58,237,.15);  color: #a78bfa; }
.ia-src-gemini { background: rgba(59,130,246,.15);  color: #60a5fa; }

/* ── Admin: lista de artigos da base de conhecimento ────────────────────── */
.admin-kb-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.admin-kb-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--bg-card, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem;
}
.admin-kb-info   { flex: 1; min-width: 0; }
.admin-kb-title  { font-weight: 800; font-size: .9rem; margin-bottom: .2rem; }
.admin-kb-meta   { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; }
.admin-kb-subject {
  font-size: .7rem; font-weight: 700; padding: .1rem .35rem;
  border-radius: 5px; background: rgba(124,58,237,.15); color: #a78bfa;
}
.admin-kb-tag {
  font-size: .7rem; font-weight: 700; padding: .1rem .35rem;
  border-radius: 5px; background: rgba(16,185,129,.12); color: #34d399;
}
.admin-kb-preview {
  font-size: .78rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-kb-row-editing {
  border-color: rgba(124,58,237,.45) !important;
  background: rgba(124,58,237,.05) !important;
  flex-direction: column;
}

/* ── CRONOGRAMA SEMANAL ─────────────────────────────────────── */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .6rem;
  margin-top: .75rem;
}
.schedule-day-card {
  background: var(--bg-card, rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .65rem .75rem;
}
.schedule-day-today {
  border-color: rgba(124,58,237,.5);
  background: rgba(124,58,237,.07);
}
.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.schedule-day-name { font-weight: 800; font-size: .82rem; }
.schedule-today-badge {
  background: rgba(124,58,237,.3);
  color: #a78bfa;
  font-size: .62rem;
  padding: .05rem .3rem;
  border-radius: 4px;
  margin-left: .3rem;
}
.schedule-add-btn { font-size: 1rem; line-height: 1; padding: 0 .3rem; }
.schedule-subjects { display: flex; flex-wrap: wrap; gap: .3rem; }
.schedule-tag {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: rgba(124,58,237,.15);
  color: #a78bfa;
  border-radius: 6px;
  padding: .15rem .4rem;
  font-size: .72rem;
  font-weight: 700;
}
.schedule-tag button {
  background: none; border: none; cursor: pointer;
  color: #a78bfa; font-size: .8rem; line-height: 1;
  padding: 0; opacity: .7;
}
.schedule-tag button:hover { opacity: 1; }
.schedule-empty { font-size: .72rem; color: var(--text-muted); }

/* ── TAREFAS DIÁRIAS ─────────────────────────────────────────── */
.daily-tasks-section {
  background: var(--bg-card, rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.daily-tasks-header { margin-bottom: .75rem; }
.daily-tasks-header > div:first-child {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem;
}
.daily-tasks-title  { font-weight: 800; font-size: 1rem; }
.daily-tasks-progress {
  font-size: .75rem; color: var(--text-muted);
  background: rgba(255,255,255,.07); border-radius: 10px;
  padding: .1rem .45rem;
}
.daily-tasks-bar-wrap {
  height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden;
}
.daily-tasks-bar {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #34d399);
  border-radius: 2px;
  transition: width .4s ease;
}
.daily-tasks-list { display: flex; flex-direction: column; gap: .5rem; }
.daily-task-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.daily-task-card:hover { background: rgba(124,58,237,.1); }
.daily-task-done { opacity: .55; }
.daily-task-done .daily-task-title { text-decoration: line-through; }
.daily-task-icon { font-size: 1.4rem; flex-shrink: 0; }
.daily-task-info { flex: 1; min-width: 0; }
.daily-task-title { font-weight: 700; font-size: .88rem; }
.daily-task-desc  { font-size: .75rem; color: var(--text-muted); margin-top: .1rem; }
.daily-task-check { font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   GRUPO — ABAS DE NAVEGAÇÃO
   ============================================================ */
.group-tabs {
  display: flex;
  gap: .2rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.group-tabs::-webkit-scrollbar { display: none; }

.group-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: .5rem .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.group-tab:hover { color: var(--primary); }
.group-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.group-tab-panel { display: none; }
.group-tab-panel.active { display: block; }

/* ============================================================
   RANKING
   ============================================================ */
.ranking-period-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.ranking-period-btn {
  flex: 1;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: .45rem .75rem;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}
.ranking-period-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .6rem;
  border-radius: 10px;
  margin-bottom: .4rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: background .15s;
}
.ranking-row-me {
  background: rgba(124,58,237,.07);
  border-color: var(--primary);
}
.ranking-pos   { font-size: 1.3rem; min-width: 2rem; text-align: center; flex-shrink: 0; }
.ranking-avatar { font-size: 1.45rem; flex-shrink: 0; }
.ranking-info  { flex: 1; min-width: 0; }
.ranking-name  { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-xp-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: .3rem;
  overflow: hidden;
}
.ranking-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  border-radius: 2px;
  transition: width .5s ease;
}
.ranking-xp {
  font-weight: 700;
  color: var(--primary);
  font-size: .82rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.ranking-you-tag {
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .6rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: .25rem;
}

/* ============================================================
   MEDALHAS DO GRUPO
   ============================================================ */
.medals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .85rem;
  gap: .5rem;
  flex-wrap: wrap;
}
.medals-week-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.medals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: .65rem;
}

.medal-card {
  border-radius: 14px;
  padding: .9rem .7rem .75rem;
  text-align: center;
  border: 2px solid var(--border);
  background: var(--card-bg);
  transition: transform .2s, box-shadow .2s;
}
.medal-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.medal-card-active {
  background: var(--medal-bg, var(--card-bg));
  border-color: var(--medal-color, var(--border));
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}

.medal-icon { font-size: 2rem; margin-bottom: .3rem; line-height: 1; }
.medal-label {
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: .25rem;
  line-height: 1.2;
}
.medal-rarity-badge {
  display: inline-block;
  color: #fff;
  border-radius: 6px;
  padding: .1rem .45rem;
  font-size: .62rem;
  font-weight: 700;
  margin-bottom: .35rem;
  letter-spacing: .03em;
}
.medal-desc {
  font-size: .7rem;
  color: var(--text-muted);
  margin-bottom: .55rem;
  line-height: 1.3;
}
.medal-holder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  font-weight: 600;
  font-size: .75rem;
  padding: .3rem .5rem;
  background: rgba(0,0,0,.04);
  border-radius: 8px;
  min-height: 2rem;
}
.medal-holder-me {
  background: rgba(124,58,237,.12);
  color: var(--primary);
}
.medal-holder-empty {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
  font-size: .72rem;
}
.medal-rewards {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: .35rem;
  font-weight: 600;
}

/* ============================================================
   MEDALHAS NO PERFIL DO AMIGO
   ============================================================ */
.profile-medals-section {
  margin: .75rem 0;
  padding: .65rem .75rem;
  background: rgba(124,58,237,.05);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.profile-medals-title {
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: .5rem;
  color: var(--text-muted);
}
.profile-medals-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.profile-medal-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  border: 1.5px solid;
  white-space: nowrap;
}

/* ── Banner dentro do modal de perfil de amigo ──────────────── */
.modal-friend-profile-modal {
  padding: 0;
  overflow: hidden;
}
.modal-friend-profile-modal > .modal-btns {
  padding: .75rem 1.25rem 1.25rem;
}
.modal-friend-profile-modal > div[style] {
  padding: .5rem 1.25rem;
}
.friend-modal-banner {
  border-radius: 0;                /* sem borda no topo do modal */
  margin-bottom: 0;
  min-height: 90px;
  padding: 1rem 1.25rem;
}
.friend-modal-banner .friend-profile-header {
  margin: 0;
}

/* ============================================================
   NOTIFICAÇÕES PUSH — CONFIGURAÇÕES
   ============================================================ */
.push-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 20px;
  border: 1.5px solid;
}
.push-status-active     { color: #16a34a; border-color: #16a34a; background: rgba(22,163,74,.08); }
.push-status-inactive   { color: var(--text-muted); border-color: var(--border); background: transparent; }
.push-status-denied     { color: #dc2626; border-color: #dc2626; background: rgba(220,38,38,.08); }
.push-status-warn       { color: #d97706; border-color: #d97706; background: rgba(217,119,6,.08); }
.push-status-unsupported{ color: var(--text-muted); border-color: var(--border); background: transparent; }

.push-prefs-section { margin-top: .25rem; }
.push-prefs-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 0 .25rem;
}
