/* Unified single-column auth — all panels, all breakpoints.
   Brand tokens live in auth-tokens.css (load first). */
:root { --entry-surface: #f6f9f2; }
* { box-sizing: border-box; }
body.unified-auth { margin: 0; background: var(--entry-surface); color: var(--entry-ink); font: 400 15px/1.8 'Vazirmatn', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; }
.unified-auth a { color: var(--entry-green); text-underline-offset: 5px; }
.unified-auth button, .unified-auth input { font: inherit; }
.unified-auth button, .unified-auth a { -webkit-tap-highlight-color: transparent; }
.unified-auth :focus-visible { outline: 3px solid #3d8b63; outline-offset: 4px; }

.entry-skip { position: fixed; top: -100px; right: 24px; padding: 12px; background: white; z-index: 10; }
.entry-skip:focus { top: 12px; }

.entry-topbar { max-width: 560px; margin: auto; padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.entry-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 21px; }
.entry-logo img { object-fit: contain; width: auto; max-width: 190px; height: 44px; }
.entry-home { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; text-decoration: none; min-height: 44px; }
.entry-home span { font-size: 22px; }

/* — Single column at EVERY breakpoint. No 2-column grid, ever. — */
.entry-layout { display: block; max-width: 560px; margin: 0 auto 35px; padding: 0 20px; }
.entry-main { padding: 8px 0 0; display: flex; align-items: center; justify-content: center; flex-direction: column; min-width: 0; }

.entry-card {
    width: 100%;
    max-width: 460px;
    background: var(--auth-surface-card, #fff);
    border: 1px solid rgba(36, 62, 50, 0.08);
    border-radius: 20px;
    padding: 26px 26px 22px;
    box-shadow: 0 10px 30px rgba(36, 62, 50, 0.07), 0 2px 8px rgba(36, 62, 50, 0.04);
}
.entry-tabs { padding: 5px; background: #e9efe4; border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 34px; }
.entry-tabs a { text-align: center; padding: 10px 8px; text-decoration: none; font-size: 14px; color: var(--entry-muted); border-radius: 10px; }
.entry-tabs a[aria-current] { color: var(--entry-green); background: #fff; box-shadow: 0 2px 6px #243e320a; font-weight: 700; }
.entry-heading { margin-bottom: 25px; }
.entry-heading h1 { margin: 0 0 6px; font-size: clamp(25px, 2.5vw, 32px); font-weight: 800; line-height: 1.55; letter-spacing: -.6px; }
.entry-heading p { margin: 0; color: var(--entry-muted); font-size: 14px; line-height: 1.95; }
.entry-form { display: flex; flex-direction: column; gap: 17px; }
.entry-field { min-width: 0; }
.entry-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.entry-input-wrap { position: relative; }
.entry-field input { width: 100%; min-width: 0; height: 52px; background: white; border: 1px solid var(--entry-line); color: var(--entry-ink); border-radius: 11px; padding: 10px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.entry-field input:focus { border-color: var(--entry-green); outline: none; box-shadow: 0 0 0 3px #3d8b631c; }
.entry-field input[aria-invalid="true"] { border-color: var(--entry-error); box-shadow: 0 0 0 3px #a12d3714; }
.entry-field input::placeholder { color: #76817a; opacity: 1; }
.entry-field input[data-phone] { letter-spacing: 1.5px; }
.entry-field input[data-otp] { text-align: center; font-size: 25px; letter-spacing: 12px; height: 62px; padding-inline: 10px; }
.entry-input-wrap:has(.entry-reveal:not([hidden])) input { padding-right: 52px; }
.entry-reveal { position: absolute; right: 4px; top: 4px; height: 44px; width: 44px; border: 0; border-radius: 8px; color: var(--entry-muted); background: transparent; cursor: pointer; display: grid; place-items: center; }
.entry-reveal[hidden] { display: none; }
.entry-reveal:hover { background: var(--entry-surface); }
.eye-slash { display: none; }
.entry-reveal[aria-pressed="true"] .eye-slash { display: block; }
.entry-hint, .entry-field-error { display: block; font-size: 11px; line-height: 1.8; margin-top: 5px; }
.entry-hint { color: var(--entry-muted); }
.entry-field-error { color: var(--entry-error); }
.entry-hint:empty, .entry-field-error:empty { display: none; }
.entry-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.entry-name-row label { font-size: 12.5px; line-height: 1.5; }
.entry-name-row .entry-field input { height: 50px; }
.entry-forgot { align-self: flex-start; font-size: 12px; margin-top: -5px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.entry-submit, .entry-link-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 11px; padding: 11px 18px; border: 1px solid var(--entry-green); color: white; background: var(--entry-green); font-weight: 700; cursor: pointer; width: 100%; transition: background .15s, transform .08s, box-shadow .15s, opacity .15s; }
.entry-submit:hover:not(:disabled) { background: #1d5035; box-shadow: 0 4px 14px #243e3226; }
.entry-submit:active:not(:disabled) { transform: scale(.985); }
.entry-submit:disabled { cursor: wait; opacity: .8; }
.entry-link-button { color: white !important; text-decoration: none; }
.entry-spinner { display: none; width: 18px; height: 18px; border: 2px solid #ffffff60; border-top-color: white; border-radius: 50%; flex-shrink: 0; }
[data-auth-form][aria-busy="true"] .entry-spinner { display: block; animation: entry-spin .8s linear infinite; }
[data-auth-form][aria-busy="true"] .entry-submit { cursor: wait; }
button[data-resend]:disabled { opacity: .65; }
@keyframes entry-spin { to { transform: rotate(360deg); } }
.entry-shake { animation: entry-shake .42s ease; }
@keyframes entry-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(6px); } 40% { transform: translateX(-6px); } 60% { transform: translateX(4px); } 80% { transform: translateX(-3px); } }
.entry-switch { text-align: center; color: var(--entry-muted); font-size: 13px; margin: 23px 0; }
.entry-switch a { font-weight: 700; margin-inline-start: 4px; }
.entry-staff { text-align: center; color: var(--entry-muted); font-size: 11px; border-top: 1px solid var(--entry-line); padding-top: 16px; margin-top: 24px; line-height: 1.9; }
.entry-bottom { color: var(--entry-muted); font-size: 11px; text-align: center; margin-top: 26px; }
.entry-notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; font-size: 13px; overflow-wrap: anywhere; }
.entry-notice ul { margin: 0; padding: 0; list-style: none; }
.entry-notice li + li { margin-top: 5px; }
.entry-notice-error { color: #8b2732; background: #fceff0; border: 1px solid #e8c3c7; }
.entry-notice-success { color: #245b3d; background: #e4f1e6; border: 1px solid #bed7c3; }
.entry-sticky { position: sticky; top: 0; z-index: 3; background: var(--auth-surface-card, #fff); padding-block: 4px; margin-bottom: 10px; }
.entry-steps { display: flex; list-style: none; padding: 0; margin: 0 0 20px; color: var(--entry-muted); font-size: 11px; }
.entry-steps li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; line-height: 1.6; }
.entry-steps li + li::before { content: ''; position: absolute; top: 11px; inset-inline-start: calc(-50% + 16px); width: calc(100% - 32px); height: 2px; background: var(--entry-line); border-radius: 1px; }
.entry-steps li.is-done + li::before { background: var(--entry-green); }
.entry-steps li span { display: inline-grid; place-items: center; border: 1.5px solid var(--entry-line); border-radius: 50%; width: 24px; height: 24px; flex-shrink: 0; background: white; font-weight: 700; }
.entry-steps li[aria-current] { color: var(--entry-green); font-weight: 700; }
.entry-steps li[aria-current] span, .entry-steps .is-done span { background: var(--entry-green); border-color: var(--entry-green); color: white; }
.entry-steps li[aria-current] span { box-shadow: 0 0 0 4px #3d8b631c; }
.entry-note { font-size: 11px; color: var(--entry-muted); margin: 0; }
.entry-recipient { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; background: #e9efe4; border-radius: 10px; margin-bottom: 20px; }
.entry-recipient bdi { font-weight: 600; font-size: 17px; letter-spacing: 1px; }
.entry-recipient a { font-size: 12px; margin-inline-start: auto; }
.entry-resend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 12px; color: var(--entry-muted); }
.entry-resend button { background: none; border: none; color: var(--entry-green); text-decoration: underline; text-underline-offset: 5px; min-height: 44px; cursor: pointer; padding: 4px; }
.entry-resend button:disabled { color: var(--entry-muted); cursor: default; text-decoration: none; }
.entry-progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.entry-progress span { display: block; height: 100%; width: 35%; background: #3d8b63; border-radius: 3px; }
html.is-navigating .entry-progress { opacity: 1; }
html.is-navigating .entry-progress span { animation: entry-progress-slide 1.1s ease-in-out infinite; }
@keyframes entry-progress-slide { 0% { transform: translateX(120%); } 50% { transform: translateX(0); } 100% { transform: translateX(-120%); } }
html.is-navigating body { cursor: progress; }
html.is-navigating .entry-tabs a:not(.is-pending),
html.is-navigating .entry-switch a,
html.is-navigating .entry-home,
html.is-navigating .entry-forgot,
html.is-navigating .entry-recipient a { opacity: .55; pointer-events: none; }
.entry-tabs a.is-pending { opacity: .8; pointer-events: none; }
.entry-tabs a.is-pending::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-inline-start: 8px; vertical-align: -2px; border: 2px solid #28634440; border-top-color: #286344; border-radius: 50%; animation: entry-spin .8s linear infinite; }

/* — Responsive: single column stays single column; only spacing adapts. — */
@media (max-width: 767px) {
    .entry-topbar { padding: 16px 20px; }
    .entry-layout { padding: 0 16px; margin-bottom: 20px; }
    .entry-main { padding: 4px 0 0; }
    .entry-card { padding: 22px 20px 18px; border-radius: 18px; }
    .entry-logo { font-size: 18px; }
    .entry-tabs { margin-bottom: 22px; }
    .entry-heading h1 { font-size: 26px; }
    .entry-heading p { font-size: 13px; }
    .entry-bottom { margin-top: 20px; }
}
@media (max-width: 479px) {
    .entry-layout { padding-inline: 14px; }
    .entry-topbar { padding-inline: 14px; }
    .entry-name-row { grid-template-columns: 1fr; }
    .entry-steps { font-size: 9.5px; }
    .entry-heading h1 { font-size: 24px; }
    .entry-field input { height: 50px; }
    .entry-submit { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
    .unified-auth *, .unified-auth *::before, .unified-auth *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .entry-shake { animation: none !important; }
    html.is-navigating .entry-progress span { animation: none; transform: none; width: 100%; }
    .entry-tabs a.is-pending::after { animation: none; }
}
