/* ==========================================================================
   ProyEventos ABSA — Core Design System
   styles/main.css
   --------------------------------------------------------------------------
   Premium dark SaaS / marketplace UI for event ticketing & services.
   Vanilla CSS only. Mobile-first. 8px spacing system.
   ========================================================================== */


/* ==========================================================================
   1. FONTS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');


/* ==========================================================================
   2. DESIGN TOKENS (CSS Variables)
   ========================================================================== */

:root {
  /* ----- Color : Surfaces ---------------------------------------------- */
  --bg:               #0B0E13;
  --surface-1:        #10141C;
  --surface-2:        #161D28;
  --surface-3:        #1C2535;
  --surface-4:        #232E42;          /* hover / elevated */

  --primary-dark:     #1C2B3C;          /* brand dark accent */

  /* ----- Color : Text -------------------------------------------------- */
  --text:             #FFFFFF;
  --text-strong:      #FFFFFF;
  --text-muted:       #9AA3B2;
  --text-dim:         #6B7280;
  --text-faint:       #4B5260;

  /* ----- Color : Lines & Borders -------------------------------------- */
  --border:           rgba(255, 255, 255, 0.07);
  --border-strong:    rgba(255, 255, 255, 0.12);
  --border-subtle:    rgba(255, 255, 255, 0.04);
  --border-focus:     rgba(255, 255, 255, 0.45);

  /* ----- Color : States ------------------------------------------------ */
  --success:          #2ECC71;
  --success-bg:       rgba(46, 204, 113, 0.10);
  --success-border:   rgba(46, 204, 113, 0.28);

  --danger:           #FF5A5A;
  --danger-bg:        rgba(255, 90, 90, 0.10);
  --danger-border:    rgba(255, 90, 90, 0.28);

  --warning:          #F2B544;
  --warning-bg:       rgba(242, 181, 68, 0.10);
  --warning-border:   rgba(242, 181, 68, 0.28);

  --info:             #FFFFFF;
  --info-bg:          rgba(255, 255, 255, 0.06);
  --info-border:      rgba(255, 255, 255, 0.12);

  /* ----- Tonal overlays (for hover / press / glass) -------------------- */
  --overlay-hover:    rgba(255, 255, 255, 0.04);
  --overlay-active:   rgba(255, 255, 255, 0.08);
  --overlay-press:    rgba(0, 0, 0, 0.20);
  --overlay-glass:    rgba(16, 20, 28, 0.72);

  /* ----- Typography ---------------------------------------------------- */
  --font-display:     'Syne', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:        'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:        ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  /* Fluid type scale (mobile → desktop) */
  --fs-12:            0.75rem;
  --fs-13:            0.8125rem;
  --fs-14:            0.875rem;
  --fs-15:            0.9375rem;
  --fs-16:            1rem;
  --fs-18:            1.125rem;
  --fs-20:            1.25rem;
  --fs-24:            1.5rem;
  --fs-28:            1.75rem;
  --fs-32:            clamp(1.625rem, 1.4rem + 1vw, 2rem);
  --fs-40:            clamp(2rem, 1.6rem + 1.6vw, 2.5rem);
  --fs-48:            clamp(2.25rem, 1.6rem + 2.6vw, 3rem);
  --fs-56:            clamp(2.5rem, 1.7rem + 3.4vw, 3.5rem);
  --fs-72:            clamp(3rem, 1.8rem + 5vw, 4.5rem);
  --fs-display:       clamp(3.25rem, 1.6rem + 7vw, 6rem);

  --lh-tight:         1.05;
  --lh-snug:          1.2;
  --lh-normal:        1.45;
  --lh-relaxed:       1.6;

  --tracking-tight:   -0.02em;
  --tracking-snug:    -0.012em;
  --tracking-normal:  0em;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.12em;

  /* ----- Spacing (8px system) ----------------------------------------- */
  --space-0:          0;
  --space-1:          4px;
  --space-2:          8px;
  --space-3:          12px;
  --space-4:          16px;
  --space-5:          20px;
  --space-6:          24px;
  --space-7:          32px;
  --space-8:          40px;
  --space-9:          48px;
  --space-10:         56px;
  --space-11:         64px;
  --space-12:         80px;
  --space-13:         96px;
  --space-14:         128px;

  /* ----- Radii --------------------------------------------------------- */
  --radius-xs:        6px;
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        14px;
  --radius-xl:        18px;
  --radius-2xl:       24px;
  --radius-pill:      999px;

  /* ----- Shadows (soft, never harsh) ---------------------------------- */
  --shadow-xs:        0 1px 2px rgba(0,0,0,0.32);
  --shadow-sm:        0 2px 8px rgba(0,0,0,0.32),
                      0 1px 2px rgba(0,0,0,0.24);
  --shadow-md:        0 8px 24px rgba(0,0,0,0.36),
                      0 2px 4px rgba(0,0,0,0.20);
  --shadow-lg:        0 20px 48px rgba(0,0,0,0.44),
                      0 4px 12px rgba(0,0,0,0.24);
  --shadow-xl:        0 32px 80px rgba(0,0,0,0.52),
                      0 8px 24px rgba(0,0,0,0.28);

  --shadow-inset:     inset 0 1px 0 rgba(255,255,255,0.04);
  --shadow-focus:     0 0 0 3px rgba(255,255,255,0.18);

  /* ----- Motion -------------------------------------------------------- */
  --ease-out:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:      cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);

  --dur-fast:         140ms;
  --dur:              220ms;
  --dur-med:          280ms;
  --dur-slow:         400ms;

  --transition-base:  all var(--dur) var(--ease-out);
  --transition-color: color var(--dur) var(--ease-out),
                      background-color var(--dur) var(--ease-out),
                      border-color var(--dur) var(--ease-out);

  /* ----- Layout -------------------------------------------------------- */
  --container-max:    1280px;
  --container-narrow: 960px;
  --container-wide:   1440px;

  --gutter:           clamp(20px, 4vw, 40px);

  --nav-height:       72px;
  --nav-height-sm:    64px;
  --sidebar-width:    260px;
  --sidebar-collapsed: 72px;
  --bottom-nav-height: 64px;

  /* ----- Z-index scale ------------------------------------------------- */
  --z-base:           1;
  --z-raised:         10;
  --z-sticky:         100;
  --z-nav:            200;
  --z-overlay:        500;
  --z-modal:          800;
  --z-toast:          900;
  --z-top:            999;
}


/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-15);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100svh;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

/* Subtle ambient backdrop — barely visible radial wash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,0.025), transparent 60%),
    radial-gradient(800px 400px at 100% 100%, rgba(255,255,255,0.015), transparent 60%);
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  border-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-color);
}

a:hover {
  color: var(--text);
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-6) 0;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}


/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  text-wrap: balance;
}

h1, .h1 {
  font-size: var(--fs-56);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

h2, .h2 {
  font-size: var(--fs-40);
  letter-spacing: var(--tracking-tight);
}

h3, .h3 {
  font-size: var(--fs-28);
  letter-spacing: var(--tracking-snug);
}

h4, .h4 {
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  line-height: var(--lh-snug);
}

h5, .h5 {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: var(--tracking-normal);
  line-height: var(--lh-snug);
}

h6, .h6 {
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: var(--tracking-normal);
  line-height: var(--lh-snug);
}

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  font-size: var(--fs-15);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-3);
}

.lead {
  font-size: var(--fs-18);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  font-weight: 400;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.muted        { color: var(--text-muted); }
.dim          { color: var(--text-dim); }
.faint        { color: var(--text-faint); }
.text-strong  { color: var(--text-strong); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.text-xs   { font-size: var(--fs-12); }
.text-sm   { font-size: var(--fs-14); }
.text-md   { font-size: var(--fs-16); }
.text-lg   { font-size: var(--fs-18); }
.text-xl   { font-size: var(--fs-20); }
.text-2xl  { font-size: var(--fs-24); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.uppercase   { text-transform: uppercase; letter-spacing: var(--tracking-wider); }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }


/* ==========================================================================
   5. LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(var(--space-9), 8vw, var(--space-13));
}

.section-sm {
  padding-block: clamp(var(--space-7), 5vw, var(--space-9));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack-sm  { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-lg  { display: flex; flex-direction: column; gap: var(--space-6); }
.stack-xl  { display: flex; flex-direction: column; gap: var(--space-8); }

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-auto-lg {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.flex-1     { flex: 1 1 0; }
.flex-auto  { flex: 0 0 auto; }
.flex-center { display: flex; align-items: center; justify-content: center; }

.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

.divider-vertical {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* Spacing utilities (rare — prefer gap, but useful for one-offs) */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: transparent;
  --btn-bg-hover: var(--overlay-hover);
  --btn-border-hover: var(--border-strong);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);

  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-14);
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;

  height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);

  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);

  cursor: pointer;
  user-select: none;
  text-decoration: none;
  position: relative;
  isolation: isolate;

  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variants */
.btn-primary {
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  --btn-border: var(--text);
  --btn-bg-hover: rgba(255, 255, 255, 0.92);
  --btn-border-hover: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(255,255,255,0.12);
}

.btn-secondary {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-border: var(--border);
  --btn-bg-hover: var(--surface-3);
  --btn-border-hover: var(--border-strong);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-muted);
  --btn-border: transparent;
  --btn-bg-hover: var(--overlay-hover);
  --btn-border-hover: transparent;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  --btn-bg-hover: var(--overlay-hover);
  --btn-border-hover: rgba(255, 255, 255, 0.32);
}

.btn-danger {
  --btn-bg: var(--danger-bg);
  --btn-fg: var(--danger);
  --btn-border: var(--danger-border);
  --btn-bg-hover: rgba(255, 90, 90, 0.16);
  --btn-border-hover: rgba(255, 90, 90, 0.45);
}

.btn-success {
  --btn-bg: var(--success-bg);
  --btn-fg: var(--success);
  --btn-border: var(--success-border);
  --btn-bg-hover: rgba(46, 204, 113, 0.16);
  --btn-border-hover: rgba(46, 204, 113, 0.45);
}

/* Sizes */
.btn-xs { height: 28px; padding: 0 var(--space-3); font-size: var(--fs-12); border-radius: var(--radius-sm); }
.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: var(--fs-13); border-radius: var(--radius-sm); }
.btn-lg { height: 52px; padding: 0 var(--space-7); font-size: var(--fs-15); border-radius: var(--radius-md); }
.btn-xl { height: 60px; padding: 0 var(--space-8); font-size: var(--fs-16); border-radius: var(--radius-lg); }

.btn-block { width: 100%; }

.btn-icon {
  width: 44px;
  padding: 0;
  flex-shrink: 0;
}
.btn-icon.btn-sm { width: 36px; }
.btn-icon.btn-xs { width: 28px; }
.btn-icon.btn-lg { width: 52px; }

.btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.btn-sm .icon, .btn-xs .icon { width: 16px; height: 16px; }
.btn-lg .icon { width: 20px; height: 20px; }

/* Button group */
.btn-group {
  display: inline-flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 2px;
}

.btn-group .btn {
  height: 36px;
  border-radius: calc(var(--radius-md) - 4px);
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 0 var(--space-4);
  font-size: var(--fs-13);
}

.btn-group .btn:hover {
  background: var(--overlay-hover);
  color: var(--text);
}

.btn-group .btn[aria-pressed="true"],
.btn-group .btn.is-active {
  background: var(--surface-4);
  color: var(--text);
}


/* ==========================================================================
   7. BADGES, CHIPS & TAGS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.badge-muted   { background: var(--surface-2);  border-color: var(--border);         color: var(--text-muted); }
.badge-solid   { background: var(--text);       border-color: var(--text);           color: var(--bg); font-weight: 600; }

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-13);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.chip:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-strong);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.chip .icon {
  width: 14px;
  height: 14px;
}


/* ==========================================================================
   8. CARDS
   ========================================================================== */

.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.card-padded {
  padding: var(--space-6);
}

.card-hover:hover,
a.card:hover,
button.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-elevated {
  background: var(--surface-2);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.card-flat {
  background: var(--surface-1);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card-glass {
  background: var(--overlay-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-strong);
}

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  line-height: var(--lh-snug);
  color: var(--text);
}

.card-subtitle {
  font-size: var(--fs-13);
  color: var(--text-muted);
  margin-top: var(--space-1);
}


/* ----- KPI / Stat Card ---------------------------------------------- */

.stat {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: var(--transition-base);
}

.stat:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-32);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-12);
  color: var(--text-muted);
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-12);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }


/* ----- Event Card --------------------------------------------------- */

.event-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--dur-med) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.event-card .media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  overflow: hidden;
}

.event-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.event-card:hover .media img {
  transform: scale(1.04);
}

.event-card .media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(11, 14, 19, 0.55));
  pointer-events: none;
}

.event-card .media-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.event-card .body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.event-card .meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-12);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.event-card .meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-faint);
}

.event-card .title {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  line-height: var(--lh-snug);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 250;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 34px rgba(37, 211, 102, .3);
}
.whatsapp-float svg { width: 28px; height: 28px; }
@media (max-width: 640px) {
  .whatsapp-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

.offers-subscription {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 72px auto 80px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(98, 139, 214, .28);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0 0, rgba(45,114,243,.22), transparent 42%),
    linear-gradient(135deg, rgba(45,114,243,.1), rgba(50,199,230,.04)),
    var(--surface-1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .24);
}
.offers-subscription::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 240px;
  height: 240px;
  right: -100px;
  bottom: -130px;
  border-radius: 50%;
  background: rgba(45,114,243,.12);
  filter: blur(10px);
}
@media (min-width: 900px) {
  .offers-subscription { grid-template-columns: minmax(0,.92fr) minmax(440px,1.08fr); align-items: center; }
}
.subscription-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #8eb4ff;
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.offers-subscription h2 {
  max-width: 15ch;
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.subscription-copy {
  max-width: 52ch;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-15);
  line-height: 1.7;
}
.subscription-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: var(--fs-12);
}
.subscription-benefits span { display: inline-flex; align-items: center; gap: 7px; }
.subscription-benefits .pe-icon { color: #75a6ff; }
.subscription-form-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-lg);
  background: rgba(10, 14, 22, .7);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}
.subscription-fields { display: grid; gap: 14px; }
.subscription-field { display: grid; gap: 7px; min-width: 0; }
.subscription-field label {
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 600;
}
.subscription-field .input { width: 100%; min-width: 0; height: 50px; }
.subscription-submit { width: 100%; min-height: 50px; margin-top: 16px; }
@media (min-width: 640px) {
  .subscription-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.subscription-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: var(--fs-12);
  color: var(--text-muted);
  line-height: 1.55;
}
.subscription-consent input { flex: 0 0 auto; margin-top: 2px; }
.subscription-message { min-height: 20px; margin-top: 10px; font-size: var(--fs-13); font-weight: 600; }
@media (max-width: 639px) {
  .offers-subscription { margin-block: 48px 56px; border-radius: var(--radius-lg); }
  .offers-subscription h2 { max-width: 12ch; }
}

.event-card .price {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.event-card .price small {
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 400;
  color: var(--text-muted);
  margin-right: 4px;
}


/* ==========================================================================
   9. FORMS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}

.label .required {
  color: var(--danger);
  font-weight: 600;
}

.label .optional {
  font-weight: 400;
  color: var(--text-dim);
  font-size: var(--fs-12);
}

.help {
  font-size: var(--fs-12);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

.error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-12);
  color: var(--danger);
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-15);
  line-height: 1.4;
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-dim);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger-border);
  background: linear-gradient(0deg, var(--danger-bg), var(--danger-bg)), var(--surface-2);
}

.input.is-invalid:focus,
.select.is-invalid:focus,
.textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.15);
}

.input.is-valid {
  border-color: var(--success-border);
}

.textarea {
  height: auto;
  min-height: 120px;
  padding: var(--space-4);
  line-height: var(--lh-relaxed);
  resize: vertical;
}

.select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239AA3B2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  cursor: pointer;
}

/* Input with leading icon */
.input-wrap {
  position: relative;
  display: block;
}

.input-wrap .input,
.input-wrap .select {
  padding-left: 44px;
}

.input-wrap .leading-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  stroke-width: 1.75;
}

.input-wrap .trailing {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Search input — pill */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-2) 0 var(--space-5);
  height: 56px;
  gap: var(--space-3);
  transition: var(--transition-base);
}

.search:focus-within {
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.search .leading-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: var(--fs-15);
  font-family: var(--font-body);
  height: 100%;
}

.search input::placeholder {
  color: var(--text-dim);
}

.search .btn {
  height: 44px;
  border-radius: var(--radius-pill);
}

/* Checkbox & Radio */
.check,
.radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
  font-size: var(--fs-14);
  color: var(--text);
}

.check input,
.radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: var(--transition-base);
}

.radio input {
  border-radius: 999px;
}

.check input:hover,
.radio input:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.check input:checked,
.radio input:checked {
  background: var(--text);
  border-color: var(--text);
}

.check input:checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -1px);
}

.radio input:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
}

/* Toggle switch */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.toggle input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-base);
}

.toggle input::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--text-muted);
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  transition: var(--transition-base);
}

.toggle input:checked {
  background: var(--text);
  border-color: var(--text);
}

.toggle input:checked::after {
  background: var(--bg);
  left: calc(100% - 16px);
}

/* Fieldset / form section */
.form-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding: var(--space-7);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.form-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-2);
}

.form-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: repeat(3, 1fr); }
}

/* File / image dropzone */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-8);
  background: var(--surface-2);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 200px;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: rgba(255,255,255,0.32);
  background: var(--surface-3);
  color: var(--text);
}

.dropzone .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}


/* ==========================================================================
   10. NAVIGATION
   ========================================================================== */

/* ----- Top Nav (sticky transparent → solid) -------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  width: 100%;
  height: var(--nav-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out),
    backdrop-filter var(--dur-med) var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(11, 14, 19, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-18);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  text-decoration: none;
}

.nav-logo .mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  justify-content: center;
}

@media (min-width: 880px) {
  .nav-links { display: flex; }
}

.nav-link {
  position: relative;
  padding: 8px var(--space-3);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition-color);
}

.nav-link:hover {
  color: var(--text);
  background: var(--overlay-hover);
}

.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

@media (min-width: 880px) {
  .nav-toggle { display: none; }
}

/* ----- Sidebar (dashboard) ------------------------------------------ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: var(--space-5);
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-nav);
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
}

.sidebar-header {
  padding: var(--space-3) var(--space-2);
  margin-bottom: var(--space-3);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: var(--space-3);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-base);
}

.sidebar-link:hover {
  background: var(--overlay-hover);
  color: var(--text);
}

.sidebar-link.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.sidebar-link .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
  flex-shrink: 0;
}

.sidebar-link .count {
  margin-left: auto;
  font-size: var(--fs-12);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.has-sidebar {
  padding-left: 0;
}

@media (min-width: 1024px) {
  .has-sidebar {
    padding-left: var(--sidebar-width);
  }
}

/* ----- Bottom Nav (mobile dashboard) -------------------------------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 14, 19, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: var(--z-nav);
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.bottom-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-dim);
  transition: var(--transition-color);
}

.bottom-nav-link.is-active {
  color: var(--text);
}

.bottom-nav-link .icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}

/* ----- Tabs --------------------------------------------------------- */

.tabs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
}

.tab {
  position: relative;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-color);
}

.tab:hover { color: var(--text); }

.tab.is-active {
  color: var(--text);
}

.tab.is-active::after {
  content: '';
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: -1px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Pill tabs (segmented) */
.tabs-pill {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 2px;
}

.tabs-pill .tab {
  padding: 8px var(--space-4);
  border-radius: calc(var(--radius-md) - 4px);
  font-size: var(--fs-13);
}

.tabs-pill .tab.is-active {
  background: var(--surface-4);
  color: var(--text);
}

.tabs-pill .tab.is-active::after { display: none; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-13);
  color: var(--text-muted);
}

.breadcrumbs a:hover { color: var(--text); }

.breadcrumbs .sep {
  color: var(--text-faint);
}


/* ==========================================================================
   11. TABLES
   ========================================================================== */

.table-wrap {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  text-align: left;
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr {
  transition: background-color var(--dur) var(--ease-out);
}

.table tbody tr:hover {
  background: var(--overlay-hover);
}

.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* User cell helper */
.user-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.avatar.lg { width: 48px; height: 48px; font-size: var(--fs-14); }
.avatar.xl { width: 64px; height: 64px; font-size: var(--fs-18); }

.avatar img {
  width: 100%; height: 100%; object-fit: cover;
}


/* ==========================================================================
   12. PROGRESS / STEPPER
   ========================================================================== */

.progress {
  width: 100%;
  height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--text);
  border-radius: 999px;
  transition: width var(--dur-med) var(--ease-out);
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.stepper-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  transition: var(--transition-base);
}

.stepper-label {
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stepper-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.stepper-step.is-current .stepper-num,
.stepper-step.is-done .stepper-num {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.stepper-step.is-current .stepper-label,
.stepper-step.is-done .stepper-label {
  color: var(--text);
}

.stepper-step.is-done .stepper-num::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -1px);
}

.stepper-step.is-done .stepper-num { font-size: 0; }


/* ==========================================================================
   13. ALERTS / TOASTS / EMPTY STATES
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-14);
  color: var(--text);
}

.alert .icon {
  width: 18px; height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.alert-success { background: var(--success-bg); border-color: var(--success-border); }
.alert-success .icon { color: var(--success); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger-border); }
.alert-danger  .icon { color: var(--danger); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); }
.alert-warning .icon { color: var(--warning); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-6);
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
}

.empty .icon {
  width: 32px;
  height: 32px;
  color: var(--text-dim);
  stroke-width: 1.4;
}

.empty-title {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  color: var(--text);
  font-weight: 600;
}


/* ==========================================================================
   14. MODAL / DIALOG / SHEET
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  transition: transform var(--dur-med) var(--ease-out);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}


/* ==========================================================================
   15. SKELETON / LOADING
   ========================================================================== */

.skeleton {
  position: relative;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  isolation: isolate;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--text);
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==========================================================================
   16. ANIMATIONS / TRANSITIONS
   ========================================================================== */

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes flashSuccess {
  0%, 100% { background-color: transparent; }
  20%, 60% { background-color: var(--success-bg); }
}

@keyframes flashDanger {
  0%, 100% { background-color: transparent; }
  20%, 60% { background-color: var(--danger-bg); }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.18); }
  70%  { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.fade-in  { animation: fadeIn var(--dur-med) var(--ease-out) both; }
.fade-up  { animation: fadeUp var(--dur-slow) var(--ease-out) both; }

/* Stagger helper — use --i: <n> on children */
.stagger > * {
  animation: fadeUp var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}


/* ==========================================================================
   17. FOCUS RING (global)
   ========================================================================== */

:where(a, button, input, select, textarea, [tabindex])
  :focus-visible {
  outline: none;
}

a:focus-visible,
button:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.sidebar-link:focus-visible,
.bottom-nav-link:focus-visible,
.event-card:focus-visible,
.card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   18. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* sm:  ≥ 480px
   md:  ≥ 720px
   lg:  ≥ 1024px
   xl:  ≥ 1280px
*/

/* Grid responsiveness */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .nav { height: var(--nav-height-sm); }

  .form-section { padding: var(--space-5); }

  .card-padded { padding: var(--space-5); }
  .card-header,
  .card-footer { padding: var(--space-4) var(--space-5); }
  .card-body { padding: var(--space-5); }

  .table thead th,
  .table tbody td { padding: var(--space-3) var(--space-4); }
}


/* ==========================================================================
   19. UTILITIES — Helpers used across pages
   ========================================================================== */

.sticky        { position: sticky; top: 0; }
.relative      { position: relative; }
.absolute      { position: absolute; }
.full          { width: 100%; }
.hidden        { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-1    { aspect-ratio: 1; }

.bg-surface-1 { background: var(--surface-1); }
.bg-surface-2 { background: var(--surface-2); }
.bg-surface-3 { background: var(--surface-3); }

.rounded-md  { border-radius: var(--radius-md); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-xl  { border-radius: var(--radius-xl); }
.rounded-pill{ border-radius: var(--radius-pill); }

.border       { border: 1px solid var(--border); }
.border-top   { border-top: 1px solid var(--border); }
.border-bottom{ border-bottom: 1px solid var(--border); }


/* ==========================================================================
   20. PRINT / TICKET SUPPORT
   ========================================================================== */

@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .nav, .sidebar, .bottom-nav, .no-print { display: none !important; }
}


/* ==========================================================================
   21. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ============================================================
   ProyEventos icon system
   Monochrome SVG masks keep interface iconography consistent.
   ============================================================ */
.pe-icon {
  --pe-icon-size: 1.1em;
  display: inline-block;
  width: var(--pe-icon-size);
  height: var(--pe-icon-size);
  flex: 0 0 auto;
  vertical-align: -0.16em;
  background-color: currentColor;
  -webkit-mask: var(--pe-icon-src) center / contain no-repeat;
  mask: var(--pe-icon-src) center / contain no-repeat;
}
.pe-icon-lg { --pe-icon-size: 1.5em; }
.pe-icon-xl { --pe-icon-size: 2.25em; }
.pe-icon-ticket { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-45 12 12)'%3E%3Cpath d='M5 6h14a2 2 0 0 1 2 2v2a2 2 0 0 0 0 4v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 0 0-4V8a2 2 0 0 1 2-2z'/%3E%3Cpath d='M12 8v2M12 12v1M12 15v1'/%3E%3C/g%3E%3C/svg%3E"); }
.pe-icon-calendar { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.pe-icon-tag { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13 13 20a2 2 0 0 1-3 0l-7-7V3h10l7 7a2 2 0 0 1 0 3Z'/%3E%3Ccircle cx='8' cy='8' r='1'/%3E%3C/svg%3E"); }
.pe-icon-user { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.pe-icon-building { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 21V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v17M16 8h3a1 1 0 0 1 1 1v12M8 7h4M8 11h4M8 15h4M9 21v-2h2v2M2 21h20'/%3E%3C/svg%3E"); }
.pe-icon-location { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M20 10c0 5-8 11-8 11S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.pe-icon-clock { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.pe-icon-phone { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.8a2 2 0 0 1-.4 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E"); }
.pe-icon-eye { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.pe-icon-image { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E"); }
.pe-icon-file { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.pe-icon-copy { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E"); }
.pe-icon-edit { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.pe-icon-search { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); }
.pe-icon-check { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
.pe-icon-x { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }
.pe-icon-refresh { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M20 7v5h-5M4 17v-5h5'/%3E%3Cpath d='M6.1 9A7 7 0 0 1 18 6l2 2M18 15a7 7 0 0 1-12 3l-2-2'/%3E%3C/svg%3E"); }
.pe-icon-alert { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M10.3 3.6 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.6a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.pe-icon-expand { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5'/%3E%3C/svg%3E"); }
.pe-icon-globe { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18'/%3E%3C/svg%3E"); }
.pe-icon-rocket { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.3-2 5-2 5s3.7-.5 5-2c.8-.9.8-2.3-.1-3.1-.8-.9-2.2-.8-2.9.1Z'/%3E%3Cpath d='m9 15-3-3s.5-2.5 2-4c1.7-1.7 6-3 10-3 0 4-1.3 8.3-3 10-1.5 1.5-4 2-4 2Z'/%3E%3Ccircle cx='14' cy='9' r='1.5'/%3E%3C/svg%3E"); }
.pe-icon-lightbulb { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 22h4M8.5 15.5A7 7 0 1 1 15.5 15.5c-.8.6-1.5 1.3-1.5 2.5h-4c0-1.2-.7-1.9-1.5-2.5Z'/%3E%3C/svg%3E"); }
.pe-icon-music { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9 18V5l11-2v13M9 9l11-2'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E"); }
.pe-icon-video { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='14' height='14' rx='2'/%3E%3Cpath d='m17 10 4-2v8l-4-2Z'/%3E%3C/svg%3E"); }
.pe-icon-camera { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M14.5 5 13 3h-2L9.5 5H5a2 2 0 0 0-2 2v12h18V7a2 2 0 0 0-2-2Z'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
.pe-icon-money { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M6 9H5v1M18 15h1v-1'/%3E%3C/svg%3E"); }
.pe-icon-shield { --pe-icon-src: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
