/* Modern Components Styles */

/* Glass morphism effects */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
}

:root.dark-mode .glass-card {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern card */
.card-modern {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
  transition: box-shadow 0.3s ease;
}

.card-modern:hover {
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
}

:root.dark-mode .card-modern {
  background: #1f2937;
}

/* Buttons */
.btn-modern {
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #4B6BFB 0%, #7d9aff 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(75, 107, 251, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #f1f5f9;
  color: #1d333e;
}

:root.dark-mode .btn-secondary {
  background: #374151;
  color: #e5e7eb;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

:root.dark-mode .btn-secondary:hover {
  background: #4b5563;
}

.btn-outline {
  background: transparent;
  border: 2px solid #4B6BFB;
  color: #4B6BFB;
}

.btn-outline:hover {
  background: rgba(75, 107, 251, 0.1);
}

.btn-ghost {
  background: transparent;
  color: #374151;
}

:root.dark-mode .btn-ghost {
  color: #e5e7eb;
}

.btn-ghost:hover {
  background: #f1f5f9;
}

:root.dark-mode .btn-ghost:hover {
  background: #374151;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
}

.btn-md {
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-lg {
  padding: 12px 32px;
  font-size: 18px;
  border-radius: 12px;
}

.btn-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 14px;
}

.badge-default {
  background: #f1f5f9;
  color: #374151;
}

:root.dark-mode .badge-default {
  background: #374151;
  color: #e5e7eb;
}

.badge-success {
  background: #d1fae5;
  color: #047857;
}

:root.dark-mode .badge-success {
  background: rgba(4, 120, 87, 0.3);
  color: #6ee7b7;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

:root.dark-mode .badge-warning {
  background: rgba(146, 64, 14, 0.3);
  color: #fcd34d;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

:root.dark-mode .badge-error {
  background: rgba(153, 27, 27, 0.3);
  color: #fca5a5;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

:root.dark-mode .badge-info {
  background: rgba(30, 64, 175, 0.3);
  color: #93c5fd;
}

.badge-primary {
  background: #e0e7ff;
  color: #4338ca;
}

:root.dark-mode .badge-primary {
  background: rgba(67, 56, 202, 0.3);
  color: #a5b4fc;
}

/* Loading */
.loading-skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

:root.dark-mode .loading-skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Connection Status */
.connection-status {
  position: relative;
}

.connection-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.connection-indicator.connected {
  background: #10b981;
}

.connection-indicator.degraded {
  background: #f59e0b;
}

.connection-indicator.disconnected {
  background: #ef4444;
}

.connection-indicator.checking {
  background: #eab308;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

.animate-slide-down {
  animation: slideDown 0.3s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.2s ease-out;
}
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #d1d5db;
}

.theme-toggle:hover {
  background-color: #374151;
  color: #ffffff;
}

.theme-toggle svg {
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: scale(1.1);
}

/* Dark mode styles */
:root.dark-mode .theme-toggle {
  color: #d1d5db;
}

:root.dark-mode .theme-toggle:hover {
  background-color: #4b5563;
  color: #ffffff;
}

/* Light mode styles */
:root.light-mode .theme-toggle {
  color: #6b7280;
}

:root.light-mode .theme-toggle:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}
/* NavDropdown.css */

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-dropdown .nav-link:hover,
.nav-dropdown .nav-link:focus {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.05));
  outline: none;
}

.nav-dropdown .nav-link.active {
  color: var(--hero-from, #667eea);
  font-weight: 600;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
  color: currentColor;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: block;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.05));
  outline: none;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-item-name {
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  font-size: 0.875rem;
}

.dropdown-item-description {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.4;
}

/* Dark mode support */
:root.dark-mode .dropdown-menu {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
}

:root.dark-mode .nav-dropdown .nav-link:hover,
:root.dark-mode .nav-dropdown .nav-link:focus {
  background-color: var(--hover-bg, rgba(255, 255, 255, 0.1));
}

:root.dark-mode .dropdown-item:hover,
:root.dark-mode .dropdown-item:focus {
  background-color: var(--hover-bg, rgba(255, 255, 255, 0.1));
}

:root.dark-mode .dropdown-item-name {
  color: var(--text-primary, #f1f5f9);
}

:root.dark-mode .dropdown-item-description {
  color: var(--text-secondary, #94a3b8);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    min-width: auto;
    width: 100%;
    margin-top: 0.5rem;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
  }

  .dropdown-menu.open {
    transform: none;
  }

  .dropdown-item {
    padding: 0.75rem 1rem;
    margin-left: 1rem;
    border-left: 2px solid var(--border-color, #e2e8f0);
  }
}.header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  z-index: 110;
  margin-right: 2rem; /* Add spacing between logo and nav items */
}

.logo-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.1);
}

.logo-text {
  white-space: nowrap;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-link {
  background: none;
  border: none;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary, #1f2937);
  background-color: var(--bg-hover, #f3f4f6);
}

.nav-link.active {
  color: var(--primary-color, #3b82f6);
  background-color: var(--primary-bg, #dbeafe);
  font-weight: 600;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  align-items: center;
  gap: 1rem;
  z-index: 110;
}

.mobile-menu-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.mobile-menu-button:hover {
  background-color: var(--bg-hover, #f3f4f6);
}

/* Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  width: 24px;
  height: 18px;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary, #1f2937);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary, #ffffff);
  z-index: 105;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-nav-link {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary, #1f2937);
  min-width: 150px;
}

.mobile-nav-link:hover {
  color: var(--primary-color, #3b82f6);
  background-color: var(--primary-bg, #dbeafe);
}

.mobile-nav-link.active {
  color: var(--primary-color, #3b82f6);
  background-color: var(--primary-bg, #dbeafe);
}

/* Dark mode styles */
:root.dark-mode .header {
  background-color: #1e293b;
  border-bottom: 1px solid #374151;
}

:root.dark-mode .logo {
  color: #ffffff;
}

:root.dark-mode .logo:hover {
  color: #60a5fa;
}

:root.dark-mode .nav-link {
  color: #d1d5db;
}

:root.dark-mode .nav-link:hover {
  color: #ffffff;
  background-color: #374151;
}

:root.dark-mode .nav-link.active {
  color: #60a5fa;
  background-color: #1e3a8a;
}

:root.dark-mode .mobile-menu-button:hover {
  background-color: #374151;
}

:root.dark-mode .hamburger span {
  background-color: #ffffff;
}

:root.dark-mode .mobile-menu-overlay {
  background-color: #1e293b;
}

:root.dark-mode .mobile-nav-link {
  color: #ffffff;
}

:root.dark-mode .mobile-nav-link:hover {
  color: #60a5fa;
  background-color: #1e3a8a;
}

:root.dark-mode .mobile-nav-link.active {
  color: #60a5fa;
  background-color: #1e3a8a;
}

/* Light mode styles */
:root.light-mode .header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

:root.light-mode .logo {
  color: #1f2937;
}

:root.light-mode .logo:hover {
  color: #3b82f6;
}

:root.light-mode .nav-link {
  color: #6b7280;
}

:root.light-mode .nav-link:hover {
  color: #1f2937;
  background-color: #f3f4f6;
}

:root.light-mode .nav-link.active {
  color: #3b82f6;
  background-color: #dbeafe;
}

:root.light-mode .mobile-menu-button:hover {
  background-color: #f3f4f6;
}

:root.light-mode .hamburger span {
  background-color: #1f2937;
}

:root.light-mode .mobile-menu-overlay {
  background-color: #ffffff;
}

:root.light-mode .mobile-nav-link {
  color: #1f2937;
}

:root.light-mode .mobile-nav-link:hover {
  color: #3b82f6;
  background-color: #dbeafe;
}

:root.light-mode .mobile-nav-link.active {
  color: #3b82f6;
  background-color: #dbeafe;
}

/* Responsive design */
@media (max-width: 768px) {
  .nav {
    padding: 1rem;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0.75rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .logo-icon {
    width: 30px;
    height: 30px;
  }
  
  .mobile-nav-link {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
  }
}

@media (max-width: 320px) {
  .logo-text {
    display: none;
  }
}

/* Book a Demo Button & Auth Section */
.header-cta-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1rem;
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-btn,
.dashboard-btn {
  white-space: nowrap;
}

.book-demo-btn {
  white-space: nowrap;
}

/* Mobile Navigation Updates */
.mobile-nav-item {
  width: 100%;
}

.mobile-nav-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.mobile-dropdown-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.mobile-dropdown-arrow.open {
  transform: rotate(180deg);
}

.mobile-dropdown-items {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color, #e2e8f0);
  margin-left: 1rem;
  margin-top: 0.5rem;
}

.mobile-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
}

.mobile-dropdown-item:hover,
.mobile-dropdown-item:focus {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.05));
  outline: none;
}

.mobile-dropdown-item-name {
  display: block;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.25rem;
}

.mobile-dropdown-item-description {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.3;
}

.mobile-cta {
  margin-top: 2rem;
  padding: 0 1.5rem;
}

.mobile-auth-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.mobile-book-demo-btn,
.mobile-login-btn,
.mobile-dashboard-btn,
.mobile-logout-btn {
  width: 100%;
  justify-content: center;
}

/* Dark mode support for new elements */
:root.dark-mode .mobile-dropdown-items {
  border-left-color: var(--border-color, #334155);
}

:root.dark-mode .mobile-dropdown-item:hover,
:root.dark-mode .mobile-dropdown-item:focus {
  background-color: var(--hover-bg, rgba(255, 255, 255, 0.1));
}

:root.dark-mode .mobile-dropdown-item-name {
  color: var(--text-primary, #f1f5f9);
}

:root.dark-mode .mobile-dropdown-item-description {
  color: var(--text-secondary, #94a3b8);
}
/* Footer Styles - High Contrast & Accessibility */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  margin-top: auto;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 280px;
}

.footer-contact p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--text-primary);
  text-decoration: underline;
  outline: none;
}

.footer-link:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Cookie settings link styling */
.cookie-settings-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .footer .container {
    padding: 2rem 1rem 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-section {
    text-align: left;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
/* Cookie Modal Styles */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.cookie-modal {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 1.5rem;
}

.cookie-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover,
.cookie-modal-close:focus {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  outline: none;
}

.cookie-modal-content {
  padding: 0 1.5rem;
}

.cookie-modal-lead {
  color: var(--text-secondary, #64748b);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-category {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary, #f8fafc);
}

.cookie-category-header {
  margin-bottom: 0.5rem;
}

.cookie-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  background: var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: white;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
}

.cookie-toggle input:checked + .toggle-slider::after {
  transform: translateX(1.25rem);
}

.toggle-slider.disabled {
  background: var(--text-tertiary, #94a3b8);
  cursor: not-allowed;
}

.toggle-slider.disabled::after {
  background: #f1f5f9;
}

.cookie-toggle input:disabled + .toggle-slider.disabled {
  background: var(--text-tertiary, #94a3b8);
}

.category-name {
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  font-size: 0.9rem;
}

.category-description {
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-reset-link {
  background: none;
  border: none;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.2s ease;
}

.cookie-reset-link:hover,
.cookie-reset-link:focus {
  color: var(--text-primary, #1e293b);
  outline: none;
}

.cookie-modal-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  line-height: 1.25;
}

.btn-primary {
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
  color: white;
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  outline: none;
}

.btn-secondary {
  background: var(--card-bg, #ffffff);
  color: var(--text-secondary, #64748b);
  border-color: var(--border-color, #e2e8f0);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  border-color: var(--text-tertiary, #94a3b8);
  outline: none;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .cookie-modal-overlay {
    padding: 0.5rem;
  }
  
  .cookie-modal {
    border-radius: 1rem;
    max-height: 95vh;
  }
  
  .cookie-modal-header,
  .cookie-modal-content,
  .cookie-modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-modal-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn-primary,
  .btn-secondary {
    flex: 1;
  }
  
  .cookie-reset-link {
    text-align: center;
    order: -1;
  }
}

/* Focus states for accessibility */
.cookie-toggle:focus-within .toggle-slider {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Dark mode compatibility */
:root.dark-mode .cookie-modal {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

:root.dark-mode .cookie-modal-header {
  border-bottom-color: var(--border-color, #334155);
}

:root.dark-mode .cookie-category {
  background: var(--bg-primary, #0f172a);
  border-color: var(--border-color, #334155);
}

:root.dark-mode .cookie-modal-footer {
  border-top-color: var(--border-color, #334155);
}
/* Cookie Banner Styles - Mobile-first, WCAG-AA compliant */

/* Container with safe-area support */
.cookie-banner-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  pointer-events: none;
}

.cookie-banner {
  max-width: 64rem; /* 4xl */
  margin: 0 auto;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  position: relative;
  animation: bannerSlideUp 0.3s ease-out;
}

@keyframes bannerSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner-content {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  grid-template-columns: 1fr;
}

/* Mobile-first text layout */
.cookie-banner-text h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.cookie-banner-text p {
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-banner-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-primary,
.btn-secondary,
.btn-text {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  line-height: 1.25;
  text-align: center;
  width: 100%;
  min-height: 2.75rem;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
  color: white;
  border-color: transparent;
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  outline: none;
}

.btn-secondary {
  background: var(--card-bg, #ffffff);
  color: var(--text-secondary, #64748b);
  border-color: var(--border-color, #e2e8f0);
}

.btn-secondary:hover:not(:disabled),
.btn-secondary:focus:not(:disabled) {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  border-color: var(--text-tertiary, #94a3b8);
  outline: none;
}

.btn-text {
  background: transparent;
  color: var(--text-secondary, #64748b);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.btn-text:hover,
.btn-text:focus {
  color: var(--text-primary, #1e293b);
  background: var(--bg-secondary, #f8fafc);
  outline: none;
}

.cookie-policy-link {
  font-size: 0.75rem;
  color: var(--text-tertiary, #94a3b8);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.privacy-link {
  color: var(--text-secondary, #64748b);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.privacy-link:hover,
.privacy-link:focus {
  color: var(--text-primary, #1e293b);
  outline: none;
}

/* Dismiss button (only shown after choice) */
.cookie-banner-dismiss {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-tertiary, #94a3b8);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  line-height: 1;
  transition: all 0.2s ease;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-banner-dismiss:hover,
.cookie-banner-dismiss:focus {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  outline: none;
}

/* Floating cookie settings trigger */
.cookie-settings-trigger {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-settings-trigger:hover,
.cookie-settings-trigger:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* Tablet and desktop responsive design */
@media (min-width: 640px) {
  .cookie-banner-container {
    padding: 1.25rem;
  }
  
  .cookie-banner {
    border-radius: 1.5rem;
  }
  
  .cookie-banner-content {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
  }
  
  .cookie-banner-text {
    max-width: none;
  }
  
  .cookie-banner-actions {
    flex-shrink: 0;
    min-width: 20rem;
  }
  
  .cookie-banner-buttons {
    flex-direction: row;
    gap: 0.75rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: auto;
    min-width: 7rem;
    flex: 0 0 auto;
  }
  
  .btn-text {
    width: auto;
    flex: 0 0 auto;
  }
  
  .cookie-policy-link {
    text-align: left;
  }
}

/* Large desktop optimization */
@media (min-width: 1024px) {
  .cookie-banner-content {
    padding: 1.5rem;
  }
  
  .cookie-banner-text h3 {
    font-size: 1.25rem;
  }
  
  .cookie-banner-text p {
    font-size: 0.9375rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-text {
    font-size: 0.9375rem;
    padding: 0.75rem 1.25rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .cookie-banner {
    border-width: 2px;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-text {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
  }
  
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-text:hover,
  .cookie-banner-dismiss:hover,
  .cookie-settings-trigger:hover {
    transform: none;
  }
}

/* Dark mode compatibility */
:root.dark-mode .cookie-banner {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

:root.dark-mode .cookie-settings-trigger {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}
/* ErrorBoundary Styles */

.error-boundary {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  padding: 2rem;
  background: linear-gradient(135deg, #fef3f3 0%, #fef9f9 100%);
}

.error-boundary-content {
  max-width: 600px;
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.error-title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #dc3545;
}

.error-message {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

.error-details {
  margin: 1.5rem 0;
  text-align: left;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 1rem;
}

.error-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #495057;
  padding: 0.5rem;
  user-select: none;
}

.error-details summary:hover {
  background: #e9ecef;
  border-radius: 4px;
}

.error-stack {
  margin: 1rem 0 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #dc3545;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.error-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-btn:active {
  transform: translateY(0);
}

.error-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.error-btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #63418b 100%);
}

.error-btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.error-btn-secondary:hover {
  background: #e9ecef;
}

.error-hint {
  margin: 1.5rem 0 0;
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 0.875rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .error-boundary {
    padding: 1rem;
  }

  .error-boundary-content {
    padding: 1.5rem;
  }

  .error-icon {
    font-size: 3rem;
  }

  .error-title {
    font-size: 1.5rem;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-btn {
    width: 100%;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .error-boundary {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  }

  .error-boundary-content {
    background: #2d2d2d;
    color: #e0e0e0;
  }

  .error-message {
    color: #b0b0b0;
  }

  .error-details {
    background: #1a1a1a;
    border-color: #444;
  }

  .error-details summary {
    color: #e0e0e0;
  }

  .error-details summary:hover {
    background: #444;
  }

  .error-stack {
    background: #2d2d2d;
    border-color: #444;
    color: #ff6b6b;
  }

  .error-btn-secondary {
    background: #444;
    color: #e0e0e0;
    border-color: #555;
  }

  .error-btn-secondary:hover {
    background: #555;
  }
}
/* Toast Notification Styles */

.toast-container {
  position: fixed;
  top: 5rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 320px;
  max-width: 500px;
  pointer-events: all;
  border-left: 4px solid;
}

.toast-icon {
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.toast-message {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2c3e50;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #95a5a6;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #2c3e50;
}

/* Toast Types */
.toast-success {
  border-left-color: #28a745;
}

.toast-success .toast-icon {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.toast-error {
  border-left-color: #dc3545;
}

.toast-error .toast-icon {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

.toast-warning {
  border-left-color: #ffc107;
}

.toast-warning .toast-icon {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  color: #856404;
}

.toast-info {
  border-left-color: #17a2b8;
}

.toast-info .toast-icon {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
}

/* Animations */
@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-enter {
  animation: toastSlideIn 0.3s ease-out;
}

.toast-exit {
  animation: toastSlideOut 0.3s ease-in;
}

/* Dark Mode */
:root.dark-mode .toast {
  background: var(--dm-bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

:root.dark-mode .toast-message {
  color: var(--dm-text-primary);
}

:root.dark-mode .toast-close {
  color: var(--dm-text-muted);
}

:root.dark-mode .toast-close:hover {
  color: var(--dm-text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 4rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }
}
.soft-constellations {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Simple gradient background without canvas */
.constellation-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.1) 0%, 
    rgba(139, 92, 246, 0.1) 25%,
    rgba(59, 130, 246, 0.1) 50%,
    rgba(99, 102, 241, 0.1) 75%,
    rgba(139, 92, 246, 0.1) 100%
  );
  animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { 
    background: linear-gradient(135deg, 
      rgba(99, 102, 241, 0.1) 0%, 
      rgba(139, 92, 246, 0.1) 25%,
      rgba(59, 130, 246, 0.1) 50%,
      rgba(99, 102, 241, 0.1) 75%,
      rgba(139, 92, 246, 0.1) 100%
    );
  }
  50% { 
    background: linear-gradient(135deg, 
      rgba(139, 92, 246, 0.1) 0%, 
      rgba(59, 130, 246, 0.1) 25%,
      rgba(99, 102, 241, 0.1) 50%,
      rgba(139, 92, 246, 0.1) 75%,
      rgba(59, 130, 246, 0.1) 100%
    );
  }
}

/* Floating Word Chips */
.floating-words {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.floating-word {
  position: absolute;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  animation: floatWord 15s ease-in-out infinite;
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: default;
}

/* Elegant word positioning for 12 words - with !important to override defaults */
.word-0 { top: 20% !important; left: 15% !important; animation-delay: 0s; }
.word-1 { top: 25% !important; left: 75% !important; animation-delay: 3s; }
.word-2 { top: 45% !important; left: 20% !important; animation-delay: 6s; }
.word-3 { top: 35% !important; left: 65% !important; animation-delay: 9s; }
.word-4 { top: 60% !important; left: 25% !important; animation-delay: 12s; }
.word-5 { top: 55% !important; left: 80% !important; animation-delay: 15s; }
.word-6 { top: 75% !important; left: 30% !important; animation-delay: 18s; }
.word-7 { top: 70% !important; left: 70% !important; animation-delay: 21s; }
.word-8 { top: 85% !important; left: 45% !important; animation-delay: 24s; }
.word-9 { top: 30% !important; left: 40% !important; animation-delay: 27s; }
.word-10 { top: 50% !important; left: 85% !important; animation-delay: 30s; }
.word-11 { top: 80% !important; left: 15% !important; animation-delay: 33s; }

.floating-word:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Language-specific styling */
.lang-ar, .lang-he, .lang-syr, .lang-cld {
  font-family: 'Noto Sans Arabic', 'Arial Unicode MS', sans-serif;
  direction: rtl;
  text-align: right;
}

.lang-am, .lang-ti, .lang-gez {
  font-family: 'Noto Sans Ethiopic', 'Arial Unicode MS', sans-serif;
}

.lang-so, .lang-mt, .lang-en, .lang-akk {
  font-family: 'Noto Sans', 'Arial Unicode MS', sans-serif;
}

/* Akkadian transliteration styling */
.lang-akk {
  font-style: italic;
  font-weight: 400;
}

.lang-akk {
  font-style: italic;
  font-family: 'Times New Roman', serif;
}

.lang-en {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
}



/* Floating animation for word chips */
@keyframes floatWord {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-5px) rotate(-1deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-15px) rotate(0.5deg);
    opacity: 0.9;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Tablet optimizations */
  .floating-word {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  .constellation-canvas {
    cursor: default;
  }
}

@media (max-width: 768px) {
  /* Mobile optimizations */
  .floating-word {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
  }
  
  /* Hide some words on mobile to avoid overcrowding */
  .word-8, .word-9, .word-10, .word-11 {
    display: none;
  }
  
  /* Adjust positioning for mobile - keep 8 words */
  .word-0 { top: 20%; left: 15%; }
  .word-1 { top: 30%; left: 75%; }
  .word-2 { top: 40%; left: 25%; }
  .word-3 { top: 50%; left: 70%; }
  .word-4 { top: 60%; left: 20%; }
  .word-5 { top: 70%; left: 65%; }
  .word-6 { top: 80%; left: 30%; }
  .word-7 { top: 25%; left: 50%; }
}

@media (max-width: 480px) {
  /* Small mobile devices */
  .floating-word {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
  
  /* Hide even more words on very small screens - keep 6 words */
  .word-6, .word-7, .word-8, .word-9, .word-10, .word-11 {
    display: none;
  }
  
  /* Adjust remaining words for small screens */
  .word-0 { top: 25%; left: 20%; }
  .word-1 { top: 40%; left: 70%; }
  .word-2 { top: 55%; left: 30%; }
  .word-3 { top: 70%; left: 65%; }
  .word-4 { top: 35%; left: 50%; }
  .word-5 { top: 60%; left: 80%; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .floating-word {
    animation: none;
    opacity: 0.6;
  }
  
  .constellation-canvas {
    display: none;
  }
}
/* Card.css - Lighter, responsive card design using theme tokens */

.card {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title-section {
  flex: 1;
  min-width: 0;
}

.card-title {
  color: var(--text-primary, #1e293b);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.25rem 0;
}

.card-meta {
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  line-height: 1.3;
}

/* Body */
.card-body {
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actions - pinned to bottom with consistent alignment */
.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

@media (min-width: 640px) {
  .card-actions {
    flex-direction: row;
  }
}

@media (max-width: 639px) {
  .card-actions {
    flex-direction: column;
  }
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  min-width: fit-content;
}

/* On mobile, buttons stack and take full width */
@media (max-width: 639px) {
  .btn-primary,
  .btn-secondary {
    flex: 1;
  }
}

/* On larger screens, buttons size to content */
@media (min-width: 640px) {
  .btn-primary {
    flex: 1;
    max-width: 140px;
  }
  
  .btn-secondary {
    flex: 0 0 auto;
    min-width: 100px;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: var(--card-bg, #ffffff);
  color: var(--text-secondary, #64748b);
  border-color: var(--border-color, #e2e8f0);
}

.btn-secondary:hover {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  border-color: var(--border-color, #e2e8f0);
  transform: translateY(-1px);
}

/* Icon-only button styling */
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
  flex: 0 0 auto;
  min-width: auto;
}

.btn-icon:hover {
  background: var(--hero-from, #667eea);
  color: white;
  border-color: var(--hero-from, #667eea);
}

/* Responsive Design */
@media (min-width: 640px) {
  .card-actions {
    flex-direction: row;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 1.25rem;
  }
  
  .card-actions {
    gap: 0.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }
}
@media (max-width: 768px) {
  .card {
    padding: 1.25rem;
  }
  
  .card-header {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .card-icon {
    font-size: 1.75rem;
  }
  
  .card-title {
    font-size: 1.125rem;
  }
  
  .card-body {
    margin-bottom: 1.25rem;
  }
  
  .card-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .card-actions > * {
    flex: none;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1rem;
  }
  
  .card-badge {
    font-size: 0.75rem;
    padding: 0.1875rem 0.625rem;
  }
}
/* Stepper.css - Horizontal stepper component using existing theme variables */

.stepper-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stepper-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stepper-item {
  display: flex;
}

.stepper-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
  width: 100%;
}

.stepper-link:hover {
  background: var(--hover-background);
  color: var(--primary-color);
}

.stepper-link:hover .stepper-number {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.stepper-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--secondary-background);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.stepper-label {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stepper-container {
    padding: 1.25rem;
  }
  
  .stepper-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .stepper-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .stepper-container {
    padding: 1rem;
  }
  
  .stepper-link {
    padding: 0.375rem;
    gap: 0.5rem;
  }
  
  .stepper-number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8125rem;
  }
  
  .stepper-label {
    font-size: 0.8125rem;
  }
}
/* SectionHero Component Styles */
.section-hero {
  position: relative;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Add decorative grain pattern like Research page */
.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-hero-muted);
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--on-hero-strong);
  margin: 0.5rem 0 1rem 0;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--on-hero-muted);
  max-width: 48rem;
  margin: 0 auto 1.5rem auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-tabs {
  margin-top: 1.5rem;
}

/* Responsive Design */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero-gradient {
    padding: 6rem 0;
  }
  
  .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}
/* Button.css - Unified button component styles */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Sizes */
.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-medium {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Variants */
.btn-primary {
  background: var(--accent-primary, #3b82f6);
  color: white;
}

.btn-primary:hover:not(.btn-disabled) {
  background: var(--accent-primary-hover, #2563eb);
  transform: translateY(-1px);
}

.btn-primary:active:not(.btn-disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--accent-secondary, #6b7280);
  color: white;
}

.btn-secondary:hover:not(.btn-disabled) {
  background: var(--accent-secondary-hover, #4b5563);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-primary, #3b82f6);
  color: var(--accent-primary, #3b82f6);
}

.btn-outline:hover:not(.btn-disabled) {
  background: var(--accent-primary, #3b82f6);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary, #1f2937);
}

.btn-ghost:hover:not(.btn-disabled) {
  background: var(--hover-background, #f3f4f6);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover:not(.btn-disabled) {
  background: #dc2626;
  transform: translateY(-1px);
}

/* States */
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-loading {
  cursor: wait;
  pointer-events: none;
}

.btn-spinner {
  font-size: 0.875em;
}

/* Icon buttons */
.btn-icon {
  aspect-ratio: 1;
  padding: 0.75rem;
}

.btn-icon.btn-small {
  padding: 0.5rem;
}

.btn-icon.btn-large {
  padding: 1rem;
}
/* Badge.css - Unified badge/status component styles */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Sizes */
.badge-small {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.25;
}

.badge-medium {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
}

.badge-large {
  padding: 0.375rem 1rem;
  font-size: 1rem;
  line-height: 1.25;
}

/* Variants */
.badge-default {
  background: var(--background-secondary, #f3f4f6);
  color: var(--text-secondary, #6b7280);
}

.badge-primary {
  background: var(--accent-primary, #3b82f6);
  color: white;
}

.badge-secondary {
  background: var(--accent-secondary, #6b7280);
  color: white;
}

.badge-success {
  background: #22c55e;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-danger {
  background: #ef4444;
  color: white;
}

/* Color variants for People section */
.badge-blue {
  background: #3b82f6;
  color: white;
}

.badge-green {
  background: #22c55e;
  color: white;
}

.badge-red {
  background: #ef4444;
  color: white;
}

.badge-orange {
  background: #f59e0b;
  color: white;
}

.badge-purple {
  background: #8b5cf6;
  color: white;
}

.badge-gray {
  background: #6b7280;
  color: white;
}

/* Status-specific variants */
.badge-active {
  background: #22c55e;
  color: white;
}

.badge-inactive {
  background: #6b7280;
  color: white;
}

.badge-published {
  background: #22c55e;
  color: white;
}

.badge-in-progress {
  background: #f59e0b;
  color: white;
}

.badge-completed {
  background: #3b82f6;
  color: white;
}

/* Light variants for better contrast */
.badge-default.badge-light {
  background: var(--background-tertiary, #e5e7eb);
  color: var(--text-primary, #1f2937);
}

.badge-primary.badge-light {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-success.badge-light {
  background: #dcfce7;
  color: #166534;
}

.badge-warning.badge-light {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger.badge-light {
  background: #fecaca;
  color: #b91c1c;
}
/* Card.css - Enhanced unified card component */

.ui-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  background: var(--card-bg, #ffffff);
  transition: all 0.2s ease;
}

.ui-card-content {
  flex: 1;
}

/* Variants */
.ui-card-default {
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ui-card-elevated {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ui-card-outlined {
  border: 2px solid var(--border-color, #e2e8f0);
  box-shadow: none;
}

.ui-card-ghost {
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Padding variants */
.ui-card-none {
  padding: 0;
}

.ui-card-small {
  padding: 1rem;
}

.ui-card-medium {
  padding: 1.5rem;
}

.ui-card-large {
  padding: 2rem;
}

/* Header and Footer */
.ui-card-header {
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.ui-card-footer {
  border-top: 1px solid var(--border-color, #e2e8f0);
  margin-top: 1rem;
  padding-top: 1rem;
}

.ui-card-none .ui-card-header {
  padding: 1.5rem 1.5rem 1rem;
  margin: 0;
}

.ui-card-none .ui-card-footer {
  padding: 1rem 1.5rem 1.5rem;
  margin: 0;
}

.ui-card-none .ui-card-content {
  padding: 0 1.5rem;
}

/* Hover effects */
.ui-card-hover:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.ui-card-ghost.ui-card-hover:hover {
  background: var(--hover-background, #f9fafb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .ui-card {
    background: var(--card-bg-dark, #1f2937);
    border-color: var(--border-color-dark, #374151);
  }
  
  .ui-card-ghost {
    background: transparent;
  }
  
  .ui-card-ghost.ui-card-hover:hover {
    background: var(--hover-background-dark, #374151);
  }
}
/* Container.css - Unified container layouts */

.ui-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Size variants */
.ui-container-small {
  max-width: 768px;
}

.ui-container-default {
  max-width: 1200px;
}

.ui-container-large {
  max-width: 1400px;
}

.ui-container-full {
  max-width: none;
}

/* Responsive padding */
@media (min-width: 640px) {
  .ui-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .ui-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
/* Pill.css - Filter pills and tags with theme support */

.ui-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
  transition: all 0.2s ease;
}

/* Light mode default */
:root .ui-pill {
  border-color: #e2e8f0;
  background: #ffffff;
  color: #6b7280;
}

/* Dark mode */
:root.dark-mode .ui-pill {
  border-color: #374151;
  background: #1f2937;
  color: #9ca3af;
}

/* Sizes */
.ui-pill-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.ui-pill-medium {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.ui-pill-large {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

/* Variants - primary */
:root .ui-pill-primary {
  border-color: #3b82f6;
  color: #3b82f6;
}

:root.dark-mode .ui-pill-primary {
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Variants - secondary */
:root .ui-pill-secondary {
  border-color: #6b7280;
  color: #6b7280;
}

:root.dark-mode .ui-pill-secondary {
  border-color: #9ca3af;
  color: #9ca3af;
}

/* Active state */
:root .ui-pill-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

:root.dark-mode .ui-pill-active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

:root .ui-pill-primary.ui-pill-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

:root.dark-mode .ui-pill-primary.ui-pill-active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

:root .ui-pill-secondary.ui-pill-active {
  background: #6b7280;
  border-color: #6b7280;
  color: white;
}

:root.dark-mode .ui-pill-secondary.ui-pill-active {
  background: #9ca3af;
  border-color: #9ca3af;
  color: white;
}
}

/* Clickable pills */
.ui-pill-clickable {
  cursor: pointer;
  border: none;
}

/* Hover states */
:root .ui-pill-clickable:hover:not(.ui-pill-disabled) {
  background: #f3f4f6;
  transform: translateY(-1px);
}

:root.dark-mode .ui-pill-clickable:hover:not(.ui-pill-disabled) {
  background: #374151;
  transform: translateY(-1px);
}

:root .ui-pill-clickable.ui-pill-active:hover:not(.ui-pill-disabled) {
  background: #2563eb;
}

:root.dark-mode .ui-pill-clickable.ui-pill-active:hover:not(.ui-pill-disabled) {
  background: #1d4ed8;
}

/* Focus states */
:root .ui-pill-clickable:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

:root.dark-mode .ui-pill-clickable:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Disabled state */
.ui-pill-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ui-pill-disabled:hover {
  transform: none;
}
/* BeforeAfterSlider.css */

.before-after-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.view-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 0.75rem;
  padding: 0.25rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.toggle-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: var(--card-bg, #ffffff);
  color: var(--text-primary, #1e293b);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-primary, #1e293b);
}

.toggle-btn:focus {
  outline: 2px solid var(--hero-from, #667eea);
  outline-offset: 2px;
}

/* Slider View */
.slider-container {
  width: 100%;
}

.before-after-slider {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.before-content,
.after-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
}

.before-content h3,
.after-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary, #1e293b);
}

.text-sample {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary, #1e293b);
  background: var(--bg-secondary, #f8fafc);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  flex: 1;
  overflow-y: auto;
}

.after-content {
  background: var(--card-bg, #ffffff);
}

.slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--hero-from, #667eea);
  pointer-events: none;
  z-index: 10;
  transition: left 0.1s ease;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.5rem;
  height: 1.5rem;
  background: var(--hero-from, #667eea);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-input {
  width: 100%;
  height: 0.5rem;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 0.25rem;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-top: 1rem;
}

.slider-input::-webkit-slider-thumb {
  width: 1.25rem;
  height: 1.25rem;
  background: var(--hero-from, #667eea);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.slider-input::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  background: var(--hero-from, #667eea);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: none;
}

.slider-input:focus {
  outline: 2px solid var(--hero-from, #667eea);
  outline-offset: 2px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

/* Tab View */
.tab-container {
  width: 100%;
}

.tab-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tab-panel {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary, #1e293b);
}

.tab-panel .text-sample {
  margin: 0;
  min-height: 120px;
}

.json-output {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.json-output pre {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary, #1e293b);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Dark mode support */
:root.dark-mode .view-toggle {
  background: var(--bg-secondary, #334155);
}

:root.dark-mode .toggle-btn.active {
  background: var(--card-bg, #1e293b);
  color: var(--text-primary, #f1f5f9);
}

:root.dark-mode .before-content,
:root.dark-mode .after-content,
:root.dark-mode .tab-panel {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

:root.dark-mode .text-sample,
:root.dark-mode .json-output {
  background: var(--bg-secondary, #334155);
  border-color: var(--border-color, #475569);
  color: var(--text-primary, #f1f5f9);
}

:root.dark-mode .slider-input {
  background: var(--bg-secondary, #334155);
}

/* Responsive design */
@media (max-width: 768px) {
  .before-after-slider {
    height: 250px;
  }
  
  .before-content,
  .after-content {
    padding: 1.5rem;
  }
  
  .text-sample {
    font-size: 0.8rem;
  }
  
  .tab-content {
    grid-template-columns: 1fr;
  }
  
  .view-toggle {
    width: 100%;
  }
  
  .toggle-btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .before-after-slider {
    height: 200px;
  }
  
  .before-content,
  .after-content {
    padding: 1rem;
  }
  
  .text-sample {
    font-size: 0.75rem;
    padding: 0.75rem;
  }
  
  .tab-panel {
    padding: 1rem;
  }
  
  .json-output {
    max-height: 200px;
  }
}/* StepDiagram.css */

.step-diagram {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.2s ease;
}

.step-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--hero-from, #667eea);
}

.step-number {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary, #1e293b);
}

.step-description {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
  margin: 0;
}

.step-connector {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 2rem;
  z-index: 10;
}

.arrow-icon {
  color: var(--hero-from, #667eea);
  opacity: 0.7;
}

/* Desktop layout - horizontal flow */
@media (min-width: 1024px) {
  .steps-container {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    position: relative;
  }

  .step-item {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    position: relative;
  }

  .step-item:not(:last-child) {
    margin-right: 2rem;
  }

  .step-number {
    margin: 0 auto 1.5rem auto;
  }

  .step-connector {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 2rem;
    background: var(--bg-primary, #ffffff);
    border-radius: 0.5rem;
    z-index: 10;
  }

  .step-connector .arrow-icon {
    transform: rotate(0deg);
  }
}

/* Tablet layout - keep vertical but adjust spacing */
@media (min-width: 768px) and (max-width: 1023px) {
  .step-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .step-number {
    margin-bottom: 0;
  }

  .step-connector {
    right: -1.5rem;
    width: 3rem;
  }

  .step-connector .arrow-icon {
    transform: rotate(90deg);
  }
}

/* Mobile layout - vertical stack */
@media (max-width: 767px) {
  .steps-container {
    gap: 1.5rem;
  }

  .step-item {
    flex-direction: row;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .step-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .step-title {
    font-size: 1.125rem;
  }

  .step-description {
    font-size: 0.8rem;
  }

  .step-connector {
    display: none; /* Hide connectors on mobile for cleaner look */
  }
}

/* Dark mode support */
:root.dark-mode .step-item {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

:root.dark-mode .step-item:hover {
  border-color: var(--hero-from, #667eea);
}

:root.dark-mode .step-title {
  color: var(--text-primary, #f1f5f9);
}

:root.dark-mode .step-description {
  color: var(--text-secondary, #cbd5e1);
}

:root.dark-mode .step-connector {
  background: var(--bg-primary, #0f172a);
}

/* Animation for step appearance */
.step-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.step-item:nth-child(1) { animation-delay: 0.1s; }
.step-item:nth-child(2) { animation-delay: 0.2s; }
.step-item:nth-child(3) { animation-delay: 0.3s; }
.step-item:nth-child(4) { animation-delay: 0.4s; }
.step-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .step-item {
    animation: none;
    opacity: 1;
  }
  
  .step-item:hover {
    transform: none;
  }
}/* OCR Pipeline Preview Styles */
.ocr-pipeline-preview {
  background: white;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.preview-header h3 {
  margin: 0;
  color: var(--text-primary, #1e293b);
  font-size: 1.25rem;
}

.processing-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  min-width: 80px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-weight: 600;
  color: var(--primary-color, #2563eb);
  font-size: 0.875rem;
}

/* Preview Tabs */
.preview-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  gap: 0.25rem;
}

.preview-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.preview-tab:hover {
  color: var(--primary-color, #2563eb);
  background: var(--surface-bg, #f8fafc);
}

.preview-tab.active {
  color: var(--primary-color, #2563eb);
  border-bottom-color: var(--primary-color, #2563eb);
  font-weight: 600;
}

.tab-icon {
  font-size: 1rem;
}

.tab-label {
  font-size: 0.875rem;
}

/* Preview Content */
.preview-content {
  min-height: 400px;
}

/* Loading State */
.pipeline-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem;
}

.processing-animation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
}

.processing-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.processing-step.active {
  opacity: 1;
  background: var(--primary-bg, #eff6ff);
  border-color: var(--primary-color, #2563eb);
}

.step-icon {
  font-size: 1.5rem;
}

.step-text {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

/* Empty State */
.pipeline-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem;
  text-align: center;
}

.empty-state {
  max-width: 500px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary, #1e293b);
}

.empty-state p {
  color: var(--text-secondary, #64748b);
  margin-bottom: 2rem;
}

.pipeline-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
}

.feature-icon {
  font-size: 1.25rem;
}

/* Text Extraction Preview */
.text-extraction-preview {
  display: grid;
  gap: 1.5rem;
}

.extraction-controls {
  display: flex;
  gap: 0.5rem;
}

.view-toggle {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  background: white;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.view-toggle:hover {
  background: var(--surface-bg, #f8fafc);
}

.view-toggle.active {
  background: var(--primary-color, #2563eb);
  color: white;
  border-color: var(--primary-color, #2563eb);
}

.extraction-content {
  background: var(--code-bg, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.extracted-text,
.structured-json {
  margin: 0;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text-primary, #1e293b);
}

.extraction-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.insight {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
}

.insight-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

.insight-value {
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
}

/* Bounding Box Preview */
.bounding-box-preview {
  display: grid;
  gap: 1.5rem;
}

.bbox-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.type-filter {
  padding: 0.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: white;
  font-size: 0.875rem;
}

.bbox-count {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

.bbox-visualization {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
}

.document-mockup {
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
  overflow: hidden;
}

.document-page {
  position: relative;
  width: 100%;
  height: 400px;
  background: white;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  overflow: hidden;
}

.bounding-box {
  position: absolute;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2px;
}

.bounding-box:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.bounding-box.selected {
  border-color: var(--primary-color, #2563eb);
  background: rgba(37, 99, 235, 0.1);
}

.bounding-box.type-header {
  border-color: #10b981;
}

.bounding-box.type-line_item {
  border-color: #3b82f6;
}

.bounding-box.type-total_amount {
  border-color: #f59e0b;
}

.bounding-box.type-date {
  border-color: #8b5cf6;
}

.bounding-box.type-customer {
  border-color: #06b6d4;
}

.confidence-badge {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 600;
}

.bbox-details {
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
  height: fit-content;
}

.selected-bbox-info h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary, #1e293b);
}

.bbox-info {
  display: grid;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  min-width: 80px;
}

.info-value {
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  text-align: right;
  font-family: 'Monaco', 'Menlo', monospace;
  word-break: break-word;
}

.bbox-help {
  text-align: center;
  padding: 1rem 0;
}

.bbox-help p {
  color: var(--text-secondary, #64748b);
  margin-bottom: 1.5rem;
}

.type-legend {
  display: grid;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-item.type-header .legend-color {
  background: #10b981;
}

.legend-item.type-line_item .legend-color {
  background: #3b82f6;
}

.legend-item.type-total_amount .legend-color {
  background: #f59e0b;
}

.legend-item.type-date .legend-color {
  background: #8b5cf6;
}

/* Before/After Comparison */
.before-after-comparison {
  display: grid;
  gap: 1.5rem;
}

.comparison-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  min-width: 50px;
}

.comparison-slider {
  flex: 1;
  height: 6px;
  background: var(--surface-bg, #f1f5f9);
  border-radius: 3px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.comparison-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color, #2563eb);
  border-radius: 50%;
  cursor: pointer;
}

.comparison-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color, #2563eb);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.comparison-viewer {
  position: relative;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
  overflow: hidden;
}

.text-comparison {
  position: relative;
  min-height: 200px;
}

.before-text,
.after-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.before-text {
  background: var(--error-bg, #fef2f2);
  padding: 1rem;
}

.after-text {
  background: var(--success-bg, #f0fdf4);
  padding: 1rem;
}

.before-text pre,
.after-text pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  pointer-events: none;
  z-index: 10;
}

.handle-line {
  width: 100%;
  height: 100%;
  background: var(--primary-color, #2563eb);
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--primary-color, #2563eb);
  border-radius: 50%;
  border: 2px solid white;
}

.corrections-summary {
  background: white;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
}

.corrections-summary h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary, #1e293b);
}

.corrections-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.correction-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  flex-wrap: wrap;
}

.correction-before {
  background: var(--error-bg, #fef2f2);
  color: var(--error-text, #dc2626);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
}

.correction-arrow {
  color: var(--text-secondary, #64748b);
  font-weight: bold;
}

.correction-after {
  background: var(--success-bg, #f0fdf4);
  color: var(--success-text, #16a34a);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
}

.correction-reason {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
}

.correction-confidence {
  margin-left: auto;
  background: var(--primary-bg, #eff6ff);
  color: var(--primary-color, #2563eb);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.enhancement-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--primary-bg, #eff6ff);
  border: 1px solid var(--primary-color, #2563eb);
  border-radius: 8px;
}

.score-label {
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

.score-value {
  font-weight: 600;
  color: var(--primary-color, #2563eb);
  font-size: 1.125rem;
}

/* Confidence Map Preview */
.confidence-map-preview {
  display: grid;
  gap: 1.5rem;
}

.confidence-legend h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary, #1e293b);
}

.legend-items {
  display: grid;
  gap: 0.5rem;
}

.confidence-visualization .document-page {
  background: #fafafa;
}

.confidence-box {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.confidence-box:hover {
  opacity: 0.9;
}

.confidence-text {
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.confidence-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface-bg, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ocr-pipeline-preview {
    padding: 1rem;
  }
  
  .preview-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .processing-stats {
    justify-content: center;
  }
  
  .bbox-visualization {
    grid-template-columns: 1fr;
  }
  
  .bbox-details {
    order: -1;
  }
  
  .slider-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .comparison-slider {
    width: 100%;
  }
  
  .correction-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .correction-confidence {
    margin-left: 0;
    align-self: flex-end;
  }
  
  .enhancement-score {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--color-background);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  position: relative;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Sizes */
.modal-small {
  width: 100%;
  max-width: 400px;
}

.modal-medium {
  width: 100%;
  max-width: 600px;
}

.modal-large {
  width: 100%;
  max-width: 900px;
}

.modal-full {
  width: 95vw;
  height: 95vh;
  max-width: none;
  max-height: none;
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background-subtle);
  border-radius: 12px 12px 0 0;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-foreground);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-foreground-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: var(--color-background-hover);
  color: var(--color-foreground);
}

.modal-close:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Modal Content */
.modal-content {
  padding: 1.5rem;
  color: var(--color-foreground);
}

/* Scrolling */
.modal::-webkit-scrollbar {
  width: 8px;
}

.modal::-webkit-scrollbar-track {
  background: var(--color-background-subtle);
}

.modal::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: var(--color-foreground-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-backdrop {
    padding: 0.5rem;
  }
  
  .modal {
    width: 100%;
    max-width: none;
    max-height: 95vh;
    margin: 0;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-content {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
}/* Table Styles */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-background);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

/* Table Header */
.table th {
  background: var(--color-background-subtle);
  color: var(--color-foreground);
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table th:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.table th.sortable:hover {
  background: var(--color-background-hover);
}

.sort-indicator {
  color: var(--color-foreground-muted);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.table th.sorted .sort-indicator {
  opacity: 1;
  color: var(--color-primary);
}

/* Table Body */
.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-foreground);
  vertical-align: top;
}

.table td:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background: var(--color-background-subtle);
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:hover {
  background: var(--color-background-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Empty State */
.empty-message {
  text-align: center;
  color: var(--color-foreground-muted);
  font-style: italic;
  padding: 3rem 1rem;
}

/* Loading State */
.table-loading {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-background);
  overflow: hidden;
}

.table-skeleton {
  width: 100%;
}

.skeleton-row {
  display: flex;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.skeleton-row:last-child {
  border-bottom: none;
}

.skeleton-cell {
  height: 1rem;
  background: var(--color-background-subtle);
  border-radius: 4px;
  margin-right: 1rem;
  flex: 1;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-cell:last-child {
  margin-right: 0;
}

@keyframes skeleton-shimmer {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .table {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
  }
  
  .th-content {
    gap: 0.25rem;
  }
  
  .sort-indicator {
    font-size: 0.7rem;
  }
}

/* Utilities */
.table .text-center {
  text-align: center;
}

.table .text-right {
  text-align: right;
}

.table .text-muted {
  color: var(--color-foreground-muted);
}

.table .font-mono {
  font-family: var(--font-mono);
}

.table .font-bold {
  font-weight: 600;
}

.table .nowrap {
  white-space: nowrap;
}/* Demo OCR Styles */
.demo-ocr {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.demo-header {
  text-align: center;
  margin-bottom: 2rem;
}
.demo-header h1 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.demo-header .subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.demo-header .engagement-banner {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.demo-header .engagement-banner .engagement-text {
  font-weight: 500;
}

.demo-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
}

.demo-content {
  min-height: 400px;
}

/* Sample Viewer Styles */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.sample-card {
  border: 2px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.sample-card:hover, .sample-card.selected {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.sample-card .sample-preview {
  height: 200px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sample-card .sample-preview img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.sample-card .sample-preview .preview-placeholder {
  color: var(--color-text-secondary);
  text-align: center;
}
.sample-card .sample-info {
  padding: 1rem;
}
.sample-card .sample-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--color-text);
}
.sample-card .sample-info .sample-category {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.sample-card .sample-info .sample-description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Pipeline Preview Styles */
.pipeline-preview .preview-stages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .pipeline-preview .preview-stages {
    grid-template-columns: 1fr;
  }
}
.pipeline-preview .stage-card .stage-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.pipeline-preview .stage-card .stage-header h4 {
  margin: 0;
  color: var(--color-text);
}
.pipeline-preview .stage-card .stage-header .stage-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}
.pipeline-preview .image-analysis {
  position: relative;
  background: var(--color-surface);
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-preview .image-analysis .analysis-image {
  width: 100%;
  height: auto;
  display: block;
}
.pipeline-preview .image-analysis .bounding-boxes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pipeline-preview .image-analysis .bbox {
  position: absolute;
  border: 2px solid;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.pipeline-preview .image-analysis .bbox.confidence-high {
  border-color: #10b981;
}
.pipeline-preview .image-analysis .bbox.confidence-medium {
  border-color: #f59e0b;
}
.pipeline-preview .image-analysis .bbox.confidence-low {
  border-color: #ef4444;
}
.pipeline-preview .image-analysis .bbox .bbox-label {
  position: absolute;
  top: -1.5rem;
  left: 0;
  background: inherit;
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
}
.pipeline-preview .extracted-text {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
}
.pipeline-preview .extracted-text .text-content {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--color-text);
}
.pipeline-preview .confidence-legend {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-surface);
  border-radius: 8px;
}
.pipeline-preview .confidence-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.pipeline-preview .confidence-legend .legend-item .color-box {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}
.pipeline-preview .processing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.pipeline-preview .processing-stats .stat-card {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.pipeline-preview .processing-stats .stat-card .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}
.pipeline-preview .processing-stats .stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* File Upload Styles */
.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.upload-area.dragover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.05);
}
.upload-area .upload-icon {
  font-size: 3rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}
.upload-area .upload-text {
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.upload-area .upload-hint {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.file-input {
  display: none;
}

.upload-progress {
  margin: 1rem 0;
}
.upload-progress .progress-bar {
  background: var(--color-surface);
  border-radius: 4px;
  overflow: hidden;
  height: 8px;
}
.upload-progress .progress-bar .progress-fill {
  background: var(--color-primary);
  height: 100%;
  transition: width 0.3s ease;
}
.upload-progress .progress-text {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Waitlist Form Styles */
.waitlist-form {
  max-width: 600px;
  margin: 0 auto;
}
.waitlist-form .form-header {
  text-align: center;
  margin-bottom: 2rem;
}
.waitlist-form .form-header h3 {
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.waitlist-form .form-header p {
  color: var(--color-text-secondary);
}
.waitlist-form .form-header .demo-usage-banner {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.waitlist-form .form-header .demo-usage-banner .usage-text {
  font-weight: 500;
}
.waitlist-form .form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.waitlist-form .form-section:last-of-type {
  border-bottom: none;
}
.waitlist-form .form-section h4 {
  color: var(--color-text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.waitlist-form .form-group {
  margin-bottom: 1rem;
}
.waitlist-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-weight: 500;
}
.waitlist-form .form-group label .required {
  color: var(--color-danger);
  margin-left: 0.25rem;
}
.waitlist-form .form-group input, .waitlist-form .form-group select, .waitlist-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
.waitlist-form .form-group input:focus, .waitlist-form .form-group select:focus, .waitlist-form .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.waitlist-form .form-group input.error, .waitlist-form .form-group select.error, .waitlist-form .form-group textarea.error {
  border-color: var(--color-danger);
}
.waitlist-form .form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.waitlist-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .waitlist-form .form-row {
    grid-template-columns: 1fr;
  }
}
.waitlist-form .error-text {
  color: var(--color-danger);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.waitlist-form .general-error {
  background: rgba(var(--color-danger-rgb), 0.1);
  border: 1px solid var(--color-danger);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: var(--color-danger);
}
.waitlist-form .consent-section .checkbox-group {
  margin-bottom: 1rem;
}
.waitlist-form .consent-section .checkbox-group .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  line-height: 1.5;
}
.waitlist-form .consent-section .checkbox-group .checkbox-label input[type=checkbox] {
  width: auto;
  margin: 0;
}
.waitlist-form .consent-section .checkbox-group .checkbox-label .checkbox-text {
  color: var(--color-text);
}
.waitlist-form .consent-section .checkbox-group .checkbox-label .checkbox-text a {
  color: var(--color-primary);
  text-decoration: none;
}
.waitlist-form .consent-section .checkbox-group .checkbox-label .checkbox-text a:hover {
  text-decoration: underline;
}
.waitlist-form .consent-section .checkbox-group .checkbox-label .checkbox-text .required {
  color: var(--color-danger);
}
.waitlist-form .form-actions {
  text-align: center;
  padding-top: 1rem;
}
.waitlist-form .form-actions .submit-button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.waitlist-form .form-actions .privacy-note {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto;
}

.waitlist-success {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.waitlist-success .success-content .success-icon {
  font-size: 4rem;
  color: var(--color-success);
  margin-bottom: 1rem;
}
.waitlist-success .success-content h3 {
  color: var(--color-text);
  margin-bottom: 1rem;
}
.waitlist-success .success-content p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}
.waitlist-success .engagement-summary {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}
.waitlist-success .engagement-summary h4 {
  color: var(--color-text);
  margin-bottom: 1rem;
}
.waitlist-success .engagement-summary .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.waitlist-success .engagement-summary .stats-grid .stat {
  text-align: center;
}
.waitlist-success .engagement-summary .stats-grid .stat .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-primary);
}
.waitlist-success .engagement-summary .stats-grid .stat .stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.waitlist-success .next-steps {
  text-align: left;
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1.5rem;
}
.waitlist-success .next-steps h4 {
  color: var(--color-text);
  margin-bottom: 1rem;
}
.waitlist-success .next-steps ul {
  color: var(--color-text-secondary);
  line-height: 1.6;
  padding-left: 1.5rem;
}
.waitlist-success .next-steps ul li {
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .demo-ocr {
    padding: 1rem;
  }
  .demo-tabs {
    flex-wrap: wrap;
  }
  .samples-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-preview .preview-stages {
    grid-template-columns: 1fr;
  }
}.verify-code-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
}

.verify-code-card {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border-color, #e5e7eb);
}

.verify-header {
  text-align: center;
  margin-bottom: 2rem;
}

.verify-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 1.5rem;
}

.verify-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color, #1f2937);
  margin-bottom: 0.5rem;
}

.verify-header p {
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.role-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.role-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-indicator.cofounder {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.role-indicator.employee {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.role-indicator.customer {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.founder-welcome {
  text-align: center;
  margin-bottom: 1rem;
}

.founder-message {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: #f3f4f6;
  border: 2px solid #d1d5db;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.2);
}

.verify-instructions {
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.verify-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.verify-content {
  margin-bottom: 2rem;
}

.code-input-group {
  margin-bottom: 2rem;
}

.code-input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #1f2937);
  margin-bottom: 1rem;
  text-align: center;
}

.code-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.code-input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #1f2937);
  transition: all 0.2s ease;
  font-family: 'Monaco', 'Menlo', monospace;
}

.code-input:focus {
  outline: none;
  border-color: var(--primary-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: scale(1.05);
}

.code-input.filled {
  border-color: var(--primary-color, #667eea);
  background: rgba(102, 126, 234, 0.05);
}

.code-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.verify-timer {
  text-align: center;
  margin-bottom: 1.5rem;
}

.timer-active {
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  font-weight: 500;
}

.timer-expired {
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 600;
}

.verify-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary-color, #667eea);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
}

.verify-submit-btn:hover:not(:disabled) {
  background: var(--primary-hover, #5a67d8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.verify-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resend-btn,
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resend-btn {
  background: transparent;
  color: var(--primary-color, #667eea);
  border: 1px solid var(--primary-color, #667eea);
}

.resend-btn:hover:not(:disabled) {
  background: var(--primary-color, #667eea);
  color: white;
}

.resend-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-btn {
  background: transparent;
  color: var(--text-muted, #6b7280);
  border: 1px solid var(--border-color, #e5e7eb);
}

.back-btn:hover:not(:disabled) {
  background: var(--border-color, #e5e7eb);
  color: var(--text-color, #1f2937);
}

.back-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.verify-footer {
  border-top: 1px solid var(--border-color, #e5e7eb);
  padding-top: 1.5rem;
  text-align: center;
}

.verify-footer p {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Dark mode styles */
:root.dark-mode .verify-code-card {
  --card-bg: #1f2937;
  --text-color: #f9fafb;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --input-bg: #374151;
}

:root.dark-mode .verify-error {
  background: #7f1d1d;
  border-color: #dc2626;
  color: #fca5a5;
}

:root.dark-mode .code-input.filled {
  background: rgba(102, 126, 234, 0.1);
}

:root.dark-mode .resend-btn:hover:not(:disabled) {
  background: var(--primary-color, #667eea);
  color: white;
}

:root.dark-mode .back-btn:hover:not(:disabled) {
  background: var(--border-color, #374151);
  color: var(--text-color, #f9fafb);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .verify-code-container {
    padding: 1rem;
  }
  
  .verify-code-card {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
  
  .verify-header h1 {
    font-size: 1.5rem;
  }
  
  .verify-header p {
    font-size: 0.8rem;
  }
  
  .code-inputs {
    gap: 0.5rem;
  }
  
  .code-input {
    width: 45px;
    height: 55px;
    font-size: 1.25rem;
  }
  
  .verify-submit-btn {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  .resend-btn,
  .back-btn {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
  
  .verify-footer p {
    font-size: 0.7rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .code-input:focus {
    transform: none;
  }
  
  .verify-submit-btn:hover:not(:disabled) {
    transform: none;
  }
  
  .spinning {
    animation: none;
  }
}.set-password-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.set-password-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.set-password-header {
  text-align: center;
  margin-bottom: 32px;
}

.set-password-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  margin-bottom: 16px;
}

.set-password-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.set-password-header p {
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.set-password-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-field label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  background: white;
}

.password-input-wrapper input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input-wrapper input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #333;
}

.password-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.password-requirements {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.password-requirements h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-requirements li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: color 0.2s ease;
}

.password-requirements li.valid {
  color: #28a745;
}

.password-requirements li.invalid {
  color: #6c757d;
}

.password-requirements li svg {
  font-size: 12px;
  flex-shrink: 0;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  font-size: 14px;
  text-align: center;
}

.set-password-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.set-password-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.set-password-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.back-btn {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.back-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .set-password-container {
    padding: 16px;
  }
  
  .set-password-card {
    padding: 24px;
  }
  
  .set-password-header h1 {
    font-size: 24px;
  }
  
  .password-input-wrapper input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
}

.login-card {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-color, #e5e7eb);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.login-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color, #1f2937);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
}

.dev-notice {
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  color: #0369a1;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.oauth-login-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.oauth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.oauth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.github-login-btn {
  background: #24292e;
  color: white;
}

.github-login-btn:hover:not(:disabled) {
  background: #1c2125;
  box-shadow: 0 4px 12px rgba(36, 41, 46, 0.3);
}

.google-login-btn {
  background: #4285f4;
  color: white;
}

.google-login-btn:hover:not(:disabled) {
  background: #3367d6;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Deprecated - keeping for backwards compatibility */
.google-login-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-divider {
  position: relative;
  text-align: center;
  margin: 1rem 0;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color, #e5e7eb);
  z-index: 1;
}

.login-divider span {
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #6b7280);
  padding: 0 1rem;
  position: relative;
  z-index: 2;
  font-size: 0.875rem;
}

.email-login-toggle {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  color: var(--text-color, #1f2937);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-login-toggle:hover:not(:disabled) {
  border-color: var(--primary-color, #667eea);
  color: var(--primary-color, #667eea);
}

.email-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #1f2937);
}

.form-group input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #1f2937);
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover:not(:disabled) {
  color: var(--text-color, #1f2937);
}

.continue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--primary-color, #667eea);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.continue-btn:hover:not(:disabled) {
  background: var(--primary-hover, #5a67d8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.continue-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.signup-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: transparent;
  color: var(--primary-color, #667eea);
  border: 2px solid var(--primary-color, #667eea);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.signup-toggle-btn:hover:not(:disabled) {
  background: var(--primary-color, #667eea);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.signup-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.back-to-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--text-muted, #6b7280);
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.back-to-login-btn:hover:not(:disabled) {
  color: var(--text-color, #1f2937);
  background: var(--border-color, #e5e7eb);
}

.back-to-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.signup-form textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #1f2937);
  transition: border-color 0.2s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.signup-form textarea:focus {
  outline: none;
  border-color: var(--primary-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.signup-form textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #6b7280);
  z-index: 1;
}

.input-wrapper input {
  padding-left: 3rem !important;
}

.checkbox-group {
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-color, #1f2937);
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary-color, #667eea);
}

.checkbox-text {
  font-weight: 500;
}

.forgot-password-link {
  background: none;
  border: none;
  color: var(--primary-color, #667eea);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  padding: 0;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: var(--primary-hover, #5a67d8);
  text-decoration: underline;
}

.forgot-password-link:disabled {
  color: var(--text-muted, #6b7280);
  cursor: not-allowed;
}

.back-to-oauth {
  color: var(--text-muted, #6b7280);
  background: none;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  text-align: center;
  transition: color 0.2s ease;
}

.back-to-oauth:hover:not(:disabled) {
  color: var(--text-color, #1f2937);
}

/* Deprecated - keeping for backwards compatibility */
.back-to-google {
  color: var(--text-muted, #6b7280);
  background: none;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  text-align: center;
  transition: color 0.2s ease;
}

.back-to-google:hover:not(:disabled) {
  color: var(--text-color, #1f2937);
}

.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
  text-align: center;
}

.login-footer p {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

.login-footer a {
  color: var(--primary-color, #667eea);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Dark mode styles */
:root.dark-mode .login-card {
  --card-bg: #1f2937;
  --text-color: #f9fafb;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --input-bg: #374151;
}

:root.dark-mode .login-error {
  background: #7f1d1d;
  border-color: #dc2626;
  color: #fca5a5;
}

:root.dark-mode .login-divider span {
  background: var(--card-bg);
}

:root.dark-mode .signup-toggle-btn {
  border-color: var(--primary-color, #667eea);
  color: var(--primary-color, #667eea);
}

:root.dark-mode .signup-toggle-btn:hover:not(:disabled) {
  background: var(--primary-color, #667eea);
  color: white;
}

:root.dark-mode .back-to-login-btn:hover:not(:disabled) {
  background: var(--border-color, #374151);
  color: var(--text-color, #f9fafb);
}

:root.dark-mode .input-icon {
  color: var(--text-muted, #9ca3af);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
  
  .login-header h1 {
    font-size: 1.5rem;
  }
  
  .login-header p {
    font-size: 0.8rem;
  }
  
  .continue-btn,
  .signup-toggle-btn {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .form-group label {
    font-size: 0.8rem;
  }
  
  .form-group input,
  .signup-form textarea {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  .input-wrapper input {
    padding-left: 3rem !important;
  }
  
  .signup-form textarea {
    min-height: 80px;
  }
  
  .checkbox-label {
    font-size: 0.8rem;
  }
  
  .forgot-password-link {
    font-size: 0.8rem;
  }
}

/* Reset Password Modal Styles */
.reset-password-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.reset-password-modal {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color, #e5e7eb);
}

.reset-password-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 1.5rem;
}

.reset-password-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color, #1f2937);
  margin: 0;
}

.reset-password-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.reset-password-modal-close:hover {
  background: var(--gray-100, #f3f4f6);
  color: var(--text-color, #1f2937);
}

.reset-password-modal-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.reset-password-description {
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.reset-password-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.cancel-btn {
  background: var(--gray-100, #f3f4f6);
  color: var(--text-color, #1f2937);
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn:hover {
  background: var(--gray-200, #e5e7eb);
}

.cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.reset-btn {
  background: var(--primary-color, #667eea);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reset-btn:hover:not(:disabled) {
  background: var(--primary-hover, #5a67d8);
}

.reset-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.reset-success-message {
  background: #f0fdf4;
  border: 1px solid #22c55e;
  color: #15803d;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.reset-error-message {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .reset-password-modal-overlay {
    padding: 0.5rem;
  }
  
  .reset-password-modal {
    max-width: 100%;
  }
  
  .reset-password-modal-header,
  .reset-password-modal-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .reset-password-modal-actions {
    flex-direction: column;
  }
  
  .cancel-btn,
  .reset-btn {
    width: 100%;
    justify-content: center;
  }
}/* Drive Integration Component Styles - Light & Modern */
.drive-integration {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.drive-integration:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  border-color: var(--border-hover, #cbd5e1);
}

.drive-integration.connected {
  border-color: var(--success-color, #22c55e);
  background: var(--success-bg, #f0fdf4);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.integration-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.integration-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-light, #e8f4fd), var(--primary-lighter, #f0f9ff));
  color: var(--primary-color, #0ea5e9);
  border-radius: 12px;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.drive-integration.connected .integration-icon {
  background: linear-gradient(135deg, var(--success-light, #dcfce7), var(--success-lighter, #f0fdf4));
  color: var(--success-color, #22c55e);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.integration-info {
  flex: 1;
  min-width: 0;
}

.integration-info h3 {
  margin: 0 0 0.375rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color, #111827);
  letter-spacing: -0.025em;
}

.integration-info p {
  margin: 0 0 0.75rem 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.mode-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--info-bg, #eff6ff);
  color: var(--info-color, #1d4ed8);
  border: 1px solid var(--info-border, #bfdbfe);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Error Banner - Lighter & More Modern */
.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--error-bg, #fef7f7);
  border: 1px solid var(--error-border, #fed7d7);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(248, 113, 113, 0.1);
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.troubleshooting {
  margin-top: 0.75rem;
}

.troubleshooting summary {
  cursor: pointer;
  color: var(--error-color, #e11d48);
  font-weight: 600;
  font-size: 0.8125rem;
}

.troubleshooting code {
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--code-bg, #f8fafc);
  border: 1px solid var(--code-border, #e2e8f0);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--code-text, #475569);
  white-space: pre-wrap;
  overflow-x: auto;
}

.debug-btn {
  padding: 0.375rem 0.75rem;
  background: var(--debug-btn-bg, #f1f5f9);
  color: var(--debug-btn-color, #475569);
  border: 1px solid var(--debug-btn-border, #cbd5e1);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.debug-btn:hover {
  background: var(--debug-btn-hover, #e2e8f0);
}

.debug-panel {
  background: var(--debug-bg, #0f172a);
  color: var(--debug-text, #e2e8f0);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid var(--debug-border, #334155);
}

.debug-panel h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: var(--debug-title, #f1f5f9);
}

.debug-panel pre {
  margin: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
}

.error-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.error-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.error-details {
  flex: 1;
  min-width: 0;
}

.error-details strong {
  display: block;
  color: var(--error-color, #e11d48);
  font-weight: 700;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}

.error-details p {
  color: var(--error-text, #991b1b);
  margin: 0 0 0.375rem 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 500;
}

.error-code {
  display: inline-block;
  background: var(--code-bg, #f8fafc);
  color: var(--code-text, #475569);
  font-size: 0.75rem;
  font-family: var(--font-mono, 'JetBrains Mono', 'Monaco', monospace);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--code-border, #e2e8f0);
  margin-top: 0.375rem;
  font-weight: 600;
}

/* Integration Actions - Enhanced Buttons */
.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.connect-btn, .refresh-btn, .retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.connect-btn:disabled, .refresh-btn:disabled, .retry-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.google-btn {
  background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--primary-dark, #2563eb));
  color: white;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.google-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover, #2563eb), var(--primary-darker, #1d4ed8));
  border-color: var(--primary-hover, #2563eb);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.oauth-btn.secondary {
  background: var(--secondary-bg, #f8fafc);
  color: var(--secondary-text, #475569);
  border-color: var(--secondary-border, #e2e8f0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.oauth-btn.secondary:hover:not(:disabled) {
  background: var(--secondary-hover, #f1f5f9);
  color: var(--secondary-text-hover, #334155);
  border-color: var(--secondary-border-hover, #cbd5e1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.refresh-btn {
  background: linear-gradient(135deg, var(--success-color, #22c55e), var(--success-dark, #16a34a));
  color: white;
  border-color: var(--success-color, #22c55e);
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.refresh-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--success-hover, #16a34a), var(--success-darker, #15803d));
  border-color: var(--success-hover, #16a34a);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.retry-btn {
  background: linear-gradient(135deg, var(--warning-color, #f59e0b), var(--warning-dark, #d97706));
  color: white;
  border-color: var(--warning-color, #f59e0b);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.retry-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--warning-hover, #d97706), var(--warning-darker, #b45309));
  border-color: var(--warning-hover, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Integration Features - Enhanced Typography */
.integration-features {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--feature-bg, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--feature-border, #f1f5f9);
}

.integration-features h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-color, #0f172a);
  letter-spacing: -0.025em;
}

.integration-features ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.integration-features li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
  line-height: 1.4;
}

/* Drive Controls - Search and View Options */
.drive-controls {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--controls-bg, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--controls-border, #f1f5f9);
}

.drive-controls-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid var(--input-border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.875rem;
  background: var(--input-bg, #ffffff);
  color: var(--input-text, #0f172a);
  transition: all 0.15s ease;
  font-weight: 500;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #64748b);
  font-size: 1rem;
}

.view-controls {
  display: flex;
  gap: 0.25rem;
  background: var(--view-controls-bg, #ffffff);
  border: 1px solid var(--view-controls-border, #e2e8f0);
  border-radius: 6px;
  padding: 0.25rem;
}

.view-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--view-btn-text, #64748b);
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.15s ease;
  font-weight: 600;
}

.view-btn:hover {
  background: var(--view-btn-hover, #f1f5f9);
  color: var(--view-btn-hover-text, #334155);
}

.view-btn.active {
  background: var(--primary-color, #3b82f6);
  color: white;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.search-results {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--search-results-bg, #eff6ff);
  color: var(--search-results-text, #1e40af);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--search-results-border, #bfdbfe);
}

/* Enhanced Files Container */
.files-container {
  margin: 1.5rem 0;
}

.files-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.files-container.list-view {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* File Cards */
.file-card {
  background: var(--file-card-bg, #ffffff);
  border: 1px solid var(--file-card-border, #f1f5f9);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.file-card:hover {
  background: var(--file-card-hover, #f8fafc);
  border-color: var(--file-card-border-hover, #e2e8f0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.file-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grid-view .file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 160px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.list-view .file-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  min-height: 80px;
}

.file-icon-large {
  font-size: 3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.list-view .file-icon-large {
  font-size: 2rem;
  margin-bottom: 0;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.grid-view .file-details {
  width: 100%;
}

.file-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--file-name-color, #0f172a);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.file-link-text {
  color: var(--primary-color, #3b82f6);
  transition: color 0.15s ease;
  cursor: pointer;
}

.file-card:hover .file-link-text {
  color: var(--primary-hover, #2563eb);
}

.file-link {
  color: var(--primary-color, #3b82f6);
  text-decoration: none;
  transition: color 0.15s ease;
}

.file-link:hover {
  color: var(--primary-hover, #2563eb);
  text-decoration: underline;
}

.file-link:focus {
  outline: 2px solid var(--primary-color, #3b82f6);
  outline-offset: 2px;
  border-radius: 2px;
}

.grid-view .file-name {
  text-align: center;
}

.file-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary-light, #dbeafe), var(--primary-lighter, #eff6ff));
  color: var(--primary-color, #3b82f6);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
  border: 1px solid var(--primary-border, #bfdbfe);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.file-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--file-meta-color, #64748b);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.grid-view .file-meta {
  justify-content: center;
  flex-wrap: wrap;
}

.file-size, .file-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.grid-view .file-actions {
  justify-content: center;
}

.file-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--primary-hover, #2563eb));
  color: white;
  border: 1px solid var(--primary-color, #3b82f6);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.file-action-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover, #2563eb), var(--primary-darker, #1d4ed8));
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.open-icon {
  font-size: 0.875rem;
}

.open-text {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.list-view .file-actions {
  margin-top: 0;
  flex-shrink: 0;
}

.no-files {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--no-files-color, #64748b);
  font-size: 0.9375rem;
  font-weight: 500;
  background: var(--no-files-bg, #f8fafc);
  border-radius: 8px;
  border: 2px dashed var(--no-files-border, #cbd5e1);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--pagination-bg, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--pagination-border, #f1f5f9);
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--pagination-btn-border, #e2e8f0);
  background: var(--pagination-btn-bg, #ffffff);
  color: var(--pagination-btn-color, #334155);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--pagination-btn-hover, #f1f5f9);
  border-color: var(--pagination-btn-hover-border, #cbd5e1);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--pagination-info-color, #64748b);
  font-weight: 600;
  text-align: center;
  flex: 1;
}

/* Files Preview - Enhanced File Display */
.files-preview {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color, #f0f1f3);
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-color, #0f172a);
  background: var(--file-bg, #ffffff);
  border: 1px solid var(--file-border, #f1f5f9);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  transition: all 0.15s ease;
  font-weight: 500;
}

.file-item:hover {
  background: var(--file-hover, #f8fafc);
  border-color: var(--file-border-hover, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.file-item.more {
  color: var(--text-muted, #64748b);
  font-style: italic;
  justify-content: center;
  padding: 0.875rem;
  background: var(--more-bg, #f8fafc);
  border-style: dashed;
  border-color: var(--more-border, #cbd5e1);
  font-weight: 500;
}

.file-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* Responsive Design - Enhanced for new features */
@media (max-width: 768px) {
  .drive-controls-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .search-container {
    min-width: auto;
  }
  
  .view-controls {
    align-self: center;
  }
  
  .files-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
  }
  
  .pagination {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .pagination-info {
    order: -1;
  }
}

@media (max-width: 640px) {
  .integration-actions {
    flex-direction: column;
  }
  
  .connect-btn, .refresh-btn {
    width: 100%;
    justify-content: center;
  }
  
  .error-banner {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .retry-btn {
    align-self: flex-start;
  }
  
  .files-container.grid-view {
    grid-template-columns: 1fr;
  }
  
  .file-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Dark Mode Support - Enhanced for new features */
@media (prefers-color-scheme: dark) {
  .drive-integration {
    --card-bg: #1e293b;
    --border-color: #334155;
    --border-hover: #475569;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-light: #1e3a8a;
    --primary-lighter: #1e40af;
    --success-bg: #022c22;
    --success-light: #064e3b;
    --success-lighter: #065f46;
    --error-bg: #451a03;
    --error-border: #92400e;
    --error-text: #fbbf24;
    --info-bg: #172554;
    --info-bg-alt: #1e3a8a;
    --info-border: #3730a3;
    --feature-bg: #0f172a;
    --feature-border: #1e293b;
    --file-bg: #0f172a;
    --file-border: #334155;
    --file-hover: #1e293b;
    --file-border-hover: #475569;
    --more-bg: #0f172a;
    --more-border: #475569;
    --secondary-bg: #334155;
    --secondary-border: #475569;
    --secondary-hover: #475569;
    --code-bg: #0f172a;
    --code-border: #334155;
    --code-text: #94a3b8;
    
    /* New dark mode variables for enhanced features */
    --controls-bg: #0f172a;
    --controls-border: #334155;
    --input-bg: #1e293b;
    --input-border: #475569;
    --input-text: #f1f5f9;
    --view-controls-bg: #1e293b;
    --view-controls-border: #475569;
    --view-btn-text: #94a3b8;
    --view-btn-hover: #334155;
    --view-btn-hover-text: #f1f5f9;
    --search-results-bg: #172554;
    --search-results-text: #60a5fa;
    --search-results-border: #1d4ed8;
    --file-card-bg: #1e293b;
    --file-card-border: #334155;
    --file-card-hover: #334155;
    --file-card-border-hover: #475569;
    --file-name-color: #f1f5f9;
    --file-meta-color: #94a3b8;
    --action-btn-bg: #334155;
    --action-btn-color: #94a3b8;
    --action-btn-border: #475569;
    --action-btn-hover: #475569;
    --action-btn-hover-color: #f1f5f9;
    --action-btn-hover-border: #64748b;
    --no-files-color: #94a3b8;
    --no-files-bg: #0f172a;
    --no-files-border: #475569;
    --pagination-bg: #0f172a;
    --pagination-border: #334155;
    --pagination-btn-bg: #1e293b;
    --pagination-btn-border: #475569;
    --pagination-btn-color: #f1f5f9;
    --pagination-btn-hover: #334155;
    --pagination-btn-hover-border: #64748b;
    --pagination-info-color: #94a3b8;
  }
}.employee-search-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.dropdown-trigger:hover {
  border-color: #d1d5db;
}

.dropdown-trigger.open {
  border-color: #3b82f6;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.dropdown-trigger.has-value {
  border-color: #10b981;
}

.selected-employee {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.employee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.employee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-avatar svg {
  color: #9ca3af;
  font-size: 16px;
}

.employee-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.employee-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.employee-email {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.placeholder {
  color: #9ca3af;
  font-size: 14px;
}

.dropdown-arrow {
  color: #6b7280;
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #3b82f6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow: hidden;
}

.search-container {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: #3b82f6;
}

.employees-list {
  max-height: 240px;
  overflow-y: auto;
}

.employee-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.employee-item:hover {
  background-color: #f8fafc;
}

.employee-item:last-child {
  border-bottom: none;
}

.employee-item .employee-info {
  flex: 1;
}

.employee-role {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: capitalize;
  flex-shrink: 0;
}

.loading-item,
.error-item,
.no-results {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.error-item {
  color: #dc2626;
}

.no-results {
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
    max-height: 50vh;
  }
  
  .search-container {
    padding: 16px;
  }
  
  .employee-item {
    padding: 16px;
  }
  
  .employee-avatar {
    width: 36px;
    height: 36px;
  }
  
  .employee-name {
    font-size: 15px;
  }
  
  .employee-email {
    font-size: 13px;
  }
}/* Messaging Center Styles */
.messaging-center {
  display: flex;
  height: 100%;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}

.messaging-center.loading {
  align-items: center;
  justify-content: center;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted, #6b7280);
}

.loading-icon {
  font-size: 3rem;
  color: var(--primary-color, #3b82f6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Sidebar */
.messaging-sidebar {
  width: 300px;
  min-width: 300px;
  background: var(--background-light, #f8fafc);
  border-right: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  flex-direction: column;
}

.messaging-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.messaging-header h3 {
  margin: 0;
  color: var(--text-color, #111827);
  font-size: 1.125rem;
  font-weight: 700;
}

.new-message-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.new-message-btn:hover {
  background: var(--primary-hover, #2563eb);
  transform: scale(1.05);
}

/* Thread Search */
.thread-search {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.search-input-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.875rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Threads List */
.threads-list {
  flex: 1;
  overflow-y: auto;
}

.no-threads {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.no-threads .empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted, #6b7280);
}

.start-conversation-btn {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.start-conversation-btn:hover {
  background: var(--primary-hover, #2563eb);
}

/* Thread Item */
.thread-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  transition: all 0.15s ease;
  position: relative;
}

.thread-item:hover {
  background: var(--background-lighter, #f1f5f9);
}

.thread-item.active {
  background: var(--primary-light, #dbeafe);
  border-left: 3px solid var(--primary-color, #3b82f6);
}

.thread-avatar {
  color: var(--text-muted, #6b7280);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.thread-content {
  flex: 1;
  min-width: 0;
}

.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.thread-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #111827);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-time {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}

.thread-preview {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.unread-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* Main Chat Area */
.messaging-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #ffffff);
}

.no-active-thread {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted, #6b7280);
  text-align: center;
}

.no-active-thread .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-active-thread h3 {
  margin-bottom: 0.5rem;
  color: var(--text-color, #111827);
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--background-light, #f8fafc);
}

.chat-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  font-size: 1.5rem;
  color: var(--text-muted, #6b7280);
}

.chat-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

.chat-info p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

.chat-options {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-options:hover {
  background: var(--background-light, #f8fafc);
  color: var(--text-color, #111827);
}

/* Messages Container */
.messages-container {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.no-messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted, #6b7280);
  text-align: center;
}

.no-messages .empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.empty-subtitle {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Message */
.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.message.own-message {
  flex-direction: row-reverse;
}

.message-avatar {
  font-size: 1.25rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.25rem;
}

.message-content {
  max-width: 70%;
  min-width: 0;
}

.own-message .message-content {
  align-items: flex-end;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.own-message .message-header {
  flex-direction: row-reverse;
}

.message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

.message-time {
  font-size: 0.625rem;
  color: var(--text-muted, #6b7280);
}

.message-text {
  background: var(--background-light, #f8fafc);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-color, #111827);
  word-wrap: break-word;
}

.own-message .message-text {
  background: var(--primary-color, #3b82f6);
  color: white;
}

/* Message Form */
.message-form {
  padding: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--background-light, #f8fafc);
}

.message-input-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.message-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.875rem;
  resize: none;
}

.message-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.send-button:hover:not(:disabled) {
  background: var(--primary-hover, #2563eb);
  transform: scale(1.05);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-bg, #ffffff);
  border-radius: 12px;
  padding: 0;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-color, #111827);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--background-light, #f8fafc);
  color: var(--text-color, #111827);
}

/* New Thread Form */
.new-thread-form {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.875rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cancel-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  color: var(--text-color, #111827);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.cancel-btn:hover {
  background: var(--background-light, #f8fafc);
}

.create-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.create-btn:hover:not(:disabled) {
  background: var(--primary-hover, #2563eb);
}

.create-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .messaging-center {
    flex-direction: column;
  }

  .messaging-sidebar {
    width: 100%;
    min-width: auto;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
  }

  .threads-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .thread-item {
    min-width: 200px;
    border-bottom: none;
    border-right: 1px solid var(--border-light, #f1f5f9);
  }

  .message-content {
    max-width: 85%;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --background-light: #334155;
    --background-lighter: #475569;
    --border-color: #475569;
    --border-light: #334155;
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #1e3a8a;
  }
}/* Admin Panel Styles */
.admin-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}

.admin-panel.loading,
.admin-panel.error {
  align-items: center;
  justify-content: center;
}

.loading-content,
.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.loading-icon {
  font-size: 3rem;
  color: var(--primary-color, #3b82f6);
  animation: pulse 2s infinite;
}

.error-icon {
  font-size: 3rem;
  color: var(--error-color, #ef4444);
}

.error-content h3 {
  color: var(--text-color, #111827);
  margin: 0;
}

.retry-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.retry-btn:hover {
  background: var(--primary-hover, #2563eb);
}

/* Header */
.admin-header {
  padding: 1.5rem;
  background: var(--background-light, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.admin-header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color, #111827);
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-header p {
  margin: 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
}

/* Tabs */
.admin-tabs {
  display: flex;
  background: var(--background-lighter, #f1f5f9);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
}

.tab-button:hover {
  background: var(--background-light, #f8fafc);
  color: var(--text-color, #111827);
}

.tab-button.active {
  background: var(--card-bg, #ffffff);
  color: var(--primary-color, #3b82f6);
  border-bottom-color: var(--primary-color, #3b82f6);
}

/* Controls */
.admin-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.875rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.add-user-btn:hover {
  background: var(--primary-hover, #2563eb);
}

/* Tables */
.users-table,
.allowlist-table {
  flex: 1;
  overflow-y: auto;
  background: var(--card-bg, #ffffff);
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 1rem 1.5rem;
  background: var(--background-light, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #6b7280);
}

.allowlist-table .table-header {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  transition: all 0.15s ease;
  align-items: center;
}

.allowlist-table .table-row {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.table-row:hover {
  background: var(--background-light, #f8fafc);
}

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color, #e2e8f0);
}

.user-info h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

.user-info p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

/* Email Cell */
.email-cell h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

/* Role Cell */
.role-cell {
  display: flex;
  align-items: center;
}

.role-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.role-badge.cofounder {
  background: #fef3c7;
  color: #92400e;
}

.role-badge.employee {
  background: #dbeafe;
  color: #1e40af;
}

.role-badge.customer {
  background: #d1fae5;
  color: #065f46;
}

.role-badge.default {
  background: var(--background-light, #f8fafc);
  color: var(--text-muted, #6b7280);
}

.role-icon {
  font-size: 0.75rem;
}

.role-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.75rem;
}

.role-select:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
}

/* Date Cell */
.date-cell {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

/* Actions Cell */
.actions-cell {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.75rem;
}

.action-btn.edit {
  color: var(--primary-color, #3b82f6);
  border-color: var(--primary-color, #3b82f6);
}

.action-btn.edit:hover {
  background: var(--primary-color, #3b82f6);
  color: white;
}

.action-btn.delete {
  color: var(--error-color, #ef4444);
  border-color: var(--error-color, #ef4444);
}

.action-btn.delete:hover {
  background: var(--error-color, #ef4444);
  color: white;
}

.action-btn.cancel {
  color: var(--text-muted, #6b7280);
  border-color: var(--border-color, #e2e8f0);
}

.action-btn.cancel:hover {
  background: var(--background-light, #f8fafc);
  color: var(--text-color, #111827);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-muted, #6b7280);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text-color, #111827);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-bg, #ffffff);
  border-radius: 12px;
  padding: 0;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-color, #111827);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--background-light, #f8fafc);
  color: var(--text-color, #111827);
}

/* Add User Form */
.add-user-form {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #111827);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #111827);
  font-size: 0.875rem;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cancel-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  color: var(--text-color, #111827);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.cancel-btn:hover {
  background: var(--background-light, #f8fafc);
}

.add-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.add-btn:hover:not(:disabled) {
  background: var(--primary-hover, #2563eb);
}

.add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-container {
    max-width: none;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .header-cell:not(:first-child),
  .role-cell,
  .date-cell,
  .actions-cell {
    display: none;
  }

  .user-cell,
  .email-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .user-info,
  .role-badge {
    align-self: stretch;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --card-bg: #111827;
    --text-color: #f9fafb;
    --text-muted: #d1d5db;
    --background-light: #1f2937;
    --background-lighter: #374151;
    --border-color: #374151;
    --border-light: #1f2937;
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --error-color: #f87171;
  }
  
  /* Override specific elements for better dark mode contrast */
  .admin-panel {
    background: var(--card-bg);
    border-color: var(--border-color);
  }
  
  .admin-header {
    background: var(--background-light);
    border-bottom-color: var(--border-color);
  }
  
  .admin-tabs {
    background: var(--background-lighter);
    border-bottom-color: var(--border-color);
  }
  
  .tab-button.active {
    background: var(--card-bg);
    color: var(--primary-color);
  }
  
  .table-header {
    background: var(--background-light);
    border-bottom-color: var(--border-color);
    color: var(--text-muted);
  }
  
  .table-row {
    border-bottom-color: var(--border-light);
  }
  
  .table-row:hover {
    background: var(--background-light);
  }
  
  .user-avatar {
    border-color: var(--border-color);
  }
  
  .search-input {
    background: var(--background-light);
    border-color: var(--border-color);
    color: var(--text-color);
  }
  
  .search-input::placeholder {
    color: var(--text-muted);
  }
  
  .role-select {
    background: var(--background-light);
    border-color: var(--border-color);
    color: var(--text-color);
  }
  
  .action-btn {
    background: var(--background-light);
    border-color: var(--border-color);
  }
  
  .action-btn.cancel:hover {
    background: var(--background-lighter);
  }
  
  /* Role badges with better dark mode colors */
  .role-badge.cofounder {
    background: #451a03;
    color: #fbbf24;
    border: 1px solid #78350f;
  }

  .role-badge.employee {
    background: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #1d4ed8;
  }

  .role-badge.customer {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #047857;
  }

  .role-badge.default {
    background: var(--background-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
  }
  
  /* Modal dark mode */
  .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
  }
  
  .modal-header {
    border-bottom-color: var(--border-color);
  }
  
  .form-group input,
  .form-group select {
    background: var(--background-light);
    border-color: var(--border-color);
    color: var(--text-color);
  }
  
  .cancel-btn {
    background: var(--background-light);
    border-color: var(--border-color);
    color: var(--text-color);
  }
  
  .cancel-btn:hover {
    background: var(--background-lighter);
  }
}

/* Class-based dark mode support */
:root.dark-mode {
  --card-bg: #111827;
  --text-color: #f9fafb;
  --text-muted: #d1d5db;
  --background-light: #1f2937;
  --background-lighter: #374151;
  --border-color: #374151;
  --border-light: #1f2937;
  --primary-color: #60a5fa;
  --primary-hover: #3b82f6;
  --error-color: #f87171;
}

:root.dark-mode .admin-panel {
  background: var(--card-bg);
  border-color: var(--border-color);
}

:root.dark-mode .admin-header {
  background: var(--background-light);
  border-bottom-color: var(--border-color);
}

:root.dark-mode .admin-tabs {
  background: var(--background-lighter);
  border-bottom-color: var(--border-color);
}

:root.dark-mode .tab-button.active {
  background: var(--card-bg);
  color: var(--primary-color);
}

:root.dark-mode .table-header {
  background: var(--background-light);
  border-bottom-color: var(--border-color);
  color: var(--text-muted);
}

:root.dark-mode .table-row {
  border-bottom-color: var(--border-light);
}

:root.dark-mode .table-row:hover {
  background: var(--background-light);
}

:root.dark-mode .user-avatar {
  border-color: var(--border-color);
}

:root.dark-mode .search-input {
  background: var(--background-light);
  border-color: var(--border-color);
  color: var(--text-color);
}

:root.dark-mode .search-input::placeholder {
  color: var(--text-muted);
}

:root.dark-mode .role-select {
  background: var(--background-light);
  border-color: var(--border-color);
  color: var(--text-color);
}

:root.dark-mode .action-btn {
  background: var(--background-light);
  border-color: var(--border-color);
}

:root.dark-mode .action-btn.cancel:hover {
  background: var(--background-lighter);
}

:root.dark-mode .role-badge.cofounder {
  background: #451a03;
  color: #fbbf24;
  border: 1px solid #78350f;
}

:root.dark-mode .role-badge.employee {
  background: #1e3a8a;
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}

:root.dark-mode .role-badge.customer {
  background: #064e3b;
  color: #6ee7b7;
  border: 1px solid #047857;
}

:root.dark-mode .role-badge.default {
  background: var(--background-light);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

:root.dark-mode .modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

:root.dark-mode .modal-header {
  border-bottom-color: var(--border-color);
}

:root.dark-mode .form-group input,
:root.dark-mode .form-group select {
  background: var(--background-light);
  border-color: var(--border-color);
  color: var(--text-color);
}

:root.dark-mode .cancel-btn {
  background: var(--background-light);
  border-color: var(--border-color);
  color: var(--text-color);
}

:root.dark-mode .cancel-btn:hover {
  background: var(--background-lighter);
}/* Search Preview Modal Styles */
.search-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.search-preview-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid #ecf0f1;
  background: #f8f9fa;
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.source-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 4px;
}

.header-info h2 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.source-type {
  background: #3498db;
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.favorite-btn, .close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn {
  color: #bdc3c7;
  font-size: 1.2rem;
}

.favorite-btn:hover {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.favorite-btn.favorited {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.close-btn {
  color: #7f8c8d;
  font-size: 1.1rem;
}

.close-btn:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.content-section {
  margin-bottom: 32px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h3 {
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.description {
  color: #34495e;
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
}

.content-preview {
  background: #f8f9fa;
  border: 1px solid #ecf0f1;
  border-radius: 8px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #2c3e50;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Source-specific content */
.source-content {
  background: #fff;
  border: 1px solid #ecf0f1;
  border-radius: 8px;
  padding: 20px;
}

.source-content h4 {
  margin: 0 0 16px 0;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-label {
  font-weight: 500;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.detail-value {
  color: #2c3e50;
  font-weight: 500;
}

.language-badge, .category-badge {
  background: #27ae60;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.category-badge {
  background: #9b59b6;
}

.repo-stats {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}

.stat {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topic-tag {
  background: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.canonical-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f39c12;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 12px;
}

/* Tags */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Collections */
.collections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.collection-icon {
  font-size: 1.1rem;
}

.collection-name {
  font-weight: 500;
  color: #2c3e50;
}

/* Related items */
.related-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ecf0f1;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.related-item:hover {
  background-color: #f8f9fa;
}

.related-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.related-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related-title {
  font-weight: 500;
  color: #2c3e50;
  font-size: 0.9rem;
}

.related-type {
  font-size: 0.8rem;
  color: #7f8c8d;
  text-transform: capitalize;
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.stat-icon {
  color: #3498db;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: #7f8c8d;
  font-weight: 500;
}

/* Loading and error states */
.loading-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.spinner {
  animation: spin 1s linear infinite;
  font-size: 2rem;
  color: #3498db;
  margin-bottom: 16px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.error-message {
  color: #e74c3c;
  margin-bottom: 16px;
  font-weight: 500;
}

.retry-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.retry-btn:hover {
  background: #2980b9;
}

/* Footer */
.preview-footer {
  padding: 20px 24px;
  border-top: 1px solid #ecf0f1;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
}

.open-external-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #3498db;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.open-external-btn:hover {
  background: #2980b9;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-preview-overlay {
    padding: 10px;
  }

  .search-preview-modal {
    max-height: 95vh;
  }

  .preview-header {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .header-left {
    flex-direction: column;
    gap: 12px;
  }

  .header-actions {
    align-self: flex-end;
  }

  .preview-content {
    padding: 16px;
  }

  .content-section {
    margin-bottom: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .repo-stats {
    flex-direction: column;
    gap: 8px;
  }

  .preview-footer {
    padding: 16px;
  }

  .open-external-btn {
    width: 100%;
    justify-content: center;
  }
}/* Collection Modal Styles */
.collection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.collection-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #ecf0f1;
  background: #f8f9fa;
}

.modal-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #7f8c8d;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.close-btn:hover:not(:disabled) {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-form {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.error-message {
  background: #ffe6e6;
  color: #e74c3c;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.form-group input:disabled,
.form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Icon Selector */
.icon-selector {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 12px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  background: #f8f9fa;
}

.icon-option {
  background: white;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-option:hover:not(:disabled) {
  border-color: #bdc3c7;
  transform: scale(1.05);
}

.icon-option.selected {
  border-color: #3498db;
  background: #ebf3fd;
  transform: scale(1.05);
}

.icon-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Color Selector */
.color-selector {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 12px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  background: #f8f9fa;
}

.color-option {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.color-option:hover:not(:disabled) {
  transform: scale(1.1);
  border-color: #bdc3c7;
}

.color-option.selected {
  transform: scale(1.1);
  border-color: #2c3e50;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #2c3e50;
}

.color-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.checkbox-label:hover {
  border-color: #bdc3c7;
  background: white;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-icon {
  color: #7f8c8d;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-icon {
  color: #3498db;
}

.checkbox-text {
  font-weight: 500;
  color: #2c3e50;
  flex: 1;
}

.help-text {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-top: 4px;
  line-height: 1.4;
}

/* Preview Section */
.preview-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #ecf0f1;
}

.preview-section label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: block;
}

.collection-preview {
  background: white;
  border: 2px solid #ecf0f1;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.preview-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1rem;
}

.preview-description {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.preview-visibility {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7f8c8d;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid #ecf0f1;
  background: #f8f9fa;
}

.primary-actions {
  display: flex;
  gap: 12px;
}

.cancel-btn,
.save-btn,
.delete-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cancel-btn {
  background: white;
  color: #7f8c8d;
  border: 2px solid #bdc3c7;
}

.cancel-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #7f8c8d;
  color: #2c3e50;
}

.save-btn {
  background: #3498db;
  color: white;
  border: 2px solid #3498db;
}

.save-btn:hover:not(:disabled) {
  background: #2980b9;
  border-color: #2980b9;
}

.save-btn:disabled {
  background: #bdc3c7;
  border-color: #bdc3c7;
  cursor: not-allowed;
  opacity: 0.6;
}

.delete-btn {
  background: #e74c3c;
  color: white;
  border: 2px solid #e74c3c;
}

.delete-btn:hover:not(:disabled) {
  background: #c0392b;
  border-color: #c0392b;
}

.delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .collection-modal-overlay {
    padding: 10px;
  }

  .collection-modal {
    max-height: 95vh;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }

  .modal-form {
    padding: 16px;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .icon-selector {
    grid-template-columns: repeat(6, 1fr);
  }

  .color-selector {
    grid-template-columns: repeat(6, 1fr);
  }

  .color-option {
    width: 35px;
    height: 35px;
  }

  .modal-actions {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
  }

  .primary-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cancel-btn,
  .save-btn {
    flex: 1;
    justify-content: center;
  }

  .delete-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .icon-selector {
    grid-template-columns: repeat(4, 1fr);
  }

  .color-selector {
    grid-template-columns: repeat(4, 1fr);
  }
}/* Knowledge Dashboard Styles */
.knowledge-dashboard {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h1 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 2.2rem;
  font-weight: 600;
}

.dashboard-header p {
  color: #7f8c8d;
  font-size: 1.1rem;
  margin: 0;
}

/* Tabs */
.dashboard-tabs {
  display: flex;
  border-bottom: 2px solid #ecf0f1;
  margin-bottom: 30px;
  gap: 8px;
}

.tab {
  padding: 12px 20px;
  border: none;
  background: none;
  color: #7f8c8d;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab:hover {
  color: #2c3e50;
  background-color: #f8f9fa;
}

.tab.active {
  color: #3498db;
  background-color: #fff;
  border-bottom: 2px solid #3498db;
  margin-bottom: -2px;
}

/* Overview Tab */
.knowledge-overview {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #ecf0f1;
}

.stat-card h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 8px 0;
}

.stat-card p {
  color: #7f8c8d;
  font-weight: 500;
  margin: 0;
  font-size: 0.95rem;
}

.overview-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.overview-section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #ecf0f1;
}

.overview-section h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 600;
}

.sources-list, .recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.source-item, .recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.source-item:hover, .recent-item:hover {
  background-color: #f8f9fa;
}

.source-icon, .item-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.source-info, .item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.source-name, .item-name {
  font-weight: 500;
  color: #2c3e50;
  text-transform: capitalize;
}

.source-count, .item-time {
  font-size: 0.85rem;
  color: #7f8c8d;
}

/* Search Tab */
.knowledge-search {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-header {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #ecf0f1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
}

.search-icon {
  color: #7f8c8d;
  font-size: 1.2rem;
}

.search-btn {
  padding: 12px 24px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn:hover:not(:disabled) {
  background: #2980b9;
}

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select, .filter-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 120px;
}

.apply-filters-btn {
  padding: 8px 16px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.apply-filters-btn:hover:not(:disabled) {
  background: #219a52;
}

.search-results {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #ecf0f1;
  overflow: hidden;
}

.results-header {
  padding: 20px 24px;
  border-bottom: 1px solid #ecf0f1;
  background: #f8f9fa;
}

.results-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
}

.results-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* Item Cards */
.knowledge-item-card {
  background: #fff;
  border: 1px solid #ecf0f1;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.knowledge-item-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.item-source {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-icon {
  font-size: 1.1rem;
}

.source-type {
  font-size: 0.85rem;
  color: #7f8c8d;
  font-weight: 500;
  text-transform: capitalize;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.favorite-btn {
  background: none;
  border: none;
  color: #bdc3c7;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.favorite-btn:hover {
  color: #f39c12;
}

.favorite-btn.favorited {
  color: #f39c12;
}

.item-content {
  margin-bottom: 16px;
}

.item-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.item-title a {
  color: #2c3e50;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-title a:hover {
  color: #3498db;
}

.external-link {
  font-size: 0.8rem;
  opacity: 0.6;
}

.item-description, .item-preview {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 8px 0;
}

.item-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.tags-icon {
  color: #95a5a6;
  font-size: 0.8rem;
}

.tag {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-more {
  background: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #7f8c8d;
}

.item-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-type {
  background: #95a5a6;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.item-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Collections Tab */
.knowledge-collections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.collections-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collections-header h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.create-collection-btn, .create-first-collection-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.create-collection-btn:hover, .create-first-collection-btn:hover {
  background: #2980b9;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.collection-card {
  background: #fff;
  border: 1px solid #ecf0f1;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.collection-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.collection-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.collection-icon {
  font-size: 1.5rem;
}

.collection-header h3 {
  margin: 0;
  flex: 1;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
}

.pinned-icon {
  color: #f39c12;
  font-size: 0.9rem;
}

.collection-description {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.collection-stats {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.public-badge {
  background: #27ae60;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.collection-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #7f8c8d;
}

/* Favorites and Recent Tabs */
.knowledge-favorites, .knowledge-recent {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.favorites-header, .recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.favorites-header h2, .recent-header h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.favorites-count, .recent-count {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
}

.favorites-grid, .recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.favorite-info, .recent-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #7f8c8d;
}

.favorite-notes {
  color: #2c3e50;
  font-style: italic;
  margin: 4px 0 0 0;
  font-size: 0.85rem;
}

.view-count, .duration {
  font-size: 0.8rem;
  color: #95a5a6;
}

/* Loading and Empty States */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.spinner {
  animation: spin 1s linear infinite;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #7f8c8d;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.empty-state p {
  margin-bottom: 20px;
  max-width: 300px;
}

.error-message {
  background: #ffeaea;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.error-message p {
  color: #c0392b;
  margin: 0;
  font-weight: 500;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #7f8c8d;
}

.no-results p {
  margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .knowledge-dashboard {
    padding: 16px;
  }
  
  .dashboard-tabs {
    flex-direction: column;
    gap: 4px;
  }
  
  .tab {
    border-radius: 8px;
    margin-bottom: 0;
  }
  
  .overview-sections {
    grid-template-columns: 1fr;
  }
  
  .overview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .search-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-select, .filter-input {
    min-width: auto;
  }
  
  .results-grid, .collections-grid, .favorites-grid, .recent-grid {
    grid-template-columns: 1fr;
  }
  
  .collections-header, .favorites-header, .recent-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}

/* Additional Interactive Styles */

/* Clickable Item Cards */
.knowledge-item-card.clickable {
  position: relative;
}

.knowledge-item-card.clickable::before {
  content: 'Click to preview';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(52, 73, 94, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.knowledge-item-card.clickable:hover::before {
  opacity: 1;
}

/* External Link Button */
.external-btn {
  background: none;
  border: none;
  color: #7f8c8d;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.external-btn:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

/* Collection Actions */
.collection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-btn, .delete-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  opacity: 0;
}

.collection-card:hover .edit-btn,
.collection-card:hover .delete-btn {
  opacity: 1;
}

.edit-btn {
  color: #7f8c8d;
}

.edit-btn:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

.delete-btn {
  color: #7f8c8d;
}

.delete-btn:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.pinned-icon {
  color: #f39c12;
  font-size: 0.9rem;
}

/* Public Badge with Icon */
.public-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #27ae60;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Collection Header Layout Update */
.collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.collection-header .collection-actions {
  margin-left: auto;
}

/* Button Accessibility */
.edit-btn:focus,
.delete-btn:focus,
.external-btn:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Loading State for Modals */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}/* SearchInput component styles */

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-text, #64748b);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
  color: var(--secondary-text, #64748b);
}

.clear-button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary-text, #64748b);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.clear-button:hover {
  background: var(--secondary-bg, #f1f5f9);
  color: var(--text-color, #0f172a);
}

.clear-button:focus {
  outline: none;
  background: var(--secondary-bg, #f1f5f9);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Size variants */
.search-input-container.small .search-input {
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  font-size: 0.8rem;
}

.search-input-container.small .search-icon {
  left: 0.5rem;
}

.search-input-container.small .clear-button {
  right: 0.5rem;
}

.search-input-container.large .search-input {
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
}

.search-input-container.large .search-icon {
  left: 1rem;
}

.search-input-container.large .clear-button {
  right: 1rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .search-input {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border-dark, #334155);
    color: var(--text-dark, #f1f5f9);
  }
  
  .search-input::placeholder {
    color: var(--text-secondary-dark, #94a3b8);
  }
}/* Reset Password Page Styles */
.reset-password-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--hero-from, #667eea) 0%, var(--hero-to, #764ba2) 100%);
}

.reset-password-card {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border-color, #e5e7eb);
}

.reset-password-header {
  text-align: center;
  margin-bottom: 2rem;
}

.reset-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.success-icon {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 1rem;
}

.error-icon {
  font-size: 3rem;
  color: #ef4444;
  margin-bottom: 1rem;
}

.reset-password-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color, #1f2937);
  margin-bottom: 0.5rem;
}

.security-icon {
  font-size: 3rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.security-icon-small {
  font-size: 1rem;
  color: #3b82f6;
  margin-right: 0.5rem;
}

.user-info {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.success-card {
  max-width: 560px;
}

.success-details {
  margin: 1.5rem 0;
}

.security-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #065f46;
}

.sign-in-instructions {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.sign-in-instructions h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #365314;
  margin-bottom: 0.5rem;
}

.signin-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.signin-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #fef08a;
}

.signin-list li:last-child {
  border-bottom: none;
}

.security-tips {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.security-tips h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}

.security-tips ul {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  padding-left: 1rem;
}

.security-tips li {
  margin: 0.25rem 0;
}

.reset-password-header p {
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.5;
}

.reset-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.reset-password-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-color, #1f2937);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
}

.input-wrapper input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #1f2937);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input:disabled {
  background: var(--gray-50, #f9fafb);
  color: var(--text-muted, #6b7280);
  cursor: not-allowed;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
}

.strength-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.25rem;
}

.strength-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

.strength-0 .strength-fill { width: 0%; background: #e5e7eb; }
.strength-1 .strength-fill { width: 20%; background: #ef4444; }
.strength-2 .strength-fill { width: 40%; background: #f97316; }
.strength-3 .strength-fill { width: 60%; background: #eab308; }
.strength-4 .strength-fill { width: 80%; background: #22c55e; }
.strength-5 .strength-fill { width: 100%; background: #16a34a; }

.strength-text {
  font-size: 0.75rem;
  font-weight: 500;
}

.strength-0 .strength-text { color: #6b7280; }
.strength-1 .strength-text { color: #ef4444; }
.strength-2 .strength-text { color: #f97316; }
.strength-3 .strength-text { color: #eab308; }
.strength-4 .strength-text { color: #22c55e; }
.strength-5 .strength-text { color: #16a34a; }

/* Password Mismatch */
.password-mismatch {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

/* Password Requirements */
.password-requirements {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.password-requirements h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-requirements li {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.password-requirements li:before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #ef4444;
}

.password-requirements li.met {
  color: #16a34a;
}

.password-requirements li.met:before {
  content: "✓";
  color: #16a34a;
}

.reset-submit-btn {
  width: 100%;
  background: var(--primary-color, #667eea);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.reset-submit-btn:hover:not(:disabled) {
  background: var(--primary-hover, #5a67d8);
}

.reset-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.reset-password-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.back-to-login-btn,
.login-now-btn {
  background: var(--primary-color, #667eea);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.back-to-login-btn:hover,
.login-now-btn:hover {
  background: var(--primary-hover, #5a67d8);
}

.reset-footer {
  text-align: center;
  border-top: 1px solid var(--border-color, #e5e7eb);
  padding-top: 1.5rem;
}

.back-to-login-link {
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.back-to-login-link:hover:not(:disabled) {
  color: var(--primary-color, #667eea);
}

.back-to-login-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* New Button Styles */
.sign-in-btn, .home-btn {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
}

.sign-in-btn.primary {
  background: #22c55e;
  color: white;
}

.sign-in-btn.primary:hover {
  background: #16a34a;
}

.home-btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.home-btn.secondary:hover {
  background: #e5e7eb;
}

.back-to-home-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-left: 0.5rem;
}

.back-to-home-btn:hover {
  background: #e5e7eb;
}

.reset-password-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 1rem;
}

@media (max-width: 480px) {
  .reset-password-container {
    padding: 1rem;
  }
  
  .reset-password-card {
    padding: 2rem;
    max-width: 100%;
  }
  
  .reset-password-header h1 {
    font-size: 1.5rem;
  }
  
  .input-wrapper input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
  }

  .reset-password-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .password-requirements {
    padding: 0.75rem;
  }

  .sign-in-instructions {
    padding: 1rem;
  }
}/* DocsLayout.css - Unified layout for all documentation pages */

/* Light mode theme variables */
:root.light-mode {
  --card-background: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --background-light: #f8f9fa;
  --border-light: #e9ecef;
  --border-color: #e0e0e0;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --card-bg: #f8fafc;
  --code-background: #f8fafc;
  --callout-info-bg: rgba(59, 130, 246, 0.05);
  --callout-info-border: #3b82f6;
  --callout-warning-bg: rgba(245, 158, 11, 0.05);
  --callout-warning-border: #f59e0b;
  --callout-success-bg: rgba(16, 185, 129, 0.05);
  --callout-success-border: #10b981;
}

/* Dark mode theme variables */
:root.dark-mode {
  --card-background: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --background-light: #334155;
  --border-light: #475569;
  --border-color: #475569;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --card-bg: #1e293b;
  --code-background: #334155;
  --callout-info-bg: rgba(96, 165, 250, 0.1);
  --callout-info-border: #60a5fa;
  --callout-warning-bg: rgba(251, 191, 36, 0.1);
  --callout-warning-border: #fbbf24;
  --callout-success-bg: rgba(34, 197, 94, 0.1);
  --callout-success-border: #22c55e;
}

/* Fallback for systems that don't have theme classes yet */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode):not(.dark-mode) {
    --card-background: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --background-light: #334155;
    --border-light: #475569;
    --border-color: #475569;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    --code-background: #334155;
    --callout-info-bg: rgba(96, 165, 250, 0.1);
    --callout-info-border: #60a5fa;
    --callout-warning-bg: rgba(251, 191, 36, 0.1);
    --callout-warning-border: #fbbf24;
    --callout-success-bg: rgba(34, 197, 94, 0.1);
    --callout-success-border: #22c55e;
  }
}

.docs-layout {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Container follows site standard */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

@media (min-width: 640px) {
  .sm-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg-px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Grid Layout */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-8 { gap: 2rem; }

@media (min-width: 1024px) {
  .lg-grid-cols-sidebar { grid-template-columns: 280px 1fr; }
  .lg-sticky { position: sticky; }
  .lg-top-24 { top: 6rem; }
}

.h-fit { height: fit-content; }
.min-w-0 { min-width: 0; }

/* Sidebar Navigation */
.docs-nav {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.docs-nav-section {
  margin-bottom: 2rem;
}

.docs-nav-section:last-child {
  margin-bottom: 0;
}

.docs-nav-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.docs-nav-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-section li {
  margin-bottom: 0.25rem;
}

.docs-nav-section a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.docs-nav-section a:hover,
.docs-nav-section a.active {
  background: #3b82f6;
  color: white;
}

/* Breadcrumbs */
.docs-breadcrumbs {
  margin-bottom: 2rem;
}

.docs-breadcrumbs ol {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.docs-breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--border-color);
}

.docs-breadcrumbs a {
  color: #3b82f6;
  text-decoration: none;
}

.docs-breadcrumbs a:hover {
  text-decoration: underline;
}

/* Header */
.docs-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.docs-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.docs-description {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.docs-meta span {
  padding: 0.375rem 0.75rem;
  background: var(--background-light);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* Table of Contents */
.docs-toc-wrapper {
  margin-bottom: 3rem;
}

.docs-toc {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.docs-toc summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.docs-toc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-toc-nav li {
  margin-bottom: 0.5rem;
}

.docs-toc-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.25rem 0;
  display: block;
  transition: color 0.2s ease;
}

.docs-toc-nav a:hover {
  color: #3b82f6;
}

.toc-level-3 {
  padding-left: 1rem;
}

/* Content */
.docs-content {
  line-height: 1.7;
  color: var(--text-primary, #1e293b);
}

.prose {
  max-width: none;
}

.max-w-none {
  max-width: none;
}

/* Typography */
.docs-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin: 3rem 0 1.5rem 0;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.docs-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem 0;
  color: var(--text-primary);
}

.docs-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  color: var(--text-primary);
}

.docs-content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin-bottom: 0.5rem;
}

.docs-content strong {
  font-weight: 600;
}

/* Code blocks */
.docs-content pre {
  background: var(--code-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 2rem 0;
  position: relative;
  color: var(--text-primary);
}

.docs-content code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* Inline code */
.docs-content :not(pre) > code {
  background: var(--code-background);
  color: var(--text-primary);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  font-size: 0.875em;
}

/* Cards and callouts */
.card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  color: var(--text-primary);
}

.callout {
  background: var(--background-light);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid;
}

.callout-info {
  background: var(--callout-info-bg);
  border-color: var(--callout-info-border);
}

.callout-warning {
  background: var(--callout-warning-bg);
  border-color: var(--callout-warning-border);
}

.callout-success {
  background: var(--callout-success-bg);
  border-color: var(--callout-success-border);
}

/* Footer */
.docs-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.docs-updated {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 1023px) {
  .docs-nav {
    margin-bottom: 2rem;
  }
  
  .docs-header h1 {
    font-size: 2rem;
  }
  
  .docs-toc {
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .docs-header h1 {
    font-size: 1.75rem;
  }
  
  .docs-description {
    font-size: 1.125rem;
  }
  
  .docs-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}
.code-block-container {
  margin: 1rem 0;
}

.code-block-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.code-block-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.code-tab {
  background: var(--bg-secondary);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-top: 2px solid transparent;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

.code-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.code-tab.active {
  background: var(--bg-primary);
  color: var(--accent-color);
  border-top-color: var(--accent-color);
}

.code-block-container pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .code-tab {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
  }
  
  .code-tab:hover {
    background: var(--bg-secondary);
  }
  
  .code-tab.active {
    background: var(--bg-primary);
    color: var(--accent-color);
  }
}
