/* ═══════════════════════════════════════════════════════════════
   Faventy Studio — hoja de estilos
   Misma paleta que las apps (FColor). Si cambias un tono, cámbialo
   solo aquí, en los tokens.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Marca */
  --primary: #707CF6;
  --primary-strong: #2739F1;
  --primary-soft: rgba(112, 124, 246, 0.12);
  --accent: #FF9A00;
  --accent-deep: #FF6B00;
  --gold: #C08A2E;

  /* Fondos */
  --bg: #F4F5FA;
  --bg-elevated: #FAFAFC;
  --surface: #FFFFFF;
  --surface-2: #F2F3F7;
  --surface-3: #E9EBF2;

  /* Texto */
  --text: #14151A;
  --text-2: #6B6F80;
  --text-3: #9CA0B0;
  --on-color: #FFFFFF;

  /* Bordes */
  --border: #E4E6ED;
  --separator: #EDEEF3;

  /* Estado */
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --info: #0EA5E9;
  --info-soft: rgba(14, 165, 233, 0.12);

  /* Geometría */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-card: 0 6px 16px rgba(112, 124, 246, 0.10);
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 8px 20px rgba(112, 124, 246, 0.28);
  --shadow-modal: 0 24px 80px rgba(20, 21, 26, 0.22);

  --brand-gradient: linear-gradient(135deg, var(--primary), var(--primary-strong));
  --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-deep));

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --sidebar-w: 264px;
  --topbar-h: 68px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ───────────────────────────── Reset ───────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; font-weight: 700; }
p  { margin: 0; }
a  { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
[hidden] { display: none !important; }
/* Los iconos inline no llevan clase: tamaño por defecto para que nunca
   se disparen si un contenedor olvida dimensionarlos. */
svg:not([class]) { width: 20px; height: 20px; flex: none; }

:focus-visible { outline: 3px solid rgba(112, 124, 246, 0.45); outline-offset: 2px; border-radius: 6px; }

.muted   { color: var(--text-2); }
.tiny    { font-size: 12px; }
.small   { font-size: 13px; }
.bold    { font-weight: 700; }
.mono    { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
.center  { text-align: center; }
.nowrap  { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row  { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────────────────────── Splash ──────────────────────────── */

.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--bg);
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-logo img { width: 64px; height: 64px; filter: drop-shadow(0 10px 18px rgba(39,57,241,0.25)); animation: pop 0.6s var(--ease); }
.splash-bar { width: 120px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.splash-bar span { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--brand-gradient); animation: slide 1.1s infinite var(--ease); }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.noscript { padding: 40px; text-align: center; font-weight: 600; }

/* ───────────────────────────── Auth layout ─────────────────────── */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth-hero {
  position: relative;
  overflow: hidden;
  background: var(--brand-gradient);
  color: var(--on-color);
  padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::before, .auth-hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(2px);
}
.auth-hero::before { width: 520px; height: 520px; right: -180px; top: -160px; background: rgba(255,255,255,0.10); }
.auth-hero::after  { width: 240px; height: 240px; right: -60px; bottom: -110px; background: linear-gradient(135deg, #FFB23F, #FF7A00); box-shadow: 0 30px 80px rgba(255,122,0,0.35); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.auth-hero .brand .tile { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(20,21,60,0.2); }
.auth-hero .brand .tile img { width: 30px; height: 30px; }
.auth-hero h1 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; max-width: 12ch; }
.auth-hero .lead { margin-top: 18px; font-size: 17px; opacity: 0.9; max-width: 44ch; }
.auth-hero .perks { margin-top: 30px; display: grid; gap: 12px; }
.auth-hero .perk { display: flex; gap: 12px; align-items: flex-start; }
.auth-hero .perk i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,0.16); }
.auth-hero .perk b { display: block; font-weight: 700; }
.auth-hero .perk span { opacity: 0.85; font-size: 14px; }
.auth-hero .foot { opacity: 0.7; font-size: 13px; }

.auth-panel {
  display: grid; place-items: center;
  padding: 40px 24px;
  background: var(--bg-elevated);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 28px; }
.auth-card .divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 20px 0; }
.auth-card .divider::before, .auth-card .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-card .legal { margin-top: 24px; font-size: 12.5px; color: var(--text-3); text-align: center; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--border);
  font-weight: 700; transition: all 0.18s var(--ease);
}
.btn-google:hover { border-color: var(--text-3); box-shadow: var(--shadow-subtle); }
.btn-google svg { width: 20px; height: 20px; }

@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 24px; min-height: 0; }
  .auth-hero .perks, .auth-hero .foot { display: none; }
  .auth-hero h1 { font-size: 30px; }
  .auth-panel { padding: 28px 20px 48px; align-items: start; }
}

/* ───────────────────────────── Shell ───────────────────────────── */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  background: var(--surface);
  border-right: 1px solid var(--separator);
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 24px; text-decoration: none; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand img { height: 30px; width: auto; }
/* Etiqueta "STUDIO" junto al logo */
.studio-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1; }
.studio-pill.light { background: rgba(255,255,255,0.18); color: #fff; font-size: 11px; padding: 6px 11px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-strong); }
.nav .nav-label { padding: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.nav .badge-count { margin-left: auto; }

.sidebar .cta { margin-top: 16px; }
.sidebar .user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 14px; border: 1px solid var(--separator);
}
.sidebar .user .grow b { display: flex; font-size: 14px; }
.sidebar .user .grow .handle { display: block; font-size: 12px; color: var(--text-2); }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(244, 245, 250, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--separator); }
.topbar h1 { font-size: 22px; }
.topbar .sub { color: var(--text-2); font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }

.content { padding: 8px 28px 64px; max-width: 1240px; width: 100%; }
.content.narrow { max-width: 860px; }

.mobile-nav { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(86vw, 300px);
    transform: translateX(-104%); transition: transform 0.28s var(--ease);
    box-shadow: none;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-modal); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20,21,26,0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .topbar .sub { display: none; }
  .topbar .btn:not(.btn-icon) span, .topbar .btn:not(.btn-icon) { font-size: 13px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 4px 18px 96px; }
  .mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--separator);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 700; color: var(--text-3); text-decoration: none; border-radius: 10px; }
  .mobile-nav a svg { width: 22px; height: 22px; }
  .mobile-nav a.active { color: var(--primary-strong); }
  .mobile-nav a.primary { color: var(--primary-strong); }
  .mobile-nav a.primary svg { color: var(--on-color); width: 40px; height: 40px; padding: 9px; border-radius: 14px; background: var(--brand-gradient); box-shadow: var(--shadow-float); margin-top: -18px; }
}

/* ───────────────────────────── Botones ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-md);
  font-weight: 700; font-size: 14.5px; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform 0.12s var(--ease), box-shadow 0.18s, background 0.18s, border-color 0.18s, opacity 0.18s;
  text-decoration: none !important;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }

.btn-primary { background: var(--brand-gradient); color: var(--on-color); box-shadow: var(--shadow-float); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(112,124,246,0.38); }
.btn-secondary { background: var(--surface); color: var(--primary-strong); border-color: rgba(112,124,246,0.4); }
.btn-secondary:hover:not(:disabled) { background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.2); }
.btn-danger-solid { background: var(--danger); color: var(--on-color); }
.btn-accent { background: var(--accent-gradient); color: var(--on-color); box-shadow: 0 8px 20px rgba(255,154,0,0.3); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
.btn-icon.round { border-radius: 50%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.45); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn-secondary.loading::after, .btn-ghost.loading::after, .btn-soft.loading::after {
  border-color: rgba(112,124,246,0.3); border-top-color: var(--primary-strong);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────────────────────── Formularios ─────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field .error { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field.invalid .input, .field.invalid .select, .field.invalid textarea.input { border-color: var(--danger); background: #FFF8F8; }
.field .label-row { display: flex; justify-content: space-between; align-items: baseline; }
.field .label-row .counter { font-size: 12px; color: var(--text-3); }
.optional { color: var(--text-3); font-weight: 500; }

.input, .select, textarea.input {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: var(--r-md); border: 1.5px solid var(--border);
  background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input::placeholder { color: var(--text-3); }
.input:disabled, .select:disabled { background: var(--surface-2); color: var(--text-2); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6F80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 42px; }
.input-wrap > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; font-weight: 600; }
.input-wrap.has-suffix .input { padding-right: 46px; }
.input.with-prefix { padding-left: 42px; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 600; pointer-events: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }

/* Switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--separator); }
.switch-row:first-child { border-top: 0; }
.switch-row .text b { display: block; font-size: 14.5px; }
.switch-row .text span { font-size: 13px; color: var(--text-2); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 30px; background: var(--surface-3); transition: background 0.2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: transform 0.2s var(--ease); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }

/* Segmented */
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.segmented button { padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--text-2); transition: all 0.15s; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-subtle); }
.segmented.block { display: flex; } .segmented.block button { flex: 1; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 700; border: 1.5px solid transparent;
  transition: all 0.15s var(--ease);
}
.chip:hover { background: var(--surface-3); }
.chip.selected { background: var(--primary); color: var(--on-color); }
.chip.type { --c: var(--primary); }
.chip.type.selected { background: var(--c); color: #fff; }
.chip.type:not(.selected) { color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.chip.readonly { cursor: default; }
.chip.readonly:hover { background: color-mix(in srgb, var(--c) 12%, white); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge.published      { background: var(--success-soft); color: #15803D; }
.badge.pending_review { background: var(--warning-soft); color: #B45309; }
.badge.draft          { background: var(--surface-3); color: var(--text-2); }
.badge.rejected       { background: var(--danger-soft); color: #B91C1C; }
.badge.cancelled      { background: var(--danger-soft); color: #B91C1C; }
.badge.finished       { background: var(--info-soft); color: #0369A1; }
.badge.live           { background: #FEE2E2; color: #B91C1C; }
.badge.live::before   { animation: pulse 1.2s infinite; }
.badge.flag           { background: var(--warning-soft); color: #B45309; }
.badge.neutral        { background: var(--surface-2); color: var(--text-2); }
.badge.brand          { background: var(--primary-soft); color: var(--primary-strong); }
.badge.gold           { background: rgba(192,138,46,0.14); color: var(--gold); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.badge-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 800; }
.badge-count.warn { background: var(--warning); }

/* Nombre + sello: el sello nunca se corta ni se descoloca, el nombre
   se trunca con puntos suspensivos si no cabe. */
.name-row { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; vertical-align: middle; }
.name-row > .truncate { min-width: 0; }
.vbadge-wrap { display: inline-flex; flex: none; line-height: 0; }
.vbadge { width: var(--vbadge, 16px); height: var(--vbadge, 16px); display: block; flex: none; }
h1 .vbadge, h2 .vbadge { --vbadge: 0.85em; }

/* ───────────────────────────── Tarjetas ────────────────────────── */

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 22px; }
.card.flat { box-shadow: none; border: 1px solid var(--separator); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h3 { font-size: 16.5px; }
.card-head .sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice.info { background: var(--info-soft); color: #075985; }
.notice.warning { background: var(--warning-soft); color: #92400E; }
.notice.danger { background: var(--danger-soft); color: #991B1B; }
.notice.success { background: var(--success-soft); color: #166534; }
.notice.brand { background: var(--primary-soft); color: var(--primary-strong); }
.notice b { display: block; margin-bottom: 2px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.stat .k { font-size: 12.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat .k svg { width: 16px; height: 16px; color: var(--primary); }
.stat .v { margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat .d { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.stat.hero { background: var(--brand-gradient); color: #fff; }
.stat.hero .k, .stat.hero .d { color: rgba(255,255,255,0.8); }
.stat.hero .k svg { color: #fff; }
.stat.hero::after { content: ''; position: absolute; width: 140px; height: 140px; right: -40px; bottom: -60px; border-radius: 50%; background: rgba(255,255,255,0.12); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--separator); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 14px; font-weight: 700; color: var(--text-2); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.active { color: var(--primary-strong); border-color: var(--primary-strong); }
.tabs button .n { font-size: 11.5px; padding: 1px 7px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); }
.tabs button.active .n { background: var(--primary-soft); color: var(--primary-strong); }

/* ───────────────────────────── Eventos ─────────────────────────── */

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 20px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 420px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.event-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(112,124,246,0.18); }
.event-card .cover { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.event-card:hover .cover img { transform: scale(1.04); }
.event-card .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%); }
.event-card .cover .badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 1; }
.event-card .cover .date { position: absolute; left: 14px; bottom: 12px; z-index: 1; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.02em; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.event-card .cover .date small { display: block; font-weight: 600; opacity: 0.9; letter-spacing: 0; }
.event-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card .title { font-weight: 800; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .meta { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.event-card .meta svg { width: 14px; height: 14px; }
.event-card .foot { margin-top: auto; display: flex; align-items: center; gap: 14px; padding-top: 8px; border-top: 1px solid var(--separator); font-size: 13px; font-weight: 700; color: var(--text-2); }
.event-card .foot span { display: inline-flex; align-items: center; gap: 5px; }
.event-card .foot svg { width: 15px; height: 15px; color: var(--text-3); }
.event-card .foot .cap { margin-left: auto; font-weight: 600; color: var(--text-3); }
.event-card .visibility-local { position: absolute; right: 12px; bottom: 12px; }

.event-card.list { flex-direction: row; align-items: stretch; }
.event-card.list .cover { width: 200px; aspect-ratio: auto; flex: none; }
.event-card.list .body { padding: 14px 18px; }
@media (max-width: 640px) { .event-card.list { flex-direction: column; } .event-card.list .cover { width: auto; aspect-ratio: 16/9; } }

/* Progress bar */
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 4px; background: var(--brand-gradient); transition: width 0.4s var(--ease); }
.progress.warn span { background: var(--accent-gradient); }
.progress.full span { background: var(--danger); }

/* Empty */
.empty { text-align: center; padding: 56px 24px; color: var(--text-2); }
.empty .ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty .ico svg { width: 32px; height: 32px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 42ch; margin: 0 auto 20px; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-md); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { height: 290px; border-radius: var(--r-lg); }

/* ───────────────────────────── Detalle evento ──────────────────── */

.detail-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21 / 8; min-height: 240px; background: var(--surface-2); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.05) 60%); }
.detail-hero .over { position: absolute; left: 28px; right: 28px; bottom: 24px; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.detail-hero .over h1 { font-size: clamp(24px, 3vw, 36px); text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.detail-hero .over .row { flex-wrap: wrap; }
.detail-hero .top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; gap: 10px; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; margin-top: 22px; align-items: start; }
@media (max-width: 1024px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-layout .side { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1024px) { .detail-layout .side { position: static; } }

.kv { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--separator); }
.kv:first-of-type { border-top: 0; padding-top: 0; }
.kv svg { width: 20px; height: 20px; color: var(--primary); margin-top: 2px; }
.kv .k { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.kv .v { font-size: 14.5px; font-weight: 600; }
.kv .v small { display: block; font-weight: 500; color: var(--text-2); }

.desc { white-space: pre-wrap; line-height: 1.65; color: var(--text); font-size: 15px; }

.attendee { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--separator); }
.attendee:first-child { border-top: 0; }
.attendee .grow b { display: block; font-size: 14px; }
.attendee .grow span { font-size: 12.5px; color: var(--text-2); }

.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }

.announcement { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); display: flex; gap: 12px; align-items: flex-start; }
.announcement > svg { color: var(--primary); margin-top: 2px; }
.announcement .grow p { white-space: pre-wrap; font-size: 14.5px; }
.announcement .grow time { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer .actions { display: flex; justify-content: space-between; align-items: center; }

/* ───────────────────────────── Formulario evento ───────────────── */

.wizard { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
@media (max-width: 1024px) { .wizard { grid-template-columns: 1fr; } }
.wizard .preview-col { position: sticky; top: calc(var(--topbar-h) + 12px); }
@media (max-width: 1024px) { .wizard .preview-col { display: none; } }

.steps { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.steps button i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); font-size: 11.5px; font-style: normal; font-weight: 800; }
.steps button.active { background: var(--primary-soft); color: var(--primary-strong); }
.steps button.active i { background: var(--primary-strong); color: #fff; }
.steps button.done i { background: var(--success); color: #fff; }
.steps button.error i { background: var(--danger); color: #fff; }

.dropzone {
  position: relative; border: 2px dashed var(--border); border-radius: var(--r-lg);
  background: var(--surface-2); aspect-ratio: 16 / 9; overflow: hidden;
  display: grid; place-items: center; text-align: center; color: var(--text-2);
  transition: border-color 0.15s, background 0.15s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone .dz-inner { padding: 20px; display: grid; gap: 6px; justify-items: center; }
.dropzone .dz-inner svg { width: 36px; height: 36px; color: var(--primary); }
.dropzone .dz-inner b { color: var(--text); }
.dropzone .dz-change { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.dropzone.has-image { border-style: solid; }

.map { height: 320px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--separator); background: var(--surface-2); z-index: 0; }
.map .leaflet-container { font-family: inherit; }
.map-pin { width: 34px; height: 34px; display: grid; place-items: center; }
.map-pin svg { width: 34px; height: 34px; filter: drop-shadow(0 4px 8px rgba(39,57,241,0.4)); }
.map-hint { font-size: 12.5px; color: var(--text-3); margin-top: 8px; display: flex; gap: 6px; align-items: center; }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-modal); border: 1px solid var(--separator); overflow: hidden; max-height: 300px; overflow-y: auto; }
.suggest button { display: block; width: 100%; text-align: left; padding: 11px 14px; font-size: 14px; border-top: 1px solid var(--separator); }
.suggest button:first-child { border-top: 0; }
.suggest button:hover { background: var(--surface-2); }
.suggest button b { display: block; font-weight: 700; }
.suggest button span { font-size: 12.5px; color: var(--text-2); }
.suggest .hint { padding: 12px 14px; font-size: 13px; color: var(--text-3); }

.preview-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.preview-card .cover { aspect-ratio: 4 / 5; background: var(--surface-2); position: relative; }
.preview-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.preview-card .cover .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 55%); }
.preview-card .cover .txt { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; }
.preview-card .cover .txt .d { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; opacity: 0.9; }
.preview-card .cover .txt h4 { font-size: 20px; color: #fff; margin: 4px 0; font-weight: 800; }
.preview-card .cover .txt small { opacity: 0.85; font-size: 13px; }
.preview-card .cover .pill { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,0.9); font-size: 11.5px; font-weight: 800; }
.preview-card .cover .pill.right { left: auto; right: 12px; }
.preview-card .cover .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 13px; }
.preview-card .info { padding: 12px 14px; font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.preview-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }

.form-footer {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 24px; padding: 14px 18px;
  background: rgba(255,255,255,0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
@media (max-width: 1024px) { .form-footer { bottom: 76px; } }
.form-footer .status { font-size: 13px; color: var(--text-2); }

.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }

/* ───────────────────────────── Tablas ──────────────────────────── */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); font-weight: 800; padding: 14px 16px; border-bottom: 1px solid var(--separator); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--separator); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--bg-elevated); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .thumb { width: 56px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.table tr.bad td { background: #FFF8F8; }
.table tr.ok td { background: #F6FDF8; }

/* ───────────────────────────── Charts ──────────────────────────── */

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .lbl { font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .trk { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-row .trk span { display: block; height: 100%; border-radius: 6px; background: var(--brand-gradient); transition: width 0.6s var(--ease); }
.bar-row .val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bars.wide .bar-row { grid-template-columns: 150px 1fr 70px; }
.bar-row .val small { display: block; font-weight: 600; color: var(--text-3); font-size: 11px; }
.cols { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 10px; }
.cols .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.cols .col .v { font-size: 12px; font-weight: 800; color: var(--text-2); }
.cols .col .b { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--brand-gradient); min-height: 4px; transition: height 0.6s var(--ease); }
.cols .col.best .b { background: var(--accent-gradient); }
.cols .col .l { font-size: 11.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.donut { display: flex; align-items: center; gap: 22px; }
.donut svg { width: 140px; height: 140px; flex: none; transform: rotate(-90deg); }
.donut .legend { display: grid; gap: 8px; font-size: 13px; }
.donut .legend div { display: flex; align-items: center; gap: 8px; }
.donut .legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut .legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ───────────────────────────── CSV import ──────────────────────── */

.import-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
@media (max-width: 800px) { .import-steps { grid-template-columns: repeat(2, 1fr); } }
.import-steps .s { padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.import-steps .s i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-style: normal; font-weight: 800; flex: none; }
.import-steps .s.active { color: var(--text); outline: 2px solid var(--primary); }
.import-steps .s.active i { background: var(--primary-strong); color: #fff; }
.import-steps .s.done i { background: var(--success); color: #fff; }

.cover-cell { display: flex; align-items: center; gap: 8px; }
.cover-cell .mini { width: 52px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--surface-2); border: 1px dashed var(--border); display: grid; place-items: center; color: var(--text-3); font-size: 11px; cursor: pointer; overflow: hidden; position: relative; }
.cover-cell .mini img { width: 100%; height: 100%; object-fit: cover; }
.cover-cell .mini input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.code { display: block; padding: 12px 14px; border-radius: var(--r-md); background: #14151A; color: #E4E6ED; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; overflow-x: auto; white-space: pre; line-height: 1.55; }

/* ───────────────────────────── Modales ─────────────────────────── */

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(20,21,26,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.2s var(--ease); }
.modal { width: 100%; max-width: 480px; max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-modal); padding: 26px; animation: rise 0.25s var(--ease); }
.modal.wide { max-width: 720px; }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal .body { color: var(--text-2); font-size: 14.5px; white-space: pre-wrap; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal .actions .btn { min-width: 110px; }
.modal-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px; background: var(--primary-soft); color: var(--primary-strong); }
.modal-ico.danger { background: var(--danger-soft); color: var(--danger); }
.modal-ico.warning { background: var(--warning-soft); color: #B45309; }
.modal-ico svg { width: 26px; height: 26px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
}

/* ───────────────────────────── Toasts ──────────────────────────── */

.toasts { position: fixed; z-index: 95; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
@media (max-width: 640px) { .toasts { left: 14px; right: 14px; bottom: 90px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 14px; background: #14151A; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 14px 40px rgba(0,0,0,0.25); animation: rise 0.28s var(--ease); }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.success svg { color: #4ADE80; }
.toast.error svg { color: #F87171; }
.toast.info svg { color: #93C5FD; }
.toast.out { animation: fadeout 0.25s forwards; }
@keyframes fadeout { to { opacity: 0; transform: translateY(8px); } }

/* ───────────────────────────── Dropdown menu ───────────────────── */

.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; padding: 6px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-modal); border: 1px solid var(--separator); animation: rise 0.15s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; text-align: left; color: var(--text); }
.menu button svg { width: 17px; height: 17px; color: var(--text-2); }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); } .menu button.danger svg { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--separator); margin: 6px 0; }

/* ───────────────────────────── Gate ────────────────────────────── */

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.gate .card { max-width: 560px; width: 100%; padding: 34px; }
.gate .ico { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); margin-bottom: 18px; }
.gate .ico.warn { background: var(--warning-soft); color: #B45309; }
.gate .ico svg { width: 30px; height: 30px; }
.gate h2 { margin-bottom: 8px; }
.gate p { color: var(--text-2); }
.gate .actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.store-badges a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: #14151A; color: #fff; font-weight: 700; font-size: 13px; }
.store-badges a:hover { text-decoration: none; opacity: 0.9; }
.store-badges a svg { width: 18px; height: 18px; }

/* ───────────────────────────── Perfil ──────────────────────────── */

.profile-head { display: flex; align-items: center; gap: 20px; padding: 24px; border-radius: var(--r-xl); background: var(--brand-gradient); color: #fff; position: relative; overflow: hidden; }
.profile-head::after { content: ''; position: absolute; width: 280px; height: 280px; right: -90px; top: -120px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.profile-head > * { position: relative; z-index: 1; }
.profile-head .avatar { background: rgba(255,255,255,0.2); color: #fff; border: 3px solid rgba(255,255,255,0.6); }
.profile-head h2 { color: #fff; display: flex; }
.profile-head .vbadge-wrap { background: #fff; border-radius: 50%; padding: 2px; }
.profile-head .u { opacity: 0.85; font-weight: 600; }
.profile-head .tags { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.profile-head .badge { background: rgba(255,255,255,0.18); color: #fff; }
.avatar-edit { position: relative; display: inline-block; }
.avatar-edit .btn { position: absolute; right: -4px; bottom: -4px; }
.avatar-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ───────────────────────────── Utilidades animación ────────────── */

.view-enter { animation: viewin 0.3s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
