/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3250;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --sidebar-width: 230px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border: none; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #5a52d5; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent2); }
.btn-danger { background: #3d1515; color: var(--red); border: 1px solid #5a2020; }
.btn-danger:hover:not(:disabled) { background: #5a2020; }
.btn-success { background: #0d3325; color: var(--green); border: 1px solid #1a5c42; }
.btn-success:hover:not(:disabled) { background: #1a5c42; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:500px) { .form-row { grid-template-columns: 1fr; } }

/* ── Card ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ── Toast ─────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.88rem; font-weight: 500;
  z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  max-width: 340px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success  { background: #0d3325; color: var(--green); border: 1px solid #1a5c42; }
#toast.error    { background: #3d1515; color: var(--red);   border: 1px solid #5a2020; }
#toast.warning  { background: #3d2e00; color: #f5c842;      border: 1px solid #7a5e00; }
#toast.info     { background: var(--surface2); color: var(--accent2); border: 1px solid var(--border); }

/* ── Spinner ───────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert ─────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.alert-error   { background: #3d1515; color: var(--red);   border: 1px solid #5a2020; }
.alert-success { background: #0d3325; color: var(--green); border: 1px solid #1a5c42; }
.alert-info    { background: var(--surface2); color: var(--accent2); border: 1px solid var(--border); }

/* ── App Layout (sidebar + main) ───────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 50;
  transition: transform 0.3s;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent2);
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.5px;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none; background: transparent;
  width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(108,99,255,0.15); color: var(--accent2); border: 1px solid rgba(108,99,255,0.2); }
.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar-footer { padding: 16px 10px; border-top: 1px solid var(--border); }
.sidebar-user {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.user-info .user-email { font-size: 0.75rem; color: var(--muted); }

/* ── Main Content ──────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}
.page-header {
  padding: 28px 32px 0;
  margin-bottom: 28px;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.page-header p  { color: var(--muted); font-size: 0.95rem; }
.page-content { padding: 0 32px 40px; }

/* Responsive sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 60;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  align-items: center; justify-content: center;
  cursor: pointer;
}
@media(max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .page-header { padding: 60px 16px 0; }
  .page-content { padding: 0 16px 40px; }
}

/* ── Auth Pages ────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 30% 20%, rgba(108,99,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(167,139,250,0.05) 0%, transparent 60%),
              var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center;
  font-size: 1.5rem; font-weight: 800;
  color: var(--accent2); margin-bottom: 4px;
}
.auth-logo span { color: var(--accent); }
.auth-logo a { text-decoration: none; color: inherit; }
.auth-subtitle { text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 28px; }
.auth-card h2 { font-size: 1.3rem; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--muted); font-size: 0.88rem; }
.auth-footer a { color: var(--accent2); }
.auth-footer a:hover { color: var(--accent); }
.password-strength {
  height: 4px; border-radius: 2px; margin-top: 6px;
  background: var(--surface2);
  overflow: hidden;
}
.password-strength-bar {
  height: 100%; border-radius: 2px;
  transition: all 0.3s;
}

.register-page-modern {
  background: #f3f4f6;
  color: #1f2937;
}
.register-page-modern .auth-page {
  background: #f3f4f6;
}
.register-page-modern .register-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  max-width: 560px;
  padding: 36px 40px;
}
.register-page-modern .auth-logo,
.register-page-modern .auth-logo a {
  color: #374151;
}
.register-page-modern .auth-logo span {
  color: #6b7280;
}
.register-page-modern .auth-subtitle {
  color: #6b7280;
  margin-bottom: 22px;
}
.register-page-modern label {
  color: #374151;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.register-page-modern .input-shell {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  background: #f9fafb;
  padding: 0 14px;
}
.register-page-modern .input-shell:focus-within {
  border-color: #9ca3af;
  background: #fff;
}
.register-page-modern .input-shell input {
  background: transparent;
  border: none;
  color: #111827;
  height: 56px;
  padding: 0 10px;
  font-size: 1rem;
}
.register-page-modern .input-shell input:focus {
  border: none;
}
.register-page-modern .input-shell input::placeholder {
  color: #9ca3af;
}
.register-page-modern .input-icon {
  width: 22px;
  height: 22px;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
}
.register-page-modern .input-icon svg,
.register-page-modern .password-toggle svg {
  width: 100%;
  height: 100%;
}
.register-page-modern .password-toggle {
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  width: 22px;
  height: 22px;
  padding: 0;
}
.register-page-modern .register-submit-btn {
  background: #8b8b8b;
  color: #fff;
  border-radius: 16px;
  padding: 15px 20px;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
}
.register-page-modern .register-submit-btn:hover:not(:disabled) {
  background: #787878;
}
.register-page-modern .google-signup-btn {
  margin-top: 12px;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 1rem;
  justify-content: center;
}
.register-page-modern .google-signup-btn:hover {
  background: #f9fafb;
}
.register-page-modern .google-logo {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: conic-gradient(#4285F4 0 25%, #34A853 25% 50%, #FBBC05 50% 75%, #EA4335 75% 100%);
}
.register-page-modern .auth-divider {
  margin: 18px 0 2px;
  position: relative;
  text-align: center;
}
.register-page-modern .auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e5e7eb;
}
.register-page-modern .auth-divider span {
  position: relative;
  padding: 0 12px;
  background: #fff;
  color: #6b7280;
}
.google-proxy-button {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.google-login-render {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.register-page-modern #successMessage {
  color: #4b5563 !important;
}
.register-page-modern .auth-footer {
  color: #6b7280;
}
.register-page-modern .auth-footer a {
  color: #111827;
  font-weight: 700;
}

/* ── Landing Page ──────────────────────────────────────────────── */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(26,29,39,0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.landing-logo { font-size: 1.4rem; font-weight: 800; color: var(--accent2); }
.landing-logo span { color: var(--accent); }
.landing-nav-links { display: flex; align-items: center; gap: 28px; }
.landing-nav-links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-actions { display: flex; gap: 10px; }

.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.15) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 20px;
  font-size: 0.82rem; color: var(--accent2);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem; color: var(--muted);
  max-width: 560px; margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.features-section { padding: 80px 48px; max-width: 1100px; margin: 0 auto; }
.section-label { text-align: center; color: var(--accent2); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.section-sub   { text-align: center; color: var(--muted); margin-bottom: 52px; font-size: 1rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.how-section { padding: 80px 48px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; max-width: 900px; margin: 0 auto; }
.step { text-align: center; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: #fff;
  margin: 0 auto 16px;
}
.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p  { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.landing-footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Utility ───────────────────────────────────────────────────── */
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent2); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
