:root {
    --rayno-blue: #0d6ce2;
    --rayno-blue-dark: #0755b6;
    --rayno-ink: #101725;
    --rayno-muted: #68758a;
    --rayno-border: #dce4f0;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--rayno-ink);
    background: #07101f;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    isolation: isolate;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at 14% 18%, rgba(13, 108, 226, 0.30), transparent 30%),
        radial-gradient(circle at 86% 82%, rgba(56, 189, 248, 0.16), transparent 28%),
        linear-gradient(135deg, #060b14 0%, #0a1629 48%, #08111f 100%);
}

.login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.24;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000, transparent 86%);
    pointer-events: none;
}

.login-orb {
    position: fixed;
    z-index: -1;
    width: 360px;
    height: 360px;
    top: -165px;
    right: -120px;
    border-radius: 50%;
    border: 1px solid rgba(77, 163, 255, 0.24);
    box-shadow:
        0 0 0 54px rgba(13, 108, 226, 0.045),
        0 0 0 108px rgba(13, 108, 226, 0.02);
    pointer-events: none;
}

.login-layout {
    width: min(100%, 1120px);
    min-height: 690px;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    direction: ltr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 38px 100px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.login-showcase,
.login-panel {
    direction: rtl;
}

.login-showcase {
    position: relative;
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 16%, rgba(77, 163, 255, 0.33), transparent 32%),
        linear-gradient(150deg, #0e2a50 0%, #0b1d38 48%, #081426 100%);
}

.login-showcase::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    left: -150px;
    bottom: -155px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    box-shadow:
        0 0 0 44px rgba(255, 255, 255, 0.025),
        0 0 0 88px rgba(255, 255, 255, 0.012);
}

.showcase-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    text-align: center;
}

.showcase-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(13, 108, 226, 0.30));
}

.showcase-wordmark,
.mobile-wordmark {
    direction: ltr;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1;
}

.showcase-wordmark span {
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.showcase-wordmark span:last-child {
    color: #58a7ff;
}

.showcase-content {
    position: relative;
    z-index: 1;
    margin: auto 0;
    padding: 38px 0 26px;
    text-align: center;
}

.showcase-eyebrow,
.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: #73b7ff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.showcase-title {
    max-width: none;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: -0.35px;
    white-space: nowrap;
}

.showcase-description {
    max-width: none;
    margin: 11px 0 0;
    color: #b8c9df;
    font-size: 0.62rem;
    line-height: 1.8;
    white-space: nowrap;
}

.showcase-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.showcase-feature {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 5px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    color: #dce8f7;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.82rem;
}

.showcase-feature i {
    grid-column: 1;
    justify-self: center;
    color: #69afff;
}

.showcase-feature span {
    grid-column: 2;
    text-align: center;
}

.showcase-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a8bbd3;
    font-size: 0.8rem;
}

.login-panel {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 68px;
    background: rgba(249, 251, 255, 0.98);
}

.mobile-brand {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 28px;
    text-align: center;
}

.mobile-brand img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.mobile-wordmark span {
    color: var(--rayno-ink);
    font-size: 1.45rem;
    font-weight: 800;
}

.mobile-wordmark span:last-child {
    color: var(--rayno-blue);
}

.login-heading {
    margin-bottom: 28px;
    text-align: center;
}

.login-eyebrow {
    justify-content: center;
    color: var(--rayno-blue);
}

.login-heading h1 {
    margin: 0;
    color: var(--rayno-ink);
    font-size: 1.52rem;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.login-heading p {
    margin: 10px 0 0;
    color: var(--rayno-muted);
    font-size: 0.82rem;
    line-height: 1.8;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 13px 14px;
    border: 1px solid #f1b9bf;
    border-radius: 12px;
    color: #9f2632;
    background: #fff0f2;
    font-size: 0.86rem;
    line-height: 1.7;
}

.login-alert.is-info {
    border-color: #b7d5fb;
    color: #164f98;
    background: #edf5ff;
}

.login-field {
    margin-bottom: 18px;
}

.login-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #2b3546;
    font-size: 0.86rem;
    font-weight: 700;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: #8c98aa;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 44px;
    border: 1px solid var(--rayno-border);
    border-radius: 13px;
    outline: none;
    color: var(--rayno-ink);
    background: #ffffff;
    font-size: 0.92rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-input::placeholder {
    color: #a0a9b8;
}

.login-input:focus {
    border-color: var(--rayno-blue);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(13, 108, 226, 0.12);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #7c889a;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--rayno-blue);
    background: #edf5ff;
}

.login-options {
    display: flex;
    justify-content: flex-start;
    margin: -4px 0 20px;
}

.forgot-password-link {
    color: var(--rayno-blue);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rayno-blue), #1f83f7);
    box-shadow: 0 14px 28px rgba(13, 108, 226, 0.24);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.login-button:hover,
.login-button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(13, 108, 226, 0.30);
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.70;
    transform: none;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 16px;
    color: #98a3b2;
    font-size: 0.72rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f1;
}

.login-pwa-install-wrap[hidden] {
    display: none !important;
}

.login-pwa-install-button {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid #c5d9f4;
    border-radius: 13px;
    color: #123d72;
    background: linear-gradient(135deg, #edf5ff, #f8fbff);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.login-pwa-install-button:hover,
.login-pwa-install-button:focus-visible {
    transform: translateY(-1px);
    border-color: var(--rayno-blue);
    color: #ffffff;
    background: var(--rayno-blue);
}

.login-pwa-install-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    color: #8b96a6;
    text-align: center;
    font-size: 0.72rem;
}

.login-footer a {
    color: #607089;
    font-weight: 700;
    text-decoration: none;
    direction: ltr;
    unicode-bidi: isolate;
}

@media (max-width: 1020px) {
    .login-page {
        padding: 22px;
    }

    .login-layout {
        width: min(100%, 560px);
        min-height: auto;
        grid-template-columns: minmax(0, 1fr);
        border-radius: 26px;
    }

    .login-showcase {
        display: none;
    }

    .login-panel {
        grid-column: 1;
        padding: 45px 48px;
    }

    .mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .login-page {
        display: block;
        padding: 0;
        background: #f8fbff;
    }

    .login-orb {
        display: none;
    }

    .login-layout {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-panel {
        justify-content: flex-start;
        padding: 34px 22px 28px;
    }

    .mobile-brand {
        margin-bottom: 36px;
    }

    .login-heading {
        margin-bottom: 25px;
    }

    .login-heading h1 {
        font-size: 1.45rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
