/* Universal Styles for Neuroviai */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-color: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --sidebar-width: 280px;
  --sidebar-collapsed: 70px;
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --text-color: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --border-color: #475569;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-secondary);
  transition: all 0.3s ease;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transform: translateX(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

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

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

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.collapse-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapse-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-color);
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  padding: 0 1.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* Fixed Navigation Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 0;
  margin: 0 0.5rem;
  border-radius: 8px;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-color);
  transform: translateX(2px);
}

.nav-item.active {
  /* background: linear-gradient(90deg, var; */
  color: var(--primary-color);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.nav-text {
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Collapsed sidebar tooltips */
.sidebar.collapsed .nav-item {
  position: relative;
  justify-content: center;
}

.sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-primary);
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
  margin-left: 0.5rem;
}

.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: var(--bg-tertiary);
  transform: scale(1.05);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  margin-top: auto;
  border-radius: 8px;
  margin: 0 0.5rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-color);
  transform: translateX(2px);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed);
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.page-container {
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  border-radius: 12px;
  overflow: hidden;
}

.page-header {
  text-align: center;
  padding: 2.5rem 2rem;
  border-bottom: 2px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-tertiary));
}

.company-name {
  color: var(--primary-color);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-title {
  color: var(--text-color);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-content {
  padding: 2rem;
}

.section {
  margin-bottom: 2rem;
}

.section h2 {
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.section ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.section li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Alert Boxes */
.highlight {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  margin: 1rem 0;
}

.alert {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
  margin: 1rem 0;
}

[data-theme="dark"] .alert {
  background: #451a03;
  color: #fbbf24;
}

.success {
  background: #dcfce7;
  color: #166534;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #22c55e;
  margin: 1rem 0;
}

[data-theme="dark"] .success {
  background: #052e16;
  color: #4ade80;
}

.info-box {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  margin: 1rem 0;
}

.contact-info {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.contact-info h3 {
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

/* Tables */
.delivery-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.delivery-table th,
.delivery-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.delivery-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar.collapsed + .main-content {
    margin-left: 0;
  }
  
  .content-wrapper {
    padding: 1rem;
    margin-top: 4rem;
  }
  
  .page-header {
    padding: 2rem 1.5rem;
  }
  
  .company-name {
    font-size: 1.8rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .page-content {
    padding: 1.5rem;
  }
  
  .delivery-table {
    font-size: 0.9rem;
  }
  
  .delivery-table th,
  .delivery-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 0.5rem;
  }
  
  .page-content {
    padding: 1rem;
  }
  
  .company-name {
    font-size: 1.6rem;
  }
  
  .page-title {
    font-size: 1.3rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}