@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

:root {
    --bg: #0A0A0A;
    --surface: #141414;
    --accent: #FBBF24;
    --text-main: #FAFAFA;
    --subtext: #A3A3A3;
}

body.light-theme {
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --accent: #D97706;
    --text-main: #0F172A;
    --subtext: #64748B;
}

body {
    background-color: var(--bg);
    background-image: radial-gradient(ellipse at 15% 50%, rgba(251, 191, 36, 0.06) 0%, transparent 55%),
                      radial-gradient(ellipse at 85% 15%, rgba(251, 191, 36, 0.04) 0%, transparent 45%);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.5s ease, color 0.5s ease, background-image 0.5s ease;
    -webkit-tap-highlight-color: transparent;
}

body.light-theme {
    background-image: radial-gradient(ellipse at 15% 50%, rgba(217, 119, 6, 0.05) 0%, transparent 55%),
                      radial-gradient(ellipse at 85% 15%, rgba(217, 119, 6, 0.03) 0%, transparent 45%);
}

/* Ocultar barra de rolagem mas manter o scroll ativo para TODOS os elementos */
html,
body,
* {
    -ms-overflow-style: none !important;
    /* IE and Edge */
    scrollbar-width: none !important;
    /* Firefox */
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.glass-card {
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

body.light-theme .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.blur-value {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(8px);
    opacity: 0.5;
    user-select: none;
}

.blur-value.revealed {
    filter: blur(0);
    opacity: 1;
}

.input-huge {
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    width: 100%;
}

/* Remover setas do input type number */
.input-huge::-webkit-outer-spin-button,
.input-huge::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-huge[type=number] {
    -moz-appearance: textfield;
}

.input-huge::placeholder {
    color: var(--subtext);
}

.glass-card:has(.input-huge:focus) {
    border-color: rgba(245,197,90,0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(245,197,90,0.08), 0 0 60px rgba(245,197,90,0.07);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background-color: var(--accent);
    color: #1C1915;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(245,197,90,0.25), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(245,197,90,0.4), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 2px 10px rgba(245,197,90,0.2);
}

.nav-btn {
    opacity: 0.4;
    transition: opacity 0.25s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    border-radius: 14px;
    color: var(--text-main);
}
.nav-btn.active {
    opacity: 1;
    color: var(--accent);
}
.nav-btn:not(.active):hover {
    opacity: 0.65;
}

/* ícone filled só aparece no ativo */
.nav-btn .nav-icon-filled  { display: none; }
.nav-btn .nav-icon-outline { display: block; }
.nav-btn.active .nav-icon-filled  { display: block; }
.nav-btn.active .nav-icon-outline { display: none; }

/* label mais discreta nos inativos */
.nav-btn .nav-label         { opacity: 0.7; }
.nav-btn.active .nav-label  { opacity: 1; }

/* bounce ao ativar */
@keyframes navIconBounce {
    0%   { transform: scale(1) translateY(0); }
    40%  { transform: scale(1.25) translateY(-3px); }
    70%  { transform: scale(0.92) translateY(1px); }
    100% { transform: scale(1) translateY(0); }
}
.nav-btn.nav-just-activated .nav-icon-filled {
    animation: navIconBounce 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

/* ==================================
   NOVOS ELEMENTOS DE DESIGN
================================== */

/* 1. AnimaÃ§Ã£o de Entrada para as Telas (Micro-interaÃ§Ãµes) */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-section {
    animation: slideFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* AnimaÃ§Ã£o para novos registros */
@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-slideIn {
    opacity: 0;
    animation: slideInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* 3. Toast Notificação Side Card */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    transform: translateX(120%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    background: rgba(18, 16, 14, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--toast-color, var(--accent));
    color: var(--text-main);
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    min-width: 280px;
    max-width: 90vw;
    overflow: hidden;
}

.toast-container.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.toast-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.toast-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--toast-color, var(--accent));
    font-weight: 800;
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
}

.toast-container.show .toast-progress {
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}


/* --- ANIMACAO DE SUCESSO PREMIUM --- */
#new-gain-animation {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(6px);
    background: radial-gradient(ellipse at 50% 40%, rgba(250, 208, 137, 0.08) 0%, rgba(0, 0, 0, 0.78) 70%);
}

.premium-success-card {
    background: linear-gradient(145deg, rgba(40, 38, 38, 0.98), rgba(24, 23, 23, 0.98));
    border: 1px solid rgba(250, 208, 137, 0.3);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 0 80px rgba(250, 208, 137, 0.08);
    border-radius: 32px;
    padding: 48px 40px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.7) translateY(60px);
    opacity: 0;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    width: min(340px, 90vw);
    overflow: visible;
    position: relative;
}

#new-gain-animation.active .premium-success-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.success-ring-container {
    width: 90px;
    height: 90px;
    position: relative;
    margin-bottom: 28px;
}

.success-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(250, 208, 137, 0.08);
}

.success-ring-progress {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: ringSpin 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ringSpin {
    0% {
        transform: rotate(0deg);
        border-top-color: var(--accent);
        border-right-color: transparent;
        border-bottom-color: transparent;
        border-left-color: transparent;
    }

    30% {
        border-right-color: var(--accent);
    }

    60% {
        border-bottom-color: var(--accent);
    }

    90% {
        border-left-color: var(--accent);
    }

    100% {
        transform: rotate(360deg);
        border-color: var(--accent);
    }
}

.success-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
    animation: checkBounce 0.6s 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}

@keyframes checkBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-20deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.25) rotate(5deg);
    }

    80% {
        transform: scale(0.92) rotate(-3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.success-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, rgba(250, 208, 137, 0.35) 0%, transparent 60%);
    opacity: 0;
    border-radius: 50%;
    animation: glowAppear 0.4s 0.7s ease-out forwards, glowBreath 2s 1.2s ease-in-out infinite alternate;
}

@keyframes glowAppear {
    to {
        opacity: 1;
    }
}

@keyframes glowBreath {
    from {
        opacity: 0.5;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1.15);
    }
}

.success-ripple {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(250, 208, 137, 0.6);
    opacity: 0;
    animation: rippleOut 1.2s 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.success-ripple-2 {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(250, 208, 137, 0.3);
    opacity: 0;
    animation: rippleOut 1.2s 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes rippleOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(2.8);
    }
}

.success-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: particleFly 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.particle:nth-child(1) {
    animation-delay: 0.65s;
    --tx: -70px;
    --ty: -80px;
    width: 7px;
    height: 7px;
}

.particle:nth-child(2) {
    animation-delay: 0.70s;
    --tx: 80px;
    --ty: -65px;
    background: rgba(250, 208, 137, 0.7);
    width: 5px;
    height: 5px;
}

.particle:nth-child(3) {
    animation-delay: 0.68s;
    --tx: -85px;
    --ty: 20px;
}

.particle:nth-child(4) {
    animation-delay: 0.72s;
    --tx: 90px;
    --ty: 30px;
    background: rgba(250, 208, 137, 0.5);
}

.particle:nth-child(5) {
    animation-delay: 0.66s;
    --tx: -40px;
    --ty: 90px;
    width: 8px;
    height: 8px;
}

.particle:nth-child(6) {
    animation-delay: 0.74s;
    --tx: 50px;
    --ty: 85px;
    background: rgba(250, 208, 137, 0.6);
}

.particle:nth-child(7) {
    animation-delay: 0.69s;
    --tx: -60px;
    --ty: -45px;
    width: 4px;
    height: 4px;
}

.particle:nth-child(8) {
    animation-delay: 0.73s;
    --tx: 65px;
    --ty: -50px;
    background: rgba(250, 208, 137, 0.8);
    width: 4px;
    height: 4px;
}

@keyframes particleFly {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

.success-text-reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: textReveal 0.6s 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-divider {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    margin: 14px auto 0;
    animation: dividerExpand 0.5s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dividerExpand {
    to {
        width: 80px;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* ============================================
   TOAST PREMIUM — Barra de progresso + Spring
   ============================================ */
.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 9999px 9999px;
    background: linear-gradient(90deg, var(--toast-color, var(--accent)), transparent);
    width: 100%;
    transform-origin: left;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* 4. Modal de Confirmação com Backdrop Blur — Spring Entry */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
    transform: scale(0.88) translateY(24px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    text-align: center;
    opacity: 0;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 5. Design de Empty State (Estado Vazio) */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0.6;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* 6. Card novo de ganho — Animação de entrada */
@keyframes cardEnter {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
        border-color: var(--accent);
        box-shadow: 0 0 20px rgba(250, 208, 137, 0.35);
    }
    60% {
        opacity: 1;
        transform: translateY(3px) scale(1.01);
        border-color: rgba(250, 208, 137, 0.5);
        box-shadow: 0 0 10px rgba(250, 208, 137, 0.2);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        border-color: transparent;
        box-shadow: none;
    }
}

.animate-cardEnter {
    animation: cardEnter 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 7. Botão deletar admin — Danger Pulse */
@keyframes dangerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
        border-color: rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
        border-color: rgba(239, 68, 68, 0.9);
    }
}

.btn-danger-confirm {
    animation: dangerPulse 1s ease-in-out infinite !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

/* ============================================ */
/* PREMIUM ANIMATIONS                          */

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }

    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
        filter: blur(4px);
    }
}

.animate-fadeOut {
    animation: modalExit 0.4s cubic-bezier(0.36, 0, 0.66, -0.56) forwards !important;
}

@keyframes cardDelete {
    0% {
        opacity: 1;
        transform: scale(1) translateX(0);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }

    30% {
        opacity: 1;
        transform: scale(0.95) translateX(-15px);
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
        background-color: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.8);
    }

    70% {
        opacity: 0;
        transform: scale(0.8) translateX(100vw);
        height: auto;
        padding: auto;
        margin-bottom: auto;
    }

    100% {
        opacity: 0;
        transform: scale(0) translateX(100vw);
        height: 0;
        padding: 0;
        margin-bottom: 0;
        border: none;
    }
}

.animate-cardDelete {
    animation: cardDelete 0.7s cubic-bezier(0.8, -0.2, 0.2, 1) forwards !important;
    overflow: hidden;
}

@keyframes overlayHide {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.05);
        filter: blur(10px);
    }
}

.animate-overlayHide {
    animation: overlayHide 0.6s cubic-bezier(0.7, 0, 0.3, 1) forwards !important;
}

@keyframes overlayShow {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(1.05);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.animate-overlayShow {
    animation: overlayShow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

@keyframes cardEditPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 208, 137, 0.7);
        border-color: var(--accent);
        transform: scale(1) translateY(0);
        background-color: rgba(250, 208, 137, 0.1);
    }

    50% {
        box-shadow: 0 10px 25px 5px rgba(250, 208, 137, 0.4);
        border-color: var(--accent);
        transform: scale(1.04) translateY(-4px);
        background-color: rgba(250, 208, 137, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(250, 208, 137, 0);
        border-color: transparent;
        transform: scale(1) translateY(0);
        background-color: transparent;
    }
}

.animate-cardEdit {
    animation: cardEditPulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    z-index: 10;
    position: relative;
}

/* Logo animada */
@keyframes logoPop {
    0% {
        transform: scale(0.6) rotate(-10deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.15) rotate(4deg);
        opacity: 1;
    }

    80% {
        transform: scale(0.95) rotate(-2deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

#app-logo-display {
    animation: logoPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ================================
   MENSAGENS DE FEEDBACK INLINE
================================ */

.login-msg-box {
    display: none;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    align-items: center;
    gap: 8px;
    animation: msgSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-msg-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.login-msg-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.login-msg-info {
    background: rgba(250, 208, 137, 0.12);
    border: 1px solid rgba(250, 208, 137, 0.3);
    color: #F5C55A;
}

#gain-error-msg {
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    animation: msgSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
        opacity: 0;
    }

    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes todayPulse {
    0%, 100% { opacity: 0.45; }
    50%       { opacity: 1; }
}

/* ================================
   ANIMAÇÃO DE LOGOUT
================================ */
@keyframes logoutRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes logoutIconGlow {
    0%, 100% { opacity: 0.15; transform: scale(0.9); }
    50%      { opacity: 0.35; transform: scale(1.1); }
}

#logout-animation {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.logout-ring-spin {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #f87171;
    border-right-color: rgba(248, 113, 113, 0.4);
    animation: logoutRingSpin 1s linear infinite;
}

.logout-icon-glow {
    background: radial-gradient(circle, rgba(248,113,113,0.4) 0%, transparent 70%);
    animation: logoutIconGlow 2s ease-in-out infinite;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-overlay-bg {
    background: radial-gradient(ellipse at 50% 30%, rgba(245,197,90,0.08) 0%, rgba(0,0,0,0.92) 70%);
}
body.light-theme .login-overlay-bg {
    background: radial-gradient(ellipse at 50% 30%, rgba(194,133,59,0.1) 0%, rgba(246,243,236,0.96) 70%);
}

@keyframes loginCardEnter {
    from { opacity: 0; transform: scale(0.94) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.login-card {
    animation: loginCardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-input {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.18);
    border-radius: 12px;
    padding: 12px 16px 12px 40px;
    color: var(--text-main);
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(250, 208, 137, 0.12);
}
.login-input::placeholder {
    color: var(--subtext);
    opacity: 0.6;
}
.login-input-icon {
    color: var(--subtext);
    opacity: 0.45;
}
.login-secondary-btn {
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.15);
    color: var(--text-main);
}
.login-secondary-btn:hover {
    background: rgba(128, 128, 128, 0.14);
}

/* ============================================
   CONNECTION BANNER
   ============================================ */
.connection-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 600;
    animation: msgSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RECORD CARDS
   ============================================ */
.record-card {
    padding: 14px 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.record-card:hover {
    border-color: rgba(250, 208, 137, 0.25);
    box-shadow: 0 0 20px rgba(250, 208, 137, 0.08);
}
.record-card-accent {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), rgba(250, 208, 137, 0.3));
    border-radius: 0 3px 3px 0;
    opacity: 0.5;
    transition: opacity 0.25s ease;
}
.record-card:hover .record-card-accent {
    opacity: 1;
}

/* ============================================
   STATUS OVERLAY
   ============================================ */
.status-overlay-bg {
    background: rgba(0, 0, 0, 0.9);
}
body.light-theme .status-overlay-bg {
    background: rgba(246, 243, 236, 0.97);
}
.status-card {
    animation: loginCardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ============================================
   PERFIL — Componentes com suporte a temas
   ============================================ */

.profile-row {
    transition: background 0.2s ease;
}
.profile-row:hover {
    background: rgba(128, 128, 128, 0.06);
}

.profile-row-border {
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.profile-row-icon {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-badge {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.15);
    color: var(--text-main);
}

.profile-avatar-border {
    border: 3px solid rgba(255, 255, 255, 0.5);
}
body.light-theme .profile-avatar-border {
    border-color: rgba(255, 255, 255, 0.8);
}

.profile-avatar-edit-btn {
    border: 2px solid var(--bg);
}

.profile-pref-border {
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}
.profile-pref-row {
    transition: background 0.15s ease;
}
.profile-pref-row:hover {
    background: rgba(128, 128, 128, 0.05);
}

/* Toggle switch — funciona em ambos os temas */
.toggle-track {
    width: 44px;
    height: 24px;
    background: rgba(128, 128, 128, 0.3);
    border-radius: 9999px;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
body.light-theme .toggle-track {
    background: rgba(0, 0, 0, 0.18);
}

/* Modal de perfil — seções internas */
.profile-modal-section {
    background: rgba(128, 128, 128, 0.07);
    border: 1px solid rgba(128, 128, 128, 0.12);
    border-radius: 14px;
    padding: 14px;
}

.profile-email-input {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.12);
    color: var(--subtext);
    cursor: not-allowed;
}

.profile-cancel-btn {
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.14);
}
.profile-cancel-btn:hover {
    background: rgba(128, 128, 128, 0.14);
}

.profile-close-btn {
    background: rgba(128, 128, 128, 0.08);
}
.profile-close-btn:hover {
    background: rgba(128, 128, 128, 0.15);
}

/* ============================================
   ADMIN PANEL — Componentes
   ============================================ */

.admin-list-header {
    background: rgba(128, 128, 128, 0.05);
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-stat-card {
    border: 1px solid rgba(128, 128, 128, 0.12);
}

.admin-user-card {
    border-radius: 14px;
    border: 1px solid rgba(128, 128, 128, 0.12);
    background: rgba(128, 128, 128, 0.04);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.admin-user-card:hover {
    border-color: rgba(249, 115, 22, 0.25);
    background: rgba(249, 115, 22, 0.02);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.06);
}

/* Status badges */
.admin-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    border-width: 1px;
    border-style: solid;
}
.admin-badge-pending  { background: rgba(234,179,8,0.1);  color: #eab308; border-color: rgba(234,179,8,0.25); }
.admin-badge-expired  { background: rgba(239,68,68,0.1);  color: #f87171; border-color: rgba(239,68,68,0.25); }
.admin-badge-active   { background: rgba(16,185,129,0.1); color: #10b981; border-color: rgba(16,185,129,0.25); }

/* Painel de validade */
.admin-expiry-panel {
    background: rgba(128, 128, 128, 0.06);
    border: 1px solid rgba(128, 128, 128, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
}

/* Input de data/hora */
.admin-date-input {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.18);
    color: var(--text-main);
    transition: border-color 0.2s ease;
}
.admin-date-input:focus {
    border-color: rgba(249, 115, 22, 0.5);
}
.admin-date-input::-webkit-calendar-picker-indicator {
    filter: opacity(0.45) invert(1);
    cursor: pointer;
}
body.light-theme .admin-date-input::-webkit-calendar-picker-indicator {
    filter: opacity(0.4);
}

/* Barra de ações do card */
.admin-card-actions {
    display: flex;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
}
.admin-action-btn {
    padding: 10px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, color 0.2s ease;
}
.admin-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.admin-action-approve {
    color: #10b981;
    background: rgba(16, 185, 129, 0.06);
    border-right: 1px solid rgba(128, 128, 128, 0.1);
}
.admin-action-approve:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
}
.admin-action-reject {
    color: #f87171;
    background: rgba(239, 68, 68, 0.06);
}
.admin-action-reject:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.14);
}
.admin-action-danger {
    color: #f87171;
    background: transparent;
}
.admin-action-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.08);
}

/* ============================================
   TEMA CLARO — OVERRIDES COMPLETOS
   ============================================ */

/* Input focus — glow quente adaptado */
body.light-theme .glass-card:has(.input-huge:focus) {
    border-color: rgba(217, 119, 6, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(217, 119, 6, 0.15), 0 0 40px rgba(217, 119, 6, 0.07);
}

/* Pill da nav bar — glow suave */
body.light-theme .nav-btn::after {
    box-shadow: 0 0 6px rgba(217, 119, 6, 0.35);
}

/* Toast Light Theme Override */
body.light-theme .toast-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--toast-color, var(--accent));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 1) inset;
    color: var(--text-main);
}
body.light-theme .toast-icon {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
body.light-theme .toast-message {
    color: var(--text-main);
}

/* Modal overlay — menos escuro */
body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.35);
}

/* Modal card — sombra correta para fundo claro */
body.light-theme .modal-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Empty state icon — visível no fundo claro */
body.light-theme .empty-icon {
    background: rgba(0, 0, 0, 0.04);
}

/* Overlay da animação de sucesso — fundo creme em vez de preto */
body.light-theme #new-gain-animation {
    background: radial-gradient(ellipse at 50% 40%, rgba(217, 119, 6, 0.1) 0%, rgba(246, 243, 236, 0.96) 65%);
}

/* Card de sucesso — versão clara */
body.light-theme .premium-success-card {
    background: linear-gradient(145deg, #FFFDF7, #FFF8EC);
    border: 1px solid rgba(217, 119, 6, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.9) inset, 0 0 50px rgba(217, 119, 6, 0.06);
}

/* Interiores dos accordions do histórico */
body.light-theme #current-month-list,
body.light-theme #past-months-list {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Interior do accordion de preferências */
body.light-theme #prefs-list {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Lista de usuários no painel admin */
body.light-theme #admin-users-list {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Cabeçalho sticky do admin */
body.light-theme #view-admin .sticky {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Badge de acesso no perfil */
body.light-theme #profile-access-badge {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Overlay de status (acesso pendente/expirado) — fundo creme */
body.light-theme #status-overlay {
    background: rgba(246, 243, 236, 0.98);
}

/* ============================================
   AVATAR ANIMADO PADRÃO — PESSOA ESTILIZADA
   ============================================ */
@keyframes avatarBreathe {
    0%, 100% { transform: scale(1) translateY(0px); }
    50%       { transform: scale(1.04) translateY(-1.5px); }
}
@keyframes avatarEyeGlow {
    0%, 100% { opacity: 0.75; }
    45%, 55% { opacity: 0; }  /* piscar */
    50%       { opacity: 0; }
    60%       { opacity: 1; filter: drop-shadow(0 0 4px #F5C55A); }
    80%, 20%  { opacity: 0.85; filter: drop-shadow(0 0 2px rgba(245,197,90,0.6)); }
}
@keyframes avatarSmileGlow {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 0.65; }
}

.avatar-svg-person   { animation: avatarBreathe 3.5s ease-in-out infinite; transform-origin: 50% 60%; }
.avatar-svg-eye      { animation: avatarEyeGlow 4s ease-in-out infinite; }
.avatar-svg-eye-r    { animation: avatarEyeGlow 4s ease-in-out 0.15s infinite; }
.avatar-svg-smile    { animation: avatarSmileGlow 3.5s ease-in-out infinite; }


@keyframes avatarRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes avatarShimmerSweep {
    0%   { transform: translateX(-150%) skewX(-20deg); }
    100% { transform: translateX(250%) skewX(-20deg); }
}

.avatar-default-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255,255,255,0.65);
    border-right-color: rgba(255,255,255,0.2);
    animation: avatarRingSpin 2.5s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.avatar-default-shimmer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.22) 50%, transparent 80%);
    animation: avatarShimmerSweep 2.8s ease-in-out 0.6s infinite;
    pointer-events: none;
    z-index: 3;
}

/* Header logo — anel e shimmer via pseudo-elementos */
#app-logo-display {
    position: relative;
}
#app-logo-display:not(.logo-has-image)::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255,255,255,0.55);
    border-right-color: rgba(255,255,255,0.18);
    animation: avatarRingSpin 2.5s linear infinite;
    pointer-events: none;
    z-index: 2;
}
#app-logo-display:not(.logo-has-image)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
    animation: avatarShimmerSweep 2.8s ease-in-out 0.6s infinite;
    pointer-events: none;
    z-index: 3;
}

/* Modal preview — mesma animação */
#modal-logo-preview {
    position: relative;
}
#modal-logo-preview:not(.logo-has-image)::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255,255,255,0.55);
    border-right-color: rgba(255,255,255,0.18);
    animation: avatarRingSpin 2.5s linear infinite;
    pointer-events: none;
    z-index: 2;
}
#modal-logo-preview:not(.logo-has-image)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
    animation: avatarShimmerSweep 2.8s ease-in-out 0.6s infinite;
    pointer-events: none;
    z-index: 3;
}

/* ============================================
   CARD REGISTRO DE GANHO
   ============================================ */
#register-gain-card .input-huge {
    font-size: 3.2rem;
    caret-color: var(--accent);
    text-align: center;
    width: 100%;
}
#register-gain-card .input-huge:focus {
    outline: none;
}

/* ============================================
   BOTÃO CONFIRMAR
   ============================================ */
@keyframes confirmIconPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.btn-confirm {
    padding: 0.65rem 1.5rem;
    border-radius: 12px !important;
    background: var(--accent);
    box-shadow: 0 3px 14px rgba(245,197,90,0.18), 0 1px 0 rgba(255,255,255,0.14) inset;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    animation: none;
}
.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(245,197,90,0.30), 0 1px 0 rgba(255,255,255,0.18) inset;
}
.btn-confirm:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 8px rgba(245,197,90,0.15);
}
.btn-confirm:active .btn-confirm-icon {
    animation: confirmIconPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-confirm-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-confirm-label {
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ============================================
   MODO FOCO
   ============================================ */
.focus-mode-bg {
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes focusIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
#focus-mode-overlay.active-focus {
    animation: focusIn 0.45s cubic-bezier(0.16,1,0.3,1);
}

/* Input no Modo Foco — cursor dourado, sem setas */
#focus-input {
    caret-color: var(--accent);
    text-align: center;
}
#focus-input:focus { outline: none; }

/* Linha decorativa pulsa sutilmente no Modo Foco */
@keyframes focusLinePulse {
    0%,100% { opacity: 0.35; }
    50%      { opacity: 0.65; }
}
#focus-mode-overlay .focus-line-pulse {
    animation: focusLinePulse 2.5s ease-in-out infinite;
}


/* ============================================
   BLOQUEIO POR PIN
   ============================================ */
.pin-lock-bg {
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
body.light-theme .pin-lock-bg {
    background: rgba(246,243,236,0.98);
}

.pin-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.18);
    background: transparent;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
body.light-theme .pin-dot {
    border-color: rgba(0,0,0,0.18);
}
.pin-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.18);
    box-shadow: 0 0 10px rgba(245,197,90,0.5);
}
.pin-dot.success {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16,185,129,0.5);
}
.pin-dot.wrong {
    background: #f87171;
    border-color: #f87171;
}

.pin-key {
    height: 62px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16,1,0.3,1);
    display: flex;
    align-items: center;
    justify-content: center;
}
body.light-theme .pin-key {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
}
.pin-key:active {
    transform: scale(0.88);
    background: rgba(245,197,90,0.18);
    border-color: rgba(245,197,90,0.3);
}
.pin-key.pin-delete { font-size: 18px; }

@keyframes pinShake {
    0%,100% { transform: translateX(0); }
    20%,60%  { transform: translateX(-10px); }
    40%,80%  { transform: translateX(10px); }
}
.pin-shake { animation: pinShake 0.45s cubic-bezier(0.36,0.07,0.19,0.97); }

@keyframes pinDotPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.pin-dot.success { animation: pinDotPop 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* Ajuste de contraste para msg info no fundo claro */
body.light-theme .login-msg-info {
    color: #9A6A2A;
    background: rgba(194, 133, 59, 0.08);
    border-color: rgba(194, 133, 59, 0.25);
}
