*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --teal:        #0d8d9d;
    --teal-deep:   #0a7884;
    --teal-darker: #086571;
    --ink:         #1b2a34;
    --muted:       #7f91a4;
    --line:        #dce6ef;
    --field-bg:    #eef3f7;
}
html, body { height: 100%; }
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    background: #ffffff;
    color: var(--ink);
    overflow: hidden;
}

/* ===== LEFT: Branding / marketing panel ===== */
.login-left {
    flex: 1 1 60%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px clamp(28px, 4vw, 56px);
    color: #fff;
    background:
        radial-gradient(circle at 80% 12%, rgba(255,255,255,.12), transparent 42%),
        linear-gradient(150deg, #12a7b7 0%, #0d8d9d 44%, #0a7280 100%);
}
.login-left .shape {
    position: absolute;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    transform: rotate(18deg);
    pointer-events: none;
    z-index: 0;
}
.login-left .shape.s1 { width: 280px; height: 280px; top: -70px;  right: -60px;  border-radius: 80px; }
.login-left .shape.s2 { width: 200px; height: 200px; top: 120px;  right: 110px;  border-radius: 60px; background: rgba(255,255,255,.04); }
.login-left .shape.s3 { width: 360px; height: 360px; bottom: -150px; left: -120px; border-radius: 110px; }
.login-left .shape.s4 { width: 150px; height: 150px; bottom: 50px;  left: 170px;  border-radius: 46px; background: rgba(255,255,255,.05); }
/* animated scan line accent */
.login-left::after {
    content: none;
}

.left-inner {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; gap: 18px;
    height: 100%;
    max-width: 760px;
    overflow: hidden;
    padding-right: 4px;
}
.left-inner::-webkit-scrollbar { width: 0; }

/* Brand */
.lc-brand { display: flex; align-items: center; gap: 12px; }
.lc-brand img {
    width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.lc-brand h1 { font-size: 19px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.lc-brand p { font-size: 12px; color: rgba(255,255,255,.66); margin-top: 2px; }

/* Version chip */
.version-bar {
    display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px; font-weight: 500;
}
.version-bar i { color: #7CFFCB; }

/* Headline + professional rotating word */
.headline {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 800; line-height: 1.12; letter-spacing: -.02em;
    opacity: 0; transform: translateY(22px);
    animation: hbRise .9s cubic-bezier(.2,.7,.2,1) .1s forwards;
}
.headline-lead, .headline-tail { display: block; color: #fff; }
.word-rotator {
    display: block; position: relative; min-height: 1.2em;
    margin: 4px 0;
}
.word-rotator .typed {
    color: #eafdff;
    font-weight: 800;
    white-space: nowrap;
}
/* blinking caret */
.word-rotator .caret {
    display: inline-block;
    width: 3px; height: 1em;
    background: #7CFFCB;
    margin-left: 4px;
    vertical-align: text-bottom;
    border-radius: 2px;
    animation: hbCaret 1s steps(1) infinite;
}
.subhead {
    font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 460px;
    opacity: 0; transform: translateY(22px);
    animation: hbRise .9s cubic-bezier(.2,.7,.2,1) .26s forwards;
}

/* Features */
.lc-features { display: flex; flex-direction: column; gap: 12px; }
.lc-feature { display: flex; align-items: flex-start; gap: 12px; }
.lc-feature-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 14px; color: #fff;
}
.lc-feature-text h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.lc-feature-text p { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.45; }

/* Maps */
.lc-maps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 8px; }
.lc-map-label {
    font-size: 11px; color: rgba(255,255,255,.66); margin-bottom: 5px;
    display: flex; align-items: center; gap: 6px; letter-spacing: .03em;
}
.lc-map-label i { color: #ffb4a8; font-size: 11px; }
.lc-map-wrap {
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.16); height: 150px;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.lc-map-frame { width: 100%; height: 150px; border: none; display: block; filter: grayscale(12%) contrast(1.04); }

/* Map facade (lazy-load on click for fast initial render) */
.lc-map-facade { position: relative; cursor: pointer; background: #0a7280; }
.lc-map-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: rgba(255,255,255,.92);
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10), transparent 55%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 10px, transparent 10px 20px),
        linear-gradient(150deg, #12a7b7, #0a7280);
    transition: filter .15s;
}
.lc-map-facade:hover .lc-map-placeholder { filter: brightness(1.08); }
.lc-map-placeholder i { font-size: 24px; color: #fff; }
.lc-map-placeholder span { font-size: 11px; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 1100px) { .lc-maps { grid-template-columns: 1fr 1fr; } }

/* Footer / status */
.lc-footer { margin-top: auto; padding-top: 10px; font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.7; }
.lc-status {
    display: inline-flex; align-items: center; gap: 7px; font-size: 11px;
    color: rgba(180,255,210,.9); font-weight: 600; letter-spacing: .04em; margin-bottom: 6px;
}
.lc-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: statusDot 2.5s ease-in-out infinite; }

/* ===== RIGHT: Login form ===== */
.login-right {
    width: min(44vw, 500px); min-width: 360px; flex-shrink: 0;
    background: #fbfcfd;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 36px 40px;
    position: relative; overflow: hidden;
}
.login-card { width: 100%; max-width: 340px; position: relative; z-index: 3; }

/* Bread strips */
.lc-bread-band {
    position: absolute; left: 0; right: 0; height: 96px; overflow: hidden;
    z-index: 1; pointer-events: none;
    border-top: 1px solid #e7eef6; border-bottom: 1px solid #e7eef6;
    background: linear-gradient(180deg, #f9fbfe, #eef4fc);
}
.lc-bread-band.top { top: 0; }
.lc-bread-band.bottom { bottom: 0; }
.lc-bread-band::before, .lc-bread-band::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 2;
}
.lc-bread-band::before { left: 0;  background: linear-gradient(90deg, #fbfcfd, rgba(251,252,253,0)); }
.lc-bread-band::after  { right: 0; background: linear-gradient(270deg, #fbfcfd, rgba(251,252,253,0)); }
.lc-bread-track {
    position: absolute; top: 11px; left: 0; height: 74px; width: max-content;
    display: flex; align-items: center; gap: 12px; padding: 0 12px;
    animation: breadFlow 60s linear infinite; will-change: transform;
}
.lc-bread-band.bottom .lc-bread-track { animation-direction: reverse; animation-duration: 66s; }
.lc-bread-item {
    width: 110px; height: 74px; border-radius: 14px; overflow: hidden; flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 16px rgba(45,79,120,.18); background: #fff;
}
.lc-bread-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.02) contrast(1.02); }

.brand-r { display: flex; flex-direction: column; align-items: center; margin-bottom: 22px; }
.brand-r-logo {
    width: 124px; height: 124px; border-radius: 22px; overflow: hidden; padding: 10px;
    background: #fff; border: 1px solid #eef2f6; box-shadow: 0 14px 30px rgba(36,79,86,.14);
    display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.brand-r-logo img { width: 100%; height: 100%; object-fit: contain; }

.lc-welcome {
    font-size: 11px; font-weight: 800; color: var(--teal); letter-spacing: .14em;
    text-transform: uppercase; text-align: center; margin-bottom: 6px;
}
.lc-title { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; text-align: center; letter-spacing: -.02em; margin-bottom: 4px; }
.lc-subtitle { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 22px; }

.lc-alert {
    width: 100%; background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2;
    border-radius: 10px; padding: 11px 14px; font-size: 13px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 9px;
}

.lc-label { font-size: 11px; font-weight: 700; color: #64748B; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .5px; }
.field { margin-bottom: 14px; position: relative; }
.field .ic {
    position: absolute; left: 0; top: 0; bottom: 0; width: 44px;
    display: flex; align-items: center; justify-content: center;
    color: var(--teal); font-size: 14px; border-right: 1px solid var(--line);
}
.field input {
    width: 100%; padding: 13px 44px 13px 56px;
    background: var(--field-bg); border: 1px solid transparent; border-radius: 9px;
    color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.field input::placeholder { color: #9fb0bf; }
.field input:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,141,157,.14); }
.field .toggle-pw {
    position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: none; background: transparent; color: #9fb0bf;
    cursor: pointer; border-radius: 7px; display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.field .toggle-pw:hover { color: var(--teal); background: rgba(13,141,157,.08); }

.lc-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; font-size: 13px;
}
.lc-remember { display: flex; align-items: center; gap: 7px; color: #64748b; cursor: pointer; }
.lc-remember input { width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; }
.lc-forgot { color: var(--teal); font-weight: 600; text-decoration: none; }
.lc-forgot:hover { text-decoration: underline; }

.btn-login {
    width: 100%; padding: 14px 16px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: #fff; font-size: 15px; font-weight: 700; font-family: inherit;
    border: none; border-radius: 9px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px; letter-spacing: .2px;
    box-shadow: 0 10px 22px rgba(13,141,157,.26);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(13,141,157,.34); filter: brightness(1.03); }
.btn-login:active { transform: translateY(0); }

.lc-security {
    display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px;
}
.lc-security span { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 5px; }
.lc-security span i { font-size: 11px; color: #22c55e; }

.login-foot { text-align: center; margin-top: 16px; font-size: 11px; color: #aab8c5; }

/* Loading overlay */
#loadingOverlay {
    display: none; position: fixed; inset: 0; background: rgba(10,40,46,.46);
    z-index: 9999; align-items: center; justify-content: center; flex-direction: column;
    backdrop-filter: blur(6px);
}
.spinner-text { margin-top: 14px; font-weight: 500; color: #fff; font-size: 14px; }

/* Keyframes */
@keyframes hbRise { to { opacity: 1; transform: translateY(0); } }
@keyframes hbCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes scanLine { 0% { transform: translateY(0); opacity: 0;} 8% { opacity: .7;} 92% { opacity: .1;} 100% { transform: translateY(100vh); opacity: 0;} }
@keyframes statusDot { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.6);} 50% { box-shadow: 0 0 0 6px rgba(74,222,128,0);} }
@keyframes breadFlow { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* Responsive */
@media (max-width: 900px) {
    body { overflow: auto; }
    .login-left { display: none; }
    .login-right { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lc-bread-track, .login-left::after, .lc-status-dot { animation: none !important; }
    .headline, .subhead { opacity: 1; transform: none; }
}
