/* styles.css - High-End Dark UI System for Phish&Chips */
/* Inspired by the Monera luxury dark fintech & cybersecurity dashboard design */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-app: #090a0f;
  --bg-sidebar: #0d0f15;
  --bg-card: #131620;
  --bg-card-hover: #171b27;
  --bg-surface: #191c28;
  --bg-input: #0b0d13;
  --bg-terminal: #06070a;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(255, 255, 255, 0.15);
  
  /* Neon Accents from screenshot */
  --neon-purple: #c084fc;
  --neon-purple-deep: #8b5cf6;
  --neon-lime: #a3e635;
  --neon-lime-dark: #65a30d;
  --neon-cyan: #38bdf8;
  --neon-gold: #f59e0b;
  --neon-amber: #fbbf24;
  --neon-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-card: 1.25rem; /* 20px */
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 18% 10%, rgba(192, 132, 252, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 82% 25%, rgba(163, 230, 53, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* Sidebar Styles matching screenshot */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-col: column;
  justify-content: space-between;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.sidebar-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav-item.active {
  color: #ffffff;
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

/* Tree-line styling for nested sidebar items (Overview, Detonation, Perimeter) */
.sidebar-sub-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.5rem 0.45rem 2.2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-sub-item::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 50%;
  width: 0.55rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-sub-item:hover {
  color: var(--text-main);
}

.sidebar-sub-item.active {
  color: #ffffff;
  font-weight: 600;
}

/* Dashboard Cards (The 4 Top Metric Cards from screenshot) */
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.4rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

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

.metric-badge-green {
  background: rgba(163, 230, 53, 0.12);
  color: #bef264;
  border: 1px solid rgba(163, 230, 53, 0.25);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.metric-badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.metric-badge-purple {
  background: rgba(192, 132, 252, 0.12);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.25);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* Revenue Growth / Detonation Chart Card */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* Glowing Neon Vertical Pill Bars (matching screenshot) */
.bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 190px;
  padding: 0 1rem;
  gap: 1.25rem;
  position: relative;
}

.neon-bar {
  width: 28px;
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.neon-bar-purple {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.45) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.neon-bar-purple:hover {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.7) 0%, rgba(139, 92, 246, 0.45) 100%);
}

/* The Active Glowing Neon Bar (Friday in screenshot) */
.neon-bar-active {
  background: linear-gradient(180deg, #d8b4fe 0%, #c084fc 30%, #9333ea 100%);
  box-shadow: 
    0 0 25px rgba(192, 132, 252, 0.6),
    0 0 50px rgba(147, 51, 234, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Floating Tooltip matching screenshot ($4,987 Aug 12, 2025) */
.bar-tooltip {
  position: absolute;
  top: 25%;
  left: 62%;
  background: #0f121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 20;
  pointer-events: none;
}

/* Expense Breakdown Donut Chart Card (Right Column) */
.donut-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.6);
  position: relative;
}

.donut-floating-pill {
  position: absolute;
  right: 1.5rem;
  top: 45%;
  background: linear-gradient(135deg, rgba(163, 230, 53, 0.15) 0%, rgba(101, 163, 13, 0.25) 100%);
  border: 1px solid rgba(163, 230, 53, 0.35);
  box-shadow: 0 8px 20px rgba(163, 230, 53, 0.15);
  border-radius: 0.85rem;
  padding: 0.45rem 0.85rem;
}

/* Recent Activity Table (Bottom Card) */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.6);
}

.activity-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.activity-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-table td {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.015);
  transition: all 0.2s ease;
}

.activity-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.activity-table tr td:first-child {
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

.activity-table tr td:last-child {
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

/* Status Badges */
.badge-status-completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-status-scheduled {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-status-blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Need Help Card (Bottom of Sidebar) */
.help-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.1rem;
  margin-top: 1.5rem;
}

/* Terminal Monospace Window */
.terminal-window {
  background-color: var(--bg-terminal);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: #e2e8f0;
  max-height: 380px;
  overflow-y: auto;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  animation: fadeInLine 0.15s ease-out;
}

@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.badge-init { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); }
.badge-contain { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-intercept { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-evidence { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-approval { background: rgba(245, 158, 11, 0.2); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.5); }
.badge-inference { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }

.terminal-fries {
  color: var(--neon-amber);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  display: inline-block;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* CRT Scanlines overlay */
.scanlines-overlay {
  position: relative;
  overflow: hidden;
}

.scanlines-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  z-index: 10;
  background-size: 100% 3px;
  pointer-events: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #090b10;
}
::-webkit-scrollbar-thumb {
  background: #202430;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #353b4c;
}
