:root {
    --auth-brand: #3A9A9A;
    --auth-brand-hover: #2f8585;
    --auth-brand-light: rgba(58, 154, 154, 0.12);
    --auth-text: #1f2937;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-radius: 12px;
    --auth-shadow: 0 16px 48px rgba(58, 154, 154, 0.14);
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(58, 154, 154, 0.08), transparent 42%),
        radial-gradient(circle at 80% 80%, rgba(58, 154, 154, 0.06), transparent 38%),
        linear-gradient(165deg, #eef7f7 0%, #f8fafb 50%, #edf4f4 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-shell__inner {
    width: 100%;
    max-width: 420px;
}

.auth-version {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--auth-muted);
    opacity: 0.9;
    user-select: none;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(58, 154, 154, 0.1);
    padding: 2rem 2rem 2.25rem;
}

.auth-card__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card__logo,
.logo-login {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.auth-card__logo img,
.logo-login img {
    max-height: 64px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.auth-card__title,
.title-login h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--auth-text);
    margin: 0 0 0.35rem;
}

.auth-card__subtitle {
    font-size: 0.875rem;
    color: var(--auth-muted);
    margin: 0;
    line-height: 1.6;
}

.title-login {
    background: transparent;
    margin: 0 0 1.5rem;
    padding: 0;
    position: static;
    text-align: center;
}

.login_form {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
}

.auth-field__control {
    position: relative;
}

.auth-field__icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.auth-field__input,
.login_form input.form-control {
    width: 100%;
    height: 48px;
    padding: 0.625rem 2.75rem 0.625rem 2.5rem;
    font-size: 0.9375rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius) !important;
    background: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field__input:focus,
.login_form input.form-control:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 3px var(--auth-brand-light);
    outline: none;
}

.auth-field__input::placeholder {
    color: #9ca3af;
}

.auth-field__toggle,
.login_form [data-show-password] {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    cursor: pointer;
    z-index: 1;
    padding: 4px;
    line-height: 1;
}

.auth-field__toggle:hover,
.login_form [data-show-password]:hover {
    color: var(--auth-brand);
}

.auth-form__submit,
.login_form .auth-form__submit {
    margin-top: 0.5rem;
    height: 48px;
    border: none !important;
    border-radius: var(--auth-radius) !important;
    background: var(--auth-brand) !important;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.auth-form__submit:hover:not(:disabled),
.login_form .auth-form__submit:hover:not(:disabled) {
    background: var(--auth-brand-hover) !important;
}

.auth-form__submit:active:not(:disabled),
.login_form .auth-form__submit:active:not(:disabled) {
    transform: scale(0.99);
}

.auth-form__submit .indicator-label,
.login_form .auth-form__submit .indicator-label {
    color: #fff !important;
}

.auth-form__submit .indicator-progress,
.login_form .auth-form__submit .indicator-progress {
    color: #fff !important;
}

.auth-form__logout,
.login_form .auth-form__logout {
    margin-top: 0.625rem;
    height: auto;
    min-height: 0;
    padding: 0.5rem 0.75rem;
    border: none !important;
    border-radius: var(--auth-radius) !important;
    background: transparent !important;
    color: var(--auth-muted) !important;
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: none !important;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-form__logout:hover:not(:disabled),
.login_form .auth-form__logout:hover:not(:disabled) {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.auth-form__logout .indicator-label,
.login_form .auth-form__logout .indicator-label {
    color: inherit !important;
}

.auth-form__logout .indicator-progress,
.login_form .auth-form__logout .indicator-progress {
    color: inherit !important;
}

.auth-field__control--with-generate .auth-field__input {
    padding-left: 4.5rem;
}

.auth-field__toggle--generate {
    left: 42px;
}

.login_form .text-white {
    color: var(--auth-text) !important;
}

.login_form a {
    color: var(--auth-brand);
}

.login_form a:hover,
.login_form a:focus {
    color: var(--auth-brand-hover);
}

.login_form .text-gray-400 {
    color: var(--auth-muted) !important;
    font-size: 0.875rem !important;
}

.login-page {
    margin: 0;
}

.auth-method-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.35rem;
    margin-bottom: 1.5rem;
    background: #f3f4f6;
    border-radius: var(--auth-radius);
}

.auth-method-tabs__btn {
    border: none;
    background: transparent;
    color: var(--auth-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.65rem 0.75rem;
    border-radius: calc(var(--auth-radius) - 4px);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-method-tabs__btn.is-active {
    background: #fff;
    color: var(--auth-brand);
    box-shadow: 0 2px 8px rgba(58, 154, 154, 0.12);
}

.auth-method-panel {
    display: none;
}

.auth-method-panel.is-active {
    display: block;
}

.auth-otp-meta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    margin-top: 0.75rem;
}

.auth-otp-meta__change {
    position: absolute;
    left: 0;
}

.auth-otp-meta__resend {
    text-align: center;
}

.auth-otp-meta__link {
    border: none;
    background: transparent;
    color: var(--auth-brand);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0;
    text-decoration: none;
}

.auth-otp-meta__link:hover:not(:disabled) {
    color: var(--auth-brand-hover);
    text-decoration: none;
}

.auth-otp-meta__link:disabled {
    color: var(--auth-muted);
    cursor: not-allowed;
    opacity: 0.85;
}

#otp_code {
    letter-spacing: 0.35em;
    font-weight: 600;
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem 1.75rem;
        border-radius: 14px;
    }

    .auth-card__logo img,
    .logo-login img {
        max-height: 56px;
    }
}

.password-policy-input,
input.password-policy-input,
.auth-field__input.password-policy-input {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate;
    font-family: 'YekanBakhNoEn', Consolas, "Courier New", monospace !important;
    font-variant-numeric: lining-nums tabular-nums;
}
.password-policy-hint {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #7e8299;
    text-align: right;
}
