/* MasterGroup standalone modern auth page - v1.2.0 */
:root {
    --bg-main: #f8fafc;
    --bg-panel: #ffffff;
    --bg-soft: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.76);
    --glass-border: rgba(15, 23, 42, 0.08);
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --mg-blue: #2563eb;
    --mg-purple: #7c3aed;
    --mg-gold: #d4af37;
    --danger: #ef4444;
    --success: #22c55e;
    --field-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.dark {
    --bg-main: #05050a;
    --bg-panel: #0b0c15;
    --bg-soft: #090b14;
    --bg-glass: rgba(10, 11, 20, 0.66);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-color: #1a1c2e;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --field-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

body.mg-auth-standalone {
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

body.mg-auth-standalone ::selection {
    background: var(--mg-purple);
    color: #fff;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.text-ltr {
    direction: ltr;
    text-align: left;
}

.mg-auth-modern {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    padding: 28px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.19), transparent 32%),
        radial-gradient(circle at 10% 92%, rgba(37, 99, 235, 0.16), transparent 34%),
        var(--bg-main);
    overflow: hidden;
}

.mg-auth-modern__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.mg-auth-modern__bg .orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(98px);
    opacity: 0.85;
}

.mg-auth-modern__bg .orb-one {
    top: -14%;
    right: -7%;
    width: min(620px, 54vw);
    height: min(620px, 54vw);
    background: rgba(124, 58, 237, 0.22);
}

.mg-auth-modern__bg .orb-two {
    left: -10%;
    bottom: -18%;
    width: min(520px, 48vw);
    height: min(520px, 48vw);
    background: rgba(37, 99, 235, 0.2);
}

.mg-auth-modern__bg .grid {
    position: absolute;
    inset: 0;
    opacity: 0.36;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.065) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 74%, transparent);
}

.mg-auth-modern__container {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.mg-auth-modern__shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr);
    min-height: 690px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 34px;
    background: var(--bg-panel);
    box-shadow: 0 30px 95px rgba(0, 0, 0, 0.23);
}

.dark .mg-auth-modern__shell {
    box-shadow: 0 30px 95px rgba(0, 0, 0, 0.44), 0 0 75px rgba(37, 99, 235, 0.09);
}

.mg-auth-modern__home {
    position: absolute;
    top: 22px;
    left: 22px;
    z-index: 12;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.13);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mg-auth-modern__home:hover {
    color: var(--text-main);
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.13);
}

.mg-auth-modern__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background: #05050a;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-auth-modern__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 8%, rgba(37, 99, 235, 0.34), transparent 34%),
        radial-gradient(circle at 4% 100%, rgba(124, 58, 237, 0.31), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%);
    pointer-events: none;
}

.mg-auth-modern__brand-glow {
    position: absolute;
    inset: auto -90px -120px auto;
    width: 310px;
    height: 310px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.13);
    filter: blur(70px);
}

.mg-auth-modern__logo,
.mg-auth-modern__mobile-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.mg-auth-modern__logo .mark,
.mg-auth-modern__mobile-brand .logo-mark {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.24);
}

.mg-auth-modern__logo img,
.mg-auth-modern__mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    display: block;
}

.mg-auth-modern__logo .texts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mg-auth-modern__logo strong,
.mg-auth-modern__mobile-brand strong {
    font-size: 29px;
    font-weight: 950;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.mg-auth-modern__logo small {
    margin-top: 2px;
    font-size: 10px;
    font-family: Arial, sans-serif;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.54);
}

.mg-auth-modern__intro {
    position: relative;
    z-index: 2;
    margin-top: 36px;
}

.mg-auth-modern__intro .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.mg-auth-modern__intro h1 {
    margin: 28px 0 18px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.24;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.mg-auth-modern__intro h1 span {
    background: linear-gradient(270deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mg-auth-modern__intro p {
    margin: 0;
    max-width: 390px;
    font-size: 14px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.64);
}

.mg-auth-modern__benefits {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 14px;
}

.mg-auth-modern__benefits .benefit-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.mg-auth-modern__benefits .benefit-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.085);
}

.mg-auth-modern__benefits .benefit-card > span {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
}

.mg-auth-modern__benefits .benefit-card:nth-child(2) > span {
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.16);
}

.mg-auth-modern__benefits strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 900;
}

.mg-auth-modern__benefits small {
    display: block;
    font-size: 11px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.52);
}

.mg-auth-modern__panel {
    position: relative;
    z-index: 1;
    padding: 62px 72px 46px;
    background: var(--bg-panel);
}

.mg-auth-modern__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.055), transparent 34%);
    pointer-events: none;
}

.mg-auth-modern__panel > * {
    position: relative;
    z-index: 1;
}

.mg-auth-modern__mobile-brand {
    display: none;
    margin-bottom: 32px;
}

.mg-auth-modern__mobile-brand .logo-mark {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 17px;
    background: rgba(148, 163, 184, 0.12);
    border-color: var(--glass-border);
    box-shadow: var(--field-shadow);
}

.mg-auth-modern__mobile-brand strong {
    color: var(--text-main);
    font-size: 24px;
}

.mg-auth-modern__flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.8;
}

.mg-auth-modern__flash.success {
    color: #15803d;
    background: rgba(34, 197, 94, 0.11);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.dark .mg-auth-modern__flash.success {
    color: #86efac;
}

.mg-auth-modern__flash.error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dark .mg-auth-modern__flash.error {
    color: #fca5a5;
}

.mg-auth-modern__tabs {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 34px;
    border-bottom: 1px solid var(--border-color);
}

.mg-auth-modern__tabs button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 0 17px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 17px;
    font-weight: 850;
    transition: color 0.2s ease;
}

.mg-auth-modern__tabs button::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--mg-blue), var(--mg-purple));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.mg-auth-modern__tabs button.is-active {
    color: var(--text-main);
    font-weight: 950;
}

.mg-auth-modern__tabs button.is-active::after {
    transform: scaleX(1);
}

.mg-auth-modern__flow {
    display: none;
    animation: mgAuthFade 0.26s ease both;
}

.mg-auth-modern__flow.is-active {
    display: block;
}

@keyframes mgAuthFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mg-auth-modern__stage-head {
    margin-bottom: 26px;
}

.mg-auth-modern__stage-head.compact {
    margin-bottom: 22px;
}

.mg-auth-modern__stage-head h2 {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 23px;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.mg-auth-modern__stage-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 2;
}

.mg-auth-modern__stage-head p strong {
    color: var(--text-main);
    font-weight: 900;
}

.mg-auth-modern__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
    transition: color 0.2s ease;
}

.mg-auth-modern__back:hover {
    color: var(--text-main);
}

.mg-auth-modern__form {
    display: grid;
    gap: 18px;
}

.mg-auth-modern__field {
    display: grid;
    gap: 9px;
}

.mg-auth-modern__field label,
.mg-auth-modern__otp-main label {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 900;
}

.mg-auth-modern__field label span {
    color: var(--text-muted);
    font-weight: 700;
}

.mg-auth-modern__field small,
.mg-auth-modern__otp-main small {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.8;
}

.mg-auth-modern__phone,
.mg-auth-modern__icon-input {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 57px;
    border-radius: 17px;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    box-shadow: var(--field-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mg-auth-modern__phone:focus-within,
.mg-auth-modern__icon-input:focus-within,
.mg-auth-modern__input:focus {
    border-color: var(--mg-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13), var(--field-shadow);
    transform: translateY(-1px);
}

.mg-auth-modern__phone span {
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    min-width: 64px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--text-muted);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
}

.mg-auth-modern__phone input,
.mg-auth-modern__icon-input input,
.mg-auth-modern__input {
    width: 100%;
    height: 100%;
    min-height: 57px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    padding: 0 16px;
    font-size: 15px;
    font-weight: 650;
}

.mg-auth-modern__phone input {
    padding-left: 84px;
    letter-spacing: 0.04em;
}

.mg-auth-modern__icon-input i {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.mg-auth-modern__icon-input input {
    padding-left: 50px;
}

.mg-auth-modern__input {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 17px;
    background: var(--bg-soft);
    box-shadow: var(--field-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Primary authentication CTA component */
.mg-auth-modern__submit {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 72px;
    margin-top: 2px;
    padding: 10px 12px;
    border: 0;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    color: #fff;
    text-align: right;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: translateZ(0);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.mg-auth-modern__submit::before,
.mg-auth-modern__submit::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.mg-auth-modern__submit::before {
    inset: 0;
    opacity: 0.9;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
        linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.28) 47%, transparent 56%);
    transform: translateX(-62%);
    transition: transform 0.65s ease;
}

.mg-auth-modern__submit::after {
    inset: 1px;
    border-radius: 21px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 -18px 32px rgba(2, 6, 23, 0.18);
}

.mg-auth-modern__submit:hover {
    transform: translateY(-3px);
    filter: saturate(1.08);
    box-shadow: 0 26px 55px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mg-auth-modern__submit:hover::before {
    transform: translateX(62%);
}

.mg-auth-modern__submit:active {
    transform: translateY(-1px) scale(0.99);
}

.mg-auth-modern__submit:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 26px 55px rgba(37, 99, 235, 0.32);
}

.mg-auth-modern__submit-icon,
.mg-auth-modern__submit-arrow {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mg-auth-modern__submit-icon {
    width: 50px;
    height: 50px;
    font-size: 18px;
}

.mg-auth-modern__submit-arrow {
    width: 40px;
    height: 40px;
    font-size: 13px;
    transition: transform 0.22s ease, background 0.22s ease;
}

.mg-auth-modern__submit:hover .mg-auth-modern__submit-arrow {
    transform: translateX(-4px);
    background: rgba(255, 255, 255, 0.24);
}

.mg-auth-modern__submit-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.mg-auth-modern__submit-copy strong {
    font-size: 15px;
    font-weight: 950;
    line-height: 1.5;
}

.mg-auth-modern__submit-copy small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 760;
    line-height: 1.5;
}

.mg-auth-modern__submit.dark-submit {
    background:
        radial-gradient(circle at 14% 18%, rgba(124, 58, 237, 0.62), transparent 32%),
        linear-gradient(135deg, #111827 0%, #1e3a8a 48%, #5b21b6 100%);
    box-shadow: 0 20px 45px rgba(30, 58, 138, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dark .mg-auth-modern__submit.dark-submit {
    color: #fff;
    background:
        radial-gradient(circle at 14% 18%, rgba(124, 58, 237, 0.68), transparent 32%),
        linear-gradient(135deg, #151827 0%, #1d4ed8 48%, #7c3aed 100%);
}

.mg-auth-modern__submit.gradient-submit {
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.26), transparent 26%),
        linear-gradient(135deg, var(--mg-blue) 0%, #4f46e5 45%, var(--mg-purple) 100%);
}

.mg-auth-modern__otp-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    border-radius: 25px;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    box-shadow: var(--field-shadow);
}

.mg-auth-modern__otp-main {
    display: grid;
    gap: 12px;
}

.mg-auth-modern__otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    direction: ltr;
}

.mg-auth-modern__otp-inputs input {
    width: 100%;
    height: 58px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    outline: 0;
    text-align: center;
    direction: ltr;
    color: var(--text-main);
    background: var(--bg-panel);
    font-size: 24px;
    font-weight: 950;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.mg-auth-modern__otp-inputs input:focus,
.mg-auth-modern__otp-inputs input.is-filled {
    border-color: var(--mg-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
    transform: translateY(-1px);
}

.mg-auth-modern__timer {
    position: relative;
    min-height: 118px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: var(--text-main);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
}

.mg-auth-modern__timer svg {
    position: absolute;
    width: 88px;
    height: 88px;
    transform: rotate(-90deg);
}

.mg-auth-modern__timer circle {
    fill: none;
    stroke-width: 7;
}

.mg-auth-modern__timer .track {
    stroke: rgba(148, 163, 184, 0.22);
}

.mg-auth-modern__timer .progress {
    stroke: var(--mg-blue);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.28s linear;
}

.mg-auth-modern__timer.is-expired .progress {
    stroke: var(--danger);
}

.mg-auth-modern__timer div {
    position: relative;
    display: grid;
    place-items: center;
    gap: 2px;
}

.mg-auth-modern__timer strong {
    font-size: 18px;
    font-weight: 950;
    direction: ltr;
}

.mg-auth-modern__timer span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.mg-auth-modern__register {
    margin-top: 2px;
    padding: 18px;
    border-radius: 25px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.18);
}

.mg-auth-modern__register .register-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.mg-auth-modern__register .register-head > span {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--success);
    background: rgba(34, 197, 94, 0.13);
}

.mg-auth-modern__register strong {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 950;
}

.mg-auth-modern__register p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

.mg-auth-modern__register .register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mg-auth-modern__resend {
    margin-top: 12px;
    text-align: center;
}

.mg-auth-modern__resend button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--mg-blue);
    font-size: 12px;
    font-weight: 900;
}

.mg-auth-modern__resend button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    color: var(--text-muted);
}

.mg-auth-modern__separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin: 30px 0 18px;
    opacity: 0.72;
}

.mg-auth-modern__separator span {
    height: 1px;
    background: var(--border-color);
}

.mg-auth-modern__separator b {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
}

.mg-auth-modern__quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mg-auth-modern__quick-links div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 15px;
    color: var(--text-muted);
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 850;
}

.mg-auth-modern__quick-links i {
    color: var(--mg-purple);
}

.mg-auth-modern__rules {
    margin: 22px 0 0;
    color: var(--text-muted);
    text-align: center;
    font-size: 11px;
    line-height: 2.1;
}

.mg-auth-modern__rules a {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 3px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 900;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mg-auth-modern__rules a:hover,
.mg-auth-modern__rules a:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, var(--mg-blue), var(--mg-purple));
    border-color: transparent;
    outline: 0;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .mg-auth-modern {
        padding: 18px;
        align-items: flex-start;
    }

    .mg-auth-modern__shell {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 28px;
    }

    .mg-auth-modern__brand {
        display: none;
    }

    .mg-auth-modern__panel {
        padding: 46px 36px 36px;
    }

    .mg-auth-modern__mobile-brand {
        display: inline-flex;
    }

    .mg-auth-modern__home {
        top: 18px;
        left: 18px;
    }
}

@media (max-width: 720px) {
    .mg-auth-modern {
        padding: 12px;
    }

    .mg-auth-modern__panel {
        padding: 34px 18px 26px;
    }

    .mg-auth-modern__tabs {
        gap: 18px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mg-auth-modern__tabs::-webkit-scrollbar {
        display: none;
    }

    .mg-auth-modern__tabs button {
        white-space: nowrap;
        font-size: 14px;
    }

    .mg-auth-modern__otp-card {
        grid-template-columns: 1fr;
    }

    .mg-auth-modern__timer {
        min-height: 108px;
    }

    .mg-auth-modern__register .register-grid {
        grid-template-columns: 1fr;
    }

    .mg-auth-modern__quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .mg-auth-modern__shell {
        border-radius: 24px;
    }

    .mg-auth-modern__mobile-brand {
        margin-bottom: 26px;
    }

    .mg-auth-modern__mobile-brand .logo-mark {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .mg-auth-modern__mobile-brand strong {
        font-size: 21px;
    }

    .mg-auth-modern__stage-head h2 {
        font-size: 20px;
    }

    .mg-auth-modern__stage-head p {
        font-size: 13px;
    }

    .mg-auth-modern__otp-inputs {
        gap: 6px;
    }

    .mg-auth-modern__otp-inputs input {
        height: 49px;
        border-radius: 14px;
        font-size: 19px;
    }

    .mg-auth-modern__phone span {
        min-width: 56px;
    }

    .mg-auth-modern__phone input {
        padding-left: 72px;
        font-size: 14px;
    }

    .mg-auth-modern__submit {
        min-height: 66px;
        grid-template-columns: 44px minmax(0, 1fr) 34px;
        gap: 10px;
        padding: 10px;
        border-radius: 19px;
    }

    .mg-auth-modern__submit-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
        font-size: 16px;
    }

    .mg-auth-modern__submit-arrow {
        width: 34px;
        height: 34px;
        border-radius: 13px;
    }

    .mg-auth-modern__submit-copy strong {
        font-size: 14px;
    }

    .mg-auth-modern__submit-copy small {
        font-size: 10px;
    }
}
