:root {
  --bg: #edf2fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d8deea;
  --accent: #2563eb;
  --accent-strong: #1749b5;
  --danger: #dc2626;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 22rem),
    linear-gradient(180deg, #f4f7fd, #eaf0fb);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.card {
  width: min(100%, 1080px);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 460px);
  background: var(--card);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.3)),
    linear-gradient(135deg, #cedbff, #eef4ff);
}

.portrait {
  width: 100%;
  height: min(100%, 520px);
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.visual-copy {
  position: absolute;
  left: 3rem;
  bottom: 3rem;
  color: #fff;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.visual-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.visual-copy p:last-child {
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem;
}

.brand {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-label {
  margin: 1.4rem 0 0.55rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
}

.login-panel h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.subtext {
  margin: 0.55rem 0 2rem;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

.password-wrap {
  position: relative;
}

input[type="password"] {
  width: 100%;
  padding: 1rem 4.75rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input[type="password"]:focus {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.ghost-button {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.message {
  margin: 0;
  min-height: 1.25rem;
  color: var(--danger);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.status {
  color: var(--muted);
  font-size: 0.85rem;
}

.submit {
  min-width: 7rem;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

.submit:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.72;
  cursor: progress;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .page {
    padding: 1rem;
  }

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

  .visual {
    min-height: 340px;
    padding: 1rem;
  }

  .portrait {
    height: 280px;
  }

  .visual-copy {
    left: 2rem;
    bottom: 2rem;
  }

  .login-panel {
    padding: 2rem 1.4rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .submit {
    width: 100%;
  }
}
