:root {
    --ht-bg: #f5ecdf;
    --ht-surface: #fffaf3;
    --ht-surface-muted: #fff7ec;
    --ht-primary: #8f0e1a;
    --ht-primary-deep: #5d0710;
    --ht-accent: #d9ad72;
    --ht-border: #eadfce;
    --ht-text: #2a0710;
    --ht-text-muted: #7d6f68;
    --ht-danger: #b71923;
    --ht-success: #2d8061;
    --ht-shadow: 0 32px 80px rgba(42, 7, 16, .18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.ht-login-body {
    min-height: 100%;
    margin: 0;
}

body.ht-login-body {
    color: var(--ht-text);
    background:
        radial-gradient(circle at 8% 10%, rgba(163, 14, 123, .12), transparent 31rem),
        radial-gradient(circle at 92% 88%, rgba(143, 14, 26, .14), transparent 34rem),
        var(--ht-bg);
    font-family: Vazirmatn, IRANSansX, Tahoma, Arial, sans-serif;
    line-height: 1.65;
    direction: rtl;
}

.ht-login-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 40px 24px 22px;
    overflow: hidden;
    isolation: isolate;
    flex-direction: column;
    justify-content: center;
}

.ht-glow {
    position: absolute;
    z-index: -1;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(5px);
    pointer-events: none;
}

.ht-glow-one {
    top: -15rem;
    right: -9rem;
    background: rgba(143, 14, 26, .13);
}

.ht-glow-two {
    bottom: -17rem;
    left: -8rem;
    background: rgba(163, 14, 123, .11);
}

.ht-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(430px, .94fr);
    width: min(1180px, 100%);
    min-height: 680px;
    margin: auto;
    border: 1px solid rgba(143, 14, 26, .12);
    border-radius: 32px;
    overflow: hidden;
    background: var(--ht-surface);
    box-shadow: var(--ht-shadow);
}

.ht-brand-panel {
    position: relative;
    display: flex;
    padding: 48px 52px 42px;
    overflow: hidden;
    color: #fffaf3;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 45%),
        linear-gradient(150deg, #2a0710 0%, #5d0710 54%, #8f0e1a 100%);
    flex-direction: column;
}

.ht-brand-panel::before,
.ht-brand-panel::after {
    position: absolute;
    content: '';
    border: 1px solid rgba(255, 250, 243, .13);
    border-radius: 50%;
}

.ht-brand-panel::before {
    width: 28rem;
    height: 28rem;
    left: -15rem;
    bottom: -14rem;
}

.ht-brand-panel::after {
    width: 16rem;
    height: 16rem;
    left: -8rem;
    bottom: -8rem;
}

.ht-brand-top,
.ht-feature-row,
.ht-brand-copy,
.ht-ticket-scene {
    position: relative;
    z-index: 1;
}

.ht-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ht-logo-link {
    display: inline-flex;
    text-decoration: none;
}

.ht-logo-frame {
    display: flex;
    width: 132px;
    height: 50px;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    background: #fffaf3;
}

.ht-logo-frame img,
.ht-mobile-brand img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ht-trust-pill {
    display: inline-flex;
    min-height: 36px;
    padding: 7px 13px;
    align-items: center;
    gap: 8px;
    color: rgba(255, 250, 243, .86);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    font-size: 12px;
    white-space: nowrap;
}

.ht-trust-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6ed6a9;
    box-shadow: 0 0 0 5px rgba(110, 214, 169, .12);
}

.ht-brand-copy {
    margin-top: 68px;
}

.ht-kicker {
    color: #e8c99f;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
}

.ht-brand-copy h1 {
    margin: 17px 0 18px;
    font-size: clamp(36px, 4.2vw, 58px);
    font-weight: 850;
    line-height: 1.23;
    letter-spacing: -.035em;
}

.ht-brand-copy h1 span {
    color: #e4bc85;
}

.ht-brand-copy p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 250, 243, .72);
    font-size: 15px;
    line-height: 1.9;
}

.ht-ticket-scene {
    position: relative;
    width: 380px;
    max-width: 86%;
    height: 156px;
    margin: 46px auto 22px;
}

.ht-ticket {
    position: absolute;
    display: flex;
    width: 270px;
    height: 122px;
    padding: 20px 24px;
    border-radius: 18px;
    flex-direction: column;
}

.ht-ticket::before,
.ht-ticket::after {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    content: '';
    border-radius: 50%;
    transform: translateY(-50%);
}

.ht-ticket::before { right: -10px; }
.ht-ticket::after { left: -10px; }

.ht-ticket-back {
    top: 2px;
    left: 6px;
    color: rgba(255, 250, 243, .68);
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .075);
    transform: rotate(-7deg);
}

.ht-ticket-back::before,
.ht-ticket-back::after { background: #6b0a16; }

.ht-ticket-front {
    right: 8px;
    bottom: 0;
    color: var(--ht-text);
    background: #fff7ec;
    box-shadow: 0 22px 45px rgba(20, 0, 5, .24);
    transform: rotate(4deg);
}

.ht-ticket-front::before,
.ht-ticket-front::after { background: #76101b; }

.ht-ticket-label,
.ht-ticket-code,
.ht-ticket-subtitle {
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
}

.ht-ticket-line {
    display: block;
    height: 6px;
    margin-top: 13px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .18);
}

.ht-line-long { width: 82%; }
.ht-line-medium { width: 56%; margin-top: 9px; }
.ht-ticket-code { margin-top: auto; }

.ht-ticket-mark {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    color: var(--ht-primary);
    border-radius: 10px;
    background: rgba(143, 14, 26, .09);
    place-items: center;
}

.ht-ticket-mark svg { width: 20px; height: 20px; }
.ht-ticket-title { font-size: 14px; font-weight: 800; }
.ht-ticket-subtitle { margin-top: 3px; color: #8a7a70; }

.ht-feature-row {
    display: flex;
    margin-top: auto;
    padding-top: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.ht-feature-row span {
    position: relative;
    padding-right: 17px;
    color: rgba(255, 250, 243, .72);
    font-size: 11px;
}

.ht-feature-row span::before {
    position: absolute;
    top: 50%;
    right: 0;
    width: 7px;
    height: 7px;
    content: '';
    border: 2px solid #e4bc85;
    border-radius: 50%;
    transform: translateY(-50%);
}

.ht-form-panel {
    display: flex;
    padding: 54px 48px;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(255, 250, 243, .93), rgba(255, 250, 243, .93)),
        repeating-linear-gradient(45deg, rgba(143, 14, 26, .025) 0 1px, transparent 1px 12px);
}

.ht-form-wrap {
    width: min(420px, 100%);
}

.ht-mobile-brand { display: none; }

.ht-domain {
    display: block;
    margin-bottom: 27px;
    color: #9a8b83;
    font-family: Arial, sans-serif;
    font-size: 11px;
    letter-spacing: .08em;
    text-align: left;
}

.ht-form-head h2 {
    margin: 0;
    color: var(--ht-text);
    font-size: 29px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.ht-form-head p {
    margin: 9px 0 30px;
    color: var(--ht-text-muted);
    font-size: 14px;
}

.ht-login-form { margin: 0; }

.ht-field { margin-bottom: 19px; }

.ht-label {
    display: block;
    margin-bottom: 8px;
    color: #4d3334;
    font-size: 12px;
    font-weight: 750;
}

.ht-input-shell { position: relative; }

.ht-input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 46px 0 48px;
    color: var(--ht-text);
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    outline: none;
    background: #fff;
    box-shadow: 0 1px 0 rgba(42, 7, 16, .03);
    font: inherit;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.ht-select { padding: 0 16px; }

.ht-input::placeholder { color: #b0a29a; }

.ht-input:hover { border-color: #d5c3ad; }

.ht-input:focus {
    border-color: var(--ht-primary);
    background: #fffdf9;
    box-shadow: 0 0 0 4px rgba(143, 14, 26, .09);
}

.ht-field-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    display: grid;
    width: 20px;
    height: 20px;
    color: #9a7774;
    pointer-events: none;
    transform: translateY(-50%);
    place-items: center;
}

.ht-field-icon svg { width: 20px; height: 20px; }

.ht-pass-toggle {
    position: absolute;
    top: 50%;
    left: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 7px;
    color: #8d7b74;
    border: 0;
    border-radius: 9px;
    outline: none;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    place-items: center;
}

.ht-pass-toggle:hover,
.ht-pass-toggle:focus-visible {
    color: var(--ht-primary);
    background: rgba(143, 14, 26, .07);
}

.ht-pass-toggle svg { width: 19px; height: 19px; }
.ht-eye-off { display: none; }
.ht-pass-toggle.is-visible .ht-eye-on { display: none; }
.ht-pass-toggle.is-visible .ht-eye-off { display: block; }

.ht-error,
.help-block {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    color: var(--ht-danger);
    font-size: 11px;
}

.ht-field.has-error .ht-input,
.has-error .ht-input {
    border-color: rgba(183, 25, 35, .65);
    box-shadow: 0 0 0 3px rgba(183, 25, 35, .07);
}

.ht-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    color: #8a111b;
    border: 1px solid rgba(183, 25, 35, .16);
    border-radius: 12px;
    background: rgba(183, 25, 35, .065);
    font-size: 12px;
    list-style-position: inside;
}

.ht-alert:empty { display: none; }

.ht-alert ul {
    margin: 0;
    padding-right: 17px;
}

.ht-options {
    display: flex;
    min-height: 24px;
    margin: 2px 0 20px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ht-options a {
    color: var(--ht-primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ht-options a:hover,
.ht-options a:focus-visible { text-decoration: underline; }

.ht-submit {
    display: flex;
    width: 100%;
    height: 56px;
    padding: 0 20px;
    color: #fffaf3;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #8f0e1a, #a30e45);
    box-shadow: 0 15px 30px rgba(143, 14, 26, .22);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 11px;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ht-submit svg {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

.ht-submit:hover,
.ht-submit:focus-visible {
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 18px 35px rgba(143, 14, 26, .28);
    transform: translateY(-1px);
}

.ht-submit:active { transform: translateY(0); }

.ht-submit:disabled {
    cursor: wait;
    filter: grayscale(.25);
    opacity: .75;
}

.ht-security {
    display: flex;
    margin-top: 22px;
    color: #8a7a70;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.ht-security svg {
    width: 17px;
    height: 17px;
    color: var(--ht-success);
}

.ht-footer {
    display: flex;
    width: min(1180px, 100%);
    min-height: 30px;
    margin: 14px auto 0;
    padding: 0 10px;
    color: #8f7f77;
    font-size: 11px;
    align-items: center;
    justify-content: space-between;
}

.ht-footer a {
    color: #6f5b55;
    text-decoration: none;
}

.ht-footer a:hover,
.ht-footer a:focus-visible { color: var(--ht-primary); }

@media (max-width: 980px) {
    .ht-login-page { padding: 24px 18px 16px; }

    .ht-shell {
        grid-template-columns: 1fr;
        width: min(660px, 100%);
        min-height: 0;
        border-radius: 26px;
    }

    .ht-brand-panel {
        min-height: 240px;
        padding: 30px 34px;
    }

    .ht-brand-copy { margin-top: 30px; }
    .ht-brand-copy h1 { margin: 10px 0 12px; font-size: 34px; }
    .ht-brand-copy p { max-width: 520px; }
    .ht-ticket-scene { display: none; }
    .ht-feature-row { margin-top: 24px; padding-top: 0; }
    .ht-form-panel { padding: 42px 34px 46px; }
    .ht-footer { width: min(660px, 100%); }
}

@media (max-width: 620px) {
    .ht-login-page {
        display: block;
        padding: 0;
        background: var(--ht-surface);
    }

    .ht-shell {
        display: block;
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ht-brand-panel {
        min-height: 172px;
        padding: 24px 22px;
        border-radius: 0 0 28px 28px;
    }

    .ht-logo-frame { width: 105px; height: 42px; }
    .ht-trust-pill { min-height: 32px; padding: 5px 10px; font-size: 10px; }
    .ht-brand-copy { margin-top: 23px; }
    .ht-kicker { font-size: 9px; }
    .ht-brand-copy h1 { margin: 8px 0 0; font-size: 27px; line-height: 1.3; }
    .ht-brand-copy h1 br { display: none; }
    .ht-brand-copy p,
    .ht-feature-row { display: none; }
    .ht-form-panel { padding: 34px 22px 40px; background: var(--ht-surface); }
    .ht-domain { margin-bottom: 20px; }
    .ht-form-head h2 { font-size: 25px; }
    .ht-form-head p { margin-bottom: 26px; }
    .ht-input { height: 52px; }
    .ht-submit { height: 54px; }
    .ht-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
