/* ===================================================================
   Gimnasio App — Login Page
   Glassmorphism card on dark gradient background
   Inspired by /socios/login design (OTP, activation callout)
   =================================================================== */

.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px 20px;
    position: relative;
    z-index: 1;
}

/* ===== Logo + Brand ===== */
.login-brand {
    text-align: center;
    margin-bottom: 20px;
    animation: loginFadeDown 0.6s ease-out;
}

.login-brand .login-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.login-brand .brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.login-brand .brand-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
    margin: 0;
}

/* ===== Glassmorphism Card ===== */
.login-card {
    width: 100%;
    max-width: 340px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 24px 22px 20px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.1);
    animation: loginFadeUp 0.5s ease-out 0.15s both;
}

.login-card h2 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px;
    text-align: center;
}

.login-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin: 0 0 18px;
}

/* ===== Form Fields ===== */
.login-field {
    margin-bottom: 12px;
}

.login-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrap .field-icon {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    color: #4682B4;
    pointer-events: none;
    z-index: 1;
}

.login-input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-input-wrap input::placeholder {
    color: rgba(255,255,255,0.3);
}

.login-input-wrap input:focus {
    border-color: rgba(70,130,180,0.6);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(70,130,180,0.15);
}

.login-input-wrap input:read-only {
    opacity: 0.85;
    cursor: default;
}

/* Check mark for validated field */
.login-input-wrap .input-check {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loginCheckPop 0.3s ease-out;
}

@keyframes loginCheckPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Toggle password visibility */
.login-input-wrap .toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.login-input-wrap .toggle-pass:hover {
    color: rgba(255,255,255,0.7);
}

/* ===== Remember me ===== */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 18px;
}

.login-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #4682B4;
    cursor: pointer;
}

.login-remember label {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    user-select: none;
}

/* ===== Error message ===== */
.login-error {
    background: rgba(220,38,38,0.92);
    border: 1px solid rgba(185,28,28,0.8);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-align: center;
}

/* ===== Submit Button ===== */
.login-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #4682B4, #3a6d96);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(70,130,180,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(70,130,180,0.45);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(70,130,180,0.3);
}

.login-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== OTP Divider ===== */
.login-otp-divider {
    display: flex;
    align-items: center;
    margin: 14px 0;
    gap: 10px;
}

.login-otp-divider::before,
.login-otp-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
}

.login-otp-divider span {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== OTP Button ===== */
.login-btn-otp {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: rgba(255,255,255,0.75);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.login-btn-otp:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

.login-btn-otp:active {
    background: rgba(255,255,255,0.12);
    transform: translateY(0);
}

/* ===== OTP Channels (Step 2 — where code was sent) ===== */
.otp-channels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}

.otp-channel {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.otp-channel svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ===== Activation Callout (compact horizontal) ===== */
.login-activation {
    margin-top: 16px;
    animation: loginFadeUp 0.5s ease-out 0.4s both;
}

.login-activation-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
    margin-bottom: 14px;
}

.login-activation-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 14px;
}

.login-activation-icon {
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.login-activation-icon svg {
    width: 22px;
    height: 22px;
}

.login-activation-text {
    flex: 1;
    min-width: 0;
}

.login-activation-text h3 {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 0 0 2px;
}

.login-activation-text p {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin: 0;
    line-height: 1.4;
}

.login-btn-activation {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: rgba(255,255,255,0.65);
    border: 1.5px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
    white-space: nowrap;
}

.login-btn-activation:hover {
    background: rgba(70,130,180,0.2);
    border-color: rgba(70,130,180,0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.login-btn-activation:active {
    background: rgba(70,130,180,0.3);
    transform: translateY(0);
}

/* ===== Footer ===== */
.login-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.3px;
    animation: loginFadeUp 0.5s ease-out 0.5s both;
}

/* ===== Animations ===== */
@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginFadeDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Layout mode ===== */
.app-container.login-mode {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app-container.login-mode .page-content {
    padding: 0;
    padding-bottom: 0;
    overflow-y: auto;
}
