:root {
    --font-scale: 1;
}

html {
    font-size: calc(15.5px * var(--font-scale));
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
    font-family: 'Exo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#telao-wall-container:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    overflow-y: auto !important;
}

/* ==========================================================================
   VISUAL LEVE, CLARO E ACESSÍVEL (PADRÃO — FÁCIL LEITURA E ALTO CONTRASTE)
   ========================================================================== */
body.theme-light {
    margin: 0;
    overflow-x: hidden;
    max-width: 100vw;
    font-family: 'Exo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: #dbeafe !important;
    background-image:
        linear-gradient(180deg, rgba(248, 250, 252, 0.72) 0%, rgba(219, 234, 254, 0.56) 45%, rgba(147, 197, 253, 0.42) 100%),
        url('/uploads/fundo_ponte_limpo.jpg') !important;
    background-size: cover !important;
    background-position: center bottom !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: #0f172a !important;
    min-height: 100vh;
    line-height: 1.6;
}

/* Cartões brancos limpos e suaves com leve transparência executiva sobre o fundo do evento */
body.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 1.1rem;
    box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(6px) !important;
}

/* Cabeçalho e Rodapé Claros */
body.theme-light header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

body.theme-light footer {
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

/* Adaptação de Textos para Alto Contraste e Leitura Confortável */
body.theme-light .text-white {
    color: #0f172a !important;
}

/* Mantém texto branco dentro de botões coloridos e badges escuros */
body.theme-light a.bg-blue-600,
body.theme-light button.bg-blue-600,
body.theme-light a.bg-blue-700,
body.theme-light button.bg-blue-700,
body.theme-light a.bg-indigo-600,
body.theme-light button.bg-indigo-600,
body.theme-light a.bg-emerald-600,
body.theme-light button.bg-emerald-600,
body.theme-light a.bg-cyan-600,
body.theme-light button.bg-cyan-600,
body.theme-light a.bg-sky-600,
body.theme-light button.bg-sky-600,
body.theme-light a.bg-purple-600,
body.theme-light button.bg-purple-600,
body.theme-light a.bg-amber-500,
body.theme-light button.bg-amber-500,
body.theme-light a.bg-amber-600,
body.theme-light button.bg-amber-600,
body.theme-light a.bg-rose-600,
body.theme-light button.bg-rose-600,
body.theme-light a.bg-slate-800,
body.theme-light button.bg-slate-800,
body.theme-light a.bg-slate-900,
body.theme-light button.bg-slate-900,
body.theme-light a[class*="from-indigo-"],
body.theme-light button[class*="from-indigo-"],
body.theme-light a[class*="from-cyan-"],
body.theme-light button[class*="from-cyan-"],
body.theme-light a[class*="from-blue-"],
body.theme-light button[class*="from-blue-"],
body.theme-light span[class*="from-indigo-"],
body.theme-light #photo-lightbox .text-white,
body.theme-light #photo-lightbox button,
body.theme-light #photo-lightbox a,
body.theme-light .media-card .absolute .text-white {
    color: #ffffff !important;
}

body.theme-light .text-slate-200,
body.theme-light .text-slate-300 {
    color: #1e293b !important;
}

body.theme-light .text-slate-400,
body.theme-light .text-slate-500 {
    color: #475569 !important;
}

/* Cores de destaque mais legíveis no fundo claro */
body.theme-light .text-cyan-200,
body.theme-light .text-cyan-300,
body.theme-light .text-cyan-400 {
    color: #0369a1 !important;
}

body.theme-light .text-indigo-200,
body.theme-light .text-indigo-300,
body.theme-light .text-indigo-400 {
    color: #1d4ed8 !important;
}

body.theme-light .text-purple-200,
body.theme-light .text-purple-300,
body.theme-light .text-purple-400 {
    color: #6d28d9 !important;
}

body.theme-light .text-emerald-200,
body.theme-light .text-emerald-300,
body.theme-light .text-emerald-400 {
    color: #047857 !important;
}

body.theme-light .text-amber-200,
body.theme-light .text-amber-300,
body.theme-light .text-amber-400 {
    color: #b45309 !important;
}

body.theme-light .text-rose-200,
body.theme-light .text-rose-300,
body.theme-light .text-rose-400 {
    color: #be123c !important;
}

/* Campos de Formulário (Inputs e Selects) Claros, Grandes e Visíveis */
body.theme-light input[type="text"],
body.theme-light input[type="email"],
body.theme-light input[type="password"],
body.theme-light input[type="number"],
body.theme-light select {
    background-color: #ffffff !important;
    border: 2px solid #94a3b8 !important;
    color: #0f172a !important;
    font-size: 1rem !important;
    font-weight: 500;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.theme-light input::placeholder {
    color: #64748b !important;
}

body.theme-light input:focus,
body.theme-light select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

/* Caixas internas e painéis secundários (apenas blocos, não botões) */
body.theme-light div.bg-slate-900,
body.theme-light .bg-slate-900\/80,
body.theme-light .bg-slate-900\/90,
body.theme-light .bg-slate-950,
body.theme-light .bg-slate-950\/80,
body.theme-light .bg-slate-950\/90 {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light a.bg-slate-900,
body.theme-light button.bg-slate-900,
body.theme-light span.bg-slate-900 {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

body.theme-light .bg-slate-800 {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body.theme-light .bg-slate-800:hover {
    background-color: #cbd5e1 !important;
}

body.theme-light .bg-indigo-950\/30,
body.theme-light .bg-indigo-950\/10 {
    background-color: #eff6ff !important;
    border-color: #93c5fd !important;
}

body.theme-light .bg-rose-950\/20 {
    background-color: #fff1f2 !important;
    border-color: #fda4af !important;
}

body.theme-light .bg-emerald-950\/20 {
    background-color: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
}

body.theme-light .border-white\/10,
body.theme-light .border-white\/15,
body.theme-light .border-white\/5 {
    border-color: #e2e8f0 !important;
}

/* Aumento suave de textos pequenos para facilitar leitura de idosos */
body.theme-light .text-xs {
    font-size: 0.875rem !important; /* 14px em vez de 12px */
    line-height: 1.45 !important;
}

body.theme-light .text-sm {
    font-size: 0.975rem !important; /* ~16px em vez de 14px */
    line-height: 1.55 !important;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.theme-light .portal-badge {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

/* Unifica botões de destaque na cor institucional Azul Royal (#1d4ed8) */
body.theme-light a[class*="from-cyan-"],
body.theme-light button[class*="from-cyan-"],
body.theme-light a[class*="from-indigo-"],
body.theme-light button[class*="from-indigo-"],
body.theme-light button.bg-indigo-600,
body.theme-light button.bg-blue-600,
body.theme-light a.bg-blue-600 {
    background-image: none !important;
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.18) !important;
}

body.theme-light button.bg-emerald-600,
body.theme-light a.bg-emerald-600 {
    background-color: #059669 !important;
    color: #ffffff !important;
}

/* Guia Oval de Scanner Facial */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 4/3;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    background: #0f172a;
    border: 3px solid #3b82f6;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.18);
}

.camera-container video,
.camera-container img.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-oval-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-oval-guide::before {
    content: '';
    width: 54%;
    height: 76%;
    border-radius: 50%;
    border: 3px dashed #38bdf8;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.35);
    transition: all 0.3s ease;
}

.camera-container.face-detected .face-oval-guide::before {
    border: 4px solid #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5), 0 0 0 9999px rgba(15, 23, 42, 0.35);
}

.scan-laser {
    position: absolute;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, #10b981, #38bdf8, transparent);
    box-shadow: 0 0 12px #38bdf8;
    animation: scanMove 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scanMove {
    0%, 100% { top: 15%; opacity: 0.4; }
    50% { top: 82%; opacity: 1; }
}

.media-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px -10px rgba(37, 99, 235, 0.18) !important;
}
