/*
 * HomeHub AI — Register Page
 * Shares the same premium split-screen design as login/style.css
 */

/* Import the login styles and override for register-specific elements */

:root {
  --purple:       #7c3aed;
  --purple-light: #8b5cf6;
  --purple-bg:    rgba(124,58,237,.08);
  --indigo:       #4f46e5;
  --dark:         #0f172a;
  --text:         #1e293b;
  --muted:        #64748b;
  --border:       #e2e8f0;
  --white:        #ffffff;
  --green:        #10b981;
  --danger:       #ef4444;
  --grad:         linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  --grad-dark:    linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  --sh-pur:       0 8px 28px rgba(124,58,237,.30);
  --r:            12px;
  --r-lg:         18px;
  --r-xl:         24px;
  --r-full:       9999px;
  --t:            all .22s cubic-bezier(.4,0,.2,1);
}

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

body {
  min-height: 100vh; height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  background: var(--grad-dark);
  overflow-x: hidden;
}

/* ── Layout ─────────────────────────────────────────── */
.auth-layout { display: flex; width: 100%; min-height: 100vh; }

/* ── Left Brand Panel ───────────────────────────────── */
.auth-brand {
  display: none; flex: 0 0 45%;
  background: var(--grad-dark);
  position: relative; overflow: hidden;
  padding: 56px 52px; flex-direction: column; justify-content: space-between;
}
.auth-brand::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.22) 0%, transparent 70%);
  top: -100px; right: -120px; pointer-events: none;
}
.auth-brand::after {
  content: ''; position: absolute;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,.15) 0%, transparent 70%);
  bottom: -80px; left: -60px; pointer-events: none;
}
.brand-top { position: relative; z-index: 1; }
.brand-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 56px; }
.brand-logo-box {
  width: 40px; height: 40px; background: var(--grad);
  border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.brand-logo-text { font-size: 20px; font-weight: 800; color: #fff; }
.brand-headline {
  font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 900;
  color: #fff; line-height: 1.1; letter-spacing: -.025em; margin-bottom: 20px;
}
.brand-headline .hl {
  background: linear-gradient(135deg, #a78bfa, #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-sub {
  font-size: 15px; color: rgba(255,255,255,.65);
  line-height: 1.7; max-width: 340px; margin-bottom: 44px;
}
.brand-features { display: flex; flex-direction: column; gap: 18px; }
.brand-feature {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r); transition: var(--t);
}
.brand-feature:hover { background: rgba(255,255,255,.1); }
.brand-feat-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(139,92,246,.25); color: #c4b5fd;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; margin-top: 1px;
}
.brand-feat-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.brand-feat-desc  { font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.5; }
.brand-bottom { position: relative; z-index: 1; }
.brand-quote {
  padding: 20px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg);
}
.brand-quote-text { font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.65; font-style: italic; margin-bottom: 14px; }
.brand-quote-author { display: flex; align-items: center; gap: 10px; }
.brand-quote-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.brand-quote-name { font-size: 13px; font-weight: 700; color: #fff; }
.brand-quote-role { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.brand-quote-stars { display: flex; gap: 2px; margin-left: auto; }
.brand-quote-stars i { color: #f59e0b; font-size: 12px; }

/* ── Right Form Panel ───────────────────────────────── */
.auth-form-panel {
  flex: 1; background: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 36px 28px; position: relative; overflow-y: auto;
}
.auth-form-panel::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 6px;
  background: var(--grad);
}

.register-page {
  width: 100%; max-width: 440px;
  background: transparent; padding: 0;
}

/* Header */
.register-header { text-align: center; margin-bottom: 24px; }
.logo-container  { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.logo-image      { height: 52px; width: auto; max-width: 180px; object-fit: contain; }
.platform-title  { font-size: 14px; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* Role selection */
.role-selection { display: flex; gap: 12px; margin-bottom: 20px; }
.role-card {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; background: var(--purple-bg);
  border: 2px solid transparent; border-radius: var(--r-lg);
  cursor: pointer; transition: var(--t); color: var(--text);
}
.role-card:hover {
  border-color: rgba(124,58,237,.3);
  background: rgba(124,58,237,.1);
  transform: translateY(-2px); box-shadow: 0 4px 14px rgba(124,58,237,.18);
}
.role-card.active {
  background: var(--grad) !important; border-color: transparent !important;
  color: #fff !important; box-shadow: var(--sh-pur); transform: translateY(-2px);
}
.role-card.active .role-content h3,
.role-card.active .role-content p { color: #fff !important; }
.role-emoji     { font-size: 1.6rem; flex-shrink: 0; }
.role-content h3{ font-size: 13px; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.role-content p { font-size: 11px; color: var(--muted); opacity: .85; }

/* Instruction */
.signup-message { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* Form */
.register-form { display: flex; flex-direction: column; gap: 14px; }
.form-group     { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .2px; }
.form-group input,
.password-input-wrapper input {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 14px; font-family: inherit;
  color: var(--text); background: #fff;
  transition: var(--t); outline: none;
}
.form-group input:focus,
.password-input-wrapper input:focus {
  border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.form-group input::placeholder { color: #cbd5e1; }

/* Password wrapper */
.password-input-wrapper { position: relative; display: flex; align-items: center; }
.password-input-wrapper input { padding-right: 46px; }
.password-toggle {
  position: absolute; right: 12px; background: none; border: none;
  cursor: pointer; padding: 6px; color: var(--muted);
  display: flex; align-items: center; transition: color .2s; z-index: 2;
}
.password-toggle:hover { color: var(--text); }
.password-toggle .eye-icon { width: 18px; height: 18px; stroke: currentColor; }

/* Password strength */
.password-strength {
  height: 4px; border-radius: 2px; margin-top: 6px;
  background: var(--border); transition: all .3s;
  position: relative; overflow: hidden;
}
.password-strength::after {
  content: ''; position: absolute; inset: 0;
  background: var(--strength-color, var(--border));
  width: var(--strength-width, 0%); transition: all .3s;
}
.strength-weak   { --strength-color: #ef4444; --strength-width: 33%; }
.strength-medium { --strength-color: #f59e0b; --strength-width: 66%; }
.strength-strong { --strength-color: #10b981; --strength-width: 100%; }

/* Form options */
.form-options { display: flex; align-items: center; }
.terms-checkbox {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text); cursor: pointer; user-select: none;
}
.terms-checkbox input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--purple); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.forgot-link { color: var(--purple); font-weight: 600; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

/* Submit button */
.signup-btn {
  width: 100%; padding: 14px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--r-lg);
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: var(--t);
  box-shadow: var(--sh-pur); letter-spacing: .2px;
}
.signup-btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 12px 32px rgba(124,58,237,.4); }
.signup-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Error message */
.error-message { font-size: 13px; text-align: center; padding: 0; display: none; border-radius: var(--r); }
.error-message.showing {
  display: block; color: #dc2626;
  padding: 10px 14px; background: #fef2f2;
  border-left: 3px solid #dc2626;
}

/* Login link */
.login-link { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.login-link a { color: var(--purple); font-weight: 600; }
.login-link a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────── */
@media (min-width: 768px) {
  .auth-brand { display: flex; }
  .auth-form-panel { padding: 60px 72px; }
  .auth-form-panel::before { display: none; }
}
@media (min-width: 1200px) {
  .auth-brand { flex: 0 0 42%; padding: 64px 64px; }
}
@media (max-width: 767px) {
  body { background: #fff; }
  .auth-layout { background: var(--white); }
  .auth-form-panel { padding: 32px 20px 48px; align-items: flex-start; }
  .register-page { max-width: 100%; }
  .role-selection { flex-direction: column; }
}
