/* =============================================================
   BotyPlus — auth screens (split-screen showcase + form)
   ============================================================= */

:root {
  --bg-0:       #070b16;
  --bg-1:       #0d1324;
  --surface:    rgba(255, 255, 255, 0.04);
  --surface-2:  rgba(255, 255, 255, 0.07);
  --border:     rgba(148, 163, 184, 0.14);
  --border-hi:  rgba(148, 163, 184, 0.28);
  --text:       #e6edf7;
  --text-muted: #9aa7bd;
  --text-dim:   #64748b;
  --violet:     #a855f7;
  --cyan:       #22d3ee;
  --indigo:     #6366f1;
  --magenta:    #ec4899;
  --danger:     #ef4444;
  --success:    #10b981;
  --accent-grad: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);

  --radius:     14px;
  --radius-lg:  22px;
  --shadow-lg:  0 40px 80px -28px rgba(0, 0, 0, 0.75);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body.auth {
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Tajawal', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body.auth { font-family: 'Inter', 'Tajawal', system-ui, sans-serif; }

a { color: inherit; text-decoration: none; }

/* =============================================================
   SHELL
   ============================================================= */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* ---------- LEFT: product showcase ----------------------------- */
.auth-showcase {
  position: relative; overflow: hidden;
  padding: 48px 56px;
  background:
    radial-gradient(900px 500px at 25% 15%,  rgba(168, 85, 247, 0.35), transparent 65%),
    radial-gradient(800px 500px at 75% 85%,  rgba(34, 211, 238, 0.25), transparent 65%),
    linear-gradient(165deg, #0b1228 0%, #070b16 80%);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 40px;
  color: var(--text);
}
.auth-showcase::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 85%);
}
.auth-showcase > * { position: relative; z-index: 1; }

/* brand row */
.sc-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; letter-spacing: .2px; }
.sc-brand img { height: 30px; }
.sc-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-grad); display: inline-block; }

/* hero copy */
.sc-hero { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.sc-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; color: var(--text-muted); font-weight: 700; width: max-content;
}
.sc-kicker i { color: var(--violet); font-size: 14px; }
.sc-title {
  margin: 0; font-weight: 900;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sc-title em { font-style: normal;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sc-sub { color: var(--text-muted); font-size: 15.5px; margin: 0; }

/* channel chips */
.sc-channels { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.sc-channel {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text); font-weight: 700;
}
.sc-channel i { font-size: 16px; }
.sc-channel.msg    i { color: #0ea5e9; }
.sc-channel.ig     i { color: #ec4899; }
.sc-channel.wa     i { color: #22c55e; }
.sc-channel.tt     i { color: #a855f7; }

/* animated chat mockup */
.sc-mock {
  margin-top: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: 440px;
}
.sc-mock__head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.sc-mock__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-grad); display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 13px;
}
.sc-mock__who { display: flex; flex-direction: column; line-height: 1.15; }
.sc-mock__who strong { font-size: 13.5px; color: #fff; }
.sc-mock__who small  { font-size: 11px; color: var(--text-muted); }
.sc-mock__ch {
  margin-inline-start: auto;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); color: var(--text-muted);
}

.sc-mock__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 4px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; animation: bubble-in .45s ease both; }
.msg--them { background: rgba(148, 163, 184, 0.12); color: #e5e7eb; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg--us   { background: var(--accent-grad);       color: #fff;      border-bottom-right-radius: 4px; align-self: flex-end; box-shadow: 0 10px 22px -12px rgba(168, 85, 247, 0.55); }
.msg:nth-child(2) { animation-delay: .7s; }
.msg:nth-child(3) { animation-delay: 1.6s; }
.msg:nth-child(4) { animation-delay: 2.5s; }

.msg--typing { display: inline-flex; align-items: center; gap: 4px; background: rgba(148, 163, 184, 0.12); padding: 10px 14px; border-radius: 14px; border-bottom-left-radius: 4px; align-self: flex-start; animation: bubble-in .45s ease both; animation-delay: 1.1s; }
.msg--typing span { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; display: inline-block; animation: typing 1.4s infinite; }
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* social proof strip */
.sc-proof {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  max-width: 440px;
}
.sc-proof__avatars { display: inline-flex; }
.sc-proof__avatars span {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #0b1228;
  background: linear-gradient(135deg, #a855f7, #22d3ee);
  margin-inline-start: -8px;
  display: inline-block;
}
.sc-proof__avatars span:nth-child(1) { margin: 0; background: linear-gradient(135deg, #ec4899, #f59e0b); }
.sc-proof__avatars span:nth-child(2) { background: linear-gradient(135deg, #10b981, #06b6d4); }
.sc-proof__avatars span:nth-child(3) { background: linear-gradient(135deg, #a855f7, #6366f1); }
.sc-proof__text { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.sc-proof__text strong { color: #fff; font-weight: 800; display: block; font-size: 13px; }

/* foot */
.sc-foot { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-dim); }
.sc-foot a { color: var(--text-muted); }
.sc-foot a:hover { color: #fff; }

/* ---------- RIGHT: form pane ----------------------------------- */
.auth-pane {
  padding: 32px 48px;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  position: relative; background: var(--bg-0);
}
.auth-pane__top {
  position: absolute; top: 24px; inset-inline-end: 32px;
  display: inline-flex; align-items: center; gap: 10px;
}
.auth-pane__top .lang { display: inline-flex; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; overflow: hidden; }
.auth-pane__top .lang a { padding: 7px 12px; font-weight: 800; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.auth-pane__top .lang a.is-active { background: rgba(168, 85, 247, 0.2); color: #fff; }

.auth-card {
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: 8px 4px;
}
.auth-card.wide { max-width: 540px; }
.auth-card__logo { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-card__logo img { height: 40px; filter: drop-shadow(0 10px 24px rgba(168, 85, 247, 0.35)); }
.auth-card__title {
  margin: 0 0 6px; font-size: 28px; font-weight: 900; text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.auth-card__sub { margin: 0 0 26px; text-align: center; color: var(--text-muted); font-size: 14.5px; }

/* =============================================================
   FORM ELEMENTS
   ============================================================= */
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px;
}
.auth-input,
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%; padding: 13px 15px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.auth-input:focus,
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

.auth-input-group { position: relative; }
.auth-input-group .auth-input { padding-inline-end: 48px; }
.auth-input-group .toggle-pass {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer;
  padding: 8px 10px; border-radius: 8px;
}
.auth-input-group .toggle-pass:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.auth-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 4px 0 18px; font-size: 13px; color: var(--text-muted);
}
.auth-row a { color: var(--violet); font-weight: 700; }
.auth-row a:hover { color: var(--cyan); }
.auth-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-row input[type="checkbox"] { accent-color: var(--violet); transform: scale(1.1); }

.auth-btn {
  width: 100%; padding: 14px 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 800; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit; letter-spacing: .2px;
}
.auth-btn--primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 14px 32px -12px rgba(168, 85, 247, 0.55);
}
.auth-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 20px 40px -12px rgba(168, 85, 247, 0.7); }
.auth-btn--primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-btn--ghost {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
.auth-btn--ghost:hover { background: var(--surface-2); border-color: var(--border-hi); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .9px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border); }

.auth-socials { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.auth-social {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.auth-social:hover { background: var(--surface-2); border-color: var(--border-hi); }

.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13.5px; margin-bottom: 14px;
  border: 1px solid transparent;
}
.auth-alert i { flex: none; margin-top: 2px; font-size: 16px; }
.auth-alert--error   { background: rgba(239, 68, 68, 0.14);  color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.auth-alert--success { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
.auth-alert--info    { background: rgba(168, 85, 247, 0.12); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.3); }

.auth-foot {
  text-align: center; margin-top: 22px;
  color: var(--text-muted); font-size: 13.5px;
}
.auth-foot a { color: var(--violet); font-weight: 700; }
.auth-foot a:hover { color: var(--cyan); }

/* Two-column grid inside the form */
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .auth-grid-2 { grid-template-columns: 1fr; gap: 10px; } }

/* Captcha */
.captcha-inline {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  background: rgba(15, 23, 42, 0.65); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px;
}
.captcha-inline .q { font-weight: 900; font-size: 16px; color: #fff; }
.captcha-inline input { background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; color: var(--text); text-align: center; font-weight: 800; }

.auth-terms {
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--text-muted); font-size: 13px; margin: 8px 0 18px; line-height: 1.55;
}
.auth-terms input[type="checkbox"] { accent-color: var(--violet); transform: scale(1.15); margin-top: 2px; }
.auth-terms a { color: var(--violet); font-weight: 700; }

/* App store badges — used in the LEFT showcase */
.sc-apps { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.sc-app {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border); color: #fff;
  padding: 9px 14px; border-radius: 12px; font-size: 12px;
}
.sc-app i { font-size: 22px; }
.sc-app small { color: var(--text-muted); display: block; line-height: 1; }
.sc-app span  { font-weight: 800; }
.sc-app:hover { border-color: var(--border-hi); }

/* =============================================================
   LEGAL PAGES (privacy / terms)
   ============================================================= */
.legal-wrap {
  min-height: 100vh; position: relative; padding: 110px 24px 60px;
  background:
    radial-gradient(900px 500px at 25% 10%, rgba(168, 85, 247, 0.25), transparent 65%),
    radial-gradient(800px 500px at 85% 80%, rgba(34, 211, 238, 0.2),  transparent 65%),
    linear-gradient(180deg, #070b16 0%, #0b1228 100%);
}
.legal-article {
  max-width: 820px; margin: 0 auto; position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 44px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.legal-article h1 {
  margin: 0 0 4px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-article .lead { color: var(--text-muted); margin: 0 0 28px; font-size: 15px; }
.legal-article h2 { margin: 26px 0 10px; font-size: 18px; font-weight: 800; color: #fff; }
.legal-article h3 { margin: 22px 0 8px;  font-size: 15px; font-weight: 800; color: #e2e8f0; }
.legal-article p  { color: #cbd5e1; margin: 0 0 10px; font-size: 14.5px; }
.legal-article ul { color: #cbd5e1; margin: 0 0 14px; padding-inline-start: 22px; }
.legal-article li { margin-bottom: 6px; font-size: 14.5px; }
.legal-article a  { color: var(--violet); }
.legal-article a:hover { color: var(--cyan); }
.legal-article hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* Top bar for legal pages */
.auth-top {
  position: fixed; top: 0; inset-inline: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  color: var(--text-muted);
}
.auth-top a { color: inherit; font-weight: 600; font-size: 14px; }
.auth-top a:hover { color: #fff; }
.auth-top .brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 900; }
.auth-top .brand img { height: 28px; }
.auth-top .tools { display: inline-flex; align-items: center; gap: 12px; }
.auth-top .lang { display: inline-flex; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; overflow: hidden; }
.auth-top .lang a { padding: 7px 11px; font-weight: 800; font-size: 12px; color: var(--text-muted); }
.auth-top .lang a.is-active { background: rgba(168, 85, 247, 0.2); color: #fff; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-showcase { padding: 36px 28px; }
  .sc-mock { max-width: 100%; }
  .auth-pane { padding: 40px 24px 60px; }
  .auth-pane__top { top: 16px; inset-inline-end: 16px; }
}
@media (max-width: 560px) {
  .auth-showcase { display: none; }
  .auth-pane { padding: 76px 18px 40px; }
  .legal-article { padding: 30px 22px; }
  .auth-top { padding: 14px 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .msg, .msg--typing, .msg--typing span { animation: none !important; }
  .auth-btn, .auth-social, .auth-input { transition: none; }
}
