:root {
  --auth-bg: #f5f7f6;
  --auth-panel: #ffffff;
  --auth-text: #1f2937;
  --auth-muted: #6b7280;
  --auth-line: #e5e7eb;
  --auth-primary: #22c55e;
  --auth-primary-dark: #16a34a;
  --auth-google: #fef2f2;
  --auth-apple: #f3f4f6;
  --auth-surface: #f3f7f6;
  --auth-accent: #0ea5a4;
  --auth-accent-soft: #dff7f6;
  --auth-error-bg: #fef2f2;
  --auth-error-text: #991b1b;
  --auth-success-bg: #f0fdf4;
  --auth-success-text: #166534;
  --auth-info-bg: #eff6ff;
  --auth-info-text: #1d4ed8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-panel,
.auth-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-panel {
  background: var(--auth-panel);
}

.auth-hero {
  background: var(--auth-surface);
  border-left: 1px solid var(--auth-line);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 40px;
}

.auth-brand-mark {
  width: 26px;
  height: 26px;
  position: relative;
}

.auth-brand-mark::before,
.auth-brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 8px;
}

.auth-brand-mark::before {
  width: 12px;
  height: 22px;
  background: #0ea5a4;
  right: 0;
  top: 0;
  transform: rotate(-10deg);
}

.auth-brand-mark::after {
  width: 12px;
  height: 12px;
  background: var(--auth-primary);
  left: 0;
  bottom: 0;
  border-radius: 50%;
}

.auth-title {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.auth-copy {
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 22px;
}

.auth-copy a,
.auth-footer-link a,
.auth-helper-link {
  color: var(--auth-primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.auth-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.auth-message.error {
  background: var(--auth-error-bg);
  color: var(--auth-error-text);
}

.auth-message.success {
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
}

.auth-message.info {
  background: var(--auth-info-bg);
  color: var(--auth-info-text);
}

.social-buttons {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.social-buttons form {
  margin: 0;
}

.social-btn,
.auth-submit,
.auth-secondary {
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  color: var(--auth-text);
  width: 100%;
  background: #fff;
}

.social-btn:hover,
.auth-submit:hover,
.auth-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.social-btn[aria-disabled="true"],
.social-btn[disabled],
.auth-submit[disabled],
.auth-secondary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.social-btn.google {
  background: var(--auth-google);
}

.social-btn .auth-social-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.social-btn .auth-social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-btn.apple {
  background: var(--auth-apple);
}

.divider {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  margin: 22px 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34%;
  height: 1px;
  background: var(--auth-line);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.form-group {
  margin-bottom: 16px;
}

.auth-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.auth-input-with-icon {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input-with-icon .form-input {
  padding-left: 46px;
}

.auth-input-with-icon:focus-within .auth-input-icon {
  color: var(--auth-accent);
}

.form-input {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.form-input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 164, 0.12);
}

.auth-submit {
  border: none;
  background: var(--auth-primary);
  color: white;
  font-weight: 700;
  margin-top: 4px;
}

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

.auth-submit[aria-busy="true"] {
  background: var(--auth-primary-dark);
}

.auth-secondary {
  margin-top: 10px;
}

.auth-meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--auth-muted);
  line-height: 1.6;
}

.auth-recaptcha-block {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: #fafdfc;
}

.auth-recaptcha-copy {
  margin-top: 10px;
  font-size: 12px;
  color: var(--auth-muted);
  line-height: 1.5;
}

.auth-recaptcha-widget {
  display: flex;
  justify-content: center;
  min-height: 78px;
}

.auth-footer-link {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-hero-copy {
  max-width: 460px;
  width: 100%;
}

.auth-hero-copy h2 {
  font-size: 38px;
  margin: 0 0 12px;
  line-height: 1.15;
}

.auth-hero-copy p {
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 24px;
}

.auth-feature-list {
  display: grid;
  gap: 12px;
}

.auth-feature {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
}

.auth-feature strong {
  font-size: 15px;
}

.auth-feature span {
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    padding: 32px 20px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-recaptcha-widget {
    justify-content: flex-start;
  }
}
