/* ============================================================
   GameScoring — Diseño Creativo & Dinámico
   Glassmorphism · Gradientes · Animaciones · Micro-interacciones
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Paleta principal — vibrante */
  --color-primary:       #6366f1;
  --color-primary-dark:  #4f46e5;
  --color-primary-light: #a5b4fc;
  --color-secondary:     #8b5cf6;
  --color-accent:        #f59e0b;
  --color-pink:          #ec4899;
  --color-cyan:          #06b6d4;
  --color-emerald:       #10b981;

  /* Gradientes de marca */
  --grad-primary:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --grad-gold:     linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-ocean:    linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --grad-emerald:  linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-sunset:   linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  --grad-dark:     linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);

  /* Fondos */
  --bg-primary:    #ffffff;
  --bg-secondary:  #f0f0ff;
  --bg-tertiary:   #e8e8f8;
  --bg-card:       #ffffff;
  --bg-sidebar:    #0f0c29;
  --bg-glass:      rgba(255, 255, 255, 0.7);
  --bg-glass-dark: rgba(255, 255, 255, 0.05);

  /* Textos */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-sidebar:   rgba(255,255,255,.65);
  --text-sidebar-active: #ffffff;

  /* Bordes */
  --border-color:   rgba(99,102,241,.15);
  --border-glass:   rgba(255,255,255,.3);
  --border-radius:  14px;
  --border-radius-sm: 10px;
  --border-radius-lg: 20px;
  --border-radius-xl: 28px;

  /* Sombras */
  --shadow-sm:    0 1px 4px rgba(99,102,241,.08);
  --shadow-md:    0 4px 20px rgba(99,102,241,.12);
  --shadow-lg:    0 10px 40px rgba(99,102,241,.18);
  --shadow-xl:    0 20px 60px rgba(99,102,241,.22);
  --shadow-glow:  0 0 30px rgba(99,102,241,.4);
  --shadow-gold:  0 8px 30px rgba(245,158,11,.35);

  /* Layout */
  --sidebar-width:   270px;
  --topbar-height:   66px;
  --content-padding: 28px;

  /* Transiciones */
  --transition:      all .25s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .4s cubic-bezier(.4,0,.2,1);
  --transition-bounce: all .4s cubic-bezier(.34,1.56,.64,1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary:   #0d0b1e;
  --bg-secondary: #13102a;
  --bg-tertiary:  #1a1635;
  --bg-card:      #1a1635;
  --bg-glass:     rgba(255,255,255,.05);
  --border-color: rgba(99,102,241,.2);
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(99,102,241,.5); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 12px rgba(99,102,241,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}

@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(.9); }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes numberCount {
  from { opacity: 0; transform: scale(.5) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fondo animado global */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 10% 20%, rgba(99,102,241,.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 90% 80%, rgba(139,92,246,.05) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 50% 50%, rgba(236,72,153,.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; height: auto; }
code { font-family: 'Fira Code', 'Consolas', monospace; font-size: .875rem; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  background-image: var(--grad-dark);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}

/* Patrón decorativo en sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.3) 0%, transparent 70%);
  pointer-events: none;
}
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 80px; left: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}

.sidebar__logo {
  font-size: 30px;
  animation: float 3s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(99,102,241,.5));
}

.sidebar__name {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -.03em;
  flex: 1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar__close {
  display: none;
  background: none;
  border: none;
  color: var(--text-sidebar);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}
.sidebar__close:hover { color: #fff; transform: rotate(90deg); }

.sidebar__nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.sidebar__section {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.25);
  padding: 14px 10px 6px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--border-radius-sm);
  color: var(--text-sidebar);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sidebar__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity .25s ease;
  border-radius: var(--border-radius-sm);
}

.sidebar__link:hover { color: #fff; transform: translateX(4px); }
.sidebar__link:hover::before { opacity: .15; }

.sidebar__link.active {
  color: #fff;
  font-weight: 600;
}
.sidebar__link.active::before { opacity: 1; }

.sidebar__link.active::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: #fff;
  border-radius: 3px 0 0 3px;
}

.sidebar__link span, .sidebar__icon { position: relative; z-index: 1; }
.sidebar__icon { font-size: 1.05rem; min-width: 22px; text-align: center; }

.sidebar__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  margin: 10px 0;
}

.sidebar__footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.sidebar__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15), 0 4px 12px rgba(99,102,241,.4);
  animation: pulse-ring 2.5s infinite;
}

.sidebar__user-info { flex: 1; overflow: hidden; }
.sidebar__user-name {
  display: block;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-role {
  display: block;
  color: rgba(255,255,255,.35);
  font-size: .72rem;
  text-transform: capitalize;
}

.sidebar__logout {
  color: rgba(255,255,255,.3);
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
  padding: 6px;
  border-radius: 8px;
}
.sidebar__logout:hover { color: #ef4444; background: rgba(239,68,68,.15); }

.sidebar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  backdrop-filter: blur(6px);
}

/* ── Main Layout ─────────────────────────────────────────────── */
.main-layout {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin .35s ease;
  position: relative;
  z-index: 1;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--content-padding);
  z-index: 50;
  box-shadow: 0 1px 0 rgba(99,102,241,.08), var(--shadow-sm);
}

.topbar__menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}
.topbar__menu-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.topbar__title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: fadeInLeft .4s ease;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__theme {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  width: 38px; height: 38px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-bounce);
  backdrop-filter: blur(8px);
}
.topbar__theme:hover { transform: rotate(20deg) scale(1.1); border-color: var(--color-accent); }

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: var(--content-padding);
  max-width: 1440px;
  width: 100%;
  animation: fadeIn .4s ease;
}

.main-footer {
  padding: 16px var(--content-padding);
  text-align: center;
  color: var(--text-muted);
  font-size: .78rem;
  border-top: 1px solid var(--border-color);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  animation: fadeInUp .4s ease both;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card--wide { grid-column: 1 / -1; }

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(99,102,241,.03) 0%, transparent 100%);
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__link {
  font-size: .82rem;
  color: var(--color-primary);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(99,102,241,.08);
  transition: var(--transition);
}
.card__link:hover { background: var(--color-primary); color: #fff; }

.card__body { padding: 22px; }

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stats-grid--6 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-glass);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  animation: fadeInUp .5s ease both;
  cursor: default;
}

/* Orb decorativo */
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--stat-orb, rgba(99,102,241,.1));
  filter: blur(20px);
  transition: var(--transition-slow);
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl);
}
.stat-card:hover::before { transform: scale(1.5); }

.stat-card__icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
  animation: float 3s ease-in-out infinite;
}
.stat-card:nth-child(2) .stat-card__icon { animation-delay: .5s; }
.stat-card:nth-child(3) .stat-card__icon { animation-delay: 1s; }
.stat-card:nth-child(4) .stat-card__icon { animation-delay: 1.5s; }

.stat-card__number {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  display: block;
  background: var(--stat-grad, var(--grad-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: numberCount .6s ease both;
}

.stat-card__label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-card__action { font-size: .75rem; color: var(--color-primary); display: block; margin-top: 6px; font-weight: 600; }

/* Colores de tarjetas */
.stat-card--blue   { border-top: 3px solid var(--color-cyan);     --stat-orb: rgba(6,182,212,.15);   --stat-grad: linear-gradient(135deg,#06b6d4,#6366f1); }
.stat-card--green  { border-top: 3px solid var(--color-emerald);  --stat-orb: rgba(16,185,129,.15);  --stat-grad: linear-gradient(135deg,#10b981,#06b6d4); }
.stat-card--purple { border-top: 3px solid var(--color-secondary);--stat-orb: rgba(139,92,246,.15);  --stat-grad: linear-gradient(135deg,#8b5cf6,#ec4899); }
.stat-card--gold   { border-top: 3px solid var(--color-accent);   --stat-orb: rgba(245,158,11,.15);  --stat-grad: var(--grad-gold); }
.stat-card--orange { border-top: 3px solid #f97316;               --stat-orb: rgba(249,115,22,.15);  --stat-grad: var(--grad-sunset); }
.stat-card--indigo { border-top: 3px solid var(--color-primary);  --stat-orb: rgba(99,102,241,.15);  --stat-grad: var(--grad-primary); }

/* ── Dashboard Grid ──────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 22px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: .875rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-bounce);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

/* Efecto ripple */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.2);
  border-radius: inherit;
  transform: scale(0);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}
.btn:active::after { transform: scale(2); opacity: 0; transition: 0s; }

.btn--primary {
  background: var(--grad-primary);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,.4);
}
.btn--primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(99,102,241,.5);
  color: #fff;
  animation: gradient-shift 2s ease infinite;
}

.btn--secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}
.btn--secondary:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239,68,68,.35);
}
.btn--danger:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(239,68,68,.45); color: #fff; }

.btn--success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16,185,129,.35);
}
.btn--success:hover { transform: translateY(-2px); color: #fff; }

.btn--ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn--ghost:hover { background: rgba(99,102,241,.08); color: var(--color-primary); border-color: var(--border-color); }

.btn--white { background: rgba(255,255,255,.9); color: var(--color-primary); backdrop-filter: blur(8px); }
.btn--white:hover { background: #fff; color: var(--color-primary-dark); transform: translateY(-2px); }

.btn--outline-danger { background: transparent; color: #ef4444; border-color: #ef4444; }
.btn--outline-danger:hover { background: #ef4444; color: #fff; }

.btn--sm  { padding: 6px 14px; font-size: .8rem; }
.btn--lg  { padding: 14px 28px; font-size: 1rem; }
.btn--full{ width: 100%; border-radius: var(--border-radius); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group   { margin-bottom: 22px; }
.form-label   {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.form-label__link { font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.form-label__hint { font-size: .78rem; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: .9rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12), var(--shadow-sm);
  background: var(--bg-primary);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea { min-height: 130px; resize: vertical; }
.form-select   {
  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='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.form-select--sm { width: auto; min-width: 140px; }

.has-error .form-input { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.form-error { display: block; font-size: .8rem; color: #ef4444; margin-top: 6px; font-weight: 600; }

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-color);
}

.form-divider {
  position: relative;
  text-align: center;
  margin: 28px 0;
}
.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}
.form-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 16px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; font-weight: 500; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }

.required { color: #ef4444; margin-left: 2px; }

/* Input wrapper */
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-left: 44px; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.input-toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  opacity: .4;
  transition: var(--transition);
  z-index: 1;
}
.input-toggle-pass:hover { opacity: 1; transform: translateY(-50%) scale(1.2); }

.input-wrapper--search { display: flex; gap: 8px; align-items: center; }
.input-wrapper--search .form-input { padding-left: 44px; min-width: 220px; }

.char-counter {
  font-size: .74rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Fortaleza contraseña */
.password-strength {
  height: 4px;
  border-radius: 4px;
  margin-top: 8px;
  background: var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}
.password-strength::before {
  content: '';
  display: block;
  height: 100%;
  width: var(--strength, 0%);
  background: var(--strength-color, var(--border-color));
  transition: all .5s cubic-bezier(.4,0,.2,1);
  border-radius: 4px;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 22px;
  font-size: .9rem;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  animation: slideDown .3s ease;
}

.alert--success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); color: #065f46; }
.alert--error   { background: rgba(239,68,68,.06);  border-color: rgba(239,68,68,.25);  color: #991b1b; }
.alert--warning { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3);  color: #92400e; }
.alert--info    { background: rgba(99,102,241,.06); border-color: rgba(99,102,241,.25); color: #1d4ed8; }

.alert__close { background: none; border: none; cursor: pointer; opacity: .4; font-size: 1rem; flex-shrink: 0; transition: var(--transition); }
.alert__close:hover { opacity: 1; transform: rotate(90deg); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge--success   { background: rgba(16,185,129,.12);  color: #059669; border: 1px solid rgba(16,185,129,.25); }
.badge--danger    { background: rgba(239,68,68,.1);     color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.badge--warning   { background: rgba(245,158,11,.12);  color: #d97706; border: 1px solid rgba(245,158,11,.25); }
.badge--info      { background: rgba(99,102,241,.1);   color: #4f46e5; border: 1px solid rgba(99,102,241,.2); }
.badge--neutral   { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border-color); }
.badge--pendiente { background: rgba(245,158,11,.12);  color: #d97706; border: 1px solid rgba(245,158,11,.25); }
.badge--revisado  { background: rgba(16,185,129,.12);  color: #059669; border: 1px solid rgba(16,185,129,.25); }
.badge--destacado { background: linear-gradient(135deg,rgba(245,158,11,.15),rgba(249,115,22,.1)); color: #d97706; border: 1px solid rgba(245,158,11,.3); }
.badge--rechazado { background: rgba(239,68,68,.1);     color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.badge--sm        { font-size: .65rem; padding: 2px 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(99,102,241,.07);
  border-radius: 100px;
  font-size: .75rem;
  color: var(--color-primary);
  border: 1px solid rgba(99,102,241,.15);
  font-weight: 500;
}
.tag--tool { background: rgba(139,92,246,.1); color: var(--color-secondary); border-color: rgba(139,92,246,.2); }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrapper {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-glass);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  animation: fadeInUp .4s ease;
}

.table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.table thead th {
  background: linear-gradient(135deg, rgba(99,102,241,.06) 0%, rgba(139,92,246,.04) 100%);
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
  transition: background .15s ease;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover td { background: rgba(99,102,241,.04); }
.table__row--active td { background: rgba(99,102,241,.04) !important; }
.table__row--highlight td { background: rgba(245,158,11,.05) !important; }
.table__actions { display: flex; gap: 8px; align-items: center; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: var(--transition-bounce);
  backdrop-filter: blur(8px);
}

.pagination__btn:hover,
.pagination__btn.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(99,102,241,.4);
}

/* ── Auth Layout ─────────────────────────────────────────────── */
.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  background: var(--grad-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Orbs animados en el fondo de auth */
.auth-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.auth-hero__bg::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  top: -100px; right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.3) 0%, transparent 70%);
  animation: float 5s ease-in-out infinite;
}
.auth-hero__bg::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  bottom: -50px; left: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,.2) 0%, transparent 70%);
  animation: float 4s ease-in-out infinite reverse;
}

.auth-hero__content {
  position: relative;
  z-index: 1;
  padding: 48px;
  text-align: center;
  color: #fff;
  animation: fadeInLeft .6s ease;
}

.auth-hero__logo {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(99,102,241,.6));
}
.auth-hero__title {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-hero__subtitle { font-size: 1.05rem; opacity: .6; margin-bottom: 52px; }

.auth-hero__features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.auth-hero__feature {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255,255,255,.1);
  transition: var(--transition);
}
.auth-hero__feature:hover { background: rgba(255,255,255,.1); transform: translateX(6px); }
.auth-hero__feature span { font-size: 26px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.auth-hero__feature p { font-size: .95rem; opacity: .9; margin: 0; font-weight: 500; }

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg-secondary);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-glass);
  animation: scaleIn .4s cubic-bezier(.34,1.56,.64,1);
}

.auth-form__header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-form__header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -.03em;
}
.auth-form__header p { color: var(--text-muted); font-size: .9rem; }

.auth-form__footer {
  text-align: center;
  margin-top: 26px;
  font-size: .875rem;
  color: var(--text-muted);
}
.auth-panel__footer { margin-top: 24px; font-size: .78rem; color: var(--text-muted); }

/* ── Toolbar ─────────────────────────────────────────────────── */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.filter-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-form { flex: 1; max-width: 420px; }

/* ── Week Banner ─────────────────────────────────────────────── */
.week-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(139,92,246,.08));
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--border-radius);
  padding: 16px 22px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  animation: fadeInUp .4s ease;
  flex-wrap: wrap;
}
.week-banner--admin {
  background: linear-gradient(135deg, rgba(139,92,246,.1), rgba(236,72,153,.06));
  border-color: rgba(139,92,246,.2);
}
.week-banner__icon { font-size: 26px; animation: float 3s ease-in-out infinite; }
.week-banner__dates { display: block; font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

/* ── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--grad-primary);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  border-radius: var(--border-radius-lg);
  padding: 24px 28px;
  margin-top: 24px;
  color: #fff;
  flex-wrap: wrap;
  box-shadow: var(--shadow-glow);
}
.cta-banner__content { display: flex; align-items: center; gap: 18px; }
.cta-banner__emoji { font-size: 36px; animation: float 2s ease-in-out infinite; }
.cta-banner__content strong { display: block; font-size: 1.1rem; font-weight: 800; margin-bottom: 3px; }
.cta-banner__content p { font-size: .875rem; opacity: .85; margin: 0; }

/* ── Info banner ─────────────────────────────────────────────── */
.info-banner {
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--border-radius-sm);
  padding: 14px 18px;
  font-size: .9rem;
  color: var(--color-primary);
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

/* ── Prompt Cards ────────────────────────────────────────────── */
.prompts-list { display: flex; flex-direction: column; gap: 18px; }

.prompt-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  animation: fadeInUp .4s ease both;
}
.prompt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.prompt-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
}

.prompt-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.prompt-card__meta { display: flex; gap: 8px; flex-wrap: wrap; }

.prompt-card__body {
  padding: 0 22px 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

.prompt-card__section { margin-bottom: 14px; }
.prompt-card__section label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.prompt-card__text {
  font-size: .875rem;
  color: var(--text-secondary);
  background: rgba(99,102,241,.04);
  border: 1px solid rgba(99,102,241,.1);
  padding: 14px;
  border-radius: var(--border-radius-sm);
  font-family: 'Fira Code', monospace;
  line-height: 1.6;
}

.prompt-card__admin-note {
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(249,115,22,.05));
  border-left: 3px solid var(--color-accent);
  padding: 12px 16px;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-size: .875rem;
  color: #92400e;
}
.prompt-card__admin-note span { font-weight: 700; display: block; margin-bottom: 4px; }

.prompt-card__actions {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(99,102,241,.03);
  border-top: 1px solid var(--border-color);
}

/* Prompt list compact */
.prompt-list { list-style: none; }
.prompt-list__item { padding: 14px 0; border-bottom: 1px solid var(--border-color); transition: var(--transition); }
.prompt-list__item:last-child { border-bottom: none; }
.prompt-list__item:hover { padding-left: 6px; }
.prompt-list__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.prompt-list__title { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.prompt-list__meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); }

/* ── Award Cards ─────────────────────────────────────────────── */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.award-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-glass);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  animation: fadeInUp .5s ease both;
}

/* Fondo decorativo */
.award-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--award-color, rgba(245,158,11,.3)) 0%, transparent 70%);
  filter: blur(15px);
  transition: var(--transition-slow);
}
.award-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--award-color, var(--grad-gold));
}

.award-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-xl); }
.award-card:hover::before { transform: scale(2); }

.award-card__icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 14px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.2));
}
.award-card__tipo { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.award-card__semana { font-size: .85rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.award-card__desc { font-size: .875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.award-card__footer {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.award-list { list-style: none; }
.award-list__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.award-list__item:hover { padding-left: 4px; }
.award-list__item:last-child { border-bottom: none; }
.award-list__icon { font-size: 1.6rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.award-list__info { flex: 1; }
.award-list__tipo { font-weight: 700; font-size: .9rem; display: block; }
.award-list__semana { font-size: .78rem; color: var(--text-muted); display: block; }
.award-list__date { font-size: .78rem; color: var(--text-muted); }

/* ── User cell ───────────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(99,102,241,.35);
  transition: var(--transition-bounce);
}
.user-cell:hover .user-cell__avatar { transform: scale(1.15) rotate(5deg); }
.user-cell div { display: flex; flex-direction: column; }
.user-cell span { font-weight: 600; font-size: .875rem; }
.user-cell small { color: var(--text-muted); font-size: .78rem; }

/* ── Quick Actions ───────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-glass);
  text-align: center;
  transition: var(--transition-bounce);
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.quick-action span:first-child {
  font-size: 1.6rem;
  transition: var(--transition-bounce);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.1));
}
.quick-action:hover {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow-glow);
}
.quick-action:hover span:first-child { transform: scale(1.2) rotate(-5deg); }

/* ── Activity list ───────────────────────────────────────────── */
.activity-list { list-style: none; }
.activity-list__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: .8rem;
  transition: var(--transition);
}
.activity-list__item:hover { padding-left: 4px; }
.activity-list__item:last-child { border-bottom: none; }
.activity-list__action { font-weight: 700; color: var(--text-primary); }
.activity-list__user { color: var(--color-primary); font-weight: 600; }
.activity-list__time { color: var(--text-muted); white-space: nowrap; }
.log-action { background: rgba(99,102,241,.08); color: var(--color-primary); padding: 3px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal {
  border: none;
  border-radius: var(--border-radius-xl);
  padding: 0;
  box-shadow: var(--shadow-xl);
  max-width: 560px;
  width: calc(100% - 32px);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
}

.modal::backdrop {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
}

.modal[open] { animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1); }

.modal__content { display: flex; flex-direction: column; max-height: 90vh; }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(99,102,241,.05) 0%, transparent 100%);
}
.modal__header h3 { font-size: 1.15rem; font-weight: 800; }
.modal__close {
  background: rgba(99,102,241,.08);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal__close:hover { background: #ef4444; color: #fff; transform: rotate(90deg); }
.modal__body { padding: 26px; overflow-y: auto; }
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 26px;
  border-top: 1px solid var(--border-color);
  background: rgba(99,102,241,.02);
}

/* ── Status buttons ──────────────────────────────────────────── */
.status-buttons { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--border-color);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition-bounce);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
}
.status-btn input[type=radio] { display: none; }
.status-btn:hover { border-color: var(--color-primary); transform: scale(1.03); }
.status-btn--active {
  border-color: var(--color-primary);
  background: rgba(99,102,241,.1);
  color: var(--color-primary);
  font-weight: 800;
}

/* ── Misc ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px;
  color: var(--text-muted);
}
.empty-state span { font-size: 52px; display: block; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--text-secondary); font-weight: 700; }
.empty-state p { font-size: .9rem; margin-bottom: 20px; }
.empty-state--full {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-glass);
  padding: 70px 40px;
  margin-top: 8px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp .4s ease;
}

.result-count { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; font-weight: 500; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.profile-avatar-section { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.profile-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(99,102,241,.4), 0 0 0 3px rgba(99,102,241,.15);
  animation: pulse-ring 3s infinite;
}
.profile-avatar__name { font-weight: 800; font-size: 1.05rem; display: block; }
.profile-avatar__email { font-size: .85rem; color: var(--text-muted); display: block; margin-top: 2px; }

.info-list dt { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 18px; }
.info-list dd { color: var(--text-primary); font-size: .9rem; margin-top: 5px; font-weight: 500; }

.form-page { max-width: 920px; }
.prompt-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 22px; }
.prompt-detail__meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; font-size: .85rem; color: var(--text-muted); }
.prompt-detail__section { margin-bottom: 22px; }
.prompt-detail__section h4 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 10px; }
.prompt-detail__content {
  font-family: 'Fira Code', monospace;
  font-size: .875rem;
  background: rgba(99,102,241,.04);
  border: 1px solid rgba(99,102,241,.1);
  padding: 18px;
  border-radius: var(--border-radius-sm);
  line-height: 1.7;
  white-space: pre-wrap;
}

.link { color: var(--color-primary); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ── Ranking special row ─────────────────────────────────────── */
.table tbody tr:nth-child(1) .user-cell__avatar { background: var(--grad-gold); box-shadow: var(--shadow-gold); }
.table tbody tr:nth-child(2) .user-cell__avatar { background: linear-gradient(135deg,#94a3b8,#64748b); }
.table tbody tr:nth-child(3) .user-cell__avatar { background: linear-gradient(135deg,#b45309,#92400e); }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.45); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .profile-grid       { grid-template-columns: 1fr; }
  .prompt-detail-grid { grid-template-columns: 1fr; }
  .auth-wrapper       { grid-template-columns: 1fr; }
  .auth-hero          { display: none; }
  .auth-panel         { padding: 28px; }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
    --sidebar-width:   270px;
  }

  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-xl); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar__close { display: flex; }
  .sidebar__overlay.is-visible { display: block; }

  .main-layout { margin-left: 0; }
  .topbar__menu-btn { display: flex; }
  .topbar__title { font-size: .95rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid--6 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .awards-grid    { grid-template-columns: 1fr; }
  .quick-actions  { grid-template-columns: repeat(3, 1fr); }

  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }

  .page-toolbar { flex-direction: column; align-items: stretch; }
  .search-form  { max-width: 100%; }

  .table thead { display: none; }
  .table tbody tr { display: flex; flex-direction: column; padding: 14px; }
  .table tbody td { padding: 4px 0; border-bottom: none; font-size: .85rem; }
  .table tbody tr { border-bottom: 1px solid var(--border-color); }
  .table__actions { flex-direction: row; flex-wrap: wrap; padding-top: 8px; }

  .status-buttons { grid-template-columns: 1fr 1fr; }
  .modal { width: calc(100% - 16px); }
  .prompt-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card  { padding: 18px; }
  .auth-card  { padding: 26px; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
  .cta-banner { flex-direction: column; text-align: center; }
  .week-banner { flex-direction: column; text-align: center; }
}

/* ── Animaciones de entrada con delay ────────────────────────── */
.stats-grid .stat-card:nth-child(1) { animation-delay: .05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: .10s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: .15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: .20s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: .25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: .30s; }

.dashboard-grid .card:nth-child(1) { animation-delay: .10s; }
.dashboard-grid .card:nth-child(2) { animation-delay: .20s; }
.dashboard-grid .card:nth-child(3) { animation-delay: .30s; }

.awards-grid .award-card:nth-child(odd)  { animation-delay: .05s; }
.awards-grid .award-card:nth-child(even) { animation-delay: .15s; }

.prompts-list .prompt-card:nth-child(1) { animation-delay: .05s; }
.prompts-list .prompt-card:nth-child(2) { animation-delay: .10s; }
.prompts-list .prompt-card:nth-child(3) { animation-delay: .15s; }
.prompts-list .prompt-card:nth-child(4) { animation-delay: .20s; }
.prompts-list .prompt-card:nth-child(5) { animation-delay: .25s; }

/* ── Week Banner — pulse dot ─────────────────────────────────── */
.week-banner { position: relative; overflow: hidden; }
.week-banner__pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16,185,129,.5);
  animation: pulse-ring 1.8s ease-out infinite;
}

/* ── Stat card — confetti trigger ───────────────────────────── */
.stat-card__confetti {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 18px;
  cursor: pointer;
  opacity: .6;
  transition: var(--transition-bounce);
  user-select: none;
  line-height: 1;
}
.stat-card__confetti:hover { opacity: 1; transform: scale(1.4) rotate(20deg); }
.stat-card { position: relative; }

/* ── Ranking position — medal & number ──────────────────────── */
.ranking-pos { text-align: center; }
.medal { font-size: 1.4rem; display: inline-block; animation: float 3s ease-in-out infinite; }
.medal--gold   { animation-delay: 0s; }
.medal--silver { animation-delay: .3s; }
.medal--bronze { animation-delay: .6s; }
.ranking-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  font-weight: 800;
  font-size: .82rem;
  color: var(--text-secondary);
}

/* ── Activity list — dot indicator ──────────────────────────── */
.activity-list__item { grid-template-columns: auto 1fr auto auto; }
.activity-list__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-primary);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Quick action — coloured variants ───────────────────────── */
.quick-action { position: relative; }
.quick-action__icon  { font-size: 1.6rem; transition: var(--transition-bounce); filter: drop-shadow(0 4px 8px rgba(0,0,0,.1)); }
.quick-action__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.quick-action:hover .quick-action__icon { transform: scale(1.2) rotate(-5deg); }

.quick-action--gold:hover   { background: var(--grad-gold);    box-shadow: var(--shadow-gold); }
.quick-action--orange:hover { background: var(--grad-sunset);  box-shadow: 0 8px 24px rgba(249,115,22,.4); }
.quick-action--blue:hover   { background: var(--grad-ocean);   box-shadow: 0 8px 24px rgba(6,182,212,.4); }
.quick-action--purple:hover { background: var(--grad-primary); box-shadow: var(--shadow-glow); }
.quick-action--green:hover  { background: var(--grad-emerald); box-shadow: 0 8px 24px rgba(16,185,129,.4); }
.quick-action--indigo:hover { background: linear-gradient(135deg,#6366f1,#4f46e5); box-shadow: var(--shadow-glow); }

.quick-action__badge {
  position: absolute;
  top: 8px; right: 8px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
  animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1);
}

/* ── CTA Banner — decorative bg layer ───────────────────────── */
.cta-banner { position: relative; overflow: hidden; }
.cta-banner__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,.15) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Empty state — large icon class ─────────────────────────── */
.empty-state__icon {
  font-size: 60px;
  display: block;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.1));
}
