* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #050810;
    background-image: url("/bg.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #172033;
}

.page {
    min-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo {
    display: block;
    width: 160px;
    height: auto;
    margin-bottom: 20px;
}

.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(220, 227, 239, 0.9);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
}

.subtitle {
    margin: 0 0 24px;
    text-align: center;
    color: #526077;
    font-size: 0.95rem;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #526077;
}

input {
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #c9d4e5;
    border-radius: 8px;
    font-size: 1rem;
}

input:focus {
    outline: 2px solid #1769d1;
    border-color: #1769d1;
}

button {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button + button {
    margin-top: 12px;
}

#password-login {
    background: #1769d1;
    color: #fff;
}

#password-login:hover {
    background: #1257ad;
}

#email-login {
    background: #eef3fb;
    color: #123d7a;
    border: 1px solid #dce3ef;
}

#email-login:hover {
    background: #e3ebf8;
}

#show-password {
    background: transparent;
    color: #123d7a;
    border: 1px solid #dce3ef;
    font-weight: 500;
}

#show-password:hover {
    background: rgba(18, 61, 122, 0.06);
}

#password-area {
    margin-top: 16px;
}

#password-area label {
    margin-top: 4px;
}

.status {
    margin-top: 18px;
    min-height: 1.25rem;
    font-size: 0.9rem;
    color: #526077;
}

.status.error {
    color: #b42318;
}

.status.ok {
    color: #0f6d3a;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 8px;
}

.card.authenticated {
    background: #ecfdf3;
    border-color: #b7e4c7;
    text-align: center;
    padding: 40px 28px;
}

.card.authenticated .subtitle {
    margin-bottom: 12px;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #0f6d3a;
    color: #fff;
    font-size: 1.75rem;
    line-height: 56px;
    font-weight: 700;
}

.success-message {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #172033;
}

.redirect-message {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: #526077;
}

.redirect-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto;
    border: 3px solid #b7e4c7;
    border-top-color: #0f6d3a;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status.waiting {
    color: #123d7a;
}

@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
    }
}
