/* ═══════════════════════════════════════════════════════════════
   Grupos Estudiantiles Hub — U-ERRE Design System
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    --uerre-purple:        #5b21b6;
    --uerre-purple-dark:   #4c1d95;
    --uerre-purple-light:  #7c3aed;
    --uerre-purple-vivid:  #8b5cf6;
    --uerre-navy:          #1e1b4b;
    --uerre-navy-deep:     #0f0a2a;
    --uerre-gold:          #f59e0b;
    --uerre-gold-light:    #fbbf24;
    --uerre-surface:       #f8f7ff;
    --uerre-surface-alt:   #f3f4f6;
    --uerre-text:          #374151;
    --uerre-heading:       #111827;
    --uerre-muted:         #9ca3af;
    --uerre-tag-bg:        #ede9fe;
    --uerre-tag-text:      #6d28d9;
    --uerre-border:        #e5e7eb;
    --uerre-border-purple: rgba(91,33,182,.15);
    --uerre-empty-title-color: var(--uerre-purple);
    --uerre-hero-title-color: #fff;
    --uerre-hero-subtitle-color: rgba(255,255,255,.7);
    --uerre-hero-link-color: rgba(255,255,255,.5);
    --uerre-hero-link-hover-color: rgba(255,255,255,.85);
    --uerre-hero-title-size: clamp(1.5rem,4vw,2.25rem);

    /* Bootstrap overrides */
    --bs-primary:          var(--uerre-purple);
    --bs-primary-rgb:      91, 33, 182;
    --bs-font-sans-serif:  'Open Sans', system-ui, sans-serif;
    --bs-border-radius:    0.625rem;
    --bs-border-radius-lg: 0.875rem;
    --bs-border-radius-xl: 1.125rem;
    --bs-body-color:       var(--uerre-text);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Open Sans', system-ui, sans-serif;
    color: var(--uerre-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--uerre-heading);
    line-height: 1.2;
}

a { color: var(--uerre-purple); }
a:hover { color: var(--uerre-purple-dark); }

/* ─── Layout ────────────────────────────────────────────────── */
.layout-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; }
.container-uerre { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar-uerre {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--uerre-border-purple);
    box-shadow: 0 1px 0 rgba(91,33,182,.04);
    padding: .625rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-logo-box {
    width: 36px; height: 36px;
    background: var(--uerre-purple);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; font-size: .875rem; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(91,33,182,.3);
}

.navbar-brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: .8rem;
    color: #111827; line-height: 1.2;
}

.navbar-brand-sub {
    font-size: .58rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--uerre-muted); line-height: 1;
}

/* ─── Navbar base ─────────────────────────────────────────────── */
.navbar-uerre .nav-link {
    font-size: .875rem; font-weight: 500;
    border-radius: 7px;
    padding: .4rem .875rem;
    transition: background .15s ease, color .15s ease;
    position: relative;
}

/* Default — keep generic hover/active for links that have no accent class */
.navbar-uerre .nav-link:hover  { background: var(--uerre-tag-bg); color: var(--uerre-purple); }
.navbar-uerre .nav-link.active { color: var(--uerre-purple); font-weight: 600; }

/* ── Per-link colour accents ─────────────────────────────────── */
/* Bottom underline that slides in when active */
.navbar-uerre .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2.5px; border-radius: 2px;
    transition: left .18s ease, right .18s ease;
    background: transparent;
}
.navbar-uerre .nav-link.active::after { left: .875rem; right: .875rem; }

/* ── Inicio — slate ── */
.navbar-uerre .nav-link.nav-accent-slate        { color: #475569; }
.navbar-uerre .nav-link.nav-accent-slate:hover  { background: #f1f5f9; color: #334155; }
.navbar-uerre .nav-link.nav-accent-slate.active { color: #334155; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-slate::after  { background: #64748b; }

/* ── Grupos — blue ── */
.navbar-uerre .nav-link.nav-accent-blue        { color: #2563eb; }
.navbar-uerre .nav-link.nav-accent-blue:hover  { background: #eff6ff; color: #1d4ed8; }
.navbar-uerre .nav-link.nav-accent-blue.active { color: #1d4ed8; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-blue::after  { background: #3b82f6; }

/* ── Mis Grupos — violet ── */
.navbar-uerre .nav-link.nav-accent-violet        { color: #7c3aed; }
.navbar-uerre .nav-link.nav-accent-violet:hover  { background: #f5f3ff; color: #6d28d9; }
.navbar-uerre .nav-link.nav-accent-violet.active { color: #6d28d9; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-violet::after  { background: #8b5cf6; }

/* ── Eventos — amber ── */
.navbar-uerre .nav-link.nav-accent-amber        { color: #b45309; }
.navbar-uerre .nav-link.nav-accent-amber:hover  { background: #fffbeb; color: #92400e; }
.navbar-uerre .nav-link.nav-accent-amber.active { color: #92400e; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-amber::after  { background: #f59e0b; }

/* ── Calendario — teal ── */
.navbar-uerre .nav-link.nav-accent-teal        { color: #0f766e; }
.navbar-uerre .nav-link.nav-accent-teal:hover  { background: #f0fdfa; color: #0d6b63; }
.navbar-uerre .nav-link.nav-accent-teal.active { color: #0d6b63; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-teal::after  { background: #14b8a6; }

/* ── Historial — rose ── */
.navbar-uerre .nav-link.nav-accent-rose        { color: #be123c; }
.navbar-uerre .nav-link.nav-accent-rose:hover  { background: #fff1f2; color: #9f1239; }
.navbar-uerre .nav-link.nav-accent-rose.active { color: #9f1239; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-rose::after  { background: #f43f5e; }

/* ── FEUR — purple ── */
.navbar-uerre .nav-link.nav-accent-emerald        { color: #7c3aed; }
.navbar-uerre .nav-link.nav-accent-emerald:hover  { background: #f5f3ff; color: #6d28d9; }
.navbar-uerre .nav-link.nav-accent-emerald.active { color: #6d28d9; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-emerald::after  { background: #8b5cf6; }

/* ── Admin — orange ── */
.navbar-uerre .nav-link.nav-accent-orange        { color: #c2410c; }
.navbar-uerre .nav-link.nav-accent-orange:hover  { background: #fff7ed; color: #9a3412; }
.navbar-uerre .nav-link.nav-accent-orange.active { color: #9a3412; font-weight: 600; }
.navbar-uerre .nav-link.nav-accent-orange::after  { background: #f97316; }

.navbar-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--uerre-purple), var(--uerre-purple-vivid));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: .75rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(91,33,182,.25);
}

.navbar-user-btn {
    background: transparent; border: none;
    color: #374151; padding: .25rem .5rem;
    border-radius: 8px; transition: background .15s;
    display: flex; align-items: center; gap: .5rem;
}
.navbar-user-btn:hover { background: var(--uerre-tag-bg); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary,
.btn-uerre-primary {
    background: linear-gradient(135deg, var(--uerre-purple), var(--uerre-purple-light));
    border: none;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 9px;
    box-shadow: 0 3px 12px rgba(91,33,182,.3);
    transition: all .2s ease;
    letter-spacing: .01em;
}

.btn-primary:hover,
.btn-uerre-primary:hover {
    background: linear-gradient(135deg, var(--uerre-purple-dark), var(--uerre-purple));
    color: #fff;
    box-shadow: 0 5px 18px rgba(91,33,182,.4);
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-uerre-primary:active { transform: translateY(0); }

.btn-uerre-outline {
    background: transparent;
    border: 1.5px solid var(--uerre-purple);
    color: var(--uerre-purple);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; border-radius: 9px;
    transition: all .2s ease;
}

.btn-uerre-outline:hover {
    background: var(--uerre-tag-bg);
    color: var(--uerre-purple-dark);
    transform: translateY(-1px);
}

.nav-arrow-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    width: fit-content;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 999px;
    color: var(--uerre-purple-dark);
    box-shadow: 0 6px 18px rgba(49, 16, 105, .16);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.nav-arrow-pill:hover,
.nav-arrow-pill:focus-visible {
    background: var(--uerre-surface);
    color: var(--uerre-purple);
    box-shadow: 0 9px 24px rgba(49, 16, 105, .24);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-arrow-pill:active {
    transform: translateY(0);
}

.nav-arrow-pill:disabled {
    opacity: .55;
    transform: none;
    box-shadow: 0 3px 10px rgba(49, 16, 105, .1);
}

.btn-xs { padding: .2rem .6rem; font-size: .7rem; border-radius: 6px; }

/* ─── Hero ghost button (white text on gradient backgrounds) ─── */
.btn-hero {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .12) !important;
    border: 1.5px solid rgba(255, 255, 255, .55) !important;
    backdrop-filter: blur(4px);
    border-radius: 9px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .8125rem;
    box-shadow: none !important;
    transition: background-color .18s ease, border-color .18s ease, transform .15s ease;
}
.btn-hero:hover,
.btn-hero:focus,
.btn-hero:focus-visible {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .25) !important;
    border-color: rgba(255, 255, 255, .85) !important;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.15) !important;
}
.btn-hero:active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .18) !important;
    transform: translateY(0);
}

/* ─── Hero Sections ──────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #8b5cf6 100%);
    position: relative; overflow: hidden;
}

.hero-gradient h1 {
    color: var(--uerre-hero-title-color);
}

.hero-gradient .hero-blob-1 {
    position: absolute; top: -8rem; right: -8rem;
    width: 480px; height: 480px;
    background: rgba(139,92,246,.18);
    border-radius: 50%; filter: blur(70px); pointer-events: none;
}

.hero-gradient .hero-blob-2 {
    position: absolute; bottom: -6rem; left: -6rem;
    width: 320px; height: 320px;
    background: rgba(245,158,11,.07);
    border-radius: 50%; filter: blur(60px); pointer-events: none;
}

/* ─── Section / Page Headers ─────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #8b5cf6 100%);
    padding: 2.5rem 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(91,33,182,.04));
}

.page-hero-link {
    color: var(--uerre-hero-link-color);
}

.page-hero-link:hover,
.page-hero-link:focus-visible {
    color: var(--uerre-hero-link-hover-color);
}

.page-hero-title {
    color: var(--uerre-hero-title-color);
    font-size: var(--uerre-hero-title-size);
}

.page-hero-subtitle {
    color: var(--uerre-hero-subtitle-color);
}

/* ─── Stats Band ─────────────────────────────────────────────── */
.stats-band {
    background: linear-gradient(135deg, var(--uerre-navy), var(--uerre-navy-deep));
    border-radius: 1.125rem;
    box-shadow: 0 8px 40px rgba(30,27,75,.3);
    position: relative; overflow: hidden;
}

.stats-band::before {
    content: '';
    position: absolute; top: -3rem; right: -3rem;
    width: 160px; height: 160px;
    background: rgba(139,92,246,.2);
    border-radius: 50%; filter: blur(40px);
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.25rem; font-weight: 800; color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: .65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em;
    color: rgba(255,255,255,.45);
    margin-top: .375rem;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card-uerre {
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-radius: var(--bs-border-radius-xl);
    box-shadow: 0 1px 6px rgba(0,0,0,.04), 0 2px 16px rgba(91,33,182,.03);
    transition: transform .22s ease, box-shadow .22s ease;
    overflow: hidden;
}

.card-uerre:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(91,33,182,.12), 0 2px 8px rgba(0,0,0,.06);
    border-color: var(--uerre-border-purple);
}

.card-uerre.no-hover:hover {
    transform: none;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.card-accent-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--uerre-purple), var(--uerre-purple-vivid));
}

/* ─── Group Cards ────────────────────────────────────────────── */
.group-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.125rem; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

/* ─── Group member card: leader/president highlight ─────────── */
.member-card--leader {
    border-color: var(--uerre-gold) !important;
    box-shadow: 0 0 0 2px rgba(245,158,11,.18);
    background: linear-gradient(180deg, #fffbeb 0%, #fff 60%);
}

.member-leader-tag {
    display: inline-flex; align-items: center;
    background: var(--uerre-gold);
    color: #fff;
    border-radius: 999px;
    padding: .1rem .55rem;
    font-size: .6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    white-space: nowrap;
}

/* ─── Category Tags ──────────────────────────────────────────── */
.tag-uerre {
    display: inline-flex; align-items: center;
    background: var(--uerre-tag-bg);
    color: var(--uerre-tag-text);
    border-radius: 999px;
    padding: .2rem .75rem;
    font-size: .68rem; font-weight: 600;
    white-space: nowrap;
    letter-spacing: .01em;
}

/* ─── Section Labels ─────────────────────────────────────────── */
.section-label {
    display: inline-block;
    background: var(--uerre-tag-bg);
    color: var(--uerre-purple);
    border-radius: 999px;
    padding: .25rem 1rem;
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
}

/* ─── Event Cards ────────────────────────────────────────────── */
.event-date-badge {
    width: 60px; height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--uerre-purple), var(--uerre-purple-light));
    box-shadow: 0 3px 12px rgba(91,33,182,.3);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}

.event-date-month {
    font-size: .58rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: rgba(255,255,255,.8); line-height: 1;
}

.event-date-day {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.375rem; font-weight: 800;
    color: #fff; line-height: 1; margin-top: 1px;
}

.card-event {
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-radius: var(--bs-border-radius-xl);
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.07);
    border-color: var(--uerre-border-purple);
}

.event-card-link:focus-visible {
    outline: 3px solid rgba(124,58,237,.3);
    outline-offset: 3px;
    border-radius: var(--bs-border-radius-xl);
}

.event-card-media {
    position: relative;
    height: 158px;
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.event-card-media--fallback {
    background:
        radial-gradient(circle at 82% 18%, rgba(255,255,255,.2), transparent 30%),
        linear-gradient(135deg, var(--uerre-purple-dark), var(--uerre-purple-vivid));
}

.event-card-media--fallback::before {
    content: '';
    position: absolute;
    inset: auto -2rem -3rem auto;
    width: 9rem;
    height: 9rem;
    border: 1.5rem solid rgba(255,255,255,.08);
    border-radius: 50%;
    z-index: -1;
}

.event-card-media .event-date-badge {
    width: 56px;
    height: 56px;
    background: rgba(76,29,149,.86);
    border: 1px solid rgba(255,255,255,.38);
    box-shadow: 0 8px 20px rgba(30,27,75,.22);
    backdrop-filter: blur(8px);
}

.event-card-status {
    align-self: flex-start;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 5px 16px rgba(30,27,75,.16);
}

.event-card-body {
    padding: 1rem 1.125rem 1.125rem;
}

.event-card-title {
    font-size: .95rem;
}

.event-card-group {
    font-size: .75rem;
}

.event-card-meta {
    line-height: 1.35;
}

.event-card-evidence img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--uerre-border);
    border-radius: .65rem;
}

.event-banner-picker-preview {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--uerre-border);
    border-radius: .875rem;
    background: var(--uerre-surface);
}

.event-datetime-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: .5rem;
}

.event-datetime-fields input[type="text"] {
    font-variant-numeric: tabular-nums;
}

.event-detail-hero {
    display: flex;
    align-items: flex-end;
}

.event-detail-hero > .container-uerre {
    position: relative;
    z-index: 1;
    width: 100%;
}

.event-hero-identity {
    width: fit-content;
    max-width: 760px;
    min-width: 0;
}

.event-hero-identity--banner {
    padding: 1rem 1.125rem;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 1rem;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--uerre-purple-dark) 82%, transparent),
        color-mix(in srgb, var(--uerre-purple) 68%, transparent));
    box-shadow: 0 16px 36px rgba(49,16,105,.22);
    backdrop-filter: blur(10px);
}

.event-detail-hero--banner .event-date-badge {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 8px 20px rgba(49,16,105,.18);
    backdrop-filter: blur(10px);
}

.event-hero-copy h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.375rem, 4vw, 1.875rem);
    text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.event-hero-group,
.event-hero-meta {
    color: rgba(255,255,255,.78);
    font-size: .8125rem;
}

.event-hero-description {
    max-width: 600px;
    color: rgba(255,255,255,.9);
    font-size: .9375rem;
    line-height: 1.5;
}

.event-hero-actions {
    width: 190px;
    margin-left: auto;
}

.event-hero-actions .btn {
    width: 100%;
}

.event-detail-hero--banner .event-hero-actions .btn {
    background: #fff !important;
    border: 1px solid rgba(255,255,255,.82) !important;
    color: var(--uerre-purple-dark) !important;
    box-shadow: 0 10px 24px rgba(49,16,105,.24) !important;
}

.event-detail-hero--banner .event-hero-actions .btn:hover,
.event-detail-hero--banner .event-hero-actions .btn:focus-visible {
    background: var(--uerre-surface) !important;
    color: var(--uerre-purple) !important;
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    .event-hero-identity {
        width: 100%;
        max-width: none;
    }

    .event-hero-actions {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .event-detail-hero {
        min-height: 0;
    }

    .event-hero-identity--banner {
        padding: .875rem;
    }

    .event-hero-identity {
        gap: .75rem !important;
    }

    .event-hero-identity .event-date-badge {
        width: 54px;
        height: 54px;
    }

    .event-hero-copy h1 {
        font-size: 1.35rem;
    }

    .event-hero-description {
        font-size: .875rem;
    }

    .event-card-media {
        height: 140px;
    }

    .event-banner-picker-preview {
        height: 150px;
    }

    .event-datetime-fields {
        grid-template-columns: minmax(0, 1fr) minmax(7.25rem, .72fr);
    }
}

/* ─── Floating Cards (Hero) ──────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.animate-float  { animation: float 4s ease-in-out infinite; }
.float-delay-1  { animation-delay: 1.5s; }
.float-delay-2  { animation-delay: 3s; }

.hero-float-card {
    position: absolute;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0,0,0,.2);
    padding: 1.125rem;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
a:hover .hero-float-card {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 22px 48px rgba(0,0,0,.3);
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.28);
}

/* ─── Social Proof Avatars ───────────────────────────────────── */
.avatar-stack { display: flex; }
.avatar-stack .avatar-item {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.4);
    display: flex; align-items: center; justify-content: center;
    font-size: .6rem; font-weight: 700; color: #fff;
    margin-left: -9px; flex-shrink: 0;
}
.avatar-stack .avatar-item:first-child { margin-left: 0; }

/* ─── Spinner ────────────────────────────────────────────────── */
.spinner-uerre {
    width: 2.25rem; height: 2.25rem;
    border: 3px solid var(--uerre-tag-bg);
    border-top-color: var(--uerre-purple);
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

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

/* Centered spinner container */
.spinner-center {
    display: flex; align-items: center; justify-content: center;
    min-height: 50vh;
}

/* ─── Skeleton Loading ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0eefc 25%, #e6e2f9 50%, #f0eefc 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 10px;
}

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

/* ─── Form Controls ──────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--uerre-border);
    border-radius: 9px;
    padding: .625rem .875rem;
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--uerre-purple-light);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.form-label { font-weight: 600; font-size: .875rem; color: var(--uerre-heading); }

/* ─── Search Input ───────────────────────────────────────────── */
.search-input-wrapper { position: relative; }
.search-input-wrapper .search-icon {
    position: absolute; left: .875rem; top: 50%; transform: translateY(-50%);
    color: var(--uerre-muted); pointer-events: none; font-size: .875rem;
}
.search-input-wrapper input { padding-left: 2.5rem !important; }

/* White placeholder + icon for search boxes on dark/gradient backgrounds */
.page-header .search-input-wrapper .search-icon { color: rgba(255,255,255,.6); }
.page-header .search-input-wrapper input::placeholder { color: rgba(255,255,255,.55); opacity: 1; }
.page-header .search-input-wrapper input::-webkit-input-placeholder { color: rgba(255,255,255,.55); }
.page-header .search-input-wrapper input::-moz-placeholder { color: rgba(255,255,255,.55); opacity: 1; }
.hero-gradient .search-input-wrapper .search-icon { color: rgba(255,255,255,.6); }
.hero-gradient .search-input-wrapper input::placeholder { color: rgba(255,255,255,.55); opacity: 1; }

/* ─── Filter Chips ───────────────────────────────────────────── */
.filter-chip {
    display: inline-flex; align-items: center;
    padding: .35rem .875rem;
    border-radius: 999px;
    border: 1.5px solid var(--uerre-border);
    background: #fff; color: #6b7280;
    font-size: .8rem; font-weight: 500;
    cursor: pointer; transition: all .15s;
    white-space: nowrap;
}

.filter-chip:hover { border-color: var(--uerre-purple); color: var(--uerre-purple); background: var(--uerre-tag-bg); }

.filter-chip.active {
    background: var(--uerre-purple); color: #fff;
    border-color: var(--uerre-purple);
    box-shadow: 0 2px 8px rgba(91,33,182,.25);
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 4rem 1.5rem;
}

.empty-state h1,
.empty-state h2,
.empty-state h3,
.empty-state h4,
.empty-state h5,
.empty-state h6 {
    color: var(--uerre-empty-title-color);
}

.empty-state .empty-icon {
    width: 72px; height: 72px; border-radius: 20px;
    background: var(--uerre-tag-bg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--uerre-purple);
}
.empty-icon svg { display: block; }

/* ─── Notification Badge ─────────────────────────────────────── */
.notif-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 16px; height: 16px;
    background: var(--uerre-gold);
    color: #fff; border-radius: 999px;
    font-size: .58rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(245,158,11,.4);
}

/* ─── Notification tray ──────────────────────────────────────── */
.notification-bell {
    position: relative;
}

.notification-bell-trigger {
    border: 0;
    background: transparent;
}

.notification-bell-trigger-desktop {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-icon {
    position: relative;
    display: inline-flex;
}

.notification-scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    border: 0;
    background: rgba(15, 23, 42, .2);
}

.notification-tray {
    position: absolute;
    z-index: 1045;
    top: calc(100% + .75rem);
    right: 0;
    width: min(24rem, calc(100vw - 2rem));
    max-height: min(38rem, calc(100dvh - 6rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-radius: 1rem;
    box-shadow: 0 1.25rem 3rem rgba(76, 29, 149, .2);
    color: var(--uerre-text);
}

.notification-tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem .875rem;
    border-bottom: 1px solid var(--uerre-border);
}

.notification-tray-header h2 {
    margin: 0;
    color: var(--uerre-heading);
    font-size: 1rem;
    font-weight: 800;
}

.notification-tray-header p {
    margin: .125rem 0 0;
    color: var(--uerre-muted);
    font-size: .75rem;
}

.notification-tray-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.notification-mark-all,
.notification-close,
.notification-view-all {
    border: 0;
    background: transparent;
    color: var(--uerre-purple);
}

.notification-view-all {
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.notification-mark-all {
    font-size: .75rem;
    font-weight: 600;
}

.notification-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--uerre-muted);
    font-size: 1.5rem;
    line-height: 1;
}

.notification-close:hover,
.notification-close:focus-visible {
    background: var(--uerre-tag-bg);
    color: var(--uerre-purple);
}

.notification-feed {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-feed-item {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--uerre-border);
    background: #fff;
    color: inherit;
    text-align: left;
    transition: background-color 180ms ease-out;
}

.notification-feed-item:hover,
.notification-feed-item:focus-visible {
    background: var(--uerre-surface);
}

.notification-feed-item-unread {
    background: var(--uerre-tag-bg);
}

.notification-kind-icon,
.notification-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--uerre-surface-alt);
    color: var(--uerre-purple);
}

.notification-kind-event { background: #fef3c7; color: #92400e; }
.notification-kind-request { background: #ede9fe; color: var(--uerre-purple); }
.notification-kind-approved { background: #d1fae5; color: #065f46; }
.notification-kind-rejected { background: #fee2e2; color: #991b1b; }

.notification-feed-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

.notification-feed-copy strong {
    color: var(--uerre-heading);
    font-size: .8125rem;
    line-height: 1.35;
}

.notification-feed-copy > span {
    overflow: hidden;
    color: var(--uerre-text);
    font-size: .75rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-feed-copy time {
    color: var(--uerre-purple);
    font-size: .6875rem;
    font-weight: 600;
}

.notification-unread-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--uerre-purple);
}

.notification-state {
    min-height: 12rem;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--uerre-muted);
    font-size: .8125rem;
    text-align: center;
}

.notification-state strong {
    color: var(--uerre-heading);
    font-size: .875rem;
}

.notifications-page-content {
    max-width: 52rem;
}

@media (max-width: 767.98px) {
    .notification-tray-header {
        align-items: flex-start;
    }

    .notification-tray-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .notification-mark-all {
        order: 3;
        width: 100%;
        text-align: right;
    }
}

.notification-empty-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: .25rem;
}

/* ─── Status Badges ──────────────────────────────────────────── */
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }

/* ─── Membership Status ──────────────────────────────────────── */
.status-member {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #d1fae5; color: #065f46;
    border-radius: 999px; padding: .3rem .9rem;
    font-size: .78rem; font-weight: 600;
}

.status-pending {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fef3c7; color: #92400e;
    border-radius: 999px; padding: .3rem .9rem;
    font-size: .78rem; font-weight: 600;
}

.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    flex-shrink: 0;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-uerre thead tr { background: var(--uerre-surface); }
.table-uerre thead th {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--uerre-muted); border-bottom: 2px solid var(--uerre-border);
    padding: .875rem 1rem;
}
.table-uerre tbody td { padding: .875rem 1rem; vertical-align: middle; }
.table-uerre tbody tr { border-bottom: 1px solid #f3f4f6; transition: background .1s; }
.table-uerre tbody tr:hover { background: var(--uerre-surface); }

.mobile-tab-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mobile-tab-list {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.mobile-tab-button {
    white-space: nowrap;
}

.mobile-action-group > .btn,
.mobile-action-group > a.btn {
    white-space: nowrap;
}

.mobile-admin-table table {
    min-width: 760px;
}

/* ─── Dashboard Stat Cards ───────────────────────────────────── */
.stat-card {
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-radius: var(--bs-border-radius-xl);
    padding: 1.5rem;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(91,33,182,.1);
}

.stat-card .stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem; font-weight: 800;
    color: var(--uerre-purple); line-height: 1;
}

.stat-card .stat-name {
    font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--uerre-muted); margin-top: .375rem;
}

/* ─── Home quick links (desktop equivalent of the mobile tab bar) ─── */
.home-quicklink {
    width: 56px; height: 56px;
    margin: 0 auto .5rem;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    transition: transform .18s ease, box-shadow .18s ease;
}

a:hover .home-quicklink {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.home-quicklink-label {
    font-size: .8rem; font-weight: 600;
    color: var(--uerre-heading);
}

.home-quicklink--slate  { background: linear-gradient(135deg, #64748b, #475569); }
.home-quicklink--blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.home-quicklink--teal   { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.home-quicklink--amber  { background: linear-gradient(135deg, #f59e0b, #b45309); }
.home-quicklink--violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* ─── Admin KPI Grid ─────────────────────────────────────────── */
.admin-kpi-section { margin-bottom: 2rem; }

.admin-kpi-heading {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    justify-content: space-between; gap: .75rem;
    margin-bottom: 1.25rem;
}

.admin-kpi-eyebrow {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--uerre-muted); margin-bottom: .25rem;
}

.admin-kpi-period { font-size: .8rem; color: var(--uerre-muted); margin-bottom: .1rem; }

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.admin-kpi-card {
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-left: 4px solid var(--uerre-purple);
    border-radius: var(--bs-border-radius-xl);
    padding: 1.25rem 1.375rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
}

.admin-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(91,33,182,.1);
}

.admin-kpi-card--purple { border-left-color: var(--uerre-purple); }
.admin-kpi-card--blue   { border-left-color: #2563eb; }
.admin-kpi-card--amber  { border-left-color: var(--uerre-gold); }
.admin-kpi-card--teal   { border-left-color: #0d9488; }
.admin-kpi-card--rose   { border-left-color: #e11d48; }
.admin-kpi-card--violet { border-left-color: var(--uerre-purple-vivid); }

.admin-kpi-label {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--uerre-muted); margin-bottom: .375rem;
}

.admin-kpi-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.85rem; font-weight: 800;
    color: var(--uerre-heading); line-height: 1;
    margin-bottom: .375rem;
}

.admin-kpi-context {
    font-size: .78rem; color: var(--uerre-muted); margin: 0;
}

.admin-kpi-context--positive { color: #0d9488; font-weight: 600; }
.admin-kpi-context--negative { color: #e11d48; font-weight: 600; }

.admin-kpi-progress {
    background: var(--uerre-surface-alt);
    border-radius: 999px;
    height: 6px;
    margin: .5rem 0 .5rem;
    overflow: hidden;
}

.admin-kpi-progress span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--uerre-purple), var(--uerre-purple-vivid));
    border-radius: 999px;
    transition: width .3s ease;
}

.admin-kpi-insights {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--uerre-surface);
    border: 1px solid var(--uerre-border);
    border-radius: var(--bs-border-radius-xl);
}

.admin-kpi-insights > div { display: flex; flex-direction: column; gap: .2rem; }

.admin-kpi-insights strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem; color: var(--uerre-heading);
}

.admin-kpi-insight-label {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--uerre-muted);
}

/* ─── Event Detail: hero actions & edit modal ───────────────── */
.event-hero-actions { min-width: 200px; }

.event-edit-modal .modal-dialog { max-width: 640px; }

.event-edit-actions { display: flex; justify-content: flex-end; gap: .625rem; }

/* ─── Event date badge (Event Detail hero + Home calendar teaser) ─── */
.hero-gradient .event-date-badge {
    width: 56px;
    border-radius: 12px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .5rem .25rem;
    text-align: center;
}

.event-date-month {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
}

.event-date-day {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}

/* ─── Mobile bottom tab bar (<768px, authenticated only) ─────── */
.mobile-tab-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1035;
    /* Solid (not translucent+blurred) background on purpose: backdrop-filter
       on a fixed element forces the browser to resample what's behind it on
       every scroll frame, which lags and reads as the bar "dragging"/
       detaching during scroll. A solid background has zero per-frame cost. */
    background: #fff;
    border-top: 1px solid var(--uerre-border);
    box-shadow: 0 -2px 12px rgba(15,23,42,.06);
    padding: .375rem .25rem calc(.375rem + env(safe-area-inset-bottom, 0px));
    /* Promote to its own compositor layer so scrolling repaints the page,
       not this bar — without this, some mobile browsers redraw fixed
       elements on every scroll frame, which reads as the bar "scrolling".
       -webkit-* duplicates cover older iOS Safari, which needs the
       vendor-prefixed form plus backface-visibility to fully stop the
       bar detaching/re-snapping during momentum/bounce scrolling. */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.mobile-tab-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .25rem .125rem;
    border-radius: 10px;
    color: var(--uerre-muted);
    font-size: .62rem;
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
    justify-content: center;
}

.mobile-tab-item.active {
    color: var(--uerre-purple);
    background: var(--uerre-tag-bg);
}

/* ─── Mobile expanded navigation ─────────────────────────────── */
.mobile-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    width: 100%;
    padding: 1rem 0 1.25rem;
}

.mobile-menu-tile {
    min-width: 0;
    min-height: 5.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border-radius: .875rem;
    color: var(--uerre-text);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 180ms ease-out, transform 180ms ease-out;
}

.mobile-menu-tile:hover,
.mobile-menu-tile:focus-visible,
.mobile-menu-tile.active {
    background: var(--uerre-surface);
    color: var(--uerre-heading);
    transform: translateY(-1px);
}

.mobile-menu-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .75rem;
    color: #fff;
    box-shadow: 0 .375rem .875rem rgba(15, 23, 42, .16);
}

.mobile-menu-slate .mobile-menu-icon { background: #64748b; }
.mobile-menu-blue .mobile-menu-icon { background: #2563eb; }
.mobile-menu-violet .mobile-menu-icon { background: var(--uerre-purple-light); }
.mobile-menu-amber .mobile-menu-icon { background: #d97706; }
.mobile-menu-teal .mobile-menu-icon { background: #0f9488; }
.mobile-menu-rose .mobile-menu-icon { background: #e11d48; }
.mobile-menu-emerald .mobile-menu-icon { background: #059669; }
.mobile-menu-gold .mobile-menu-icon { background: var(--uerre-gold); }
.mobile-menu-purple .mobile-menu-icon { background: var(--uerre-purple); }
.mobile-menu-orange .mobile-menu-icon { background: #ea580c; }

.notification-bell-mobile {
    flex: 1 1 0;
    min-width: 0;
}

.notification-bell-mobile .notification-bell-trigger {
    width: 100%;
}

.notification-bell-mobile .notification-tray {
    position: fixed;
    top: auto;
    right: .75rem;
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    left: .75rem;
    width: auto;
    max-height: min(70dvh, 36rem);
    border-radius: 1rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(135deg, var(--uerre-navy) 0%, var(--uerre-navy-deep) 100%);
}

.footer-logo-box {
    width: 42px; height: 42px;
    background: var(--uerre-purple-light);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124,58,237,.3);
}

.footer-section-title {
    font-size: .63rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--uerre-purple-vivid); margin-bottom: .875rem;
}

.footer-links { margin: 0; list-style: none; padding: 0; }
.footer-links li + li { margin-top: .5rem; }
.footer-links a {
    font-size: .825rem; color: rgba(255,255,255,.9);
    text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: rgba(255,255,255,.9); }

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up  { animation: fadeUp .55s ease-out both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ─── Blazor Error UI ────────────────────────────────────────── */
#blazor-error-ui {
    background: #fff3cd; color: #856404;
    border-top: 1px solid #ffc107;
    bottom: 0; left: 0; right: 0;
    padding: .75rem 1.5rem;
    position: fixed; z-index: 9999;
    display: none;
    font-size: .875rem;
}

#blazor-error-ui .reload { color: var(--uerre-purple); margin-left: .5rem; font-weight: 600; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ─── Utilities ──────────────────────────────────────────────── */
.text-purple   { color: var(--uerre-purple) !important; }
.text-muted-sm { color: var(--uerre-muted) !important; font-size: .8rem; }
.bg-surface    { background: var(--uerre-surface) !important; }
.bg-surface-alt{ background: var(--uerre-surface-alt) !important; }
.border-purple { border-color: var(--uerre-border-purple) !important; }

.line-clamp-1 { overflow: hidden; text-overflow: ellipsis;     white-space: nowrap;
}

/* ─── Leader badge editor (Perfil → Mis Grupos) ─────────────── */
.leader-badge-swatch {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.leader-badge-swatch:hover { transform: scale(1.08); }

.leader-badge-swatch--selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--uerre-heading);
}


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

.min-w-0 { min-width: 0; }
.gap-xs  { gap: .375rem; }
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.fw-800  { font-weight: 800; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .stat-value { font-size: 1.75rem; }
    .hero-float-card { display: none; }

    /* Tab bar is fixed and sits outside layout-wrapper's flow, so the
       clearance must go on the footer (the true last content block),
       not on .main-content — otherwise the footer's bottom row still
       renders underneath the fixed bar. */
    .site-footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

    .container-uerre { padding: 0 1rem; }


    .navbar-brand-name { font-size: .72rem; }
    .navbar-brand-sub { font-size: .52rem; }
    .navbar-collapse-uerre {
        margin-top: .75rem;
        padding-top: .75rem;
        border-top: 1px solid var(--uerre-border);
    }
    .navbar-uerre .navbar-nav {
        gap: .25rem;
    }
    .navbar-uerre .nav-link {
        display: block;
        width: 100%;
        padding: .7rem .875rem;
    }
    .navbar-uerre .nav-link.active::after {
        left: .875rem;
        right: calc(100% - 3.25rem);
    }
    .navbar-user-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: .75rem;
        margin-top: .5rem;
        border-top: 1px solid var(--uerre-border);
    }
    .navbar-user-actions .dropdown-menu {
        right: 0;
        left: auto;
    }

    .mobile-tab-scroll {
        padding-bottom: .25rem;
    }
    .mobile-tab-button {
        font-size: .8125rem !important;
        padding: .8rem .875rem !important;
    }

    .mobile-action-group {
        width: 100%;
        justify-content: stretch !important;
    }
    .mobile-action-group > .btn,
    .mobile-action-group > a.btn {
        flex: 1 1 100%;
        text-align: center;
    }

    .mobile-admin-table table {
        min-width: 680px;
    }

    .table-uerre thead th,
    .table-uerre tbody td {
        padding: .75rem .875rem;
    }

    .empty-state {
        padding: 3rem 1rem;
    }
}

/* ─── Administration Timeline ────────────────────────────────── */
.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: .5rem;
    top: .5rem;
    bottom: 1.5rem;
    width: 2px;
    background: var(--uerre-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -1.625rem;
    top: .375rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    z-index: 1;
    box-shadow: 0 0 0 2px var(--uerre-border);
}

.timeline-dot-active {
    background: var(--uerre-purple);
    box-shadow: 0 0 0 3px rgba(91,33,182,.2);
    width: 16px; height: 16px;
    left: -1.75rem;
}

.timeline-dot-past { background: var(--uerre-muted); }

.timeline-current > .timeline-content {
    border-left: 3px solid var(--uerre-purple);
    padding-left: 1rem;
    margin-left: -.25rem;
}

.timeline-content {
    background: #fff;
    border: 1px solid var(--uerre-border);
    border-radius: var(--bs-border-radius-xl);
    padding: 1.25rem 1.375rem;
    transition: box-shadow .2s;
}

.timeline-content:hover {
    box-shadow: 0 4px 16px rgba(91,33,182,.08);
}

/* ─── Term Member Cards ───────────────────────────────────────── */
.term-member-card {
    display: flex;
    align-items: center;
    gap: .625rem;
    background: var(--uerre-surface);
    border: 1px solid var(--uerre-border);
    border-radius: 10px;
    padding: .625rem .75rem;
    transition: border-color .15s;
}

.term-member-card:hover { border-color: var(--uerre-border-purple); }

.term-member-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--uerre-purple), var(--uerre-purple-vivid));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: .75rem;
    color: #fff; flex-shrink: 0;
}

.term-member-role {
    font-size: .68rem;
    color: var(--uerre-purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.2;
}

/* ─── Calendar ───────────────────────────────────────────────── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-cell-link {
    display: block;
    text-decoration: none;
    color: inherit;
}


.calendar-legend-card {
    padding: .7rem .95rem;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(49, 16, 105, .18);
    color: var(--uerre-text);
    font-size: .8rem;
    font-weight: 600;
}

.calendar-legend-item {
    white-space: nowrap;
}

.calendar-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.calendar-legend-dot--mine {
    background: var(--uerre-purple);
}

.calendar-legend-dot--other {
    background: var(--uerre-gold);
    box-shadow: 0 0 0 3px rgba(245,158,11,.14);
}

.calendar-day-header {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--uerre-muted);
    padding: .35rem 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.calendar-cell {
    min-height: 82px;
    background: #fff;
    border: 1.5px solid var(--uerre-border);
    border-radius: 12px;
    padding: .45rem .55rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-cell:hover {
    border-color: var(--uerre-purple);
    box-shadow: 0 0 0 2px rgba(124,58,237,.08);
}

.calendar-cell--empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.calendar-cell--today {
    border-color: var(--uerre-purple);
    background: var(--uerre-tag-bg);
}

.calendar-cell--selected {
    border-color: var(--uerre-purple) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.18) !important;
}

.calendar-cell--has-events .calendar-day-number {
    font-weight: 700;
    color: var(--uerre-purple-dark);
}

.calendar-day-number {
    font-size: .8rem;
    font-weight: 500;
    color: var(--uerre-text);
    display: block;
    margin-bottom: .2rem;
}

.calendar-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.calendar-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 0 .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
}

.calendar-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.calendar-indicator--mine {
    background: rgba(124,58,237,.12);
    color: var(--uerre-purple-dark);
}

.calendar-indicator--mine .calendar-indicator-dot {
    background: var(--uerre-purple);
}

.calendar-indicator--other {
    background: rgba(245,158,11,.16);
    color: #9a6700;
}

.calendar-indicator--other .calendar-indicator-dot {
    background: var(--uerre-gold);
}

/* ─── Calendar: mobile grid sizing (<768px, both Home widget and /calendario) ───
   Calendario.razor renders the same .calendar-grid at every viewport size (no
   separate mobile view), so this sizing applies to both the Home mini-widget
   and the full calendar page — the desktop 82px min-height reads as tall
   pills at ~44px column width otherwise. Placed after the base rules above
   (not in the top responsive block) because same-specificity selectors
   resolve by source order, and the unconditional base .calendar-cell/
   .calendar-grid rules above would otherwise win. */
@media (max-width: 768px) {
    .calendar-grid { gap: 4px; }
    .calendar-cell {
        min-height: 44px;
        padding: .3rem;
        border-radius: 8px;
    }
    .calendar-day-number { font-size: .7rem; margin-bottom: 0; }
    .calendar-indicators { gap: 3px; }
    .calendar-indicator {
        min-height: 16px;
        padding: 0 .3rem;
        font-size: .58rem;
        gap: 3px;
    }
    .calendar-indicator-dot { width: 5px; height: 5px; }
}

/* ─── Mobile hardening (<=390px) ─────────────────────────────── */
@media (max-width: 390px) {
    .container-uerre { padding: 0 .75rem; }

    .card-uerre,
    .stat-card,
    .admin-kpi-card,
    .term-card,
    .timeline-content {
        padding: 1rem;
    }

    .admin-kpi-grid { grid-template-columns: 1fr; }

    .event-hero-actions { min-width: 0; width: 100%; }
    .event-hero-actions .btn { width: 100%; }

    .event-edit-modal .modal-dialog,
    .modal-dialog {
        margin-left: .5rem;
        margin-right: .5rem;
    }

    .event-edit-actions { flex-wrap: wrap; }
    .event-edit-actions .btn { flex: 1 1 auto; }

    .footer-bottom { text-align: center; }

    .calendar-legend-card { width: 100%; }
}
