/*
 * Sr.Global — Tela de login e demais SimplePages (recuperação de senha, etc.)
 * Layout split-screen: brand panel (Navy + ouro champagne + logo) + card glass.
 * Escopo: body:has(.fi-simple-page). CSS puro (classes fi-*), sem build.
 *
 * Paleta da marca:
 *   Azul Navy     #0B1D33   (fundo dark / autoridade)
 *   Ouro Champ.   #C8A96B   (prestígio / accent)
 *   Grafite       #1C1F26   Prata #C0C4CC   Branco #FFFFFF
 */

/* ===================== BACKGROUND DA PÁGINA ===================== */
body:has(.fi-simple-page) {
    position: relative;
    background:
        radial-gradient(ellipse 60% 40% at 18% 22%, rgba(200, 169, 107, 0.16) 0%, transparent 65%),
        radial-gradient(ellipse 55% 45% at 85% 82%, rgba(200, 169, 107, 0.12) 0%, transparent 65%),
        linear-gradient(135deg, #0d2240 0%, #0b1d33 45%, #07111f 100%) !important;
    background-attachment: fixed !important;
    overflow-x: hidden;
    min-height: 100vh;
}

:where(html.dark) body:has(.fi-simple-page) {
    background:
        radial-gradient(ellipse 55% 40% at 20% 22%, rgba(200, 169, 107, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 50% 45% at 80% 82%, rgba(120, 92, 47, 0.14) 0%, transparent 65%),
        linear-gradient(135deg, #0b1d33 0%, #091627 50%, #060e1a 100%) !important;
}

/* ===================== LAYOUT SPLIT-SCREEN (≥1024px) ===================== */
.fi-simple-layout { position: relative; z-index: 1; min-height: 100vh; }

@media (min-width: 1024px) {
    .fi-simple-layout { display: flex !important; flex-direction: row; align-items: stretch; }
    .fi-simple-brand-panel { flex: 1 1 50%; max-width: 52%; }
    .fi-simple-main-ctn { flex: 1 1 50%; display: flex !important; align-items: center; justify-content: center; }
}

/* ===================== BRAND PANEL (esquerdo) ===================== */
.fi-simple-brand-panel {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 4rem 3.5rem;
    color: #f5f7fa;
    background:
        radial-gradient(ellipse 70% 50% at 30% 28%, rgba(200, 169, 107, 0.13) 0%, transparent 70%),
        linear-gradient(160deg, #0d2240 0%, #0b1d33 50%, #060e1a 100%);
    border-right: 1px solid rgba(200, 169, 107, 0.22);
}

@media (min-width: 1024px) {
    .fi-simple-brand-panel { display: flex; align-items: center; justify-content: center; }
}

/* Grid tech sutil */
.fi-simple-brand-panel .fi-brand-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(200, 169, 107, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 169, 107, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
    pointer-events: none;
}

/* Anéis orbitais decorativos (eco do símbolo SG/globo) */
.fi-simple-brand-panel .fi-brand-ring {
    position: absolute;
    border-radius: 9999px;
    border: 1px solid rgba(200, 169, 107, 0.18);
    pointer-events: none;
}
.fi-simple-brand-panel .fi-brand-ring-1 {
    width: 460px; height: 460px; top: -120px; right: -140px;
    border-color: rgba(200, 169, 107, 0.16);
    animation: sg-spin 60s linear infinite;
}
.fi-simple-brand-panel .fi-brand-ring-2 {
    width: 320px; height: 320px; bottom: -100px; left: -110px;
    border-color: rgba(120, 150, 200, 0.14);
    animation: sg-spin 80s linear infinite reverse;
}
@keyframes sg-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Orbs de luz */
.fi-simple-brand-panel .fi-brand-orb { position: absolute; border-radius: 9999px; filter: blur(72px); pointer-events: none; opacity: 0.5; }
.fi-simple-brand-panel .fi-brand-orb-1 {
    width: 340px; height: 340px; top: 18%; left: -80px;
    background: rgba(200, 169, 107, 0.4);
    animation: sg-orb-1 16s ease-in-out infinite;
}
.fi-simple-brand-panel .fi-brand-orb-2 {
    width: 280px; height: 280px; bottom: 8%; right: -60px;
    background: rgba(30, 64, 120, 0.5);
    animation: sg-orb-2 20s ease-in-out infinite;
}
@keyframes sg-orb-1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.08); } }
@keyframes sg-orb-2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,-25px) scale(1.1); } }

/* Conteúdo */
.fi-simple-brand-panel .fi-brand-content { position: relative; z-index: 2; max-width: 32rem; width: 100%; }

/* Variante centralizada (logo como herói) */
.fi-simple-brand-panel.fi-brand-centered .fi-brand-content { text-align: center; }
.fi-simple-brand-panel.fi-brand-centered .fi-brand-logo { margin-left: auto; margin-right: auto; }
.fi-simple-brand-panel.fi-brand-centered .fi-brand-features { align-items: center; }
.fi-simple-brand-panel.fi-brand-centered .fi-brand-footer { justify-content: center; }

.fi-simple-brand-panel .fi-brand-logo {
    display: block;
    width: 400px; height: auto; margin-bottom: 2.25rem;
    filter:
        drop-shadow(0 0 36px rgba(200, 169, 107, 0.3))
        drop-shadow(0 14px 34px rgba(0, 0, 0, 0.55));
    animation: sg-fade-in 0.8s ease-out;
}
@media (max-width: 1280px) { .fi-simple-brand-panel .fi-brand-logo { width: 320px; } }
@keyframes sg-fade-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.fi-simple-brand-panel .fi-brand-title {
    font-size: 2.1rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #d9bd86 60%, #c8a96b 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.fi-simple-brand-panel .fi-brand-tagline { font-size: 1rem; line-height: 1.6; color: rgba(220, 228, 240, 0.78); margin-bottom: 2rem; }

.fi-simple-brand-panel .fi-brand-features { list-style: none; padding: 0; margin: 0 0 2.5rem 0; display: flex; flex-direction: column; gap: 0.85rem; }
.fi-simple-brand-panel .fi-brand-features li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.95rem; color: rgba(226, 232, 240, 0.92); }
.fi-simple-brand-panel .fi-brand-feature-icon {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; border-radius: 9999px;
    background: linear-gradient(135deg, rgba(200, 169, 107, 0.28), rgba(120, 92, 47, 0.16));
    border: 1px solid rgba(200, 169, 107, 0.42); color: #d9bd86;
}
.fi-simple-brand-panel .fi-brand-feature-icon svg { width: 0.85rem; height: 0.85rem; }

.fi-simple-brand-panel .fi-brand-footer { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: rgba(160, 174, 192, 0.72); letter-spacing: 0.02em; }
.fi-simple-brand-panel .fi-brand-pulse {
    display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 9999px;
    background: #c8a96b; box-shadow: 0 0 0 0 rgba(200, 169, 107, 0.6); animation: sg-pulse 2s ease-in-out infinite;
}
@keyframes sg-pulse { 0% { box-shadow: 0 0 0 0 rgba(200,169,107,0.6); } 70% { box-shadow: 0 0 0 8px rgba(200,169,107,0); } 100% { box-shadow: 0 0 0 0 rgba(200,169,107,0); } }

/* ===================== CARD DE LOGIN (glass) ===================== */
.fi-simple-main {
    max-width: 27rem !important; width: 100%; margin: auto !important; padding: 2.5rem 2rem !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important; border-radius: 1.25rem !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    animation: sg-card-in 0.6s ease-out 0.1s both;
}
@keyframes sg-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

:where(html.dark) .fi-simple-main {
    background: rgba(11, 29, 51, 0.9) !important;
    border-color: rgba(200, 169, 107, 0.22) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(200, 169, 107, 0.12) inset !important;
}

.fi-simple-main .fi-simple-header { text-align: center; margin-bottom: 0.5rem; }
.fi-simple-main .fi-simple-header-heading {
    font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0b1d33 0%, #b8965a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
:where(html.dark) .fi-simple-main .fi-simple-header-heading {
    background: linear-gradient(135deg, #f5f7fa 0%, #d9bd86 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fi-simple-main .fi-simple-header-subheading { color: rgba(71, 85, 105, 0.85); font-size: 0.95rem; }
:where(html.dark) .fi-simple-main .fi-simple-header-subheading { color: rgba(203, 213, 225, 0.75); }

/* Inputs */
.fi-simple-main .fi-input-wrp { background: rgba(255,255,255,0.7); backdrop-filter: blur(6px); border-color: rgba(203,213,225,0.7); transition: all 0.18s ease; }
.fi-simple-main .fi-input-wrp:focus-within { background: rgba(255,255,255,0.96); border-color: #c8a96b; box-shadow: 0 0 0 3px rgba(200,169,107,0.22); }
:where(html.dark) .fi-simple-main .fi-input-wrp { background: rgba(13,34,64,0.55); border-color: rgba(200,169,107,0.2); }
:where(html.dark) .fi-simple-main .fi-input-wrp:focus-within { background: rgba(13,34,64,0.85); border-color: #c8a96b; }

/* Botão primário ouro */
.fi-simple-main .fi-btn.fi-color-primary {
    background-image: linear-gradient(135deg, #d9bd86 0%, #c8a96b 50%, #b8965a 100%);
    color: #0b1d33; border: 0;
    box-shadow: 0 8px 20px -6px rgba(184, 150, 90, 0.5), 0 0 0 1px rgba(255,255,255,0.15) inset;
    transition: all 0.2s ease; font-weight: 600; letter-spacing: 0.01em;
}
.fi-simple-main .fi-btn.fi-color-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(184,150,90,0.6), 0 0 0 1px rgba(255,255,255,0.2) inset; }
.fi-simple-main .fi-btn.fi-color-primary:active { transform: translateY(0); }

/* ===================== MOBILE ===================== */
@media (max-width: 1023px) {
    .fi-simple-main-ctn { min-height: 100vh; display: flex !important; align-items: center; justify-content: center; }
}
@media (max-width: 640px) {
    .fi-simple-main { max-width: 100% !important; padding: 2rem 1.5rem !important; border-radius: 1rem !important; }
}

/* ===================== MICROINTERAÇÕES DOS PAINÉIS (Etapa 7) ===================== */
/* Aplicadas em todas as páginas dos painéis (carregado via HEAD_END). Sutil e seguro. */
.fi-btn { transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.fi-btn:hover { transform: translateY(-1px); }
.fi-section, .fi-wi-stats-overview-stat, .fi-ta-ctn { transition: border-color 0.18s ease, box-shadow 0.18s ease; }
html.dark .fi-section:hover { border-color: rgba(200, 169, 107, 0.30); }
/* Borda luminosa discreta (ouro) nos cards de indicadores no tema escuro */
html.dark .fi-wi-stats-overview-stat {
    box-shadow: 0 0 0 1px rgba(200, 169, 107, 0.10) inset, 0 8px 24px -16px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
html.dark .fi-wi-stats-overview-stat:hover {
    box-shadow: 0 0 0 1px rgba(200, 169, 107, 0.28) inset, 0 12px 30px -16px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}
