html, body {
    height: 100%;
    margin: 0;
}

body {
    background: linear-gradient(
        180deg,
        #020617 0%,
        #020617 60%,
        #0b1220 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: auto;
}

.login-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.06);
}

.login-card h1 {
    text-align: center;
    color: white;
    margin-bottom: 25px;
    font-size: 28px;
}

.login-header h1,
.login-header p{
    text-align: center;
}
.login-card form {
    display: flex;
    flex-direction: column;
}

.login-card label {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 15px;
}

.login-card input {
    padding: 12px;
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 14px;
}

.login-card input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
    outline: none;
}

.login-card button {
    margin-top: 28px;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.4px;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 
        0 10px 25px rgba(79,70,229,0.35),
        0 0 0 rgba(99,102,241,0);
}

.login-card button:hover {
    box-shadow: 
        0 18px 40px rgba(79,70,229,0.45),
        0 0 18px rgba(99,102,241,0.35);
}


.error {
    color: #f87171;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
}

.success {
    color: #4ade80;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
}
.contra {
    position: relative;
    width: 100%;
}

.contra input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 14px;
    box-sizing: border-box;
}

.contra .eye {
    position: absolute;
    top: 50%;
    right: 12px;
    background: transparent;
    transform: translateY(-50%);
    border: none; 
    padding: 0; 
    margin: 0; 
    width: auto; 
    height: auto; 
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    box-shadow: none; 
}
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 18px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.back-btn:hover {
    background: rgba(99,102,241,0.25);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}

.arrow {
    transform: translateX(-1px);
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    z-index: 9999;
}

.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    body {
        align-items: flex-start;
        padding: 72px 16px 24px;
    }

    .login-card {
        width: 100%;
        padding: 28px 22px;
    }

    .login-card h1 {
        font-size: 24px;
    }

    .back-btn {
        top: 14px;
        left: 14px;
    }
}
