/* ECTS Login — futuristic HUD theme */

:root {
    --bg-deep: #05070f;
    --bg-mid: #0a0e1f;
    --neon-cyan: #22d3ee;
    --neon-violet: #a855f7;
    --neon-cyan-soft: rgba(34, 211, 238, 0.35);
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(148, 197, 255, 0.18);
    --text-main: #eaf2ff;
    --text-muted: #7f8bab;
    --danger: #ff6b81;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 20%, rgba(168, 85, 247, 0.16), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(34, 211, 238, 0.16), transparent 40%),
        linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 55%, var(--bg-deep) 100%);
    overflow: hidden;
    position: relative;
    padding: 24px;
}

/* Faint tech grid overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 197, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 197, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

/* Floating glow orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    animation: drift 14s ease-in-out infinite;
}
.orb-cyan {
    width: 320px; height: 320px;
    background: var(--neon-cyan);
    top: -80px; left: -80px;
    animation-delay: 0s;
}
.orb-violet {
    width: 360px; height: 360px;
    background: var(--neon-violet);
    bottom: -100px; right: -100px;
    animation-delay: -6s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.08); }
}

/* Scanline sweep across the whole viewport, very subtle */
.scanline {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(34, 211, 238, 0.05) 50%, transparent 100%);
    background-size: 100% 200%;
    animation: sweep 6s linear infinite;
}
@keyframes sweep {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 200%; }
}

.login-card {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(34, 211, 238, 0.08);
}

/* ── Left: port/cargo visual panel ─────────────────────────────── */
.auth-visual {
    position: relative;
    flex: 1 1 52%;
    min-height: 560px;
    background-color: #071019;
    background-size: cover;
    background-position: center;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}
/* Dark HUD-tint over the photo so overlay elements + text stay legible */
.auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(7, 16, 25, 0.55) 0%, rgba(7, 16, 25, 0.25) 45%, rgba(7, 16, 25, 0.65) 100%),
        linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(168, 85, 247, 0.08));
    z-index: 1;
}
.hud-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(148, 197, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 197, 255, 0.09) 1px, transparent 1px);
    background-size: 36px 36px;
}
.auth-visual .visual-copy {
    position: relative;
    z-index: 2;
    padding: 26px 30px 28px;
    background: linear-gradient(0deg, rgba(5, 8, 16, 0.92) 40%, transparent 100%);
}
.auth-visual .visual-copy h2 {
    margin: 0 0 6px;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 2px 12px rgba(5, 8, 16, 0.9);
}
.auth-visual .visual-copy p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    max-width: 340px;
    line-height: 1.5;
}

/* Pulsing tracking beacons overlaid on the cargo in the photo */
.beacon {
    position: absolute;
    z-index: 2;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px 2px rgba(34, 211, 238, 0.8);
    transform: translate(-50%, -50%);
}
.beacon.violet { background: var(--neon-violet); box-shadow: 0 0 10px 2px rgba(168, 85, 247, 0.8); }
.beacon::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid var(--neon-cyan);
    animation: pulse-ring 2.6s ease-out infinite;
}
.beacon.violet::before { border-color: var(--neon-violet); animation-delay: -1.1s; }
@keyframes pulse-ring {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(3.4); opacity: 0; }
}
.beacon-link { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }
.link-line { stroke-dasharray: 4 4; animation: dash-flow 2.5s linear infinite; }
@keyframes dash-flow { to { stroke-dashoffset: -16; } }

/* ── Right: form panel ─────────────────────────────────────────── */
.auth-form {
    position: relative;
    flex: 1 1 48%;
    padding: 40px 40px 32px;
}

@media (max-width: 860px) {
    .login-card { flex-direction: column; max-width: 420px; }
    .auth-visual { min-height: 190px; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .auth-visual .visual-copy p { display: none; }
}

/* Shimmering top accent line */
.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
    background-size: 200% 100%;
    animation: shimmer 3.5s linear infinite;
    border-radius: 2px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* HUD corner brackets */
.login-card .bracket { position: absolute; width: 18px; height: 18px; border: 2px solid var(--neon-cyan-soft); opacity: 0.8; }
.bracket.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.bracket.br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

.brand {
    text-align: center;
    margin-bottom: 4px;
}
.brand .mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.18));
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
    color: var(--neon-cyan);
    font-size: 22px;
}
.brand h1 {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 22px;
    letter-spacing: 3px;
    margin: 0;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand p {
    margin: 6px 0 0;
    font-size: 11.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.login-form { margin-top: 28px; }

.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 107, 129, 0.1);
    border: 1px solid rgba(255, 107, 129, 0.35);
    color: #ffb3bf;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 18px;
}
.alert-error i { margin-top: 2px; color: var(--danger); }

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 7px;
}
.input-box {
    position: relative;
    display: flex;
    align-items: center;
}
.input-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.25s ease;
}
.input-box input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 197, 255, 0.16);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.input-box input::placeholder { color: #566082; }
.input-box input:focus {
    border-color: var(--neon-cyan);
    background: rgba(34, 211, 238, 0.05);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.input-box input:focus + i,
.input-box input:focus ~ i { color: var(--neon-cyan); }

.field-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}
.field-meta a {
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.field-meta a:hover { color: var(--neon-cyan); }

.btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
    color: #04060c;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}
.btn-login:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.35); }
.btn-login:active { transform: translateY(0); }

.login-footer {
    text-align: center;
    margin-top: 26px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #4c5678;
}

@media (max-width: 420px) {
    .login-card { padding: 32px 24px 26px; }
}
