/* Meritio - Main Stylesheet */

/* Login/Signup Tab Styling */
.tab-button {
  border: none;
  background: none;
  padding: 12px;
  color: var(--gray-600, #6b7280);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-button:hover {
  color: var(--primary-color, #3b82f6);
  background-color: var(--gray-50, #f9fafb);
}

.tab-button.active {
  color: var(--primary-color, #3b82f6);
  border-bottom-color: var(--primary-color, #3b82f6);
  font-weight: 600;
}

#signup-form-container {
  animation: fadeIn 0.3s ease-in;
}

#login-form-container {
  animation: fadeIn 0.3s ease-in;
}

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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #6366f1;
  --purple-color: #7c3aed;
  --success-color: #16a34a;
  --warning-color: #ea580c;
  --danger-color: #dc2626;
  --info-color: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --slate-50: #f8fafc;
}

/* Custom color utilities */
.text-purple {
  color: var(--purple-color) !important;
}

.bg-purple {
  background-color: var(--purple-color) !important;
}

/* Delete button styling on exercise cards */
.exercise-card .delete-exercise-btn {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.exercise-card:hover .delete-exercise-btn {
  opacity: 1;
}

.exercise-card .delete-exercise-btn:hover {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: white;
}

.exercise-card .edit-notes-btn {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.exercise-card:hover .edit-notes-btn {
  opacity: 1;
}

.exercise-card .edit-notes-btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Notes preview styling */
.notes-preview {
  font-style: italic;
  border-left: 3px solid var(--primary-color);
  max-height: 60px;
  overflow: hidden;
}

/* Multi-Select Filter Dropdown Styles */
.filter-dropdown-container {
  position: relative;
  display: inline-block;
  width: 100%;
  min-height: 36px; /* Ensure consistent container height */
}

/* Ensure all filter buttons in table headers have consistent sizing */
#increases-table th .filter-dropdown-container {
  min-height: 36px;
  display: flex;
  align-items: center;
}

.filter-btn {
  width: 100%;
  min-width: 120px; /* Minimum width to accommodate most text */
  min-height: 32px; /* Consistent height for all buttons */
  height: auto; /* Allow height to grow if text wraps */
  margin-top: 4px;
  font-size: 0.75rem;
  padding: 6px 8px; /* Increased padding for better appearance */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  hyphens: auto; /* Enable hyphenation for long words */
}

.filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 250px;
  max-width: 350px;
  max-height: 400px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 8px;
  display: none;
  overflow: hidden;
  flex-direction: column;
}

.filter-dropdown-menu.show {
  display: flex;
}

.filter-search-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.875rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  margin-bottom: 8px;
}

.filter-actions {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.filter-actions button {
  flex: 1;
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 0.25rem;
  cursor: pointer;
}

.filter-actions button:hover {
  background: #f8f9fa;
}

.filter-options-list {
  overflow-y: auto;
  max-height: 250px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.filter-option-item {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-option-item:hover {
  background: #f8f9fa;
}

.filter-option-item input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.filter-option-item label {
  margin: 0;
  cursor: pointer;
  font-size: 0.875rem;
  flex: 1;
  user-select: none;
}

/* ⚠️ CRITICAL: See EDIT_INDIVIDUAL_MERIT_INCREASES_TABLE_UX_RULES.md */
/* Sticky columns for Employee ID and Name */
#increases-table-container {
  position: relative;
}

#increases-table th.sticky-column-left-0,
#increases-table td.sticky-column-left-0 {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: #f8f9fa;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

#increases-table th.sticky-column-left-1,
#increases-table td.sticky-column-left-1 {
  position: sticky;
  left: var(--sticky-column-0-width, 120px); /* Will be calculated dynamically */
  z-index: 10;
  background-color: #f8f9fa;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

#increases-table thead th.sticky-column-left-0,
#increases-table thead th.sticky-column-left-1 {
  z-index: 11; /* Header should be above body cells */
  background-color: #f8f9fa;
}

#increases-table tbody tr:hover td.sticky-column-left-0,
#increases-table tbody tr:hover td.sticky-column-left-1 {
  background-color: #e9ecef; /* Slightly darker on hover */
}

/* Column visibility - hidden columns */
#increases-table th.column-hidden,
#increases-table td.column-hidden {
  display: none !important;
}

/* ⚠️ CRITICAL: See EDIT_INDIVIDUAL_MERIT_INCREASES_TABLE_UX_RULES.md */
/* Zebra striping for better readability */
#increases-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

#increases-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

#increases-table tbody tr:hover {
  background-color: #e9ecef !important;
}

/* Ensure sticky columns maintain background on hover */
#increases-table tbody tr:hover td.sticky-column-left-0,
#increases-table tbody tr:hover td.sticky-column-left-1 {
  background-color: #e9ecef;
}

/* Better focus indication for keyboard navigation */
#increases-table-container:focus {
  outline: 2px solid #0d6efd;
  outline-offset: -2px;
}

/* Edit Individual Increases: wider last 10 columns for better readability */
#increases-table th:nth-last-child(-n+10),
#increases-table td:nth-last-child(-n+10) {
  min-width: 110px;
  white-space: nowrap;
}

/* Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-900);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation Bar */
.navbar-main {
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-main .navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.navbar-main .nav-link {
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.navbar-main .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.navbar-main .nav-link:hover:not(.active) {
  background-color: var(--gray-100);
}

/* Login Page */
.login-page {
  min-height: 100vh;
  background: linear-gradient(to bottom, var(--slate-50, #f8fafc), rgba(250, 245, 255, 0.3), #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-container {
  max-width: 1200px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
}

#back-to-landing {
  color: var(--gray-700);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

#back-to-landing:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
  text-decoration: none;
}

#back-to-landing i {
  font-size: 1rem;
}

.login-left {
  padding: 3rem;
}

.login-left h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.login-left .tagline {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-item i {
  font-size: 1.5rem;
}

.info-box {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 1rem;
  color: #1e40af;
}

.login-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 450px;
}

.login-logo-container {
  /* Transparent logo – no background needed */
  background: none;
  border-radius: 0;
}

.login-logo {
  height: 64px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Cards */
.card {
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Tables */
.table {
  font-size: 0.875rem;
}

.table thead {
  background-color: var(--gray-50);
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
}

.table-hover tbody tr:hover {
  background-color: var(--gray-50);
}

/* Progress Tracker */
.progress-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 0.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  transition: transform 0.2s;
}

.step:hover {
  transform: translateY(-2px);
}

.step[style*="cursor: pointer"] {
  cursor: pointer;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: 80%;
  height: 2px;
  background-color: var(--gray-200);
  z-index: 0;
}

.step.completed::after {
  background-color: var(--primary-color);
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  position: relative;
  z-index: 1;
  background-color: white;
  border: 2px solid var(--gray-200);
  color: var(--gray-600);
}

.step.completed .step-circle {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step.active .step-circle {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

.step.completed .step-label,
.step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

/* File Upload Area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

/* Employees Table */
#employees-section .table-responsive {
  max-height: 500px;
  overflow-y: auto;
}

#employees-section table {
  font-size: 0.875rem;
}

#employees-section th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 10;
  font-weight: 600;
  white-space: nowrap;
}

#employees-section td {
  vertical-align: middle;
  white-space: nowrap;
}

#employees-section .badge {
  font-size: 0.75rem;
}

/* Merit Matrix Table */
.merit-matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.merit-matrix-table th,
.merit-matrix-table td {
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  text-align: center;
}

.merit-matrix-table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.merit-matrix-table td input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  padding: 0.5rem;
  text-align: center;
}

.merit-matrix-table td input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Editable Input Styling */
/* Ensure all editable inputs are clickable and focusable */
.editable-input,
.increase-input,
.comment-input {
  pointer-events: auto !important;
  user-select: text !important;
  cursor: text !important;
}

.editable-input {
  background-color: #fefce8;
  border: 1px solid #eab308;
}

.editable-input:focus {
  background-color: #eff6ff;
  border-color: var(--primary-color);
}

/* Badge Styling */
/* Exercise List View Styles */
.exercise-list-item {
  transition: background-color 0.2s;
}

/* CRITICAL: Ensure Performance Rating Source dropdown is always clickable */
#performance-rating-source {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10 !important;
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  user-select: auto !important;
}

#performance-rating-source:disabled,
#performance-rating-source[disabled] {
  pointer-events: none !important;
  opacity: 0.65 !important;
}

/* Ensure parent container doesn't block clicks */
#performance-rating-source + small {
  pointer-events: auto !important;
}

/* Ensure the parent div container doesn't block clicks */
.mb-3 {
  pointer-events: auto !important;
  position: relative !important;
}

/* Leverage Matrix Configuration: keep info icon flush right next to title text */
#matrix-section .card-header h5 span.d-inline-flex {
  gap: 0;
  white-space: nowrap;
}
#matrix-section .card-header h5 span.d-inline-flex i.bi-info-circle {
  margin-left: 0;
  margin-right: 0;
}

.exercise-list-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.exercise-list-item td {
  vertical-align: middle;
  padding: 1rem;
}

.exercise-list-item .fw-semibold {
  font-weight: 600;
  color: #1f2937;
}

.badge-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-draft {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.badge-in-progress {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-completed {
  background-color: #d1fae5;
  color: #065f46;
}

/* Responsive */
@media (max-width: 768px) {
  .login-card {
    max-width: 100%;
    padding: 1.5rem;
  }
  
  .progress-tracker {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step:not(:last-child)::after {
    display: none;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
}

/* Utility Classes */
.text-muted {
  color: var(--gray-600);
}

.bg-light {
  background-color: var(--gray-50);
}

.shadow-sm {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Resulting Merit Matrix - Consistent Cell Sizing */
.resulting-matrix-cell,
.final-matrix-cell {
  min-height: 70px;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  box-sizing: border-box;
}

/* Final Merit Matrix Table - Fixed Layout */
#final-merit-matrices-table {
  table-layout: fixed;
  width: 100%;
}

#final-merit-matrices-table th,
#final-merit-matrices-table td {
  vertical-align: middle;
}

.resulting-matrix-cell .small {
  font-size: 0.75rem;
  line-height: 1.2;
  margin-top: 2px;
}

.resulting-matrix-cell .resulting-matrix-input {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}

.resulting-matrix-cell input[disabled] {
  background-color: #f8f9fa;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Resulting Merit Matrix Table - Balanced Column Widths */
#resulting-merit-matrix-table {
  table-layout: fixed;
  width: 100%;
}

#resulting-merit-matrix-table th:first-child,
#resulting-merit-matrix-table td:first-child {
  width: 180px;
  max-width: 180px;
  min-width: 180px;
  padding: 0.5rem;
  font-size: 0.875rem;
  word-wrap: break-word;
}

#resulting-merit-matrix-table th:not(:first-child),
#resulting-merit-matrix-table td:not(:first-child) {
  width: auto;
  min-width: 140px;
  padding: 0.5rem;
}

#resulting-merit-matrix-table td {
  vertical-align: middle;
}

/* For rating-only matrix (2 columns) */
#resulting-merit-matrix-table th:last-child:not(:first-child),
#resulting-merit-matrix-table td:last-child:not(:first-child) {
  width: auto;
  min-width: 200px;
}

/* For 5-column matrix */
#resulting-merit-matrix-table th:nth-child(2),
#resulting-merit-matrix-table th:nth-child(3),
#resulting-merit-matrix-table th:nth-child(4),
#resulting-merit-matrix-table th:nth-child(5),
#resulting-merit-matrix-table td:nth-child(2),
#resulting-merit-matrix-table td:nth-child(3),
#resulting-merit-matrix-table td:nth-child(4),
#resulting-merit-matrix-table td:nth-child(5) {
  width: calc((100% - 180px) / 4);
  min-width: 140px;
}

/* Summary Cards Styles - Modern, Dynamic Design */
.summary-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  border: 1px solid #e5e7eb;
}

.summary-card-small {
  padding: 14px 16px;
  gap: 12px;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.summary-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.summary-card-small .summary-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
}

.summary-card-primary .summary-card-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.summary-card-success .summary-card-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.summary-card-info .summary-card-icon {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.summary-card-warning .summary-card-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.summary-card-danger .summary-card-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.summary-card-content {
  flex: 1;
  min-width: 0;
}

.summary-card-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.summary-card-small .summary-card-value {
  font-size: 1.5rem;
}

.summary-card-small .summary-card-label {
  font-size: 0.8rem;
}

/* Breakdown Cards Styles - Smaller, Compact Design */
#increases-breakdown-cards {
  margin-bottom: 1.5rem;
}

#increases-breakdown-cards .col-md-2 {
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
  flex: 0 0 auto;
  width: calc(100% / 6);
  max-width: calc(100% / 6);
}

.breakdown-card {
  background: white;
  border-radius: 10px;
  padding: 12px 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  border: 1px solid #e5e7eb;
  min-height: 115px;
  max-height: 115px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}

.breakdown-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breakdown-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b7280;
  flex-shrink: 0;
}

.breakdown-card-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}

.breakdown-card-label {
  font-size: 0.65rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.breakdown-card-budget {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.breakdown-budget-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.breakdown-budget-label {
  font-size: 0.6rem;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15px;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 45px;
}

.breakdown-budget-value {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.breakdown-budget-available {
  color: #2563eb;
}

.breakdown-budget-used {
  color: #059669;
}

/* Budget Summary Cards - Prominent Design */
.budget-summary-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.budget-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.budget-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.budget-summary-available {
  border-color: #3b82f6;
}

.budget-summary-available::before {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.budget-summary-used {
  border-color: #10b981;
}

.budget-summary-used::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.budget-summary-used.budget-warning {
  border-color: #f59e0b;
}

.budget-summary-used.budget-warning::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.budget-summary-used.budget-danger {
  border-color: #ef4444;
}

.budget-summary-used.budget-danger::before {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.budget-summary-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.budget-summary-available .budget-summary-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
}

.budget-summary-used .budget-summary-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #059669;
}

.budget-summary-used.budget-warning .budget-summary-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.budget-summary-used.budget-danger .budget-summary-icon {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.budget-summary-content {
  flex: 1;
  min-width: 0;
}

.budget-summary-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .summary-card {
    padding: 16px;
    gap: 12px;
  }
  
  .summary-card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .summary-card-value {
    font-size: 1.5rem;
  }
  
  #increases-breakdown-cards .col-md-2 {
    width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
  }
  
  .breakdown-card {
    padding: 10px 8px;
    gap: 6px;
    min-height: 100px;
    max-height: 100px;
  }
  
  .breakdown-card-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .breakdown-card-label {
    font-size: 0.6rem;
    margin-bottom: 6px;
  }
  
  .breakdown-budget-item {
    gap: 3px;
  }
  
  .breakdown-budget-label {
    font-size: 0.55rem;
    min-width: 40px;
  }
  
  .breakdown-budget-value {
    font-size: 0.7rem;
  }
  
  .budget-summary-card {
    padding: 20px;
    gap: 16px;
  }
  
  .budget-summary-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .budget-summary-value {
    font-size: 1.75rem;
  }
}


/* Comment input styling */
#increases-table .comment-input {
  min-width: 200px;
  max-width: 400px;
  resize: vertical;
  font-size: 0.875rem;
  padding: 4px 8px;
}

#increases-table .comment-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Summary Table - Analytics Dashboard */
.summary-table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: white;
  margin-bottom: 1rem;
}

#analytics-summary-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  background-color: white;
}

/* Table Header Styling */
#analytics-summary-table .summary-table-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #dee2e6;
}

#analytics-summary-table .summary-table-header th {
  padding: 12px 10px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #495057;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  vertical-align: middle;
  border-right: 1px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
}

#analytics-summary-table .summary-table-header th:last-child {
  border-right: none;
}

/* Column Width Classes */
#analytics-summary-table .summary-col-country {
  min-width: 110px;
  width: 110px;
  position: sticky;
  left: 0;
  z-index: 10;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

#analytics-summary-table .summary-col-number {
  min-width: 90px;
  width: 90px;
}

#analytics-summary-table .summary-col-currency {
  min-width: 120px;
  width: 120px;
}

#analytics-summary-table .summary-col-percentage {
  min-width: 110px;
  width: 110px;
}

/* Table Body Styling */
#analytics-summary-table .summary-table-row {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

#analytics-summary-table .summary-table-row:hover {
  background-color: #f8f9fa;
}

#analytics-summary-table .summary-table-row:last-child {
  border-bottom: none;
}

#analytics-summary-table .summary-table-global {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  font-weight: 600;
  border-top: 2px solid #2196f3;
  border-bottom: 2px solid #2196f3;
}

#analytics-summary-table .summary-table-global:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

#analytics-summary-table .summary-table-global td {
  border-top: 1px solid #90caf9;
  border-bottom: 1px solid #90caf9;
}

/* Cell Styling */
#analytics-summary-table td {
  padding: 10px;
  vertical-align: middle;
  border-right: 1px solid #e9ecef;
  white-space: nowrap;
}

#analytics-summary-table td:last-child {
  border-right: none;
}

#analytics-summary-table .summary-cell-country {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: white;
  font-weight: 600;
  color: #212529;
  min-width: 110px;
  width: 110px;
}

#analytics-summary-table .summary-table-row:hover .summary-cell-country {
  background-color: #f8f9fa;
}

#analytics-summary-table .summary-table-global .summary-cell-country {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

#analytics-summary-table .summary-table-global:hover .summary-cell-country {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

#analytics-summary-table .summary-cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #495057;
  min-width: 90px;
}

#analytics-summary-table .summary-cell-currency {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #212529;
  font-weight: 500;
  min-width: 120px;
}

#analytics-summary-table .summary-cell-percentage {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #495057;
  font-weight: 500;
  min-width: 110px;
}

/* Zebra striping for better readability */
#analytics-summary-table .summary-table-row:nth-child(even):not(.summary-table-global) {
  background-color: #fafafa;
}

#analytics-summary-table .summary-table-row:nth-child(odd):not(.summary-table-global) {
  background-color: white;
}

#analytics-summary-table .summary-table-row:nth-child(even):not(.summary-table-global):hover {
  background-color: #f8f9fa;
}

/* Analytics Dashboard Charts Styling - Enterprise HR-Grade Design */
.analytics-dashboard-charts {
  max-width: 1400px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.analytics-dashboard-charts .card {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  box-shadow: none; /* No shadows for clean, flat design */
  margin-bottom: 0;
}

.analytics-dashboard-charts .card-header {
  padding: 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.analytics-dashboard-charts .card-header h6 {
  font-weight: 600;
  font-size: 1rem;
  color: #212529;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.01em;
}

.analytics-dashboard-charts .card-header select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 16px;
}

.analytics-dashboard-charts .card-body {
  padding: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.analytics-dashboard-charts .card {
  margin-bottom: 24px;
}

/* Responsive layout for charts */
@media (max-width: 1200px) {
  .analytics-dashboard-charts .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .analytics-dashboard-charts .card-body {
    padding: 16px;
  }
  
  .analytics-dashboard-charts .card-header {
    padding: 12px;
  }
  
  .analytics-dashboard-charts .card-header h6 {
    font-size: 0.875rem;
  }
  
  .analytics-dashboard-charts .card-header select {
    max-width: 150px;
    font-size: 0.75rem;
  }
}

/* Responsive adjustments for summary table */
@media (max-width: 1200px) {
  #analytics-summary-table {
    font-size: 0.8rem;
  }
  
  #analytics-summary-table .summary-table-header th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  
  #analytics-summary-table td {
    padding: 8px;
  }
}

/* Manager Discretion Overrides Table - Enterprise Styling */
#manager-overrides-table {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
}

#manager-overrides-table thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #212529;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 12px 16px;
}

#manager-overrides-table tbody td {
  padding: 10px 16px;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
}

#manager-overrides-table tbody tr:hover {
  background-color: #f8f9fa;
}

#manager-overrides-table tbody tr.table-primary {
  background-color: #e7f3ff;
  font-weight: 600;
}

/* Analytics Summary Table - Enterprise Styling */
#analytics-summary-table {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
}

#analytics-summary-table thead th {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #212529;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 12px 16px;
  white-space: nowrap;
}

#analytics-summary-table tbody td {
  color: #495057;
  font-size: 0.875rem;
  padding: 10px 16px;
  white-space: nowrap;
}

#analytics-summary-table tbody tr.summary-table-global {
  background-color: #e7f3ff;
  font-weight: 600;
}

/* Global Filters Styling */
#analytics-currency-filter,
#analytics-geography-filter {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px 12px;
}

#analytics-currency-filter:focus,
#analytics-geography-filter:focus {
  border-color: #2c5a7a;
  box-shadow: 0 0 0 0.2rem rgba(44, 90, 122, 0.1);
  outline: none;
}
