/* ChatzyBot sign-in / sign-up — shared layout */
:root {
  --blue: #4a98d3;
  --blue-dark: #1d6fa8;
  --navy: #0f141e;
  --navy-2: #161e2d;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --field: #f8fafc;
  --red: #dc2626;
  --green: #16a34a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-dark); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.auth { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }

/* ---------- Brand side ---------- */
.auth-brand {
  position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 15% 0%, rgba(74, 152, 211, .28), transparent 60%),
              radial-gradient(700px 500px at 100% 100%, rgba(29, 111, 168, .30), transparent 60%),
              var(--navy);
  color: #e2e8f0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 56px;
}
.auth-brand::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.auth-brand > * { position: relative; z-index: 1; }
.brand-logo img { height: 34px; display: block; }
.brand-copy { max-width: 500px; margin: 40px 0; }
.brand-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #93c5fd; background: rgba(74, 152, 211, .14); border: 1px solid rgba(147, 197, 253, .25);
  padding: 6px 12px; border-radius: 999px;
}
.brand-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
.brand-copy h1 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.15; font-weight: 800; color: #fff; margin: 18px 0 14px; letter-spacing: -.02em; }
.brand-copy h1 span { background: linear-gradient(90deg, #7cc0f2, #4a98d3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-copy p { color: #94a3b8; font-size: 1rem; line-height: 1.65; }
.brand-points { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.brand-points li { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; color: #cbd5e1; }
.brand-points i {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(74, 152, 211, .16); color: #7cc0f2; font-size: .85rem;
}
.brand-points b { color: #fff; font-weight: 600; display: block; font-size: .95rem; }
.brand-points li span { display: block; color: #94a3b8; font-size: .86rem; margin-top: 2px; line-height: 1.5; }
.brand-points { gap: 16px; }
.brand-points i { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
.brand-facts { display: grid; grid-template-columns: repeat(3, auto); gap: 0; margin-top: 30px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; background: rgba(255,255,255,.04); width: fit-content; max-width: 100%; }
.brand-facts div { padding: 14px 22px; border-left: 1px solid rgba(255,255,255,.08); }
.brand-facts div:first-child { border-left: 0; }
.brand-facts b { display: block; color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.brand-facts span { font-size: .76rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.brand-local { margin-top: 22px !important; font-size: .86rem !important; color: #94a3b8; display: flex; gap: 8px; align-items: center; }
.brand-local i { color: #7cc0f2; }
@media (max-width: 1180px) { .brand-facts div { padding: 12px 14px; } .brand-facts b { font-size: 1rem; } }

/* chat preview card */
.chat-preview {
  max-width: 400px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px; padding: 16px; backdrop-filter: blur(6px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.chat-preview .cp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cp-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #4a98d3, #1d6fa8); display: grid; place-items: center; color: #fff; font-size: .85rem; }
.cp-head b { font-size: .88rem; color: #fff; display: block; }
.cp-head small { font-size: .74rem; color: #4ade80; }
.cp-msgs { display: grid; gap: 8px; padding-top: 12px; }
.cp-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: .84rem; line-height: 1.45; animation: cpIn .5s ease both; }
.cp-msg.bot { background: rgba(255, 255, 255, .1); color: #e2e8f0; border-bottom-left-radius: 4px; }
.cp-msg.user { margin-left: auto; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.cp-msg:nth-child(2) { animation-delay: .5s; } .cp-msg:nth-child(3) { animation-delay: 1s; }
@keyframes cpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.brand-foot { font-size: .8rem; color: #64748b; display: flex; gap: 16px; flex-wrap: wrap; }
.brand-foot a { color: #94a3b8; font-weight: 500; }

/* ---------- Form side ---------- */
.auth-main { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 24px 40px; font-size: .9rem; color: var(--muted); }
.auth-top .mobile-logo { display: none; }
.auth-top .mobile-logo img { height: 28px; }
.auth-top .home-link { color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.auth-center { flex: 1; display: grid; place-items: center; padding: 16px 24px 40px; }
.form-container { width: 100%; max-width: 410px; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form-header { margin-bottom: 28px; }
.form-header h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.form-header p { color: var(--muted); font-size: .97rem; }
.form-icon { width: 48px; height: 48px; border-radius: 14px; background: #e8f3fb; color: var(--blue-dark); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 18px; }

.google-btn {
  width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 .95rem 'Inter', sans-serif; color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.google-btn:hover { background: var(--field); border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(15, 23, 42, .06); }
.google-btn svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 14px; color: #94a3b8; font-size: .8rem; margin: 22px 0; text-transform: uppercase; letter-spacing: .06em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.form-group { margin-bottom: 18px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.form-group label { display: block; font-size: .86rem; font-weight: 600; color: #334155; margin-bottom: 7px; }
.label-row label { margin-bottom: 0; }
.label-row a { font-size: .82rem; }
.field { position: relative; }
.field > i.lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .9rem; pointer-events: none; transition: color .15s; }
.field input {
  width: 100%; height: 48px; padding: 0 44px 0 42px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--field); font: 400 .97rem 'Inter', sans-serif; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #a0aec0; }
.field input:hover { border-color: #cbd5e1; }
.field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(74, 152, 211, .14); }
.field:focus-within > i.lead { color: var(--blue); }
.field input.invalid { border-color: #f87171; box-shadow: 0 0 0 4px rgba(239, 68, 68, .1); }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: #94a3b8;
}
.password-toggle:hover { background: #eef2f7; color: #334155; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.hint.err { color: var(--red); }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.strength span { height: 4px; border-radius: 4px; background: #e2e8f0; transition: background .2s; }
.strength[data-s="1"] span:nth-child(-n+1) { background: #ef4444; }
.strength[data-s="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-s="3"] span:nth-child(-n+3) { background: #3b82f6; }
.strength[data-s="4"] span { background: var(--green); }

.btn {
  width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; margin-top: 6px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff;
  font: 700 .98rem 'Inter', sans-serif; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 24px -10px rgba(29, 111, 168, .7); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px -10px rgba(29, 111, 168, .75); }
.btn:disabled { cursor: progress; transform: none; }
.form-toggle { text-align: center; margin-top: 26px; font-size: .92rem; color: var(--muted); }
.links { display: flex; justify-content: center; margin-top: 16px; font-size: .85rem; }
.links a { font-weight: 500; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.legal { font-size: .78rem; color: #94a3b8; text-align: center; margin-top: 18px; line-height: 1.6; }
.legal a { color: #64748b; font-weight: 500; }
.trust { display: flex; justify-content: center; gap: 18px; margin-top: 22px; font-size: .78rem; color: #94a3b8; flex-wrap: wrap; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.message { display: none; }
.loading-spinner { width: 36px; height: 36px; margin: 6px auto 0; border: 3px solid #e2e8f0; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-top { padding: 18px 20px; }
  .auth-top .mobile-logo { display: block; }
}
@media (max-width: 420px) {
  .form-header h2 { font-size: 1.5rem; }
  .auth-center { padding: 8px 18px 32px; }
}
