@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Keyframes (theme-aware via inherited vars) ─── */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes authSlideRight {
    from { opacity: 0; transform: translateX(-36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes authSlideLeft {
    from { opacity: 0; transform: translateX(36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0) rotate(var(--auth-rot, 0deg)); }
    50%      { transform: translateY(-14px) rotate(var(--auth-rot, 0deg)); }
}

@keyframes authFloatSlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(12px, -18px) scale(1.04); }
    66%      { transform: translate(-8px, 10px) scale(0.96); }
}

@keyframes authOrbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
    25%      { transform: translate(30px, -40px) scale(1.15); opacity: 0.75; }
    50%      { transform: translate(-20px, 20px) scale(0.9); opacity: 0.5; }
    75%      { transform: translate(15px, 35px) scale(1.08); opacity: 0.65; }
}

@keyframes authPulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--auth-glow); }
    50%      { box-shadow: 0 0 0 12px transparent; }
}

@keyframes authShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes authGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes authLogoPop {
    0%   { transform: scale(0.85); opacity: 0; }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes authPerkIn {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes authShotFloat1 {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes authShotFloat2 {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

@keyframes authModalPop {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes authDigitPop {
    0%   { transform: scale(0.9); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

@keyframes authMobilePreviewFloat {
    0%, 100% { transform: perspective(800px) rotateX(4deg) translateY(0); }
    50%      { transform: perspective(800px) rotateX(4deg) translateY(-5px); }
}

/* ─── Base ─── */
.auth-page {
    min-height: 100dvh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--auth-page-bg);
    color: var(--auth-text);
    overflow-x: hidden;
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    position: relative;
}

/* Login: form left · hero right */
.auth-shell-login .auth-form-side {
    order: 1;
}

.auth-shell-login .auth-hero {
    order: 2;
}

/* Soft seam between columns — no clip-path (was cutting off hero text) */
.auth-shell-login .auth-form-side::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--auth-secondary-rgb), 0.04));
    pointer-events: none;
    z-index: 1;
}

/* ─── Form-side mesh texture ─── */
.auth-mesh-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(var(--auth-accent-rgb), 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--auth-accent-rgb), 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

@keyframes authRingSpin {
    to { transform: rotate(360deg); }
}

@keyframes authSparkPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(1.15); }
}

/* ─── Gradient ring + glass card ─── */
.auth-card-glow {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 2px;
    border-radius: 24px;
    background: linear-gradient(
        135deg,
        var(--auth-accent),
        var(--auth-primary),
        rgba(var(--auth-secondary-rgb), 0.4),
        var(--auth-accent)
    );
    background-size: 300% 300%;
    animation: authGradientShift 8s ease infinite, authFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-shadow:
        0 24px 60px rgba(var(--auth-secondary-rgb), 0.12),
        0 0 0 1px rgba(var(--auth-accent-rgb), 0.08);
}

.auth-card-glow-wide {
    max-width: 740px;
    animation-name: authGradientShift, authSlideRight;
}

.auth-card-inner {
    position: relative;
    background: var(--auth-card-bg);
    border-radius: 22px;
    padding: 34px 30px 30px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.auth-card-inner-wide {
    padding: 32px 28px 26px;
}

.auth-card-spark {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--auth-accent-soft), transparent 70%);
    animation: authSparkPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.auth-brand-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--auth-accent-soft), transparent);
    border: 1px solid var(--auth-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-accent);
    background: var(--auth-accent-soft);
    border: 1px solid rgba(var(--auth-accent-rgb), 0.2);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 12px;
    animation: authFadeUp 0.5s ease 0.18s both;
}

.auth-eyebrow i {
    font-size: 0.95rem;
}

.auth-title {
    text-align: left;
}

.auth-subtitle {
    text-align: left;
}

.auth-subtitle strong {
    color: var(--auth-primary);
    font-weight: 700;
}

.auth-form .auth-field:last-of-type {
    margin-bottom: 0;
}

.auth-error {
    display: block;
    color: #dc3545;
    font-size: 0.78rem;
    margin-top: 4px;
}

.auth-input-wrap-toggle .auth-input {
    padding-right: 44px;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--auth-text-muted);
    padding: 6px;
    border-radius: 8px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.auth-pw-toggle:hover {
    color: var(--auth-accent);
    background: var(--auth-accent-soft);
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    color: var(--auth-text-muted);
    font-weight: 500;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-accent);
    cursor: pointer;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn i {
    font-size: 1.15rem;
    transition: transform 0.25s ease;
}

.auth-btn:hover i {
    transform: translateX(4px);
}

/* ─── Hero panel extras ─── */
.auth-hero-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-hero-spotlight {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 10%;
    left: 20%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
    pointer-events: none;
    animation: authFloatSlow 20s ease-in-out infinite;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
    animation: authFadeUp 0.6s ease 0.1s both;
}

.auth-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 12px var(--auth-accent);
    animation: authPulseGlow 2s ease-in-out infinite;
}

.auth-hero-title {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    animation: authFadeUp 0.7s ease 0.2s both;
    word-wrap: break-word;
}

.auth-hero-lead {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
    max-width: 100%;
    margin: 0;
    font-size: 0.95rem;
    animation: authFadeUp 0.7s ease 0.32s both;
}

.auth-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 4px;
    animation: authFadeUp 0.6s ease 0.4s both;
}

.auth-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 12px;
    backdrop-filter: blur(6px);
    transition: transform 0.2s, background 0.2s;
}

.auth-stat-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.auth-stat-chip i {
    font-size: 1.1rem;
    color: var(--auth-accent);
}

.auth-stat-chip strong {
    font-weight: 800;
    color: #fff;
}

.auth-perks-glass {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.auth-perk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(var(--new-prime-rgb), 0.25);
    flex-shrink: 0;
}

.auth-perk-icon i {
    font-size: 12px;
    color: var(--auth-accent);
    margin: 0;
    animation: none;
    filter: none;
}

.auth-perks-glass .auth-perk i:not(.auth-perk-icon i) {
    display: none;
}

.auth-shot-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(var(--auth-secondary-rgb), 0.75);
    backdrop-filter: blur(6px);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-shot-label i {
    font-size: 0.85rem;
    color: var(--auth-accent);
}


/* ─── Form side ambient shapes (theme orbs) ─── */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: authOrbDrift 14s ease-in-out infinite;
}

.auth-bg-orb-1 {
    width: 280px;
    height: 280px;
    background: var(--auth-orb-a);
    top: -80px;
    right: -60px;
    animation-duration: 16s;
}

.auth-bg-orb-2 {
    width: 220px;
    height: 220px;
    background: var(--auth-orb-b);
    bottom: 10%;
    left: -50px;
    animation-duration: 20s;
    animation-delay: -5s;
}

.auth-bg-orb-3 {
    width: 160px;
    height: 160px;
    background: var(--auth-accent-soft);
    bottom: -40px;
    right: 20%;
    animation-duration: 12s;
    animation-delay: -8s;
    opacity: 0.6;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 20px 50px rgba(var(--auth-secondary-rgb), 0.08);
    position: relative;
    z-index: 1;
    animation: authFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card-wide {
    max-width: 720px;
    animation: authSlideRight 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand {
    text-align: center;
    margin-bottom: 20px;
    animation: authLogoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

.auth-brand img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(var(--auth-accent-rgb), 0.15));
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    animation: authFadeUp 0.6s ease 0.2s both;
    background: linear-gradient(135deg, var(--auth-secondary), var(--auth-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.92rem;
    margin: 0 0 22px;
    line-height: 1.5;
    animation: authFadeUp 0.6s ease 0.3s both;
}

.auth-field {
    margin-bottom: 14px;
    animation: authFadeUp 0.55s ease both;
}

.auth-field:nth-child(1) { animation-delay: 0.35s; }
.auth-field:nth-child(2) { animation-delay: 0.42s; }
.auth-field:nth-child(3) { animation-delay: 0.49s; }
.auth-field:nth-child(4) { animation-delay: 0.56s; }

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i.mdi {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-accent);
    font-size: 18px;
    transition: transform 0.25s ease, color 0.25s ease;
}

.auth-input-wrap:focus-within i.mdi {
    transform: translateY(-50%) scale(1.12);
    color: var(--auth-primary);
}

.auth-input,
.auth-select,
.auth-textarea {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 11px 12px 11px 40px;
    font-size: 0.92rem;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    background: var(--auth-card-bg);
}

.auth-input.no-icon,
.auth-select,
.auth-textarea {
    padding-left: 12px;
}

.auth-textarea {
    min-height: 72px;
    resize: vertical;
}

.auth-input:focus,
.auth-select:focus,
.auth-textarea:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
    transform: translateY(-1px);
}

.auth-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(
        110deg,
        var(--auth-accent) 0%,
        var(--auth-primary) 45%,
        var(--auth-accent) 90%
    );
    background-size: 200% auto;
    box-shadow: 0 10px 24px var(--auth-btn-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: authFadeUp 0.6s ease 0.5s both, authPulseGlow 2.5s ease-in-out infinite 1s;
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    background-size: 200% 100%;
    animation: authShimmer 3s linear infinite;
    pointer-events: none;
}

.auth-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 16px 32px var(--auth-btn-shadow);
    background-position: right center;
    color: #fff;
    animation: authShimmer 1.5s linear infinite;
}

.auth-btn:active {
    transform: translateY(0) scale(0.99);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.auth-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 16px;
    font-size: 0.86rem;
    animation: authFadeUp 0.5s ease 0.45s both;
}

.auth-link-row a {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.auth-link-row a:hover {
    color: var(--auth-primary);
    transform: translateX(2px);
}

.auth-footer-text {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--auth-text-muted);
    animation: authFadeUp 0.5s ease 0.55s both;
}

.auth-footer-text a {
    color: var(--auth-accent);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer-text a:hover {
    color: var(--auth-primary);
}

.auth-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--auth-accent);
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--auth-border);
    animation: authFadeIn 0.5s ease both;
}

/* ─── Hero panel (env secondary → primary → hover) ─── */
.auth-hero {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(
        -45deg,
        var(--auth-hero-from),
        var(--auth-hero-mid),
        var(--auth-hero-to),
        var(--auth-primary)
    );
    background-size: 400% 400%;
    animation: authGradientShift 12s ease infinite;
    color: #fff;
    padding: 40px 36px 36px 44px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--new-prime-rgb), 0.35), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(var(--primary-rgb), 0.3), transparent 40%);
    animation: authFadeIn 1.2s ease;
}

.auth-hero-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    animation: authFloatSlow 18s ease-in-out infinite;
}

.auth-hero-orb-1 {
    width: 320px;
    height: 320px;
    top: -100px;
    right: -80px;
}

.auth-hero-orb-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: -60px;
    animation-delay: -6s;
    background: rgba(var(--new-prime-rgb), 0.12);
}

.auth-hero-orb-3 {
    width: 120px;
    height: 120px;
    top: 40%;
    right: 15%;
    animation-delay: -10s;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: authSlideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-perks {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.auth-perk {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    animation: authPerkIn 0.55s ease both;
}

.auth-perk:nth-child(1) { animation-delay: 0.45s; }
.auth-perk:nth-child(2) { animation-delay: 0.58s; }
.auth-perk:nth-child(3) { animation-delay: 0.71s; }
.auth-perk:nth-child(4) { animation-delay: 0.84s; }

.auth-perk i {
    color: var(--auth-accent);
    font-size: 18px;
    margin-top: 1px;
    filter: drop-shadow(0 0 6px rgba(var(--new-prime-rgb), 0.5));
    animation: authFloat 3s ease-in-out infinite;
}

.auth-perk:nth-child(2) i { animation-delay: -1s; }
.auth-perk:nth-child(3) i { animation-delay: -2s; }

.auth-hero-shots {
    margin-top: auto;
    padding-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: end;
    flex-shrink: 0;
    animation: authFadeUp 0.8s ease 0.6s both;
}

.auth-shot {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.3s, transform 0.3s;
    aspect-ratio: 16 / 10;
    max-height: 150px;
}

.auth-shot:hover {
    box-shadow: 0 20px 44px rgba(var(--new-prime-rgb), 0.22);
    transform: translateY(-3px);
}

.auth-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

.auth-shot-1 {
    animation: authShotFloat1 6s ease-in-out infinite;
}

.auth-shot-2 {
    animation: authShotFloat2 6.5s ease-in-out infinite;
    animation-delay: -2s;
}

.auth-terms {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.84rem;
    color: var(--auth-text-muted);
    margin: 12px 0 4px;
}

.auth-terms input {
    margin-top: 3px;
    accent-color: var(--auth-accent);
}

.auth-terms a {
    color: var(--auth-accent);
    font-weight: 600;
}

/* ─── OTP Modal ─── */
.otp-modal.show .modal-dialog {
    animation: authModalPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.otp-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(var(--auth-secondary-rgb), 0.22);
    background: var(--auth-card-bg);
    position: relative;
}

.otp-modal .modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-primary), var(--auth-accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.otp-modal .modal-header {
    border: 0;
    padding: 22px 24px 8px;
    background: linear-gradient(180deg, var(--auth-accent-soft), var(--auth-card-bg));
}

.otp-modal .modal-title {
    color: var(--auth-secondary);
}

.otp-modal .modal-body {
    padding: 8px 24px 24px;
}

.otp-delivery-note {
    background: var(--auth-accent-soft);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.86rem;
    color: var(--auth-text);
    line-height: 1.5;
    margin-bottom: 16px;
    border-left: 3px solid var(--auth-accent);
    animation: authFadeUp 0.4s ease both;
}

.otp-digits {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.otp-digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    color: var(--auth-secondary);
}

.otp-digit:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
    animation: authDigitPop 0.3s ease;
}

.otp-digit:not(:placeholder-shown) {
    border-color: var(--auth-primary);
    background: var(--auth-accent-soft);
}

.otp-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.otp-resend-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.otp-resend-btn {
    border: 1px solid var(--auth-border);
    background: var(--auth-card-bg);
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-text);
    transition: all 0.2s;
}

.otp-resend-btn:hover:not(:disabled) {
    border-color: var(--auth-accent);
    color: var(--auth-accent);
    background: var(--auth-accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--auth-glow);
}

.otp-resend-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.otp-resend-btn i {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--auth-accent);
}

/* Stagger row fields on register */
.auth-card-inner-wide .row > [class*="col-"] {
    animation: authFadeUp 0.5s ease both;
}

.auth-card-inner-wide .row > [class*="col-"]:nth-child(1) { animation-delay: 0.1s; }
.auth-card-inner-wide .row > [class*="col-"]:nth-child(2) { animation-delay: 0.15s; }
.auth-card-inner-wide .row > [class*="col-"]:nth-child(3) { animation-delay: 0.2s; }
.auth-card-inner-wide .row > [class*="col-"]:nth-child(4) { animation-delay: 0.25s; }
.auth-card-inner-wide .row > [class*="col-"]:nth-child(5) { animation-delay: 0.3s; }
.auth-card-inner-wide .row > [class*="col-"]:nth-child(6) { animation-delay: 0.35s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 991px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 100dvh;
        background: var(--auth-page-bg);
    }

    .auth-shell-login .auth-form-side::after {
        display: none;
    }

    /* ─── Mobile hero strip ─── */
    .auth-mobile-hero {
        position: relative;
        overflow: hidden;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 52px;
        color: #fff;
        z-index: 1;
    }

    .auth-mobile-hero-bg {
        position: absolute;
        inset: 0;
        background: linear-gradient(
            135deg,
            var(--auth-hero-from) 0%,
            var(--auth-hero-mid) 40%,
            var(--auth-hero-to) 75%,
            var(--auth-primary) 100%
        );
        background-size: 300% 300%;
        animation: authGradientShift 10s ease infinite;
    }

    .auth-mobile-hero-grid {
        position: absolute;
        inset: 0;
        opacity: 0.14;
        background-image:
            linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
        background-size: 24px 24px;
        mask-image: linear-gradient(180deg, #000 30%, transparent 90%);
    }

    .auth-mobile-hero-orb {
        position: absolute;
        border-radius: 50%;
        filter: blur(40px);
        pointer-events: none;
    }

    .auth-mobile-hero-orb-1 {
        width: 180px;
        height: 180px;
        top: -40px;
        right: -30px;
        background: rgba(var(--new-prime-rgb), 0.45);
        animation: authOrbDrift 12s ease-in-out infinite;
    }

    .auth-mobile-hero-orb-2 {
        width: 140px;
        height: 140px;
        bottom: 20px;
        left: -40px;
        background: rgba(255, 255, 255, 0.2);
        animation: authOrbDrift 16s ease-in-out infinite reverse;
    }

    .auth-mobile-hero-content {
        position: relative;
        z-index: 2;
        text-align: center;
        animation: authFadeUp 0.6s ease both;
    }

    .auth-mobile-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 18px;
        margin-bottom: 12px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.22);
        backdrop-filter: blur(10px);
        animation: authLogoPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    .auth-mobile-logo img {
        max-height: 40px;
        width: auto;
        object-fit: contain;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
    }

    .auth-mobile-title {
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.25;
        margin: 0 0 8px;
        letter-spacing: -0.02em;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }

    .auth-mobile-lead {
        font-size: 0.84rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.9);
        margin: 0 auto 14px;
        max-width: 320px;
    }

    .auth-mobile-chips {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding: 4px 2px 8px;
        margin: 0 -4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .auth-mobile-chips::-webkit-scrollbar {
        display: none;
    }

    .auth-mobile-chip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 0.72rem;
        font-weight: 600;
        white-space: nowrap;
        padding: 6px 12px;
        border-radius: 999px;
        color: #fff;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.22);
        backdrop-filter: blur(6px);
        animation: authFadeUp 0.5s ease both;
    }

    .auth-mobile-chip:nth-child(1) { animation-delay: 0.15s; }
    .auth-mobile-chip:nth-child(2) { animation-delay: 0.25s; }
    .auth-mobile-chip:nth-child(3) { animation-delay: 0.35s; }

    .auth-mobile-chip i {
        font-size: 0.85rem;
        color: var(--auth-accent);
        filter: drop-shadow(0 0 4px rgba(var(--new-prime-rgb), 0.6));
    }

    .auth-mobile-preview {
        position: relative;
        z-index: 2;
        margin-top: 16px;
        padding: 0 8px;
        animation: authFadeUp 0.7s ease 0.2s both;
    }

    .auth-mobile-preview-card {
        border-radius: 14px;
        overflow: hidden;
        border: 2px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
        transform: perspective(800px) rotateX(4deg);
        max-height: 120px;
        animation: authMobilePreviewFloat 5s ease-in-out infinite;
    }

    .auth-mobile-preview-card img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        object-position: top left;
        display: block;
    }

    .auth-mobile-wave {
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 48px;
        z-index: 3;
        pointer-events: none;
    }

    /* ─── Form overlaps hero wave ─── */
    .auth-form-side {
        padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
        margin-top: -32px;
        align-items: flex-start;
        min-height: auto;
        z-index: 4;
    }

    .auth-form-side .auth-brand {
        display: none;
    }

    .auth-card-glow,
    .auth-card-glow-wide {
        max-width: 100%;
        border-radius: 20px;
        box-shadow:
            0 20px 50px rgba(var(--auth-secondary-rgb), 0.14),
            0 4px 20px rgba(var(--auth-accent-rgb), 0.1);
    }

    .auth-card-inner,
    .auth-card-inner-wide {
        border-radius: 18px;
        padding: 26px 20px 22px;
    }

    .auth-eyebrow {
        display: flex;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-title,
    .auth-subtitle {
        text-align: center;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .auth-subtitle {
        font-size: 0.88rem;
        margin-bottom: 18px;
    }

    .auth-btn {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 14px;
    }

    .auth-mesh-grid {
        opacity: 0.25;
        mask-image: none;
    }

    .auth-bg-orb {
        opacity: 0.7;
        filter: blur(50px);
    }

    .auth-bg-orb-1 {
        width: 200px;
        height: 200px;
        top: 10%;
        right: -40px;
    }

    .auth-bg-orb-2 {
        width: 160px;
        height: 160px;
        bottom: 5%;
        left: -30px;
    }

    .auth-link-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .auth-footer-text {
        padding-bottom: 8px;
    }

    /* Desktop hero hidden on mobile anyway */
    .auth-hero {
        display: none !important;
    }

    .auth-card-glow-wide {
        animation-name: authGradientShift, authFadeUp;
    }
}

@media (max-height: 820px) and (min-width: 992px) {
    .auth-hero-shots {
        display: none;
    }

    .auth-hero {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .auth-stat-row {
        margin-top: 10px;
    }

    .auth-perks-glass {
        margin-top: 10px;
        padding: 10px 12px;
    }
}

@media (max-width: 576px) {
    .auth-mobile-hero {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 48px;
    }

    .auth-mobile-title {
        font-size: 1.2rem;
    }

    .auth-mobile-preview-card {
        max-height: 100px;
    }

    .auth-mobile-preview-card img {
        height: 100px;
    }

    .auth-form-side {
        padding-left: 14px;
        padding-right: 14px;
        margin-top: -28px;
    }

    .auth-card-inner,
    .auth-card {
        padding: 22px 16px 20px;
        border-radius: 16px;
    }

    .auth-card-glow {
        border-radius: 18px;
    }

    .auth-card-inner {
        border-radius: 16px;
    }

    .auth-input,
    .auth-select,
    .auth-textarea {
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 16px; /* prevents iOS zoom */
    }

    .auth-section-title {
        font-size: 0.72rem;
        margin-top: 14px;
    }

    .otp-modal .modal-dialog {
        margin: 12px;
    }

    .otp-resend-row {
        grid-template-columns: 1fr;
    }

    .otp-digit {
        width: 42px;
        height: 50px;
        font-size: 1.15rem;
    }

    .auth-bg-orb {
        opacity: 0.55;
    }
}
