* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* --- Efeito de Escuridão Total (Spotlight) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 5;
}

body.focused-mode::before {
    opacity: 1;
}

.login-container {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 10;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

h6 {
    font-size: 10px;
    font-weight: 100;
    color: #fddf47b2;
    padding: 4px 0 0 4px;
    height: 20px;
}

body.focused-mode .login-container {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

h2 { margin-bottom: 0.5rem; }
p { color: #94a3b8; margin-bottom: 2rem; font-size: 0.9rem; }

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Container específico da senha */
.password-wrapper {
    position: relative;
    overflow: hidden; 
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    transition: all 0.3s ease;
}

input {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    position: relative;
    z-index: 3;
}

.input-group:not(.password-wrapper) input {
    border: 1px solid #334155;
    background: #0f172a;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.input-group:not(.password-wrapper) input:focus {
    border-color: #3b82f6;
}

/* --- Partículas de Poeira --- */
.dust-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.password-wrapper.active .dust-container {
    opacity: 1;
}

.dust {
    position: absolute;
    background: white;
    border-radius: 50%;
    filter: blur(1px);
    animation: float-dust infinite linear;
}

/* Efeito da Lanterna */
.flashlight {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    background: radial-gradient(
        circle 75px at var(--x, 50%) var(--y, 50%), 
        rgba(253, 224, 71, 0.25) 0%, 
        transparent 100%
    );
}

.password-wrapper.active {
    border-color: #fde047;
    box-shadow: 0 0 15px rgba(253, 224, 71, 0.15);
}

.password-wrapper.active .flashlight {
    opacity: 1;
    animation: flicker 0.15s ease-in-out;
}

.password-wrapper.error {
    border-color: #ef4444;
    animation: shake 0.4s ease-in-out;
}

.password-wrapper.error .flashlight {
    background: radial-gradient(
        circle 75px at var(--x, 50%) var(--y, 50%), 
        rgba(239, 68, 68, 0.35) 0%, 
        transparent 100%
    );
}

.toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
}

.password-wrapper.active .toggle-btn { color: #fde047; }
.password-wrapper.error .toggle-btn { color: #ef4444; }

/* --- Botões e Loader --- */
.login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo para o botão de cadastro */
#btnCadastrar {
    background: #10b981;
}

#btnCadastrar:hover {
    background: #059669;
}

.login-btn:hover:not(:disabled) { 
    background: #2563eb; 
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin-right: 10px;
}

/* --- Toast de Notificação --- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.active {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

/* Link esqueceu a senha */
.forgot-link {
    display: block;
    margin-top: 1.5rem;
    color: #94b1b8;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: white;
}

/* --- Animações --- */
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float-dust {
    0% { transform: translate(0, 0); opacity: 0; }
    20% { opacity: 0.4; }
    80% { opacity: 0.4; }
    100% { transform: translate(40px, -40px); opacity: 0; }
}

@keyframes flicker {
    0% { opacity: 0; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
}



/*login--------------------*/
.strength-meter {
    height: 4px;
    width: 100%;
    background-color: #334155;
    border-radius: 2px;
    margin-top: -5px;
    margin-bottom: 10px;
    overflow: hidden;
    display: none; /* Só aparece quando o usuário começa a digitar */
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    text-align: left;
    margin-bottom: 10px;
    display: block;
}

/*mobile----------------*/
/* Ajustes para Mobile */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        width: 100%;
    }

    .login-form {
        padding: 1.5rem;
        width: 100%;
        border-radius: 15px;
    }

    h2 { font-size: 1.5rem; }

    .login-btn {
        padding: 15px; /* Botão maior para facilitar o toque */
        font-size: 1rem;
    }

    .input-group input {
        font-size: 16px; /* Evita o zoom automático do iOS ao focar no input */
    }
}




.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.stat-label { color: #94a3b8; font-size: 0.85rem; }

.chart-container {
    background: var(--card);
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
    max-width: 500px;
}

@media (max-width: 768px) {
    .chart-container { max-width: 100%; }
}