:root {
  --leadivo-primary: #0866ff;
  --leadivo-primary-dark: #0553d4;
  --leadivo-bg-left: #f0f2f5;
  --leadivo-bg-right: #ffffff;
  --leadivo-text: #1c2b33;
  --leadivo-muted: #65737e;
  --leadivo-border: #dae0e6;
  --leadivo-border-light: #e9eef3;
  --leadivo-soft: #f7f9fc;
  --leadivo-shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.06);
  --leadivo-shadow-md: 0 20px 60px rgba(16, 24, 40, 0.1);
}

.login-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--leadivo-bg-left);
  color: var(--leadivo-text);
}

.login-branding {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(8,102,255,.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(34,197,94,.07), transparent 24%),
    linear-gradient(160deg, #e7f0fd 0%, #f0f2f5 45%, #f8fafc 100%);
}

.login-branding-inner {
  width: 100%;
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(340px, 500px) minmax(420px, 1fr);
  gap: 48px;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--leadivo-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(8,102,255,.22);
  overflow: hidden;
}

.brand-logo-icon.center {
  margin: 0 auto 18px;
}

.brand-logo-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-logo-text span {
  color: var(--leadivo-primary);
}

.brand-headline {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 18px;
}

.brand-subtitle {
  max-width: 500px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--leadivo-muted);
  margin-bottom: 28px;
}

.brand-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.brand-trust-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(8,102,255,.14);
  color: #2359c6;
  font-size: 12.5px;
  font-weight: 800;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--leadivo-muted);
  line-height: 1.6;
  font-size: 15px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.fi-map { background: #eaf2ff; color: #2359c6; }
.fi-data { background: #eaf7ee; color: #157347; }
.fi-chat { background: #fff3e6; color: #c05621; }

.login-hero-visual {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.login-dashboard-mockup {
  width: min(100%, 760px);
  background: white;
  border: 1px solid var(--leadivo-border);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--leadivo-shadow-md);
  position: relative;
  z-index: 3;
}

.login-mockup-titlebar {
  background: #f7f9fc;
  border-bottom: 1px solid var(--leadivo-border);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-titlebar-dots {
  display: flex;
  gap: 5px;
}

.login-titlebar-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.login-dot-red { background: #ff5f57; }
.login-dot-yellow { background: #ffbe2e; }
.login-dot-green { background: #28c840; }

.login-titlebar-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #7a8794;
}

.login-titlebar-status {
  padding: 4px 10px;
  background: #ecfdf3;
  border: 1px solid #b7e6c5;
  color: #157347;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.leadivo-mockup-body {
  display: grid;
  grid-template-columns: 52px 1.05fr 1fr;
  min-height: 430px;
}

.leadivo-mockup-sidebar {
  background: #132033;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.login-mockup-sidebar-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--leadivo-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.login-mockup-sidebar-logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.login-mockup-menu-item {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #93a2b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.login-mockup-menu-item.active {
  background: rgba(8,102,255,.24);
  color: #bbd6ff;
}

.leadivo-map-panel {
  position: relative;
  background: #eef4fb;
  border-right: 1px solid var(--leadivo-border);
  overflow: hidden;
}

.leadivo-map-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(8,102,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,102,255,.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.leadivo-search-card {
  position: absolute;
  top: 18px;
  left: 16px;
  right: 16px;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--leadivo-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--leadivo-shadow-sm);
  z-index: 2;
}

.leadivo-search-label {
  font-size: 10px;
  font-weight: 800;
  color: #7a8794;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.leadivo-search-label.mt {
  margin-top: 10px;
}

.leadivo-search-value {
  height: 34px;
  background: #f7f9fc;
  border: 1px solid var(--leadivo-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.leadivo-chip-row {
  display: flex;
  gap: 6px;
}

.leadivo-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #738190;
  font-size: 10px;
  font-weight: 800;
}

.leadivo-chip.active {
  background: var(--leadivo-primary);
  color: white;
}

.leadivo-mini-btn {
  width: 100%;
  margin-top: 12px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: var(--leadivo-primary);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.map-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--leadivo-primary);
  border: 3px solid white;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(8,102,255,.28);
}

.pin-1 { left: 46%; top: 54%; }
.pin-2 { left: 68%; top: 38%; }
.pin-3 { left: 30%; top: 70%; }
.pin-4 { left: 76%; top: 72%; }

.leadivo-result-panel {
  padding: 16px;
  background: white;
}

.leadivo-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.leadivo-panel-head strong {
  display: block;
  font-size: 14px;
}

.leadivo-panel-head span {
  font-size: 10px;
  color: var(--leadivo-muted);
}

.leadivo-status-pill {
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf7ee;
  color: #157347 !important;
  font-weight: 800;
}

.leadivo-lead-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--leadivo-border-light);
  border-radius: 13px;
  margin-bottom: 9px;
}

.leadivo-lead-item.active {
  background: #f4f8ff;
  border-color: #cfe0ff;
}

.leadivo-lead-item strong {
  display: block;
  font-size: 11.5px;
}

.leadivo-lead-item span {
  font-size: 9.5px;
  color: var(--leadivo-muted);
}

.leadivo-lead-item em {
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  color: var(--leadivo-primary);
}

.leadivo-offer-card {
  margin-top: 12px;
  padding: 13px;
  border-radius: 15px;
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
}

.leadivo-offer-card strong {
  font-size: 12px;
  color: #2359c6;
}

.leadivo-offer-card p {
  margin: 6px 0 10px;
  font-size: 10.5px;
  color: #526170;
}

.leadivo-offer-card button {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: none;
  background: var(--leadivo-primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.login-stat-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(218,224,230,.9);
  box-shadow: var(--leadivo-shadow-sm);
  z-index: 6;
}

.login-stat-card.stat-1 { top: 16px; left: -20px; }
.login-stat-card.stat-2 { top: 86px; right: -20px; }
.login-stat-card.stat-3 { bottom: 58px; right: -28px; }

.login-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--leadivo-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.login-stat-icon.green { background: #eaf7ee; color: #157347; }
.login-stat-icon.orange { background: #fff3e6; color: #c05621; }

.login-stat-value {
  font-size: 15px;
  font-weight: 900;
}

.login-stat-label {
  font-size: 10px;
  color: #7a8794;
  font-weight: 700;
  white-space: nowrap;
}

/* FORM PANEL */

.login-form-panel {
  flex: 0 0 430px;
  background: var(--leadivo-bg-right);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px solid var(--leadivo-border);
  padding: 52px 46px;
}

.login-form-container {
  width: 100%;
  max-width: 340px;
}

.login-form-logo {
  text-align: center;
}

.login-form-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.login-form-subtitle {
  text-align: center;
  color: var(--leadivo-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.login-form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

.label-muted {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  margin-left: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--leadivo-border);
  border-radius: 10px;
  background: #f5f7fa;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: .15s ease;
}

.form-input:focus {
  background: #e8f0fe;
  border-color: var(--leadivo-primary);
  box-shadow: 0 0 0 3px rgba(8,102,255,.1);
}

.btn-login {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--leadivo-primary);
  color: white;
  font-weight: 800;
  font-size: 15px;
  margin-top: 4px;
  cursor: pointer;
}

.btn-login:hover {
  background: var(--leadivo-primary-dark);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
}

.login-footer p {
  font-size: 14px;
  color: var(--leadivo-muted);
}

.login-footer a {
  color: var(--leadivo-primary);
  font-weight: 800;
  text-decoration: none;
}

.login-demo-box {
  margin-top: 14px;
  text-align: left;
  font-size: 12px;
  color: #64748b;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 11px;
  padding: 10px 12px;
  line-height: 1.7;
}

.login-demo-box strong {
  color: #92400e;
}

.login-demo-box code {
  background: white;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 2px 6px;
  color: #334155;
  font-weight: 800;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
  .login-branding-inner {
    grid-template-columns: 1fr;
    max-width: 840px;
  }

  .branding-copy {
    max-width: 650px;
  }
}

@media (max-width: 992px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-branding {
    padding: 34px 24px;
  }

  .login-hero-visual {
    display: none;
  }

  .feature-list {
    display: none;
  }

  .login-form-panel {
    flex: 1;
    border-left: none;
    border-top: 1px solid var(--leadivo-border);
    padding: 36px 24px;
  }

  .login-form-container {
    max-width: 420px;
  }
}

@media (max-width: 520px) {
  .brand-headline {
    font-size: 26px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

#setup-screen.hidden {
  display: none !important;
}

#app-screen.hidden {
  display: none !important;
}

#loading-screen.hidden {
  display: none !important;
}