/* FileFlow - Modern Glassmorphism Design System */

/* CSS Variables for consistent theming */
:root {
  /* Glassmorphism Colors */
  --glass-white: rgba(255, 255, 255, 0.35);
  --glass-white-strong: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: rgba(31, 38, 135, 0.37);
  
  /* Background Gradients */
  --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --bg-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Text Colors */
  --text-primary: #1a202c;
  --text-secondary: #2d3748;
  --text-muted: #4a5568;
  --text-white: #ffffff;
  --text-contrast: #2d3748;
  --text-light: rgba(45, 55, 72, 0.9);
  
  /* Status Colors */
  --status-new: #48bb78;
  --status-progress: #ed8936;
  --status-completed: #4299e1;
  --status-error: #f56565;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% 200%;
  animation: gradient-shift 30s ease infinite;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background - AI Neural Network Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: -2;
}

/* Document Flow Animation Layer */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(120, 199, 255, 0.15) 0%, transparent 40%);
  z-index: -1;
}

/* Floating particles */
@keyframes float-up {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
    transform: translateY(85vh) translateX(10px) scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translateY(50vh) translateX(-20px) scale(1);
  }
  90% {
    opacity: 0.5;
    transform: translateY(15vh) translateX(30px) scale(0.8);
  }
  100% {
    transform: translateY(-10vh) translateX(40px) scale(0);
    opacity: 0;
  }
}

/* Gradient shift animation for background */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Glass Morphism Effect */
.glass {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.glass-strong {
  background: var(--glass-white-strong);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

/* Glass reflections */
.glass::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 40%,
    transparent 100%
  );
  pointer-events: none;
}

/* Subtle inner glow */
.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* Main Container */
.container {
  width: 75%;
  max-width: none;
  margin: 0 auto;
  padding: var(--spacing-lg);
  min-height: 100vh;
}

/* Table Sorting - Unified */
.sortable-table th[data-column] {
  position: relative;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sortable-table th[data-column]:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sortable-table th.sorted {
  color: var(--status-completed);
}

.page-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md) 0;
  position: relative;
  z-index: 1;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
}

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

.header .logo img {
  height: 2rem;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.header .subtitle {
  font-size: 0.75rem;
  color: var(--text-white);
  font-weight: 400;
  margin-left: var(--spacing-sm);
}

/* Page Header - Unified for all pages */
.page-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 25px 35px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.3), 0 2px 8px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Header Glow Effect */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79, 172, 254, 0.8), rgba(240, 147, 251, 0.8), transparent);
  animation: header-glow 3s ease-in-out infinite;
}

@keyframes header-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Brand Section */
.brand-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-icon {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-symbol {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
  animation: logo-glow 3s ease-in-out infinite;
}

.logo-circle::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.logo-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

@keyframes logo-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 30px rgba(79, 172, 254, 0.6);
    transform: scale(1.02);
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.brand-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.title-file {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(79, 172, 254, 0.5);
}

.title-flow {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
  margin-left: -2px;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}


.subtitle-accent {
  color: rgba(79, 172, 254, 0.9);
  font-weight: 500;
}


.page-nav {
  display: flex;
  gap: 15px;
}

/* Remove duplicate nav-button styles */


/* Project Tabs */
.project-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
  padding: var(--spacing-sm) 0;
  position: relative;
  z-index: 2;
}

.project-tabs::-webkit-scrollbar {
  height: 4px;
}

.project-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.project-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
}

.project-tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  background: var(--glass-white);
  border: 1px solid var(--glass-border);
  color: var(--text-contrast);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  transition: all var(--transition-medium);
  cursor: pointer;
  backdrop-filter: blur(20px);
  height: 42px;
}

.project-tab:hover {
  background: var(--glass-white-strong);
  transform: translateY(-2px);
}

.project-tab.active {
  background: var(--glass-white-strong);
  box-shadow: 0 2px 8px rgba(31, 38, 135, 0.1);
}

.project-tab .close-btn {
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px;
  transition: all var(--transition-fast);
}

.project-tab .close-btn:hover {
  color: var(--status-error);
  text-shadow: 0 0 8px var(--status-error);
}

.add-project-btn {
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  background: var(--glass-white);
  border: 1px solid var(--glass-border);
  color: var(--text-contrast);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  backdrop-filter: blur(20px);
}

.add-project-btn:hover {
  background: var(--glass-white-strong);
  transform: translateY(-2px);
}

/* Dashboard */
.dashboard {
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-xl);
}

/* Search and Action Bar */
.search-action-bar {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
  margin-bottom: var(--spacing-lg);
  margin-top: 0;
}

/* Search Container */
.search-container {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) calc(var(--spacing-xl) + 20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  font-size: 1rem;
  transition: all var(--transition-medium);
  backdrop-filter: blur(20px);
  height: 42px;
  box-sizing: border-box;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Action Buttons Container */
.action-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Navigation Buttons */
.nav-button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  height: 42px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-button:hover::before {
  left: 100%;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  white-space: nowrap;
  text-decoration: none;
  height: 42px;
}

.btn-primary {
  background: var(--bg-accent);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-secondary {
  background: var(--glass-white);
  color: var(--text-contrast);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.btn-secondary:hover {
  background: var(--glass-white-strong);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--status-error);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 101, 101, 0.6);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.8);
}

.empty-state h3 {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  color: white;
}

.empty-state p {
  margin: 0;
  opacity: 0.8;
}

/* Main Content Wrapper */
.main-content-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Calculate exact position for AI sidebar */
.main-content-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 1px;
  z-index: -1;
}

/* Main Content (Left Side) */
.main-content {
  width: 100%;
  margin-right: 0;
}

/* Table Container - Unified for all tables */
.table-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  width: 100%;
  position: relative;
}

/* AI Sidebar - NEUE CSS */
.ai-sidebar {
  position: fixed;
  width: 300px;
  height: 50vh;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  z-index: 10;
}

/* AI Sidebar Content Scrolling */
.ai-sidebar .ai-sidebar-content {
  max-height: calc(100% - 56px); /* Header height */
  overflow-y: auto;
}

.ai-sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px 16px 0 0;
}

.ai-sidebar-header h3 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.ai-clear-all-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-clear-all-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.ai-sidebar-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-result-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ai-result-empty .empty-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.ai-result-empty p {
  margin: 0;
  line-height: 1.4;
}

/* Data Table */
.table-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

/* Enhanced scrollbar for table container */
.table-container::-webkit-scrollbar {
  height: 12px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  margin: 0 var(--radius-lg);
}

.table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.6), rgba(240, 147, 251, 0.6));
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all var(--transition-medium);
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.8), rgba(240, 147, 251, 0.8));
  transform: scaleY(1.2);
}

/* Scroll indicators */
.table-container::before,
.table-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 10;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.table-container::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
}

.table-container::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
}

.table-container.scrollable-left::before {
  opacity: 1;
}

.table-container.scrollable-right::after {
  opacity: 1;
}

/* Drag scrolling states */
.table-container {
  cursor: grab;
  user-select: none;
}

.table-container.dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
}

.table-container.dragging .data-table {
  pointer-events: none;
  user-select: none;
}

.table-container.dragging button,
.table-container.dragging .status-badge,
.table-container.dragging .action-btn {
  pointer-events: auto;
}

/* Table header should remain clickable for sorting */
.table-container thead,
.table-container th {
  cursor: pointer !important;
  user-select: none;
}

.table-container.dragging thead,
.table-container.dragging th {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.data-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background: transparent;
}

.data-table thead {
  background: transparent;
}

.data-table thead tr:first-child th:first-child {
  border-top-left-radius: 0;
}

.data-table thead tr:first-child th:last-child {
  border-top-right-radius: 0;
}

.data-table th {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  min-width: 120px;
  white-space: nowrap;
}

/* Action columns (Edit and Delete) should be wider for better centering */
.data-table th.action-column {
  min-width: 80px;
  width: 80px;
  max-width: 80px;
  padding: 15px 10px;
  text-align: center;
}

.data-table th:hover {
  background: rgba(255, 255, 255, 0.15);
}

.data-table th.sorted {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

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

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.data-table td {
  color: white;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Action cells should match action column width */
.data-table td:nth-last-child(-n+2) {
  min-width: 80px;
  width: 80px;
  max-width: 80px;
  padding: 15px 10px;
  text-align: center;
}

/* Status Badges - Using btn-glass base */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all var(--transition-medium);
  font-size: 13px;
  font-weight: 500;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 36px;
}

.status-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}


/* Unified Button Styles */
.btn-glass {
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-glass.danger {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.3);
}

.btn-glass.danger:hover {
  background: rgba(255, 59, 48, 0.3);
}

/* Admin Table Button Styles */
.table-sortable td .btn-glass {
  width: 90px;
  height: 36px;
  padding: 6px 12px;
  font-size: 14px;
  margin: 0 4px;
}

/* AI Button */
.ai-button {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-white);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(240, 147, 251, 0.4);
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ai-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(240, 147, 251, 0.6);
}

.ai-button.processing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Modals - Unified Design System */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

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

.modal-content {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 95vw;
  width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform var(--transition-medium);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(240, 147, 251, 0.1);
  overflow: hidden;
}

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

/* Modal Header - Sticky */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

/* Modal Body - Scrollable Content */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  
  /* Custom Scrollbar - Elegant Design */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Webkit Scrollbar Styling */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin: 10px 0;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Modal Title - Unified Typography */
.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
}

/* Modal Close Button */
.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.modal-close:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.3);
  transform: scale(1.05);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: white;
}

.form-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  color: white;
  font-size: 1rem;
  transition: all var(--transition-medium);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Select dropdown styling */
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' 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 0.7rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

select.form-input option {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Modal Typography & Readability */
.modal-body p,
.modal-body .description-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-body h3,
.form-section-title {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

/* Enhanced readability for lists in modals */
.modal-body ul,
.modal-body ol {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.7;
  padding-left: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* AI Response Cards - Updated for sidebar */
.ai-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translateY(0);
  animation: slideInFromBottom 0.3s forwards;
}

.ai-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.ai-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ai-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  flex: 1;
}

.ai-card-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-card-close:hover {
  color: #ff3b30;
}

.ai-card-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.4;
  max-height: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

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

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 1s ease-in-out infinite;
}

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

/* Progress Modal - Unified Dark Theme */
.progress-modal .modal-content {
  min-width: 500px;
  text-align: center;
  /* Use same dark background as other modals */
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(240, 147, 251, 0.1);
}

/* Progress modal uses default modal-header styles */

/* Progress modal title - ensure visibility */
.progress-modal .modal-title {
  color: var(--text-white);
  font-weight: 600;
}

.progress-info {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bg-accent) 0%, #5a7fff 50%, var(--bg-accent) 100%);
  background-size: 200% 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  position: relative;
  animation: gradientMove 3s ease infinite;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#progress-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: var(--spacing-sm);
}

#progress-cost {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

#progress-cost::before {
  content: '€';
  font-size: 1.2rem;
  color: var(--bg-accent);
  font-weight: 600;
}

#progress-eta {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.progress-modal .modal-close {
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.progress-modal .modal-close:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.progress-fill.complete {
  animation: completeFlash 0.6s ease;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.6);
}

.progress-fill.rate-limited {
  background: linear-gradient(90deg, #ff8c00 0%, #ffa500 50%, #ff8c00 100%);
  animation: rateLimitPulse 2s ease-in-out infinite;
}

@keyframes rateLimitPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes completeFlash {
  0%, 100% { 
    filter: brightness(1);
    transform: scaleY(1);
  }
  50% { 
    filter: brightness(1.3);
    transform: scaleY(1.1);
  }
}

/* Processing Animation for Edit Modal */
.processing-modal .modal-content {
  animation: modalPulse 2s ease-in-out infinite;
}

@keyframes modalPulse {
  0%, 100% { 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content-wrapper {
    max-width: none;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    margin-right: 0; /* Reset margin from large screen styles */
  }
}

@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }
  
  .brand-section {
    gap: 15px;
  }
  
  .brand-icon {
    width: 50px;
    height: 50px;
  }
  
  .logo-circle {
    width: 40px;
    height: 40px;
  }
  
  .logo-svg {
    width: 20px;
    height: 20px;
  }
  
  .brand-title {
    font-size: 2rem;
  }
  
  .brand-subtitle {
    font-size: 0.8rem;
  }
  
  .page-nav {
    gap: 10px;
  }
  
  .nav-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    min-height: 40px;
  }
  
  .project-tabs {
    margin-bottom: var(--spacing-lg);
  }
  
  .dashboard {
    padding: var(--spacing-lg);
  }
  
  .data-table {
    font-size: 0.875rem;
  }
  
  .data-table th,
  .data-table td {
    padding: var(--spacing-sm);
  }
  
  .main-content-wrapper {
    gap: 15px;
  }
  
  .ai-sidebar {
    padding: 15px;
  }
  
  .ai-sidebar-content {
    padding: 15px;
  }
  
  .search-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .action-buttons {
    justify-content: center;
  }
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  background: var(--glass-white-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
  color: var(--text-contrast);
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  transform: translateX(100%);
  transition: all var(--transition-medium);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-success {
  border-color: var(--status-new);
  background: rgba(72, 187, 120, 0.2);
}

.notification-error {
  border-color: var(--status-error);
  background: rgba(245, 101, 101, 0.2);
}

.notification-info {
  border-color: var(--status-completed);
  background: rgba(66, 153, 225, 0.2);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.hidden { display: none; }
.visible { display: block; }

/* Neural Network Background Animation */
.neural-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Floating Documents Animation - Simplified */
.doc-particle {
  position: absolute;
  width: 40px;
  height: 52px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  animation: doc-float var(--animation-duration, 25s) var(--animation-delay, 0s) infinite linear;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
  left: var(--doc-position, 10%);
}

.doc-particle::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 0 rgba(255, 255, 255, 0.3), 0 16px 0 rgba(255, 255, 255, 0.3);
}

@keyframes doc-float {
  0% {
    transform: translateY(120vh) rotate(0deg) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: translateY(100vh) rotate(20deg) scale(1);
  }
  90% {
    opacity: 0.6;
    transform: translateY(-20vh) rotate(360deg) scale(1);
  }
  100% {
    transform: translateY(-40vh) rotate(380deg) scale(0);
    opacity: 0;
  }
}

/* Neural Connection Lines - Simplified */
.neural-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 172, 254, 0.6), transparent);
  animation: neural-pulse 4s var(--line-delay, 0s) infinite;
  transform-origin: left center;
  width: var(--line-width, 300px);
  transform: rotate(var(--line-rotate, 0deg));
}

@keyframes neural-pulse {
  0%, 100% {
    opacity: 0;
    transform: scaleX(0) translateX(-50%);
  }
  50% {
    opacity: 1;
    transform: scaleX(1) translateX(0);
  }
}

/* AI Processing Nodes - Simplified */
.ai-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(240, 147, 251, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  animation: node-pulse 3s var(--node-delay, 0s) infinite;
}

.ai-node::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(240, 147, 251, 0.2);
  border-radius: 50%;
  animation: node-ring 3s var(--node-delay, 0s) infinite;
}

@keyframes node-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

@keyframes node-ring {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Data Stream Animation - Simplified */
.data-stream {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(79, 172, 254, 0.4), transparent);
  animation: data-flow 8s var(--stream-delay, 0s) infinite linear;
  left: var(--stream-position, 15%);
}

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

/* Binary Rain Effect - Simplified */
.binary-text {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: rgba(79, 172, 254, 0.3);
  animation: binary-fall 15s var(--binary-delay, 0s) infinite linear;
  user-select: none;
  left: var(--binary-position, 5%);
}

@keyframes binary-fall {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Glowing Grid Pattern */
.grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100px 100px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100px, 100px);
  }
}

/* Add HTML structure for background */
.neural-bg::before {
  content: '010110010101';
  position: absolute;
  font-family: monospace;
  font-size: 10px;
  color: rgba(79, 172, 254, 0.2);
  top: 10%;
  left: 5%;
  animation: binary-fall 12s infinite linear;
}

/* AI Sidebar Scrollbar Styling */
.ai-sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.ai-sidebar-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.ai-sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.ai-sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Remove Column/Status Button Fixes */
.remove-column, .remove-status {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 2px;
  transition: all var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.remove-column:hover, .remove-status:hover {
  color: var(--status-error);
  background: rgba(255, 255, 255, 0.1);
}

/* Form Layout Improvements */
.form-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.form-section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--bg-accent);
  border-radius: 2px;
}

.column-definition {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.column-definition:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.column-header {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.column-definition input[type="text"] {
  font-weight: 600;
  flex: 1;
}

.column-definition textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}


.status-option {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.status-option input {
  flex: 1;
}

.status-option .remove-status {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 50%;
}

.status-option .remove-status:hover {
  color: var(--status-error);
  background: rgba(255, 255, 255, 0.1);
}

#columns-container,
#status-options-container {
  margin-bottom: var(--spacing-md);
}

.add-section-btn {
  width: 100%;
  background: rgba(79, 172, 254, 0.1);
  border: 1px solid rgba(79, 172, 254, 0.2);
  color: rgba(79, 172, 254, 0.9);
}

.add-section-btn:hover {
  background: rgba(79, 172, 254, 0.2);
  border-color: rgba(79, 172, 254, 0.3);
  color: #4facfe;
}

.form-actions {
  display: flex !important;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

/* Admin Page Specific Styles */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.table-header h2 {
  margin: 0;
  color: white;
  font-size: 1.5em;
}

.user-count {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

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

.table-sortable th {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.table-sortable th:last-child {
  padding-right: 25px;
}

.table-sortable td {
  color: white;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.table-sortable tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 500;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 42px;
}

.badge.pending {
  background: rgba(255, 149, 0, 0.2);
  color: #ff9500;
  border-color: rgba(255, 149, 0, 0.3);
}

.badge.pending:hover {
  background: rgba(255, 149, 0, 0.3);
  transform: translateY(-1px);
}

.badge.active {
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
  border-color: rgba(52, 199, 89, 0.3);
}

.badge.active:hover {
  background: rgba(52, 199, 89, 0.3);
  transform: translateY(-1px);
}

.badge.admin,
.badge.user {
  background: rgba(142, 142, 147, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(142, 142, 147, 0.3);
}

.badge.admin:hover,
.badge.user:hover {
  background: rgba(142, 142, 147, 0.3);
  transform: translateY(-1px);
}

.badge:active {
  transform: translateY(-1px);
  box-shadow: none;
}

/* Remove duplicate action-button styles - use btn-glass instead */

/* Removed password-modal styles - using unified .modal class */

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.modal-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-button {
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.modal-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-button.primary {
  background: rgba(52, 199, 89, 0.2);
  border-color: rgba(52, 199, 89, 0.3);
}

.modal-button.primary:hover {
  background: rgba(52, 199, 89, 0.3);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.4);
  transform: translateX(120%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 15px;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  font-size: 24px;
  min-width: 30px;
  text-align: center;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: white;
  margin-bottom: 5px;
  font-size: 16px;
}

.toast-message {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

.toast.success {
  border-color: rgba(52, 199, 89, 0.4);
  background: rgba(52, 199, 89, 0.15);
}

.toast.success .toast-icon {
  color: #34c759;
}

.toast.error {
  border-color: rgba(255, 59, 48, 0.4);
  background: rgba(255, 59, 48, 0.15);
}

.toast.error .toast-icon {
  color: #ff3b30;
}

.toast.warning {
  border-color: rgba(255, 149, 0, 0.4);
  background: rgba(255, 149, 0, 0.15);
}

.toast.warning .toast-icon {
  color: #ff9500;
}

.toast.info {
  border-color: rgba(0, 122, 255, 0.4);
  background: rgba(0, 122, 255, 0.15);
}

.toast.info .toast-icon {
  color: #007aff;
}

/* Confirmation Dialog */
.confirm-dialog {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(240, 147, 251, 0.1);
}

.confirm-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: #ff9500;
}

.confirm-dialog h3 {
  color: white;
  margin-bottom: 15px;
  font-size: 20px;
}

.confirm-dialog p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.confirm-button {
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
  min-width: 100px;
}

.confirm-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.confirm-button.danger {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.3);
}

.confirm-button.danger:hover {
  background: rgba(255, 59, 48, 0.3);
  box-shadow: 0 4px 20px rgba(255, 59, 48, 0.3);
}

/* Login Page Specific Styles */
.auth-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

.auth-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5em;
}

.auth-header p {
  margin: 0;
  opacity: 0.9;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .form-group label {
  color: white;
  font-weight: 500;
}

.auth-form .form-group input {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
}

.auth-form .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.auth-form .form-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Auth Toggle */
.auth-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 30px;
  overflow: hidden;
}

.toggle-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.toggle-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

/* Toast Container */
.modal-content textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 1rem;
}

.modal-content .form-actions {
    justify-content: flex-end;
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#toast-container > * {
  pointer-events: auto;
}

/* JavaScript Dynamic Styles */
/* Modal overflow control */
body.modal-open {
  overflow: hidden;
}

/* Progress bar dynamic width - controlled via CSS variable */
.progress-fill[style*="--progress-width"] {
  width: var(--progress-width, 0%);
}

/* AI Card animations */
@keyframes slideOut {
  from { 
    transform: translateY(0);
    opacity: 1;
  }
  to { 
    transform: translateY(-20px);
    opacity: 0;
  }
}

.ai-card.removing {
  animation: slideOut 0.3s forwards;
}

/* Table cell alignment */
.text-center {
  text-align: center !important;
}

/* Drag scrolling cursor states */
.table-container.grabbing {
  cursor: grabbing !important;
}

/* Empty state visibility */
.empty-state.show {
  display: block !important;
}

.empty-state.hide {
  display: none !important;
}

/* Unified Button System for Modals */
.btn {
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Button Variants */
.btn.btn-primary {
  background: rgba(240, 147, 251, 0.15);
  border-color: rgba(240, 147, 251, 0.3);
  color: rgba(240, 147, 251, 0.95);
}

.btn.btn-primary:hover {
  background: rgba(240, 147, 251, 0.25);
  border-color: rgba(240, 147, 251, 0.4);
  box-shadow: 0 2px 12px rgba(240, 147, 251, 0.2);
}

.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.btn.btn-danger {
  background: rgba(255, 59, 48, 0.15);
  border-color: rgba(255, 59, 48, 0.3);
  color: rgba(255, 59, 48, 0.95);
}

.btn.btn-danger:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: rgba(255, 59, 48, 0.4);
  box-shadow: 0 2px 12px rgba(255, 59, 48, 0.2);
}

/* Button Sizes */
.btn.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.btn.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Modal-specific Form Styles */
.modal-body .form-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-body .form-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(240, 147, 251, 0.3);
}

/* Modal Select Dropdown Styling */
.modal-body select.form-input {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.modal-body select.form-input:focus {
  background-color: rgba(255, 255, 255, 0.08);
}

.modal-body select.form-input option {
  background-color: #1a1a2e;
  color: rgba(255, 255, 255, 0.9);
  padding: 10px;
}

.modal-body select.form-input option:hover {
  background-color: rgba(79, 172, 254, 0.2);
}

/* Modal Size Variants */
.modal-content.modal-sm {
  width: 400px;
}

.modal-content.modal-lg {
  width: 1000px;
}

/* AI Response Modal - Markdown Styling */
#ai-response-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  line-height: 1.7;
}

#ai-response-content h1,
#ai-response-content h2,
#ai-response-content h3,
#ai-response-content h4,
#ai-response-content h5,
#ai-response-content h6 {
  color: rgba(255, 255, 255, 0.95);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

#ai-response-content h1 { font-size: 1.75rem; }
#ai-response-content h2 { font-size: 1.5rem; }
#ai-response-content h3 { font-size: 1.25rem; }
#ai-response-content h4 { font-size: 1.125rem; }
#ai-response-content h5 { font-size: 1rem; }
#ai-response-content h6 { font-size: 0.875rem; }

#ai-response-content p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

#ai-response-content ul,
#ai-response-content ol {
  color: rgba(255, 255, 255, 0.85);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

#ai-response-content li {
  margin-bottom: 0.5rem;
}

#ai-response-content code {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: rgba(240, 147, 251, 0.9);
}

#ai-response-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

#ai-response-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
  display: block;
}

#ai-response-content blockquote {
  border-left: 4px solid rgba(240, 147, 251, 0.5);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

#ai-response-content a {
  color: rgba(79, 172, 254, 0.9);
  text-decoration: underline;
  transition: color 0.3s ease;
}

#ai-response-content a:hover {
  color: rgba(79, 172, 254, 1);
}

#ai-response-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

#ai-response-content th,
#ai-response-content td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  text-align: left;
}

#ai-response-content th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

#ai-response-content td {
  color: rgba(255, 255, 255, 0.85);
}

#ai-response-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem 0;
}

#ai-response-content strong,
#ai-response-content b {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

#ai-response-content em,
#ai-response-content i {
  font-style: italic;
}