/* Modern Authentication Styles - Glassmorphic Design with Animated Background */

/* Base Reset for Auth Pages */
.auth-body-modern *,
.auth-body-modern *::before,
.auth-body-modern *::after {
    box-sizing: border-box;
}

:root {
    --color-primary: #FF1867;
    --color-primary-dark: #E0155A;
    --color-primary-darker: #C0124E;
    --color-primary-light: #FF4585;
    --color-primary-lighter: #FF7BA3;
    --color-accent: #FF1867;
    --color-accent-dark: #E0155A;
    --color-accent-darker: #C0124E;
    --color-accent-light: #FF4585;
    /* Primary CTA (historical var name retained for submit / links) */
    --brand-yellow: #FF1867;
    --brand-yellow-dark: #E0155A;
    --brand-yellow-darker: #C0124E;
    --brand-navy: #0F3A6C;
    --brand-360-in-circle: #ffffff;
    /* Light theme neutrals */
    --auth-bg: #fafbfc;
    --auth-bg-subtle: #f1f5f9;
    --auth-card-bg: #ffffff;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: rgba(0, 0, 0, 0.08);
    --auth-border-focus: rgba(255, 24, 103, 0.35);
}

/* Light smooth background – as light as reference */
.auth-body-modern {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    background: #ffffff;
    font-family: "Poppins", sans-serif;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Subtle soft gradient overlay instead of stars */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(241, 245, 249, 0.9), transparent 70%);
    opacity: 1;
}

/* Terrain layers - very subtle light wave */
.terrain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 40%;
    background: linear-gradient(to top, rgba(241, 245, 249, 0.6), transparent);
    border-radius: 50% 50% 0 0;
    animation: moveTerrain 40s linear infinite;
}

.terrain-1 {
    height: 35%;
    background: linear-gradient(to top, rgba(248, 250, 252, 0.8), transparent);
    opacity: 0.7;
    animation-duration: 35s;
}

.terrain-2 {
    height: 30%;
    background: linear-gradient(to top, rgba(241, 245, 249, 0.5), transparent);
    opacity: 0.5;
    animation-duration: 45s;
    animation-direction: reverse;
}

.terrain-3 {
    height: 25%;
    background: linear-gradient(to top, rgba(226, 232, 240, 0.3), transparent);
    opacity: 0.4;
    animation-duration: 50s;
}

@keyframes moveTerrain {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Main Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Two-column split: form left (no card), tagline right */
.auth-split {
    display: flex;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-split-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem;
    box-sizing: border-box;
}

.auth-split-tagline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(255, 24, 103, 0.08) 0%, rgba(15, 58, 108, 0.05) 100%);
}

.auth-tagline-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.25rem, 3vw, 2rem);
    max-width: 640px;
    width: 100%;
}

.auth-tagline-illustration {
    display: block;
    width: 100%;
    max-width: min(520px, 94vw);
    height: auto;
    object-fit: contain;
}

.auth-tagline-text {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--brand-navy);
    margin: 0;
    text-align: center;
    max-width: 100%;
}

.auth-tagline-accent {
    color: var(--brand-yellow);
    font-weight: 500;
}

.auth-tagline-line2 {
    display: block;
    margin-top: 0.2em;
    white-space: nowrap;
}

/* Remove card when inside split – form sits directly on light background */
.auth-split .glass-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: 440px;
}

.auth-split .glass-card-wide {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: 540px;
}

.auth-split .glass-card::before,
.auth-split .glass-card-wide::before {
    display: none;
}

/* Main Container */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

/* Allow scrolling on smaller screens when content overflows */
@media (max-height: 700px) {
    .auth-container {
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Light card - smooth white (used when not in split) */
.glass-card {
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--auth-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 auto;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

/* Branding Container - Centered */
.auth-brand-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Branding */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--auth-text);
    transition: transform 0.2s;
}

.auth-brand:hover {
    transform: scale(1.05);
    color: var(--auth-text);
    text-decoration: none;
}

.auth-brand-image-wrap {
    gap: 0;
}

.auth-brand-image {
    display: block;
    height: clamp(96px, 16vw, 144px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Register: balanced density (roomier than before, still fits typical viewports) */
.auth-split .glass-card-wide .auth-brand-image {
    height: clamp(64px, 10vw, 96px);
}

.auth-split .glass-card-wide .auth-brand-container {
    margin-bottom: 0.4rem;
}

.auth-split .glass-card-wide .auth-title {
    font-size: clamp(1.45rem, 2.5vw, 1.72rem);
    margin-bottom: 0.28rem;
}

.auth-split .glass-card-wide .auth-subtitle {
    font-size: 0.875rem;
    margin-bottom: 0.72rem;
}

.auth-split .glass-card-wide .social-login-container {
    margin-bottom: 0.62rem;
    gap: 0.58rem;
}

.auth-split .glass-card-wide .social-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
}

.auth-split .glass-card-wide .auth-divider {
    margin: 0.62rem 0;
}

.auth-split .glass-card-wide .auth-form-row {
    margin-bottom: 0.48rem;
    gap: 0.8rem;
}

.auth-split .glass-card-wide .auth-input-group {
    margin-bottom: 0.72rem;
}

.auth-split .glass-card-wide .auth-input {
    min-height: 48px;
    padding: 0.72rem 0.72rem 0.72rem 2.8rem;
    font-size: 15px;
}

.auth-split .glass-card-wide .auth-input-icon {
    left: 0.9rem;
}

.auth-split .glass-card-wide .auth-input-password-toggle {
    top: 24px;
    right: 0.72rem;
}

.auth-split .glass-card-wide .auth-label {
    left: 2.8rem;
    top: 0.85rem;
    font-size: 0.8rem;
}

.auth-split .glass-card-wide .auth-input:focus~.auth-label,
.auth-split .glass-card-wide .auth-input:not(:placeholder-shown)~.auth-label,
.auth-split .glass-card-wide .auth-input.has-value~.auth-label {
    left: 0.72rem;
    font-size: 0.72rem;
}

.auth-split .glass-card-wide .auth-submit-btn {
    min-height: 48px;
    padding: 0.75rem;
    margin-bottom: 0.72rem;
    margin-top: 0.15rem;
}

.auth-split .glass-card-wide .auth-link-text {
    margin-top: 0.15rem;
    font-size: 0.875rem;
}

.auth-split .glass-card-wide .validation-summary-errors {
    margin-bottom: 0.55rem;
}

.auth-split-form:has(.glass-card-wide) .auth-container {
    padding: 1.2rem 1.4rem;
}

.auth-split-form:has(.glass-card-wide) {
    padding: 1.25rem 1.65rem;
}

/* Login, forgot/reset password, OTP, etc. — match register rhythm */
.auth-split .glass-card .auth-brand-image {
    height: clamp(72px, 12vw, 112px);
}

.auth-split .glass-card .auth-brand-container {
    margin-bottom: 0.4rem;
}

.auth-split .glass-card .auth-title {
    font-size: clamp(1.5rem, 2.8vw, 1.85rem);
    margin-bottom: 0.35rem;
}

.auth-split .glass-card .auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.auth-split .glass-card .social-login-container {
    margin-bottom: 0.95rem;
}

.auth-split .glass-card .auth-divider {
    margin: 0.85rem 0;
}

.auth-split .glass-card .auth-input-group {
    margin-bottom: 1.05rem;
}

.auth-split .glass-card .auth-input-group-compact {
    margin-bottom: 0.9rem;
}

.auth-split .glass-card .auth-input {
    min-height: 48px;
    padding: 0.72rem 0.72rem 0.72rem 2.8rem;
    font-size: 15px;
}

.auth-split .glass-card .auth-input-icon {
    left: 0.9rem;
}

.auth-split .glass-card .auth-input-password-toggle {
    top: 24px;
    right: 0.72rem;
}

.auth-split .glass-card .auth-label {
    left: 2.8rem;
    top: 0.85rem;
}

.auth-split .glass-card .auth-input:focus~.auth-label,
.auth-split .glass-card .auth-input:not(:placeholder-shown)~.auth-label,
.auth-split .glass-card .auth-input.has-value~.auth-label {
    left: 0.72rem;
}

.auth-split .glass-card .auth-options-compact {
    margin-bottom: 0.85rem;
}

.auth-split .glass-card .auth-divider-compact {
    margin: 0.85rem 0;
}

.auth-split .glass-card .auth-social-container-compact {
    margin-bottom: 0.9rem;
}

.auth-split .glass-card .auth-submit-btn,
.auth-split .glass-card .auth-submit-btn-compact {
    min-height: 48px;
    padding: 0.75rem;
    margin-bottom: 0.85rem;
}

.auth-split .glass-card .auth-link-text-compact {
    margin-top: 0.35rem;
}

.auth-split-form:has(.glass-card):not(:has(.glass-card-wide)) .auth-container {
    padding: 1.2rem 1.4rem;
}

.auth-split-form:has(.glass-card):not(:has(.glass-card-wide)) {
    padding: 1.25rem 1.65rem;
}

@media (max-width: 768px) {
    .auth-split .glass-card-wide .auth-input-half {
        margin-bottom: 0.55rem;
    }

    .auth-split-form:has(.glass-card-wide) .auth-container {
        padding: 0.85rem 1rem;
    }

    .auth-split-form:has(.glass-card):not(:has(.glass-card-wide)) .auth-container {
        padding: 0.85rem 1rem;
    }
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-360-in-circle);
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: baseline;
}

.brand-name-tuone {
    color: var(--brand-navy);
}

.brand-name-360 {
    color: var(--brand-yellow);
}

/* Headings */
.auth-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--auth-text);
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--auth-text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

/* Social Login Buttons */
.social-login-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    border: 1px solid var(--auth-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--auth-text);
    text-decoration: none;
    background: var(--auth-card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: var(--auth-text);
    text-decoration: none;
    background: var(--auth-bg-subtle);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Social Button Icons - Using SVG icons */
.social-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.social-btn-google svg {
    width: 22px;
    height: 22px;
}

.social-btn-facebook svg {
    width: 24px;
    height: 24px;
}

.social-btn-apple svg {
    width: 20px;
    height: 20px;
}

.social-btn-twitter svg {
    width: 18px;
    height: 18px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Form Inputs */
.auth-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Two Column Layout for Register Page */
.auth-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.auth-input-half {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .auth-form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-input-half {
        margin-bottom: 1rem;
    }
}

.auth-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    min-height: 52px;
    background: var(--auth-bg-subtle);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
}

.auth-input:focus {
    background: var(--auth-card-bg);
    border-color: var(--brand-yellow);
    border-width: 1px;
    box-shadow: none;
    outline: none;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1.1rem;
}

.auth-input-password-toggle {
    position: absolute;
    right: 1rem;
    top: 26px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color 0.2s;
    z-index: 2;
}

.auth-input-password-toggle:hover {
    color: var(--auth-text);
}

/* Floating Label */
.auth-label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.auth-input:focus~.auth-label,
.auth-input:not(:placeholder-shown)~.auth-label,
.auth-input.has-value~.auth-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-primary);
    background: var(--auth-card-bg);
    padding: 0 0.5rem;
    border-radius: 4px;
}

/* Remember Me & Forgot Password */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.auth-remember input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
    margin: 0;
}

.auth-forgot {
    color: var(--brand-yellow);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.25rem 0;
    -webkit-tap-highlight-color: transparent;
}

.auth-forgot:hover {
    color: var(--brand-yellow-dark);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    min-height: 52px;
    background: var(--brand-yellow);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus,
.auth-submit-btn:focus-visible,
.auth-submit-btn:active,
.auth-submit-btn:visited {
    color: #ffffff;
    text-decoration: none;
}

.auth-submit-btn:hover {
    background: var(--brand-yellow-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 24, 103, 0.35);
}

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

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Link Text */
.auth-link-text {
    text-align: center;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.auth-link {
    color: var(--brand-yellow);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.125rem 0;
    -webkit-tap-highlight-color: transparent;
}

.auth-link:hover,
.auth-link:active {
    color: var(--brand-yellow-dark);
    text-decoration: underline;
}

/* Back Link */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-top: 1rem;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--auth-text);
    text-decoration: none;
}

/* Validation Errors */
.field-validation-error,
.validation-summary-errors {
    color: #ff6b6b;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    display: block;
    line-height: 1.4;
    word-wrap: break-word;
}

.validation-summary-errors {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #991b1b;
}

.validation-summary-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-summary-errors li {
    margin-bottom: 0.25rem;
}

.validation-summary-errors li:last-child {
    margin-bottom: 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
}

/* Access Denied Icon */
.auth-access-denied-icon {
    font-size: 3.5rem;
    color: var(--auth-text-muted);
}

/* Email link styling for check email page */
.auth-link[href^="mailto:"] {
    text-decoration: none;
    transition: all 0.2s;
}

.auth-link[href^="mailto:"]:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

/* OTP Input Styling */
.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.otp-input::placeholder {
    letter-spacing: normal;
    font-weight: normal;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .otp-input {
        font-size: 1.25rem;
        letter-spacing: 0.375rem;
    }
}

@media (max-width: 400px) {
    .otp-input {
        font-size: 1.125rem;
        letter-spacing: 0.25rem;
    }
}

/* Alert Styles */
.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

/* Wider card for registration - light */
.glass-card-wide {
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--auth-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    width: 100%;
    max-width: 620px;
    position: relative;
    overflow: hidden;
}

.glass-card-wide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================ */

/* Large tablets and small desktops (992px and below) */
@media (max-width: 992px) {
    .auth-split {
        flex-direction: column;
        min-height: auto;
    }

    /* On mobile/tablet: hide welcome tagline */
    .auth-split-tagline {
        display: none;
    }

    .auth-split-form {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .glass-card {
        max-width: 460px;
    }

    .glass-card-wide {
        max-width: 580px;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .auth-split-form {
        padding: 1.5rem 1rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 20px;
    }

    .glass-card-wide {
        padding: 2rem 1.5rem;
        max-width: 100%;
        margin: 0.5rem;
    }

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

    .auth-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .social-login-container {
        gap: 0.625rem;
    }

    .social-btn {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }

    .auth-form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-input-half {
        margin-bottom: 1.25rem;
    }

    .auth-input-group {
        margin-bottom: 1.25rem;
    }

    .brand-name {
        font-size: 1.35rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Large phones (576px and below) */
@media (max-width: 576px) {
    .auth-container {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 1.25rem;
    }

    .glass-card {
        padding: 1.75rem 1.25rem;
        margin: 0.25rem;
        border-radius: 16px;
    }

    .glass-card-wide {
        padding: 1.75rem 1.25rem;
        margin: 0.25rem;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 0.375rem;
    }

    .auth-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .auth-brand-container {
        margin-bottom: 0.45rem;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .social-login-container {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .social-btn {
        width: 44px;
        height: 44px;
    }

    .auth-divider {
        margin: 0.75rem 0;
    }

    .auth-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        min-height: 48px;
        font-size: 16px;
        border-radius: 10px;
    }

    .auth-input-icon {
        left: 0.875rem;
        font-size: 1rem;
    }

    .auth-label {
        left: 2.75rem;
        font-size: 0.75rem;
    }

    .auth-input:focus~.auth-label,
    .auth-input:not(:placeholder-shown)~.auth-label,
    .auth-input.has-value~.auth-label {
        left: 0.625rem;
        font-size: 0.6875rem;
    }

    .auth-input-password-toggle {
        right: 0.875rem;
        font-size: 1rem;
        top: 24px;
        /* Half of 48px min-height at this breakpoint */
    }

    .auth-input-group {
        margin-bottom: 1rem;
    }

    .auth-input-half {
        margin-bottom: 1rem;
    }

    .auth-submit-btn {
        padding: 0.875rem;
        min-height: 48px;
        font-size: 0.9375rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }

    .auth-options {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        flex-wrap: nowrap;
    }

    .auth-remember {
        flex-shrink: 0;
    }

    .auth-remember span {
        white-space: nowrap;
    }

    .auth-forgot {
        white-space: nowrap;
        margin-left: auto;
    }

    .auth-link-text {
        font-size: 0.8125rem;
    }

    .auth-access-denied-icon {
        font-size: 3rem;
    }

    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* Small phones (425px and below) */
@media (max-width: 425px) {
    .auth-wrapper {
        min-height: 100vh;
        min-height: 100dvh;
        /* Dynamic viewport height for mobile browsers */
    }

    .auth-container {
        padding: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .glass-card {
        padding: 1.5rem 1.25rem;
        margin: 0;
        border-radius: 16px;
    }

    .glass-card-wide {
        padding: 1.5rem 1.25rem;
        margin: 0;
        border-radius: 16px;
    }

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

    .auth-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 1.25rem;
    }

    .brand-name {
        font-size: 1.125rem;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .social-btn {
        width: 42px;
        height: 42px;
    }

    .social-btn svg {
        width: 18px;
        height: 18px;
    }

    .auth-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        min-height: 46px;
    }

    .auth-input-icon {
        left: 0.75rem;
    }

    .auth-label {
        left: 2.5rem;
    }

    .auth-input:focus~.auth-label,
    .auth-input:not(:placeholder-shown)~.auth-label,
    .auth-input.has-value~.auth-label {
        left: 0.5rem;
    }

    .auth-input-password-toggle {
        right: 0.75rem;
        top: 23px;
        /* Half of 46px min-height at this breakpoint */
    }

    .auth-submit-btn {
        min-height: 46px;
    }

    .auth-remember {
        font-size: 0.8125rem;
    }

    .auth-forgot {
        font-size: 0.8125rem;
    }

    @media (max-width: 375px) {
        .auth-container {
            padding: 0.5rem;
        }

        .glass-card {
            padding: 1.25rem 1rem;
            border-radius: 14px;
        }

        .glass-card-wide {
            padding: 1.25rem 1rem;
            border-radius: 14px;
        }

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

        .auth-brand-container {
            margin-bottom: 0.4rem;
        }

        .social-btn {
            width: 40px;
            height: 40px;
        }

        .auth-input-group {
            margin-bottom: 0.875rem;
        }

        .auth-input-group-compact {
            margin-bottom: 0.875rem;
        }

        @media (max-width: 320px) {
            .auth-container {
                padding: 0.375rem;
            }

            .glass-card {
                padding: 1rem 0.875rem;
                border-radius: 12px;
            }

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

            .auth-subtitle {
                font-size: 0.75rem;
                margin-bottom: 1rem;
            }

            .brand-name {
                font-size: 1rem;
            }

            .brand-logo {
                width: 28px;
                height: 28px;
                font-size: 0.75rem;
            }

            .social-btn {
                width: 36px;
                height: 36px;
            }

            .social-btn svg {
                width: 16px;
                height: 16px;
            }

            .auth-input {
                min-height: 44px;
                font-size: 14px;
            }

            .auth-input-password-toggle {
                top: 22px;
                /* Half of 44px min-height at this breakpoint */
            }

            .auth-submit-btn {
                min-height: 44px;
                font-size: 0.875rem;
            }

            .auth-link-text {
                font-size: 0.75rem;
            }
        }

        /* Landscape orientation on mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .auth-wrapper {
                min-height: auto;
            }

            .auth-container {
                align-items: flex-start;
                padding: 0.5rem;
                min-height: auto;
            }

            .glass-card {
                padding: 1rem;
            }

            .auth-brand-container {
                margin-bottom: 0.35rem;
            }

            .auth-title {
                font-size: 1.25rem;
                margin-bottom: 0.25rem;
            }

            .auth-subtitle {
                font-size: 0.75rem;
                margin-bottom: 0.75rem;
            }

            .social-login-container {
                margin-bottom: 0.5rem;
            }

            .social-btn {
                width: 36px;
                height: 36px;
            }

            .auth-divider {
                margin: 0.5rem 0;
            }

            .auth-input-group {
                margin-bottom: 0.75rem;
            }

            .auth-input {
                min-height: 42px;
                padding: 0.625rem 0.625rem 0.625rem 2.25rem;
            }

            .auth-input-password-toggle {
                top: 21px;
                /* Half of 42px min-height in landscape */
            }

            .auth-submit-btn {
                min-height: 42px;
                padding: 0.625rem;
                margin-bottom: 0.75rem;
            }
        }

        /* High DPI / Retina displays */
        @media (-webkit-min-device-pixel-ratio: 2),
        (min-resolution: 192dpi) {
            .glass-card {
                border-width: 0.5px;
            }
        }

        /* Reduced motion preference */
        @media (prefers-reduced-motion: reduce) {

            .stars-layer,
            .terrain-layer {
                animation: none;
            }

            .auth-brand:hover {
                transform: none;
            }

            .social-btn:hover {
                transform: none;
            }

            .auth-submit-btn:hover {
                transform: none;
            }

            .auth-input,
            .auth-label,
            .auth-submit-btn,
            .social-btn {
                transition: none;
            }
        }

        /* Safe area insets for notched devices */
        @supports (padding: env(safe-area-inset-bottom)) {
            .auth-wrapper {
                padding-left: env(safe-area-inset-left);
                padding-right: env(safe-area-inset-right);
                padding-bottom: env(safe-area-inset-bottom);
            }
        }

        /* Focus visible for keyboard navigation */
        .auth-input:focus-visible {
            outline: none;
        }

        .auth-submit-btn:focus-visible,
        .social-btn:focus-visible,
        .auth-link:focus-visible,
        .auth-forgot:focus-visible,
        .auth-back-link:focus-visible {
            outline: 2px solid var(--brand-yellow);
            outline-offset: 2px;
        }

        /* ============================================
   UTILITY CLASSES - Replace inline styles
   ============================================ */

        /* Margin utilities */
        .mb-0 {
            margin-bottom: 0 !important;
        }

        .mb-025 {
            margin-bottom: 0.25rem !important;
        }

        .mb-05 {
            margin-bottom: 0.5rem !important;
        }

        .mb-075 {
            margin-bottom: 0.75rem !important;
        }

        .mb-1 {
            margin-bottom: 1rem !important;
        }

        .mb-125 {
            margin-bottom: 1.25rem !important;
        }

        .mb-15 {
            margin-bottom: 1.5rem !important;
        }

        .mb-2 {
            margin-bottom: 2rem !important;
        }

        .mt-0 {
            margin-top: 0 !important;
        }

        .mt-025 {
            margin-top: 0.25rem !important;
        }

        .mt-05 {
            margin-top: 0.5rem !important;
        }

        .mt-1 {
            margin-top: 1rem !important;
        }

        .my-1 {
            margin-top: 1rem !important;
            margin-bottom: 1rem !important;
        }

        /* Auth-specific utility classes for common inline style patterns */
        .auth-title-compact {
            margin-bottom: 0.25rem;
        }

        .auth-subtitle-compact {
            margin-bottom: 1.25rem;
        }

        .auth-social-container-compact {
            margin-bottom: 1rem;
        }

        .auth-divider-compact {
            margin: 1rem 0;
        }

        .auth-input-group-compact {
            margin-bottom: 1rem;
        }

        .auth-options-compact {
            margin-bottom: 1rem;
        }

        .auth-submit-btn-compact {
            margin-bottom: 1rem;
        }

        .auth-link-text-compact {
            margin-top: 0.5rem;
        }

        /* Icon container for OTP/Forgot Password pages */
        .auth-icon-container {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            color: white;
            font-size: 1.5rem;
        }

        /* Alert no-scheme warning */
        .auth-alert-no-scheme {
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.3);
            color: #92400e;
            border-radius: 12px;
            padding: 1rem;
        }

        .auth-alert-no-scheme p {
            margin: 0.5rem 0 0 0;
        }

        /* Email display on verify page */
        .auth-email-display {
            font-size: 1rem;
            font-weight: 600;
        }

        /* Success alert (resend confirmation) */
        .auth-alert-success {
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #065f46;
            border-radius: 12px;
            padding: 0.75rem;
            margin-bottom: 1rem;
            text-align: center;
        }

        /* Resend code section */
        .auth-resend-section {
            margin-top: 1rem;
            font-size: 0.875rem;
        }

        .auth-resend-form {
            display: inline;
        }

        .auth-resend-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            font-size: inherit;
            color: var(--color-primary);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s;
        }

        .auth-resend-btn:hover {
            color: var(--color-primary-dark);
            text-decoration: underline;
        }

        /* Registration success email display */
        .auth-registered-email-label {
            color: var(--auth-text-muted);
            font-size: 0.9rem;
        }

        .auth-registered-email {
            font-size: 1rem;
            font-weight: 600;
        }

        /* Registration success — clear vertical rhythm; flex gap prevents CTA/helper overlap */
        .auth-success-icon-wrap {
            text-align: center;
            margin-bottom: 1rem;
        }

        .auth-success-icon {
            margin-bottom: 0 !important;
        }

        .auth-success-title {
            margin-bottom: 0.4rem;
            text-align: center;
        }

        .auth-success-lead {
            margin-bottom: 1.25rem;
            text-align: center;
        }

        .auth-success-email-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            background: var(--auth-bg-subtle, #f1f5f9);
            border: 1px solid var(--auth-border, rgba(0, 0, 0, 0.08));
            border-radius: 12px;
            padding: 1rem 1.25rem;
            margin-bottom: 1.5rem;
        }

        .auth-success-email-card .auth-registered-email-label {
            display: block;
            margin-bottom: 0.35rem;
            font-size: 0.8125rem;
            color: var(--auth-text-muted, #64748b);
        }

        .auth-success-email-card .auth-success-email-value {
            display: block;
            word-break: break-word;
            font-size: 1rem;
            font-weight: 600;
            color: var(--brand-yellow, #FF1867);
        }

        .auth-success-cta-stack {
            display: flex;
            flex-direction: column;
            gap: 0.875rem;
            align-items: stretch;
        }

        .auth-success-cta-btn {
            margin-bottom: 0 !important;
            margin-top: 0 !important;
        }

        .auth-success-hint {
            margin: 0;
            padding: 0;
            text-align: center;
            color: var(--auth-text-muted, #64748b);
            font-size: 0.875rem;
            line-height: 1.55;
        }

        .auth-split .glass-card .auth-success-cta-btn {
            margin-bottom: 0 !important;
        }

        /* Submit button as link (for anchor tags styled as buttons) */
        .auth-submit-btn-link {
            display: block;
            text-align: center;
            text-decoration: none;
        }

        .auth-submit-btn-link:hover {
            color: var(--brand-360-in-circle) !important;
            text-decoration: none;
        }

        /* Email link display */
        .auth-email-link {
            font-size: 1.1rem;
            font-weight: 600;
            display: inline-block;
        }

        /* Resend help text */
        .auth-help-text {
            margin-top: 1rem;
            font-size: 0.875rem;
        }
    }
}