/* ============================================
   ADAPSYS — Brand CSS
   Academia IA
   ============================================ */

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

/* ── VARIABLES ── */
:root {
  /* Turquesa (primario) */
  --brand:        #0097a7;
  --brand-light:  #00b8b8;
  --brand-dark:   #006379;
  --brand-bg:     #e6f7f8;

  /* Magenta (acento / logro) */
  --accent:       #ef2b97;
  --accent-mid:   #c20c5b;
  --accent-dark:  #740839;
  --accent-bg:    #fde8f3;

  /* Neutros */
  --surface:      #ffffff;
  --surface2:     #f3f3f3;
  --border:       rgba(0, 0, 0, 0.10);
  --text:         #1a1a2e;
  --text-mid:     #444444;
  --muted:        #999999;
  --muted-light:  #b7b7b7;

  /* Gradientes */
  --gradient:         linear-gradient(135deg, #006379 0%, #00b8b8 100%);
  --gradient-accent:  linear-gradient(135deg, #740839 0%, #ef2b97 100%);
  --gradient-prog:    linear-gradient(90deg, #0097a7, #00b8b8);

  /* Tipografía */
  --font:   'Poppins', sans-serif;

  /* Radios */
  --r:   12px;
  --rs:   8px;
  --rpill: 20px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.09);
}

/* ── RESET BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── BOTONES ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--rs);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover  { background: var(--accent-mid); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--rs);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--brand-dark); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: var(--rs);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-outline:hover {
  background: var(--brand-bg);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.1s;
}
.btn-ghost:hover { background: var(--surface2); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

/* ── BADGES / TAGS ── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: var(--rpill);
}
.badge-brand   { background: var(--brand-bg);  color: var(--brand); }
.badge-accent  { background: var(--accent-bg); color: var(--accent-mid); }
.badge-muted   { background: var(--surface2);  color: var(--muted); }

/* Label de sección estilo Adapsys */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.4rem;
}

/* ── TIPOGRAFÍA ── */
.title-xl  { font-size: 32px; font-weight: 800; color: var(--brand-dark); line-height: 1.15; }
.title-lg  { font-size: 24px; font-weight: 700; color: var(--brand-dark); }
.title-md  { font-size: 18px; font-weight: 600; color: var(--text); }
.title-sm  { font-size: 14px; font-weight: 600; color: var(--text); }
.body-text { font-size: 14px; font-weight: 400; color: var(--text-mid); }
.meta-text { font-size: 12px; font-weight: 400; color: var(--muted); }

/* ── BARRA DE PROGRESO ── */
.prog-track {
  width: 100%;
  height: 7px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient-prog);
  transition: width 0.4s ease;
}
.prog-fill-accent {
  background: var(--gradient-accent);
}

/* ── AVATAR ── */
.avatar {
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: var(--font);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── TOPBAR ── */
.topbar {
  background: var(--brand-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── NAV TABS ── */
.nav-tabs {
  display: flex;
  gap: 2px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
  transition: color 0.15s;
  margin-bottom: -1px;
}
.nav-tab:hover  { color: var(--brand); }
.nav-tab.active { color: var(--brand-dark); border-bottom-color: var(--accent); }

@media (max-width: 600px) {
  .nav-tabs {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 8px;
    gap: 0;
  }
  .nav-tab {
    font-size: 12px;
    padding: 8px 10px;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
  }
}

/* ── NOTIFICACIÓN TOAST ── */
.notif {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brand-dark);
  color: white;
  padding: 10px 18px;
  border-radius: var(--rs);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.notif.show { opacity: 1; transform: translateY(0); }

/* ── ELEMENTO DECORATIVO: CÍRCULO ── */
.deco-circle {
  border-radius: 50%;
  background: var(--brand-light);
  opacity: 0.15;
  position: absolute;
  pointer-events: none;
}

/* ── DOT GRID (textura de fondo) ── */
.dot-grid {
  background-image: radial-gradient(circle, rgba(0,151,167,0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ── STAT CARD ── */
.stat-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  text-align: center;
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.stat-num.accent { color: var(--accent); }
.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

/* ── RANKING ROW ── */
.leader-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.1s;
}
.leader-row:last-child { border-bottom: none; }
.leader-row:hover { background: var(--surface2); }
.leader-row.me    { background: var(--brand-bg); }
