/* Auth Shared Styles — Signin & Signup
   Uses Anthropic design tokens (--ant-*) from anthropic-tokens.css */

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--ant-light, #faf9f5);
  font-family: var(--ant-font, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  color: var(--ant-text, #141413);
  -webkit-font-smoothing: antialiased;
}

/* ── Loading Overlay ──────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(250, 249, 245, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--ant-border, #e8e6dc);
  border-top-color: var(--ant-primary, #d97757);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Auth Container ───────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-layout {
  display: flex;
  width: 100%;
  max-width: 960px;
  min-height: 600px;
  background: #fff;
  border-radius: var(--ant-radius, 12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Single-column variant (signin) */
.auth-container.single-column .auth-layout {
  max-width: 440px;
  min-height: auto;
}

.auth-container.single-column .auth-card {
  width: 100%;
}

/* ── Marketing Column (signup) ────────────────── */
.auth-marketing {
  width: 45%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 48px 40px;
}

.auth-marketing-content {
  width: 100%;
}

.marketing-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin: 24px 0 12px;
  color: #fff;
}

.marketing-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

.marketing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marketing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.marketing-features li i {
  color: #10b981;
  font-size: 16px;
  flex-shrink: 0;
}

.marketing-testimonial {
  background: rgba(255,255,255,0.08);
  border-radius: var(--ant-radius-sm, 8px);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.marketing-testimonial-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin-bottom: 16px;
}

.marketing-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketing-testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ant-primary, #d97757);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.marketing-testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.marketing-testimonial-role {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ── Auth Card ────────────────────────────────── */
.auth-card {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

/* ── Header ───────────────────────────────────── */
.auth-header,
.auth-signin-header {
  margin-bottom: 28px;
}

.auth-signin-header {
  text-align: center;
  padding: 24px 0 0;
}

.auth-signin-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 20px;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(120, 140, 93, 0.1);
  color: var(--ant-success, #788c5d);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ant-dark, #141413);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--ant-text-secondary, #6b6b60);
  margin: 0;
}

/* ── Auth Body ────────────────────────────────── */
.auth-body {
  width: 100%;
}

/* ── Social Buttons ───────────────────────────── */
.social-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.social-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ant-border, #e8e6dc);
  border-radius: var(--ant-radius-sm, 8px);
  background: #fff;
  color: var(--ant-text, #141413);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.social-button:hover {
  background: var(--ant-bg-secondary, #f3f1eb);
  border-color: #d4d2c8;
  color: var(--ant-text, #141413);
}

.social-button i {
  font-size: 16px;
}

/* ── Divider ──────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

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

.divider-text {
  padding: 0 14px;
  font-size: 13px;
  color: var(--ant-text-secondary, #6b6b60);
  white-space: nowrap;
}

/* ── Form Elements ────────────────────────────── */
.form-group {
  margin-bottom: 18px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ant-text-secondary, #6b6b60);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ant-text, #141413);
  background: #fff;
  border: 1px solid var(--ant-border, #e8e6dc);
  border-radius: var(--ant-radius-sm, 8px);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: var(--ant-primary, #d97757);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
}

.form-input.error {
  border-color: var(--ant-danger, #dc2626);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-input.success {
  border-color: var(--ant-success, #788c5d);
}

.form-input::placeholder {
  color: #b0afa8;
}

.form-error {
  font-size: 12px;
  color: var(--ant-danger, #dc2626);
  margin-top: 4px;
  display: none;
}

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

.form-help {
  font-size: 12px;
  color: var(--ant-text-secondary, #6b6b60);
  margin-top: 4px;
}

/* ── Password Input ───────────────────────────── */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ant-text-secondary, #6b6b60);
  padding: 4px;
  display: flex;
  align-items: center;
  font-size: 16px;
}

.password-toggle:hover {
  color: var(--ant-text, #141413);
}

/* ── Password Strength ────────────────────────── */
.password-strength {
  height: 4px;
  background: var(--ant-border, #e8e6dc);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.password-strength-bar.strength-weak {
  width: 25%;
  background: var(--ant-danger, #dc2626);
}

.password-strength-bar.strength-fair {
  width: 50%;
  background: var(--ant-warning, #b8860b);
}

.password-strength-bar.strength-good {
  width: 75%;
  background: var(--ant-info, #5b7e9a);
}

.password-strength-bar.strength-strong {
  width: 100%;
  background: var(--ant-success, #788c5d);
}

/* ── Checkbox ─────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--ant-primary, #d97757);
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-label {
  font-size: 13px;
  color: var(--ant-text-secondary, #6b6b60);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--ant-primary, #d97757);
  text-decoration: underline;
}

/* ── Submit Button ────────────────────────────── */
.auth-body .btn-primary,
.auth-card .btn-primary {
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--ant-primary, #d97757);
  border: none;
  border-radius: var(--ant-radius-sm, 8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}

.auth-body .btn-primary:hover,
.auth-card .btn-primary:hover {
  background: #c4603f;
}

.auth-body .btn-primary:disabled,
.auth-card .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Auth Link ────────────────────────────────── */
.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ant-text-secondary, #6b6b60);
}

.auth-link a {
  color: var(--ant-primary, #d97757);
  font-weight: 500;
  text-decoration: none;
}

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

/* ── Alerts ───────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--ant-radius-sm, 8px);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: rgba(120, 140, 93, 0.1);
  color: #4d6132;
  border: 1px solid rgba(120, 140, 93, 0.2);
}

.alert-error {
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.alert-warning {
  background: rgba(184, 134, 11, 0.08);
  color: #92400e;
  border: 1px solid rgba(184, 134, 11, 0.2);
}

.alert-info {
  background: rgba(91, 126, 154, 0.08);
  color: #1e5c80;
  border: 1px solid rgba(91, 126, 154, 0.2);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
    min-height: auto;
  }

  .auth-marketing {
    width: 100%;
    padding: 32px 24px;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .social-buttons {
    flex-direction: column;
  }
}
