/* ========================================
   AHDDi AI Platform - Global Styles
   Dark Tech Theme with Purple-Blue Gradients
   ======================================== */

/* CSS Variables */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #a855f7;
  --accent: #3b82f6;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263449;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #334155;
  --border-light: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ===== Glassmorphism ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Gradients ===== */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover {
  box-shadow: 0 4px 25px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
}

.bg-gradient-card {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.04));
}

.border-gradient {
  border: 1px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.2)) border-box;
}

/* ===== Animated Background ===== */
.animated-bg {
  position: relative;
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-2%, 2%) rotate(0.5deg); }
  66% { transform: translate(2%, -1%) rotate(-0.5deg); }
}

/* ===== Glow Effects ===== */
.glow-purple {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15), 0 0 60px rgba(168, 85, 247, 0.08);
}

.glow-ring {
  position: relative;
}

.glow-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.glow-ring:hover::after {
  opacity: 0.5;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.card-hover {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.card-hover:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 12px;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 16px;
  border-radius: var(--radius);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Inputs ===== */
.input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

/* ===== Tags & Badges ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.tag-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.tag-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.tag-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
}

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

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

.animate-scaleIn {
  animation: scaleIn 0.3s ease forwards;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ===== Loader ===== */
.loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* ===== Dividers ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 1.5rem 0;
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
}

.admin-sidebar {
  background: #1e293b;
  border-right: 1px solid #334155;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.sidebar-link.active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  font-weight: 500;
}

.sidebar-link.active svg {
  color: #818cf8;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  background: rgba(15, 23, 42, 0.8);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.modal-lg {
  max-width: 700px;
}

/* ===== Tooltip ===== */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.625rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 280px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-lg);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(100%); }
}

.toast-success {
  background: #064e3b;
  border: 1px solid var(--success);
  color: #34d399;
}

.toast-error {
  background: #450a0a;
  border: 1px solid var(--danger);
  color: #f87171;
}

.toast-warning {
  background: #451a03;
  border: 1px solid var(--warning);
  color: #fbbf24;
}

.toast-info {
  background: #0c4a6e;
  border: 1px solid var(--info);
  color: #67e8f9;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .sidebar,
  #sidebar.sidebar-white {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left 0.3s ease;
    width: min(72vw, 280px) !important;
    max-width: 280px;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.14);
  }

  .sidebar.open,
  #sidebar.sidebar-white.open {
    left: 0;
  }

  .admin-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left 0.3s ease;
    width: min(72vw, 280px) !important;
    max-width: 280px;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.14);
  }

  .admin-sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
  }

  .sidebar-overlay.show {
    display: block;
  }

  #sidebar.sidebar-white nav {
    padding: 1rem;
  }

  #sidebar.sidebar-white .sidebar-link-w {
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    gap: 0.75rem;
    border-radius: 10px;
    line-height: 1.2;
  }

  #sidebar.sidebar-white .sidebar-link-w svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: block;
  }

  #sidebar.sidebar-white .sidebar-link-w.active {
    background: #eef2ff;
    color: #4f46e5;
  }

  #sidebar.sidebar-white .sidebar-link-w:hover {
    background: #f8fafc;
  }

  #sidebar.sidebar-white .border-t {
    padding: 1rem;
  }
}

/* ===== Utilities ===== */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image skeleton loading */
.img-skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, #263449 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Star field effect for hero */
.star-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: var(--max-opacity); }
}

/* ========== Dashboard Specific ========== */
.generation-workspace {
  min-height: calc(100vh - 2rem);
}

.param-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.param-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.param-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Status indicator */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
  background: var(--danger);
}

.status-dot.pending {
  background: var(--warning);
}

/* Checkbox & Radio */
.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Switch toggle */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: var(--primary);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch.on::after {
  transform: translateX(18px);
}

/* Captcha image */
.captcha-img {
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
}

.captcha-img:hover {
  opacity: 0.8;
}

/* Pricing card highlight */
.pricing-highlight {
  position: relative;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
}

.pricing-highlight::before {
  content: '推荐';
  position: absolute;
  top: -1px;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 0 0 6px 6px;
}

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.faq-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(99, 102, 241, 0.04);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.25rem 1rem;
}

.faq-icon {
  transition: transform 0.3s;
  color: var(--text-secondary);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Waterfall / Masonry */
.masonry-grid {
  columns: 4 220px;
  column-gap: 1rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .masonry-grid {
    columns: 2 140px;
  }
}

/* Chart placeholder styling */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* ========== Admin Specific ========== */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.5;
}

.stat-card.success::before {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.stat-card.warning::before {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.stat-card.danger::before {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

/* Tab buttons */
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

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

/* Responsive table */
@media (max-width: 768px) {
  .data-table {
    font-size: 12px;
  }
  .data-table thead th,
  .data-table tbody td {
    padding: 0.5rem 0.625rem;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Disabled state for buttons and inputs */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Style group selectors for form elements ===== */
select.input {
  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'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  padding-right: 2rem;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}
