@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #11111a;
  --bg-tertiary: #171725;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-emerald: #059669;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  
  --glow-indigo: rgba(99, 102, 241, 0.15);
  --glow-emerald: rgba(16, 185, 129, 0.15);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --sidebar-width: 260px;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

/* Sidebar Layout */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 10;
  flex-shrink: 0;
}

.logo-section {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite linear;
}

@keyframes shine {
  0% { transform: translate(-50%, -50%) rotate(45deg); }
  100% { transform: translate(50%, 50%) rotate(45deg); }
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  gap: 12px;
  border: 1px solid transparent;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-item:hover svg {
  stroke: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.02));
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
}

.nav-item.active svg {
  stroke: var(--accent-indigo);
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.1);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Content Area Layout */
.main-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100vh;
  overflow: hidden;
}

.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}

.header-search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
  width: 480px;
  gap: 12px;
  transition: all 0.3s ease;
}

.header-search-bar:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.header-search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  font-size: 0.9rem;
  width: 100%;
}

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

.header-search-bar svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  stroke-width: 2.5;
  fill: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  filter: brightness(1.1);
}

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

.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* Dashboard Content Grid */
.content-body {
  padding: 32px;
  overflow-y: auto;
  flex-grow: 1;
  background-color: var(--bg-primary);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Page Header Title */
.pane-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pane-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pane-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Dashboard Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.card.glow-indigo:hover::before { background: var(--accent-indigo); }
.card.glow-emerald:hover::before { background: var(--accent-green); }
.card.glow-purple:hover::before { background: var(--accent-purple); }
.card.glow-amber:hover::before { background: var(--accent-amber); }

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

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-desc span {
  font-weight: 600;
}

.trend-up { color: var(--accent-green); }
.trend-down { color: var(--accent-red); }

.card-icon-container {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.card-icon-container svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-indigo);
  stroke-width: 2;
  fill: none;
}

/* Visualization split pane layout */
.split-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.split-left, .split-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Panel Design */
.panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

/* Tree visualization structure for Discovery page */
.discovery-container {
  min-height: 450px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  overflow: auto;
  position: relative;
}

.node-group {
  margin-left: 28px;
  border-left: 1px dashed rgba(255, 255, 255, 0.1);
  padding-left: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
  max-width: 100%;
  gap: 10px;
  position: relative;
}

.node-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  width: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.node-item:hover {
  border-color: var(--accent-indigo);
  transform: translateX(4px);
  background-color: var(--bg-tertiary);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1);
}

.node-item.active {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.08);
}

.node-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke-width: 2;
}

.node-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.node-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.crawler-progress-bar {
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.crawler-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-indigo), var(--accent-purple));
  width: 0%;
  transition: width 0.2s ease;
}

/* User Journey Map styling */
.journey-canvas {
  padding: 30px;
  background-color: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.journey-flow {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 140px;
  position: relative;
}

.journey-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  z-index: 2;
  cursor: pointer;
}

.journey-circle:hover {
  border-color: var(--accent-indigo);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.journey-circle.active {
  border-color: var(--accent-indigo);
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.journey-arrow {
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, var(--accent-indigo), var(--accent-purple));
  position: relative;
  z-index: 1;
}

.journey-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -4px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--accent-purple);
}

.journey-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.journey-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* GTM Spec Code Display Styling */
.code-container {
  position: relative;
  border-radius: 8px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.code-header {
  background-color: var(--bg-tertiary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-lang {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.code-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.code-copy-btn:hover {
  color: var(--text-primary);
}

.code-block {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #38bdf8;
  overflow: auto;
  max-height: 400px;
}

/* Variable / Trigger Spec Tables */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.spec-table th, .spec-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.spec-table th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.spec-table td {
  font-size: 0.9rem;
}

.spec-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.tag-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-badge.tag-ga4 { background-color: rgba(249, 115, 22, 0.15); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.3); }
.tag-badge.tag-gads { background-color: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-badge.tag-meta { background-color: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-badge.tag-linkedin { background-color: rgba(2, 132, 199, 0.15); color: #7dd3fc; border: 1px solid rgba(2, 132, 199, 0.3); }
.tag-badge.tag-custom { background-color: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Attribution Slider Dashboard Styling */
.attribution-control-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--bg-tertiary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

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

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}

.slider-input {
  width: 100%;
  -webkit-appearance: none;
  background: var(--bg-primary);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-indigo);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: center;
  gap: 16px;
}

.chart-bar-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
}

.chart-bar-track {
  height: 18px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-indigo), var(--accent-blue));
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.chart-bar-value {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Interactive Copilot Chat Panel */
.copilot-terminal {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: 380px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.copilot-feed {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-bubble.user {
  background-color: var(--accent-indigo);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-bubble.system {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.copilot-input-area {
  padding: 12px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.copilot-input-area input {
  flex-grow: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.copilot-input-area input:focus {
  border-color: var(--accent-indigo);
}

/* Auditor checklist styles */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  padding: 14px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  gap: 12px;
}

.audit-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audit-status.warning { background-color: rgba(245, 158, 11, 0.15); color: #fbd38d; border: 1px solid rgba(245, 158, 11, 0.3); }
.audit-status.error { background-color: rgba(239, 68, 68, 0.15); color: #feb2b2; border: 1px solid rgba(239, 68, 68, 0.3); }
.audit-status.success { background-color: rgba(16, 185, 129, 0.15); color: #9ae6b4; border: 1px solid rgba(16, 185, 129, 0.3); }

.audit-content {
  flex-grow: 1;
}

.audit-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.audit-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.audit-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.btn-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-pill.primary {
  background-color: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.3);
}

.btn-pill.primary:hover {
  background-color: var(--accent-indigo);
  color: white;
}

/* Custom visual utilities */
.flex-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-gradient {
  background: linear-gradient(to right, var(--accent-indigo), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Clickable Cards & Modal overlays */
.clickable-card {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clickable-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-indigo);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 960px;
  max-width: 90%;
  max-height: 85vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: slideInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

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

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background-color: var(--bg-tertiary);
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.control-search {
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 12px;
  width: 280px;
  gap: 8px;
}

.control-search input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  font-size: 0.85rem;
  width: 100%;
}

.control-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-group select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.filter-group select:focus {
  border-color: var(--accent-indigo);
}

.modal-table-container {
  overflow-y: auto;
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-primary);
  position: relative;
  min-height: 200px;
}

.modal-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

