﻿/* ============================================================
   login.css — pagina de autentificare (Index + VerificarePin)
   ============================================================ */

.er-login-page {
    min-height: calc(100vh - 200px);
    background: linear-gradient(180deg, #F8FAFC 0%, #EFF4FA 100%);
    padding: 64px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.er-login-card {
    width: 100%;
    max-width: 460px;
    background: var(--er-bg-surface);
    border: 1px solid var(--er-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    padding: 40px 36px 32px;
}

.er-login-head {
    text-align: center;
    margin-bottom: 28px;
}

.er-login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .er-login-icon .material-icons {
        font-size: 32px;
        color: var(--er-color-primary);
    }

.er-login-head h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--er-color-primary);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.er-login-head p {
    font-size: 0.92rem;
    color: var(--er-text-soft);
    line-height: 1.55;
    margin: 0;
}

    .er-login-head p strong {
        color: var(--er-text-main);
        font-weight: 700;
    }


/* CÂMPURI EMAIL */
.er-login-field {
    margin-bottom: 16px;
}

    .er-login-field label {
        display: block;
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--er-text-soft);
        margin-bottom: 6px;
    }

    .er-login-field input {
        width: 100%;
        height: 44px;
        background: var(--er-bg-surface);
        color: var(--er-text-main);
        border: 1.5px solid var(--er-border);
        border-radius: 10px;
        padding: 0 14px;
        font-family: inherit;
        font-size: 0.94rem;
        outline: none;
        box-sizing: border-box;
        transition: all 0.2s ease;
    }

        .er-login-field input:focus {
            border-color: var(--er-color-secondary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }

        .er-login-field input::placeholder {
            color: #94A3B8;
        }

        .er-login-field input.er-login-invalid {
            border-color: var(--er-color-danger);
            background: #FEF2F2;
        }

.er-login-error {
    display: none;
    margin-top: 5px;
    font-size: 0.78rem;
    color: var(--er-color-danger);
    font-weight: 600;
}

    .er-login-error.er-show {
        display: block;
    }


/* EROARE GLOBALĂ */
.er-login-global-error {
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

    .er-login-global-error .material-icons {
        font-size: 20px;
        color: var(--er-color-danger);
    }


/* BUTON SUBMIT */
.er-login-btn-submit {
    width: 100%;
    height: 48px;
    background: var(--er-color-secondary);
    color: var(--er-text-on-dark);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

    .er-login-btn-submit:hover:not(:disabled) {
        background: var(--er-color-secondary-hover);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.30);
    }

    .er-login-btn-submit:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.er-login-btn-loader {
    align-items: center;
    gap: 8px;
}

.er-login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: er-login-spin 0.8s linear infinite;
}

@keyframes er-login-spin {
    to {
        transform: rotate(360deg);
    }
}


/* FOOTER LINK */
.er-login-foot {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 0.88rem;
    color: var(--er-text-muted);
}

    .er-login-foot a {
        color: var(--er-color-secondary);
        text-decoration: none;
        font-weight: 700;
    }

        .er-login-foot a:hover {
            text-decoration: underline;
        }


/* ============================================================
   PIN BOXES (VerificarePin)
   ============================================================ */

.er-pin-field {
    margin-bottom: 18px;
}

    .er-pin-field > label {
        display: block;
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--er-text-soft);
        margin-bottom: 12px;
        text-align: center;
    }

.er-pin-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.er-pin-box {
    width: 60px;
    height: 64px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--er-color-primary);
    background: var(--er-bg-surface);
    border: 1.5px solid var(--er-border);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .er-pin-box:focus {
        border-color: var(--er-color-secondary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    .er-pin-box.er-pin-filled {
        background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
        border-color: var(--er-color-secondary);
    }

    .er-pin-box.er-pin-invalid {
        border-color: var(--er-color-danger);
        background: #FEF2F2;
        animation: er-pin-shake 0.4s;
    }

@keyframes er-pin-shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.er-pin-hint {
    text-align: center;
    font-size: 0.82rem;
    color: var(--er-text-muted);
    margin-top: 6px;
}

    .er-pin-hint strong {
        color: var(--er-color-secondary);
        font-weight: 800;
    }


/* CHECKBOX */
.er-pin-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 18px 0;
    user-select: none;
    position: relative;
}

    .er-pin-checkbox input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.er-pin-check-mark {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--er-border-strong);
    border-radius: 5px;
    background: var(--er-bg-surface);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.er-pin-checkbox input:checked + .er-pin-check-mark {
    background: var(--er-color-secondary);
    border-color: var(--er-color-secondary);
}

    .er-pin-checkbox input:checked + .er-pin-check-mark::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 2px;
        width: 5px;
        height: 10px;
        border: solid #fff;
        border-width: 0 2.5px 2.5px 0;
        transform: rotate(45deg);
    }

.er-pin-checkbox > span:last-child {
    font-size: 0.9rem;
    color: var(--er-text-main);
    font-weight: 600;
}


/* RESEND ZONE */
.er-pin-resend {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--er-border);
    text-align: center;
}

    .er-pin-resend p {
        font-size: 0.88rem;
        color: var(--er-text-muted);
        margin: 0 0 10px;
    }

        .er-pin-resend p strong {
            color: var(--er-color-primary);
            font-weight: 800;
        }

.er-pin-resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--er-bg-surface);
    color: var(--er-color-secondary);
    border: 1.5px solid var(--er-color-secondary);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .er-pin-resend-btn:hover:not(:disabled) {
        background: var(--er-color-secondary);
        color: var(--er-text-on-dark);
    }

    .er-pin-resend-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        border-color: var(--er-border);
        color: var(--er-text-muted);
    }

    .er-pin-resend-btn .material-icons {
        font-size: 16px;
    }

.er-pin-resend-info {
    font-size: 0.78rem !important;
    margin-top: 8px !important;
}

.er-pin-resend.er-pin-limit-reached .er-pin-resend-btn,
.er-pin-resend.er-pin-limit-reached .er-pin-resend-info {
    display: none;
}

.er-pin-resend.er-pin-limit-reached p#er-pin-resend-text {
    color: var(--er-color-danger);
    font-weight: 700;
}


/* RESPONSIVE */
@media (max-width: 480px) {

    .er-login-card {
        padding: 32px 22px 24px;
    }

    .er-login-head h1 {
        font-size: 1.35rem;
    }

    .er-pin-box {
        width: 52px;
        height: 60px;
        font-size: 1.4rem;
    }

    .er-pin-boxes {
        gap: 8px;
    }
}
