:root {
  --ink: #1b1f3b;
  --ink-soft: #4c5270;
  --brand-a: #0d9488;
  --brand-b: #f59e0b;
  --brand-c: #2563eb;
  --panel: rgba(255, 255, 255, 0.93);
  --line: #dbe4f0;
  --danger: #b91c1c;
  --ok: #166534;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 12%, rgba(37, 99, 235, 0.22), transparent 24%),
    radial-gradient(circle at 92% 9%, rgba(245, 158, 11, 0.24), transparent 25%),
    radial-gradient(circle at 76% 92%, rgba(13, 148, 136, 0.22), transparent 29%),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 44%, #fff4df 100%);
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.shell {
  width: min(960px, 96vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 24px 44px rgba(30, 41, 59, 0.12);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.intro {
  padding: 2rem;
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.94), rgba(13, 148, 136, 0.92));
  color: #fff;
  position: relative;
}

.intro h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.2;
  max-width: 20ch;
}

.intro p {
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  font-size: 0.94rem;
  max-width: 42ch;
}

.badge-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.role-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.form-wrap {
  padding: 1.7rem;
  background: rgba(255, 255, 255, 0.95);
}

.nav-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-size: 0.82rem;
}

.nav-line a {
  text-decoration: none;
  color: #1d4ed8;
  font-weight: 600;
}

.title {
  margin: 0;
  font-size: 1.25rem;
}

.subtitle {
  margin: 0.35rem 0 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  display: block;
  margin-bottom: 0.35rem;
}

.field {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.72rem;
  padding: 0.72rem 0.82rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fff;
}

.field:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.password-row {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #475569;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 0.4rem;
}

.toggle-pass:hover {
  background: #f1f5f9;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.meta-row a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.remember {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: #334155;
}

.remember input {
  accent-color: #2563eb;
}

.btn {
  margin-top: 0.4rem;
  border: none;
  border-radius: 0.8rem;
  padding: 0.78rem 0.95rem;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.93rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-c), #1d4ed8);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.alert {
  margin-top: 0.85rem;
  border-radius: 0.68rem;
  padding: 0.65rem 0.72rem;
  font-size: 0.82rem;
  display: none;
}

.alert.error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}

.alert.success {
  display: block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--ok);
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .intro {
    padding: 1.45rem;
  }

  .form-wrap {
    padding: 1.3rem;
  }
}
