:root {
  --brand-1: #0f766e;
  --brand-2: #059669;
  --ink: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --bg: #ffffff;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* ---------- Left hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -140px;
}

.hero::after {
  width: 280px;
  height: 280px;
  bottom: -100px;
  left: -80px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  z-index: 1;
}

.hero-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  z-index: 1;
  max-width: 440px;
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hero-content p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 0 32px;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
}

.hero-features .check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-footer {
  z-index: 1;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Right form ---------- */
.form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 24px;
}

.form-card {
  width: 100%;
  max-width: 380px;
  margin: auto 0;
}

.powered-by {
  margin: 32px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.powered-by a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.powered-by a:hover {
  color: var(--brand-1);
  text-decoration: underline;
}

.form-card h2 {
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.form-card .subtitle {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 42px;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 22px;
  font-size: 0.88rem;
}

a.link {
  color: var(--brand-1);
  text-decoration: none;
  font-weight: 500;
}

a.link:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}

.submit-btn:hover { opacity: 0.92; }
.submit-btn:active { transform: translateY(1px); }

.error-msg {
  display: none;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.error-msg.show { display: block; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.signup-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 32px 28px;
    min-height: 260px;
  }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-features { display: none; }
  .hero-footer { display: none; }
}
