:root {
    --ink: #0b1b3d;
    --muted: #71809b;
    --orange: #ff4b0b;
    --green: #12a876;
    --line: #dce3ef;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    color: var(--ink);
    background: #edf5ff;
}

.login-page {
    /* Base background perfectly matches the far edges to shine through the fade */
    background: linear-gradient(to right, #a3beea 0%, #fdf5f1 100%);
    min-height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background-image: url("/static/auth/login-clean-bg.png");
    /* By default (laptops), anchor left to prevent overlap with card */
    background-position: left bottom;
    background-size: auto 100vh;
    background-repeat: no-repeat;

    /* Fade out the right edge of the image (at 150vh) */
    -webkit-mask-image: linear-gradient(to right,
            black 0%,
            black calc(150vh - 10vw),
            transparent calc(150vh + 1px));
    mask-image: linear-gradient(to right,
            black 0%,
            black calc(150vh - 10vw),
            transparent calc(150vh + 1px));
}

/* On ultrawide desktops, center the image so it doesn't leave a huge gap */
@media (min-width: 1600px) {
    .login-page::before {
        background-position: center bottom;
        -webkit-mask-image: linear-gradient(to right,
                transparent calc(50vw - 75vh - 1px),
                black calc(50vw - 75vh + 10vw),
                black calc(50vw + 75vh - 10vw),
                transparent calc(50vw + 75vh + 1px));
        mask-image: linear-gradient(to right,
                transparent calc(50vw - 75vh - 1px),
                black calc(50vw - 75vh + 10vw),
                black calc(50vw + 75vh - 10vw),
                transparent calc(50vw + 75vh + 1px));
    }
}

/* Ensure nothing overrides the card's visibility */
.login-page::after,
.login-bg-stretcher,
.visual-panel,
.page-footer {
    display: none !important;
}

.login-hero {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100vh;
    padding-right: 12%;
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* --- FLOATING LOGO STYLING --- */
.bharatnet-floating-logo {
    position: absolute;
    top: 18vh;
    left: 26vw;
    z-index: 2;
    font-family: 'Poppins', 'Inter', sans-serif;
    user-select: none;
    animation: fadeIn 1s ease-out;
}

.bn-title {
    font-size: 56px;
    /* Slightly scaled down to fit perfectly in the sky */
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
}

.bn-orange {
    color: #ff6e14;
}

.bn-green {
    color: #12b75f;
}

.bn-subtitle {
    font-size: 24px;
    font-weight: 500;
    color: #1f2937;
    letter-spacing: -0.5px;
    margin-top: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CARD STYLING --- */
.login-card {
    width: 100%;
    max-width: 560px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 55px 50px;
    box-shadow: 0 10px 40px rgba(11, 27, 61, 0.08);
    position: static;
}

/* Make sure inner elements are visible and relative! */
.card-inner,
.partner-logo,
.login-card h1,
.subtitle,
.secure-note {
    display: block !important;
    position: static;
}

.card-inner {
    width: 100%;
}

.partner-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: -15px auto 5px;
    user-select: none;
}

.partner-logo-container img {
    height: 100px;
    mix-blend-mode: multiply;
    transform: scale(1.6);
    margin-bottom: 5px;
}

.partner-logo-text {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #005073;
    line-height: 1;
    letter-spacing: 0.5px;
}

.login-card h1 {
    text-align: center;
    font-size: 38px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
}

.login-card h1 span {
    color: var(--orange);
}

.subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 35px;
}

.error-message {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    position: static;
}

#loginForm {
    width: 100%;
    position: static;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: none;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 60px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--white);
    color: var(--ink);
    padding: 0 50px 0 55px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 1 !important;
    caret-color: auto !important;
}

.input-wrapper input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(18, 168, 118, 0.1);
}

.prefix-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 20px;
    opacity: 1 !important;
}

.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    opacity: 1 !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    font-size: 15px;
    opacity: 1 !important;
    position: static;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 500;
    cursor: pointer;
    position: static;
}

.remember-me input {
    width: 20px;
    height: 20px;
    accent-color: var(--green);
    opacity: 1 !important;
}

.remember-me span {
    opacity: 1 !important;
}

.forgot-password {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    opacity: 1 !important;
}

.login-btn {
    width: 100%;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(90deg, #ff4a08 0%, #ff5b08 100%);
    box-shadow: 0 4px 12px rgba(255, 75, 11, 0.25);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 1 !important;
    position: static;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 75, 11, 0.35);
}

.secure-note {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    color: var(--green);
    font-size: 14px;
    font-weight: 500;
}

/* RESPONSIVE PADDING TO PREVENT OVERLAPS */
@media (max-width: 1500px) {
    .login-hero {
        padding-right: 8%;
    }
}

@media (max-width: 1366px) {
    .login-hero {
        padding-right: 6%;
    }

    .login-card {
        max-width: 500px;
        padding: 45px 40px;
    }

    .login-card h1 {
        font-size: 32px;
    }

    .input-wrapper input {
        height: 56px;
    }

    .login-btn {
        height: 58px;
    }
}

@media (max-width: 1200px) {
    .login-hero {
        padding-right: 4%;
    }
}

@media (max-width: 960px) {

    html,
    body {
        overflow: auto;
    }

    .login-page {
        /* Override base background to simple cover for mobile */
        background: url("/static/auth/login-clean-bg.png") center center / cover no-repeat !important;
    }

    /* Disable desktop masks and floating logo on smaller screens */
    .login-page::before,
    .login-page::after,
    .bharatnet-floating-logo {
        display: none !important;
    }

    .login-hero {
        justify-content: center;
        padding: 20px;
        height: auto;
        min-height: 100vh;
    }

    .login-card {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 35px 25px;
    }

    .partner-logo {
        height: 44px;
        margin-bottom: 18px;
    }

    .login-card h1 {
        font-size: 30px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .input-wrapper input {
        height: 54px;
        font-size: 15px;
        padding-left: 45px;
    }

    .prefix-icon {
        font-size: 18px;
        left: 15px;
    }

    .login-btn {
        height: 54px;
        font-size: 16px;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        margin-bottom: 25px;
    }
}
/* --- CREATIVE NETWORK PARTICLES (Left side filler) --- */
.network-particles {
    position: absolute;
    left: 0;
    top: 0;
    width: 30vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 110, 20, 0.7); /* Orange glow */
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 110, 20, 0.9), 0 0 30px rgba(255, 110, 20, 0.4);
    animation: floatUp linear infinite;
    opacity: 0;
}

/* Green particles */
.particle:nth-child(even) {
    background: rgba(18, 183, 95, 0.7);
    box-shadow: 0 0 15px rgba(18, 183, 95, 0.9), 0 0 30px rgba(18, 183, 95, 0.4);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

.p1 { left: 5%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: 0s; }
.p2 { left: 15%; width: 10px; height: 10px; animation-duration: 18s; animation-delay: 2s; }
.p3 { left: 8%; width: 4px; height: 4px; animation-duration: 10s; animation-delay: 5s; }
.p4 { left: 20%; width: 8px; height: 8px; animation-duration: 15s; animation-delay: 1s; }
.p5 { left: 25%; width: 12px; height: 12px; animation-duration: 22s; animation-delay: 4s; }
.p6 { left: 12%; width: 5px; height: 5px; animation-duration: 14s; animation-delay: 7s; }
.p7 { left: 28%; width: 7px; height: 7px; animation-duration: 16s; animation-delay: 3s; }
.p8 { left: 2%; width: 9px; height: 9px; animation-duration: 20s; animation-delay: 6s; }

/* Hide particles on smaller screens where there is no empty space */
@media (max-width: 960px) {
    .network-particles {
        display: none !important;
    }
}

/* --- LEFT INFO PANEL (Fills the plain space) --- */
.left-info-panel {
    position: absolute;
    left: 5vw;
    top: 50%;
    transform: translateY(-50%);
    width: 32vw;
    max-width: 450px;
    z-index: 5;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideRight 1s ease-out;
    color: #1e3a8a; /* Deep blue text to contrast against light background */
}

/* On screens where map is dark or colorful, white text might be better, but the left is mostly light blue gradient */

.info-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #0b1b3d;
}

.info-highlight {
    color: #ff6e14;
}

.info-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 30px;
    font-weight: 500;
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(18, 183, 95, 0.1);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: #12b75f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(18, 183, 95, 0.3);
}

.feature-text {
    font-weight: 700;
    font-size: 16px;
    color: #0b1b3d;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translate(-30px, -50%);
    }
    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

/* Hide on mobile/tablet to not clutter the login form */
@media (max-width: 1200px) {
    .left-info-panel {
        display: none !important;
    }
}

/* --- AMBIENT GLOW & TECH GRID FOR LEFT SIDE FILLER --- */
.tech-grid-overlay {
    position: absolute;
    inset: 0;
    /* Create a subtle blueprint/tech grid */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    /* Mask the grid so it only appears on the left side, fading out smoothly */
    mask-image: radial-gradient(ellipse at 10% 50%, black 0%, transparent 60%);
    -webkit-mask-image: radial-gradient(ellipse at 10% 50%, black 0%, transparent 60%);
    opacity: 0.8;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    animation: driftGlow 20s infinite alternate ease-in-out;
}

.glow-orange {
    width: 600px;
    height: 600px;
    background: #ff6e14;
    left: -150px;
    top: 20%;
}

.glow-green {
    width: 750px;
    height: 750px;
    background: #12b75f;
    left: 5%;
    bottom: -150px;
    animation-delay: -7s;
}

@keyframes driftGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, -50px) scale(1.1); }
    100% { transform: translate(-40px, 80px) scale(0.9); }
}

@media (max-width: 960px) {
    .tech-grid-overlay, .ambient-glow {
        display: none !important;
    }
}
