/* ============================================================
   Ex Ai — Core Design System
   Neumorphism + Glassmorphism + Premium Lighting
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Root Variables ── */
:root {
  --orange:      #FF6B2C;
  --coral:       #FF4D6D;
  --fuchsia:     #D946EF;
  --copper:      #C87941;
  --ruby:        #C0152A;
  --white:       #FFFFFF;

  --grad-fire:   linear-gradient(135deg, #FF6B2C 0%, #FF4D6D 100%);
  --grad-bloom:  linear-gradient(135deg, #C0152A 0%, #D946EF 100%);
  --grad-warm:   linear-gradient(135deg, #C87941 0%, #FF6B2C 60%, #FF4D6D 100%);
  --grad-text:   linear-gradient(135deg, #FF6B2C, #FF4D6D, #D946EF);

  --bg-base:     #0C0A0E;
  --bg-card:     #141118;
  --bg-elevated: #1A1620;
  --bg-glass:    rgba(255,255,255,0.04);
  --bg-glass2:   rgba(255,255,255,0.07);

  --border:      rgba(255,255,255,0.07);
  --border-glow: rgba(255,107,44,0.35);
  --border-card: rgba(255,255,255,0.06);

  --text-primary:   #F5F0FF;
  --text-secondary: rgba(245,240,255,0.55);
  --text-muted:     rgba(245,240,255,0.3);

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px rgba(255,107,44,0.2), 0 0 60px rgba(255,77,109,0.1);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --sidebar-w:  260px;
  --header-h:   66px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background Mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(255,107,44,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(217,70,239,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(192,21,42,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,107,44,0.3); border-radius: 99px; }

/* ── Selection ── */
::selection { background: rgba(255,107,44,0.3); color: #fff; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
p { line-height: 1.7; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: scale(0.96) !important; }

/* Primary Fire Button */
.btn-primary {
  background: var(--grad-fire);
  color: #fff;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(255,107,44,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(255,107,44,0.5), 0 0 0 1px rgba(255,107,44,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
  background: var(--bg-glass2);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: rgba(255,107,44,0.3);
  transform: translateY(-1px);
}

/* Gradient Border Button */
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.btn-outline::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--radius-md) + 1.5px);
  background: var(--grad-fire);
  z-index: -1;
}

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 36px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Inputs ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s;
}

.input-field {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  padding: 13px 14px 13px 42px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,44,0.12), inset 0 1px 0 rgba(255,255,255,0.03);
  background: rgba(26,22,32,0.9);
}

.input-wrap:focus-within .input-icon { color: var(--orange); }

.input-field.error { border-color: var(--ruby); }
.input-field.error:focus { box-shadow: 0 0 0 3px rgba(192,21,42,0.15); }

/* ── Loader Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s, visibility 0.4s;
}

.page-loader.hidden { opacity: 0; visibility: hidden; }

.loader-logo {
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--grad-fire);
  border-radius: 99px;
  animation: loadbar 1.2s var(--ease-smooth) forwards;
}

@keyframes loadbar {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s var(--ease-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-fire);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 18px;
}

.modal-icon.error { background: rgba(192,21,42,0.15); color: var(--ruby); }
.modal-icon.success { background: rgba(255,107,44,0.15); color: var(--orange); }
.modal-icon.info { background: rgba(217,70,239,0.15); color: var(--fuchsia); }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.modal-msg {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-glass2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ── Auth Layout ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

.auth-panel-left {
  background: linear-gradient(145deg, rgba(255,107,44,0.06) 0%, rgba(217,70,239,0.04) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  gap: 40px;
}

.auth-panel-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,44,0.4);
  flex-shrink: 0;
}

.auth-brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tagline {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.auth-visual {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  position: relative;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: float 4s ease-in-out infinite;
}

.auth-orb-1 {
  width: 60%;
  height: 60%;
  top: 10%; left: 10%;
  background: radial-gradient(circle, rgba(255,107,44,0.4) 0%, transparent 70%);
}

.auth-orb-2 {
  width: 50%;
  height: 50%;
  bottom: 10%; right: 10%;
  background: radial-gradient(circle, rgba(217,70,239,0.35) 0%, transparent 70%);
  animation-delay: -2s;
}

.auth-orb-3 {
  width: 40%;
  height: 40%;
  top: 35%; left: 30%;
  background: radial-gradient(circle, rgba(192,21,42,0.25) 0%, transparent 70%);
  animation-delay: -1s;
}

.auth-grid-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: 50%;
  mask-image: radial-gradient(circle, black 40%, transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-16px) scale(1.05); }
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 300px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-glass2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--orange);
  flex-shrink: 0;
}

/* Auth Form */
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form-header {
  margin-bottom: 36px;
}

.auth-form-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.auth-form-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-form-subtitle a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

.auth-form-subtitle a:hover { text-decoration: underline; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── App Layout (Dashboard etc.) ── */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  background: rgba(20,17,24,0.95);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(0);
  transition: transform 0.35s var(--ease-smooth);
}

.sidebar.collapsed { transform: translateX(-100%); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 3px 14px rgba(255,107,44,0.35);
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-item:hover {
  background: var(--bg-glass2);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255,107,44,0.15) 0%, rgba(255,77,109,0.05) 100%);
  color: var(--orange);
  border: 1px solid rgba(255,107,44,0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad-fire);
}

.sidebar-bottom {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-user:hover { background: var(--bg-glass2); border-color: rgba(255,107,44,0.25); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main Content */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin 0.35s var(--ease-smooth);
}

.main-wrap.full { margin-left: 0; }

/* Header */
.top-header {
  height: var(--header-h);
  background: rgba(12,10,14,0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
}

.header-menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.header-menu-btn:hover { color: var(--text-primary); background: var(--bg-glass2); }

.header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-spacer { flex: 1; }

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--bg-glass2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.header-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* Page Content */
.page-content {
  flex: 1;
  padding: 32px 28px;
  max-width: 1200px;
}

/* ── Dashboard Components ── */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 22px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--grad-fire);
  opacity: 0.06;
  transition: opacity 0.3s;
}

.stat-card:hover::after { opacity: 0.1; }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-sub .up { color: #22c55e; }
.stat-sub .down { color: var(--ruby); }

.stat-icon {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 22px;
  color: var(--orange);
  opacity: 0.4;
}

/* Activity Feed */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i { color: var(--orange); font-size: 14px; }

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
  cursor: default;
}

.activity-item:hover { background: var(--bg-glass); }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot.fire { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.activity-dot.bloom { background: var(--fuchsia); box-shadow: 0 0 8px var(--fuchsia); }
.activity-dot.ruby { background: var(--ruby); box-shadow: 0 0 8px var(--ruby); }

.activity-info { flex: 1; }
.activity-text { font-size: 13px; font-weight: 500; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.activity-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.activity-badge.fire { background: rgba(255,107,44,0.15); color: var(--orange); }
.activity-badge.bloom { background: rgba(217,70,239,0.15); color: var(--fuchsia); }
.activity-badge.ruby { background: rgba(192,21,42,0.15); color: #ff4d6d; }

/* Content grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

/* ── AI Generator Page ── */
.ai-generator {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
}

.prompt-card {
  padding: 28px;
}

.prompt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.prompt-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,107,44,0.2), rgba(217,70,239,0.2));
  border: 1px solid rgba(255,107,44,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--orange);
}

.prompt-title { font-size: 18px; font-weight: 700; }
.prompt-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.prompt-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  padding: 16px;
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}

.prompt-textarea::placeholder { color: var(--text-muted); }

.prompt-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,44,0.12);
}

.prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.prompt-hint {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.output-card {
  padding: 28px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.output-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}

.output-placeholder i {
  font-size: 40px;
  opacity: 0.3;
}

.output-placeholder p { font-size: 13px; max-width: 240px; line-height: 1.5; }

.output-video {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  display: none;
}

.output-video.visible { display: block; }

.generate-progress {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.generate-progress.visible { display: flex; }

.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-fire);
  border-radius: 99px;
  width: 0;
  transition: width 0.4s var(--ease-smooth);
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Profile Page ── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 900px;
}

.profile-card {
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
}

.profile-avatar {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: var(--grad-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 30px rgba(255,107,44,0.35);
}

.profile-status-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid var(--bg-card);
  box-shadow: 0 0 8px #22c55e;
}

.profile-name {
  font-size: 19px;
  font-weight: 700;
}

.profile-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
}

.profile-since {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-glass);
  border-radius: 99px;
  border: 1px solid var(--border);
}

.profile-since i { color: var(--orange); }

.profile-form-card {
  padding: 30px;
}

.profile-form-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-form-title i { color: var(--orange); }

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Info row (readonly display) */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.info-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Tag / chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,107,44,0.12);
  color: var(--orange);
  border: 1px solid rgba(255,107,44,0.2);
}

/* ── Toast ── */
.toast-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease-spring) forwards;
  max-width: 320px;
}

.toast.removing { animation: toastOut 0.25s var(--ease-smooth) forwards; }

.toast i { font-size: 15px; flex-shrink: 0; }
.toast.success i { color: #22c55e; }
.toast.error i { color: var(--ruby); }
.toast.info i { color: var(--orange); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.5s var(--ease-smooth) forwards;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }
.reveal-delay-4 { animation-delay: 0.32s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 24px; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .main-wrap { margin-left: 0; }
  .header-menu-btn { display: flex; }

  .page-content { padding: 24px 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    display: none;
  }
  .sidebar-overlay.active { display: block; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
  .top-header { padding: 0 18px; }
}
