/* ============================================
   DESIGN SYSTEM - Pterodactyl Backup System
   ============================================ */

/* Color Palette */
:root {
  /* Background colors */
  --bg-base: #0a0b0e;
  --bg-surface: #12141a;
  --bg-elevated: #1a1d26;
  --bg-overlay: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.05);

  /* Border colors */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-disabled: #475569;

  /* Accent colors */
  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  --accent-primary-subtle: rgba(99, 102, 241, 0.15);

  --accent-success: #10b981;
  --accent-success-hover: #34d399;
  --accent-success-subtle: rgba(16, 185, 129, 0.15);

  --accent-warning: #f59e0b;
  --accent-warning-hover: #fbbf24;
  --accent-warning-subtle: rgba(245, 158, 11, 0.15);

  --accent-danger: #ef4444;
  --accent-danger-hover: #f87171;
  --accent-danger-subtle: rgba(239, 68, 68, 0.15);

  --accent-info: #06b6d4;
  --accent-info-subtle: rgba(6, 182, 212, 0.15);

  /* Discord color */
  --discord-color: #5865F2;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Border radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
}

/* Scrollbar styling */
.scrollbar-styled::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-styled::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-styled::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

.scrollbar-styled::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  color: var(--text-secondary);
}

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

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

code,
pre {
  font-family: var(--font-mono);
}

code {
  font-size: 0.875em;
  background: var(--bg-overlay);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-xs);
  color: var(--accent-primary);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Primary Button */
.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-overlay);
  color: var(--text-primary);
}

/* Danger Button */
.btn-danger {
  background: var(--accent-danger);
  color: white;
  border-color: var(--accent-danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--accent-danger-hover);
  border-color: var(--accent-danger-hover);
}

/* Success Button */
.btn-success {
  background: var(--accent-success);
  color: white;
  border-color: var(--accent-success);
}

.btn-success:hover:not(:disabled) {
  background: var(--accent-success-hover);
  border-color: var(--accent-success-hover);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

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

.btn-icon {
  padding: var(--space-2);
  width: 36px;
  height: 36px;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  padding: var(--space-1);
}

/* ============================================
   INPUTS
   ============================================ */

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon+.input {
  padding-left: calc(var(--space-4) + 20px + var(--space-2));
}

/* Select */
.select {
  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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: calc(var(--space-3) + 24px);
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.glass-panel {
  background: linear-gradient(145deg, rgba(26, 29, 38, 0.8), rgba(18, 20, 26, 0.9));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

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

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

.card-content {
  padding: var(--space-5);
}

/* ============================================
   BADGES & CHIPS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.badge-success {
  background: var(--accent-success-subtle);
  color: var(--accent-success);
}

.badge-warning {
  background: var(--accent-warning-subtle);
  color: var(--accent-warning);
}

.badge-danger {
  background: var(--accent-danger-subtle);
  color: var(--accent-danger);
}

.badge-info {
  background: var(--accent-info-subtle);
  color: var(--accent-info);
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-badge.role-manager {
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

.role-badge.role-admin {
  background: linear-gradient(135deg, var(--accent-success), #059669);
  color: white;
}

.role-badge.role-none {
  background: var(--bg-overlay);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.status-online {
  background: var(--accent-success-subtle);
  color: var(--accent-success);
}

.status-badge.status-online::before {
  background: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
  animation: pulse-dot 2s infinite;
}

.status-badge.status-offline {
  background: var(--accent-danger-subtle);
  color: var(--accent-danger);
}

.status-badge.status-offline::before {
  background: var(--accent-danger);
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Tier Badges */
.tier-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tier-badge.tier-full_24h {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.tier-badge.tier-world_4h {
  background: var(--accent-success-subtle);
  color: var(--accent-success);
}

.tier-badge.tier-playerdata_2h {
  background: var(--accent-warning-subtle);
  color: var(--accent-warning);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  padding: var(--space-2);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-5);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
}

/* ============================================
   CONTEXT MENU
   ============================================ */

.context-menu {
  position: fixed;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: var(--space-2);
}

.context-menu.hidden {
  display: none;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.context-menu-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.context-menu-item.danger {
  color: var(--accent-danger);
}

.context-menu-item.danger:hover {
  background: var(--accent-danger-subtle);
}

.context-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-2) 0;
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown {
  position: relative;
}

.dropdown-trigger {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-2);
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.dropdown.active .dropdown-menu,
.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

.dropdown-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-2) 0;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-overlay);
}

.table td {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

/* ============================================
   TOASTS
   ============================================ */

.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  min-width: 300px;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.toast.toast-success .toast-icon {
  color: var(--accent-success);
}

.toast.toast-error .toast-icon {
  color: var(--accent-danger);
}

.toast.toast-warning .toast-icon {
  color: var(--accent-warning);
}

.toast.toast-info .toast-icon {
  color: var(--accent-info);
}

/* ============================================
   SKELETONS / LOADING
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-overlay) 25%, var(--bg-hover) 50%, var(--bg-overlay) 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;
  }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-item {
  height: 48px;
  margin-bottom: var(--space-3);
}

.skeleton-list {
  padding: var(--space-2);
}

/* ============================================
   AVATARS
   ============================================ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 300px;
}

.error-state {
  color: var(--accent-danger);
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

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

.text-success {
  color: var(--accent-success);
}

.text-danger {
  color: var(--accent-danger);
}

.text-warning {
  color: var(--accent-warning);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

/* ============================================
   ENHANCED STATUS BADGES (Enterprise Additions)
   ============================================ */

.status-badge.status-healthy {
  background: var(--accent-success-subtle);
  color: var(--accent-success);
}

.status-badge.status-healthy::before {
  background: var(--accent-success);
}

.status-badge.status-warning {
  background: var(--accent-warning-subtle);
  color: var(--accent-warning);
}

.status-badge.status-warning::before {
  background: var(--accent-warning);
  animation: pulse-dot 2s infinite;
}

.status-badge.status-failed,
.status-badge.status-error {
  background: var(--accent-danger-subtle);
  color: var(--accent-danger);
}

.status-badge.status-failed::before,
.status-badge.status-error::before {
  background: var(--accent-danger);
}

.status-badge.status-pending,
.status-badge.status-syncing {
  background: var(--accent-info-subtle);
  color: var(--accent-info);
}

.status-badge.status-pending::before,
.status-badge.status-syncing::before {
  background: var(--accent-info);
  animation: pulse-dot 1s infinite;
}

.status-badge.status-connected {
  background: var(--accent-success-subtle);
  color: var(--accent-success);
}

.status-badge.status-disconnected {
  background: var(--accent-danger-subtle);
  color: var(--accent-danger);
}

/* ============================================
   DANGER ZONE PATTERN
   ============================================ */

.danger-zone {
  background: var(--accent-danger-subtle);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.danger-zone-title {
  color: var(--accent-danger);
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.danger-zone-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.danger-zone .btn-danger {
  margin-top: var(--space-3);
}

/* ============================================
   ENHANCED TABLE STYLES
   ============================================ */

.table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.table th.sortable:hover {
  color: var(--accent-primary);
}

.table th.sortable::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: var(--space-2);
  opacity: 0.3;
  vertical-align: middle;
}

.table th.sorted-asc::after {
  content: '▲';
  opacity: 1;
}

.table th.sorted-desc::after {
  content: '▼';
  opacity: 1;
}

.table tbody tr.selected {
  background: var(--accent-primary-subtle);
}

.table tbody tr.selected:hover {
  background: var(--accent-primary-subtle);
}

/* Row checkbox */
.table-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

/* ============================================
   EMPTY STATE COMPONENT
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  color: var(--text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  max-width: 400px;
  margin: 0 auto var(--space-4);
  font-size: 0.875rem;
}

/* ============================================
   ERROR STATE COMPONENT
   ============================================ */

.error-state {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  color: var(--accent-danger);
}

.error-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
}

.error-state-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

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

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.form-hint {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-error {
  color: var(--accent-danger);
  font-size: 0.75rem;
  margin-top: var(--space-1);
}

.input.input-error {
  border-color: var(--accent-danger);
}

.input.input-error:focus {
  box-shadow: 0 0 0 3px var(--accent-danger-subtle);
}

/* ============================================
   PAGE-SPECIFIC UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.my-4 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

.w-full {
  width: 100%;
}