@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary-red: #d71920;
    --primary-red-hover: #ff333a;
    --primary-red-glow: rgba(215, 25, 32, 0.24);
    --btn-red-start: #ff4d53;
    --btn-black-end: #111111;
    --white: #ffffff;
    --noc-text-gray: #cbd5e1;
    --noc-text-dark-gray: #94a3b8;

    /* Premium Glassmorphism Parameters */
    --glass-card-bg: rgba(255, 255, 255, 0.08);
    /* Card transparent 0.08 */
    --glass-card-border: rgba(255, 255, 255, 0.15);
    /* Border 0.15 */
    --glass-input-bg: rgba(0, 0, 0, 0.35) !important;
    --glass-input-border: rgba(255, 255, 255, 0.15);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Default Body configuration for Desktops */
body {
    height: 100vh;
    width: 100%;
    font-family: var(--font-body);
    color: var(--white);
    background-color: #05070c;
    overflow: hidden;
    /* Fits screen perfectly on desktop */
    position: relative;
}

/* ==========================================================================
   BACKGROUND - TELECOM IMAGE WITH OPTIMIZED CONTRAST & SLIGHT BLUR
   ========================================================================== */
.telecom-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/login_bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.45;
    /* Visible background image */
    filter: blur(3px) contrast(1.18) brightness(0.85);
    /* 3px blur, enhanced contrast */
    z-index: 1;
    pointer-events: none;
}

/* Dark transparent overlay over the background image */
.login-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.65) 0%, rgba(10, 15, 25, 0.45) 100%);
}

/* ==========================================================================
   LEFT SECTION (60% Width) - CORE COMMAND SYSTEM INFO
   ========================================================================== */
.left-section {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5rem 4.5rem 4.5rem;
    /* Increased top padding */
    height: 100vh;
    overflow-y: auto;
    /* Internal scrolling wrapper if needed */
}

/* Core Content & Hero Grid */
.intro-content-container {
    margin: auto 0;
    max-width: 92%;
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

/* Hero Section */
.left-hero-section {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: 2.5px;
    margin-bottom: 1.2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.4rem;
    /* Massive heading for hierarchy */
    font-weight: 900;
    line-height: 1.12;
    color: var(--white);
    letter-spacing: -1.5px;
    margin-bottom: 1.6rem;
}

.text-gradient-red {
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff4d53 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 3px rgba(215, 25, 32, 0.25));
}

.hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    /* Line height around 1.7 */
    color: var(--noc-text-gray);
    max-width: 90%;
}

/* ==========================================================================
   LEFT FEATURE SECTION - 2 X 2 GRID OF PREMIUM GLASS CARDS
   ========================================================================== */
.feature-grid-noc {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    align-items: stretch;
    /* Stretch same height */
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.feature-glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    width: 100%;
}

.feature-glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 12px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.09);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.noc-badge-light-container {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.noc-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.noc-badge-dot.green {
    background: #10b981;
    box-shadow: 0 0 10px #10b981, 0 0 20px rgba(16, 185, 129, 0.4);
    animation: pulseGlowGreen 2s infinite;
}

.noc-badge-dot.red {
    background: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red), 0 0 20px rgba(215, 25, 32, 0.4);
    animation: pulseGlowRed 2s infinite;
}

.feature-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.3px;
}

.feature-card-desc {
    font-size: 0.82rem;
    color: var(--noc-text-dark-gray);
    line-height: 1.4;
}

/* Left Bottom Section */
.left-section-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    font-size: 0.8rem;
    color: var(--noc-text-dark-gray);
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.left-section-footer-details {
    display: flex;
    gap: 2rem;
}

.left-section-footer-details span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.left-section-footer-details i {
    color: var(--primary-red);
}

/* ==========================================================================
   RIGHT SECTION (40% Width) - NOC COMMAND CARD
   ========================================================================== */
.right-section {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem;
    position: relative;
    height: 100vh;
}

/* Glassmorphism Login Card (Premium Transparent Floating Glass) */
.glass-login-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    /* Width 460px */
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-card-border);
    backdrop-filter: blur(28px);
    /* Blur 28px */
    -webkit-backdrop-filter: blur(28px);
    border-radius: 24px;
    padding: 3.4rem 2.8rem;
    /* Premium spacing padding */
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        /* Soft shadow */
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        /* Specular top highlight reflection */
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    /* Soft inner outline */
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1), cardGlowPulse 8s infinite alternate ease-in-out;
    overflow: hidden;
}

@keyframes cardGlowPulse {
    0% {
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    100% {
        border-color: rgba(255, 255, 255, 0.28);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 15px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Integrated Canvas container at card bottom (Low Opacity Blend) */
.card-network-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
    mix-blend-mode: overlay;
}

#network-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Form Container - sits above the canvas */
.glass-card-form-wrapper {
    position: relative;
    z-index: 2;
}

/* Header inside card */
.card-brand-header {
    text-align: center;
    margin-bottom: 2.8rem;
}

/* Premium Glass horizontal Logo Badge Container */
.logo-badge-container {
    width: fit-content;
    height: auto;
    background: rgba(255, 255, 255, 0.3);
    /* High contrast light glass */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    /* Rounded 18px */
    padding: 16px 28px;
    /* Balanced horizontal padding */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 0 10px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: all 0.3s ease;
}

.logo-badge-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transform: scale(1.02);
}

.company-logo {
    max-height: 56px;
    /* Sized to fit badge perfectly */
    width: auto;
    object-fit: contain;
    margin-bottom: 0 !important;
}

.company-brand-title {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.2px;
    margin-bottom: 0.4rem;
}

.company-tagline {
    font-size: 0.82rem;
    color: var(--noc-text-dark-gray);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Alerts */
.alert-custom-banner {
    background: rgba(215, 25, 32, 0.1);
    border: 1px solid rgba(215, 25, 32, 0.22);
    color: #ff4d53;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.6rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: shakeAlert 0.4s ease-in-out;
}

@keyframes shakeAlert {

    0%,
    100% {
        transform: translateX(0);
    }

    25%,
    75% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }
}

/* Inputs groups & structures */
.input-container-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.input-label-clean {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.55rem;
    transition: color 0.2s ease;
    letter-spacing: 0.3px;
}

.input-wrapper-glass {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    pointer-events: none;
}

.input-field-glass {
    width: 100%;
    padding: 13px 15px 13px 44px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    border-radius: 14px;
    border: 1px solid var(--glass-input-border);
    background: var(--glass-input-bg);
    /* Dark Translucent glass inputs */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: var(--white);
}

.input-field-glass::placeholder {
    color: #5d7088;
}

/* Focus: No Bootstrap blue focus, use ArrowTouch red focus border */
.input-field-glass:focus {
    outline: none;
    border-color: var(--primary-red) !important;
    background: rgba(0, 0, 0, 0.55) !important;
    box-shadow: 0 0 0 4px var(--primary-red-glow) !important;
}

/* OVERRIDE WebKit Autofill White Background styling */
.input-field-glass:-webkit-autofill,
.input-field-glass:-webkit-autofill:hover,
.input-field-glass:-webkit-autofill:focus,
.input-field-glass:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0b0f17 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.input-field-glass:-webkit-autofill:focus {
    border-color: var(--primary-red) !important;
    -webkit-box-shadow: 0 0 0 1000px #0b0f17 inset, 0 0 0 4px var(--primary-red-glow) !important;
}

.input-container-group:focus-within .input-label-clean {
    color: var(--primary-red);
}

.input-container-group:focus-within .input-prefix-icon {
    color: var(--primary-red);
}

/* Password toggler */
.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-red);
}

/* Options Bar: Remember & Forgot */
.options-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.8rem 0;
    font-size: 0.84rem;
}

.remember-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--noc-text-dark-gray);
    user-select: none;
}

.remember-checkbox-label input {
    cursor: pointer;
    accent-color: var(--primary-red);
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

.forgot-link-clean {
    color: var(--noc-text-dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link-clean:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

/* Button & animations: Gradient, 52px height, 14px rounded, glow hover/press effects */
.btn-login {
    position: relative;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--btn-red-start) 0%, var(--primary-red) 50%, var(--btn-black-end) 100%);
    border: none;
    border-radius: 14px;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(215, 25, 32, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 8px 30px rgba(215, 25, 32, 0.6);
    background: linear-gradient(135deg, #ff6b70 0%, #e63946 50%, #000000 100%);
}

.btn-login:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 12px rgba(215, 25, 32, 0.2);
}

.btn-login:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner inside button */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button ripple span container */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.35);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

@keyframes rippleEffect {
    to {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* Accessibility outline */
.input-field-glass:focus-visible,
.btn-login:focus-visible,
.forgot-link-clean:focus-visible,
.remember-checkbox-label input:focus-visible {
    outline: 2.5px solid var(--primary-red);
    outline-offset: 2.5px;
}

/* ==========================================================================
   ANIMATIONS & GLOWS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlowGreen {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px #10b981, 0 0 15px rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 12px #10b981, 0 0 25px rgba(16, 185, 129, 0.6);
    }
}

@keyframes pulseGlowRed {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px var(--primary-red), 0 0 15px rgba(215, 25, 32, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 12px var(--primary-red), 0 0 25px rgba(215, 25, 32, 0.6);
    }
}

/* ==========================================================================
   HEIGHT-BASED SCALING FOR LAPTOPS (No unnecessary vertical scrolling)
   ========================================================================== */

/* Laptop screens with vertical height <= 900px */
@media (max-height: 900px) and (min-width: 1025px) {
    .left-section {
        padding: 3.5rem;
    }

    .intro-content-container {
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .glass-login-card {
        padding: 2.5rem 2.2rem;
    }

    .card-brand-header {
        margin-bottom: 2rem;
    }

    .logo-badge-container {
        margin-bottom: 1.4rem;
        padding: 12px 22px;
    }

    .company-logo {
        max-height: 48px;
    }

    .input-container-group {
        margin-bottom: 1.4rem;
    }

    .options-bar-row {
        margin: 1.4rem 0;
    }
}

/* Laptop screens with vertical height <= 780px (e.g. 1366x768, 1280x720) */
@media (max-height: 780px) and (min-width: 1025px) {
    .left-section {
        padding: 2.2rem;
    }

    .intro-content-container {
        gap: 1.5rem;
    }

    .hero-subtitle {
        margin-bottom: 0.6rem;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }

    .hero-desc {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .feature-grid-noc {
        gap: 0.8rem;
    }

    .feature-glass-card {
        padding: 1rem;
        gap: 0.4rem;
    }

    .feature-card-header h3 {
        font-size: 0.95rem;
    }

    .feature-card-desc {
        font-size: 0.78rem;
    }

    .glass-login-card {
        padding: 2rem 1.8rem;
        max-width: 420px;
    }

    .card-brand-header {
        margin-bottom: 1.5rem;
    }

    .logo-badge-container {
        margin-bottom: 1rem;
        padding: 10px 18px;
    }

    .company-logo {
        max-height: 40px;
    }

    .input-container-group {
        margin-bottom: 1rem;
    }

    .input-field-glass {
        padding: 10px 12px 10px 38px;
        font-size: 0.88rem;
    }

    .input-prefix-icon {
        left: 12px;
    }

    .options-bar-row {
        margin: 1rem 0;
    }

    .btn-login {
        height: 46px;
    }

    .left-section-footer {
        padding-top: 1rem;
    }
}

/* ==========================================================================
   WIDTH-BASED BREAKPOINTS (Tablet & Mobile Stacking)
   ========================================================================== */

/* Laptop / Desktop Wide viewports: fit background cover */
@media (min-width: 1025px) {
    .telecom-bg-overlay {
        background-size: cover;
        background-position: center;
    }
}

/* Tablet Stack Viewport Breakpoint (1024px and below) */
@media (max-width: 1024px) {
    body {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        /* Natural vertical scrolling enabled */
        overflow-x: hidden;
    }

    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: visible;
    }

    .left-section,
    .right-section {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        height: auto;
        /* Remove desktop height limit */
    }

    .left-section {
        padding: 4rem 2.5rem 2rem;
    }

    .intro-content-container {
        max-width: 100%;
        margin: 2rem 0;
    }

    .right-section {
        padding: 2rem 2.5rem 4rem;
        align-items: center;
        justify-content: center;
        min-height: auto;
        /* Allow natural auto height stacking */
    }

    .glass-login-card {
        margin: 0 auto;
        max-width: 440px;
    }
}

/* Narrow Tablets and Mobiles Breakpoint */
@media (max-width: 768px) {
    .left-section {
        padding: 3rem 1.5rem 1.5rem;
    }

    .right-section {
        padding: 1.5rem 1.5rem 3.5rem;
    }

    .feature-grid-noc {
        grid-template-columns: 1fr;
        /* Stack cards vertically on smaller devices */
    }

    .left-section-footer {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
}

/* Small Mobiles viewport sizing */
@media (max-width: 480px) {
    .left-section {
        padding: 2.5rem 1.25rem 1rem;
    }

    .right-section {
        padding: 1rem 1.25rem 2.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .glass-login-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
        width: 100%;
        max-width: 420px;
    }

    .logo-badge-container {
        padding: 12px 20px;
        margin-bottom: 1.4rem;
    }

    .company-logo {
        max-height: 44px;
    }

    .options-bar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}