:root {
  /* Core Colors */
  --wf-bg: #09090b;
  --wf-bg-sub: #18181b;
  --wf-bg-hover: #27272a;
  
  --wf-border: #27272a;
  --wf-border-hover: #3f3f46;
  
  --wf-text-main: #fafafa;
  --wf-text-sub: #a1a1aa;
  --wf-text-muted: #71717a;
  
  /* Brand/Accent - Fire/Energy Gradient */
  --wf-accent-start: #dc2626; /* Red 600 */
  --wf-accent-end: #f59e0b;   /* Amber 500 */
  --wf-accent-solid: #ef4444; /* Red 500 */
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(239, 68, 68, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--wf-bg);
  color: var(--wf-text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 var(--space-md) 0;
  color: var(--wf-text-sub);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-gradient {
  background: linear-gradient(135deg, var(--wf-accent-start), var(--wf-accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--wf-accent-start), var(--wf-accent-end));
  color: white;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--wf-bg-sub);
  border-color: var(--wf-border);
  color: var(--wf-text-main);
}
.btn-secondary:hover {
  border-color: var(--wf-text-sub);
  background: var(--wf-bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--wf-text-sub);
}
.btn-ghost:hover {
  color: var(--wf-text-main);
  background: rgba(255,255,255,0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--wf-bg-sub);
  border: 1px solid var(--wf-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--wf-border-hover);
  box-shadow: var(--shadow-lg);
}

/* Inputs */
.form-group {
  margin-bottom: var(--space-md);
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--wf-text-sub);
}
.form-input {
  width: 100%;
  background: var(--wf-bg);
  border: 1px solid var(--wf-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--wf-text-main);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--wf-accent-solid);
}

/* Nav */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wf-border);
  padding: var(--space-md) 0;
}

.nav-link {
  font-weight: 500;
  color: var(--wf-text-sub);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--wf-text-main);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-accent {
  background: rgba(239, 68, 68, 0.1);
  color: var(--wf-accent-solid);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-neutral {
  background: var(--wf-bg-hover);
  color: var(--wf-text-sub);
  border: 1px solid var(--wf-border);
}
.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--wf-border);
  border-radius: var(--radius-lg);
  background: var(--wf-bg-sub);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th, .table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--wf-border);
}
.table th {
  background: var(--wf-bg-hover);
  color: var(--wf-text-sub);
  font-weight: 500;
  font-size: 0.875rem;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}
.status-active { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.status-pending { background: #f59e0b; }
.status-offline { background: #ef4444; }

/* Placeholders */
.placeholder-icon {
  width: 24px;
  height: 24px;
  background: currentColor;
  opacity: 0.5;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  display: inline-block;
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
}

/* Dashboard Styles */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--wf-bg-sub);
  border-right: 1px solid var(--wf-border);
  padding: var(--space-lg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.main-content {
  padding: var(--space-xl);
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--wf-text-sub);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background: var(--wf-bg-hover);
  color: var(--wf-text-main);
}

.sidebar-link.active {
  background: rgba(239, 68, 68, 0.1);
  color: var(--wf-accent-solid);
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  background: currentColor;
}

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; } /* Simplified mobile view */
}
