/* ══════════════════════════════════════════════════════════════════════════════
   GPSafe — Platform Login  ·  Premium Dark Theme
   Split-screen layout (desktop) · Single-column (mobile)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ═══ VARIABLES ═══ */
:root {
    --pl-bg:           #040f0b;
    --pl-bg2:          #061b14;
    --pl-surface:      rgba(255,255,255,.035);
    --pl-surface-2:    rgba(255,255,255,.06);
    --pl-border:       rgba(255,255,255,.08);
    --pl-border-hover: rgba(25,195,125,.30);
    --pl-text:         rgba(255,255,255,.92);
    --pl-muted:        rgba(255,255,255,.50);
    --pl-accent:       #19c37d;
    --pl-accent-glow:  rgba(25,195,125,.35);
    --pl-accent-hover: #15b572;
    --pl-accent-dark:  #0d7a4d;
    --pl-danger:       #ef4444;
    --pl-input-bg:     rgba(255,255,255,.045);
    --pl-input-focus:  rgba(25,195,125,.10);
    --pl-radius:       14px;
    --pl-radius-sm:    10px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--pl-bg);
    color: var(--pl-text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

/* ═══ PARTICLE CANVAS ═══ */
#plParticles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ═══ GRADIENT ORBS ═══ */
.pl-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.pl-orb--1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(25,195,125,.22) 0%, transparent 70%);
    top: -18%; right: -8%;
    animation: orbFloat1 18s ease-in-out infinite;
}
.pl-orb--2 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(14,165,233,.14) 0%, transparent 70%);
    bottom: -12%; left: -6%;
    animation: orbFloat2 22s ease-in-out infinite;
}
.pl-orb--3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(25,195,125,.10) 0%, transparent 70%);
    top: 40%; left: 30%;
    animation: orbFloat3 15s ease-in-out infinite;
}

@keyframes orbFloat1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px,30px); } }
@keyframes orbFloat2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-25px); } }
@keyframes orbFloat3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-20px,-35px); } }

/* ═══ WRAPPER — split layout ═══ */
.pl-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100vh;
    height: 100dvh; /* mobile safe */
}

/* ═══ LEFT COLUMN — branding ═══ */
.pl-brand-col {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.pl-brand-col::after {
    content: '';
    position: absolute;
    right: 0; top: 10%; bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--pl-border), transparent);
}

.pl-brand-inner {
    max-width: 440px;
    animation: plSlideRight .7s cubic-bezier(.22,1,.36,1);
}

@keyframes plSlideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Logo */
.pl-brand-logo {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 2.5rem;
}
.pl-brand-logo-img {
    height: 46px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(25,195,125,.25));
}
.pl-brand-logo-fallback {
    display: none;
    align-items: center;
    gap: .65rem;
}
.pl-logo-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pl-accent), var(--pl-accent-dark));
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 32px var(--pl-accent-glow);
}
.pl-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--pl-text);
    letter-spacing: -.02em;
}

/* Headline */
.pl-brand-headline {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--pl-text) 30%, var(--pl-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pl-brand-sub {
    font-size: .95rem;
    color: var(--pl-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Feature rows */
.pl-brand-features {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.pl-feature-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .88rem;
    color: rgba(255,255,255,.72);
}
.pl-feature-row .material-symbols-rounded {
    font-size: 1.3rem;
    color: var(--pl-accent);
    font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* ═══ RIGHT COLUMN — form ═══ */
.pl-form-col {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

/* ═══ CARD ═══ */
.pl-card {
    width: 100%;
    max-width: 400px;
    background: var(--pl-surface);
    border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius);
    padding: 2.5rem 2rem 2rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: plFadeUp .6s cubic-bezier(.22,1,.36,1);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.03),
        0 24px 80px -12px rgba(0,0,0,.5),
        inset 0 1px 0 rgba(255,255,255,.04);
}

@keyframes plFadeUp {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile logo (hidden on desktop) */
.pl-mobile-logo {
    display: none;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.pl-mobile-logo-img {
    height: 36px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(25,195,125,.25));
}
.pl-mobile-logo-fallback {
    display: none;
    align-items: center;
    gap: .5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--pl-accent);
}
.pl-mobile-logo-fallback i { font-size: 1.2rem; }

/* ═══ TITLE / SUBTITLE ═══ */
.pl-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: var(--pl-text);
}
.pl-subtitle {
    font-size: .82rem;
    color: var(--pl-muted);
    margin: 0 0 1.75rem;
}

/* ═══ ERROR ALERT ═══ */
.pl-alert {
    display: flex;
    align-items: center;
    gap: .55rem;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.22);
    color: #fca5a5;
    border-radius: var(--pl-radius-sm);
    padding: .7rem .9rem;
    font-size: .8rem;
    margin-bottom: 1.5rem;
    animation: plShake .45s ease-out;
}
.pl-alert i { color: var(--pl-danger); font-size: .9rem; flex-shrink: 0; }

@keyframes plShake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-6px); }
    40%     { transform: translateX(5px); }
    60%     { transform: translateX(-3px); }
    80%     { transform: translateX(2px); }
}

/* ═══ FORM FIELDS ═══ */
.pl-field { margin-bottom: 1.15rem; }

.pl-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--pl-muted);
    margin-bottom: .4rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pl-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pl-input-wrap > i:first-child {
    position: absolute;
    left: .9rem;
    font-size: .82rem;
    color: rgba(255,255,255,.28);
    pointer-events: none;
    transition: color .25s, transform .25s;
    z-index: 2;
}

.pl-input {
    width: 100%;
    background: var(--pl-input-bg);
    color: var(--pl-text);
    border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius-sm);
    padding: .68rem .9rem .68rem 2.6rem;
    font-family: inherit;
    font-size: .9rem;
    transition: border-color .25s, background .25s, box-shadow .25s;
    outline: none;
}
.pl-input::placeholder { color: rgba(255,255,255,.22); }

.pl-input:focus {
    border-color: var(--pl-accent);
    background: var(--pl-input-focus);
    box-shadow: 0 0 0 3px rgba(25,195,125,.10), 0 0 20px -4px var(--pl-accent-glow);
}
.pl-input:focus ~ i:first-child,
.pl-input-wrap:focus-within > i:first-child {
    color: var(--pl-accent);
    transform: scale(1.1);
}

/* Password toggle */
.pl-toggle-pw {
    position: absolute;
    right: .6rem;
    background: none;
    border: none;
    color: rgba(255,255,255,.3);
    cursor: pointer;
    padding: .3rem;
    font-size: .82rem;
    transition: color .2s;
    z-index: 2;
}
.pl-toggle-pw:hover { color: var(--pl-accent); }

/* Autofill override */
.pl-input:-webkit-autofill,
.pl-input:-webkit-autofill:hover,
.pl-input:-webkit-autofill:focus {
    -webkit-text-fill-color: rgba(255,255,255,.92) !important;
    -webkit-box-shadow: 0 0 0 1000px #0a2218 inset !important;
    border-color: var(--pl-accent) !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--pl-text);
}

/* ═══ SUBMIT BUTTON ═══ */
.pl-btn {
    width: 100%;
    padding: .78rem;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--pl-accent) 0%, var(--pl-accent-dark) 100%);
    border: none;
    border-radius: var(--pl-radius-sm);
    cursor: pointer;
    transition: box-shadow .25s, transform .15s, filter .25s;
    margin-top: .6rem;
    position: relative;
    overflow: hidden;
}
.pl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .25s;
}
.pl-btn:hover::before { opacity: 1; }
.pl-btn:hover {
    box-shadow: 0 8px 32px var(--pl-accent-glow), 0 0 0 1px rgba(25,195,125,.3);
    transform: translateY(-1px);
}
.pl-btn:active { transform: translateY(0) scale(.985); }
.pl-btn--loading {
    pointer-events: none;
    filter: brightness(.85);
}
.pl-btn i { margin-right: .4rem; }

/* ═══ DIVIDER ═══ */
.pl-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 1rem;
}
.pl-divider span {
    flex: 1;
    height: 1px;
    background: var(--pl-border);
}
.pl-divider small {
    font-size: .7rem;
    color: rgba(255,255,255,.25);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

/* ═══ FOOTER TEXT ═══ */
.pl-footer-text {
    font-size: .72rem;
    color: var(--pl-muted);
    text-align: center;
    margin: 0;
    opacity: .6;
}
.pl-footer-text i { margin-right: .3rem; opacity: .6; }

/* ═══ PAGE FOOTER ═══ */
.pl-page-footer {
    font-size: .7rem;
    color: rgba(255,255,255,.2);
    margin-top: 2rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

/* Tablets & small desktops */
@media (max-width: 1024px) {
    .pl-brand-col { flex: 0 0 42%; padding: 2rem; }
    .pl-brand-headline { font-size: 1.6rem; }
}

/* Mobile — stack vertically */
@media (max-width: 768px) {
    .pl-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }
    .pl-brand-col { display: none; }
    .pl-form-col {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding: 2rem 1.25rem 2rem;
        padding-top: max(env(safe-area-inset-top, 0px), 3rem);
    }
    .pl-mobile-logo { display: flex; }
    .pl-card {
        padding: 2rem 1.5rem 1.75rem;
        max-width: 100%;
        border-radius: 16px;
    }
    .pl-title { font-size: 1.2rem; }
    .pl-orb--1 { width: 300px; height: 300px; top: -10%; right: -20%; }
    .pl-orb--2 { width: 200px; height: 200px; }
    .pl-orb--3 { display: none; }
}

/* Small phones */
@media (max-width: 380px) {
    .pl-card { padding: 1.5rem 1.15rem 1.25rem; }
    .pl-input { font-size: .85rem; padding: .6rem .8rem .6rem 2.3rem; }
    .pl-btn { padding: .7rem; font-size: .87rem; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .pl-wrapper { overflow-y: auto; }
    .pl-brand-col { display: none; }
    .pl-form-col { padding: 1rem; }
    .pl-card { padding: 1.25rem 1.5rem; }
    .pl-field { margin-bottom: .75rem; }
}

/* Tall screens — extra breathing room */
@media (min-height: 900px) and (min-width: 769px) {
    .pl-card { padding: 3rem 2.5rem 2.5rem; }
}
