.wr-auth { font-family: var(--wr-font, "WebraanYekanBakh", "YekanBakh", Tahoma, sans-serif); color: var(--wr-text, #10234f); direction: rtl; }
.wr-auth__step { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.wr-auth__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.6; }
.wr-auth__sub { margin: 0 0 6px; font-size: 14px; line-height: 1.9; color: var(--wr-text-muted, #52627d); }
.wr-auth__label { font-weight: 700; font-size: 14px; }
.wr-auth__optional { font-weight: 500; font-size: 12px; color: var(--wr-text-muted, #52627d); margin-inline-start: 4px; }
.wr-auth__input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--wr-border, #dce7f6); border-radius: 12px; background: var(--wr-bg, #f7faff); color: inherit; font: inherit; font-size: 17px; letter-spacing: .5px; text-align: left; transition: border-color .15s, box-shadow .15s; }
.wr-auth__input:focus { outline: none; border-color: var(--wr-blue, #0a63f7); box-shadow: 0 0 0 3px rgba(10, 99, 247, .14); }
.wr-auth__input--code { font-size: 26px; font-weight: 800; letter-spacing: 12px; text-align: center; }
.wr-auth__btn { min-height: 52px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #1769ff, #0a63f7); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(10, 99, 247, .22); transition: filter .15s, opacity .15s; }
.wr-auth__btn:hover { filter: brightness(1.06); }
.wr-auth__btn:disabled { opacity: .6; cursor: progress; }
.wr-auth__btn:focus-visible, .wr-auth__link:focus-visible, .wr-auth__skip:focus-visible { outline: 2px solid var(--wr-blue, #0a63f7); outline-offset: 2px; }
.wr-auth__skip { min-height: 44px; border: 0; background: transparent; color: var(--wr-text-muted, #52627d); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.wr-auth__link { padding: 0; border: 0; background: none; color: var(--wr-blue, #0a63f7); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wr-auth__link:disabled { color: var(--wr-text-muted, #52627d); text-decoration: none; cursor: default; font-weight: 500; }
.wr-auth__resend { margin: 2px 0 0; text-align: center; font-size: 13px; }
.wr-auth__error { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(217, 74, 98, .1); color: #c43851; font-size: 13px; font-weight: 600; }

.wr-auth-page { max-width: 440px; margin: 8px auto 32px; }
.wr-auth-page > .wr-auth { padding: 28px 24px; background: var(--wr-surface, #fff); border: 1px solid var(--wr-border, #dce7f6); border-radius: var(--wr-radius, 20px); box-shadow: 0 12px 32px rgba(16, 35, 79, .06); }
.wr-auth-classic { margin-top: 16px; padding: 0 4px; font-family: var(--wr-font, "WebraanYekanBakh", "YekanBakh", Tahoma, sans-serif); }
.wr-auth-classic summary { cursor: pointer; color: var(--wr-text-muted, #52627d); font-size: 14px; font-weight: 600; text-align: center; list-style: none; }
.wr-auth-classic summary::-webkit-details-marker { display: none; }
.wr-auth-classic summary::after { content: " ▾"; }
.wr-auth-classic[open] summary::after { content: " ▴"; }
.wr-auth-classic form { margin-top: 14px; padding: 20px; border: 1px solid var(--wr-border, #dce7f6); border-radius: 16px; background: var(--wr-surface, #fff); }

.wr-auth-modal { position: fixed; inset: 0; z-index: 100001; display: none; align-items: center; justify-content: center; padding: 16px; }
.wr-auth-modal.is-open { display: flex; }
.wr-auth-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 18, 38, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.wr-auth-modal__card { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; padding: 28px 22px 22px; border-radius: 22px; background: var(--wr-surface, #fff); box-shadow: 0 24px 60px rgba(8, 18, 38, .3); animation: wr-auth-in .24s cubic-bezier(.22, 1, .36, 1); }
.wr-auth-modal__close { position: absolute; top: 10px; left: 10px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--wr-text-muted, #52627d); font-size: 24px; line-height: 1; cursor: pointer; }
.wr-auth-modal__close:hover { background: rgba(16, 35, 79, .06); }
.wr-auth-modal__note { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--wr-blue-ice, #eef6ff); color: var(--wr-blue, #0a63f7); font-family: var(--wr-font, "WebraanYekanBakh", "YekanBakh", Tahoma, sans-serif); font-size: 13px; font-weight: 600; line-height: 1.8; }
html.wr-auth-lock { overflow: hidden; }
@keyframes wr-auth-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .wr-auth-modal { align-items: flex-end; padding: 0; } .wr-auth-modal__card { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); } }

html[data-wr-theme=dark] .wr-auth__input { background: #0d1728; border-color: #3b506d; }
html[data-wr-theme=dark] .wr-auth-page > .wr-auth, html[data-wr-theme=dark] .wr-auth-modal__card, html[data-wr-theme=dark] .wr-auth-classic form { background: #15243a; border-color: #3b506d; }
html[data-wr-theme=dark] .wr-auth__error { color: #ff9dac; background: rgba(255, 157, 172, .12); }
html[data-wr-theme=dark] .wr-auth__link { color: #83b5ff; }
html[data-wr-theme=dark] .wr-auth-modal__note { background: #1c304b; color: #83b5ff; }
@media (prefers-reduced-motion: reduce) { .wr-auth-modal__card { animation: none; } }
.wr-auth-classic:not([open]) > form { display: none !important; }
/* Close button gets its own column beside the note instead of covering it. */
.wr-auth-modal__card { padding-top: 18px; }
.wr-auth-modal__close { top: 18px; left: 16px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(16, 35, 79, .06); font-size: 22px; }
.wr-auth-modal__close:hover { background: rgba(16, 35, 79, .12); color: var(--wr-text, #10234f); }
.wr-auth-modal__note { margin-inline-end: 48px; min-height: 36px; box-sizing: border-box; display: flex; align-items: center; }
html[data-wr-theme=dark] .wr-auth-modal__close { background: rgba(255, 255, 255, .08); color: #b9c8df; }
