/* ============================================================
   StaiSeller — Auth Page (Login / Register)
   Two-panel layout: dark brand left + white form right
   ============================================================ */

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── Two-column layout ──────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── LEFT: Brand Panel ──────────────────────────────────────── */
.auth-brand-panel {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 40px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 28% 45%,  rgba(61,190,88,0.30) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 72% 78%,  rgba(0,160,80,0.18) 0%, transparent 62%),
    radial-gradient(ellipse 40% 38% at 60% 12%,  rgba(61,190,88,0.12) 0%, transparent 55%),
    #091810;
}

/* Subtle texture */
.auth-brand-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.6;
}

/* Logo at top */
.auth-panel-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.auth-panel-logo-name {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}

/* Center tagline */
.auth-panel-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 32px 0;
}

.auth-panel-headline {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.22;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.auth-panel-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.50);
  line-height: 1.65;
}

/* Feature dots */
.auth-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
  padding-bottom: 8px;
}

.auth-feature-dot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.auth-feature-dot .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3DBE58;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(61,190,88,0.6);
}

/* ─── RIGHT: Form Panel ──────────────────────────────────────── */
.auth-form-panel {
  width: 520px;
  flex-shrink: 0;
  min-height: 100vh;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.auth-form-inner {
  width: 100%;
  max-width: 360px;
}

/* ─── Title ──────────────────────────────────────────────────── */
.auth-title {
  font-size: 30px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
  line-height: 1.2;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: #9CA3AF;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  text-align: center;
}

.auth-tab:hover { color: #374151; }

.auth-tab.active {
  color: #111827;
  font-weight: 600;
  border-bottom-color: #111827;
}

/* ─── Error / success message ────────────────────────────────── */
.auth-msg {
  font-size: 13px;
  color: #EF4444;
  border-radius: 8px;
  transition: all 0.15s;
}

.auth-msg:not(:empty) {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.auth-msg.success:not(:empty) {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: #15803D;
}

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

.auth-form.hidden { display: none; }

/* ─── Field ──────────────────────────────────────────────────── */
.auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 15px;
  color: #111827;
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.auth-field input::placeholder { color: #9CA3AF; }

.auth-field input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.06);
}

/* ─── Submit button ──────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  height: 52px;
  background: #111827;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
  font-family: inherit;
}

.auth-submit:hover:not(:disabled) { background: #1F2937; }
.auth-submit:active:not(:disabled) { transform: scale(0.985); }
.auth-submit:disabled { opacity: 0.65; cursor: not-allowed; }

/* ─── Spinner ────────────────────────────────────────────────── */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-spinner.hidden { display: none; }

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

/* ─── OR divider ─────────────────────────────────────────────── */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-or-line {
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

.auth-or-text {
  font-size: 12px;
  font-weight: 500;
  color: #9CA3AF;
  letter-spacing: 0.05em;
}

/* ─── Register / secondary button ───────────────────────────── */
.auth-register-btn {
  width: 100%;
  height: 52px;
  background: #FFFFFF;
  color: #111827;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.auth-register-btn:hover {
  border-color: #D1D5DB;
  background: #F9FAFB;
}

/* ─── Back button ────────────────────────────────────────────── */
.auth-back-btn {
  background: none;
  border: none;
  color: #6B7280;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  font-family: inherit;
  transition: color 0.12s;
  width: 100%;
}

.auth-back-btn:hover { color: #111827; }

/* ─── Footer note ────────────────────────────────────────────── */
.auth-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-brand-panel { display: none; }
  .auth-form-panel  { width: 100%; padding: 40px 24px; }
}

@media (max-width: 400px) {
  .auth-form-panel { padding: 32px 18px; }
  .auth-title { font-size: 26px; }
}
