/**
 * SignalWave Auth - Cyberpunk Command Center
 * A distinctive dark theme with electric accents and glowing glassmorphism
 */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    /* Core Palette */
    --sw-space: #050a15;
    --sw-void: #0a1425;
    --sw-deep: #0d1e36;
    --sw-surface: rgba(13, 30, 54, 0.7);

    /* Electric Accents */
    --sw-cyan: #00d4ff;
    --sw-cyan-glow: rgba(0, 212, 255, 0.4);
    --sw-cyan-dim: rgba(0, 212, 255, 0.15);
    --sw-amber: #ffb400;
    --sw-amber-glow: rgba(255, 180, 0, 0.4);
    --sw-amber-dim: rgba(255, 180, 0, 0.12);
    --sw-magenta: #ff0066;
    --sw-magenta-glow: rgba(255, 0, 102, 0.35);

    /* Text Hierarchy */
    --sw-text: #e8f4ff;
    --sw-text-dim: rgba(232, 244, 255, 0.6);
    --sw-text-muted: rgba(232, 244, 255, 0.4);

    /* Borders & Lines */
    --sw-line: rgba(0, 212, 255, 0.15);
    --sw-line-bright: rgba(0, 212, 255, 0.3);

    /* Shadows */
    --sw-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --sw-glow-sm: 0 0 20px var(--sw-cyan-glow);
    --sw-glow-md: 0 0 40px var(--sw-cyan-glow), 0 0 80px rgba(0, 212, 255, 0.2);
}

/* Full-layout reset for the rebuilt auth screens. The global app skin offsets
   content for dashboard pages; auth pages need a true edge-to-edge stage. */
body.blank-page.sw-module-skin .app-content.content,
body.blank-page.sw-module-skin .content-wrapper,
body.blank-page.sw-module-skin .content-body {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.blank-page.sw-module-skin .content-body {
    display: block !important;
    overflow-x: hidden;
}

/* Reference-style auth pages: dotted blue stage, split navy/white module, animated SVG scene. */
.rnx-auth-page {
    --rnx-blue: #087fb3;
    --rnx-blue-deep: #05628d;
    --rnx-navy: #081426;
    --rnx-ink: #061a32;
    --rnx-muted: #5d6f86;
    --rnx-line: #d5e4f4;
    --rnx-field: #e8f2ff;
    --rnx-accent: #007ec8;
    --rnx-accent-soft: #96d2e3;
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    width: 100%;
    margin-left: 0;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    display: grid;
    align-content: center;
    justify-items: center;
    overflow-x: clip;
    color: var(--rnx-ink);
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.88) 1.15px, transparent 1.35px) 0 0 / 9px 9px,
        linear-gradient(120deg, rgba(79, 178, 214, 0.95), rgba(0, 117, 169, 0.98) 45%, rgba(0, 103, 154, 1));
    box-sizing: border-box;
}

.rnx-auth-register-page {
    align-content: start;
    min-height: 100dvh;
    overflow-y: auto;
}

.rnx-auth-page *,
.rnx-auth-page *::before,
.rnx-auth-page *::after {
    box-sizing: border-box;
}

.rnx-auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 26%),
        radial-gradient(circle at 78% 70%, rgba(3, 24, 50, 0.28), transparent 30%);
}

.rnx-secure-pill {
    position: absolute;
    top: 1.55rem;
    right: 1.8rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: #1f344c;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(2, 20, 42, 0.16);
    font-size: 0.78rem;
    font-weight: 800;
}

.rnx-secure-pill svg {
    width: 15px;
    height: 15px;
    color: #1b78ba;
}

.rnx-auth-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 2.1rem 0 2rem;
    color: #ffffff !important;
    font-size: clamp(2rem, 3.1vw, 3.1rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    text-decoration: none;
    text-shadow: 0 14px 34px rgba(5, 26, 50, 0.22);
}

.rnx-brand-bubble {
    display: inline-flex;
    width: 72px;
    height: 52px;
    color: #ffffff;
    filter: drop-shadow(0 12px 24px rgba(4, 31, 58, 0.2));
}

.rnx-brand-bubble svg {
    width: 100%;
    height: 100%;
}

.rnx-brand-bubble path:first-child {
    fill: currentColor;
}

.rnx-brand-bubble path:last-child {
    fill: none;
    stroke: var(--rnx-blue);
    stroke-width: 4;
    stroke-linecap: round;
}

.rnx-auth-card {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100vw - 3rem));
    min-height: 646px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.95fr);
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 27, 58, 0.28);
    background: #ffffff;
}

.rnx-register-card {
    width: min(1220px, calc(100vw - 3rem));
    min-height: 720px;
    grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
}

.rnx-auth-art-panel {
    position: relative;
    min-height: 100%;
    padding: clamp(1.5rem, 2.2vw, 2.4rem);
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: center;
    overflow: hidden;
    color: #eef7ff;
    background:
        radial-gradient(circle at 50% 52%, rgba(36, 112, 190, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(9, 26, 49, 0.98), #071323);
}

.rnx-auth-art-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(123, 185, 242, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(123, 185, 242, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
}

.rnx-art-copy {
    position: relative;
    z-index: 1;
    align-self: start;
}

.rnx-art-kicker {
    display: inline-flex;
    padding: 0.42rem 1.3rem;
    border: 1px solid rgba(176, 210, 246, 0.22);
    border-radius: 999px;
    color: rgba(226, 239, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 800;
}

.rnx-art-copy h2 {
    margin: 1.25rem 0 0.65rem;
    color: #f3f8ff;
    font-size: 1.35rem;
    font-weight: 850;
}

.rnx-art-copy p {
    margin: 0;
    color: #9fb1ca;
    font-size: 1.1rem;
}

.rnx-auth-illustration {
    position: relative;
    z-index: 1;
    width: min(540px, 92%);
    max-height: 410px;
    align-self: center;
    justify-self: center;
    overflow: visible;
}

.rnx-auth-illustration.is-support {
    width: min(600px, 98%);
    max-height: 460px;
    align-self: start;
    margin-top: clamp(5rem, 15vh, 10rem);
    margin-bottom: 0;
}

.rnx-auth-illustration text {
    font-family: Montserrat, Arial, sans-serif;
}

.rnx-illo-soft {
    fill: #e8f2ff;
}

.rnx-illo-line {
    fill: none;
    stroke: #3d8eef;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 420;
    animation: rnx-line-draw 4.8s ease-in-out infinite;
}

.rnx-illo-float {
    animation: rnx-float 5.2s ease-in-out infinite;
}

.rnx-delay-1 {
    animation-delay: 0.35s;
}

.rnx-delay-2 {
    animation-delay: 0.7s;
}

.rnx-illo-person {
    animation: rnx-person 4.8s ease-in-out infinite;
    transform-origin: center bottom;
}

.rnx-illo-window,
.rnx-illo-plant {
    animation: rnx-soft-bob 6.4s ease-in-out infinite;
}

.rnx-illo-orbit {
    animation: rnx-soft-bob 7.2s ease-in-out infinite;
    transform-origin: center;
}

.rnx-illo-globe {
    animation: rnx-globe-drift 9s ease-in-out infinite;
    transform-origin: 274px 190px;
}

.rnx-illo-laptop {
    animation: rnx-laptop-pulse 4.8s ease-in-out infinite;
    transform-origin: center bottom;
}

.rnx-auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 3.2vw, 4.2rem);
    background: #ffffff;
}

body.sw-module-skin .rnx-auth-page .rnx-auth-form-panel,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-auth-form-panel {
    background: #ffffff !important;
    color: #061a32 !important;
}

body.sw-module-skin .rnx-auth-page .rnx-form-heading h1,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-heading h1,
body.sw-module-skin .rnx-auth-page .rnx-label-row label,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-label-row label,
body.sw-module-skin .rnx-auth-page .rnx-form-section h2,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-section h2 {
    color: #061a32 !important;
}

body.sw-module-skin .rnx-auth-page .rnx-form-heading p,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-heading p,
body.sw-module-skin .rnx-auth-page .rnx-auth-switch,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-auth-switch,
body.sw-module-skin .rnx-auth-page .rnx-check,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-check {
    color: #53657a !important;
}

.rnx-register-form-panel {
    justify-content: flex-start;
    max-height: none;
    overflow: visible;
}

.rnx-form-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.rnx-form-heading h1 {
    margin: 0 0 0.7rem;
    color: #061a32;
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.rnx-register-form-panel .rnx-form-heading h1 {
    font-size: clamp(2rem, 2.55vw, 2.45rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.rnx-form-heading p {
    margin: 0;
    color: #48617d;
    line-height: 1.65;
}

.rnx-demo-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: -0.5rem 0 1.35rem;
}

.rnx-demo-row button {
    border: 0;
    background: transparent;
    color: #007ec8;
    font-weight: 800;
}

.rnx-auth-form {
    display: grid;
    gap: 1.35rem;
}

.rnx-field {
    position: relative;
}

.rnx-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 1.6rem;
    margin-bottom: 0.55rem;
}

.rnx-label-row label,
.rnx-form-section h2 {
    margin: 0;
    color: #23354c;
    font-size: 0.92rem;
    font-weight: 850;
    letter-spacing: 0.01em;
}

.rnx-label-row a {
    color: #007ec8;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.rnx-label-row span {
    color: #f0ad00;
    font-weight: 900;
}

.rnx-field-icon,
.rnx-password-toggle {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 56px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #071a32;
    pointer-events: none;
}

.rnx-field-icon {
    left: 0;
}

.rnx-password-toggle {
    right: 0;
    border: 0;
    background: transparent;
    pointer-events: auto;
}

.rnx-field-icon svg,
.rnx-password-toggle svg {
    width: 17px;
    height: 17px;
}

.rnx-field input,
.rnx-field select,
.rnx-field .rnx-native-select,
.rnx-field .select2-container--default .select2-selection--single {
    width: 100%;
    min-height: 54px !important;
    border: 1px solid #bfd3ea !important;
    border-radius: 6px !important;
    background: var(--rnx-field) !important;
    color: #071a32 !important;
    font-weight: 600;
    box-shadow: none !important;
}

body.sw-module-skin .rnx-auth-page .rnx-field input,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field input,
body.sw-module-skin .rnx-auth-page .rnx-field select,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field select,
body.sw-module-skin .rnx-auth-page .rnx-field .rnx-native-select,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field .rnx-native-select,
body.sw-module-skin .rnx-auth-page .rnx-field .select2-container--default .select2-selection--single,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field .select2-container--default .select2-selection--single {
    background: #e8f2ff !important;
    border-color: #bfd3ea !important;
    color: #071a32 !important;
}

body.sw-module-skin .rnx-auth-page .rnx-field input::placeholder,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field input::placeholder {
    color: #60758f !important;
}

body.sw-module-skin .rnx-auth-page .rnx-submit,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-submit {
    background: #98d6e5 !important;
    color: #ffffff !important;
}

.rnx-field input {
    height: 54px !important;
    padding: 0.85rem 3.65rem !important;
    line-height: 1.25 !important;
}

body.sw-module-skin .rnx-auth-page .rnx-field input,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field input {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0.85rem 3.65rem !important;
    line-height: 1.25 !important;
}

.rnx-field select,
.rnx-field .rnx-native-select,
.rnx-field .select2-container--default .select2-selection--single {
    padding-left: 1rem;
    padding-right: 2.65rem;
}

.rnx-field .rnx-native-select {
    height: 54px !important;
    appearance: auto;
    cursor: pointer;
    line-height: 1.25 !important;
}

.rnx-field .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.rnx-field .select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.rnx-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding-left: 0.35rem !important;
    padding-right: 2rem !important;
    color: #071a32 !important;
    font-weight: 700;
    line-height: 1.25 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rnx-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0 !important;
    right: 0.55rem !important;
    width: 36px !important;
    height: 100% !important;
}

.rnx-field .select2-container--default .select2-selection--single .select2-selection__arrow b {
    left: auto !important;
    right: 0.4rem !important;
    margin: 0 !important;
    transform: translateY(-50%);
    border: 0 !important;
    width: 16px !important;
    height: 16px !important;
    background-size: 16px 16px !important;
    background-position: center !important;
}

.select2-container.select2-container--open {
    width: min(420px, calc(100vw - 2rem)) !important;
    max-width: min(420px, calc(100vw - 2rem)) !important;
}

.rnx-field .select2-container.select2-container--open {
    width: 100% !important;
    max-width: 100% !important;
}

.select2-container.rnx-auth-select-dropdown,
.select2-dropdown.rnx-auth-select-dropdown {
    max-width: min(420px, calc(100vw - 2rem)) !important;
}

.select2-container.rnx-auth-select-dropdown .select2-dropdown,
.select2-dropdown.rnx-auth-select-dropdown {
    max-width: min(420px, calc(100vw - 2rem)) !important;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.45) !important;
    border-radius: 10px !important;
    background: #071323 !important;
    box-shadow: 0 18px 48px rgba(3, 18, 35, 0.38) !important;
}

.select2-container.rnx-auth-select-dropdown .select2-search--dropdown,
.select2-dropdown.rnx-auth-select-dropdown .select2-search--dropdown {
    padding: 0.45rem !important;
}

.select2-container.rnx-auth-select-dropdown .select2-search__field,
.select2-dropdown.rnx-auth-select-dropdown .select2-search__field {
    width: 100% !important;
    min-height: 42px;
    border: 1px solid rgba(0, 212, 255, 0.55) !important;
    border-radius: 8px !important;
    color: #e8f4ff !important;
    background: #06101f !important;
}

.select2-container.rnx-auth-select-dropdown .select2-results__options,
.select2-dropdown.rnx-auth-select-dropdown .select2-results__options {
    max-height: 240px !important;
    overflow-y: auto !important;
}

.select2-container.rnx-auth-select-dropdown .select2-results__option,
.select2-dropdown.rnx-auth-select-dropdown .select2-results__option {
    color: #dcecff !important;
    background: transparent !important;
}

.select2-container.rnx-auth-select-dropdown .select2-results__option--highlighted,
.select2-dropdown.rnx-auth-select-dropdown .select2-results__option--highlighted {
    color: #061a32 !important;
    background: #98d6e5 !important;
}

.rnx-field input:focus,
.rnx-field select:focus,
.rnx-field .select2-container--focus .select2-selection--single {
    border-color: #007ec8 !important;
    box-shadow: 0 0 0 3px rgba(0, 126, 200, 0.14) !important;
}

.rnx-field-error,
.rnx-error-stack {
    margin-top: 0.5rem;
    color: #b4233b;
    font-size: 0.84rem;
    font-weight: 700;
}

.rnx-error-stack {
    display: grid;
    gap: 0.35rem;
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: #fff1f3;
}

.rnx-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #29405d;
    font-size: 0.94rem;
    font-weight: 650;
}

.rnx-check input {
    width: 18px;
    height: 18px;
    margin-top: 0.12rem;
    accent-color: #007ec8;
}

.rnx-check a,
.rnx-auth-switch a {
    color: #007ec8;
    font-weight: 850;
    text-decoration: none;
}

.rnx-submit {
    width: 100%;
    min-height: 60px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: linear-gradient(90deg, #98d6e5, #8fd1e1);
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(0, 126, 200, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.rnx-submit:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 18px 34px rgba(0, 126, 200, 0.24);
}

.rnx-auth-switch {
    margin: 1.35rem 0 0;
    text-align: center;
    color: #53657a;
    font-weight: 650;
}

.rnx-form-foot,
.rnx-social-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.35rem;
    color: #273b55;
    font-size: 0.9rem;
}

.rnx-form-foot span,
.rnx-social-row a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.rnx-form-foot svg,
.rnx-social-row svg {
    width: 16px;
    height: 16px;
}

.rnx-form-section {
    padding-top: 1.55rem;
    border-top: 1px solid #d7e5f4;
}

.rnx-form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.rnx-form-section h2 {
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rnx-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.35rem;
}

.rnx-field.is-wide {
    grid-column: 1 / -1;
}

.rnx-recaptcha {
    min-height: 1px;
}

@keyframes rnx-line-draw {
    0% { stroke-dashoffset: 420; }
    45%, 100% { stroke-dashoffset: 0; }
}

@keyframes rnx-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes rnx-person {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes rnx-soft-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes rnx-globe-drift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes rnx-laptop-pulse {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 rgba(85, 120, 245, 0)); }
    50% { transform: translateY(-4px); filter: drop-shadow(0 10px 18px rgba(85, 120, 245, 0.2)); }
}

@media (max-width: 991.98px) {
    .rnx-auth-page {
        padding: 1rem;
        align-content: start;
    }

    .rnx-secure-pill {
        display: none;
    }

    .rnx-auth-brand {
        margin: 1.4rem 0;
        font-size: 2rem;
    }

    .rnx-brand-bubble {
        width: 52px;
        height: 38px;
    }

    .rnx-auth-card,
    .rnx-register-card {
        width: min(100%, 560px);
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .rnx-auth-art-panel {
        display: none;
    }

    .rnx-auth-form-panel,
    .rnx-register-form-panel {
        max-height: none;
        overflow: visible;
        padding: 2rem;
    }

    .rnx-form-heading {
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    .rnx-auth-page {
        width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding: 0.75rem !important;
        display: block;
        justify-items: stretch;
    }

    .rnx-auth-brand {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        font-size: clamp(1.25rem, 8vw, 1.55rem);
        gap: 0.65rem;
        white-space: normal;
        text-align: center;
        line-height: 1.1;
    }

    .rnx-brand-bubble {
        width: 44px;
        min-width: 44px;
        height: 32px;
        flex: 0 0 auto;
    }

    .rnx-auth-card,
    .rnx-register-card {
        width: min(352px, calc(100vw - 2rem)) !important;
        max-width: min(352px, calc(100vw - 2rem)) !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-radius: 16px;
    }

    .rnx-auth-form-panel,
    .rnx-register-form-panel {
        min-width: 0;
        padding: 1rem !important;
    }

    .rnx-form-heading h1 {
        font-size: 1.8rem;
    }

    .rnx-register-form-panel .rnx-form-heading h1 {
        font-size: clamp(1.35rem, 6vw, 1.7rem);
        line-height: 1.15;
    }

    .rnx-label-row {
        display: block;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .rnx-label-row a {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.78rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .rnx-field input {
        padding-left: 2.55rem !important;
        padding-right: 2.55rem !important;
    }

    .rnx-field-icon,
    .rnx-password-toggle {
        width: 42px;
    }

    .rnx-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rnx-illo-line,
    .rnx-illo-float,
    .rnx-illo-person,
    .rnx-illo-window,
    .rnx-illo-plant,
    .rnx-illo-orbit,
    .rnx-illo-globe,
    .rnx-illo-laptop {
        animation: none !important;
    }
}

/* ============================================
   Base Overrides
   ============================================ */
.sw-auth-shell.auth-wrapper.auth-cover {
    background: var(--sw-space) !important;
    min-height: 100vh;
    position: relative;
}

.sw-auth-shell.auth-wrapper.auth-cover .auth-inner {
    min-height: 100vh;
    background: var(--sw-space) !important;
    position: relative;
    overflow: hidden;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

/* Animated grid background - GPU optimized */
.sw-auth-shell.auth-wrapper.auth-cover .auth-inner::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, var(--sw-line) 1px, transparent 1px),
        linear-gradient(180deg, var(--sw-line) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    will-change: transform;
    pointer-events: none;
}

/* Radial glow overlays */
.sw-auth-shell.auth-wrapper.auth-cover .auth-inner::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, var(--sw-cyan-dim) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, var(--sw-amber-dim) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   Brand Logo
   ============================================ */
.sw-auth-shell .brand-logo {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 20, 37, 0.8);
    border: 1px solid var(--sw-line);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.sw-auth-shell .brand-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    filter: drop-shadow(0 0 12px var(--sw-cyan-glow));
}

.sw-auth-shell .brand-logo .signalwave-brand-wordmark {
    color: var(--sw-amber) !important;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px var(--sw-amber-glow);
}

/* ============================================
   Visual Panel (Left Side)
   ============================================ */
.sw-auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 6rem 3rem 3rem;
    background: transparent;
}

.sw-auth-visual-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Animated Logo */
.sw-auth-logo-wrap {
    width: 140px;
    height: 140px;
    margin-bottom: 2rem;
    position: relative;
}

.sw-auth-logo-wrap::before {
    content: "";
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--sw-cyan-glow) 0%, transparent 70%);
    animation: logo-pulse 3s ease-in-out infinite;
    border-radius: 50%;
}

.sw-auth-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px var(--sw-cyan-glow));
}

@keyframes logo-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.sw-auth-tagline {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--sw-text) !important;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px var(--sw-cyan-glow);
}

.sw-auth-subline {
    font-size: 1rem;
    color: var(--sw-text-dim) !important;
    max-width: 400px;
    line-height: 1.6;
}

.sw-auth-visual img {
    max-height: 50vh;
    margin-top: 2rem;
    filter: drop-shadow(0 20px 60px rgba(0, 212, 255, 0.2));
    animation: float 6s ease-in-out infinite;
}

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

/* ============================================
   Form Panel (Right Side)
   ============================================ */
.sw-auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
    background: linear-gradient(135deg, rgba(10, 20, 37, 0.95), rgba(5, 10, 21, 0.98));
    border-left: 1px solid var(--sw-line);
}

.sw-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: var(--sw-surface);
    border: 1px solid var(--sw-line-bright);
    border-radius: 16px;
    box-shadow:
        var(--sw-shadow),
        0 0 60px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* Glowing top edge */
.sw-auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sw-cyan), var(--sw-amber), var(--sw-cyan), transparent);
    animation: glow-line 3s ease-in-out infinite;
}

@keyframes glow-line {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================
   Card Header
   ============================================ */
.sw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sw-cyan);
    background: linear-gradient(135deg, var(--sw-cyan-dim), transparent);
    border: 1px solid var(--sw-line);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.sw-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--sw-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sw-cyan);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.sw-auth-card .card-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--sw-text) !important;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.sw-auth-card .card-text {
    font-size: 0.95rem;
    color: var(--sw-text-dim) !important;
    margin-bottom: 2rem;
}

/* ============================================
   Form Elements
   ============================================ */
.sw-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sw-auth-form .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sw-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.sw-auth-form .form-label.required::after {
    content: " *";
    color: var(--sw-amber);
}

/* Input Groups */
.sw-auth-form .input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.sw-auth-form .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: rgba(5, 10, 21, 0.8) !important;
    border: 1px solid var(--sw-line) !important;
    border-right: none !important;
    color: var(--sw-cyan);
    font-size: 1rem;
    transition: all 0.25s ease;
}

.sw-auth-form .input-group-text i {
    width: 18px;
    height: 18px;
}

.sw-auth-form .form-control {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--sw-text);
    background: rgba(5, 10, 21, 0.9) !important;
    border: 1px solid var(--sw-line) !important;
    border-radius: 0 8px 8px 0;
    transition: all 0.25s ease;
}

.sw-auth-form .form-control:focus {
    outline: none;
    border-color: var(--sw-cyan) !important;
    box-shadow: 0 0 0 3px var(--sw-cyan-dim), var(--sw-glow-sm) !important;
    background: rgba(5, 10, 21, 0.95) !important;
}

.sw-auth-form .form-control::placeholder {
    color: var(--sw-text-muted);
}

.sw-auth-form .form-control.is-invalid {
    border-color: var(--sw-magenta) !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 102, 0.15) !important;
}

/* Password Toggle */
.sw-auth-form .form-password-toggle .input-group-text:last-child {
    width: 48px;
    border-left: 1px solid var(--sw-line) !important;
    border-right: none !important;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-auth-form .form-password-toggle .form-control {
    border-right: none;
    border-radius: 0;
}

.sw-auth-form .form-password-toggle .input-group-text:last-child:hover {
    color: var(--sw-amber);
    background: rgba(255, 180, 0, 0.1) !important;
}

/* Select */
.sw-auth-form .select2,
.sw-auth-form .form-select {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--sw-text);
    background: rgba(5, 10, 21, 0.9) !important;
    border: 1px solid var(--sw-line) !important;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.sw-auth-form .select2:focus,
.sw-auth-form .form-select:focus {
    outline: none;
    border-color: var(--sw-cyan) !important;
    box-shadow: 0 0 0 3px var(--sw-cyan-dim), var(--sw-glow-sm) !important;
}

/* Checkbox */
.sw-auth-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sw-auth-form .form-check-input {
    width: 18px;
    height: 18px;
    background: rgba(5, 10, 21, 0.9);
    border: 1px solid var(--sw-line);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-auth-form .form-check-input:checked {
    background: var(--sw-cyan);
    border-color: var(--sw-cyan);
    box-shadow: 0 0 10px var(--sw-cyan-glow);
}

.sw-auth-form .form-check-label {
    font-size: 0.875rem;
    color: var(--sw-text-dim);
    cursor: pointer;
}

/* ============================================
   Error Messages
   ============================================ */
.sw-form-errors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sw-form-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #ff6b7a;
    background: rgba(255, 0, 102, 0.1);
    border: 1px solid rgba(255, 0, 102, 0.25);
    border-radius: 8px;
}

.sw-form-error i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   Gradient Button
   ============================================ */
.sw-btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--sw-space);
    background: linear-gradient(135deg, var(--sw-cyan) 0%, #0099cc 50%, var(--sw-amber) 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow:
        0 4px 20px rgba(0, 212, 255, 0.35),
        0 0 40px rgba(0, 212, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sw-btn-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.sw-btn-gradient:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(0, 212, 255, 0.5),
        0 0 60px rgba(0, 212, 255, 0.25);
}

.sw-btn-gradient:hover::before {
    left: 100%;
}

.sw-btn-gradient:active {
    transform: translateY(-1px);
}

.sw-btn-gradient i {
    width: 18px;
    height: 18px;
}

/* ============================================
   Links
   ============================================ */
.sw-link {
    color: var(--sw-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sw-link:hover {
    color: var(--sw-amber);
    text-shadow: 0 0 15px var(--sw-amber-glow);
}

.sw-link-sm {
    color: var(--sw-text-dim);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sw-link-sm:hover {
    color: var(--sw-cyan);
}

.sw-auth-switch {
    font-size: 0.95rem;
    color: var(--sw-text-dim);
}

.sw-auth-legal {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.sw-auth-legal a {
    color: var(--sw-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sw-auth-legal a:hover {
    color: var(--sw-cyan);
}

/* ============================================
   Social Buttons
   ============================================ */
.sw-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--sw-text-dim);
    background: rgba(5, 10, 21, 0.8);
    border: 1px solid var(--sw-line);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sw-social-btn:hover {
    color: var(--sw-cyan);
    border-color: var(--sw-cyan);
    background: var(--sw-cyan-dim);
    transform: translateY(-3px);
    box-shadow: var(--sw-glow-sm);
}

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

/* Divider */
.sw-auth-form .divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.sw-auth-form .divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sw-line), transparent);
}

.sw-auth-form .divider-text {
    position: relative;
    padding: 0 1rem;
    font-size: 0.8rem;
    color: var(--sw-text-muted);
    background: transparent;
}

/* ============================================
   Form Sections (Register)
   ============================================ */
.sw-form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--sw-line);
}

.sw-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sw-form-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sw-amber);
    margin-bottom: 1rem;
}

/* ============================================
   Select2 Theme Override
   ============================================ */
.sw-auth-form .select2-container--default .select2-selection--single {
    background: rgba(5, 10, 21, 0.9) !important;
    border: 1px solid var(--sw-line) !important;
    border-radius: 8px;
    height: auto;
    padding: 0;
}

.sw-auth-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--sw-text);
    padding: 0.85rem 1rem;
}

.sw-auth-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 0.75rem;
}

.sw-auth-form .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--sw-cyan) transparent transparent transparent;
}

.sw-auth-form .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--sw-cyan) transparent;
}

.sw-auth-form .select2-dropdown {
    background: rgba(10, 20, 37, 0.98) !important;
    border: 1px solid var(--sw-line-bright);
    border-radius: 8px;
    backdrop-filter: blur(20px);
}

.sw-auth-form .select2-results__option {
    color: var(--sw-text);
    padding: 0.75rem 1rem;
}

.sw-auth-form .select2-results__option--highlighted[aria-selected] {
    background: var(--sw-cyan-dim) !important;
    color: var(--sw-cyan);
}

.sw-auth-form .select2-results__option[aria-selected=true] {
    background: var(--sw-amber-dim) !important;
    color: var(--sw-amber);
}

/* ============================================
   Demo Mode Shortcuts
   ============================================ */
.admin-login,
.customer-login,
.dlt-login {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-login {
    color: var(--sw-cyan);
    border: 1px solid var(--sw-line);
    background: var(--sw-cyan-dim);
}

.admin-login:hover {
    background: rgba(0, 212, 255, 0.25);
    box-shadow: var(--sw-glow-sm);
}

.customer-login {
    color: var(--sw-amber);
    border: 1px solid var(--sw-line);
    background: var(--sw-amber-dim);
}

.customer-login:hover {
    background: rgba(255, 180, 0, 0.25);
    box-shadow: 0 0 20px var(--sw-amber-glow);
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */
@media (max-width: 991.98px) {
    .sw-auth-visual {
        display: none !important;
    }

    .sw-auth-panel {
        border-left: none;
        padding: 5rem 1.5rem 2rem;
        align-items: flex-start;
    }

    .sw-auth-card {
        max-width: 100%;
        width: 100%;
    }
}

/* Tablet adjustments */
@media (min-width: 576px) and (max-width: 991.98px) {
    .sw-auth-card {
        max-width: 540px;
        margin: 0 auto;
    }
}

/* Mobile (< 576px) - Full width forms */
@media (max-width: 575.98px) {
    /* Brand logo - smaller on mobile */
    .sw-auth-shell .brand-logo {
        position: fixed;
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.35rem 0.65rem;
        gap: 0.5rem;
        z-index: 1000;
    }

    .sw-auth-shell .brand-logo img {
        width: 28px;
        height: 28px;
    }

    .sw-auth-shell .brand-logo .signalwave-brand-wordmark {
        font-size: 0.9rem;
    }

    /* Auth panel - full height, scrollable */
    .sw-auth-panel {
        padding: 5rem 1rem 1.5rem;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Auth card - compact padding */
    .sw-auth-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .sw-auth-card .card-title {
        font-size: 1.35rem;
    }

    .sw-auth-card .card-text {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .sw-kicker {
        font-size: 0.65rem;
        padding: 0.35rem 0.65rem;
        margin-bottom: 0.75rem;
    }

    /* Form spacing - tighter on mobile */
    .sw-auth-form {
        gap: 1rem;
    }

    .sw-auth-form .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .sw-auth-form .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }

    .sw-auth-form .form-control,
    .sw-auth-form .select2,
    .sw-auth-form .form-select {
        padding: 0.75rem 0.85rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Input groups - full width touch targets */
    .sw-auth-form .input-group-text {
        width: 44px;
        padding: 0.75rem;
    }

    .sw-auth-form .form-password-toggle .input-group-text:last-child {
        width: 44px;
    }

    /* Button - larger touch target */
    .sw-btn-gradient {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        min-height: 52px;
    }

    /* Form sections - stacked layout */
    .sw-register-card .sw-form-section {
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .sw-register-card .sw-form-section-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }

    /* Error messages - smaller padding */
    .sw-form-error {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
    }

    /* Legal links - smaller text */
    .sw-auth-legal {
        font-size: 0.7rem;
        gap: 0.75rem;
    }

    /* Social buttons - maintain size for touch */
    .sw-social-btn {
        width: 44px;
        height: 44px;
    }

    /* Switch text */
    .sw-auth-switch {
        font-size: 0.9rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .sw-auth-panel {
        padding-top: 4rem;
    }

    .sw-auth-card {
        padding: 1rem;
    }

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

/* ============================================
   Focus States - Accessibility
   ============================================ */
.sw-auth-form .form-control:focus,
.sw-auth-form .form-select:focus,
.sw-auth-form .btn:focus,
.sw-auth-form .form-check-input:focus {
    outline: none;
}

/* Custom focus indicators - visible but stylish */
.sw-auth-form .form-control:focus-visible,
.sw-auth-form .form-select:focus-visible {
    border-color: var(--sw-cyan) !important;
    box-shadow:
        0 0 0 3px var(--sw-cyan-dim),
        0 0 15px var(--sw-cyan-glow) !important;
}

.sw-auth-form .btn:focus-visible {
    box-shadow:
        0 0 0 3px var(--sw-cyan-dim),
        0 0 20px var(--sw-cyan-glow) !important;
}

.sw-auth-form .form-check-input:focus-visible {
    box-shadow:
        0 0 0 3px var(--sw-cyan-dim),
        0 0 10px var(--sw-cyan-glow) !important;
}

/* Skip link for accessibility */
.sw-auth-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: var(--sw-cyan);
    color: var(--sw-space);
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.sw-auth-skip-link:focus {
    top: 0;
    outline: 3px solid var(--sw-amber);
    outline-offset: 2px;
}

/* ============================================
   Utilities
   ============================================ */

/* Visually hidden but accessible */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .sw-auth-form .form-control:focus,
    .sw-auth-form .form-select:focus,
    .sw-auth-form .btn:focus,
    .sw-auth-form .form-check-input:focus {
        outline: 3px solid CanvasText !important;
        outline-offset: 2px !important;
    }

    .sw-btn-gradient {
        border: 2px solid CanvasText !important;
    }
}

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

    .sw-auth-logo-wrap::before,
    .sw-kicker::before {
        animation: none !important;
    }
}

/* SignalWave auth refresh: dedicated animated lock/signal mark and cleaner auth composition. */
.sw-auth-shell {
    --sw-auth-navy: #050b17;
    --sw-auth-panel: rgba(8, 22, 42, 0.9);
    --sw-auth-panel-strong: rgba(7, 18, 34, 0.96);
    --sw-auth-cyan: #1cd6ff;
    --sw-auth-blue: #1778ff;
    --sw-auth-green: #24e889;
    --sw-auth-yellow: #ffd33d;
    --sw-auth-text: #edf6ff;
    --sw-auth-muted: rgba(226, 239, 255, 0.68);
    --sw-auth-line: rgba(116, 197, 255, 0.24);
}

.sw-auth-shell.auth-wrapper.auth-cover,
.sw-auth-shell.auth-wrapper.auth-cover .auth-inner {
    background:
        linear-gradient(118deg, rgba(28, 214, 255, 0.12) 0 22%, transparent 22% 100%),
        linear-gradient(142deg, rgba(255, 211, 61, 0.09) 0 18%, transparent 18% 100%),
        radial-gradient(circle at 18% 20%, rgba(28, 214, 255, 0.16), transparent 34%),
        radial-gradient(circle at 82% 76%, rgba(36, 232, 137, 0.1), transparent 32%),
        #050b17 !important;
}

.sw-auth-shell .brand-logo {
    min-height: 58px;
    border-color: rgba(116, 197, 255, 0.28);
    background: rgba(6, 17, 32, 0.84);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sw-auth-shell .brand-logo img {
    display: none;
}

.sw-auth-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    isolation: isolate;
}

.sw-auth-mark.is-compact {
    width: 38px;
    height: 38px;
}

.sw-auth-mark::before {
    content: "";
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28, 214, 255, 0.24), transparent 68%);
    filter: blur(2px);
    animation: sw-auth-aura 3.6s ease-in-out infinite;
}

.sw-auth-mark-svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 20px rgba(28, 214, 255, 0.34));
}

.sw-auth-mark-ring {
    fill: rgba(7, 18, 34, 0.88);
    stroke: url("#swAuthMarkGradient");
    stroke-width: 1.6;
    stroke-dasharray: 8 7;
    filter: url("#swAuthMarkGlow");
    animation: sw-auth-ring 12s linear infinite;
    transform-origin: 48px 48px;
}

.sw-auth-mark-orbit {
    fill: none;
    stroke: url("#swAuthMarkGradient");
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 72;
    animation: sw-auth-wave 3.2s linear infinite;
}

.sw-auth-mark-orbit.is-second {
    opacity: 0.72;
    animation-delay: 0.5s;
}

.sw-auth-mark-core {
    fill: rgba(9, 33, 58, 0.92);
    stroke: url("#swAuthMarkGradient");
    stroke-width: 2;
}

.sw-auth-mark-lock {
    fill: none;
    stroke: var(--sw-auth-yellow);
    stroke-width: 4;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(255, 211, 61, 0.46));
}

.sw-auth-mark-node {
    fill: var(--sw-auth-green);
    filter: drop-shadow(0 0 10px rgba(36, 232, 137, 0.65));
    animation: sw-auth-node 2.2s ease-in-out infinite;
    transform-origin: 48px 48px;
}

.sw-auth-logo-wrap {
    width: 160px;
    height: 160px;
    margin-bottom: 2rem;
}

.sw-auth-logo-wrap::before {
    display: none;
}

.sw-auth-visual {
    background:
        linear-gradient(180deg, rgba(6, 17, 32, 0.18), rgba(6, 17, 32, 0.72)),
        transparent;
}

.sw-auth-visual-inner {
    max-width: 520px;
}

.sw-auth-tagline {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.95;
    max-width: 560px;
}

.sw-auth-subline {
    font-size: 1.05rem;
    color: var(--sw-auth-muted) !important;
}

.sw-auth-constellation {
    position: relative;
    width: min(430px, 80vw);
    height: 170px;
    margin-top: 2rem;
}

.sw-auth-constellation::before,
.sw-auth-constellation::after {
    content: "";
    position: absolute;
    inset: 50% 8% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(28, 214, 255, 0.6), rgba(255, 211, 61, 0.54), transparent);
    transform: rotate(-8deg);
}

.sw-auth-constellation::after {
    transform: rotate(10deg);
    opacity: 0.62;
}

.sw-auth-constellation span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sw-auth-cyan);
    box-shadow: 0 0 20px rgba(28, 214, 255, 0.65);
    animation: sw-auth-node 2.8s ease-in-out infinite;
}

.sw-auth-constellation span:nth-child(1) {
    left: 9%;
    top: 45%;
}

.sw-auth-constellation span:nth-child(2) {
    left: 47%;
    top: 26%;
    background: var(--sw-auth-green);
    animation-delay: 0.35s;
}

.sw-auth-constellation span:nth-child(3) {
    right: 10%;
    top: 56%;
    background: var(--sw-auth-yellow);
    animation-delay: 0.7s;
}

.sw-auth-panel {
    background: linear-gradient(145deg, rgba(8, 22, 42, 0.92), rgba(4, 13, 26, 0.96));
}

.sw-auth-card {
    border-radius: 10px;
    border-color: rgba(116, 197, 255, 0.3);
    background: linear-gradient(150deg, rgba(10, 31, 56, 0.92), rgba(5, 14, 28, 0.92));
}

.sw-auth-form .input-group-text,
.sw-auth-form .form-control,
.sw-auth-form .form-select,
.sw-auth-form .select2-container--default .select2-selection--single {
    border-radius: 8px;
}

.sw-btn-gradient {
    border-radius: 8px !important;
}

@keyframes sw-auth-aura {
    0%, 100% { opacity: 0.54; transform: scale(0.96); }
    50% { opacity: 0.95; transform: scale(1.08); }
}

@keyframes sw-auth-ring {
    to { transform: rotate(360deg); }
}

@keyframes sw-auth-wave {
    from { stroke-dashoffset: 72; }
    to { stroke-dashoffset: -72; }
}

@keyframes sw-auth-node {
    0%, 100% { transform: scale(0.9); opacity: 0.78; }
    50% { transform: scale(1.16); opacity: 1; }
}

@media (max-width: 991.98px) {
    .sw-auth-shell .brand-logo {
        left: 1rem;
        top: 1rem;
    }

    .sw-auth-panel {
        min-height: 100dvh;
        padding: 6.5rem 1rem 2rem;
        border-left: 0;
    }

    .sw-auth-card {
        max-width: 100%;
        padding: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sw-auth-mark::before,
    .sw-auth-mark-ring,
    .sw-auth-mark-orbit,
    .sw-auth-mark-node,
    .sw-auth-constellation span {
        animation: none !important;
    }
}

/* ============================================
   Alert Overrides
   ============================================ */
.sw-auth-form .alert {
    border-radius: 8px;
    border-width: 1px;
}

.sw-auth-form .alert-danger {
    background: rgba(255, 0, 102, 0.1);
    border-color: rgba(255, 0, 102, 0.3);
    color: #ff6b7a;
}

.sw-auth-form .alert-validation-msg {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--sw-cyan);
}

/* ============================================
   Register Card Adjustments
   ============================================ */
.sw-register-card {
    max-width: 520px;
}

.sw-register-shell .sw-auth-panel {
    overflow-y: auto;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 6rem 2rem 2rem;
}

/* Ensure form sections stack properly on mobile */
@media (max-width: 767.98px) {
    .sw-register-card .sw-form-section .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }

    .sw-register-card .sw-form-section .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

/* Final auth viewport fixes after legacy auth rules. */
.sw-auth-shell .auth-inner.row {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.sw-auth-shell .sw-auth-panel,
.sw-auth-shell .sw-auth-visual {
    min-width: 0;
}

.sw-auth-shell .sw-auth-card {
    max-width: min(440px, calc(100vw - 32px));
}

.sw-register-shell .sw-auth-card {
    max-width: min(760px, calc(100vw - 32px));
}

.sw-register-shell .sw-auth-panel {
    align-items: flex-start;
    justify-content: center;
    max-height: none;
    overflow-y: visible;
    padding-top: 7rem;
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .sw-register-shell .sw-auth-panel {
        max-height: 100dvh;
        overflow-y: auto;
    }
}

@media (max-width: 575.98px) {
    .sw-auth-shell.auth-wrapper.auth-cover {
        overflow-x: hidden;
    }

    .sw-auth-shell.auth-wrapper.auth-cover .auth-inner {
        display: block !important;
        width: 100vw;
        overflow-x: hidden;
    }

    .sw-auth-shell .brand-logo {
        width: calc(100vw - 32px);
        justify-content: center;
    }

    .sw-auth-shell .sw-auth-panel {
        display: block !important;
        width: 100%;
        max-width: 100vw;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .sw-auth-shell .sw-auth-card {
        box-sizing: border-box !important;
        flex: 0 1 auto !important;
        width: calc(100vw - 96px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 96px) !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }

    .sw-auth-shell .sw-auth-card *,
    .sw-auth-shell .sw-auth-card *::before,
    .sw-auth-shell .sw-auth-card *::after {
        box-sizing: border-box;
    }

    .sw-auth-card .card-title {
        font-size: 1.24rem !important;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .sw-auth-card .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .sw-auth-form .input-group {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .sw-auth-form,
    .sw-auth-switch,
    .sw-auth-legal {
        padding-right: 2rem;
    }

    .sw-auth-form .sw-btn-gradient {
        width: calc(100% - 2rem);
    }

    .sw-auth-form .form-control,
    .sw-auth-form .form-select {
        min-width: 0;
        width: 1% !important;
        max-width: 100%;
    }
}

/* Admin-managed Midnight Bloom bridge for auth screens. */
body.sw-module-skin .rnx-auth-page {
    --rnx-blue: var(--sw-secondary);
    --rnx-blue-deep: var(--sw-primary);
    --rnx-navy: var(--sw-sidebar);
    --rnx-ink: var(--sw-text);
    --rnx-muted: var(--sw-muted);
    --rnx-line: var(--sw-border);
    --rnx-field: var(--sw-input-bg);
    --rnx-accent: var(--sw-primary);
    --rnx-accent-soft: var(--sw-secondary);
    color: var(--sw-text) !important;
    background:
        radial-gradient(circle, rgba(var(--sw-secondary-rgb), 0.42) 1.1px, transparent 1.35px) 0 0 / 9px 9px,
        linear-gradient(120deg, var(--sw-bg), var(--sw-sidebar) 48%, var(--sw-panel-strong)) !important;
}

body.sw-module-skin .rnx-secure-pill {
    color: var(--sw-text) !important;
    background: var(--sw-panel) !important;
    border: 1px solid var(--sw-border) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 0 24px rgba(var(--sw-glow-rgb), calc(var(--sw-glow-strength) * 0.65)) !important;
}

body.sw-module-skin .rnx-secure-pill svg,
body.sw-module-skin .rnx-brand-bubble path:last-child {
    color: var(--sw-secondary) !important;
    stroke: var(--sw-secondary) !important;
}

body.sw-module-skin .rnx-auth-brand {
    color: var(--sw-text) !important;
    text-shadow: 0 14px 34px rgba(var(--sw-glow-rgb), calc(var(--sw-glow-strength) * 0.72)) !important;
}

body.sw-module-skin .rnx-auth-card,
body.sw-module-skin .rnx-register-card {
    background: var(--sw-panel) !important;
    border: 1px solid var(--sw-border) !important;
    border-radius: var(--sw-radius) !important;
    box-shadow: var(--sw-shadow) !important;
}

body.sw-module-skin .rnx-auth-art-panel {
    color: var(--sw-text) !important;
    background:
        radial-gradient(circle at 50% 52%, rgba(var(--sw-primary-rgb), 0.18), transparent 36%),
        linear-gradient(180deg, rgba(var(--sw-sidebar-rgb), 0.98), var(--sw-bg)) !important;
}

body.sw-module-skin .rnx-auth-art-panel::before {
    background:
        linear-gradient(90deg, rgba(var(--sw-secondary-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(var(--sw-secondary-rgb), 0.08) 1px, transparent 1px) !important;
    background-size: 48px 48px !important;
}

body.sw-module-skin .rnx-auth-form-panel,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-auth-form-panel {
    background: var(--sw-panel) !important;
    color: var(--sw-text) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-form-heading h1,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-heading h1,
body.sw-module-skin .rnx-auth-page .rnx-label-row label,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-label-row label,
body.sw-module-skin .rnx-auth-page .rnx-form-section h2,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-section h2,
body.sw-module-skin .rnx-art-copy h2 {
    color: var(--sw-text) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-form-heading p,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-form-heading p,
body.sw-module-skin .rnx-auth-page .rnx-auth-switch,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-auth-switch,
body.sw-module-skin .rnx-auth-page .rnx-check,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-check,
body.sw-module-skin .rnx-art-copy p,
body.sw-module-skin .rnx-form-foot,
body.sw-module-skin .rnx-social-row {
    color: var(--sw-muted) !important;
}

body.sw-module-skin .rnx-art-kicker,
body.sw-module-skin .rnx-form-section {
    border-color: var(--sw-border) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-field input,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field input,
body.sw-module-skin .rnx-auth-page .rnx-field select,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field select,
body.sw-module-skin .rnx-auth-page .rnx-field .rnx-native-select,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field .rnx-native-select,
body.sw-module-skin .rnx-auth-page .rnx-field .select2-container--default .select2-selection--single,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field .select2-container--default .select2-selection--single {
    background: var(--sw-input-bg) !important;
    border-color: var(--sw-border) !important;
    color: var(--sw-text) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-field input::placeholder,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-field input::placeholder,
body.sw-module-skin .rnx-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--sw-muted) !important;
}

body.sw-module-skin .rnx-field-icon,
body.sw-module-skin .rnx-password-toggle,
body.sw-module-skin .rnx-label-row a,
body.sw-module-skin .rnx-check a,
body.sw-module-skin .rnx-auth-switch a {
    color: var(--sw-secondary) !important;
}

body.sw-module-skin .rnx-field input:focus,
body.sw-module-skin .rnx-field select:focus,
body.sw-module-skin .rnx-field .select2-container--focus .select2-selection--single {
    border-color: var(--sw-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--sw-glow-rgb), calc(var(--sw-glow-strength) * 0.64)) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-submit,
body.dark-layout.sw-module-skin .rnx-auth-page .rnx-submit,
body.sw-module-skin .rnx-submit {
    background: var(--sw-button-gradient) !important;
    color: var(--sw-bg) !important;
    box-shadow: 0 12px 28px rgba(var(--sw-glow-rgb), var(--sw-glow-strength)) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-auth-form-panel,
body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-register-form-panel {
    background: var(--sw-panel) !important;
    color: var(--sw-text) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-form-heading h1,
body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-label-row label,
body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-form-section h2 {
    color: var(--sw-text) !important;
}

body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-form-heading p,
body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-auth-switch,
body.sw-module-skin .rnx-auth-page .rnx-auth-card .rnx-check {
    color: var(--sw-muted) !important;
}
