@import url('fontiran.css');

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: IRANSans, IRANSansFaNum, Tahoma, sans-serif;
}

.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    direction: rtl;
    background:
        radial-gradient(900px 420px at 10% 0%, rgba(20, 184, 166, 0.18), transparent 55%),
        linear-gradient(145deg, #0c1424 0%, #115e59 42%, #0f172a 100%);
    color: #0f172a;
}

.auth-shell {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    padding: 2rem 1.25rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.auth-brand {
    width: 100%;
    max-width: 28rem;
    text-align: center;
    color: #f8fafc;
}

.auth-brand h1 {
    margin: 0 0 0.55rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.auth-brand p {
    margin: 0 auto;
    max-width: 26rem;
    line-height: 1.9;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.95rem;
    overflow-wrap: break-word;
}

.auth-panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 22px;
    padding: 2.1rem 1.8rem 1.5rem;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
    text-align: center;
}

.auth-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.auth-card .auth-lead {
    margin: 0 auto 1.4rem;
    max-width: 22rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.8;
}

.auth-form {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.auth-field {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
}

.auth-field:focus {
    outline: none;
    border-color: #0f766e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.auth-field[disabled] {
    color: #64748b;
    background: #f1f5f9;
}

.auth-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 0 1rem;
}

.auth-link {
    color: #0f766e;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
}

.auth-link:hover {
    color: #115e59;
}

.auth-submit {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #0f766e;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.auth-submit:hover {
    background: #115e59;
}

.auth-errors {
    margin-top: 0.9rem;
    color: #b42318;
    font-size: 0.86rem;
    line-height: 1.7;
}

.auth-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-captcha {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
}

.auth-captcha-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.auth-captcha-row img {
    height: 58px;
    width: 188px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #dbe3ec;
    background: #f8fafc;
    display: block;
}

.auth-captcha-refresh {
    border: 0;
    background: transparent;
    color: #0f766e;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.auth-captcha-refresh:hover {
    color: #115e59;
}

.auth-captcha .auth-field {
    margin: 0;
}

.auth-pwa-install[hidden],
.auth-pwa-ios[hidden] {
    display: none !important;
}

.auth-pwa-install {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0.85rem auto 0;
    border: 1px solid #0f766e;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #0f766e;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.auth-pwa-install:hover {
    background: rgba(15, 118, 110, 0.08);
}

.auth-pwa-ios {
    margin: 0.75rem auto 0;
    max-width: 20rem;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.8;
}

@media (display-mode: standalone) {
    .auth-pwa-install,
    .auth-pwa-ios {
        display: none !important;
    }
}

.auth-foot {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.35rem;
    font-size: 0.82rem;
}

.auth-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translate(-50%, 12px);
    min-width: 220px;
    max-width: 90vw;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 50;
}

.auth-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.auth-toast-success {
    background: #0f766e;
}

.auth-toast-error,
.auth-toast-warning {
    background: #b42318;
}

.auth-toast-info {
    background: #1d4ed8;
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 1.25rem 0.85rem;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
        gap: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .auth-brand h1 {
        font-size: 1.2rem;
    }

    .auth-brand p {
        font-size: 0.86rem;
        line-height: 1.75;
    }

    .auth-card {
        padding: 1.4rem 1rem 1.15rem;
        border-radius: 16px;
    }

    .auth-card h2 {
        font-size: 1.15rem;
    }

    .auth-card .auth-lead {
        font-size: 0.84rem;
        margin-bottom: 1.1rem;
    }

    .auth-form {
        max-width: 100%;
    }

    .auth-field {
        font-size: 1rem;
        padding: 0.8rem 0.7rem;
    }

    .auth-captcha-row {
        flex-direction: column;
    }

    .auth-captcha-row img {
        width: min(188px, 100%);
        height: auto;
        aspect-ratio: 188 / 58;
    }
}
