/* ================================================================
   AUTH PAGES — Shared Styles (Login / Signup / Reset Password)
   Design tokens for consistent spacing, radius, color
   ================================================================ */

/* -- Tokens -- */
:root {
  --c-primary: #F97316;
  --c-primary-dark: #EA580C;
  --c-primary-light: #FFF7ED;
  --c-primary-glow: rgba(249, 115, 22, .12);
  --c-black: #111827;
  --c-700: #374151;
  --c-600: #4b5563;
  --c-500: #6b7280;
  --c-400: #9ca3af;
  --c-300: #d1d5db;
  --c-200: #e5e7eb;
  --c-100: #f3f4f6;
  --c-50: #f9fafb;
  --c-white: #ffffff;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;
  --ease: .25s cubic-bezier(.4, 0, .2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* -- Reset -- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--c-50);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- Scrollbar -- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-400); }
.form-panel { scrollbar-width: thin; scrollbar-color: var(--c-300) transparent; }

/* ================================================================
   LAYOUT
   ================================================================ */
.auth-container { display: flex; min-height: 100vh; min-height: 100dvh; }

/* ================================================================
   LEFT — BRAND PANEL
   ================================================================ */
.brand-panel {
  flex: 0 0 50%;
  width: 50%;
  background: #0a0f1a;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Video */
.brand-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: .4;
}
.brand-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,26,.82) 0%, rgba(10,15,26,.50) 50%, rgba(10,15,26,.88) 100%);
  z-index: 1;
}

/* Loading skeleton */
.brand-panel.is-loading::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, #0a0f1a 8%, #151b2e 18%, #0a0f1a 33%);
  background-size: 200% 100%;
  animation: skeleton 1.5s linear infinite;
}
@keyframes skeleton { to { background-position: -200% 0; } }

/* Z layers */
.brand-logo, .brand-body, .brand-bottom { position: relative; z-index: 2; }

/* -- Logo -- */
.brand-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--c-primary), #FB923C);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(249,115,22,.25);
}
.brand-logo-icon i { color: var(--c-white); font-size: 17px; }
.brand-logo img { height: 32px; width: auto; }
.brand-logo span { font-size: 20px; font-weight: 800; color: var(--c-white); letter-spacing: -.4px; }

/* -- Body (vertically centered) -- */
.brand-body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  gap: 28px;
  padding: 36px 0;
  max-width: 480px;
}
.brand-body h1 {
  font-size: 2.5rem; font-weight: 800; color: var(--c-white);
  line-height: 1.2; letter-spacing: -.6px;
}
.brand-body h1 span {
  background: linear-gradient(135deg, #F97316, #FBBF24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap;
}
.brand-body > p {
  font-size: 15px; color: rgba(255,255,255,.55); line-height: 1.7; max-width: 420px;
}

/* -- Platform icons -- */
.platforms { display: flex; gap: 10px; flex-wrap: wrap; }
.platform-icon {
  width: 44px; height: 44px; border-radius: var(--r-lg);
  background: rgba(255,255,255,.06); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: var(--ease); cursor: default;
}
.platform-icon i { font-size: 17px; color: rgba(255,255,255,.40); transition: var(--ease); }
.platform-icon:hover {
  background: rgba(249,115,22,.12); border-color: rgba(249,115,22,.30);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249,115,22,.12);
}
.platform-icon:hover i { color: var(--c-primary); }

/* -- Brand cards (features / steps) -- */
.brand-cards { display: flex; flex-direction: column; gap: 10px; }
.brand-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: rgba(255,255,255,.05); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.07); border-radius: var(--r-lg);
  transition: var(--ease); cursor: default;
}
.brand-card:hover {
  background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.20);
  transform: translateX(4px);
}
.brand-card-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: rgba(249,115,22,.14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--ease);
}
.brand-card:hover .brand-card-icon { background: rgba(249,115,22,.24); }
.brand-card-icon i { color: #FB923C; font-size: 16px; }
.brand-card-text {
  font-size: 14.5px; color: rgba(255,255,255,.80); font-weight: 500; line-height: 1.5;
}
.brand-card-text small {
  display: block; color: rgba(255,255,255,.35); font-size: 12px; font-weight: 400; margin-top: 2px;
}
/* Step number variant */
.brand-card-num {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: rgba(249,115,22,.14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #FB923C; font-size: 15px; font-weight: 800;
  transition: var(--ease);
}
.brand-card:hover .brand-card-num { background: rgba(249,115,22,.24); }

/* -- Social proof -- */
.brand-bottom { flex-shrink: 0; }
.social-proof {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.06); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-lg);
  padding: 16px 22px; transition: var(--ease);
}
.social-proof:hover {
  background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.12);
}
.avatar-group { display: flex; align-items: center; }
.avatar-group .av {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12); margin-left: -8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--c-white);
  transition: transform .2s ease;
}
.avatar-group .av:first-child { margin-left: 0; }
.avatar-group .av:hover { transform: translateY(-2px); z-index: 1; }
.av--indigo { background: #6366f1; }
.av--pink   { background: #ec4899; }
.av--teal   { background: #14b8a6; }
.av--amber  { background: #f59e0b; }
.avatar-group .av-count {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), #FB923C);
  color: var(--c-white); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px; border: 2px solid rgba(255,255,255,.12);
}
.proof-info { display: flex; flex-direction: column; gap: 2px; }
.proof-stars { display: flex; gap: 2px; }
.proof-stars i { color: #F59E0B; font-size: 13px; }
.proof-text { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 500; }
.proof-text strong { color: rgba(255,255,255,.80); }

/* ================================================================
   RIGHT — FORM PANEL
   ================================================================ */
.form-panel {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; background: var(--c-white);
  position: relative; overflow-y: auto;
}
.form-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-primary), #FBBF24, var(--c-primary));
  background-size: 200% 100%; animation: shimmer 5s ease infinite;
}
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* -- Form wrapper -- */
.form-wrapper { width: 100%; max-width: 420px; }
.form-wrapper > * { animation: fadeUp .45s ease both; }
.form-wrapper > :nth-child(2) { animation-delay: .04s; }
.form-wrapper > :nth-child(3) { animation-delay: .08s; }
.form-wrapper > :nth-child(4) { animation-delay: .12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* -- Form header -- */
.form-header { margin-bottom: 28px; }
.form-header h2 {
  font-size: 1.625rem; font-weight: 800; color: var(--c-black);
  letter-spacing: -.4px; margin-bottom: 6px;
}
.form-header p { color: var(--c-500); font-size: 14px; line-height: 1.5; }

/* -- Form group -- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-weight: 600; color: var(--c-700);
  margin-bottom: 7px; font-size: 13px; letter-spacing: .2px;
}

/* -- Field (icon + input) -- */
.field { position: relative; }
.field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--c-300); font-size: 16px; transition: var(--ease);
  pointer-events: none; z-index: 1;
}
.field:focus-within .field-icon { color: var(--c-primary); }
.form-input {
  width: 100%; padding: 13px 14px 13px 42px;
  border: 1.5px solid var(--c-200); border-radius: var(--r-md);
  font-size: 14px; font-family: var(--font); color: var(--c-black);
  background: var(--c-white); transition: var(--ease);
}
.form-input:hover { border-color: var(--c-300); }
.form-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-glow); }
.form-input:focus-visible { outline: none; }
.form-input::placeholder { color: var(--c-400); }

/* Select */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px; cursor: pointer;
}

/* Password field with toggle */
.field-pw { position: relative; flex: 1; }
.field-pw .form-input { padding-right: 44px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--c-400);
  cursor: pointer; padding: 4px; border-radius: var(--r-sm);
  transition: var(--ease);
  display: flex; align-items: center; justify-content: center;
}
.toggle-pw:hover { color: var(--c-primary); background: var(--c-primary-glow); }
.toggle-pw:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* Two columns */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* -- Options (remember + forgot) -- */
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-me input { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; border-radius: 4px; }
.remember-me span { font-size: 13px; color: var(--c-500); }
.forgot-link { font-size: 13px; color: var(--c-primary); text-decoration: none; font-weight: 600; transition: var(--ease); }
.forgot-link:hover { color: var(--c-primary-dark); text-decoration: underline; }

/* -- Password strength -- */
.pw-strength { margin-top: 6px; }
.pw-bar { height: 3px; border-radius: 2px; background: var(--c-200); overflow: hidden; }
.pw-bar-fill { height: 100%; border-radius: 2px; width: 0; transition: width .3s, background .3s; }
.pw-label { font-size: 11px; margin-top: 3px; font-weight: 500; color: var(--c-500); }

/* Password match */
.pw-match { font-size: 11px; margin-top: 5px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.pw-match.ok { color: #16a34a; }
.pw-match.no { color: #dc2626; }

/* -- Terms -- */
.terms-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 22px; }
.terms-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--c-primary); cursor: pointer; flex-shrink: 0; }
.terms-row label { font-size: 13px; color: var(--c-500); line-height: 1.5; cursor: pointer; }
.terms-row a { color: var(--c-primary); text-decoration: none; font-weight: 500; }
.terms-row.shake { animation: shake .4s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* -- Submit button -- */
.btn-submit {
  width: 100%; padding: 14px 24px; position: relative;
  background: linear-gradient(135deg, var(--c-primary), #FB923C);
  color: var(--c-white); border: none; border-radius: var(--r-xl);
  font-weight: 600; font-size: 15px; font-family: var(--font);
  cursor: pointer; overflow: hidden; letter-spacing: .15px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  will-change: transform, box-shadow;
  transform: translateY(0) translateZ(0);
  transition: box-shadow .2s ease;
}
.btn-submit::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-100%); transition: transform .5s;
}
.btn-submit:hover { box-shadow: 0 6px 20px rgba(249,115,22,.30); }
.btn-submit:hover::before { transform: translateX(100%); }
.btn-submit:active { box-shadow: 0 2px 8px rgba(249,115,22,.20); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; box-shadow: none; }
.btn-label {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: none;
}
.btn-spinner {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: var(--c-white);
  border-radius: 50%; animation: spin .6s linear infinite;
  margin: 0 auto;
}
.btn-submit.loading .btn-label { visibility: hidden; }
.btn-submit.loading .btn-spinner { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* -- Divider -- */
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--c-200); }
.divider span { font-size: 11px; color: var(--c-500); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }

/* -- Form footer -- */
.form-footer { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--c-100); }
.form-footer--flat { border: none; margin: 0; padding: 0; }
.form-footer p { color: var(--c-500); font-size: 13px; }
.form-footer a { color: var(--c-primary); text-decoration: none; font-weight: 700; transition: var(--ease); }
.form-footer a:hover { color: var(--c-primary-dark); text-decoration: underline; }

/* -- Alerts -- */
.alert-msg {
  padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; font-weight: 500; animation: fadeUp .3s ease;
}
.alert-msg i { flex-shrink: 0; margin-top: 1px; }
.alert-msg.error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-msg.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ================================================================
   MOBILE & TABLET (<=991px)
   ================================================================ */
.mobile-hero { display: none; }

@media (max-width: 991px) {
  .brand-panel { display: none; }
  .form-panel { padding: 0; background: var(--c-50); justify-content: flex-start; }
  .form-panel::before { display: none; }

  .mobile-hero {
    display: block; width: 100%; padding: 36px 24px 28px;
    background: linear-gradient(135deg, #0a0f1a, #1a1f2e);
    text-align: center; position: relative; overflow: hidden;
  }
  .mobile-hero::after {
    content: ''; position: absolute; bottom: -24px; left: 50%;
    transform: translateX(-50%); width: 140%; height: 48px;
    background: var(--c-50); border-radius: 50%;
  }
  .mobile-hero .logo-row {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 10px; position: relative; z-index: 1;
  }
  .mobile-hero .logo-row img { height: 28px; width: auto; }
  .mobile-hero .logo-row span { font-size: 18px; font-weight: 800; color: var(--c-white); }
  .mobile-hero p { color: rgba(255,255,255,.55); font-size: 13px; position: relative; z-index: 1; line-height: 1.5; }
  .mobile-hero .m-platforms {
    display: flex; justify-content: center; gap: 6px; margin-top: 12px;
    position: relative; z-index: 1;
  }
  .mobile-hero .m-platforms .platform-icon { width: 36px; height: 36px; border-radius: var(--r-md); }
  .mobile-hero .m-platforms .platform-icon i { font-size: 14px; }

  .form-wrapper { padding: 20px 24px 32px; max-width: 480px; }
  .row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .mobile-hero { padding: 28px 20px 24px; }
  .form-wrapper { padding: 16px 18px 28px; }
}
