/* Login / register / forgot-password pages for the club. Self contained: no CDN. */

@font-face {
    font-family: "KarenSans";
    src: url(/fonts/woff2/IRANSansWeb_FaNum.woff2) format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "KarenSans";
    src: url(/fonts/woff2/IRANSansWeb_FaNum_Medium.woff2) format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "KarenSans";
    src: url(/fonts/woff2/IRANSansWeb_FaNum_Bold.woff2) format("woff2");
    font-weight: 700;
    font-display: swap;
}


/* fontawesome.min.css asks for ../webfonts (= /asset/webfonts) which does not exist;
   the real files are at /webfonts, so the faces are re-declared here. */
@font-face {
    font-family: "Font Awesome 5 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(/webfonts/fa-solid-900.woff2) format("woff2"),
    url(/webfonts/fa-solid-900.woff) format("woff");
}

@font-face {
    font-family: "Font Awesome 5 Free";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/webfonts/fa-regular-400.woff2) format("woff2"),
    url(/webfonts/fa-regular-400.woff) format("woff");
}

.auth-page .fa,
.auth-page .fas {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

.auth-page .far {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}

/* names the views use that only exist in Font Awesome 4 */
.auth-page .fa-angle-right:before { content: "\f105"; }

/* style.css sets "a { font-family: IRANSansWeb_FaNum }" but that face is never loaded on
   these pages, so every link fell back to the browser default. Declare the face from the
   files that really exist, and let links inherit the page font. */
@font-face {
    font-family: "IRANSansWeb_FaNum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/woff2/IRANSansWeb_FaNum.woff2) format("woff2"),
    url(/fonts/woff/IRANSansWeb_FaNum.woff) format("woff");
}

@font-face {
    font-family: "IRANSansWeb_FaNum";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/woff2/IRANSansWeb_FaNum_Bold.woff2) format("woff2"),
    url(/fonts/woff/IRANSansWeb_FaNum_Bold.woff) format("woff");
}

.auth-page a,
.auth-page button,
.auth-page input,
.auth-page select,
.auth-page textarea {
    font-family: inherit;
}

:root {
    --a-primary: #006666;
    --a-primary-dark: #004d4d;
    --a-soft: #e6f2f2;
    --a-accent: #f5b800;
    --a-ink: #16302f;
    --a-muted: #6b8080;
    --a-line: #e2ecec;
    --a-radius: 18px;
    --a-ease: cubic-bezier(.2, .8, .2, 1);
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto !important;
    font-family: "KarenSans", IRANSans, Tahoma, sans-serif;
    color: var(--a-ink);
    background: linear-gradient(135deg, #004d4d 0%, #006666 45%, #02abb0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    line-height: 1.9;
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: auto -200px -300px auto;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 980px;
    background: #fff;
    border-radius: var(--a-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
}

.auth-card.auth-wide {
    max-width: 1120px;
}

@media (min-width: 992px) {
    .auth-card {
        grid-template-columns: 1fr 1fr;
    }

    .auth-card.auth-wide {
        grid-template-columns: 4fr 7fr;
    }
}

/* ---- brand side ---- */
.auth-brand {
    position: relative;
    background-image: linear-gradient(135deg, rgba(0, 77, 77, .88) 0%, rgba(2, 171, 176, .80) 100%),
    url(/asset/img/varzesh.jpg);
    background-size: cover, cover;
    background-position: center, center;
    color: #fff;
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.auth-brand h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
}

.auth-brand p {
    font-size: 13.5px;
    opacity: .92;
    margin: 0;
    text-align: justify;
}

.auth-brand .auth-points {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: grid;
    gap: 8px;
}

.auth-brand .auth-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
}

.auth-brand .auth-points i {
    color: var(--a-accent);
}

.auth-brand .auth-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    min-height: 44px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff !important;
    font-size: 14px;
    text-decoration: none !important;
    transition: background-color .2s var(--a-ease);
}

.auth-brand .auth-site:hover {
    background: rgba(255, 255, 255, .14);
}

@media (max-width: 991px) {
    .auth-brand {
        order: -1;
        padding: 18px 20px;
        text-align: center;
    }

    .auth-brand p,
    .auth-brand .auth-points,
    .auth-brand .auth-site {
        display: none;
    }
}

/* ---- form side ---- */
.auth-form {
    padding: 30px 28px;
}

@media (max-width: 575px) {
    .auth-form {
        padding: 22px 18px;
    }
}

.auth-logo {
    display: block;
    width: 150px;
    margin: 0 auto 10px;
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 4px;
}

.auth-sub {
    font-size: 13px;
    color: var(--a-muted);
    text-align: center;
    margin: 0 0 20px;
}

.auth-field {
    margin-bottom: 14px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    color: var(--a-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-field .req {
    color: #c62828;
    margin-left: 3px;
}

.auth-input,
.auth-form select.auth-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--a-ink);
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 10px;
    transition: border-color .2s var(--a-ease), box-shadow .2s var(--a-ease);
    appearance: none;
}

.auth-input:focus {
    outline: none;
    border-color: var(--a-primary);
    box-shadow: 0 0 0 3px var(--a-soft);
}

.auth-input::placeholder {
    color: #aabcbc;
}

/* number inputs: no spinner, latin digits, left to right */
.auth-input[type="number"],
.auth-input[inputmode="numeric"] {
    direction: ltr;
    text-align: left;
}

.auth-input[type="number"]::-webkit-outer-spin-button,
.auth-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-pass {
    position: relative;
}

.auth-pass .auth-input {
    padding-left: 44px;
}

.auth-eye {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--a-muted);
    cursor: pointer;
    border-radius: 8px;
}

.auth-eye:hover {
    background: var(--a-soft);
    color: var(--a-primary);
}

.auth-grid {
    display: grid;
    gap: 0 14px;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .auth-grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .auth-grid .span-2 {
        grid-column: 1 / -1;
    }
}

.auth-radios {
    display: flex;
    gap: 10px;
}

.auth-radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    border: 1px solid var(--a-line);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    transition: border-color .2s var(--a-ease), background-color .2s var(--a-ease);
}

.auth-radio input {
    accent-color: var(--a-primary);
    width: 17px;
    height: 17px;
}

.auth-radio:hover {
    border-color: var(--a-primary);
    background: #f7fbfb;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    background: var(--a-primary);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s var(--a-ease), transform .15s var(--a-ease);
}

.auth-submit:hover {
    background: var(--a-primary-dark);
}

.auth-submit:active {
    transform: scale(.99);
}

.auth-links {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--a-line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13.5px;
    color: var(--a-muted);
}

.auth-links a {
    color: var(--a-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--a-muted) !important;
    text-decoration: none !important;
}

.auth-back:hover {
    color: var(--a-primary) !important;
}

.auth-note {
    background: var(--a-soft);
    color: var(--a-primary-dark);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-errors {
    background: #fdecea;
    border: 1px solid #f5c6c2;
    color: #a4231a;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
}

.auth-errors ul {
    margin: 0;
    padding-right: 18px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
