@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ===== CSS VARIABLES ===== */
:root {
  /* Core Colors */
  --primary-accent: #FF9E16;
  --primary-accent-hover: #E08E14;
  --primary-accent-light: #FFF3E0;
  --primary-accent-dark: #D47D0F;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-on-accent: #FFFFFF;
  --text-on-dark: #FFFFFF;
  --bg-main: #F4F7F9;
  --bg-content: #FFFFFF;
  --bg-toolbar-footer: #FFFFFF;
  --bg-hover-light: #E9ECEF;
  --border-color: #DEE2E6;
  --border-color-dark: #CED4DA;
  
  /* Status Colors */
  --danger-red: #DC3545;
  --danger-red-hover: #C82333;
  --danger-red-light: #F8D7DA;
  --success-green: #198754;
  --success-green-hover: #157347;
  --success-green-light: #D1E7DD;
  --info-blue: #0D6EFD;
  --info-blue-hover: #0B5ED7;
  --warning-yellow: #FFC107;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #FF9E16 0%, #E08E14 100%);
  --gradient-accent: linear-gradient(135deg, #FF9E16 0%, #FFA726 50%, #FFB74D 100%);
  --gradient-subtle: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Typography */
  --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-base: 1.6;
  
  /* Spacing (supplement Bootstrap's spacing) */
  --spacing-xxs: 0.25rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Borders & Radius */
  --border-width: 1px;
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(255, 158, 22, 0.3);
  
  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-toolbar: 2000;
  --z-index-modal-backdrop: 3040;
  --z-index-modal: 3050;
  --z-index-loading-overlay: 1100;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after { 
  box-sizing: border-box; 
}

html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family-sans-serif);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  overflow: hidden;
}

/* ===== BOOTSTRAP OVERRIDES & EXTENSIONS ===== */

/* Button Extensions */
.btn-outline-primary {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.btn-outline-primary:hover {
  background-color: var(--primary-accent);
  border-color: var(--primary-accent);
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: var(--primary-accent);
}

.btn-primary:hover {
  background: var(--primary-accent-hover);
  border-color: var(--primary-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Form Control Extensions */
.form-control:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 0.2rem rgba(255, 158, 22, 0.25);
}

/* Badge Extensions */
.badge-outline-secondary {
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  background: transparent;
}

.badge-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

/* Card Extensions */
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  transition: var(--transition-medium);
}

.card-tools {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Table Extensions */
.table-hover tbody tr:hover {
  background-color: var(--bg-hover-light);
}

.table-warning {
  background-color: rgba(255, 193, 7, 0.1);
}

/* ===== APPLICATION LAYOUT ===== */
.app-container {
  display: grid;
  grid-template-areas: 
    "header header"
    "sidebar main"
    "sidebar footer";
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  overflow: hidden;
}

/* Header */
.app-header {
  grid-area: header;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: relative;
  z-index: var(--z-index-toolbar);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-subtle);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.brand-icon img {
  width: 36px;
  height: 36px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header-search {
  position: relative;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  background: var(--bg-content);
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(255, 158, 22, 0.1);
}

.search-icon {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-full);
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-menu:hover {
  background: var(--bg-hover-light);
  border-color: var(--primary-accent);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
}

/* Sidebar */
.app-sidebar {
  grid-area: sidebar;
  background: var(--bg-content);
  border-right: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: var(--spacing-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 158, 22, 0.1), transparent);
  transition: var(--transition-medium);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-accent-light);
  color: var(--primary-accent-dark);
  transform: translateX(4px);
}

.nav-link.active {
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-sm);
}

.nav-icon {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary-accent);
  color: white;
  padding: 2px 6px;
  border-radius: var(--border-radius-full);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  min-width: 18px;
  text-align: center;
}

/* Main Content */
.app-main {
  grid-area: main;
  background: var(--bg-main);
  overflow: hidden;
  position: relative;
}

.main-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--spacing-xl);
}

/* Content Sections */
.content-section {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.content-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: var(--font-size-lg);
  margin: 0;
}

/* ===== PRICING CALCULATOR SPECIFIC ===== */
.pricing-calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  height: calc(100vh - 140px);
}

.calculator-panel {
  background: var(--bg-content);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  background: var(--gradient-subtle);
}

.panel-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  color: var(--text-primary);
}

.panel-body {
  flex: 1;
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.panel-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-hover-light);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1%;
}

.panel-footer .col-3 {
	min-width: 30%;
}

.configuration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}



/* Category Sections */
.category-section {
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.category-section:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-accent);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: var(--spacing-sm);
  background: var(--bg-hover-light);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.category-header:hover {
  background: var(--primary-accent-light);
}

.category-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  margin: 0;
}

.category-checkbox {
  margin-right: var(--spacing-sm);
  cursor: pointer;
}

.category-name {
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.category-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.category-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: var(--spacing-xs);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.category-toggle:hover {
  background: var(--bg-content);
  color: var(--primary-accent);
}

.category-products {
  display: none;
  background: var(--bg-content);
  transition: var(--transition-fast);
}

.category-products.show {
  display: block;
}

/* Product Items */
.product-item, .product-controls, .product-label {
  display: flex;
  align-items: center;
  padding-left: var(--spacing-xs);
  transition: var(--transition-fast);
  min-height: 40px;
  opacity: 0.6;
}

.product-item {
  border-bottom: 1px solid rgba(222, 226, 230, 0.5);
  justify-content: space-between;
}

.product-item:nth-child(even) {
  background-color: var(--primary-accent-light); /* light gray or whatever color you prefer */
}

.product-item:last-child {
  border-bottom: none;
}

.product-item:hover {
  background: rgba(233, 236, 239, 0.5);
}

.product-item.selected {
  background: var(--primary-accent-light);
  border-left: 3px solid var(--primary-accent);
  opacity: 1;
}

.product-checkbox {
  margin-right: var(--spacing-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.product-name {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  transition: var(--transition-fast);
  margin-right: var(--spacing-md);
}

.product-item.selected .product-name {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}
.product-controls { gap: .5em; }
.product-controls label { font-size: .8em; }

.user-type-control {
	text-align: center;
  flex-shrink: 0;
  width: 120px;
  margin-right: var(--spacing-md);
}

.user-type-select {
  width: 100%;
  padding: 2px 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-content);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.product-item.selected .product-license-select {
  color: var(--text-primary);
  border-color: var(--primary-accent);
}

.quantity-control {
	text-align: center;
  flex-shrink: 0;
  width: 80px;
}

.quantity-input, .unit-price-input {
  width: 100%;
  padding: 2px 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-content);
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition-fast);
}

.product-item.selected .product-quantity-input {
  color: var(--text-primary);
  border-color: var(--primary-accent);
}

.product-item:not(.selected) .product-license-select,
.product-item:not(.selected) .product-quantity-input {
  background: var(--bg-hover-light);
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* Pricing Table */
.pricing-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pricing-table thead th {
  background: var(--gradient-subtle);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.pricing-table tbody tr {
  transition: var(--transition-fast);
  position: relative;
}

.pricing-table tbody tr:hover {
  background: var(--bg-hover-light);
  transform: scale(1.005);
  box-shadow: var(--shadow-sm);
}

.pricing-table td {
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.unit-price-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 140px;
}



.unit-price-input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 2px rgba(255, 158, 22, 0.2);
}

.reset-unit-price-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-content);
  color: var(--text-muted);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.reset-unit-price-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: var(--primary-accent-light);
}

.pricing-deviation {
  background: linear-gradient(90deg, 
    rgba(255, 158, 22, 0.1) 0%, 
    rgba(255, 158, 22, 0.05) 50%, 
    rgba(255, 158, 22, 0.1) 100%
  );
  border-left: 4px solid var(--primary-accent);
}

.pricing-deviation .unit-price-input {
  border-color: var(--primary-accent);
  background: rgba(255, 158, 22, 0.1);
  font-weight: 700;
}

/* Discount Badges */
.discount-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--border-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
  transition: var(--transition-fast);
}

.badge-geographic { 
  background: linear-gradient(135deg, #10B981, #059669); 
  color: white; 
}

.badge-specialty { 
  background: linear-gradient(135deg, #F59E0B, #D97706); 
  color: white; 
}

.badge-cpi { 
  background: linear-gradient(135deg, #3B82F6, #2563EB); 
  color: white; 
}

.badge-user-type { 
  background: linear-gradient(135deg, #8B5CF6, #7C3AED); 
  color: white; 
}

.badge-manual { 
  background: var(--gradient-primary); 
  color: white; 
}

.discount-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Pricing Totals */
.pricing-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.total-item {
  text-align: center;
  padding: var(--spacing-lg);
  transition: var(--transition-medium);
  border-radius: var(--border-radius-md);
}

.total-item.annual {
	
  background: var(--gradient-subtle);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.total-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.total-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
}

.total-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-accent);
  transition: var(--transition-medium);
}

.pricing-value {
  transition: var(--transition-medium);
  font-weight: var(--font-weight-semibold);
}

/* ===== PRODUCT MANAGEMENT SPECIFIC ===== */
.action-bar {
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
}

.filter-bar {
  background: var(--gradient-subtle);
}

.search-filters .input-group {
  width: 300px;
}

.action-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.product-row.selected {
  background: var(--primary-accent-light);
  border-left: 4px solid var(--primary-accent);
}

/* ===== LOADING STATES ===== */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(244, 247, 249, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-loading-overlay);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: var(--z-index-modal);
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-sm);
  pointer-events: auto;
  animation: slideInFromRight 0.3s ease-out;
  overflow: hidden;
}

.notification-info { border-left: 4px solid var(--info-blue); }
.notification-success { border-left: 4px solid var(--success-green); }
.notification-warning { border-left: 4px solid var(--warning-yellow); }
.notification-error { border-left: 4px solid var(--danger-red); }

.notification-content {
  padding: var(--spacing-md);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

.notification-message {
  flex: 1;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.notification-close:hover {
  background: var(--bg-hover-light);
  color: var(--text-primary);
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== MODAL SYSTEM STYLES ===== */

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-index-modal-backdrop);
  opacity: 0;
  transition: var(--transition-medium);
}

.modal-backdrop.show {
  opacity: 1;
}

/* Modal container - Bootstrap compatible */
.modal {
  z-index: var(--z-index-modal);
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.modal.show {
  display: block;
}

.modal, .modal-lg, .modal-xl {
	max-width: none !important;
}

/* Modal dialog - Bootstrap structure */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem auto;
  pointer-events: none;
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
  justify-content: center;
  align-items: center;
}

.modal-dialog-centered {
  align-items: center;
  min-height: calc(100% - 1rem);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  pointer-events: auto;
  background: var(--bg-content);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  outline: 0;
}

/* Modal sizes - Bootstrap compatible with higher specificity */
.modal .modal-dialog {
  max-width: none; /* Override Bootstrap default */
}

.modal .modal-content {
  max-width: 500px; /* Default size */
}

@media (min-width: 576px) {
  .modal .modal-dialog {
    margin: 1.75rem auto;
    max-width: none; /* Ensure no constraint on dialog */
  }
  
  .modal .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
  
  .modal.modal-sm .modal-content { 
    max-width: 300px; 
  }
  
  .modal.modal-md .modal-content { 
    max-width: 500px; 
  }
}

@media (min-width: 992px) {
  .modal.modal-lg .modal-dialog {
    max-width: none !important; /* Override Bootstrap's max-width: 800px */
  }
  
  .modal.modal-lg .modal-content {
    max-width: 800px;
  }
  
  .modal.modal-xl .modal-dialog {
    max-width: none !important; /* Override Bootstrap's max-width: 800px */
  }
  
  .modal.modal-xl .modal-content {
    max-width: 800px;
  }
}

@media (min-width: 1200px) {
  .modal.modal-xl .modal-content {
    max-width: 1140px;
  }
}

/* Modal header */
.modal-header {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
  border-bottom: var(--border-width) solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-content);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
  margin: 0;
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: var(--line-height-base);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.modal-close:hover,
.modal-close:focus {
  color: var(--text-primary);
  background-color: var(--bg-hover-light);
  outline: none;
}

/* Modal body */
.modal-body {
  padding: var(--spacing-lg);
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
}

/* Modal footer */
.modal-footer {
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
  border-top: var(--border-width) solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  background: var(--bg-toolbar-footer);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* Modal buttons */
.modal-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius-md);
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
}

.modal-btn:focus {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.modal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button styles */
.modal-btn-primary {
  background-color: var(--primary-accent);
  border-color: var(--primary-accent);
  color: var(--text-on-accent);
}

.modal-btn-primary:hover:not(:disabled) {
  background-color: var(--primary-accent-hover);
  border-color: var(--primary-accent-hover);
}

.modal-btn-secondary {
  background-color: transparent;
  border-color: var(--border-color-dark);
  color: var(--text-primary);
}

.modal-btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-hover-light);
  border-color: var(--border-color-dark);
}

.modal-btn-danger {
  background-color: var(--danger-red);
  border-color: var(--danger-red);
  color: var(--text-on-dark);
}

.modal-btn-danger:hover:not(:disabled) {
  background-color: var(--danger-red-hover);
  border-color: var(--danger-red-hover);
}

.modal-btn-success {
  background-color: var(--success-green);
  border-color: var(--success-green);
  color: var(--text-on-dark);
}

.modal-btn-success:hover:not(:disabled) {
  background-color: var(--success-green-hover);
  border-color: var(--success-green-hover);
}

/* Alert and prompt styles */
.modal-alert-message,
.modal-confirm-message {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
}

.modal-prompt-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.modal-prompt-message {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
}

.modal-prompt-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-content);
  transition: var(--transition-fast);
}

.modal-prompt-input:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(255, 158, 22, 0.1);
}

.modal-prompt-input.error {
  border-color: var(--danger-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Form styles */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.modal-form-label {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  line-height: var(--line-height-base);
}

.modal-form-input,
.modal-form-textarea,
.modal-form-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-content);
  transition: var(--transition-fast);
}

.modal-form-input:focus,
.modal-form-textarea:focus,
.modal-form-select:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(255, 158, 22, 0.1);
}

.modal-form-input.error,
.modal-form-textarea.error,
.modal-form-select.error {
  border-color: var(--danger-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.modal-form-textarea {
  resize: vertical;
  min-height: 4rem;
}

.modal-form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--spacing-sm) center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.modal-form-checkbox-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  padding: var(--spacing-xs) 0;
}

.modal-form-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-content);
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-form-checkbox:checked {
  background-color: var(--primary-accent);
  border-color: var(--primary-accent);
}

.modal-form-checkbox:checked::after {
  content: '';
  width: 0.375rem;
  height: 0.625rem;
  border: 2px solid white;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
  margin-top: -0.125rem;
}

.modal-form-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 158, 22, 0.1);
}

.modal-form-checkbox-label {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  line-height: var(--line-height-base);
  cursor: pointer;
}

.modal-form-help {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-form-error {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-sm);
  color: var(--danger-red);
  line-height: 1.4;
  margin-top: var(--spacing-xxs);
}

/* Loading styles */
.modal-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
}

.modal-loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-accent);
  border-radius: 50%;
  animation: modalSpinner 1s linear infinite;
}

@keyframes modalSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-loading-message {
  margin: 0;
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  text-align: center;
}

/* ===== IMPORT WIZARD STYLES ===== */
.import-wizard {
  max-width: 100%;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  background: var(--bg-hover-light);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  position: relative;
  transition: var(--transition-fast);
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -1px;
  width: 0;
  height: 0;
  border-left: 15px solid var(--bg-hover-light);
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  transform: translateY(-50%);
  z-index: 1;
}

.step.active {
  background: var(--primary-accent);
  color: var(--text-on-accent);
  font-weight: var(--font-weight-semibold);
}

.step.active::after {
  border-left-color: var(--primary-accent);
}

.step:first-child {
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.step:last-child {
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.wizard-content {
  min-height: 400px;
  margin-bottom: 2rem;
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Upload styles */
.upload-step {
  text-align: center;
}

.file-upload-area {
  margin: 2rem 0;
}

.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--bg-hover-light);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary-accent);
  background: var(--primary-accent-light);
}

.upload-dropzone i {
  color: var(--text-muted);
}

.upload-dropzone:hover i,
.upload-dropzone.dragover i {
  color: var(--primary-accent);
}

.file-info {
  margin: 1rem 0;
}

.expected-format {
  text-align: left;
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.expected-format h5 {
  color: var(--primary-accent);
  margin-bottom: 1rem;
}

.expected-format ul {
  columns: 2;
  column-gap: 2rem;
}

/* Mapping styles */
.mapping-step {
  text-align: left;
}

.mapping-table {
  margin: 1.5rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.mapping-table table {
  font-size: var(--font-size-sm);
}

.mapping-table th {
  background: var(--bg-hover-light);
  font-weight: var(--font-weight-semibold);
  position: sticky;
  top: 0;
  z-index: 1;
}

.column-mapping {
  min-width: 180px;
}

.mapping-validation {
  margin-top: 1.5rem;
}

/* Preview styles */
.preview-step {
  text-align: left;
}

.pricing-model-config {
  background: var(--bg-hover-light);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
}

.preview-data {
  margin: 2rem 0;
}

.preview-data .table-responsive {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
}

.preview-data table {
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

.preview-data th {
  background: var(--bg-hover-light);
  position: sticky;
  top: 0;
  z-index: 1;
}

.validation-summary {
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
}

.validation-summary h6 {
  color: var(--primary-accent);
  margin-bottom: 0.75rem;
}

/* Import styles */
.import-step {
  text-align: center;
}

.import-progress {
  margin: 2rem 0;
}

.progress {
  height: 1.5rem;
  background-color: var(--bg-hover-light);
  border-radius: var(--border-radius-full);
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.import-status {
  margin: 1rem 0;
  font-weight: var(--font-weight-medium);
}

.import-results {
  text-align: left;
  margin-top: 2rem;
}

.import-results details {
  margin-top: 1rem;
}

.import-results summary {
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  color: var(--primary-accent);
}

.import-results summary:hover {
  text-decoration: underline;
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--success-green); }
.text-danger { color: var(--danger-red); }
.text-info { color: var(--info-blue); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.fade-in { animation: fadeIn 0.3s ease-out; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-in-right { animation: slideInRight 0.3s ease-out; }

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .modal-xl .modal-dialog {
    max-width: 95vw;
    margin: 1rem auto;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-areas: 
      "header"
      "main"
      "footer";
    grid-template-columns: 1fr;
  }
  
  .app-sidebar {
    display: none;
  }
  
  .pricing-calculator {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .configuration-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-totals {
    grid-template-columns: 1fr;
  }
  
  .header-search {
    width: 200px;
  }

  .product-item {
    flex-direction: column;
    align-items: stretch;
    padding: var(--spacing-sm);
    gap: var(--spacing-xs);
  }
  
  .product-name {
    margin-right: 0;
    margin-bottom: var(--spacing-xs);
  }
  
  .product-controls-row {
    display: flex;
    gap: var(--spacing-sm);
  }
  
  .product-license-type,
  .product-quantity {
    width: auto;
    flex: 1;
    margin-right: 0;
  }

  .unit-price-container {
    max-width: 100%;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .discount-badges {
    justify-content: center;
  }
  
  .discount-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
  
  .pricing-table {
    font-size: 0.875rem;
  }

  .notification-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .action-bar .d-flex {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .action-bar .search-filters,
  .action-bar .action-buttons {
    width: 100%;
  }

  .action-bar .input-group {
    width: 100% !important;
  }

  .filter-bar .row {
    flex-direction: column;
  }

  .filter-bar .col-md-3,
  .filter-bar .col-md-2 {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }

  /* Modal responsive */
  .modal {
    padding: var(--spacing-sm);
  }
  
  .modal-dialog {
    max-height: 95vh;
    margin: 0;
  }
  
  .modal-sm .modal-dialog,
  .modal-md .modal-dialog,
  .modal-lg .modal-dialog,
  .modal-xl .modal-dialog {
    max-width: 100%;
  }
  
  .modal-header {
    padding: var(--spacing-md);
  }
  
  .modal-body {
    padding: var(--spacing-md);
  }
  
  .modal-footer {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    flex-wrap: wrap;
  }
  
  .modal-btn {
    flex: 1;
    min-width: auto;
  }
  
  .modal-title {
    font-size: var(--font-size-base);
  }

  /* Wizard responsive */
  .wizard-steps {
    flex-direction: column;
  }
  
  .step {
    margin-bottom: -1px;
    border-radius: 0;
  }
  
  .step:first-child {
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  }
  
  .step:last-child {
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  }
  
  .step::after {
    display: none;
  }
  
  .expected-format ul {
    columns: 1;
  }
  
  .validation-summary .row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: var(--spacing-xs);
  }
  
  .modal-dialog {
    max-height: 98vh;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-btn {
    width: 100%;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .pricing-deviation,
  .badge-manual,
  .pricing-value.updating,
  .total-value.updating {
    animation: none;
  }
  
  .discount-badge::before,
  .total-item::before {
    display: none;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modal-backdrop,
  .modal,
  .modal-btn,
  .modal-form-input,
  .modal-form-textarea,
  .modal-form-select,
  .modal-form-checkbox {
    transition: none;
  }
  
  .modal-loading-spinner {
    animation: none;
    border-top-color: var(--primary-accent);
  }
}

@media (prefers-contrast: high) {
  .discount-badge {
    border: 2px solid currentColor;
  }
  
  .pricing-deviation {
    border-left-width: 6px;
  }

  .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
  }
  
  .modal-dialog {
    border: 2px solid var(--text-primary);
  }
  
  .modal-btn {
    border-width: 2px;
  }
}

/* Focus states for keyboard navigation */
.unit-price-input:focus-visible,
.reset-unit-price-btn:focus-visible,
.form-control:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.discount-badge:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .app-sidebar,
  .app-header,
  .notification-container,
  .loading-overlay,
  .action-bar,
  .panel-footer {
    display: none !important;
  }

  .app-main {
    grid-column: 1 / -1;
  }

  .content-section {
    page-break-inside: avoid;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  body {
    background: white;
  }
}

.fixed-column {
  min-width: 400px;
  width: 33%;
}

/* Pricing Calculator Enhancements */
.configuration-section .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

#duration-input { max-width: 5em; }

.pricing-table {
    font-size: 0.9rem;
}

.pricing-table td {
    vertical-align: middle;
}

.pricing-value {
    font-family: 'Courier New', monospace;
}

.product-cell {
    max-width: 250px;
}

.table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.1);
}

.badge {
    font-size: 0.7rem;
}



/* Configuration Card Styling */
.configuration-section {
    padding: 0 .25rem;
    margin-bottom: 0;
}

.configuration-card {
    background: var(--bg-content);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.configuration-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.configuration-body .input-group {
	flex-wrap: nowrap;
}

.configuration-body {
    padding: 1rem 1rem 0  1rem ;
}

.input-group-text {
    background: var(--primary-accent-light);
    border-color: var(--border-color);
    color: var(--primary-accent);
    width: 36px;
    justify-content: center;
    font-size: 0.8rem;
}

.configuration-section .form-select {
    font-size: 0.875rem;
    border-color: var(--border-color);
}

.configuration-section .form-select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.2rem rgba(255, 158, 22, 0.25);
}

.configuration-section small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .configuration-section .col-lg-3 {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 768px) {
    .configuration-section .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .configuration-body {
        padding: 0.75rem;
    }
}


/* Add to styles.css */
.ela-pricing td {
    color: var(--info-blue);

}

.ela-pricing .unit-price-input {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.badge-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 0.65rem;
    margin-left: 0.5rem;
}

.discount-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-revert-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.badge-revert-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.badge-manual .badge-revert-btn {
    background: rgba(255, 255, 255, 0.2);
}

/* Make tab list use a top border instead of bottom */
.nav-tabs {
  border-bottom: none;
  border-top: 1px solid #dee2e6;
}

/* Style individual tabs to look like they're anchored from the top */
.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-bottom: none;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Active tab should blend into content area below */
.nav-tabs .nav-link.active {
  border-color: #dee2e6 #dee2e6 transparent;
  background-color: #fff;
  box-shadow: none;
}

.nav-tabs {
	border-top: none;
}

/* User Menu Dropdown Enhancements */
.user-menu.dropdown-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-menu.dropdown-toggle:hover,
.user-menu.dropdown-toggle:focus,
.user-menu.dropdown-toggle.show {
    background: var(--bg-hover-light);
    border-color: var(--primary-accent);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 158, 22, 0.25);
}

.user-menu.dropdown-toggle::after {
    display: none; /* Hide Bootstrap's default caret */
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 200px;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    background: var(--bg-hover-light);
    margin-bottom: 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-hover-light);
    color: var(--text-primary);
    text-decoration: none;
}

.dropdown-item.text-danger {
    color: var(--danger-red) !important;
}

.dropdown-item.text-danger:hover {
    background: var(--danger-red-light);
    color: var(--danger-red) !important;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border-color);
}

/* Loading state for logout button */
.dropdown-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation for dropdown */
.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#cpi-container {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
	
	gap: 1rem;
	flex-direction: row;
}

#cpi-container .form-check {
    margin-bottom: 0.5rem;
}

#cpi-container .form-check:last-child {
    margin-bottom: 0;
}

/* Duplicate Row Styling */
.duplicate-row {
    background-color: rgba(255, 158, 22, 0.05);
    border-left: 3px solid #FFA500;
}

.duplicate-row .badge-secondary {
    background-color: #6c757d;
    font-size: 0.75rem;
}

/* Metric Display */


/* Term Total Styling */
#term-total-container {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
	border-radius: var(--border-radius-md);
	border: 1px solid var(--border-color);
}

#term-total-container .total-value {
    color: #E65100;
}

/* Action Buttons Group */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* CPI Badge Enhancement */
.badge-cpi {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* Enhanced Configuration Grid */
.configuration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .configuration-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group-sm {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group-sm .btn {
        width: 100%;
    }
}

#pricing-table-body small.text-muted {
	font-size: .7em;
	display: block; clear: both;
	text-align: right;
	text-wrap: nowrap;
}

#pricing-table-body td { vertical-align: top; }


.footer .btn-link {
    color: #6c757d !important;
    text-decoration: none;
    font-size: 14px;
}

.footer .btn-link:hover {
    color: #007bff !important;
    text-decoration: none;
}

.footer .btn-link i {
    margin-right: 4px;
}

.footer .dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
}

.footer .dropdown-item i {
    width: 16px;
    margin-right: 8px;
    color: #6c757d;
}

.footer .dropdown-item:hover i {
    color: #007bff;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer .col-md-6:last-child {
        text-align: left !important;
        margin-top: 10px;
    }
    
    .footer-links {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .footer .btn-group {
        margin-bottom: 5px;
    }
}


.help-navigation {
    height: 450px;
    overflow-y: auto;
}

.help-nav-item {
    display: block;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.help-nav-item:hover {
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.help-nav-item.active {
    background-color: #007bff;
    color: white;
}

.help-nav-item i {
    width: 16px;
    margin-right: 8px;
}

.context-help-content {
	
}

.help-content {
    height: 450px;
    overflow-y: auto;
}

.help-section-title {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.help-section-title i {
    margin-right: 8px;
}

.help-section-content {
    line-height: 1.6;
}

.help-section-content h6 {
    color: #495057;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.help-section-content ul, .help-section-content ol {
    margin-bottom: 16px;
}

.help-section-content li {
    margin-bottom: 4px;
}

.help-badges {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
}

.help-badges .badge, .help-badges .discount-badge {
    margin-right: 8px;
    margin-bottom: 4px;
}

.help-trouble-item {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 0 4px 4px 0;
}

.help-trouble-item strong {
    color: #495057;
    display: block;
    margin-bottom: 8px;
}

.help-glossary-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.help-glossary-link:hover {
    color: #0056b3;
    text-decoration: none;
}

.help-search-results {
    margin-top: 0;
}

.help-search-list {
    margin-top: 16px;
}

.help-search-item {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.help-search-item:last-child {
    border-bottom: none;
}

.help-search-item h6 {
    margin-bottom: 4px;
    color: #495057;
}

.help-search-item h6 i {
    margin-right: 8px;
    color: #6c757d;
}

.help-search-item a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.help-search-item a:hover {
    text-decoration: underline;
}

.help-nav-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.help-nav-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

.help-search-box {
    position: relative;
}

.help-search-box input {
    padding-left: 35px;
}

.help-search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
}

/* Modal-specific adjustments */
.modal-xl .modal-dialog {
    max-width: 900px;
}

/* Responsive design */
@media (max-width: 768px) {
    .help-container {
        height: auto;
    }
    
    .help-navigation {
        height: auto;
        max-height: 200px;
    }
    
    .help-content {
        height: auto;
        max-height: 300px;
    }
    
    .help-container .row .col-4,
    .help-container .row .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .help-container .border-right {
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
    }
}

.configuration-body input, .configuration-body select {  font-size: .8em !important; }


.discount-form-compact .modal-form-label {
                    font-weight: 500;
                    margin-bottom: 4px;
                    font-size: 14px;
                }
                
                .selected-items-container {
                    border: 1px solid #dee2e6;
                    border-radius: 4px;
                    padding: 8px;
                    min-height: 50px;
                    max-height: 150px;
                    overflow-y: auto;
                    background-color: #f8f9fa;
                }
                
                .selected-item {
                    display: inline-flex;
                    align-items: center;
                    background-color: #007bff;
                    color: white;
                    padding: 4px 8px;
                    margin: 2px;
                    border-radius: 12px;
                    font-size: 13px;
                }
                
                .selected-item .remove-btn {
                    background: none;
                    border: none;
                    color: white;
                    margin-left: 6px;
                    cursor: pointer;
                    font-size: 14px;
                    line-height: 1;
                    padding: 0;
                    width: 16px;
                    height: 16px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }
                
                .search-result-item {
                    padding: 8px 12px;
                    border-bottom: 1px solid #eee;
                    cursor: pointer;
                    background: white;
                }
                
                .search-result-item:hover {
                    background-color: #f8f9fa;
                }
                
                .search-result-item:last-child {
                    border-bottom: none;
                }
                
                .search-results-container {
                    max-height: 200px;
                    overflow-y: auto;
                    border: 1px solid #dee2e6;
                    border-radius: 4px;
                    background: white;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                }
				
				
				
				#discounts-list-container .models-grid, #pricing-models-list .models-grid {
					display: flex;
					flex-wrap: wrap;
					gap: 1em;
					
				}
				
				#discounts-list-container .models-grid .card, #pricing-models-list .models-grid .card {
					width: 30%;
				}
				
				/* Add this CSS to your main stylesheet */

/* Pricing Requests Table Enhancements */
.requests-table tr.selected {
    background-color: rgba(0, 123, 255, 0.1);
}

.requests-table .btn-group-sm .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
}

/* Share Status Badges */
.share-status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.share-status-none {
    color: #6c757d;
    font-style: italic;
}

.share-status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.share-status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.share-status-expired {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Discount Badges in Product View */
.discount-badges {
    margin-top: 0.5rem;
}

.discount-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.badge-manual {
    background-color: #e1ecf4;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-geographic {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.badge-specialty {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-cpi {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Share Modal Enhancements */
.share-success-modal .alert {
    border-radius: 0.5rem;
}

.share-success-modal .card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.share-success-modal .input-group {
    border-radius: 0.375rem;
}

.share-success-modal #share-url-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Manage Shares Modal */
.manage-shares-modal .table-responsive {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.manage-shares-modal .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
}

.manage-shares-modal .table-muted {
    opacity: 0.7;
}

.manage-shares-modal .table-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.manage-shares-modal .btn-group-sm .btn {
    padding: 0.25rem 0.4rem;
}

/* Loading States */
.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 0.2rem solid #f3f3f3;
    border-top: 0.2rem solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .requests-table .btn-group {
        flex-direction: column;
    }
    
    .requests-table .btn-group .btn {
        margin-bottom: 0.25rem;
        border-radius: 0.25rem !important;
    }
    
    .share-success-modal .row {
        margin: 0;
    }
    
    .share-success-modal .col-md-6 {
        padding: 0;
        margin-bottom: 1rem;
    }
}

/* Table hover effects */
.requests-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

.requests-table tbody tr:hover .btn-outline-primary {
    background-color: #007bff;
    color: white;
}

.requests-table tbody tr:hover .btn-outline-secondary {
    background-color: #6c757d;
    color: white;
}

.requests-table tbody tr:hover .btn-outline-warning {
    background-color: #ffc107;
    color: #212529;
}

/* Share link expiry warnings */
.share-expiry-warning {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Success/Error message styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Add this to your application's CSS file */
table.view-mode th:last-child,
table.view-mode td:last-child {
    display: none;
}