/* Login page styles - Dark Theme */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000000 url('../img/background-auth-without-elements.jpg') center center / cover no-repeat;
    position: relative;
    overflow: hidden;
}

/* Background elements */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    pointer-events: none;
}

.bg-element-1 {
    bottom: -5%;
    right: -5%;
    width: 25%;
    min-width: 300px;
    height: auto;
    opacity: 1;
    z-index: 1;
}

.bg-element-2 {
    bottom: 8%;
    right: 8%;
    width: 80px;
    height: auto;
    opacity: 1;
    z-index: 5;
}

.bg-element-3 {
    top: 30%;
    left: 0;
    width: 5%;
    min-width: 75px;
    height: auto;
    opacity: 1;
    z-index: 1;
}

.login-container {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    margin: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .login-container {
        margin: 16px;
        padding: 40px 24px;
        border-radius: 20px;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    width: 280px;
    height: auto;
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1C1743;
    margin: 0;
    letter-spacing: -0.3px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4A4E51;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
    color: #1C1743;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-weight: 400;
}

.input-wrapper.has-icon input {
    padding-right: 48px;
}

.form-group input:hover {
    border-color: #D1D5DB;
    background: #FFFFFF;
}

.form-group input:focus {
    outline: none;
    border-color: #5762DF;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(87, 98, 223, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.5;
}

.btn-login {
    width: 100%;
    padding: 15px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    background: #5762DF;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    box-shadow: 0 2px 4px rgba(87, 98, 223, 0.2);
    letter-spacing: 0.3px;
}

.btn-login:hover {
    background: #4550CC;
    box-shadow: 0 4px 8px rgba(87, 98, 223, 0.3);
}

.btn-login:active {
    background: #3A42B8;
    box-shadow: 0 2px 4px rgba(87, 98, 223, 0.2);
}

.error-message {
    padding: 14px 16px;
    margin-bottom: 24px;
    background: rgba(220, 53, 69, 0.08);
    border: 1.5px solid rgba(220, 53, 69, 0.25);
    border-radius: 12px;
    color: #B91C2C;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: '⚠';
    font-size: 16px;
}

.success-message {
    padding: 14px 16px;
    margin-bottom: 24px;
    background: rgba(40, 167, 69, 0.08);
    border: 1.5px solid rgba(40, 167, 69, 0.25);
    border-radius: 12px;
    color: #1E7E34;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message::before {
    content: '✓';
    font-size: 16px;
}

.auth-footer {
    margin-top: 14px;
    text-align: center;
    padding-top: 28px;
    border-top: 1.5px solid #E5E7EB;
}

.auth-footer p {
    font-size: 14px;
    color: #4A4E51;
    margin: 0;
    font-weight: 500;
}

.auth-footer a {
    color: #5762DF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #4550CC;
    text-decoration: none;
}

.forgot-password-link {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 16px;
}

.link-button {
    background: none;
    border: none;
    color: #5762DF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    color: #4550CC;
}

.link-button.secondary {
    color: #4A4E51;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    background: #5762DF;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(87, 98, 223, 0.2);
    letter-spacing: 0.2px;
}

.btn-primary:hover {
    background: #4550CC;
    box-shadow: 0 4px 8px rgba(87, 98, 223, 0.25);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.info-message {
    padding: 14px 16px;
    margin-bottom: 24px;
    background: rgba(87, 98, 223, 0.08);
    border: 1.5px solid rgba(87, 98, 223, 0.25);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.info-message::before {
    content: 'ℹ';
    font-size: 16px;
}

.auth-view {
    display: none;
}

.auth-view.active {
    display: block;
}

.auth-view.hidden {
    display: none;
}

.auth-subtitle {
    margin-top: 8px;
    font-size: 15px;
    color: #4A4E51;
    font-weight: 500;
}

.flow-steps {
    display: flex;
    gap: 12px;
    margin: 24px 0 20px;
    flex-wrap: wrap;
}

.flow-step {
    flex: 1;
    min-width: 120px;
    background: #F4F5FB;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    transition: all 0.2s ease;
}

.flow-step-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.flow-step.active {
    border-color: #5762DF;
    background: #EEF0FF;
    color: #1C1743;
}

.flow-step.active .flow-step-index {
    background: #5762DF;
    color: #fff;
}

.flow-step.completed {
    border-color: #B0B7FF;
    color: #1C1743;
}

.flow-step.completed .flow-step-index {
    background: #B0B7FF;
    color: #1C1743;
}

.flow-message {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.flow-message[data-type="success"] {
    background: rgba(40, 167, 69, 0.1);
    color: #1E7E34;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.flow-message[data-type="error"] {
    background: rgba(220, 53, 69, 0.1);
    color: #B91C2C;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.flow-message[data-type="info"] {
    background: rgba(87, 98, 223, 0.08);
    color: #444CDA;
    border: 1px solid rgba(87, 98, 223, 0.2);
}

.forgot-step {
    display: none;
}

.forgot-step.active {
    display: block;
}

.step-hint {
    font-size: 14px;
    color: #4A4E51;
    margin-bottom: 16px;
}

.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.code-digit {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
    color: #1C1743;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-digit:focus {
    outline: none;
    border-color: #5762DF;
    box-shadow: 0 0 0 2px rgba(87, 98, 223, 0.2);
}

.link-button.tertiary {
    color: #6B7280;
    font-weight: 500;
}

.link-button.tertiary:hover {
    color: #1C1743;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.step-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.step-actions .btn-primary {
    flex: 1 1 200px;
}

.step-actions.stacked {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.step-actions.stacked > * {
    width: 100%;
}

.step-actions.stacked .btn-primary {
    flex: 0 0 auto;
    width: 100%;
}

.step-actions.stacked .link-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 600px) {
    .flow-steps {
        flex-direction: column;
    }

    .code-digit {
        width: 48px;
        height: 58px;
        font-size: 24px;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn-primary {
        width: 100%;
    }
}

