﻿/* =========================================================
   Y.A.N Taha - Shared authentication screens
   Login / Forget Password / Reset Password / 2FA / Denied
========================================================= */

:root {
    --auth-primary: var(--bs-primary, #0d6efd);
    --auth-primary-rgb: 13, 110, 253;
    --auth-title: #172b4d;
    --auth-text: #536273;
    --auth-muted: #7a869a;
    --auth-border: #dfe3e8;
    --auth-background: #f4f7fb;
    --auth-card-background: #ffffff;
    --auth-danger: #b42332;
    --auth-danger-background: #fff1f2;
    --auth-danger-border: #fecdd3;
    --auth-success: #137333;
    --auth-success-background: #edf9f0;
    --auth-success-border: #b7e4c2;
    --auth-warning: #9a6700;
    --auth-warning-background: #fff8df;
    --auth-warning-border: #f6dc8d;
    --auth-radius: 14px;
    --auth-card-radius: 24px;
    --auth-transition: all .2s ease;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: "Heebo", Arial, sans-serif;
}

body,
button,
input,
select,
textarea {
    font-family: "Heebo", Arial, sans-serif;
}

body {
    background: radial-gradient( circle at 15% 10%, rgba(var(--auth-primary-rgb), .08), transparent 28rem ), radial-gradient( circle at 90% 90%, rgba(var(--auth-primary-rgb), .06), transparent 30rem ), var(--auth-background);
}

/* =========================================================
   Page layout
========================================================= */

.auth-page,
.auth-page input,
.auth-page button,
.auth-page a,
.auth-page label {
    font-family: "Heebo", Arial, sans-serif;
}

.auth-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2.5rem 1rem;
    direction: rtl;
}

    .auth-page::before,
    .auth-page::after {
        position: absolute;
        content: "";
        border-radius: 50%;
        pointer-events: none;
    }

    .auth-page::before {
        top: -180px;
        right: -180px;
        width: 420px;
        height: 420px;
        background: rgba(var(--auth-primary-rgb), .055);
    }

    .auth-page::after {
        bottom: -220px;
        left: -180px;
        width: 480px;
        height: 480px;
        background: rgba(var(--auth-primary-rgb), .04);
    }

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

/* =========================================================
   Branding
========================================================= */

.auth-brand {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-logo-wrapper {
    width: 155px;
    height: 105px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
}

.auth-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-title {
    margin: 0;
    color: var(--auth-title);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.45;
}

.auth-brand-description {
    max-width: 390px;
    margin: .45rem auto 0;
    color: var(--auth-muted);
    font-size: .9rem;
    line-height: 1.6;
}

/* =========================================================
   Card
========================================================= */

.auth-card {
    overflow: hidden;
    background: var(--auth-card-background);
    border: 1px solid rgba(23, 43, 77, .075);
    border-radius: var(--auth-card-radius);
    box-shadow: 0 24px 70px rgba(15, 39, 73, .12), 0 4px 14px rgba(15, 39, 73, .04);
}

.auth-card-header {
    padding: 1.8rem 2rem 1rem;
    text-align: center;
}

.auth-card-body {
    padding: 1.2rem 2rem 2rem;
}

.auth-header-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .85rem;
    border-radius: 18px;
    background: rgba(var(--auth-primary-rgb), .1);
    color: var(--auth-primary);
    font-size: 1.55rem;
}

    .auth-header-icon.auth-header-icon-danger {
        background: rgba(220, 53, 69, .1);
        color: #dc3545;
    }

    .auth-header-icon.auth-header-icon-warning {
        background: rgba(255, 193, 7, .14);
        color: #b58100;
    }

.auth-card-title {
    margin: 0;
    color: var(--auth-title);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.4;
}

.auth-card-description {
    max-width: 370px;
    margin: .45rem auto 0;
    color: var(--auth-muted);
    font-size: .9rem;
    line-height: 1.6;
}

/* =========================================================
   Alerts and validation
========================================================= */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: 1.25rem;
    padding: .9rem 1rem;
    border: 1px solid var(--auth-danger-border);
    border-radius: 13px;
    background: var(--auth-danger-background);
    color: var(--auth-danger);
    font-size: .86rem;
    line-height: 1.6;
}

    .auth-alert i {
        margin-top: .15rem;
        flex-shrink: 0;
        font-size: 1rem;
    }

.auth-alert-success {
    border-color: var(--auth-success-border);
    background: var(--auth-success-background);
    color: var(--auth-success);
}

.auth-alert-warning {
    border-color: var(--auth-warning-border);
    background: var(--auth-warning-background);
    color: var(--auth-warning);
}

.auth-alert p,
.auth-alert div {
    margin: 0;
}

    .auth-alert div + div {
        margin-top: .2rem;
    }

.validation-summary-valid {
    display: none;
}

.field-validation-valid {
    display: none;
}

.field-validation-error {
    display: block;
    margin-top: .4rem;
    color: #dc3545;
    font-size: .8rem;
    font-weight: 700;
}

.input-validation-error {
    border-color: #dc3545 !important;
    background-color: #fffafb !important;
}

    .input-validation-error:focus {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 .22rem rgba(220, 53, 69, .1) !important;
    }

/* =========================================================
   Form fields
========================================================= */

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-label {
    display: block;
    margin-bottom: .45rem;
    color: #344563;
    font-size: .87rem;
    font-weight: 800;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: .75rem 2.9rem .75rem 3rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #fff;
    color: var(--auth-title);
    font-size: .95rem;
    text-align: right;
    outline: none;
    transition: var(--auth-transition);
}

    .auth-input::placeholder {
        color: #a3adba;
    }

    .auth-input:hover {
        border-color: #b7c1cd;
    }

    .auth-input:focus {
        border-color: var(--auth-primary);
        background: #fff;
        box-shadow: 0 0 0 .22rem rgba(var(--auth-primary-rgb), .11);
    }

.auth-input-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    z-index: 2;
    color: #8c98a8;
    font-size: 1rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

/* =========================================================
   Password visibility button
========================================================= */

.auth-password-toggle {
    position: absolute;
    top: 50%;
    left: .55rem;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #758195;
    font-size: 1rem;
    transform: translateY(-50%);
    transition: var(--auth-transition);
}

    .auth-password-toggle:hover {
        background: #f1f4f8;
        color: var(--auth-primary);
    }

    .auth-password-toggle:focus {
        outline: none;
        background: rgba(var(--auth-primary-rgb), .08);
        color: var(--auth-primary);
        box-shadow: 0 0 0 .18rem rgba(var(--auth-primary-rgb), .1);
    }

/* =========================================================
   OTP
========================================================= */

.auth-otp-input {
    min-height: 62px;
    padding-right: 1rem;
    padding-left: 1rem;
    text-align: center;
    direction: ltr;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: .65rem;
}

.auth-otp-hint {
    margin: .45rem 0 0;
    color: var(--auth-muted);
    font-size: .78rem;
    text-align: center;
}

/* =========================================================
   Remember me and links
========================================================= */

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .2rem 0 1.3rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: var(--auth-text);
    font-size: .86rem;
    cursor: pointer;
    user-select: none;
}

    .auth-checkbox input {
        width: 17px;
        height: 17px;
        margin: 0;
        accent-color: var(--auth-primary);
        cursor: pointer;
    }

.auth-link {
    color: var(--auth-primary);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
    transition: color .2s ease;
}

    .auth-link:hover {
        color: #0a58ca;
        text-decoration: underline;
    }

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

/* =========================================================
   Buttons
========================================================= */

.auth-submit {
    width: 100%;
    min-height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: var(--auth-radius);
    font-size: .98rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(var(--auth-primary-rgb), .2);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .auth-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(var(--auth-primary-rgb), .25);
    }

    .auth-submit:active {
        transform: translateY(0);
    }

    .auth-submit:disabled {
        transform: none;
        opacity: .75;
        cursor: not-allowed;
    }

.auth-button-row {
    display: flex;
    gap: .75rem;
}

    .auth-button-row .btn {
        flex: 1;
        min-height: 49px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .45rem;
        border-radius: 13px;
        font-size: .9rem;
        font-weight: 800;
    }

.auth-outline-button {
    border: 1px solid var(--auth-border);
    background: #fff;
    color: var(--auth-text);
}

    .auth-outline-button:hover {
        border-color: rgba(var(--auth-primary-rgb), .35);
        background: rgba(var(--auth-primary-rgb), .04);
        color: var(--auth-primary);
    }

/* =========================================================
   Bottom sections
========================================================= */

.auth-back-link {
    margin-top: 1.15rem;
    text-align: center;
}

.auth-support {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #edf0f3;
    color: var(--auth-muted);
    text-align: center;
    font-size: .82rem;
    line-height: 1.75;
}

    .auth-support a {
        display: inline-block;
        color: #344563;
        font-weight: 800;
        text-decoration: none;
        direction: ltr;
    }

        .auth-support a:hover {
            color: var(--auth-primary);
        }

.auth-footer {
    margin-top: 1.25rem;
    color: #909baa;
    text-align: center;
    font-size: .75rem;
    line-height: 1.6;
}

/* =========================================================
   Access denied
========================================================= */

.auth-status-code {
    display: block;
    margin-bottom: .45rem;
    color: #dc3545;
    font-size: 3rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: .08rem;
}

.auth-denied-message {
    margin: 0 0 1.4rem;
    color: var(--auth-muted);
    font-size: .9rem;
    line-height: 1.7;
    text-align: center;
}

.auth-denied-note {
    margin-top: 1.3rem;
    padding-top: 1.15rem;
    border-top: 1px solid #edf0f3;
    color: var(--auth-muted);
    font-size: .8rem;
    line-height: 1.7;
    text-align: center;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 576px) {
    .auth-page {
        align-items: flex-start;
        padding: 1.35rem .8rem;
    }

        .auth-page::before,
        .auth-page::after {
            opacity: .65;
        }

    .auth-brand {
        margin-bottom: 1.15rem;
    }

    .auth-logo-wrapper {
        width: 135px;
        height: 88px;
        margin-bottom: .45rem;
    }

    .auth-brand-title {
        font-size: 1.25rem;
    }

    .auth-brand-description {
        font-size: .82rem;
    }

    .auth-card {
        border-radius: 19px;
    }

    .auth-card-header {
        padding: 1.4rem 1.2rem .75rem;
    }

    .auth-card-body {
        padding: 1rem 1.2rem 1.4rem;
    }

    .auth-header-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.35rem;
    }

    .auth-card-title {
        font-size: 1.18rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: .7rem;
    }

    .auth-button-row {
        flex-direction: column;
    }

    .auth-status-code {
        font-size: 2.6rem;
    }
}

@media (max-height: 700px) and (min-width: 577px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .auth-brand {
        margin-bottom: 1rem;
    }

    .auth-logo-wrapper {
        width: 130px;
        height: 82px;
        margin-bottom: .35rem;
    }
}
