:root {
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #cbd5e1;
  --auth-accent: #059669;
  --auth-accent-dark: #047857;
  --auth-error: #dc2626;
}

* {
  box-sizing: border-box;
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--auth-ink);
  background: #f8fafc;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
}

.auth-shell-center {
  align-items: center;
  justify-content: center;
}

/* Brand panel */

.auth-brand {
  flex: 1 1 42%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 55%, #059669 100%);
}

.auth-brand::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.auth-brand::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 380px;
}

.auth-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-brand h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand p {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

/* Form panel */

.auth-panel {
  flex: 1 1 58%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08);
}

.auth-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  margin: 0 0 1.75rem;
  font-size: 0.925rem;
  color: var(--auth-muted);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.auth-field label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
}

.auth-field input[type="text"],
.auth-field input[type="password"] {
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.auth-field input.input-validation-error {
  border-color: var(--auth-error);
}

.auth-field-inline {
  flex-direction: row;
  align-items: center;
}

.auth-field-inline label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.auth-field-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
}

.auth-hint {
  margin: -0.5rem 0 1.1rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Validation */

.field-validation-error {
  font-size: 0.8rem;
  color: var(--auth-error);
}

.field-validation-valid {
  display: none;
}

.auth-error {
  margin-bottom: 1.1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--auth-error);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.auth-error ul {
  margin: 0;
  padding-left: 1.1rem;
}

.validation-summary-valid {
  display: none;
}

/* Actions */

.auth-submit {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: var(--auth-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.auth-submit:hover {
  background: var(--auth-accent-dark);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-switch {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.auth-switch a {
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Status card (registration pending) */

.auth-card-status {
  text-align: center;
}

.auth-check {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 50%;
}

.auth-check::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 14px;
  width: 9px;
  height: 18px;
  border-right: 3px solid var(--auth-accent);
  border-bottom: 3px solid var(--auth-accent);
  transform: rotate(40deg);
}

@media (max-width: 860px) {
  .auth-shell {
    flex-direction: column;
  }

  .auth-brand {
    flex: none;
    min-height: 200px;
    padding: 2.5rem 1.5rem;
  }

  .auth-brand::before {
    width: 320px;
    height: 320px;
  }

  .auth-panel {
    flex: none;
    padding: 2rem 1.25rem 3rem;
  }
}
