* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --accent2: #fdcb6e;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --text: #dfe6e9;
  --text-muted: #b2bec3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --gradient-2: linear-gradient(135deg, #fd79a8, #e17055);
  --gradient-3: linear-gradient(135deg, #00cec9, #81ecec);
  --gradient-4: linear-gradient(135deg, #fdcb6e, #e17055);
  --gradient-bg: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gradient-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(108,92,231,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(253,121,168,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
#app { position: relative; z-index: 1; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(26,26,46,0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 24px 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}
.sidebar-brand .logo {
  width: 40px; height: 40px;
  background: var(--gradient-1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 15px rgba(108,92,231,0.4);
}
.sidebar-brand h2 { font-size: 18px; font-weight: 700; }
.sidebar-brand span { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.nav-section { margin-bottom: 20px; }
.nav-section h5 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-item.active {
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
  box-shadow: inset 3px 0 0 var(--primary);
}
.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }
.nav-item .badge {
  margin-left: auto;
  background: var(--gradient-2);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.user-card:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.user-info h6 { font-size: 13px; font-weight: 600; }
.user-info span { font-size: 11px; color: var(--text-muted); }

/* Main Content */
.main-content {
  margin-left: 260px;
  margin-right: 340px;
  padding: 24px 32px;
  min-height: 100vh;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 26px; font-weight: 800; }
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: rgba(26,26,46,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
}
.stat-card:nth-child(1)::before { background: var(--gradient-1); }
.stat-card:nth-child(2)::before { background: var(--gradient-2); }
.stat-card:nth-child(3)::before { background: var(--gradient-3); }
.stat-card:nth-child(4)::before { background: var(--gradient-4); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(255,255,255,0.1); }
.stat-card .stat-icon { font-size: 24px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); }
.stat-card .stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}
.stat-change.up { background: rgba(0,184,148,0.15); color: var(--success); }
.stat-change.down { background: rgba(225,112,85,0.15); color: var(--danger); }

/* Cards */
.card {
  background: rgba(26,26,46,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.3s;
}
.card:hover { border-color: rgba(255,255,255,0.1); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.card-header h3 { font-size: 16px; font-weight: 700; }
.card-header .badge-count {
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Grid Layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-weight: 600;
}
tbody td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
tbody tr { transition: all 0.2s; cursor: pointer; }
tbody tr:hover { background: rgba(255,255,255,0.03); }
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}
.status-badge.active { background: rgba(0,184,148,0.15); color: var(--success); }
.status-badge.pending { background: rgba(253,203,110,0.15); color: var(--warning); }
.status-badge.overdue { background: rgba(225,112,85,0.15); color: var(--danger); }
.status-badge.available { background: rgba(108,92,231,0.15); color: var(--primary-light); }
.status-badge.occupied { background: rgba(0,206,201,0.15); color: var(--accent); }
.status-badge.vacant { background: rgba(178,190,195,0.15); color: var(--text-muted); }
.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.action-btn.danger:hover { background: rgba(225,112,85,0.15); color: var(--danger); }

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,92,231,0.4); }
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-success { background: var(--gradient-3); color: #0f0f1a; box-shadow: 0 4px 15px rgba(0,206,201,0.3); }
.btn-success:hover { transform: translateY(-1px); }
.btn-danger { background: var(--gradient-2); color: white; box-shadow: 0 4px 15px rgba(253,121,168,0.3); }
.btn-danger:hover { transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 10px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
  background: rgba(255,255,255,0.08);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
select option { background: var(--surface); color: var(--text); }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: all 0.3s;
}
.modal-overlay.show .modal-card { transform: scale(1); }
.modal-card h2 { font-size: 20px; margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Login */
.login-card {
  max-width: 420px;
  text-align: center;
  padding: 40px;
}
.login-brand { margin-bottom: 28px; }
.login-logo {
  width: 64px; height: 64px;
  background: var(--gradient-1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 30px rgba(108,92,231,0.4);
}
.login-brand h1 { font-size: 24px; font-weight: 800; }
.login-brand p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.login-switch { font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.login-switch a { color: var(--primary-light); cursor: pointer; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }

/* AI Chat */
/* AI Column */
.ai-column {
  position: fixed;
  top: 0; right: 0;
  width: 340px;
  height: 100vh;
  background: rgba(22,22,44,0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 99;
}
.ai-column-header {
  padding: 18px 20px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ai-column-header h4 { font-size: 14px; font-weight: 600; }
.ai-column-header span { font-size: 11px; opacity: 0.8; }
.ai-column-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-column-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ai-column-input-area input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.ai-column-input-area input:focus {
  border-color: var(--primary);
}
.ai-column-input-area button {
  padding: 10px 16px;
  background: var(--gradient-1);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.ai-column-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.chat-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
}
.chat-toggle {
  width: 56px; height: 56px;
  background: var(--gradient-1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(108,92,231,0.4);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-toggle:hover { transform: scale(1.1); }
.chat-toggle.active { transform: rotate(45deg); background: var(--gradient-2); }
.chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  height: 480px;
  background: rgba(26,26,46,0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 16px 20px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header .chat-avatar {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.chat-header h4 { font-size: 14px; font-weight: 600; }
.chat-header span { font-size: 11px; opacity: 0.8; }
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.bot {
  background: rgba(255,255,255,0.06);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--gradient-1);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg .msg-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  display: block;
}
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
}
.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.chat-input-area input:focus { border-color: var(--primary); }
.chat-input-area button {
  width: 38px; height: 38px;
  background: var(--gradient-1);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}
.chat-input-area button:hover { transform: scale(1.05); }
.chat-typing {
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  align-self: flex-start;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  align-items: center;
}
.chat-typing span {
  animation: dotPulse 1.4s infinite;
  font-size: 18px;
  line-height: 0;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* Views */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Properties Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.property-card {
  background: rgba(26,26,46,0.8);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}
.property-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(255,255,255,0.1); }
.property-card .prop-image {
  height: 140px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  opacity: 0.8;
}
.property-card:nth-child(2n) .prop-image { background: var(--gradient-2); }
.property-card:nth-child(3n) .prop-image { background: var(--gradient-3); }
.property-card:nth-child(4n) .prop-image { background: var(--gradient-4); }
.property-card .prop-body { padding: 16px; }
.property-card .prop-body h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.property-card .prop-body p { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.property-card .prop-body .prop-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.property-card .prop-body .prop-meta span { display: flex; align-items: center; gap: 4px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Charts placeholder */
.chart-area {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-top: 20px;
}
.chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: all 0.5s;
  position: relative;
}
.chart-bar .bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}
.chart-bar .bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

/* Toast */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  transform: translateX(120%);
  transition: all 0.3s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast.success { background: var(--gradient-3); color: #0f0f1a; }
.toast.error { background: var(--gradient-2); }
.toast.info { background: var(--gradient-1); }

/* Particle Background Canvas */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Glow Effects */
.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(108,92,231,0.3); }
  50% { box-shadow: 0 0 40px rgba(108,92,231,0.6), 0 0 60px rgba(108,92,231,0.2); }
}

/* Gradient Border Cards */
.card-gradient-border {
  position: relative;
  background: rgba(26,26,46,0.9);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card-gradient-border::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  right: -1px; bottom: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--accent2));
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.card-gradient-border:hover::before { opacity: 0.8; }

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
.float-anim { animation: float 3s ease-in-out infinite; }

/* Shimmer Loading */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading Spinner */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(108,92,231,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Slide-in animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.anim-slide-up { animation: slideUp 0.4s ease; }
.anim-slide-right { animation: slideInRight 0.4s ease; }

/* Stat card staggered animation */
.stats-grid .stat-card {
  animation: slideUp 0.5s ease backwards;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Progress Bar */
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* Tooltip */
.tooltip {
  position: relative;
  cursor: pointer;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
}
.tooltip:hover::after { opacity: 1; }

/* Tag/Filter Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.pill.active { background: rgba(108,92,231,0.2); color: var(--primary-light); }

/* Notification Badge Pulse */
@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.badge-pulse { animation: badgePulse 1.5s ease-in-out infinite; }

/* Rainbow Gradient Text */
.rainbow-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--accent2), var(--primary));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowShift 4s linear infinite;
}
@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Confetti / Celebration */
.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px; height: 10px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Data Export Button */
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0,206,201,0.1);
  border: 1px solid rgba(0,206,201,0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.export-btn:hover {
  background: rgba(0,206,201,0.2);
  transform: translateY(-1px);
}

/* Keyboard Shortcut Hint */
.kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-muted);
}

/* Mobile */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}
@media (max-width: 1200px) {
  .ai-column { width: 300px; }
  .main-content { margin-right: 300px; }
}
@media (max-width: 900px) {
  .ai-column { display: none; }
  .main-content { margin-right: 0; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; }
  .mobile-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .chat-panel { width: calc(100vw - 32px); right: 0; height: 400px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Rent prediction widget */
.prediction-result {
  padding: 20px;
  background: rgba(108,92,231,0.1);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 12px;
}
.prediction-result .pred-value {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tab system */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.tab {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: rgba(108,92,231,0.2);
  color: var(--primary-light);
}
