/* SuperLysa Company Brain - High-Tech Dark Theme */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Background colors */
  --bg-deep: #0a0118;
  --bg-gradient: linear-gradient(135deg, #0a0118 0%, #1a0a2e 50%, #0d1033 100%);
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-hover: rgba(255, 255, 255, 0.06);
  --bg-elevated: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(0, 0, 0, 0.4);
  
  /* Border colors */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(168, 85, 247, 0.5);
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-placeholder: rgba(255, 255, 255, 0.3);
  
  /* Accent colors */
  --accent-purple: #a855f7;
  --accent-purple-hover: #9333ea;
  --accent-purple-glow: rgba(168, 85, 247, 0.4);
  --accent-coral: #f97316;
  --accent-coral-hover: #ea580c;
  --accent-coral-glow: rgba(249, 115, 22, 0.4);
  --accent-green: #22c55e;
  --accent-green-hover: #16a34a;
  --accent-green-glow: rgba(34, 197, 94, 0.4);
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-glow: rgba(239, 68, 68, 0.4);
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-purple: 0 0 20px var(--accent-purple-glow);
  --shadow-glow-coral: 0 0 20px var(--accent-coral-glow);
  --shadow-glow-green: 0 0 20px var(--accent-green-glow);
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-gradient);
  z-index: -2;
}

/* Animated grid overlay for high-tech feel */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}

a {
  color: var(--accent-purple);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-purple-hover);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LAYOUT - APP SHELL
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(10, 1, 24, 0.8);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

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

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-coral));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow-purple);
}

.sidebar-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo-text span {
  color: var(--accent-purple);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) 0;
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
}

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

.nav-item.active {
  background: var(--bg-surface);
  color: var(--accent-purple);
  border-left-color: var(--accent-purple);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-purple);
  box-shadow: var(--shadow-glow-purple);
}

.nav-item i {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.nav-item.active i {
  opacity: 1;
}

.sidebar-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   TOP HEADER
   ============================================ */
.top-header {
  height: var(--header-height);
  background: rgba(10, 1, 24, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-breadcrumb a {
  color: var(--text-muted);
}

.header-breadcrumb a:hover {
  color: var(--accent-purple);
}

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

/* Tenant Switcher */
.tenant-switcher {
  position: relative;
}

.tenant-switcher-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
}

.tenant-switcher-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-purple);
}

.tenant-switcher-btn .tenant-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-purple);
  font-weight: 500;
}

.tenant-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 280px;
  background: rgba(20, 10, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  overflow: hidden;
}

.tenant-dropdown.show {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tenant-dropdown-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.tenant-search {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.tenant-search:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.tenant-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
}

.tenant-dropdown-item {
  padding: var(--space-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tenant-dropdown-item:hover {
  background: var(--bg-surface-hover);
}

.tenant-dropdown-item.active {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-purple);
}

.tenant-dropdown-item .tenant-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.8rem;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.user-menu-btn:hover {
  background: var(--bg-surface-hover);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-purple));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 200px;
  background: rgba(20, 10, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.user-dropdown-item {
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-secondary);
}

.user-dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.user-dropdown-item.danger {
  color: var(--accent-red);
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
  flex: 1;
  padding: var(--space-xl);
  max-width: 1400px;
}

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

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

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

/* ============================================
   CARDS - GLASSMORPHISM
   ============================================ */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-purple);
}

/* Feature Cards (like assistant cards) */
.feature-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.feature-card:hover {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow-purple);
  transform: translateY(-2px);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-glow-purple);
}

.feature-card-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.feature-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.feature-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-hover));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-purple);
  transform: translateY(-1px);
}

.btn-action {
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-coral-hover));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-action:hover {
  box-shadow: var(--shadow-glow-coral);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-hover));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  box-shadow: var(--shadow-glow-green);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 0 20px var(--accent-red-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-purple);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

.btn-icon {
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-label.required::after {
  content: ' *';
  color: var(--accent-red);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-placeholder);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-select option {
  background: var(--bg-deep);
  color: var(--text-primary);
}

/* Checkbox Dropdown Component */
.checkbox-dropdown {
  position: relative;
  width: 100%;
}

.checkbox-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checkbox-dropdown-trigger:hover {
  border-color: var(--accent-purple);
}

.checkbox-dropdown.open .checkbox-dropdown-trigger {
  border-color: var(--accent-purple);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.checkbox-dropdown-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checkbox-dropdown-text.has-selection {
  color: var(--text-primary);
}

.checkbox-dropdown-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.checkbox-dropdown.open .checkbox-dropdown-icon {
  transform: rotate(180deg);
}

.checkbox-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-deep);
  border: 1px solid var(--accent-purple);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  max-height: 250px;
  overflow-y: auto;
}

.checkbox-dropdown.open .checkbox-dropdown-menu {
  display: block;
}

.checkbox-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.checkbox-dropdown-item:hover {
  background: rgba(168, 85, 247, 0.1);
}

.checkbox-dropdown-item input[type="checkbox"] {
  display: none;
}

.checkbox-dropdown-item .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-dropdown-item .checkmark::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent-purple);
  border-radius: 2px;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition-fast);
}

.checkbox-dropdown-item input:checked + .checkmark {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
}

.checkbox-dropdown-item input:checked + .checkmark::after {
  opacity: 1;
  transform: scale(1);
}

.checkbox-dropdown-item input:checked ~ span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

/* Checkbox Grid - for multi-select options */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.checkbox-grid .form-checkbox {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.checkbox-grid .form-checkbox:hover {
  background: var(--bg-surface-hover);
}

.checkbox-grid .form-checkbox:has(input:checked) {
  background: rgba(168, 85, 247, 0.15);
  box-shadow: inset 0 0 0 1px var(--accent-purple);
}

.checkbox-grid .form-checkbox span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checkbox-grid .form-checkbox:has(input:checked) span {
  color: var(--text-primary);
}

/* Form help text with icons */
.form-help {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.form-help i {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ============================================
   DATA TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.data-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.data-table .cell-title {
  font-weight: 500;
  color: var(--text-primary);
}

.data-table .cell-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.data-table .cell-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ============================================
   BADGES & STATUS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.badge-draft {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.3);
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.badge-archived {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.3);
}

.badge-type {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.3);
}

.badge-role-superadmin {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.3);
}

.badge-role-admin {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.3);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: none;
  align-items: center;
  gap: var(--space-md);
}

.alert.show {
  display: flex;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  align-items: flex-end;
}

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

.filter-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  min-width: 150px;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-lg);
}

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

.pagination-buttons {
  display: flex;
  gap: var(--space-sm);
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  overflow-x: auto;
  position: relative;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.copy-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   STEP WIZARD
   ============================================ */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

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

.wizard-step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.wizard-step.active .wizard-step-number {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
  box-shadow: var(--shadow-glow-purple);
}

.wizard-step.completed .wizard-step-number {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

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

.wizard-step.active .wizard-step-label {
  color: var(--text-primary);
}

.wizard-connector {
  flex: 1;
  height: 2px;
  background: var(--border-default);
  margin: 0 var(--space-sm);
}

.wizard-connector.completed {
  background: var(--accent-green);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-coral));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  box-shadow: var(--shadow-glow-purple);
}

.login-logo i {
  width: 32px;
  height: 32px;
  color: white;
}

.login-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: var(--space-md);
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group input,
  .filter-group select {
    width: 100%;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.font-medium { font-weight: 500; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
