/* Compact authentication, matching the approved light/dark cards. Scoped to avoid page-specific styles. */
.auth-page .auth-wrap{min-height:600px;display:grid;place-items:center;padding:32px 16px 48px}
.auth-page #auth-root{display:flex!important;justify-content:center;width:100%}
.auth-card{
 --auth-surface:var(--rv-light-surface,#fff);--auth-field:var(--rv-light-raised,#E8EEE1);--auth-line:var(--rv-light-border,#D5DECE);--auth-ink:var(--rv-light-text,#252D24);--auth-muted:var(--rv-light-muted,#596653);--auth-gold:var(--rv-light-accent,#E9C34A);--auth-link:#987817;--auth-tab:#E9C34A20;
 position:relative;box-sizing:border-box;width:380px;max-width:100%;margin:0;padding:24px;border:1px solid var(--auth-line);border-radius:18px;background:var(--auth-surface);color:var(--auth-ink);box-shadow:0 10px 35px #18220f12;text-align:right;direction:rtl;font:400 13px/1.7 var(--font,"Vazirmatn",Tahoma,sans-serif)
}
html[data-theme=dark] .auth-card{--auth-surface:var(--rv-dark-surface,#1d2119);--auth-field:var(--rv-dark-raised,#252b20);--auth-line:var(--rv-dark-border,#3e4934);--auth-ink:var(--rv-dark-text,#f1f1e9);--auth-muted:var(--rv-dark-muted,#a8ae9d);--auth-gold:var(--rv-dark-accent,#e9c34a);--auth-link:var(--auth-gold);--auth-tab:#e9c34a0d;box-shadow:0 16px 50px #0004}
.auth-card *, .auth-card *:before,.auth-card *:after{box-sizing:border-box}
.auth-card button,.auth-card input,.auth-card select{font-family:inherit;letter-spacing:normal}
.auth-card .auth-brand{display:flex;align-items:center;justify-content:center;gap:9px;direction:ltr;font-size:16px;font-weight:600;line-height:1;letter-spacing:.04em;margin:0 0 18px;color:var(--auth-ink);height:29px}
.auth-card .auth-brand-mark{display:block;flex:none;width:31px;height:29px;background:var(--auth-gold);mask:url('img/brand-r.png') center/contain no-repeat;-webkit-mask:url('img/brand-r.png') center/contain no-repeat}
.auth-card :is(h1,h2)#auth-heading{font-size:22px;line-height:1.6;text-align:center;margin:0;font-weight:800;letter-spacing:-.45px;color:var(--auth-ink);padding:0}
.auth-card .auth-subtitle{text-align:center;color:var(--auth-muted);font-size:12px;line-height:1.8;margin:2px 0 16px}
.auth-card .auth-tabs{display:flex;padding:0;background:var(--auth-field);border:1px solid var(--auth-line);border-radius:9px;margin:14px 0 12px;overflow:hidden}
.auth-card .auth-tabs button{flex:1;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--auth-muted);font-size:12px;line-height:1.5;min-height:40px;padding:8px;cursor:pointer}
.auth-card .auth-tabs button[aria-pressed=true]{background:var(--auth-tab);color:var(--auth-link);border-bottom-color:var(--auth-gold);font-weight:750}
.auth-card .auth-field{display:block;font-size:12px;line-height:1.7;font-weight:650;margin:10px 0 5px;color:var(--auth-ink)}
.auth-card .auth-input{display:block;width:100%;height:44px;margin:0;background:var(--auth-field);border:1px solid var(--auth-line);border-radius:8px;color:var(--auth-ink);font:400 13px/1.5 var(--font);padding:10px 12px;min-width:0;box-shadow:none}
.auth-card .auth-input::placeholder{color:var(--auth-muted);opacity:.8;font-size:12px}
.auth-card .auth-input:focus,.auth-card .auth-otp input:focus{outline:2px solid var(--auth-gold);outline-offset:2px}
.auth-card .auth-input[aria-invalid=true]{border-color:#B34343}
.auth-card .auth-input--ltr{direction:ltr;text-align:left}
.auth-card .auth-input[name=username]::placeholder{direction:rtl;text-align:right}
.auth-card .auth-pass,.auth-card .auth-icon-input{position:relative}
.auth-card :is(.auth-pass,.auth-icon-input) .auth-input{padding-left:42px}
.auth-card .auth-eye,.auth-card .auth-input-icon{position:absolute;left:1px;top:1px;width:40px;height:42px;display:grid;place-items:center;border:0;background:none;color:var(--auth-muted);padding:0}
.auth-card .auth-eye{cursor:pointer}
.auth-card .auth-input-icon{pointer-events:none}
.auth-card :is(.auth-eye,.auth-input-icon) svg{width:19px;height:19px}
.auth-card .auth-phone{display:flex;direction:ltr;gap:0;background:var(--auth-field);border:1px solid var(--auth-line);border-radius:8px;overflow:hidden}
.auth-card .auth-phone:focus-within{outline:2px solid var(--auth-gold);outline-offset:2px}
.auth-card .auth-phone .auth-country{width:75px;flex:none;font-size:12px;padding:8px;border:0;border-right:1px solid var(--auth-line);border-radius:0;background:transparent}
.auth-card .auth-phone .auth-input:not(.auth-country){flex:1;border:0;border-radius:0;background:transparent}
.auth-card .auth-phone .auth-input:focus{outline:none}
.auth-card .auth-help{font-size:10px;line-height:1.8;color:var(--auth-muted);margin:5px 0 0}
.auth-card .auth-actions{display:flex;align-items:center;gap:10px;margin:8px 0 0}
.auth-card .auth-link{color:var(--auth-link);text-decoration:underline;text-underline-offset:4px;font-size:12px;line-height:1.7;border:0;padding:3px 0;background:none;cursor:pointer}
.auth-card :is(.auth-primary,.auth-secondary){display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:9px 12px;border-radius:9px;cursor:pointer;font:750 13px/1.7 var(--font);text-decoration:none;margin:14px 0 0;box-shadow:none}
.auth-card .auth-primary{background:linear-gradient(115deg,#edc94e,var(--auth-gold));border:1px solid var(--auth-gold);color:#20271c}
html[data-theme=dark] .auth-card .auth-primary{background:linear-gradient(115deg,#f4d361,var(--auth-gold))}
.auth-card .auth-secondary{background:transparent;border:1px solid #a9b79e;color:var(--auth-muted)}
html[data-theme=dark] .auth-card .auth-secondary{border-color:var(--auth-gold);color:var(--auth-gold)}
.auth-card .auth-primary:hover{filter:brightness(1.04)}
.auth-card :is(.auth-primary,.auth-secondary):disabled{opacity:.55;cursor:wait}
.auth-card .auth-footer{text-align:center;font-size:12px;line-height:1.8;color:var(--auth-muted);margin:17px 0 0}
.auth-card .auth-footer button{font-weight:750;margin-right:4px}
.auth-card .auth-divider{display:flex;align-items:center;gap:12px;color:var(--auth-muted);font-size:11px;line-height:1.7;margin:14px 0 0}
.auth-card .auth-divider:before,.auth-card .auth-divider:after{content:'';height:1px;background:var(--auth-line);flex:1}
.auth-card .auth-check{display:flex;align-items:flex-start;gap:7px;font-size:10px;color:var(--auth-muted);margin-top:12px;line-height:1.9}
.auth-card .auth-check input{appearance:auto;accent-color:var(--auth-gold);width:16px;height:16px;flex:none;margin:2px 0 0;padding:0}
.auth-card .auth-check a{color:inherit;text-underline-offset:3px}
.auth-card .auth-check label{cursor:pointer}
.auth-card .auth-message{font-size:11px;line-height:1.9;padding:8px 10px;margin:12px 0 0;border:1px solid #B3434340;background:#B343430B;color:#A12F35;border-radius:8px;overflow-wrap:anywhere}
.auth-card .auth-message:empty{display:none}
.auth-card .auth-message.ok{color:#267347;background:#2778470C;border-color:#27784735}
html[data-theme=dark] .auth-card .auth-message{color:#FFBAB6}
html[data-theme=dark] .auth-card .auth-message.ok{color:#A2DEB1}
.auth-card .auth-verified{display:flex;align-items:center;gap:6px;padding:4px 8px;border-radius:6px;color:#25853b;background:#27784712;font-size:10px;margin:4px 0 10px;border:1px solid #27784715}
.auth-card .auth-checkmark{display:grid;place-items:center;background:#288f3d;color:#fff;width:15px;height:15px;border-radius:50%;font-size:10px;line-height:1}
html[data-theme=dark] .auth-card .auth-verified{color:#94df97;background:#47b65f15;border-color:#47b65f25}
.auth-card .auth-back,.auth-card .auth-close{position:absolute;top:10px;width:36px;height:36px;display:grid;place-items:center;border:0;background:transparent;border-radius:50%;color:var(--auth-muted);padding:0;cursor:pointer;z-index:1}
.auth-card .auth-back{left:8px;font-size:27px;line-height:1}
.auth-card .auth-close{right:8px}
.auth-card .auth-close svg{width:18px;height:18px}
.auth-card .auth-close:hover,.auth-card .auth-back:hover{background:var(--auth-field);color:var(--auth-ink)}
.auth-card .auth-otp-icon{display:grid;place-items:center;color:var(--auth-gold);margin:6px auto 17px}
.auth-card .auth-otp-icon svg{width:46px;height:46px}
.auth-card .auth-masked{display:block;text-align:center;font-size:15px;font-weight:500;line-height:1.6;margin:12px 0 6px;direction:ltr}
.auth-card .auth-center{text-align:center}
.auth-card .auth-otp{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;direction:ltr;margin:22px 0 12px}
.auth-card .auth-otp input{width:100%;height:46px;text-align:center;border:1px solid var(--auth-line);border-radius:8px;background:var(--auth-field);color:var(--auth-ink);font-size:20px;line-height:1;padding:0;min-width:0;margin:0}
.auth-card .auth-countdown{font-size:11px;color:var(--auth-muted);text-align:center;min-height:24px;margin:14px 0}
.auth-card .auth-countdown button{margin:0}
.auth-card .auth-status{font-size:10px;color:var(--auth-muted);line-height:1.8;padding:8px 10px;border:1px dashed var(--auth-line);border-radius:8px;margin:0 0 12px}
.auth-card :focus-visible{outline:2px solid var(--auth-gold);outline-offset:3px}
.auth-card [hidden]{display:none!important}
.auth-card .auth-account dl{border:1px solid var(--auth-line);border-radius:10px;margin:18px 0;overflow:hidden}
.auth-card .auth-account dl>div{padding:12px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;border-bottom:1px solid var(--auth-line);font-size:12px}
.auth-card .auth-account dl>div:last-child{border:0}
.auth-card .auth-account dt{color:var(--auth-muted)}
.auth-card .auth-account dd{margin:0;overflow-wrap:anywhere}
.auth-card .auth-account .auth-secondary{margin-top:8px}
/* Native modal: keep current URL, page content and scroll position underneath. */
.rv-auth-dialog{box-sizing:border-box;position:fixed;inset:0;width:380px;max-width:calc(100vw - 32px);height:fit-content;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:0;border:0;border-radius:18px;background:transparent;color:inherit;overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 80px #10180d40;scrollbar-width:thin;scrollbar-color:#778169 transparent}
.rv-auth-dialog:not([open]){display:none}
.rv-auth-dialog::backdrop{background:#17201270;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
html[data-theme=dark] .rv-auth-dialog::backdrop{background:#080b08a6}
.rv-auth-dialog .auth-card{box-shadow:none}
.rv-auth-dialog .rv-auth-root{width:100%}
.rv-auth-fallback[open]{display:grid;place-items:center;width:100%;max-width:none;height:100%;max-height:none;padding:16px;background:#17201270;backdrop-filter:blur(7px);border-radius:0;z-index:2147483647}
.rv-auth-fallback .rv-auth-root{width:380px;max-width:100%}
.rv-auth-open{overscroll-behavior:none}
@media(max-width:420px){.auth-card{padding:24px 20px 20px}.auth-card :is(h1,h2)#auth-heading{font-size:21px}.auth-card .auth-otp{gap:6px}.auth-page .auth-wrap{min-height:540px;padding:24px 16px 36px}.auth-card .auth-input{font-size:16px}.auth-card .auth-phone .auth-country{font-size:13px}.auth-card .auth-close,.auth-card .auth-back{width:40px;height:40px;top:6px}}
