/* ============================================
   MISSÃO MARCA DA VITÓRIA
   DESIGN SYSTEM
   
   Colors:
   Primary: #0D0D0D (Preto profundo - base logo MV)
   PrimaryLight: #1a1a1a (Preto suave)
   Accent: #f5c518 (Amarelo vitória)
   Text: #111111 (Texto principal)
   TextMuted: #6B7280 (Texto secundário)
   Background: #F7F7F7 (Fundo)
============================================ */

/* ============ DESIGN TOKENS ============ */
:root {
    --primary: #0D0D0D;
    --primary-light: #1a1a1a;
    --primary-dark: #000000;
    --secondary: #E5E7EB;
    --accent: #f5c518;
    --accent-dark: #c9a227;
    --rose: #f5c518;
    --rose-light: #f9d96a;
    --rose-pale: #fdf6dc;
    --text: #111111;
    --text-muted: #6B7280;
    --background: #F7F7F7;
    --white: #FFFFFF;
    --error: #E74C3C;
    --success: #2ECC71;

    /* Glass & Surfaces */
    --surface-card: rgba(255, 255, 255, 0.97);
    --surface-glass: rgba(255, 255, 255, 0.85);
    --border-subtle: rgba(245, 197, 24, 0.25);

    /* Shadows */
    --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.16);
    --glow-gold: 0 0 30px rgba(245, 197, 24, 0.30);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0D0D0D 0%, #1a1a1a 100%);
    --gradient-accent: linear-gradient(135deg, #c9a227 0%, #f5c518 50%, #c9a227 100%);
    --gradient-hero: linear-gradient(135deg, #000000 0%, #0D0D0D 40%, #111111 100%);

    /* MV glow */
    --rose-glow: 0 0 40px rgba(245, 197, 24, 0.25);

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Typography - Fluid */
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.8rem, 0.75rem + 0.3vw, 0.95rem);
    --fs-base: clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem);
    --fs-md: clamp(1.1rem, 0.9rem + 1vw, 1.5rem);
    --fs-lg: clamp(1.3rem, 1rem + 1.5vw, 2rem);
    --fs-xl: clamp(1.8rem, 1.2rem + 3vw, 3.2rem);

    /* Spacing - Fluid */
    --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-sm: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
    --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-lg: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    --space-xl: clamp(2rem, 1.2rem + 3.5vw, 4rem);

    /* Transitions */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: color 0.3s var(--ease-smooth), background-color 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), opacity 0.3s var(--ease-smooth);
}

/* ============ RESET & BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ ROSA DECORATIVA SVG ============ */
.rose-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.07;
    z-index: 0;
}

.rose-decoration--login-top {
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    opacity: 0.10;
}

.rose-decoration--login-bottom {
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    opacity: 0.08;
    transform: rotate(180deg);
}

.rose-decoration--hero {
    top: 10px;
    right: 20px;
    width: 120px;
    height: 120px;
    opacity: 0.08;
}

/* Pétalas flutuantes (login) */
@keyframes petalFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.petal {
    position: fixed;
    width: 12px;
    height: 12px;
    background: radial-gradient(ellipse, var(--rose-light) 0%, var(--rose) 100%);
    border-radius: 50% 0 50% 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.petal--1 { left: 10%; animation: petalFloat 8s 0s infinite ease-in; }
.petal--2 { left: 25%; animation: petalFloat 10s 2s infinite ease-in; width: 8px; height: 8px; }
.petal--3 { left: 50%; animation: petalFloat 9s 4s infinite ease-in; }
.petal--4 { left: 70%; animation: petalFloat 11s 1s infinite ease-in; width: 10px; height: 10px; }
.petal--5 { left: 85%; animation: petalFloat 8.5s 3s infinite ease-in; width: 14px; height: 14px; }
.petal--6 { left: 40%; animation: petalFloat 12s 5s infinite ease-in; width: 9px; height: 9px; }

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

/* ============ PRELOADER ============ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__rings {
    position: relative;
    width: 80px;
    height: 80px;
}

.ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
}

.ring--1 {
    inset: 0;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.ring--2 {
    inset: 8px;
    border-right-color: var(--secondary);
    animation: spin 1.5s linear infinite reverse;
}

.ring--3 {
    inset: 16px;
    border-bottom-color: var(--accent);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preloader__text {
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.preloader__logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    object-fit: cover;
    object-position: center;
}

/* ============ NAVBAR ============ */
#mainNav {
    background: var(--gradient-primary) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(27, 38, 59, 0.3);
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* Offcanvas Menu Mobile */
.nav-offcanvas {
    background: #111;
    width: 280px !important;
    border-left: 1px solid rgba(245,197,24,0.2);
}
.nav-offcanvas-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(245,197,24,0.15);
}
.nav-offcanvas-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}
.nav-offcanvas-body {
    padding: 16px 12px;
    background: #111;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}
.nav-offcanvas-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}
.nav-offcanvas-item i {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
    color: var(--accent);
    opacity: 0.8;
}
.nav-offcanvas-item:hover,
.nav-offcanvas-item.active {
    background: rgba(212,175,55,0.12);
    color: var(--accent);
}
.nav-offcanvas-item:hover i,
.nav-offcanvas-item.active i {
    opacity: 1;
}
.nav-offcanvas-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Botão Sair em destaque no menu offcanvas */
.nav-offcanvas-item-sair {
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #ff6b6b !important;
}
.nav-offcanvas-item-sair i {
    color: #ff6b6b !important;
    opacity: 1 !important;
}
.nav-offcanvas-item-sair:hover {
    background: rgba(255,107,107,0.12) !important;
    color: #ff4444 !important;
}

/* Botão sino de notificação na navbar mobile */
.btn-notif-mobile {
    position: relative;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    padding: 4px 6px;
    margin-right: 4px;
    line-height: 1;
    cursor: pointer;
}
.btn-notif-mobile:hover { opacity: 0.8; }
.notif-badge-pill {
    font-size: 0.6rem;
    min-width: 18px;
}

/* Botão voltar elegante */
.input-codigo-unico {
    background: var(--secondary);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: default;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border-subtle);
    background: var(--surface-card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.btn-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212,175,55,0.06);
}

#mainNav .navbar-brand {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

#mainNav .navbar-brand img {
    transition: transform 0.3s var(--ease-spring);
}

#mainNav .navbar-brand:hover img {
    transform: scale(1.1);
}

#mainNav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: var(--fs-sm);
    position: relative;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--accent) !important;
    background: rgba(212, 175, 55, 0.1);
}

#mainNav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.bg-accent {
    background-color: var(--accent) !important;
    color: #0D0D0D !important;
    font-weight: 600;
}

.icon-3xl { font-size: 3rem; }

.evento-info-card { border-left: 4px solid var(--accent); }

/* ── Overlay de carregamento leve (só os anéis, sem fundo escuro) ── */
.att-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ── Grid responsivo genérico (cards no mobile, tabela no desktop) ── */
.resp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 359px) {
    .resp-grid { grid-template-columns: 1fr; }
}

.resp-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: var(--transition);
}

.resp-card:active {
    border-color: var(--accent);
    background: rgba(212,175,55,0.06);
}

.resp-card-title {
    font-size: 0.85rem;
    line-height: 1.3;
}

.resp-card-sub {
    font-size: 0.75rem;
}

/* ── Lista responsiva (1 coluna, separada por bordas) ── */
.resp-list { display: flex; flex-direction: column; }

.resp-list-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.resp-list-item:last-child { border-bottom: none; }

/* ============ MAIN CONTENT ============ */
.main-content {
    padding-top: 72px;
    padding-bottom: 90px;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .main-content {
        padding-bottom: 20px;
    }
}

/* ============ BOTTOM NAV MOBILE ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    border-top: 1px solid var(--secondary);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
    transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--accent);
}

.bottom-nav-item.active i {
    transform: scale(1.15);
}

/* ============ LOGIN PAGE ============ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efeito de pétalas de fundo no login */
.login-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}


.login-card {
    background: var(--surface-card);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: clamp(32px, 5vw, 48px) clamp(28px, 4vw, 40px);
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), var(--glow-gold);
    text-align: center;
    animation: slideUp 0.6s var(--ease-spring);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.login-card--narrow { max-width: 440px; }

.login-title-sm { font-size: 1.5rem; }

.login-subtitle-sm {
    color: var(--text-muted);
    font-size: .9rem;
}

.login-separator { font-size: .8rem; }

.login-first-access {
    font-size: .82rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: .7;
    transition: opacity .2s;
}

.login-first-access:hover { opacity: 1; color: var(--accent); }

.push-banner-toast {
    background: rgba(30, 15, 40, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
}

/* PWA Install Modal */
.pwa-modal-content {
    background: #1a1a1a;
    border: 1.5px solid var(--accent) !important;
    border-radius: 20px;
    overflow: hidden;
}

.pwa-modal-logo {
    border: 2px solid var(--accent);
}

.pwa-modal-title {
    color: var(--accent);
}

.notif-badge-fs { font-size: .65rem; }

.login-panel-cadastro { display: none; text-align: left; }

.input-readonly-code {
    background: rgba(255, 255, 255, .07);
    cursor: not-allowed;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h1 {
    color: var(--primary);
    font-weight: 800;
    font-size: var(--fs-lg);
    margin-bottom: 8px;
    line-height: 1.15;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-size: var(--fs-sm);
}

.btn-login-admin {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--fs-sm);
    width: 100%;
    transition: var(--transition);
    letter-spacing: 0.5px;
    min-height: 50px;
    position: relative;
    overflow: hidden;
}

.btn-login-admin::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(212, 175, 55, 0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-login-admin:hover::after {
    transform: translateX(100%);
}

.btn-login-admin:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(27, 38, 59, 0.35);
}

.btn-login-member {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--fs-sm);
    width: 100%;
    transition: var(--transition);
    letter-spacing: 0.5px;
    min-height: 50px;
}

.btn-login-member:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============ DASHBOARD ============ */
.hero-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    padding: var(--space-lg);
    color: var(--white);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(27, 38, 59, 0.25);
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-card .hero-icon {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 12px;
}

.hero-card h3 {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: var(--fs-md);
}

.hero-card p {
    color: var(--secondary);
    font-size: var(--fs-sm);
    opacity: 0.8;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-md);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    width: 100%;
    height: 100%;
    min-height: 110px;
    box-sizing: border-box;
}

.navbar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 8px;
}

.text-accent {
    color: var(--accent);
}

.events-calendar-card {
    background: var(--surface-card);
    min-height: 500px;
}

.ev-periodo-switch {
    padding-bottom: 8px !important;
}

.ev-periodo-input {
    width: 2.5em;
    height: 1.2em;
    cursor: pointer;
}

.ev-periodo-label {
    font-weight: 600;
    cursor: pointer;
}

/* Dashboard - QR Print Section */
.qr-print-section {
    border: 2px solid var(--accent);
}

.qr-print-header {
    background: linear-gradient(135deg, var(--accent) 0%, #c9a430 100%);
}

.qr-print-title {
    color: var(--primary);
    margin: 0;
}

.qr-print-select {
    border-color: var(--accent);
}

.qr-print-btn {
    padding: 14px;
    font-size: 1rem;
}

.my-qr-subtitle {
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Login Page */
.login-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin-bottom: 16px;
    background: #000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.30), 0 0 0 3px rgba(201,162,39,0.6);
    object-fit: cover;
    object-position: center;
    padding: 0;
}

.login-subtitle {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Decoração de rosa no card de login */
.login-card .rose-svg-deco {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 130px;
    height: 130px;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

.login-card .rose-svg-deco--bottom {
    top: auto;
    right: auto;
    bottom: -15px;
    left: -15px;
    width: 100px;
    height: 100px;
    transform: rotate(180deg);
}

.login-alert {
    font-size: 0.9rem;
    font-weight: 600;
}

.login-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.login-submit-btn {
    padding: 12px;
    font-size: 1rem;
}

.login-test-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-test-title {
    color: var(--primary);
}

/* QR Code Print Page */
.qrpage-title {
    letter-spacing: 2px;
    color: var(--primary);
}

.qrpage-footer {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Hide admin-only nav items for non-admin users */
body:not([data-role="admin"]) .nav-admin-only {
    display: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover), var(--glow-gold);
    border-color: rgba(212, 175, 55, 0.3);
}

.stat-card i {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ============ CARDS GERAIS ============ */
.content-card {
    background: var(--surface-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.card-link-nav {
    color: inherit;
}

.qr-reader-box {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.busca-membro-input {
    max-width: 200px;
}

.content-card .card-header-custom {
    padding: var(--space-md) var(--space-md);
    background: transparent;
    border-bottom: 1px solid var(--secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-card .card-header-custom h5 {
    font-weight: 700;
    margin: 0;
    color: var(--primary);
    font-size: var(--fs-base);
}

.content-card .card-body {
    padding: var(--space-md);
}

/* ============ BOTOES ============ */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: 11px 24px;
    font-weight: 700;
    transition: var(--transition);
    font-size: var(--fs-sm);
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 38, 59, 0.25);
}

.btn-primary-custom:active {
    transform: translateY(0) scale(0.97);
}

.btn-action-fixed {
    width: 140px;
}

.btn-accent {
    background: linear-gradient(45deg, #c9a227, #f5c518);
    color: #111;
    border: none;
    border-radius: var(--radius-full);
    padding: 11px 24px;
    font-weight: 700;
    transition: var(--transition);
    font-size: var(--fs-sm);
    min-height: 44px;
    box-shadow: var(--glow-gold);
}

.btn-accent:hover {
    opacity: 0.88;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 197, 24, 0.35);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid rgba(0,0,0,0.5);
    border-radius: var(--radius-full);
    padding: 9px 20px;
    font-weight: 600;
    transition: var(--transition);
    font-size: var(--fs-sm);
    min-height: 44px;
}

.btn-outline-custom:hover {
    border-color: #f5c518;
    color: #c9a227;
}

/* ============ TABELAS ============ */
.table-custom {
    margin: 0;
}

.table-custom thead th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border: none;
}

.table-custom tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--secondary);
}

.table-custom tbody tr {
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background: rgba(212, 175, 55, 0.04);
}

/* ============ FORMULARIOS ============ */
.form-control,
.form-select {
    border: 1px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: var(--fs-sm);
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--primary);
    margin-bottom: 6px;
}

/* ============ BADGES ============ */
.badge-today {
    background: var(--success) !important;
    color: var(--white);
    font-size: 0.6rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.badge-type {
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* ============ EVENTO CARDS ============ */
.event-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition);
    border: 1px solid transparent;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.event-card.today {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: var(--card-shadow), var(--glow-gold);
}

.event-date-box {
    min-width: 60px;
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(27, 38, 59, 0.05);
    transition: var(--transition);
}

.event-date-box.today {
    background: rgba(212, 175, 55, 0.1);
}

.event-date-box .day {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.event-date-box.today .day {
    color: var(--accent);
}

.event-date-box .month {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.event-date-box .event-time {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 2px;
}

/* ============ PRESENCA SECTION ============ */
.scan-option {
    background: var(--surface-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    min-height: 44px;
}

.scan-option:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover), var(--glow-gold);
    border-color: var(--accent);
}

.scan-option i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.scan-option h5 {
    font-weight: 700;
    margin-bottom: 8px;
}

.scan-option p {
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

/* ============ QR CODE / MEU QR ============ */
.my-qr-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.my-qr-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.my-qr-card .qr-box {
    background: var(--white);
    display: inline-block;
    padding: 20px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.qr-print-page {
    background: white;
    text-align: center;
    padding: var(--space-xl);
}

.qr-print-page .qr-container {
    display: inline-block;
    padding: 24px;
    border: 3px solid var(--primary);
    border-radius: var(--radius-2xl);
    margin: 24px 0;
}

/* ============ MODAIS ============ */
.modal-content {
    border-radius: var(--radius-2xl);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-md) var(--space-md);
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: var(--space-md);
}

/* ============ TOAST ============ */
.toast-success {
    background: var(--success) !important;
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.toast-error {
    background: var(--error) !important;
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* ============ SCROLL REVEAL ANIMATIONS ============ */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0);
}

/* Stagger children */

/* ============ BOOTSTRAP OVERRIDES — estilo botão login ============ */
.btn-primary,
.btn-warning {
    background: linear-gradient(45deg, #c9a227, #f5c518) !important;
    color: #111 !important;
    border: none !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    box-shadow: 0 0 18px rgba(245,197,24,0.25) !important;
    transition: opacity .2s, transform .2s !important;
}
.btn-primary:hover,
.btn-warning:hover {
    opacity: 0.88 !important;
    color: #111 !important;
    transform: translateY(-1px) !important;
}
.btn-secondary,
.btn-outline-secondary {
    border-radius: 9999px !important;
    font-weight: 600 !important;
}
.btn-outline-primary {
    border-radius: 9999px !important;
    border-color: #f5c518 !important;
    color: #c9a227 !important;
    font-weight: 600 !important;
}
.btn-outline-primary:hover {
    background: linear-gradient(45deg, #c9a227, #f5c518) !important;
    color: #111 !important;
    border-color: #f5c518 !important;
}
.btn-danger { border-radius: 9999px !important; font-weight: 600 !important; }
.btn-success { border-radius: 9999px !important; font-weight: 600 !important; }
.reveal-up:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-up:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-up:nth-child(4) {
    transition-delay: 0.3s;
}

/* ============ FADE-IN ============ */
.fade-in {
    animation: fadeIn 0.5s var(--ease-smooth);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: var(--radius-full);
    border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

*::-webkit-scrollbar {
    width: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--background);
}

*::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

@supports (scrollbar-width: thin) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--accent) var(--background);
    }
}

/* ============ FOCUS VISIBLE ============ */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============ PRINT ============ */
@media print {

    #mainNav,
    .bottom-nav,
    .btn-print-action {
        display: none !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .qr-print-page {
        box-shadow: none;
    }
}

/* ============ RESPONSIVE TWEAKS ============ */
@media (max-width: 767px) {
    .event-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .event-card .d-flex {
        justify-content: center;
    }
}

/* ============ UTILITY ============ */
.icon-accent { color: var(--accent); }
.icon-primary { color: var(--primary); }
.text-sm { font-size: 0.8rem; }

.navbar-brand-sub {
    font-size: 0.6em;
    color: var(--rose-light);
    opacity: 0.9;
}

.login-title-sub {
    color: var(--accent);
    font-size: 0.7em;
}

.login-footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.qr-reader-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#gpsStatusCard {
    display: none;
}

.gps-location-hint {
    font-size: 0.82rem;
}

.select-auto { width: auto; }

.ev-location-status {
    font-size: 0.8rem;
}

/* ======= FORMULÁRIO DE CADASTRO ======= */
#painelCadastro {
    display: none;
    text-align: left;
}

#painelCadastro .input-readonly-code {
    background: #f7f7f7;
    color: #888;
    font-weight: 600;
    cursor: not-allowed;
}

.cadastro-btn {
    flex: 1 1 0;
    padding: 14px 10px;
    font-size: 1rem;
    font-weight: 700;
    min-height: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-cadastro-voltar {
    background: var(--secondary);
    color: var(--text);
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-cadastro-voltar:hover {
    background: #d1d5db;
    color: var(--text);
}

.btn-cadastro-ok {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-cadastro-ok:hover {
    color: var(--white);
    box-shadow: 0 8px 30px rgba(27, 38, 59, 0.35);
}

/* ============ AUTOCOMPLETE DE MEMBROS ============ */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    background: var(--white);
    border: 1px solid var(--secondary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--card-shadow-hover);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: -2px;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--secondary);
    transition: background 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--background);
    color: var(--accent-dark);
}

.autocomplete-item .smaller {
    font-size: 0.75rem;
    color: var(--text-muted);
}
