:root {
  /* Color Palette - Industrial Luxury / Gemstone Inspired */
  --bg-deep: #0a0c10;
  --bg-surface: #14181f;
  --bg-card: #1c222d;
  --accent-primary: #00d2ff; /* Diamond Blue */
  --accent-secondary: #7000ff; /* Royal Purple */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(20, 24, 31, 0.8);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Shadows */
  --shadow-glow: 0 0 20px rgba(0, 210, 255, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Layout */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  text-transform: uppercase;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-link.active {
  color: var(--accent-primary);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

/* Main Content */
main {
  padding: var(--space-lg) clamp(1rem, 5vw, 4rem);
  width: 100%;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.header-title h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.header-title p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

/* UI Components */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-trend {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

/* Tables */
.table-container {
  margin-top: var(--space-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: var(--space-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-blue { background: rgba(0, 210, 255, 0.1); color: var(--accent-primary); }
.badge-purple { background: rgba(112, 0, 255, 0.1); color: var(--accent-secondary); }
.badge-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #000;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* Search Bar */
.search-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 300px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 100%;
}

.search-bar input:focus {
  outline: none;
}

/* Inventory Specifics */
.diamond-spec {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.spec-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.spec-tag-active {
  background: var(--accent-primary);
  color: #000;
}

/* Helper Classes */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.mt-auto { margin-top: auto; }
.mb-md { margin-bottom: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }
.p-0 { padding: 0 !important; }

.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-md);
}

.sidebar-filters {
  padding: 0 var(--space-md);
}

.filter-group {
  margin-bottom: var(--space-md);
}

.filter-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--space-sm);
}

.input-range {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.input-mini {
  width: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: white;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.thumbnail {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
}

/* Placeholders */
.placeholder-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
}

.placeholder-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}
