@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

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

/* ── Light theme (default) ──────────────────────────────────── */
:root {
    --lg-font:        'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --lg-font-mono:   'DM Mono', monospace;

    --lg-bg:          #f0f2f7;
    --lg-panel:       #ffffff;
    --lg-panel-r:     #fafbff;
    --lg-border:      #e2e6f0;
    --lg-shadow:      0 16px 64px rgba(15,23,42,.10), 0 4px 16px rgba(15,23,42,.06);
    --lg-radius:      16px;
    --lg-radius-sm:   10px;
    --lg-radius-xs:   6px;

    --lg-text-h:      #0f172a;
    --lg-text-b:      #334155;
    --lg-text-m:      #64748b;
    --lg-text-l:      #94a3b8;

    --lg-input-bg:    #f8fafc;
    --lg-input-bdr:   #cbd5e1;
    --lg-input-focus: #2563eb;
    --lg-input-text:  #0f172a;
    --lg-placeholder: #94a3b8;

    --lg-accent:      #2563eb;
    --lg-accent-dk:   #1d4ed8;
    --lg-accent-glow: rgba(37,99,235,.12);

    --lg-btn-bg:      #2563eb;
    --lg-btn-hover:   #1d4ed8;
    --lg-btn-sh:      0 4px 14px rgba(37,99,235,.28);
    --lg-btn-sh-hov:  0 6px 20px rgba(37,99,235,.35);

    --lg-sec-bg:      #f8fafc;
    --lg-sec-bdr:     #e2e6f0;
    --lg-sec-ok:      #16a34a;

    --lg-feat-bg:     #ffffff;
    --lg-feat-bdr:    #e2e6f0;

    --lg-logo-icon:   #2563eb;
    --lg-logo-text:   #0f172a;
    --lg-logo-acc:    #2563eb;
    --lg-logo-line:   #2563eb;

    --lg-link:        #2563eb;
    --lg-forgot:      #2563eb;
    --lg-divider:     #e2e6f0;
    --lg-footer-c:    #94a3b8;
    --lg-footer-hov:  #64748b;

    /* icon swatches */
    --ic-blue-bg:    #eff6ff; --ic-blue-c:   #2563eb;
    --ic-green-bg:   #f0fdf4; --ic-green-c:  #16a34a;
    --ic-amber-bg:   #fffbeb; --ic-amber-c:  #d97706;
    --ic-rose-bg:    #fff1f2; --ic-rose-c:   #e11d48;
    --ic-purple-bg:  #f5f3ff; --ic-purple-c: #7c3aed;
    --ic-teal-bg:    #f0fdfa; --ic-teal-c:   #0d9488;
}

/* ── Dark theme ─────────────────────────────────────────────── */
html[data-gp-theme="dark"] {
    --lg-bg:          #080c14;
    --lg-panel:       #0e1420;
    --lg-panel-r:     #0b1019;
    --lg-border:      #1e2a3d;
    --lg-shadow:      0 20px 70px rgba(0,0,0,.55), 0 4px 20px rgba(0,0,0,.3);

    --lg-text-h:      #f0f6ff;
    --lg-text-b:      #c8d8f0;
    --lg-text-m:      #7a90b0;
    --lg-text-l:      #4a607a;

    --lg-input-bg:    #0a1020;
    --lg-input-bdr:   #1e2e44;
    --lg-input-focus: #3b82f6;
    --lg-input-text:  #f0f6ff;
    --lg-placeholder: #4a607a;

    --lg-accent:      #3b82f6;
    --lg-accent-dk:   #2563eb;
    --lg-accent-glow: rgba(59,130,246,.18);

    --lg-btn-bg:      #3b82f6;
    --lg-btn-hover:   #3b82f6;
    --lg-btn-sh:      0 4px 20px rgba(59,130,246,.35), 0 1px 3px rgba(0,0,0,.3);
    --lg-btn-sh-hov:  0 6px 28px rgba(59,130,246,.45), 0 2px 6px rgba(0,0,0,.4);

    --lg-sec-bg:      rgba(59,130,246,.04);
    --lg-sec-bdr:     #1e2a3d;
    --lg-sec-ok:      #4ade80;

    --lg-feat-bg:     rgba(255,255,255,.025);
    --lg-feat-bdr:    #1e2a3d;

    --lg-logo-icon:   linear-gradient(135deg,#3b82f6,#6366f1);
    --lg-logo-text:   #f0f6ff;
    --lg-logo-acc:    #60a5fa;
    --lg-logo-line:   #3b82f6;

    --lg-link:        #60a5fa;
    --lg-forgot:      #60a5fa;
    --lg-divider:     #1e2a3d;
    --lg-footer-c:    #4a607a;
    --lg-footer-hov:  #7a90b0;

    --ic-blue-bg:    rgba(59,130,246,.12); --ic-blue-c:   #60a5fa;
    --ic-green-bg:   rgba(74,222,128,.10); --ic-green-c:  #4ade80;
    --ic-amber-bg:   rgba(251,191,36,.10); --ic-amber-c:  #fbbf24;
    --ic-rose-bg:    rgba(251,113,133,.1); --ic-rose-c:   #fb7185;
    --ic-purple-bg:  rgba(167,139,250,.1); --ic-purple-c: #a78bfa;
    --ic-teal-bg:    rgba(45,212,191,.10); --ic-teal-c:   #2dd4bf;
}

/* ── Base ───────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
    font-family: var(--lg-font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--lg-bg);
    color: var(--lg-text-b);
    -webkit-font-smoothing: antialiased;
}

/* Radial background blobs */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(219,234,254,.50) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(224,231,255,.38) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(240,249,255,.25) 0%, transparent 60%);
}
html[data-gp-theme="dark"] body::before {
    background:
        radial-gradient(ellipse 70% 55% at 5% 10%,  rgba(59,130,246,.09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 45% at 95% 90%, rgba(99,102,241,.07) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 50% 50%, rgba(59,130,246,.04) 0%, transparent 60%);
}

/* Dark: grid lines */
html[data-gp-theme="dark"] body::after {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background-image:
        linear-gradient(rgba(59,130,246,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ── Shell ──────────────────────────────────────────────────── */
.lg-shell {
    flex: 1;
    position: relative; z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 64px;
}

/* ── Card (two-column) ──────────────────────────────────────── */
.lg-card {
    display: grid;
    grid-template-columns: 420px 1fr;
    width: 100%;
    max-width: 980px;
    background: var(--lg-panel);
    border-radius: var(--lg-radius);
    box-shadow: var(--lg-shadow);
    border: 1px solid var(--lg-border);
    overflow: hidden;
    position: relative;
    animation: lgCardIn .5s cubic-bezier(.22,1,.36,1) both;
}

/* Dark: glowing top edge */
html[data-gp-theme="dark"] .lg-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%; height: 1px; z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.5) 30%, rgba(99,102,241,.5) 70%, transparent);
}

@keyframes lgCardIn {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
@keyframes lgFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Left panel ─────────────────────────────────────────────── */
.lg-left {
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--lg-border);
    position: relative;
}
.lg-left::after {
    content: '';
    position: absolute;
    top: 0; right: -1px; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent, var(--lg-accent) 40%, var(--lg-accent) 60%, transparent);
    opacity: .3;
}

/* ── Logo ───────────────────────────────────────────────────── */
.lg-logo { margin-bottom: 36px; animation: lgFadeUp .4s .1s both; }
.lg-logo-mark {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
}
.lg-logo-img {
    max-width: 160px; max-height: 48px;
    object-fit: contain; display: block;
}
.lg-logo-fallback { display: none; align-items: center; gap: 10px; }
.lg-logo-ico {
    width: 36px; height: 36px;
    background: var(--lg-logo-icon);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
html[data-gp-theme="dark"] .lg-logo-ico {
    box-shadow: 0 4px 14px rgba(59,130,246,.4);
}
.lg-logo-ico svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.lg-logo-name {
    font-size: 24px; font-weight: 700; letter-spacing: -.5px;
    color: var(--lg-logo-text);
}
.lg-logo-name span { color: var(--lg-logo-acc); }
.lg-logo-sub {
    font-size: 11px; font-weight: 500; letter-spacing: .12em;
    text-transform: uppercase; color: var(--lg-text-l);
    padding-left: 46px;
}
.lg-logo-line {
    width: 40px; height: 2px;
    background: var(--lg-logo-line);
    border-radius: 2px;
    margin: 10px 0 0 46px; opacity: .5;
}

/* ── Brand (logo) ───────────────────────────────────────────── */
.lg-brand { margin-bottom: 28px; animation: lgFadeUp .4s .1s both; }

.lg-brand-mark {
    display: inline-block;
    transition: background .3s, padding .3s, border-radius .3s, box-shadow .3s;
}
.lg-brand-mark img {
    max-width: 180px; max-height: 52px;
    object-fit: contain; display: block;
}
/* Dark theme — logo has a white background PNG, so wrap it in a white pill */
html[data-gp-theme="dark"] .lg-brand-mark {
    background: rgba(255,255,255,.94);
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.lg-brand-fallback {
    font-size: 28px; font-weight: 800;
    letter-spacing: -.04em; line-height: 1.1;
}
.lg-brand-smart  { color: var(--lg-text-h); }
.lg-brand-office { color: var(--lg-accent); }

.lg-brand-sub {
    font-size: 13px; color: var(--lg-text-m);
    margin-top: 6px; margin-bottom: 10px;
}

.lg-brand-line {
    display: block;
    width: 180px; height: 3px; border-radius: 4px;
    background: linear-gradient(90deg, #f97316, #fbbf24);
}

/* ── Heading ────────────────────────────────────────────────── */
.lg-heading { margin-bottom: 28px; animation: lgFadeUp .4s .15s both; }
.lg-heading h1 {
    font-size: 22px; font-weight: 600; letter-spacing: -.3px;
    color: var(--lg-text-h); margin-bottom: 4px;
}
.lg-heading p { font-size: 13px; color: var(--lg-text-m); }

/* ── Form ───────────────────────────────────────────────────── */
.lg-form { display: flex; flex-direction: column; gap: 18px; flex: 1; }

.lg-field { display: flex; flex-direction: column; gap: 6px; animation: lgFadeUp .4s both; }
.lg-field:nth-child(1) { animation-delay: .20s; }
.lg-field:nth-child(2) { animation-delay: .25s; }
.lg-field:nth-child(3) { animation-delay: .30s; }
.lg-field label {
    font-size: 10.5px; font-weight: 600;
    letter-spacing: .10em; text-transform: uppercase;
    color: var(--lg-text-m);
}

.lg-iw { position: relative; display: flex; align-items: center; }
.lg-iw .lg-ico {
    position: absolute; left: 14px;
    color: var(--lg-text-l); display: flex;
    pointer-events: none; transition: color .2s;
}
.lg-iw .lg-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lg-iw:has(input:focus) .lg-ico { color: var(--lg-accent); }

.lg-iw input {
    width: 100%; height: 44px;
    padding: 0 40px 0 42px;
    background: var(--lg-input-bg);
    border: 1.5px solid var(--lg-input-bdr);
    border-radius: var(--lg-radius-xs);
    font-family: var(--lg-font); font-size: 13.5px;
    color: var(--lg-input-text);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-iw input::placeholder { color: var(--lg-placeholder); }
.lg-iw input:focus {
    border-color: var(--lg-input-focus);
    box-shadow: 0 0 0 3px var(--lg-accent-glow);
}
html[data-gp-theme="dark"] .lg-iw input:focus { background: #0c1828; }

.lg-eye {
    position: absolute; right: 12px;
    background: none; border: none; cursor: pointer;
    padding: 4px; color: var(--lg-text-l);
    display: flex; border-radius: 4px; transition: color .2s;
}
.lg-eye:hover { color: var(--lg-text-b); }
.lg-eye svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── Form footer (show pw + forgot) ─────────────────────────── */
.lg-form-ft {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: -2px; animation: lgFadeUp .4s .35s both;
}
.lg-show-pw { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.lg-show-pw input[type="checkbox"] {
    width: 15px; height: 15px;
    border: 1.5px solid var(--lg-input-bdr);
    border-radius: 4px; appearance: none; -webkit-appearance: none;
    background: var(--lg-input-bg); cursor: pointer;
    position: relative;
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}
.lg-show-pw input[type="checkbox"]:checked {
    background: var(--lg-accent); border-color: var(--lg-accent);
}
.lg-show-pw input[type="checkbox"]:checked::after {
    content: ''; position: absolute; left: 3px; top: 1px;
    width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg);
}
.lg-show-pw span { font-size: 12.5px; color: var(--lg-text-m); user-select: none; }
.lg-forgot {
    font-size: 12.5px; font-weight: 500;
    color: var(--lg-forgot); text-decoration: none; transition: opacity .15s;
}
.lg-forgot:hover { opacity: .75; }

/* ── Login button ───────────────────────────────────────────── */
.lg-btn {
    height: 46px;
    background: var(--lg-btn-bg);
    color: #fff; border: none;
    border-radius: var(--lg-radius-xs);
    font-family: var(--lg-font); font-size: 14px; font-weight: 600;
    letter-spacing: .02em; cursor: pointer;
    transition: box-shadow .2s, transform .1s, opacity .2s;
    box-shadow: var(--lg-btn-sh);
    margin-top: 4px; animation: lgFadeUp .4s .4s both;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden;
}
html[data-gp-theme="dark"] .lg-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
html[data-gp-theme="dark"] .lg-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.08) 0%, transparent 60%);
}
.lg-btn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; position: relative; z-index: 1; }
.lg-btn span { position: relative; z-index: 1; }
.lg-btn:hover { box-shadow: var(--lg-btn-sh-hov); transform: translateY(-1px); }
html[data-gp-theme="dark"] .lg-btn:hover { opacity: .9; }
.lg-btn:active { transform: translateY(0); }

/* ── Button loading state ───────────────────────────────────── */
.lg-btn:disabled { opacity: .72; cursor: not-allowed; transform: none !important; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
.lg-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: lgSpin .7s linear infinite;
    flex-shrink: 0;
    display: none;
}
.lg-btn.lg-loading .lg-spinner { display: block; }
.lg-btn.lg-loading .lg-btn-icon,
.lg-btn.lg-loading .lg-btn-label { opacity: 0; }

/* ── Forgot link loading state ──────────────────────────────── */
.lg-forgot.lg-loading {
    opacity: .5; pointer-events: none; cursor: default;
}
.lg-forgot.lg-loading::after {
    content: ' ⋯';
}

/* ── Security row ───────────────────────────────────────────── */
.lg-sec {
    display: flex; align-items: center; gap: 8px;
    margin-top: 18px; padding: 10px 14px;
    background: var(--lg-sec-bg);
    border: 1px solid var(--lg-sec-bdr);
    border-radius: var(--lg-radius-xs);
    animation: lgFadeUp .4s .45s both;
}
.lg-sec svg { width: 14px; height: 14px; flex-shrink: 0; }
.lg-sec-txt {
    font-size: 11px; color: var(--lg-text-l);
    font-family: var(--lg-font-mono); letter-spacing: .01em;
}
.lg-sec-txt strong { color: var(--lg-sec-ok); font-weight: 500; }

/* ── Seal ───────────────────────────────────────────────────── */
.lg-seal { margin-top: 10px; }

/* ── Right panel ────────────────────────────────────────────── */
.lg-right {
    background: var(--lg-panel-r);
    padding: 44px 40px;
    display: flex; flex-direction: column; gap: 24px;
    position: relative; overflow: hidden;
}
.lg-right::before {
    content: '';
    position: absolute; top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,.05) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
html[data-gp-theme="dark"] .lg-right::after {
    content: '';
    position: absolute; bottom: -60px; left: -60px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(99,102,241,.05) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}

.lg-rh { animation: lgFadeUp .4s .1s both; position: relative; z-index: 1; }
.lg-rh h2 {
    font-size: 10.5px; font-weight: 600; letter-spacing: .13em;
    text-transform: uppercase; color: var(--lg-text-m); margin-bottom: 4px;
}
.lg-rh p { font-size: 13.5px; color: var(--lg-text-b); line-height: 1.5; }

/* ── Feature cards ──────────────────────────────────────────── */
.lg-features {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; flex: 1; position: relative; z-index: 1;
}
.lg-feat {
    background: var(--lg-feat-bg);
    border: 1px solid var(--lg-feat-bdr);
    border-radius: var(--lg-radius-sm);
    padding: 16px;
    display: flex; flex-direction: column; gap: 9px;
    transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
    box-shadow: 0 1px 3px rgba(15,23,42,.05);
    animation: lgFadeUp .4s both; cursor: default;
}
.lg-feat:nth-child(1) { animation-delay: .15s; }
.lg-feat:nth-child(2) { animation-delay: .20s; }
.lg-feat:nth-child(3) { animation-delay: .25s; }
.lg-feat:nth-child(4) { animation-delay: .30s; }
.lg-feat:nth-child(5) { animation-delay: .35s; }
.lg-feat:nth-child(6) { animation-delay: .40s; }
.lg-feat:hover {
    border-color: var(--lg-accent);
    box-shadow: 0 4px 16px rgba(37,99,235,.1);
    transform: translateY(-2px);
}
html[data-gp-theme="dark"] .lg-feat:hover {
    border-color: rgba(59,130,246,.35);
    background: rgba(59,130,246,.06);
    box-shadow: 0 0 20px rgba(59,130,246,.08);
}

.lg-feat-ico {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lg-feat-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lg-feat-name { font-size: 12px; font-weight: 600; color: var(--lg-text-h); line-height: 1.3; }

/* Swatch variants */
.lg-ic-blue   { background: var(--ic-blue-bg);   color: var(--ic-blue-c);   }
.lg-ic-green  { background: var(--ic-green-bg);  color: var(--ic-green-c);  }
.lg-ic-amber  { background: var(--ic-amber-bg);  color: var(--ic-amber-c);  }
.lg-ic-rose   { background: var(--ic-rose-bg);   color: var(--ic-rose-c);   }
.lg-ic-purple { background: var(--ic-purple-bg); color: var(--ic-purple-c); }
.lg-ic-teal   { background: var(--ic-teal-bg);   color: var(--ic-teal-c);   }

/* ── Tagline ────────────────────────────────────────────────── */
.lg-tagline {
    font-size: 12px; color: var(--lg-text-l); line-height: 1.6;
    border-top: 1px solid var(--lg-divider); padding-top: 16px;
    animation: lgFadeUp .4s .45s both; position: relative; z-index: 1;
}

/* ── Footer (fixed bottom) ──────────────────────────────────── */
.lg-footer {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 20px; z-index: 10;
    animation: lgFadeUp .4s .5s both; white-space: nowrap;
}
.lg-footer a {
    font-size: 11.5px; color: var(--lg-footer-c);
    text-decoration: none; font-weight: 500; transition: color .15s;
}
.lg-footer a:hover { color: var(--lg-footer-hov); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .lg-card { grid-template-columns: 1fr; max-width: 460px; }
    .lg-right { display: none; }
    .lg-left { border-right: none; }
    .lg-shell { padding-bottom: 24px; justify-content: flex-start; padding-top: 40px; }
    .lg-footer { position: static; transform: none; justify-content: center; margin-top: 20px; }
}
