* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    background: #ffffff;
    color: #1f1f1f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Desktop: centrado verticalmente */
body.desktop {
    align-items: center;
    padding-top: 0;
}

/* Mobile: arriba */
body.mobile {
    align-items: flex-start;
    padding-top: 0;
}

/* Fondo decorativo tipo Microsoft */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Desktop: fondo con gradiente (paso de email) */
.desktop .background {
    background: linear-gradient(135deg, #e6f0ff 0%, #f0f0f0 50%, #fff 100%);
    transition: background 0.3s ease;
}

.desktop .background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

/* Desktop: fondo con imagen (paso de password) */
.desktop.password-step-active .background {
    background: url('../img/illustration.jpg') center center / cover no-repeat;
}

.desktop.password-step-active .background::before {
    opacity: 0;
}

.desktop.password-step-active .background::after {
    opacity: 0;
}

/* Mobile: fondo blanco plano */
.mobile .background {
    background: #ffffff;
}

.container {
    width: 100%;
    max-width: 440px;
    padding: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    min-height: 350px;
}

/* Desktop: con padding y sombra */
.desktop .login-card {
    padding: 44px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Mobile: sin sombra, padding reducido */
.mobile .login-card {
    padding: 20px 16px;
    box-shadow: none;
}

.logo {
    margin-bottom: 16px;
    width: 100%;
}

.microsoft-logo {
    display: block;
    max-width: 108px;
    height: auto;
}

.bank-logo {
    display: block;
    max-width: 162px;
    height: auto;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 8px;
    line-height: 32px;
}

.input-wrapper {
    margin: 8px 0 16px 0;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 15px;
    border: none;
    border-bottom: 1px solid #605e5c;
    outline: none;
    background-color: #ffffff;
    color: #1f1f1f;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    transition: border-bottom 0.1s ease;
    line-height: 21px;
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-bottom: 1px solid #1f1f1f;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-bottom: 2px solid #0067b8;
    padding-bottom: 7px;
}

input::placeholder {
    color: #605e5c;
}

.links-container {
    margin: 16px 0;
}

.no-account {
    font-size: 13px;
    color: #1f1f1f;
    margin-bottom: 16px;
}

.link {
    color: #0067b8;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
}

.link:hover {
    text-decoration: underline;
}

.button-container {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-primary {
    background-color: #0067b8;
    color: #ffffff;
    border: 1px solid transparent;
    padding: 8px 12px;
    min-width: 108px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    transition: background-color 0.1s ease;
    outline: none;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-primary:active {
    background-color: #004578;
}

.btn-primary:focus {
    outline: 1px solid #000;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: transparent;
    color: #1f1f1f;
    border: 1px solid #8a8886;
    padding: 8px 12px;
    min-width: 108px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    transition: background-color 0.1s ease;
    outline: none;
}

.btn-secondary:hover {
    background-color: #f3f2f1;
}

.btn-secondary:active {
    background-color: #edebe9;
}

.btn-secondary:focus {
    outline: 1px solid #000;
    outline-offset: 2px;
}

/* Sign-in options button */
.signin-options {
    width: 100%;
}

.btn-options {
    background: #ffffff;
    border: 1px solid #8a8886;
    color: #1f1f1f;
    padding: 10px;
    width: 100%;
    font-size: 15px;
    cursor: pointer;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.1s ease;
}

.btn-options:hover {
    background-color: #f3f2f1;
    border-color: #605e5c;
}

.btn-options svg {
    width: 16px;
    height: 16px;
}

/* Password step styling */
.back-button {
    margin-bottom: 16px;
}

.btn-back {
    background: transparent;
    border: none;
    color: #1f1f1f;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: -8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    width: 100%;
    text-align: left;
}

.btn-back svg {
    color: #0067b8;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.btn-back:hover {
    background-color: #f3f2f1;
}

#userEmail {
    font-weight: 400;
    color: #1f1f1f;
}

/* Mobile: ajustes específicos */
.mobile .bank-logo {
    max-width: 144px;
}

.mobile input[type="text"],
.mobile input[type="password"] {
    font-size: 16px; /* Previene zoom en iOS */
}

.mobile .btn-primary,
.mobile .btn-secondary {
    font-size: 15px;
    padding: 10px 16px;
}

/* Desktop: botón secundario oculto */
.desktop .btn-secondary {
    display: none;
}

/* Desktop: elementos decorativos adicionales */
.desktop .background::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: linear-gradient(225deg, rgba(0, 120, 212, 0.02) 0%, transparent 60%);
    border-radius: 50%;
}

/* Animaciones suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de error (opcional para futuro) */
.input-error {
    border-bottom: 2px solid #e81123 !important;
}

.error-message {
    color: #e81123;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}
