﻿* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: Inter, system-ui, Arial;
}

.bg {
    z-index: 0;
}

.grid {
    z-index: 1;
}

.pulse {
    z-index: 2;
}

.scan {
    z-index: 3;
}

/* =====================
   PAGE
===================== */
.login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 40px;
    background: linear-gradient(180deg, #f4f7fb, #eef2f7);
    position: relative;
    overflow: hidden;
}

/* =====================
   BACKGROUND
===================== */
.bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.grid {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.pulse {
    position: absolute;
    inset: -40%;
    background: radial-gradient(500px at 30% 30%, rgba(224,177,45,.18), transparent 60%), radial-gradient(500px at 70% 60%, rgba(148,163,184,.20), transparent 60%);
    animation: float 10s ease-in-out infinite alternate;
}

@keyframes float {
    from {
        transform: translateY(-2%);
    }

    to {
        transform: translateY(2%);
    }
}

.scan {
    position: absolute;
    inset: -30%;
    background: linear-gradient( to bottom, transparent 0%, rgba(224,177,45,.18) 45%, rgba(224,177,45,.45) 50%, rgba(224,177,45,.18) 55%, transparent 100% );
    animation: scanMove 4.5s linear infinite, scanFlicker 1.8s ease-in-out infinite;
    pointer-events: none;
}


@keyframes scanMove {
    from {
        transform: translateY(-120%);
    }

    to {
        transform: translateY(120%);
    }
}

@keyframes scanFlicker {
    0%,100% {
        opacity: .22;
    }

    50% {
        opacity: .35;
    }
}

/* =====================
   HUD CORNERS
===================== */
.hud {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(148,163,184,.45);
    opacity: .6;
}

    .hud.tl {
        top: 20px;
        left: 20px;
        border-right: none;
        border-bottom: none;
    }

    .hud.tr {
        top: 20px;
        right: 20px;
        border-left: none;
        border-bottom: none;
    }

    .hud.bl {
        bottom: 20px;
        left: 20px;
        border-right: none;
        border-top: none;
    }

    .hud.br {
        bottom: 20px;
        right: 20px;
        border-left: none;
        border-top: none;
    }

/* =====================
   CLIENT BRAND
===================== */
.client-brand {
    position: absolute;
    top: 24px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #475569;
    z-index: 3;
}

    .client-brand img {
        height: 32px;
        object-fit: contain;
        filter: grayscale(100%);
        opacity: .9;
    }

/* =====================
   LOGIN CARD
===================== */
.login-card {
    margin-left: auto;
    max-width: 420px;
    width: 100%;
    background: rgba(255,255,255,.92);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 25px 50px rgba(15,23,42,.15);
    z-index: 2;
}

/* =====================
   HEADER
===================== */
.login-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.logo {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    display: grid;
    place-items: center;
}

.lens {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #374151;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.45);
}

.focus-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(224,177,45,.35);
    animation: focusPulse 2.8s ease-in-out infinite;
}

@keyframes focusPulse {
    0% {
        transform: scale(.9);
        opacity: .25;
    }

    50% {
        transform: scale(1.05);
        opacity: .45;
    }

    100% {
        transform: scale(.9);
        opacity: .25;
    }
}

.login-header h1 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.login-header p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* =====================
   FORM
===================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .login-form label span {
        font-size: 12px;
        color: #64748b;
    }

.input-wrap {
    position: relative;
}

    .input-wrap i {
        position: absolute;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        font-size: 16px;
        color: #9ca3af;
    }

    .input-wrap input {
        width: 100%;
        padding: 12px 14px 12px 38px;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        background: #ffffff;
        font-size: 14px;
    }

        .input-wrap input:focus {
            outline: none;
            border-color: #e0b12d;
            box-shadow: 0 0 0 3px rgba(224,177,45,.25);
        }

/* =====================
   ROW
===================== */
.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-top: 4px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
}

    .remember input {
        accent-color: #e0b12d;
    }

.forgot {
    color: #b45309;
    font-weight: 500;
    text-decoration: none;
}

    .forgot:hover {
        text-decoration: underline;
    }

/* =====================
   BUTTONS
===================== */
.btn-primary {
    margin-top: 8px;
    padding: 12px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #f5c542, #e0b12d);
    color: #1f2937;
    font-weight: 600;
}

.btn-secondary {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    color: #374151;
    cursor: pointer;
}

/* =====================
   CARD INSIGHTS
===================== */
.card-insights {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
    display: grid;
    gap: 10px;
}

.insight {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

    .insight .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #d4a106;
    }

/* =====================
   SIDE PANEL
===================== */
.info {
    max-width: 480px;
    padding: 40px;
    z-index: 2;
}

    .info h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .info p {
        color: #475569;
        max-width: 46ch;
    }

.features {
    margin-top: 20px;
    display: grid;
    gap: 14px;
}

.feature {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,.75);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
    .login {
        grid-template-columns: 1fr;
    }

    .info {
        order: -1;
        padding: 20px;
    }
}

.inline-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffe6e6;
    color: #b30000;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #ffb3b3;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.error-icon {
    font-size: 16px;
}

.error-text {
    line-height: 1.4;
}

.login-btn {
    position: relative;
    padding: 10px 20px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s ease;
}

    .login-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.btn-loader {
    margin-left: 8px;
}

.d-none {
    display: none;
}
