:root { --ink: #142033; --teal: #0f6f6a; --paper: #f4f6f8; }
* { font-family: 'Vazirmatn', Tahoma, sans-serif; }
body { margin: 0; background: radial-gradient(ellipse 60% 50% at 100% 0%, rgba(15,111,106,.28), transparent 55%), #142033; color: var(--ink); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(460px, 100%); background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.8); border-radius: 24px; padding: 1.6rem 1.4rem 1.3rem; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.auth-mark { display: block; width: 48px; height: 48px; margin: 0 0 .7rem; }
.auth-brand { margin: 0 0 .35rem; color: var(--teal); font-weight: 800; }
.auth-card h1 { margin: 0 0 .45rem; font-size: 1.45rem; }
.auth-lead { margin: 0 0 1rem; color: #526174; line-height: 1.8; }
.auth-alert { background: #fde8e8; color: #7f1d1d; border-radius: 12px; padding: .7rem .85rem; margin-bottom: .9rem; }
.auth-alert p { margin: .15rem 0; }
.auth-alert.is-ok { background: #e7f3f2; color: #0b5652; }
.auth-card form { display: grid; gap: .35rem; margin-bottom: .9rem; }
.auth-card label { font-weight: 700; font-size: .92rem; }
.auth-card input { min-height: 46px; border: 1px solid #d7dee8; border-radius: 12px; padding: 0 .8rem; font: inherit; }
.otp-boxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; direction: ltr; margin-top: .15rem; }
.otp-digit { width: 100%; min-height: 58px; padding: 0; text-align: center; font-size: 1.45rem; font-weight: 800; border-radius: 14px; background: #fff; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.otp-digit:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.otp-boxes.is-bad .otp-digit { border-color: #b42318; background: #fde8e8; color: #7f1d1d; }
.otp-boxes.is-good .otp-digit { border-color: #0f6f6a; background: #e7f3f2; color: #0b5652; }
.otp-state { min-height: 1.7rem; margin: .35rem 0 .2rem; display: flex; align-items: center; justify-content: center; gap: .4rem; text-align: center; font-size: .95rem; font-weight: 800; }
.otp-state.is-bad { color: #7f1d1d; }
.otp-state.is-good { color: #0b5652; }
.otp-mark svg { width: 26px; height: 26px; display: block; }
.otp-mark .ring, .otp-mark .tick { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.otp-state.is-good .ring, .otp-state.is-good .tick { stroke: #0f6f6a; }
.otp-state.is-bad .ring, .otp-state.is-bad .tick { stroke: #b42318; }
@media (prefers-reduced-motion: no-preference) {
    .otp-boxes.is-good .otp-digit { animation: otp-yes .55s cubic-bezier(.2, .85, .2, 1) both; }
    .otp-boxes.is-good .otp-digit:nth-child(2) { animation-delay: .06s; }
    .otp-boxes.is-good .otp-digit:nth-child(3) { animation-delay: .12s; }
    .otp-boxes.is-good .otp-digit:nth-child(4) { animation-delay: .18s; }
    .otp-boxes.is-good .otp-digit:nth-child(5) { animation-delay: .24s; }
    .otp-boxes.is-bad .otp-digit { animation: otp-no .5s ease both; }
    .otp-boxes.is-bad .otp-digit:nth-child(2) { animation-delay: .03s; }
    .otp-boxes.is-bad .otp-digit:nth-child(3) { animation-delay: .06s; }
    .otp-boxes.is-bad .otp-digit:nth-child(4) { animation-delay: .09s; }
    .otp-boxes.is-bad .otp-digit:nth-child(5) { animation-delay: .12s; }
    .auth-card.is-good { animation: card-glow .7s ease; }
    .auth-card.is-bad { animation: card-flash .55s ease; }
    .otp-state.is-good, .otp-state.is-bad { animation: otp-note .4s ease both; }
    .otp-mark .ring, .otp-mark .tick { stroke-dasharray: 58; stroke-dashoffset: 58; }
    .otp-mark .tick { stroke-dasharray: 24; }
    .otp-state.is-good .ring, .otp-state.is-bad .ring { animation: otp-draw .45s ease forwards; }
    .otp-state.is-good .tick, .otp-state.is-bad .tick { animation: otp-draw .32s .22s ease forwards; }
}
@keyframes otp-yes {
    0% { transform: translateY(10px) scale(.82); }
    55% { transform: translateY(-6px) scale(1.08); }
    100% { transform: none; }
}
@keyframes otp-no {
    0%, 100% { transform: translateX(0); }
    18% { transform: translateX(-8px) rotate(-2deg); }
    36% { transform: translateX(8px) rotate(2deg); }
    54% { transform: translateX(-5px); }
    72% { transform: translateX(4px); }
}
@keyframes card-glow {
    40% { box-shadow: 0 0 0 6px rgba(15, 111, 106, .22), 0 24px 60px rgba(0,0,0,.22); }
}
@keyframes card-flash {
    35% { box-shadow: 0 0 0 6px rgba(180, 35, 24, .22), 0 24px 60px rgba(0,0,0,.22); }
}
@keyframes otp-note {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@keyframes otp-draw { to { stroke-dashoffset: 0; } }
.auth-btn { min-height: 46px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.auth-btn-line { background: #fff; color: var(--ink); border: 1px solid #d7dee8; }
.auth-plan { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; background: #e7f3f2; border-radius: 12px; padding: .7rem .85rem; margin-bottom: 1rem; }
.auth-plan a { margin-inline-start: auto; color: var(--teal); font-weight: 700; }
.auth-more { margin: .4rem 0 1rem; }
.auth-more summary { cursor: pointer; font-weight: 700; margin-bottom: .6rem; }
.auth-check { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.auth-foot { color: #526174; }
.auth-foot a { color: var(--teal); font-weight: 800; }
.auth-bill { margin: 0 0 1rem; }
.auth-bill div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #e6ebf2; }
.auth-bill dt { color: #526174; }
.auth-bill dd { margin: 0; font-weight: 800; text-align: left; }
