:root {
    --brand: #d20023;
    --brand-dark: #a5001c;
    --brand-tint: rgba(210, 0, 35, 0.08);
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --field-bg: #ffffff;
}

/* Lock the page — no scroll */
html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.login-bg {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
    /* Full-bleed photo underneath everything */
    background-image: url('../images/login-bg.png');
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
}

/* Navy gradient overlay — transparent over the photo on the left,
   deepening to solid navy on the right so the card floats on a
   seamless blend rather than a hard split. */
.login-bg::after {
    opacity: 0.8;
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        /* node-network dots (larger, sparse) — the "chain" circles */
        radial-gradient(circle, rgba(255, 255, 255, 0.3) 2px, transparent 1.6px),
        /* fine dotted square grid (dense dot-matrix) */
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 2px, transparent 1.2px),
        /* your existing red/navy gradient stays as the base layer */
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0) 42%,
            rgba(255, 255, 255, 0.45) 55%,
            rgba(255, 255, 255, 1) 82%
        );
    background-size:
        90px 90px,   /* node spacing */
        18px 18px,   /* dot-matrix spacing */
        100% 100%;   /* gradient fills */
    background-position:
        right top,
        right top,
        center;
    /* fade the patterns so they only show on the right, like the ref */
    -webkit-mask-image: linear-gradient(100deg, transparent 45%, #000 75%);
    mask-image: linear-gradient(100deg, transparent 45%, #000 65%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Left spacer (keeps the card pushed right; photo shows through) ---- */
.login-visual {
    flex: 1 1 58%;
    position: relative;
    z-index: 1;
}

/* ---- Right card panel — sits above the gradient, no background box ---- */
.login-panel {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    z-index: 1;
    background: transparent;
}

.login-panel .card {
    width: 100%;
    max-width: 380px;
    border: none;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow:
        rgba(9, 14, 30, 0.35) 0px 10px 30px,
        rgba(9, 14, 30, 0.30) 0px 24px 60px;
}

.login-panel .card-body {
    padding: 2.7rem 2rem;
}

/* ---- Brand mark + heading ---- */
.login-brand {
    display: flex;
    justify-content: center;
}

.login-brand .brand-logo {
    width: auto;
    height: 88px;
    object-fit: cover;
    display: block;
}

.login-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--bs-primary);
    margin: 0 0 0.35rem;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 1.9rem;
}

/* ---- Fields ---- */
.login-panel .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.field-wrap {
    position: relative;
}

.field-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: flex;
    pointer-events: none;
}

.field-wrap .field-icon svg {
    width: 18px;
    height: 18px;
}

.login-panel .form-control {
    height: 50px;
    padding-left: 44px;
    border: 1.5px solid var(--line);
    border-radius: 0.7rem;
    background: var(--field-bg);
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-wrap.has-toggle .form-control {
    padding-right: 46px;
}

.login-panel .form-control::placeholder {
    color: #9aa3af;
}

.login-panel .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
    outline: none;
}

/* password eye toggle */
.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 4px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.pw-toggle:hover {
    color: var(--brand);
}

.pw-toggle svg {
    width: 20px;
    height: 20px;
}

.pw-toggle .icon-hide {
    display: none;
}

.pw-toggle.is-visible .icon-show {
    display: none;
}

.pw-toggle.is-visible .icon-hide {
    display: block;
}
/* ---- Submit ---- */
.login-panel .btn-primary {
    height: 50px;
    border: none;
    border-radius: 0.7rem;
    background: var(--brand);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.2px;
    transition: background 0.15s ease, transform 0.05s ease;
}

.login-panel .btn-primary:hover,
.login-panel .btn-primary:focus {
    background: var(--brand-dark);
}

.login-panel .btn-primary:active {
    transform: translateY(1px);
}

/* ---- Error text ---- */
.login-panel .text-danger {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

/* ---- Responsive: collapse to single column ---- */
@media (max-width: 1300px) {
    html,
    body {
        overflow: auto;
    }

    .login-bg {
        height: auto;
        min-height: 100vh;
    }

    .login-bg::after {
        opacity: 0.5;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        flex-basis: 100%;
        padding: 2rem 1.25rem;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .login-panel .card-body {
        padding: 2rem 1.5rem;
    }
}