/* ── Taco Bell Brand Design System ────────────────────────────────────── */
/* Skill: taco-bell-brand v1 — Always follow before editing CSS            */

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

:root {
  /* BRAND COLORS */
  --tb-purple:   #5d2994;
  --tb-violet:   #9346d7;
  --tb-magenta:  #d60072;
  --tb-orange:   #fb7a00;
  --tb-yellow:   #ffc300;
  --tb-white:    #ffffff;
  --tb-black:    #1a1a1a;
  --tb-kraft:    #c8a882;

  /* BRAND GRADIENTS */
  --tb-gradient-day:   linear-gradient(180deg, #9346d7 0%, #fb7a00 50%, #ffc300 100%);
  --tb-gradient-night: linear-gradient(180deg, #1a1a1a 0%, #5d2994 50%, #9346d7 100%);
  --tb-gradient-day-3: linear-gradient(135deg, #9346d7 0%, #d60072 50%, #fb7a00 100%);

  /* TYPOGRAPHY — GT America with system fallbacks */
  --font-brand:            'GT America', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-brand-condensed:  'GT America Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-brand-compressed: 'GT America Compressed', 'Impact', Arial, sans-serif;

  /* FUNCTIONAL UI (derived from brand) */
  --purple-light: #f0e8f9;
  --purple-mid:   #e0d0f5;
  --gray-50:  #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-300: #d0d0d0;
  --gray-500: #9e9e9e;
  --gray-700: #616161;
  --text:       #1a1a1a;
  --text-muted: #757575;

  /* SPACING */
  --space-xs:  4px;   --space-sm:  8px;
  --space-md:  16px;  --space-lg:  24px;
  --space-xl:  40px;  --space-2xl: 64px;
  --space-3xl: 96px;

  /* LAYOUT */
  --radius:    4px;   /* Brand: sharp corners preferred */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.18);
  --max-width: 1280px;
  --nav-h:     60px;
  --footer-h:  48px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-brand);
  color: var(--text);
  background: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--tb-purple); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tb-black);
  height: var(--nav-h);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  color: var(--tb-white);
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; color: var(--tb-white); }
.brand-bell { font-size: 1.3rem; }
.brand-dot { color: var(--tb-violet); }
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav-link {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,.7);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--tb-white);
  background: rgba(255,255,255,.1);
  text-decoration: none;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 1px solid rgba(255,255,255,.15);
}
.nav-user-name {
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s;
}
.nav-user-name:hover { color: var(--tb-white); text-decoration: none; }

/* Hamburguesa — visible solo ≤768px. Tres barritas que se transforman en X cuando is-mobile-open */
.navbar-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tb-white);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.navbar.is-mobile-open .navbar-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.is-mobile-open .navbar-hamburger span:nth-child(2) { opacity: 0; }
.navbar.is-mobile-open .navbar-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Main / Footer ─────────────────────────────────────────────────────── */
.main-content { flex: 1; padding-bottom: var(--space-lg); }
.site-footer {
  background: var(--tb-black);
  color: rgba(255,255,255,.45);
  font-family: var(--font-brand-condensed);
  font-size: .75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .8px;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Container ─────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Buttons — Brand spec ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-brand);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Primary — Purple */
.btn-primary {
  background: var(--tb-purple);
  color: var(--tb-white);
  border-color: var(--tb-purple);
}
.btn-primary:hover {
  background: #4a1f78;
  border-color: #4a1f78;
  color: var(--tb-white);
}

/* Secondary — outlined purple */
.btn-outline {
  background: transparent;
  color: var(--tb-purple);
  border-color: var(--tb-purple);
}
.btn-outline:hover { background: var(--purple-light); }

/* Ghost — on dark/photo bg */
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-200); color: var(--text); }

.btn-lg { font-size: .9rem; padding: 14px 32px; }
.btn-sm { font-size: .72rem; padding: 7px 16px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--tb-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  border: 1px solid var(--gray-200);
}
.card-title {
  font-family: var(--font-brand);
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

/* Kraft-style card — signature TB feel */
.card-kraft {
  background: var(--tb-kraft);
  border-color: #b89870;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-brand-condensed);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 9px;
  border-radius: 2px;
  background: var(--gray-200);
  color: var(--gray-700);
}
.badge-admin  { background: var(--tb-purple); color: var(--tb-white); }
.badge-action { background: var(--purple-light); color: var(--tb-purple); }

/* ── Flash messages ────────────────────────────────────────────────────── */
.flash-container { max-width: 900px; margin: var(--space-md) auto; padding: 0 var(--space-lg); }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: var(--space-sm); font-size: .9rem; }
.flash-error   { background: #FEE2E2; color: #991B1B; }
.flash-success { background: #D1FAE5; color: #065F46; }
.flash-info    { background: var(--purple-light); color: var(--tb-purple); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
/* En mobile las tablas se vuelven scrolleables horizontalmente para que ninguna
   columna se aplaste. Pattern estándar: el <table> queda como bloque scrollable. */
@media (max-width: 768px) {
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .table th, .table td { padding: 10px 12px; }
}
.table th {
  text-align: left;
  font-family: var(--font-brand);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: var(--space-sm) 12px;
  border-bottom: 2px solid var(--gray-200);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }
.text-center { text-align: center; }
.text-sm     { font-size: .8rem; }
.text-muted  { color: var(--text-muted); }

/* ── Status dots ───────────────────────────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.status-dot--green { background: #22C55E; }
.status-dot--red   { background: #EF4444; }

/* ── HERO — Night gradient (marketing/storytelling) ────────────────────── */
.hero {
  background: linear-gradient(160deg, #0d0520 0%, #2a1050 50%, #4a1d80 100%);
  padding: var(--space-3xl) var(--space-lg) 80px;
  color: var(--tb-white);
  overflow: hidden;
  position: relative;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-xl);
}
.hero-mascot {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-mascot-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 12px 48px rgba(147,70,215,.65));
  display: block;
  transition: transform 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}
.hero-content { text-align: left; }
.hero-anim-toggle {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.35);
  border-radius: 4px;
  padding: 5px 7px;
  cursor: pointer;
  line-height: 1;
  transition: color .2s, background .2s;
  z-index: 2;
}
.hero-anim-toggle:hover {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
}
.hero-badge {
  display: inline-block;
  background: rgba(147,70,215,.3);
  border: 1px solid rgba(147,70,215,.6);
  color: #d4a8f0;
  font-family: var(--font-brand-condensed);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 2px;
  margin-bottom: var(--space-lg);
}
.hero-title {
  font-family: var(--font-brand);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}
.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

/* ── Section titles ────────────────────────────────────────────────────── */
.apps-section { padding: var(--space-2xl) 0; }
.section-title {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-align: center;
  margin-bottom: var(--space-sm);
}
.section-subtitle { color: var(--text-muted); text-align: center; margin-bottom: var(--space-xl); }

/* ── Apps grid (landing) ───────────────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--space-md);
}
.app-card {
  background: var(--tb-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.app-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--tb-purple);
}
.app-icon  { font-size: 2.2rem; margin-bottom: var(--space-md); }
.app-name  { font-family: var(--font-brand); font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: var(--space-sm); }
.app-desc  { font-size: .82rem; color: var(--text-muted); line-height: 1.5; flex: 1; margin-bottom: var(--space-md); }

/* ── Features section — Kraft background ───────────────────────────────── */
.features-section { background: var(--tb-black); padding: var(--space-2xl) 0; color: var(--tb-white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-lg); }
.feature-item { text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: var(--space-md); }
.feature-item h4 {
  font-family: var(--font-brand);
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: var(--space-xs);
}
.feature-item p { font-size: .82rem; color: rgba(255,255,255,.6); line-height: 1.5; }

/* ── Portal launcher ───────────────────────────────────────────────────── */
.portal-header {
  background: var(--tb-black);
  color: var(--tb-white);
  padding: var(--space-xl) 0 var(--space-lg);
}
.portal-greeting {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.portal-subtitle { color: rgba(255,255,255,.6); margin-top: var(--space-xs); font-size: .9rem; }

/* Metrics row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.metric-card {
  background: var(--tb-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.metric-value {
  font-family: var(--font-brand);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--tb-purple);
  line-height: 1;
}
.metric-label {
  font-family: var(--font-brand-condensed);
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* Skeleton */
.skeleton { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Launcher grid */
.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.launcher-card {
  background: var(--tb-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.launcher-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--tb-purple);
}
.launcher-icon { font-size: 2rem; margin-bottom: var(--space-md); line-height: 1; }
.launcher-icon-img { width: 2.5rem; height: 2.5rem; display: block; object-fit: contain; }
.launcher-name {
  font-family: var(--font-brand);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: var(--space-xs);
}
.launcher-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; flex: 1; margin-bottom: var(--space-lg); }

/* Empty state */
.empty-state { text-align: center; padding: var(--space-3xl) var(--space-lg); color: var(--text-muted); }
.empty-state h3 {
  font-family: var(--font-brand);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin: var(--space-md) 0 var(--space-sm);
}

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header { padding: var(--space-xl) 0 var(--space-lg); }
.page-title {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* ── Profile ───────────────────────────────────────────────────────────── */
.profile-avatar {
  width: 60px; height: 60px;
  background: var(--tb-purple);
  color: var(--tb-white);
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-info { margin-top: var(--space-md); }
.profile-info h2 { font-family: var(--font-brand); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; }

/* Profile page */
.profile-page-header { background: var(--tb-black); color: var(--tb-white); padding: var(--space-xl) 0; }
.profile-hero { display: flex; align-items: center; gap: var(--space-xl); }
.profile-avatar-lg {
  width: 80px; height: 80px; flex-shrink: 0;
  background: var(--tb-purple); color: var(--tb-white);
  font-family: var(--font-brand); font-size: 2rem; font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
}
.profile-hero-name {
  font-family: var(--font-brand); font-size: 1.4rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: -.005em;
  display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap;
}
.profile-hero-email { color: rgba(255,255,255,.6); font-size: .9rem; margin-top: 4px; }
.profile-hero-meta {
  color: rgba(255,255,255,.4); font-size: .75rem; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .05em;
  font-family: var(--font-brand-condensed); font-weight: 700;
}
.profile-layout {
  display: grid; grid-template-columns: 300px 1fr;
  gap: var(--space-lg); align-items: start;
}
.profile-dl { margin-top: var(--space-md); }
.profile-dl dt {
  font-family: var(--font-brand-condensed); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted);
  margin-top: var(--space-md);
}
.profile-dl dt:first-child { margin-top: 0; }
.profile-dl dd { font-size: .88rem; margin-top: 2px; }
.profile-apps-list { margin-top: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.profile-app-row {
  display: flex; gap: var(--space-md); align-items: flex-start;
  padding: var(--space-md); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); transition: border-color .15s;
}
.profile-app-row:hover { border-color: var(--tb-purple); }
.profile-app-icon { font-size: 1.8rem; flex-shrink: 0; width: 40px; text-align: center; line-height: 1; padding-top: 2px; }
.profile-app-name { font-family: var(--font-brand); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: var(--space-sm); }
.profile-app-roles { display: flex; flex-direction: column; gap: 6px; }
.profile-role-item { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.profile-role-desc { font-size: .8rem; color: var(--text-muted); }
.profile-role-date { font-size: .7rem; color: var(--gray-500); font-family: var(--font-brand-condensed); text-transform: uppercase; letter-spacing: .3px; }

/* ── Select / Input ────────────────────────────────────────────────────── */
.input-search, .select {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-brand);
  font-size: .875rem;
  color: var(--text);
  background: var(--tb-white);
  outline: none;
  transition: border-color .15s;
}
.input-search:focus, .select:focus { border-color: var(--tb-purple); }
.input-search { min-width: 280px; }
.label {
  font-family: var(--font-brand-condensed);
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── Modal (dialog) ────────────────────────────────────────────────────── */
.modal {
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0;
  min-width: 360px;
  max-width: 480px;
}
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.modal-content { padding: var(--space-xl); }
.modal-content h3 {
  font-family: var(--font-brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: var(--space-sm);
}
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-lg); }

/* ── Dashboard view ────────────────────────────────────────────────────── */
.dashboard-view { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h) - var(--footer-h)); }
.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--tb-white);
  border-bottom: 1px solid var(--gray-200);
  gap: var(--space-md);
}
.dashboard-toolbar h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.dashboard-frame-wrap { flex: 1; overflow: hidden; }
.dashboard-frame { width: 100%; height: 100%; border: none; }

/* ── Back link ─────────────────────────────────────────────────────────── */
.back-link { font-family: var(--font-brand-condensed); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); display: block; margin-bottom: var(--space-xs); }
.back-link:hover { color: var(--tb-purple); }

/* ── Chips ─────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-brand-condensed);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 3px 10px;
  border-radius: 2px;
}
.chip--active { background: var(--purple-light); color: var(--tb-purple); }
.chip--none   { background: var(--gray-200); color: var(--text-muted); }
.chip-remove { background: none; border: none; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; padding: 0 2px; opacity: .6; }
.chip-remove:hover { opacity: 1; }

/* ── Error pages ───────────────────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  max-width: 480px;
  margin: 0 auto;
}
.error-code {
  font-family: var(--font-brand-compressed);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--tb-purple);
  letter-spacing: -0.025em;
}
.error-title {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: var(--space-sm) 0 var(--space-md);
}
.error-msg {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-mascot-img { max-width: 340px; }
}
@media (max-width: 680px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mascot { display: none; }
  .hero-content { text-align: center; }
}
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-hero-name { justify-content: center; }

  /* Navbar móvil — panel desplegable estilo drawer desde abajo del navbar */
  .navbar-hamburger { display: flex; }
  .navbar-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    background: var(--tb-black);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }
  .navbar.is-mobile-open .navbar-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .navbar-links .nav-link {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  .nav-user {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: var(--space-sm);
    margin-top: var(--space-xs);
    justify-content: space-between;
  }
  .nav-user-name { max-width: none; }
}
