@font-face {
    font-family: Vazir-Medium;
    src: url("../fonts/Vazir-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: Vazir-Medium, Tahoma, sans-serif;
    color: #1c2b22;
    background: #f3f6f2;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px 28px;
}

.auth-panel-inner {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    color: var(--theme-primary-contrast, #fff);
    background:
        radial-gradient(1200px 500px at 20% 15%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(165deg, var(--theme-primary, #81c408) 0%, var(--theme-primary-hover, #68a006) 58%, #163226 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.auth-brand::before {
    width: 280px;
    height: 280px;
    top: -80px;
    inset-inline-end: -60px;
}

.auth-brand::after {
    width: 180px;
    height: 180px;
    bottom: 40px;
    inset-inline-start: -40px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 360px;
    text-align: center;
}

.auth-brand-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 22px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.auth-brand-name {
    margin: 22px 0 8px;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.5;
}

.auth-brand-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.9;
    opacity: 0.92;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.auth-mobile-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(22, 50, 38, 0.08);
}

.auth-mobile-brand span {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1c2b22;
}

.auth-card {
    background: #fff;
    border: 1px solid #e4ebe3;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(28, 43, 34, 0.08);
    padding: 28px 26px 24px;
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1 {
    margin: 0 0 8px;
    font-size: 1.45rem;
    font-weight: 800;
    color: #15241c;
}

.auth-heading p {
    margin: 0;
    color: #5b6b62;
    font-size: 0.92rem;
    line-height: 1.85;
}

.auth-steps {
    display: flex;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.auth-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.auth-step-index {
    width: 100%;
    height: 4px;
    border-radius: 99px;
    background: #e4ebe3;
}

.auth-step.is-current .auth-step-index,
.auth-step.is-done .auth-step-index {
    background: var(--theme-primary, #81c408);
}

.auth-step-label {
    font-size: 0.72rem;
    color: #7a8a81;
    text-align: center;
    line-height: 1.4;
}

.auth-step.is-current .auth-step-label {
    color: #1c2b22;
    font-weight: 700;
}

.auth-status {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
    font-size: 0.88rem;
    line-height: 1.7;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: #31443a;
}

.auth-input {
    width: 100%;
    height: 48px;
    border: 1px solid #d5dfd6;
    border-radius: 12px;
    background: #fbfcfb;
    padding: 0 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #15241c;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    box-sizing: border-box;
}

.auth-input:hover {
    border-color: #c3d0c5;
}

.auth-input:focus {
    background: #fff;
    border-color: var(--theme-primary, #81c408);
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb, 129, 196, 8), 0.18);
}

.auth-input[dir="ltr"] {
    text-align: left;
    letter-spacing: 0.04em;
}

.auth-input.is-code {
    text-align: center;
    font-size: 1.35rem;
    letter-spacing: 0.42em;
    font-weight: 700;
}

.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-inline-end: 48px;
}

.auth-password-toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #5b6b62;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: #eef4ec;
    color: #15241c;
    outline: none;
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #6b7b72;
    line-height: 1.6;
}

.auth-field ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #b42318;
    font-size: 0.8rem;
    line-height: 1.6;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: #3f5148;
    user-select: none;
}

.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--theme-primary, #81c408);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.auth-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--theme-primary, #81c408);
    color: var(--theme-primary-contrast, #fff);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    background: var(--theme-primary-hover, #68a006);
    outline: none;
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 0.84rem;
}

.auth-links a,
.auth-back {
    color: #3d5348;
    text-decoration: none;
    font-weight: 700;
}

.auth-links a:hover,
.auth-back:hover {
    color: var(--theme-primary-hover, #68a006);
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.78rem;
    color: #7a8a81;
}

.auth-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: #4d5f56;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
}

.auth-home:hover {
    color: var(--theme-primary-hover, #68a006);
}

.auth-meta {
    margin: 0 0 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--theme-primary-soft, #f3f8e8);
    color: #31443a;
    font-size: 0.84rem;
}

.auth-admin-wrap .auth-password .form-control {
    padding-inline-end: 48px;
}

.auth-admin-wrap .auth-password-toggle {
    color: #64748b;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 920px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-mobile-brand {
        display: flex;
    }

    .auth-panel {
        padding: 22px 16px 24px;
    }

    .auth-card {
        padding: 22px 18px 20px;
    }
}
