
/* ========== Login (split hero + panel) ========== */
:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --auth-surface: #ffffff;
  --auth-primary: #4c44ec;
  --auth-primary-dark: #312fab;
  --auth-primary-soft: rgba(76, 68, 236, 0.12);
  --auth-text: #1f2937;
  --auth-text-muted: #6b7280;
  --auth-border: #e5e7eb;
  --auth-danger: #ef4444;
  --auth-danger-soft: rgba(239, 68, 68, 0.1);
  --auth-danger-border: rgba(239, 68, 68, 0.35);
  --auth-success: #16a34a;
  --auth-success-soft: rgba(22, 163, 74, 0.1);
  --auth-success-border: rgba(22, 163, 74, 0.35);
}

.auth-login {
  margin: 0;
  background: linear-gradient(120deg, #f2ebff 0%, #f3f3ff 40%, #f3e8ff 100%);
  color: var(--auth-text);
  overflow-x: hidden;
}

.auth-login *,
.auth-login *::before,
.auth-login *::after {
  box-sizing: border-box;
}

.auth-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 100dvh;
}

.auth-hero {
  background: linear-gradient(140deg, #7a4dff 0%, #6237ff 45%, #4f2bf8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px clamp(40px, 8vw, 100px);
}

.auth-page .hero-content {
  max-width: 440px;
  display: grid;
  gap: 1rem;
  text-align: left;
}

.auth-page .hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0;
}

.auth-page .hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.auth-panel-inner {
  background: var(--auth-surface);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-page .panel-title {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  margin: 0;
}

.auth-page .panel-subtitle {
  font-size: clamp(0.85rem, 3vw, 0.95rem);
  color: var(--auth-text-muted);
  line-height: 1.6;
  margin: 0;
}

.auth-page .auth-panel-inner form {
  display: grid;
  gap: 1rem;
}

.auth-page .field {
  display: grid;
  gap: 0.5rem;
}

.auth-page .input-shell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  padding: 0 1rem;
  background: #f9fafb;
}

.auth-page .input-shell input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.8rem 0;
  font-size: 1rem;
}

.auth-page .input-shell input:focus {
  outline: none;
}

.auth-page .toggle-password {
  border: none;
  background: none;
  color: var(--auth-primary);
  font-size: 0.8rem;
  cursor: pointer;
}

.auth-page .auth-btn {
  padding: 0.9rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-page .auth-btn:hover {
  filter: brightness(1.05);
}

.auth-page .auth-btn.auth-btn-secondary {
  margin-top: 0.75rem;
  background: transparent;
  color: var(--auth-primary);
  border: 1px solid var(--auth-primary);
  text-decoration: none;
}

.auth-page .auth-btn.auth-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.08);
  filter: none;
}

.auth-page .auth-btn.auth-is-loading .btn-text {
  display: none;
}

.auth-page .auth-btn .btn-loading {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.auth-page .auth-btn.auth-is-loading .btn-loading {
  display: inline-flex;
}

.auth-page .auth-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-page .auth-link:hover {
  text-decoration: underline;
}

.auth-page .form-meta {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 0.85rem;
  gap: 0.5rem;
}

.auth-page .auth-alert {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  font-size: 0.95rem;
  line-height: 1.5;
  background: #fff;
  margin: 0.75rem 0;
}

.auth-page .auth-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.auth-page .auth-alert.error {
  background: var(--auth-danger-soft);
  border-color: var(--auth-danger-border);
  color: #991b1b;
}

.auth-page .auth-alert.success {
  background: var(--auth-success-soft);
  border-color: var(--auth-success-border);
  color: #065f46;
}

.auth-page .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
}

@media (max-width: 768px) {
  .auth-panel {
    padding: 2rem;
  }
  .auth-panel-inner {
    padding: 1.5rem;
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .auth-login {
    background: #f9f9ff;
  }
  .auth-panel {
    padding: 1.25rem;
  }
  .auth-panel-inner {
    max-width: 100%;
    border-radius: 18px;
    padding: 1.25rem;
    gap: 1.2rem;
  }
  .auth-page .panel-title {
    font-size: 1.4rem;
  }
  .auth-page .panel-subtitle {
    font-size: 0.8rem;
  }
  .auth-page .input-shell input {
    font-size: 0.9rem;
    padding: 0.75rem 0;
  }
  .auth-page .auth-btn {
    font-size: 0.95rem;
    padding: 0.8rem;
  }
}

@media (max-width: 360px) {
  .auth-panel-inner {
    padding: 1rem;
    border-radius: 14px;
    gap: 1rem;
  }
  .auth-page .panel-title {
    font-size: 1.2rem;
  }
  .auth-page .auth-btn {
    font-size: 0.9rem;
    width: 100%;
  }
}

/* ========== Simple card screens (verify, passwords) ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7ff, #eef9ff);
  padding: 24px;
}

.auth-wrapper .auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

.auth-wrapper.auth-card-narrow .auth-card {
  max-width: 480px;
}

.auth-wrapper .auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.auth-wrapper .auth-brand img {
  max-height: 56px;
}

.auth-wrapper .auth-title {
  margin: 10px 0 2px 0;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
}

.auth-wrapper .auth-subtitle {
  margin: 0 0 18px 0;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.auth-wrapper .form-group {
  margin-bottom: 14px;
}

.auth-wrapper .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.auth-wrapper .auth-input {
  width: 93%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-wrapper .auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-wrapper .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 16px 0;
}

.auth-wrapper .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 13px;
}

.auth-wrapper .auth-link {
  font-size: 13px;
  color: #4f46e5;
  text-decoration: none;
}

.auth-wrapper .auth-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.auth-wrapper .auth-btn {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-wrapper .auth-btn:hover {
  background: #4338ca;
}

.auth-wrapper .auth-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-wrapper .auth-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-wrapper .auth-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-wrapper .auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.auth-wrapper .auth-actions--center {
  justify-content: center;
  margin-top: 10px;
}
