/* Main Application Styles */
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Container */
.container-fluid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container-fluid {
    padding: 0 16px;
  }
}

/* Main Content Area */
.main-content {
  min-height: calc(100vh - 56px);
  padding-top: var(--space-6);
  padding-bottom: var(--space-12);
}

/* Enhanced Navigation */
.navbar {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-sticky);
  position: relative;
}

.navbar-brand {
  font-weight: 600;
  font-size: var(--text-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary) !important;
  transition: opacity var(--transition-fast);
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-brand img {
  height: 32px;
  width: auto;
}

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover);
}

.navbar-nav .nav-link.active {
  color: var(--newrons-accent) !important;
  background: var(--bg-selected);
}

/* Enhanced Dropdown */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: 9999 !important;
  position: absolute !important;
  min-width: 200px;
  animation: dropdownSlide 0.2s ease-out;
}

.dropdown-item {
  color: var(--text-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Enhanced Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  overflow: hidden;
}

.card-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
  font-size: var(--text-lg);
}

.card-body {
  padding: var(--space-6);
}

/* Status Badge Styles */
.badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.badge-status-open {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-status-in-progress {
  background: rgba(74, 158, 255, 0.1);
  color: var(--newrons-accent);
  border: 1px solid rgba(74, 158, 255, 0.2);
}

.badge-status-resolved {
  background: rgba(0, 210, 106, 0.1);
  color: var(--newrons-success);
  border: 1px solid rgba(0, 210, 106, 0.2);
}

.badge-status-closed {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Priority Badge Styles */
.badge-priority-low {
  background: rgba(0, 210, 106, 0.1);
  color: var(--newrons-success);
  border: 1px solid rgba(0, 210, 106, 0.2);
}

.badge-priority-medium {
  background: rgba(14, 14, 15, 0.1);
  color: var(--newrons-black);
  border: 1px solid rgba(14, 14, 15, 0.2);
}

.badge-priority-high {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-priority-critical {
  background: rgba(248, 81, 73, 0.1);
  color: var(--newrons-danger);
  border: 1px solid rgba(248, 81, 73, 0.2);
}

/* Enhanced Tables */
.table {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-primary);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: var(--space-4);
}

.table tbody td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
}

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

.table tbody tr:hover {
  background: var(--bg-hover);
}

/* Logo Switching */
[data-theme="light"] .navbar-logo-light {
  display: none !important;
}

[data-theme="light"] .navbar-logo-dark {
  display: inline-block !important;
}

[data-theme="dark"] .navbar-logo-dark {
  display: none !important;
}

[data-theme="dark"] .navbar-logo-light {
  display: inline-block !important;
}

/* Dark Mode Specific */
[data-theme="dark"] .navbar {
  background: rgba(22, 27, 34, 0.9) !important;
}

[data-theme="dark"] .badge-priority-medium {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--newrons-accent);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

.theme-toggle:hover {
  background: var(--newrons-accent-hover);
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.theme-toggle i {
  font-size: var(--text-xl);
}

/* Avatar Styles */
.avatar-sm {
  display: inline-block;
}

.avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-base);
  color: white;
}
