/* ============================================================
   Virtual Labs AI — Login Page
   Matches the site's design language exactly.
   ============================================================ */

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

:root {
  --white:      #ffffff;
  --off-white:  #f5f5f7;
  --black:      #000000;
  --off-black:  #1d1d1f;
  --mid-gray:   #7c7c81;
  --light-gray: #d2d2d7;
  --red:        #c0392b;
  --font:       'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont,
                'Helvetica Neue', 'Segoe UI', sans-serif;
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html, body {
  height: 100%;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ── Layout: side-by-side on desktop ─────────────────────── */
.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Left: dark brand panel ──────────────────────────────── */
.login-brand {
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: stretch;
  padding: 48px 48px 48px 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial gradient for depth */
.login-brand::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-logo img {
  height: 26px;
  width: auto;
  display: block;
}

.login-brand-copy {
  max-width: 400px;
}

.login-eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.login-headline {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 24px;
}

.login-sub {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  max-width: 360px;
}

.login-brand-footer {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.2);
}

/* ── Right: form panel ───────────────────────────────────── */
.login-form-panel {
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-form-inner {
  width: 100%;
  max-width: 360px;
}

/* Mobile-only logo (hidden on desktop) */
.login-logo-mobile {
  display: none;
  margin-bottom: 40px;
}

.login-logo-mobile img {
  height: 22px;
  width: auto;
}

/* ── Form head ───────────────────────────────────────────── */
.login-form-head {
  margin-bottom: 36px;
}

.form-eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 10px;
}

.form-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--off-black);
  line-height: 1.1;
  margin-bottom: 10px;
}

.form-desc {
  font-size: 15px;
  font-weight: 400;
  color: var(--mid-gray);
  line-height: 1.55;
}

/* ── Field ───────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

.form-field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  color: var(--off-black);
  outline: none;
  transition: border-color 0.2s var(--ease-out),
              box-shadow   0.2s var(--ease-out);
  -webkit-appearance: none;
}

.form-field input::placeholder {
  color: var(--light-gray);
}

.form-field input:focus {
  border-color: var(--off-black);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

/* ── Error ───────────────────────────────────────────────── */
.form-error {
  display: none;
  padding: 12px 14px;
  background: #fff1f0;
  border: 1px solid #ffd6d4;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--red);
  line-height: 1.5;
  margin-bottom: 16px;
}

.form-error.visible { display: block; }

/* ── Button — pill style matching the site ───────────────── */
.form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 28px;
  background: var(--off-black);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), opacity 0.2s;
  margin-top: 4px;
}

.form-btn:hover   { background: #3a3a3c; }
.form-btn:active  { opacity: 0.8; }
.form-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Help text ───────────────────────────────────────────── */
.login-help {
  margin-top: 28px;
  font-size: 13px;
  font-weight: 400;
  color: var(--mid-gray);
  text-align: center;
  line-height: 1.55;
}

.login-help a {
  color: var(--off-black);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--light-gray);
  transition: text-decoration-color 0.15s;
}

.login-help a:hover {
  text-decoration-color: var(--off-black);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  html, body { overflow: auto; }

  .login-page {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .login-brand { display: none; }

  .login-form-panel {
    min-height: 100vh;
    align-items: flex-start;
    padding: 48px 28px;
  }

  .login-logo-mobile { display: block; }

  .login-form-inner {
    max-width: 100%;
    padding-top: 8px;
  }
}
