/* Main Styling Sheet - Engineering Management Web Application */
/* Design Concept: Light & Dark Glassmorphism with Blue, Gray, White theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --info: #06b6d4;
  
  /* Priority colors */
  --prio-high: #ef4444;
  --prio-medium: #f97316;
  --prio-low: #eab308;
  --prio-done: #10b981;

  /* Glassmorphism Theme: Light Mode */
  --bg-gradient: linear-gradient(135deg, #e0e8f6 0%, #e2e8f0 40%, #cbd5e1 100%);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  --glass-inner-border: rgba(255, 255, 255, 0.3);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --sidebar-bg: rgba(255, 255, 255, 0.45);
  --sidebar-active: rgba(37, 99, 235, 0.15);
  --sidebar-text: #334155;
  --sidebar-active-text: #1d4ed8;

  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(255, 255, 255, 0.6);
  
  --modal-bg: rgba(255, 255, 255, 0.85);
  
  --blur: blur(12px) saturate(180%);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
  --font-family: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark Mode override */
.dark-mode {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-glow: rgba(59, 130, 246, 0.4);
  
  --bg-gradient: linear-gradient(135deg, #0b1120 0%, #0f172a 50%, #1e293b 100%);
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-inner-border: rgba(255, 255, 255, 0.05);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --sidebar-bg: rgba(15, 23, 42, 0.45);
  --sidebar-active: rgba(59, 130, 246, 0.2);
  --sidebar-text: #cbd5e1;
  --sidebar-active-text: #60a5fa;
  
  --card-bg: rgba(30, 41, 59, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  
  --modal-bg: rgba(15, 23, 42, 0.9);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-attachment: fixed;
  transition: background 0.5s ease;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Menu */
.sidebar {
  width: 85px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  z-index: 100;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: visible; /* Let tooltips slide out */
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0px;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  justify-content: center;
}

.sidebar-logo {
  flex-shrink: 0;
}

.sidebar-logo svg, .sidebar-logo i {
  width: 24px !important;
  height: 24px !important;
}

.sidebar-text-group {
  display: none !important; /* Hide header text permanently */
}

/* Increase Icon sizes inside menu items and add scaling effect */
.menu-item svg, .menu-item i {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease-in-out;
}

.menu-item:hover svg, .menu-item:hover i {
  transform: scale(1.15);
}

.menu-item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Individual tooltip pop-out styling */
.menu-item span {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  opacity: 0;
  pointer-events: none;
  background: var(--modal-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.menu-item:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.theme-switch {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.theme-switch span {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  opacity: 0;
  pointer-events: none;
  background: var(--modal-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.theme-switch:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.sidebar-user-info {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-user-info span {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  opacity: 0;
  pointer-events: none;
  background: var(--modal-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.sidebar-user-info:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}



.sidebar-logo {
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--sidebar-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
  color: var(--primary);
}

.dark-mode .menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Theme Toggle */
.theme-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.dark-mode .theme-switch {
  background: rgba(255, 255, 255, 0.05);
}

.switch-btn {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.dark-mode .switch-btn {
  background: var(--primary);
}

.switch-circle {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark-mode .switch-circle {
  left: 23px;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

/* Header bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px 16px;
  width: 350px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  margin-left: 10px;
  width: 100%;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.dark-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
  display: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: var(--blur);
}

/* Sections Containers */
.section-container {
  display: none;
  animation: fadeIn 0.4s ease-out;
  flex-grow: 1;
}

.section-container.active {
  display: flex;
  flex-direction: column;
}

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

/* Card layout glassmorphism */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: #ca8a04; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-blue { background: rgba(37, 99, 235, 0.15); color: #2563eb; border: 1px solid rgba(37, 99, 235, 0.3); }
.badge-gray { background: rgba(100, 116, 139, 0.15); color: #64748b; border: 1px solid rgba(100, 116, 139, 0.3); }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-window {
  background: var(--modal-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-window {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

.dark-mode .modal-close:hover {
  background: rgba(255,255,255,0.05);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 0px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.dark-mode input, .dark-mode select, .dark-mode textarea {
  background: rgba(255, 255, 255, 0.03);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: var(--glass-bg);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.dark-mode ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive constraints */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
  }
  
  .sidebar.mobile-open {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .top-header {
    flex-wrap: wrap;
  }
  
  .search-box {
    width: 100%;
    order: 3;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 15px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Filter Bar Redesign */
.filter-bar {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 10px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--glass-shadow);
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 250px;
}

.filter-right {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.filter-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}

.filter-group label {
  display: inline-block !important;
  margin-bottom: 0 !important;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-group select {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  min-width: 110px;
  width: auto;
  background: rgba(0, 0, 0, 0.03);
}

.dark-mode .filter-group select {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1200px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-left {
    width: 100%;
    min-width: 100%;
  }

  .filter-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .filter-right {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
    justify-content: space-between;
  }
  
  .filter-group select {
    max-width: 60%;
  }
}

/* Settings Page styling */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  height: 380px;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.settings-card-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.settings-card-icon {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.settings-list {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 0.88rem;
  transition: var(--transition);
}

.dark-mode .settings-item {
  background: rgba(255, 255, 255, 0.02);
}

.settings-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.settings-item-delete {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.settings-item-delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

.settings-add-form {
  display: flex;
  gap: 8px;
}

.settings-add-form input {
  flex-grow: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.btn-primary-sm {
  background: var(--primary);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: var(--transition);
}

.btn-primary-sm:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Side-by-Side Filter Search Input styling */
.filter-search-input {
  width: 90px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-main);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.dark-mode .filter-search-input {
  background: rgba(255, 255, 255, 0.03);
}

.filter-search-input:focus {
  border-color: var(--primary);
  background: var(--glass-bg);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Compact Backlog Filter Row styling */
.compact-filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  justify-content: flex-start !important;
}

.compact-filters .filter-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-bottom: 0 !important;
}

.compact-filters .filter-group label {
  font-size: 0.8rem !important;
  margin-bottom: 0 !important;
  font-weight: 500 !important;
  color: var(--text-muted);
  white-space: nowrap;
}

.compact-filters select {
  padding: 4px 8px !important;
  font-size: 0.8rem !important;
  min-width: 80px !important;
  max-width: 105px !important;
  height: 32px !important;
}

.compact-filters .filter-search-input {
  width: 75px !important;
  padding: 4px 8px !important;
  font-size: 0.8rem !important;
  height: 32px !important;
}

.compact-filters .btn-primary {
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  height: 32px !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

/* Cost Reduction View Toggle Styles */
.view-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.view-toggle-btn.active {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: var(--shadow-sm);
}

.view-toggle-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.03);
}

.dark-mode .view-toggle-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
}

/* Radio & Checkbox Style Alignment Overrides */
input[type="radio"], input[type="checkbox"] {
  width: auto !important;
  height: 18px !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-block !important;
  accent-color: var(--primary) !important;
}

.modal-body label:has(input[type="radio"]), .modal-body label:has(input[type="checkbox"]) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  margin-bottom: 0 !important;
}

.modal-body label input[type="radio"], .modal-body label input[type="checkbox"] {
  margin-top: 0 !important;
}

