﻿
/* =====================================================
   SILENCE
   LOGIN PAGE
===================================================== */


/* =====================================================
   1. LOGIN WRAPPER
===================================================== */

.login-page {

    direction: rtl;

    width: 100%;
    min-height: 72vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 35px 18px;

    background:

        radial-gradient(
            circle at 15% 20%,
            rgba(38,166,154,.09),
            transparent 32%
        ),

        radial-gradient(
            circle at 85% 80%,
            rgba(30,58,95,.07),
            transparent 35%
        );
}


/* =====================================================
   2. LOGIN CARD
===================================================== */

.login-card {

    width: 100%;
    max-width: 850px;

    min-height: 440px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    overflow: hidden;

    border-radius: 22px;

    background: #FFFFFF;

    border: 1px solid var(--silence-border);

    box-shadow:
        0 18px 55px rgba(24, 45, 65, .09);

    animation: loginAppear .65s ease both;
}


/* =====================================================
   3. INTRO SECTION
===================================================== */

.login-intro {

    background:
        linear-gradient(
            145deg,
            #172f4d,
            #234b62
        );

    color: #FFFFFF;

    padding: 48px 38px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    position: relative;

    overflow: hidden;
}

.login-intro::before,
.login-intro::after {

    content: "";

    position: absolute;

    border: 1px solid rgba(255,255,255,.10);

    border-radius: 50%;

    pointer-events: none;
}

.login-intro::before {

    width: 260px;
    height: 260px;

    left: -115px;
    top: -100px;
}

.login-intro::after {

    width: 190px;
    height: 190px;

    left: -80px;
    top: -65px;
}


.intro-symbol {

    font-family: Georgia, serif;

    font-size: 64px;
    line-height: 1;

    color: #71d4c5;

    margin-bottom: 28px;
}

.intro-title {

    font-size: 25px;
    font-weight: 700;

    line-height: 1.8;

    margin-bottom: 12px;
}

.intro-text {

    font-size: 13px;

    line-height: 2.3;

    color: #d1e0e8;

    max-width: 290px;
}

.intro-line {

    width: 42px;
    height: 3px;

    border-radius: 5px;

    background: #71d4c5;

    margin-top: 28px;
}


/* =====================================================
   4. FORM AREA
===================================================== */

.login-form-area {

    padding: 48px 42px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    min-width: 0;
}

.login-heading {

    color: #203b55;

    font-size: 23px;
    font-weight: 700;

    margin: 0 0 8px;
}

.login-subheading {

    color: #8996a2;

    font-size: 12px;

    margin-bottom: 32px;

    line-height: 2;
}

.login-field {
    margin-bottom: 21px;
}

.login-label {

    display: block;

    color: #455968;

    font-size: 12px;
    font-weight: 600;

    margin-bottom: 9px;
}

.login-input {

    display: block;
    text-align: center;

    width: 100%;
    height: 48px;

    border: 1px solid #dce5e9;

    border-radius: 10px;

    background: #f9fbfc;

    padding: 0 14px;

    color: #243b50;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s,
        background .2s;
}

.login-input:focus {

    border-color: #36a99c;

    background: #FFFFFF;

    box-shadow:
        0 0 0 3px rgba(54,169,156,.12);
}

.login-input::placeholder {
    color: #aab5bd;
}


/* =====================================================
   5. LOGIN BUTTON
===================================================== */

.login-button {

    width: 100%;
    min-height: 49px;

    border: none;

    border-radius: 10px;

    background:
        linear-gradient(
            100deg,
            #238f89,
            #36b3a3
        );

    color: #FFFFFF;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    margin-top: 7px;

    transition:
        transform .2s,
        box-shadow .2s,
        filter .2s;
}

.login-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(35,143,137,.22);

    filter: brightness(1.04);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:focus-visible {

    outline: 3px solid rgba(54,169,156,.3);
    outline-offset: 3px;
}


/* =====================================================
   6. ANIMATION
===================================================== */

@keyframes loginAppear {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =====================================================
   7. RESPONSIVE
===================================================== */

@media (max-width: 650px) {

    .login-page {
        padding: 20px 12px;
    }

    .login-card {

        max-width: 420px;

        grid-template-columns: 1fr;
    }

    .login-intro {

        padding: 25px 28px;

        min-height: 150px;
    }

    .intro-symbol {

        font-size: 38px;

        margin-bottom: 10px;
    }

    .intro-title {

        font-size: 19px;

        margin-bottom: 5px;
    }

    .intro-text {
        font-size: 11px;
    }

    .intro-line {
        margin-top: 14px;
    }

    .login-form-area {
        padding: 32px 27px;
    }
}


/* =====================================================
   8. ACCESSIBILITY
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .login-card {
        animation: none;
    }

    .login-input,
    .login-button {
        transition: none;
    }
}

.login-recovery-link,
.login-recovery-status {
    margin: 16px 0 0;
    font-size: 13px;
    text-align: center;
}

.login-recovery-link a {
    color: #203b55;
    text-decoration: underline;
}

.login-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}


.email-test-card {
    width: min(100%, 42rem);
    box-sizing: border-box;
    background: #fff;
    border-radius: 16px;
}

.email-test-preview {
    padding: 1rem;
    border: 1px solid #dce5e9;
    border-radius: 10px;
    background: #f9fbfc;
}


.password-reset-page,
.password-reset-page .login-button {
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}


.password-strength {
    margin-top: 8px;
    font-size: 12px;
    color: #455968;
}

.password-strength meter {
    display: block;
    width: 100%;
    height: 10px;
    margin-bottom: 4px;
}


.login-page .login-button[aria-disabled="true"] {
    opacity: .6;
    cursor: not-allowed;
}

.password-match-feedback {
    margin: 0 0 10px;
    color: #a22237;
    font-size: 13px;
}

.password-match-feedback:empty {
    display: none;
}

.login-page .login-input[aria-invalid="true"] {
    border-color: #a22237;
}

@media (prefers-reduced-motion: no-preference) {
    .password-input-shake {
        animation: password-input-shake .32s ease-in-out;
    }

    @keyframes password-input-shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        50% { transform: translateX(5px); }
        75% { transform: translateX(-3px); }
    }
}


.login-recovery-status.recovery-feedback-visible {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eaf6f3;
    color: #195a52;
}

@media (prefers-reduced-motion: no-preference) {
    .recovery-feedback-visible {
        animation: recovery-feedback-in .28s ease-out;
    }

    @keyframes recovery-feedback-in {
        from { opacity: .35; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
    }
}


.password-reset-success {
    padding: 24px;
    border: 1px solid #cce5db;
    border-radius: 16px;
    background: #edf8f3;
    text-align: center;
}

.password-reset-success-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #d4eee2;
    color: #156149;
    font-size: 26px;
}

.password-reset-success p {
    margin: 0 0 20px;
    color: #35594e;
}

.password-reset-success-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.password-recovery-heading {
    margin-bottom: 20px;
}
