/* ─── Adarsh Command Center — Dark Glassmorphism Theme ─── */

:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #e4e4e7;
  --text-dim: #71717a;
  --text-bright: #ffffff;
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.3);
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.2);
  --red: #ef4444;
  --orange: #f59e0b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Background Effects ─── */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { width: 600px; height: 600px; background: var(--accent-glow); top: -200px; right: -100px; opacity: 0.4; }
.bg-glow-2 { width: 400px; height: 400px; background: rgba(6, 182, 212, 0.15); bottom: -100px; left: -50px; opacity: 0.5; }
.bg-glow-3 { width: 300px; height: 300px; background: rgba(236, 72, 153, 0.1); top: 50%; left: 40%; opacity: 0.3; }

/* ─── Sidebar ─── */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-bright);
  line-height: 1.2;
}

.logo-text small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-section { padding: 16px 12px 8px; }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dim);
  padding: 0 8px 8px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

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

.nav-item.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.nav-badge.live { background: rgba(34,197,94,0.15); color: var(--green); }
.nav-badge.building { background: rgba(245,158,11,0.15); color: var(--orange); }
.nav-badge.auto { background: rgba(139,92,246,0.15); color: var(--accent); }

.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  padding: 1px 8px;
  border-radius: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
}
.status-dot.green { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.status-dot.red { background: var(--red); }
.status-dot.orange { background: var(--orange); }
.status-dot.pulse { animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--green);
}

.last-updated {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ─── Main Content ─── */

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 16px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ─── Pages ─── */

.page {
  display: none;
  padding: 32px;
  max-width: 1400px;
}

.page.active { display: block; }

.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-bright);
}
.page-header p {
  color: var(--text-dim);
  margin-top: 4px;
  font-size: 14px;
}

/* ─── Stat Cards ─── */

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s;
  cursor: default;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card.revenue { border-left: 3px solid var(--green); }
.stat-card.projects { border-left: 3px solid var(--accent); }
.stat-card.servers { border-left: 3px solid var(--cyan); }
.stat-card.tasks { border-left: 3px solid var(--pink); }

.stat-icon { font-size: 32px; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
  margin: 4px 0;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.stat-trend {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.stat-trend.up { background: rgba(34,197,94,0.1); color: var(--green); }
.stat-trend.down { background: rgba(239,68,68,0.1); color: var(--red); }
.stat-trend.neutral { background: rgba(6,182,212,0.1); color: var(--cyan); }
.stat-trend.auto { background: rgba(139,92,246,0.1); color: var(--accent); }

/* ─── Sections ─── */

.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(139,92,246,0.1);
  color: var(--accent);
}
.badge.green { background: rgba(34,197,94,0.1); color: var(--green); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── Quick Actions ─── */

.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.action-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent);
  transform: translateY(-1px);
}

.action-icon { font-size: 18px; }

/* ─── Money Cards ─── */

.money-cards { display: flex; flex-direction: column; gap: 16px; }

.money-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.money-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.money-card.etsy { border-left: 3px solid var(--green); }
.money-card.polymarket { border-left: 3px solid var(--blue); }

.money-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.money-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
}

.status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-pill.active { background: rgba(34,197,94,0.15); color: var(--green); }
.status-pill.building { background: rgba(245,158,11,0.15); color: var(--orange); }

.money-card-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.mini-stat { display: flex; flex-direction: column; gap: 2px; }
.mini-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.mini-value { font-size: 18px; font-weight: 700; color: var(--text-bright); }

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-fill.building {
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.progress-label {
  font-size: 11px;
  color: var(--text-dim);
}

/* ─── Status List ─── */

.status-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  font-size: 13px;
  transition: background 0.2s;
}
.status-item:hover { background: rgba(255,255,255,0.04); }
.status-item .name { flex: 1; color: var(--text); }
.status-item .type { font-size: 11px; color: var(--text-dim); margin-left: auto; margin-right: 8px; }

/* ─── Activity Feed ─── */

.activity-feed { display: flex; flex-direction: column; gap: 12px; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.activity-text { flex: 1; font-size: 13px; color: var(--text); }
.activity-text strong { color: var(--text-bright); }
.activity-time { font-size: 11px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }

/* ─── Template Grid ─── */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}

.template-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.template-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.template-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 8px;
}

.template-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.template-status.built { background: rgba(245,158,11,0.15); color: var(--orange); }
.template-status.planned { background: rgba(113,113,122,0.15); color: var(--text-dim); }
.template-status.live { background: rgba(34,197,94,0.15); color: var(--green); }

.template-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.template-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
}

/* ─── Commands ─── */

.command-list { display: flex; flex-direction: column; gap: 8px; }

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.command-item code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  background: rgba(139,92,246,0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.command-item span {
  font-size: 12px;
  color: var(--text-dim);
}

/* ─── Projections ─── */

.projection-table { display: flex; flex-direction: column; gap: 4px; }

.projection-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.projection-row.header {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.projection-row.highlight { background: rgba(139,92,246,0.1); color: var(--accent); font-weight: 600; }
.projection-row.goal { background: rgba(34,197,94,0.1); color: var(--green); font-weight: 700; }

/* ─── Checklist ─── */

.checklist { display: flex; flex-direction: column; gap: 12px; }

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.check-item:hover { background: rgba(255,255,255,0.04); }
.check-item input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* ─── Strategy Cards ─── */

.strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.strategy-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}
.strategy-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.strategy-card h3 { font-size: 14px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.strategy-card p { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

/* ─── Health Grid ─── */

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.health-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.health-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
}

.health-card .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.health-card .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.health-card .status-indicator.online { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.health-card .status-indicator.warning { background: var(--orange); }
.health-card .status-indicator.offline { background: var(--red); }

/* ─── Kanban Board ─── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  min-height: 500px;
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 400px;
}

.kanban-column.auto {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.03);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.kanban-column-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
}

.pulse-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
  animation: pulse 2s infinite;
}

.btn-icon {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover { background: var(--bg-card-hover); color: var(--accent); }

.kanban-cards { display: flex; flex-direction: column; gap: 8px; }

.kanban-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: all 0.2s;
}
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; }

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.kanban-card-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.kanban-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.kanban-tag.money { background: rgba(34,197,94,0.15); color: var(--green); }
.kanban-tag.infra { background: rgba(6,182,212,0.15); color: var(--cyan); }
.kanban-tag.ai { background: rgba(139,92,246,0.15); color: var(--accent); }

/* ─── Projects Grid ─── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
  cursor: pointer;
}
.project-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.project-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.project-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
}

.project-card p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ─── Buttons ─── */

.btn-primary {
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-primary:hover { background: #7c3aed; }

.btn-secondary {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

/* ─── Scrollbar ─── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .page { padding: 20px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
}
