/* ==========================================================================
   SAAS BASE UNIVERSAL CONSOLE SYSTEM (Unified Design)
   ========================================================================== */

/* 1. Global Reset & Theme Variables */
:root {
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Active Client Brand Palette (Industrial Steel & Vibrant Neon Orange) */
    --theme-bg: #07080c;
    --theme-bg-panel: rgba(10, 12, 19, 0.85);
    --theme-surface-border: rgba(255, 107, 0, 0.15);
    --theme-surface-border-active: rgba(255, 107, 0, 0.5);
    --theme-accent: #ff6b00;
    --theme-accent-rgb: 255, 107, 0;
    --theme-secondary: #ff9d00;
    --theme-secondary-rgb: 255, 157, 0;
    --theme-text-primary: #f3f4f6;
    --theme-text-muted: #9ca3af;
    --theme-neon-shadow: 0 0 20px rgba(255, 107, 0, 0.25);
    --theme-font-tech: 'Outfit', sans-serif;
}

/* Master SaaS Theme (Purple overrides for global administration) */
.saas-theme-master {
    --theme-bg: #050508;
    --theme-bg-panel: rgba(12, 10, 18, 0.85);
    --theme-surface-border: rgba(139, 92, 246, 0.2);
    --theme-surface-border-active: rgba(139, 92, 246, 0.6);
    --theme-accent: #8b5cf6;
    --theme-accent-rgb: 139, 92, 246;
    --theme-secondary: #c084fc;
    --theme-secondary-rgb: 192, 132, 252;
    --theme-neon-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

/* 2. Immersive Core Layout & Background Scanner */
body.login-page-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--theme-bg);
    color: var(--theme-text-primary);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Digital Grid Matrix Pattern */
body.login-page-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 90%);
    pointer-events: none;
    z-index: 1;
}

/* Animating Tech Scanner Sweep */
body.login-page-body::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(var(--theme-accent-rgb), 0.3), transparent);
    box-shadow: 0 0 10px rgba(var(--theme-accent-rgb), 0.5);
    opacity: 0.7;
    pointer-events: none;
    z-index: 2;
    animation: scannerSweep 8s linear infinite;
}

/* Soft Atmospheric ambient glowing nebula */
.glow-ambient-1 {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-accent-rgb), 0.15) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    animation: pulseAmbient 12s infinite alternate ease-in-out;
}

.glow-ambient-2 {
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-accent-rgb), 0.1) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    animation: pulseAmbient 15s infinite alternate-reverse ease-in-out;
}

/* 3. Central Console Grid Layout */
.login-split-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 580px;
    padding: 30px 20px;
    position: relative;
    box-sizing: border-box;
    z-index: 5;
}

/* Top Telemetry Diagnostic Line */
.terminal-telemetry-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 14px 10px;
    font-family: var(--theme-font-tech);
    font-size: 11px;
    font-weight: 700;
    color: var(--theme-text-muted);
    letter-spacing: 0.1em;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
    box-sizing: border-box;
}

.telemetry-node {
    display: flex;
    align-items: center;
    gap: 6px;
}

.telemetry-indicator-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: beaconPulse 1.5s infinite ease-in-out;
}

.saas-theme-master .telemetry-indicator-dot {
    background-color: var(--theme-accent);
    box-shadow: 0 0 8px var(--theme-accent);
}

/* 4. Glassmorphic Industrial Console Card */
.login-glass-card {
    width: 100%;
    background: var(--theme-bg-panel);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--theme-surface-border);
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.65),
        inset 0 0 30px rgba(255, 255, 255, 0.015);
    position: relative;
    box-sizing: border-box;
    transition: var(--transition);
}

.login-glass-card:hover {
    border-color: var(--theme-surface-border-active);
    box-shadow: 
        0 35px 80px rgba(0, 0, 0, 0.75),
        var(--theme-neon-shadow),
        inset 0 0 30px rgba(255, 255, 255, 0.025);
}

/* Cybernetic L-Shaped Corner Brackets */
.card-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--theme-accent);
    border-style: solid;
    pointer-events: none;
    z-index: 10;
    opacity: 0.75;
    transition: var(--transition);
}

.corner-tl {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
    border-top-left-radius: 20px;
}

.corner-tr {
    top: -1px;
    right: -1px;
    border-width: 3px 3px 0 0;
    border-top-right-radius: 20px;
}

.corner-bl {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 3px 3px;
    border-bottom-left-radius: 20px;
}

.corner-br {
    bottom: -1px;
    right: -1px;
    border-width: 0 3px 3px 0;
    border-bottom-right-radius: 20px;
}

/* Cyber corner shifting on card hover */
.login-glass-card:hover .corner-tl { transform: translate(-5px, -5px); opacity: 1; }
.login-glass-card:hover .corner-tr { transform: translate(5px, -5px); opacity: 1; }
.login-glass-card:hover .corner-bl { transform: translate(-5px, 5px); opacity: 1; }
.login-glass-card:hover .corner-br { transform: translate(5px, 5px); opacity: 1; }

/* 5. Brand Identity & Header Elements */
.mobile-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    text-align: center;
}

.mobile-brand-header .mobile-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(var(--theme-accent-rgb), 0.25);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.login-glass-card:hover .mobile-brand-header .mobile-logo {
    transform: scale(1.04) rotate(2deg);
    border-color: rgba(var(--theme-accent-rgb), 0.3);
    box-shadow: 0 12px 28px rgba(var(--theme-accent-rgb), 0.4);
}

.mobile-brand-header h2 {
    margin: 0;
    font-family: var(--theme-font-tech);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 40%, var(--theme-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header-block {
    text-align: center;
    margin-bottom: 30px;
}

.card-header-block h2 {
    font-family: var(--theme-font-tech);
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.card-header-block p {
    margin: 0;
    font-size: 12.5px;
    color: var(--theme-text-muted);
    line-height: 1.45;
}

/* 6. Form elements and Input Vault Styling */
.login-form-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.input-label-premium {
    font-family: var(--theme-font-tech);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-muted);
    margin-bottom: 8px;
    transition: var(--transition);
    align-self: flex-start;
}

.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: none;
    z-index: 5;
}

.input-field-premium {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px 12px 44px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    box-sizing: border-box;
}

/* Focus and Active State Transitions */
.input-field-premium:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(var(--theme-accent-rgb), 0.35);
    border-left-color: var(--theme-accent);
    outline: none;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        var(--theme-neon-shadow);
}

.input-field-premium:focus + .input-icon-left {
    color: var(--theme-accent);
    transform: scale(1.05);
}

.input-group:focus-within .input-label-premium {
    color: var(--theme-accent);
    text-shadow: 0 0 6px rgba(var(--theme-accent-rgb), 0.3);
}

/* Sliding laser underline on input focus */
.input-field-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 44px;
    width: 0;
    height: 2px;
    background: var(--theme-accent);
    box-shadow: 0 0 8px var(--theme-accent);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.input-field-wrapper:focus-within::after {
    width: calc(100% - 44px - 16px);
}

/* Password Toggle Eyeball */
.password-toggle-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
    z-index: 5;
}

.password-toggle-btn:hover {
    color: var(--theme-accent);
    transform: scale(1.05);
}

/* 7. Beautiful Custom Toggle Switch Checkbox */
.checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.checkbox-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox-indicator {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.checkbox-input-hidden:checked + .custom-checkbox-indicator {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    box-shadow: 0 0 12px rgba(var(--theme-accent-rgb), 0.35);
}

.custom-checkbox-indicator svg {
    width: 11px;
    height: 11px;
    stroke-width: 4px;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.checkbox-input-hidden:checked + .custom-checkbox-indicator svg {
    transform: scale(1);
}

.checkbox-label:hover .custom-checkbox-indicator {
    border-color: var(--theme-accent);
    background: rgba(255, 255, 255, 0.04);
}

/* 8. Spectacular Cybernetic Submit Button */
.btn-submit-premium {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(135deg, var(--theme-accent) 0%, #d45900 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 850;
    font-family: var(--theme-font-tech);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(var(--theme-accent-rgb), 0.3);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.saas-theme-master .btn-submit-premium {
    background: linear-gradient(135deg, var(--theme-accent) 0%, #6d28d9 100%);
    box-shadow: 0 8px 24px rgba(var(--theme-accent-rgb), 0.3);
}

/* Glowing linear gloss sliding across button */
.btn-submit-premium::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.btn-submit-premium:hover::before {
    left: 150%;
}

/* Industrial Hazard Stripes background texture overlay on hover */
.btn-submit-premium::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        45deg, 
        rgba(255, 255, 255, 0.06) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.06) 50%, 
        rgba(255, 255, 255, 0.06) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 15px 15px;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.btn-submit-premium:hover::after {
    opacity: 1;
}

.btn-submit-premium:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 30px rgba(var(--theme-accent-rgb), 0.45),
        var(--theme-neon-shadow);
}

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

.btn-submit-premium:disabled,
.btn-submit-premium.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-submit-premium span {
    position: relative;
    z-index: 2;
}

.btn-submit-premium i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

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

/* 9. Alerts & Warning Banners styling */
.premium-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.premium-alert-danger {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    color: #fca5a5;
}

.premium-alert-success {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    color: #86efac;
}

/* 10. Tech Footer and Registration Links */
.card-footer-links {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--theme-text-muted);
}

.card-footer-links a {
    color: var(--theme-accent);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.card-footer-links a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(var(--theme-accent-rgb), 0.3);
}

/* Bottom Telemetry Diagnostic Line */
.terminal-footer {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 14px 10px 0 10px;
    font-family: var(--theme-font-tech);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.08em;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    margin-top: 24px;
    box-sizing: border-box;
}

/* 11. Keyframes Animations */
@keyframes scannerSweep {
    0% { top: -10%; }
    100% { top: 110%; }
}

@keyframes pulseAmbient {
    0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
    50% { transform: scale(1.1) translate(2%, 2%); opacity: 0.9; }
    100% { transform: scale(0.95) translate(-1%, -2%); opacity: 0.6; }
}

@keyframes beaconPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* 12. Complete Responsiveness */
@media (max-width: 580px) {
    .login-split-layout {
        padding: 15px 10px;
    }
    
    .login-glass-card {
        padding: 34px 22px;
        border-radius: 16px;
    }
    
    .card-corner {
        border-radius: 16px;
    }
    
    .mobile-brand-header .mobile-logo {
        width: 60px;
        height: 60px;
    }
    
    .mobile-brand-header h2 {
        font-size: 22px;
    }
    
    .terminal-telemetry-top,
    .terminal-footer {
        font-size: 9px;
    }
}

/* 13. Password Strength Meter Cyber Styling */
.password-strength-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.strength-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--theme-font-tech);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.strength-label-text {
    color: var(--theme-text-muted);
}

.strength-status-text {
    color: var(--theme-text-muted);
    transition: var(--transition);
}

.strength-meter-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-meter-bar {
    width: 0;
    height: 100%;
    background: transparent;
    border-radius: 2px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.strength-meter-bar.weak {
    width: 33.33%;
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.strength-meter-bar.medium {
    width: 66.66%;
    background-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.strength-meter-bar.strong {
    width: 100%;
    background-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

