/* ── Auth Shell CSS — Catalayer Branded Visual ───────────────────────── */

:root {
  --accent: #64ce9b;
  --accent-dim: rgba(100, 206, 155, 0.1);
  --red: #ef5b5b;
  --gold: #e2b340;
  --gold-border: rgba(226, 179, 64, 0.25);
  --gold-text: #e2b340;
  --text-main: #ffffff;
  --text-dim: #b7becc;
  --text-muted: #9aa4b3;
  --surface-border-soft: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background: transparent;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim-fade { animation: fadeIn 0.3s ease-out; }

.auth-page {
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(100, 206, 155, 0.07), transparent 52%),
    linear-gradient(180deg, #05080d 0%, #080c12 50%, #05080d 100%);
}

.auth-grid {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  z-index: 0;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ── Left: Brand ── */
.auth-brand {
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(170deg, rgba(100, 206, 155, 0.05) 0%, transparent 50%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-brand-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  transition: color 0.15s;
}

.auth-back-link:hover { color: var(--text-main); }

.auth-brand-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
  display: block;
  align-self: flex-start;
  margin-bottom: 22px;
}

.auth-brand-eyebrow {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.auth-brand-headline {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  max-width: 11ch;
}

.auth-brand-copy {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 36ch;
  margin-bottom: 20px;
}

.auth-brand-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-brand-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.auth-brand-point::before {
  content: '';
  width: 4px;
  height: 4px;
  margin-top: 6px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── Right: Form Panel ── */
.auth-panel {
  padding: 30px 34px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel-topline {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 500;
}

.auth-panel-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.auth-panel-subtitle {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 18px;
}

.auth-panel-support {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: -2px;
  margin-bottom: 14px;
}

.auth-trial-strip {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: -8px;
  margin-bottom: 14px;
}

.auth-trial-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 6px 8px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.2;
  border: 1px solid var(--gold-border);
  background: transparent;
  color: var(--gold-text);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.auth-trial-text {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-field input {
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(100, 206, 155, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.auth-field input::placeholder { color: rgba(255, 255, 255, 0.25); }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 9999px #0a0e14 inset !important;
  box-shadow: 0 0 0 9999px #0a0e14 inset !important;
  -webkit-text-fill-color: #a3adba !important;
  caret-color: #a3adba !important;
  background-color: #0a0e14 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  transition: background-color 9999s ease-in-out 0s !important;
}

.auth-field.has-error input {
  border-color: rgba(239, 91, 91, 0.45);
  background: rgba(239, 91, 91, 0.04);
}

.auth-field-error {
  font-size: 11px;
  line-height: 1.5;
  color: #ffa3a3;
}

.auth-primary-btn {
  width: 100%;
  height: 48px;
  border: none;
  background: var(--accent);
  color: #041008;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 2px;
}

.auth-primary-btn:hover { background: #76d8a8; }
.auth-primary-btn:active { background: #5cc08e; }
.auth-primary-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-secondary-btn {
  width: 100%;
  height: 46px;
  border: 1px solid var(--surface-border-soft);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.auth-secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}

.auth-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
}

.auth-check input { margin: 0; accent-color: var(--accent); }

.auth-helper-copy {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
}

.auth-helper-inline { font-size: 11px; color: var(--text-muted); }

.auth-inline-btn { width: auto; min-width: 140px; }

.auth-inline-row-recovery {
  align-items: center;
  justify-content: flex-start;
}

.auth-input-readonly {
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.015) !important;
}

.auth-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.auth-link {
  color: var(--text-dim);
  font-size: 11px;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-link:hover { color: var(--accent); }
.auth-link-muted { color: var(--text-muted); }
.auth-link-gold { color: var(--gold); }
.auth-link-gold:hover,
.auth-link-gold:focus,
.auth-link-gold:focus-visible {
  color: var(--gold);
  text-decoration-color: currentColor;
}

.auth-footer-sep {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  margin: 0 2px;
}

.auth-footer-copy,
.auth-footer-legal {
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.auth-state-panel {
  border: 1px solid rgba(100, 206, 155, 0.22);
  background: rgba(100, 206, 155, 0.04);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-feedback {
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 12px;
}

.auth-feedback.error {
  background: rgba(239, 91, 91, 0.08);
  border: 1px solid rgba(239, 91, 91, 0.2);
  color: #ffa3a3;
}

.auth-feedback.success {
  background: rgba(100, 206, 155, 0.08);
  border: 1px solid rgba(100, 206, 155, 0.2);
  color: #a8e6c8;
}

/* ── Skeleton loader ── */
.auth-skeleton-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-skeleton-line {
  height: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.auth-skeleton-line.title {
  height: 26px;
  width: 60%;
  margin-bottom: 4px;
}

.auth-skeleton-line.subtitle {
  height: 13px;
  width: 80%;
  margin-bottom: 8px;
}

.auth-skeleton-field {
  height: 46px;
  border-radius: 0;
  background: rgba(255,255,255,0.03);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.auth-skeleton-btn {
  height: 48px;
  border-radius: 0;
  background: rgba(255,255,255,0.06);
  margin-top: 2px;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .auth-page { padding: 24px 16px; }
  .auth-shell { grid-template-columns: 1fr; min-height: auto; max-width: 540px; }
  .auth-brand { padding: 28px 24px; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
  .auth-panel { padding: 28px 24px; }
}
