/* ==========================================================================
   MAGNITUDE CMS - MODERN LOGIN DESIGN SYSTEM
   Zero-Scroll 100vh Fit & Solar System Orbital Animation
   ========================================================================== */

:root {
    --mag-primary: #1E70E5;
    --mag-primary-hover: #1557BF;
    --mag-primary-dark: #0D47A1;
    --mag-primary-light: #EFF6FF;
    --mag-primary-border: #DBEAFE;
    
    --mag-cyan: #06B6D4;
    --mag-indigo: #4F46E5;
    --mag-sky: #0284C7;
    --mag-teal: #0D9488;
    
    --mag-navy-900: #0F172A;
    --mag-navy-800: #1E293B;
    --mag-slate-600: #475569;
    --mag-slate-500: #64748B;
    --mag-slate-400: #94A3B8;
    --mag-slate-200: #E2E8F0;
    --mag-slate-100: #F1F5F9;
    --mag-slate-50:  #F8FAFC;
    
    --mag-white: #FFFFFF;
    --mag-card-bg: #FFFFFF;
    --mag-shadow-card: 0 16px 40px -8px rgba(15, 60, 130, 0.11), 0 3px 12px rgba(0, 0, 0, 0.03);
    --mag-shadow-btn: 0 6px 18px rgba(30, 112, 229, 0.32);
    --mag-radius-card: 22px;
    --mag-radius-input: 11px;
    --mag-radius-btn: 50px;
    
    --mag-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   STRICT VIEWPORT & ZERO-SCROLL SETUP (DESKTOP)
   ========================================================================== */
html, body#Body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    font-family: var(--mag-font) !important;
    background: #F4F8FD !important;
    color: var(--mag-navy-900) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    box-sizing: border-box !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Page Frame */
.modern-login-page {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #F8FAFD 0%, #EDF4FB 45%, #E3EEF9 100%);
    overflow: hidden;
}

/* Ambient Visual Waves */
.bg-ambient-wave {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.bg-wave-bottom-right {
    bottom: -100px;
    right: -80px;
    width: 720px;
    height: 620px;
    background: radial-gradient(circle at 75% 75%, rgba(13, 80, 160, 0.95) 0%, rgba(26, 115, 232, 0.85) 45%, rgba(59, 130, 246, 0.35) 70%, transparent 85%);
    border-radius: 46% 54% 38% 62% / 58% 42% 58% 42%;
    filter: blur(25px);
    opacity: 0.92;
    animation: gentleMorph 18s ease-in-out infinite alternate;
}

.bg-wave-accent-curve {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 580px;
    height: 440px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

.bg-glow-hero {
    position: absolute;
    top: 20%;
    left: 15%;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    filter: blur(45px);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   MAIN CONTAINER (TWO-SECTION BALANCED GRID)
   ========================================================================== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px 4px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex: 1;
    min-height: 0;
}

/* ==========================================================================
   LEFT SECTION: HERO & SOLAR SYSTEM ORBITAL ANIMATION
   ========================================================================== */
.hero-section {
    flex: 1 1 56%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Top Branding & Headlines */
.hero-header-wrap {
    margin-bottom: 8px;
}

.hero-title {
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--mag-navy-900);
    margin: 0 0 6px 0;
}

.hero-title-gradient {
    color: var(--mag-primary);
    background: linear-gradient(135deg, #1E70E5 0%, #0284C7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--mag-slate-500);
    font-weight: 400;
    margin: 0;
    max-width: 500px;
}

/* ==========================================================================
   SOLAR SYSTEM CELESTIAL STAGE
   ========================================================================== */
.solar-system-stage {
    position: relative;
    width: 440px;
    height: 440px;
    margin: 40px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ambient Radial Glow */
.solar-ambient-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 70%);
    filter: blur(25px);
    pointer-events: none;
    z-index: 2;
}

/* Central Core: Magnitude Sun */
.solar-core {
    position: absolute;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFFFFF 0%, #F0F6FF 70%, #E2EDFC 100%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(30, 112, 229, 0.22), 0 0 45px rgba(30, 112, 229, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    animation: corePulse 4s ease-in-out infinite;
    cursor: default;
}

.core-logo-img {
    height: 58px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.06));
    transition: transform 0.3s ease;
}

.solar-core:hover .core-logo-img {
    transform: scale(1.06);
}

/* Orbital Rings (Concentric Tracks) */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: border-color 0.3s ease;
}

/* Inner Orbit (Diameter 210px) */
.orbit-ring-inner {
    width: 210px;
    height: 210px;
    border: 1.5px dashed rgba(37, 99, 235, 0.26);
    z-index: 8;
    animation: orbitRotateCW 22s linear infinite;
}

/* Middle Orbit (Diameter 320px) */
.orbit-ring-middle {
    width: 320px;
    height: 320px;
    border: 1.5px dashed rgba(6, 182, 212, 0.24);
    z-index: 7;
    animation: orbitRotateCCW 28s linear infinite;
}

/* Outer Orbit (Diameter 426px) */
.orbit-ring-outer {
    width: 426px;
    height: 426px;
    border: 1.5px dashed rgba(37, 99, 235, 0.20);
    z-index: 6;
    animation: orbitRotateCW 36s linear infinite;
}

/* Pause on Hover */
.solar-system-stage:hover .orbit-ring {
    animation-play-state: paused;
}

/* ==========================================================================
   PLANET SLOTS & COUNTER-ROTATING TAG ORBS
   ========================================================================== */
.planet-slot {
    position: absolute;
    pointer-events: auto;
}

/* Slot Positions on Rings */
.slot-planet-1 {
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.slot-planet-2 {
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.slot-planet-3 {
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.slot-planet-4 {
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.slot-planet-5 {
    top: 14%;
    right: 0%;
}

/* Counter-Rotation so text stays upright! */
.orbit-ring-inner .planet-orb {
    animation: counterRotateCW 22s linear infinite;
}

.orbit-ring-middle .planet-orb {
    animation: counterRotateCCW 28s linear infinite;
}

.orbit-ring-outer .planet-orb {
    animation: counterRotateCW 36s linear infinite;
}

.solar-system-stage:hover .planet-orb {
    animation-play-state: paused;
}

/* Planet Orb Badge */
.planet-orb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.85);
    padding: 4px 12px 4px 4px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    cursor: default;
    user-select: none;
}

.planet-orb:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 24px rgba(30, 112, 229, 0.22);
    background: #FFFFFF;
    border-color: var(--mag-primary);
}

/* 3D Planet Sphere */
.planet-sphere {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

.planet-orb:hover .planet-sphere {
    transform: scale(1.08);
}

/* Planet Gradients & Glowing Halos */
.sphere-blue {
    background: radial-gradient(circle at 35% 35%, #60A5FA 0%, #1E70E5 65%, #0F489B 100%);
    box-shadow: 0 0 12px rgba(30, 112, 229, 0.5);
}

.sphere-cyan {
    background: radial-gradient(circle at 35% 35%, #67E8F9 0%, #06B6D4 65%, #0E7490 100%);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.sphere-indigo {
    background: radial-gradient(circle at 35% 35%, #818CF8 0%, #4F46E5 65%, #312E81 100%);
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.5);
}

.sphere-sky {
    background: radial-gradient(circle at 35% 35%, #38BDF8 0%, #0284C7 65%, #0369A1 100%);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.5);
}

.sphere-teal {
    background: radial-gradient(circle at 35% 35%, #5EEAD4 0%, #0D9488 65%, #115E59 100%);
    box-shadow: 0 0 12px rgba(13, 148, 136, 0.5);
}

/* Planet Tag Label */
.planet-tag-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--mag-navy-900);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* ==========================================================================
   RIGHT SECTION: AUTHENTICATION CARD (COMPACT FOR 100vh)
   ========================================================================== */
.auth-section {
    flex: 0 0 420px;
    display: flex;
    justify-content: center;
    z-index: 20;
    animation: cardSlideIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card {
    width: 100%;
    background: var(--mag-card-bg);
    border-radius: var(--mag-radius-card);
    box-shadow: var(--mag-shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.85);
    padding: 26px 30px 22px 30px;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Card Logo */
.card-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.card-magnitude-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.card-magnitude-logo:hover {
    transform: scale(1.03);
}

/* Card Header Text */
.card-header-group {
    text-align: center;
    margin-bottom: 25px;
}

.card-title {
    font-size: 23px;
    font-weight: 700;
    color: var(--mag-navy-900);
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
}

.card-subtitle {
    font-size: 13.5px;
    color: var(--mag-slate-500);
    font-weight: 400;
    margin: 0;
}

/* Form Groups & Inputs */
.modern-form {
    margin: 0;
    padding: 0;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--mag-slate-50);
    border: 1.5px solid var(--mag-slate-200);
    border-radius: var(--mag-radius-input);
    height: 48px;
    padding: 0 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:hover {
    border-color: #CBD5E1;
    background: #FFFFFF;
}

.input-wrapper:focus-within {
    border-color: var(--mag-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(30, 112, 229, 0.12);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mag-slate-400);
    margin-right: 10px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--mag-primary);
}

.modern-input {
    border: none !important;
    background: transparent !important;
    font-family: var(--mag-font) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--mag-navy-900) !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.modern-input::placeholder {
    color: var(--mag-slate-400);
    font-weight: 400;
}

/* Password Toggle */
.password-toggle-btn {
    border: none !important;
    background: transparent !important;
    color: var(--mag-slate-400) !important;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    outline: none !important;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--mag-navy-900) !important;
}

.password-toggle-btn.active {
    color: var(--mag-primary) !important;
}

/* Forgot Password Row */
.form-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 2px 0 16px 0;
}

.forgot-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mag-primary) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.forgot-link:hover {
    color: var(--mag-primary-hover) !important;
    transform: translateX(2px);
}

.forgot-link .arrow {
    font-size: 14px;
    line-height: 1;
}

/* Login Submit Button */
.modern-btn-submit {
    width: 100%;
    height: 48px;
    border: none !important;
    border-radius: var(--mag-radius-btn);
    background: linear-gradient(135deg, #1E70E5 0%, #1557BF 100%);
    color: #FFFFFF !important;
    font-family: var(--mag-font) !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--mag-shadow-btn);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none !important;
}

.modern-btn-submit:hover {
    background: linear-gradient(135deg, #2578EC 0%, #175ECF 100%);
    box-shadow: 0 8px 22px rgba(30, 112, 229, 0.42);
    transform: translateY(-2px);
}

.modern-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(30, 112, 229, 0.25);
}

.modern-btn-submit .btn-arrow {
    transition: transform 0.2s ease;
}

.modern-btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Powered by AI Divider */
.ai-divider {
    display: flex;
    align-items: center;
    margin: 16px 0 12px 0;
    gap: 10px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.divider-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: normal;
    color: var(--mag-slate-400);
}

/* AI Callout Banner Card */
.ai-callout-card {
    background: linear-gradient(135deg, #F0F7FF 0%, #E8F2FD 100%);
    border: 1px solid #D0E5FC;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

.ai-callout-card:hover {
    transform: translateY(-1px);
}

.callout-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(30, 112, 229, 0.14);
}

.callout-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--mag-navy-900);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.callout-desc {
    font-size: 10.5px;
    color: var(--mag-slate-500);
    line-height: 1.3;
}

/* ==========================================================================
   FOOTER (COMPACT ZERO-SCROLL BAR)
   ========================================================================== */
.modern-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 10px 36px 14px 36px;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--mag-slate-500);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-left svg {
    color: var(--mag-slate-400);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-right a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.footer-right a:hover {
    color: #E0F2FE;
    text-decoration: underline;
}

.footer-sep {
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   MODAL & PROGRESS OVERLAY
   ========================================================================== */
.modal.fade.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(6px);
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.modal.fade.modern-modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Hidden whenever .in is removed (Login.js success path removes only the class) */
.modal.fade.modern-modal:not(.in) {
    display: none !important;
}

.modern-modal-dialog {
    width: 100%;
    max-width: 420px;
    margin: 20px;
}

.modern-modal-content {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 24px 26px 20px 26px;
}

.modern-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
}

.modal-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--mag-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mag-primary);
    flex-shrink: 0;
}

.modern-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mag-navy-900);
    margin: 0 0 2px 0;
}

.modern-modal-subtitle {
    font-size: 12.5px;
    color: var(--mag-slate-500);
    margin: 0;
    line-height: 1.35;
}

.modern-close-btn {
    border: none !important;
    background: var(--mag-slate-100) !important;
    color: var(--mag-slate-500) !important;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-close-btn:hover {
    background: var(--mag-slate-200) !important;
    color: var(--mag-navy-900) !important;
}

.modern-modal-body {
    margin-bottom: 25px;
}

.modern-input-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mag-navy-900);
    margin-bottom: 6px;
}

.modern-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.modern-btn-cancel {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--mag-slate-200) !important;
    background: #FFFFFF !important;
    color: var(--mag-slate-600) !important;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.modern-btn-confirm {
    height: 40px;
    padding: 0 22px;
    border: none !important;
    background: var(--mag-primary) !important;
    color: #FFFFFF !important;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(30, 112, 229, 0.3);
}

.modern-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    border-radius: var(--mag-radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modern-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.modern-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #DBEAFE;
    border-top: 3px solid var(--mag-primary);
    border-radius: 50%;
    animation: modernSpin 0.8s linear infinite;
}

.spinner-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--mag-navy-900);
}

/* ==========================================================================
   jALERT POPUP STYLES
   ========================================================================== */
#popup_container {
    font-family: var(--mag-font) !important;
    background: #FFFFFF !important;
    border: 1px solid var(--mag-slate-200) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2) !important;
    overflow: hidden !important;
    min-width: 320px !important;
    max-width: 420px !important;
}

#popup_title {
    background: #F8FAFC !important;
    border-bottom: 1px solid var(--mag-slate-200) !important;
    color: var(--mag-navy-900) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 12px 18px !important;
    margin: 0 !important;
}

#popup_content {
    padding: 18px !important;
    font-size: 14px !important;
    color: var(--mag-slate-600) !important;
}

#popup_message {
    padding-left: 0 !important;
    background: none !important;
    line-height: 1.45 !important;
}

#popup_panel {
    text-align: right !important;
    margin-top: 16px !important;
}

#popup_ok {
    background: var(--mag-primary) !important;
    border: none !important;
    color: #FFFFFF !important;
    padding: 8px 22px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(30, 112, 229, 0.3) !important;
}

#popup_overlay {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(4px) !important;
}

/* ==========================================================================
   SOLAR ORBIT KEYFRAMES
   ========================================================================== */
@keyframes orbitRotateCW {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitRotateCCW {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes counterRotateCW {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes counterRotateCCW {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes corePulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(30, 112, 229, 0.22), 0 0 35px rgba(30, 112, 229, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 12px 35px rgba(30, 112, 229, 0.32), 0 0 55px rgba(6, 182, 212, 0.35);
        transform: scale(1.03);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gentleMorph {
    0% {
        border-radius: 46% 54% 38% 62% / 58% 42% 58% 42%;
        transform: scale(1) rotate(0deg);
    }
    100% {
        border-radius: 54% 46% 62% 38% / 42% 58% 42% 58%;
        transform: scale(1.04) rotate(4deg);
    }
}

@keyframes modernSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   RESPONSIVENESS (TABLETS & MOBILE)
   ========================================================================== */

/* Laptops with height <= 768px: Proportional Scaling */
@media (max-height: 768px) and (min-width: 992px) {
    .solar-system-stage {
        width: 380px;
        height: 380px;
    }
    .orbit-ring-outer {
        width: 400px;
        height: 400px;
    }
    .orbit-ring-middle {
        width: 300px;
        height: 300px;
    }
    .orbit-ring-inner {
        width: 200px;
        height: 200px;
    }
    .solar-core {
        width: 94px;
        height: 94px;
    }
    .core-logo-img {
        height: 48px;
    }
    .hero-title {
        font-size: 28px;
    }
    .auth-card {
        padding: 22px 26px 18px 26px;
    }
    .input-wrapper, .modern-btn-submit {
        height: 44px;
    }
}

/* Tablets (max-width: 991px): Adaptive Layout */
@media (max-width: 991px) {
    html, body#Body, .modern-login-page {
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    .login-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 20px 20px 16px 20px;
    }

    .hero-section {
        max-width: 520px;
        align-items: center;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto;
    }

    .solar-system-stage {
        width: 380px;
        height: 380px;
    }
    .orbit-ring-outer {
        width: 360px;
        height: 360px;
    }
    .orbit-ring-middle {
        width: 270px;
        height: 270px;
    }
    .orbit-ring-inner {
        width: 180px;
        height: 180px;
    }

    .auth-section {
        width: 100%;
        max-width: 440px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-left, .footer-right {
        justify-content: center;
    }

    .bg-wave-bottom-right {
        display: none;
    }
}

/* Mobile Screens (< 768px): Focused Single-Column */
@media (max-width: 767px) {
    html, body#Body, .modern-login-page {
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    .login-container {
        padding: 16px 14px;
        gap: 16px;
    }

    /* On mobile, collapse hero to avoid crowding */
    .hero-section {
        display: none !important;
    }

    .auth-section {
        width: 100%;
        max-width: 100%;
    }

    .auth-card {
        padding: 24px 18px 20px 18px;
        border-radius: 18px;
    }

    .card-title {
        font-size: 21px;
    }

    .modern-footer {
        padding: 14px 16px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
    }

    .footer-right a {
        color: var(--mag-slate-500);
        text-shadow: none;
    }

    .footer-sep {
        color: var(--mag-slate-400);
    }
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .orbit-ring, .planet-orb, .solar-core {
        animation: none !important;
    }
}
