:root {
  --navy: #0b1f3f;
  --ink: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --accent: #1d4ed8;
  --error: #d92d20;
  --success: #12805c;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}

.page {
  display: grid;
  grid-template-columns: 38% 62%;
  height: 100vh;
  min-height: 100vh;
}

/* ---------- Brand panel ---------- */

.brand-panel {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(24px, 4vh, 56px) clamp(24px, 3vw, 48px);
}

.brand-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: auto 0;
}

.logo {
  width: min(220px, 60%);
  height: auto;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5f5;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
}

.brand-inner h1 {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.25;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 40ch;
  margin: 0;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: #25d366;
  border-radius: 999px;
  padding: 8px 16px;
  transition: opacity 0.12s ease;
}

.whatsapp-link:hover {
  opacity: 0.9;
}

.brand-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 24px 0 0;
}

/* ---------- Form panel ---------- */

.form-panel {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 40px) clamp(20px, 4vw, 64px);
  overflow: hidden;
}

.form-panel-inner {
  width: 100%;
  max-width: 640px;
}

.form-head {
  margin-bottom: clamp(12px, 2vh, 22px);
}

.form-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.form-head h2 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

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

.login-link {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.login-link:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 1.4vh, 14px) 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.span-2 {
  grid-column: 1 / -1;
}

.field-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 16px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

input, select {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s ease;
}

input::placeholder {
  color: #98a2b3;
}

input:focus, select:focus {
  border-color: var(--accent);
}

select:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.form-message {
  min-height: 18px;
  font-size: 13px;
  margin-top: 10px;
}

.form-message.error { color: var(--error); }
.form-message.success { color: var(--success); }

.form-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.submit-btn {
  flex: 0 0 auto;
  padding: 11px 24px;
  border: none;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--accent);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Responsive: allow scroll on small screens ---------- */

@media (max-width: 900px) {
  html, body {
    height: auto;
  }
  body {
    overflow: auto;
  }
  .page {
    grid-template-columns: 1fr;
    height: auto;
  }
  .brand-panel {
    padding: 16px 24px;
  }
  .brand-inner {
    margin: 0;
    gap: 0;
  }
  .brand-inner h1,
  .brand-inner .lede {
    display: none;
  }
  .brand-panel .logo {
    width: 140px;
    margin-bottom: -14px;
  }
  .whatsapp-link {
    margin-top: 12px;
  }
  .brand-footer {
    display: none;
  }
  .form-head-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .login-link {
    white-space: normal;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-panel {
    overflow: visible;
    padding: 28px 24px 40px;
  }
  .form-head {
    margin-bottom: 20px;
  }
}
