:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e7e5e4;
  --field: #f4f6fb;
  --cream: #f4f0ea;
  --card: #ffffff;
  --green: #16a34a;
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body.gate-body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
}

.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--cream);
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.is-on { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28) 0%, rgba(15, 23, 42, 0.55) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 18% 48px 56px;
  animation: copyIn .85s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.hero-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 520px;
}

.hero p.lead {
  margin: 0 0 28px;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.hero-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stat {
  min-width: 108px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.hero-stat span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-on {
  background: #fff;
  width: 22px;
  border-radius: 999px;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 32px 0;
}

.signin-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(28, 25, 23, 0.08);
  padding: 32px 28px 22px;
  animation: cardIn .72s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@keyframes copyIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

body.is-leaving .signin-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .32s ease, transform .32s ease;
}

.brand {
  text-align: center;
  margin-bottom: 18px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  font-size: 22px;
}

.brand h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8f8ee;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  transition: background .35s ease, color .35s ease;
}

.status-pill.is-off {
  background: #f3f4f6;
  color: #6b7280;
}

.status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.status-pill.is-off i {
  background: #9ca3af;
  box-shadow: none;
}

.gate-form > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  padding: 0 44px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.field input:focus {
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.field .ico {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}

.field .eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
  margin: 2px 0 16px;
}

.remember input { accent-color: var(--ink); }

.signin-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.signin-btn:hover { background: #000; }

.gate-note, .gate-links, .gate-demo {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.gate-links { margin-top: 14px; }

.gate-links a, .gate-demo a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.gate-demo { margin-top: 10px; }

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.alert-danger { background: #fef2f2; color: #b91c1c; }
.alert-success { background: #f0fdf4; color: #166534; }
.alert-warning { background: #fffbeb; color: #92400e; }

.company-config {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 8px;
  opacity: 1;
  transition: grid-template-rows .45s cubic-bezier(.16, 1, .3, 1), opacity .35s ease, margin-top .45s ease;
}

.company-config.is-instant {
  transition: none;
}

.company-config.is-hidden {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.company-config-inner {
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  transition: border-color .35s ease;
}

.company-config.is-hidden .company-config-inner {
  border-top-color: transparent;
}

.company-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 14px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.company-toggle .chev {
  margin-left: auto;
  color: #9ca3af;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}

.company-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.company-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.16, 1, .3, 1);
}

.company-panel.is-open { grid-template-rows: 1fr; }

.company-panel-inner { overflow: hidden; }

.company-help, .company-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.company-note { margin: 10px 0 4px; }

.company-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.connect-btn, .remove-btn {
  height: 44px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.connect-btn {
  flex: 1;
  border: 0;
  background: #c4846c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s ease, transform .2s ease;
}

.connect-btn:hover { background: #b4735b; }

.remove-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
}

.remove-btn:disabled {
  color: #9ca3af;
  cursor: default;
}

@media (max-width: 980px) {
  .gate { grid-template-columns: 1fr; }
  .hero { display: none; }
  .panel { padding: 24px 16px; min-height: 100vh; }
}
