:root {
  /* Premium Dark Theme Palette */
  --background: #0f1115;
  --foreground: #e0e0e0;
  --card-bg: #181b21;
  --primary: #6366f1; /* Indigo-500 */
  --primary-hover: #4f46e5;
  --secondary: #ec4899; /* Pink-500 */
  --accent: #8b5cf6; /* Violet-500 */
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(24, 27, 33, 0.7);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border-radius: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
}

.btn-danger-solid {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.text-gradient {
  background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Evaluation modal should appear on top of employee details modal */
#evaluation-modal {
  z-index: 1100;
}

/* Giver Jems/Crits modal should appear on top of evaluation modal */
#giver-jems-crits-modal {
  z-index: 1200;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  width: 90%;
  max-width: 80%;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* Evaluation Modal Specific Styles */
#evaluation-modal .modal-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Giver Jems/Crits Modal Specific Styles - Fixed header with scrollable content */
#giver-jems-crits-modal .modal-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.evaluation-modal-header {
  padding: 2rem 2rem 1rem 2rem;
  flex-shrink: 0;
  background: var(--glass-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.evaluation-modal-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0; /* Important for flex scrolling */
}

/* Employee Details Modal Specific Styles */
#employee-details-modal .modal-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.employee-details-header {
  padding: 2rem 2rem 1rem 2rem;
  flex-shrink: 0;
  background: var(--glass-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.employee-details-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0; /* Important for flex scrolling */
}

/* Consolidated Feedback Modal */
#consolidated-feedback-modal {
  z-index: 1100; /* Stack on top of employee details modal */
}

#consolidated-feedback-modal .modal-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 900px;
}

#consolidated-feedback-modal .employee-details-header {
  padding: 1.25rem 2rem 1rem 2rem;
}

.cf-group {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cf-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cf-group-header {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0 0 1rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
  border-radius: 4px;
}

.cf-section {
  margin-bottom: 1rem;
}

.cf-section-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.cf-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.cf-textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.06);
}

/* Jems by Category Modal Specific Styles */
#jems-by-category-modal {
  z-index: 1100; /* Stack on top of employee details modal */
}

#jems-by-category-modal .modal-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 900px;
}

.jems-category-modal-header {
  padding: 2rem 2rem 1rem 2rem;
  flex-shrink: 0;
  background: var(--glass-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.jems-category-modal-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0; /* Important for flex scrolling */
}

/* Category row clickable hover effect */
.category-row-clickable {
  border-radius: 4px;
}

.category-row-clickable:active {
  transform: scale(0.98);
}

/* Table Styles */
.jar-table-wrapper {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 800px;
  margin: 2rem;
}

.jar-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
}

.jar-table thead {
  position: sticky;
  top: 0;
  z-index: 15;
}

.jar-table th {
  background: #181b21;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.jar-table th.sticky-left {
  position: sticky;
  left: 0;
  z-index: 20;
  text-align: left;
  min-width: 200px;
}

.jar-table th.sticky-right {
  position: sticky;
  right: 0;
  z-index: 20;
  min-width: 200px;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
}

.jar-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.jar-table td.sticky-left {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #1f2937;
  text-align: left;
  font-weight: 500;
}

.jar-table td.sticky-right {
  position: sticky;
  right: 0;
  z-index: 10;
  background: #1f2937;
  font-weight: bold;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
  min-width: 150px;
}

.cell-btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #6b7280;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
}

.cell-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Editable cell indicator — gradient shimmer */
@keyframes cell-shimmer-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cell-shimmer {
  background-image: linear-gradient(
    110deg,
    transparent 25%,
    rgba(99, 102, 241, 0.12) 37%,
    rgba(139, 92, 246, 0.18) 50%,
    rgba(99, 102, 241, 0.12) 63%,
    transparent 75%
  ) !important;
  background-size: 200% 100%;
  animation: cell-shimmer-sweep 3s ease-in-out infinite;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

/* Editable cell indicator — pulsing border (alternative) */
@keyframes cell-pulse-glow {
  0%, 100% { border-color: rgba(99, 102, 241, 0.2); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
  50% { border-color: rgba(99, 102, 241, 0.5); box-shadow: 0 0 6px 0 rgba(99, 102, 241, 0.15); }
}
.cell-pulse {
  animation: cell-pulse-glow 2s ease-in-out infinite;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

/* Slider Styles */
.slider-container {
  width: 100%;
  padding: 1rem 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Gentle blink when slider not touched yet */
@keyframes sliderValueBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.slider-value-blink {
  animation: sliderValueBlink 1.8s ease-in-out infinite;
}

/* Tooltip above slider thumb when not touched (position set inline to match thumb) */
.slider-drag-hint {
  position: absolute;
  font-size: 8px;
  color: #9ca3af;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.slider-track {
  position: relative;
  height: 16px;
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(to right, #ef4444 0%, #f59e0b 50%, #10b981 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 40px;
  background: #fff;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  clip-path: polygon(20% 0%, 80% 0%, 100% 40%, 50% 100%, 0% 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: #333;
  z-index: 10;
  pointer-events: none;
  transition: left 0.1s ease-out;
  padding-bottom: 5px;
}

.constraint-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* JEM/Crit Item Styles */
.jem-item {
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}

.jem-item.duplicate {
  opacity: 0.6;
  border-color: var(--warning);
}

.jem-item.disapprove {
  opacity: 0.6;
  border-color: var(--danger);
}

.crit-item {
  background: rgba(239, 68, 68, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}

.crit-item.duplicate {
  opacity: 0.6;
  border-color: var(--warning);
}

.crit-item.disapprove {
  opacity: 0.6;
  border-color: var(--danger);
}

/* Page Layout */
.page-container {
  min-height: 100vh;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 2rem;
  background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: #9ca3af;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

/* Admin Smart Chat split layout */
#dashboard-view {
  height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-workspace {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.admin-main-column {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  transition: flex-basis 0.2s ease;
}

.admin-smart-chat-panel {
  display: none;
  flex: 0 0 30%;
  min-width: 320px;
  max-width: 460px;
  min-height: 0;
  overflow: hidden;
}

.admin-workspace.smart-chat-open .admin-main-column {
  flex: 1 1 70%;
}

.admin-workspace.smart-chat-open .admin-smart-chat-panel {
  display: flex;
}

.smart-chat-toggle-tab {
  display: none;
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 40px;
  height: 56px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: rgba(24, 27, 33, 0.96);
  color: #c4b5fd;
  cursor: pointer;
  z-index: 1200;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: right 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.smart-chat-toggle-tab:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: translateY(-50%) translateX(-2px);
}

.admin-workspace.smart-chat-open .smart-chat-toggle-tab {
  display: none !important;
}

.smart-chat-card {
  padding: 1rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.smart-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.smart-chat-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
}

.smart-chat-header p {
  margin-top: 0.35rem;
  color: #9ca3af;
  font-size: 0.78rem;
  line-height: 1.4;
}

.smart-chat-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.smart-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.smart-chat-message {
  display: flex;
}

.smart-chat-message.user {
  justify-content: flex-end;
}

.smart-chat-message.assistant {
  justify-content: flex-start;
}

.smart-chat-bubble {
  max-width: 92%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.smart-chat-bubble p {
  margin: 0 0 0.75rem 0;
}

.smart-chat-bubble p:last-child {
  margin-bottom: 0;
}

.smart-chat-bubble ul {
  margin: 0.25rem 0 0.75rem 1.1rem;
  padding: 0;
}

.smart-chat-bubble ul:last-child {
  margin-bottom: 0;
}

.smart-chat-bubble li {
  margin-bottom: 0.35rem;
}

.smart-chat-message.user .smart-chat-bubble {
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
}

.smart-chat-message.assistant .smart-chat-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.smart-chat-sources {
  margin-top: 0.4rem;
  color: #9ca3af;
  font-size: 0.72rem;
}

.smart-chat-action {
  margin-top: 0.75rem;
}

.smart-chat-action-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.smart-chat-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.smart-chat-clarification {
  margin-top: 0.75rem;
}

.clarification-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.clarification-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.clarification-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.clarification-option input {
  accent-color: #6366f1;
}

.clarification-option span {
  font-size: 0.9rem;
}

.clarification-confirm {
  width: 100%;
}

.smart-chat-emp-link {
  color: #a78bfa;
  text-decoration: none;
  border-bottom: 1px dotted rgba(167, 139, 250, 0.5);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.smart-chat-emp-link:hover {
  color: #c4b5fd;
  border-bottom-color: #c4b5fd;
}

.smart-chat-emp-id {
  color: #6b7280;
  font-size: 0.8em;
}

.smart-chat-form {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.smart-chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 76px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem;
  outline: none;
}

.smart-chat-form textarea:focus {
  border-color: rgba(99, 102, 241, 0.7);
}

.smart-chat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.smart-chat-actions .btn-primary,
.smart-chat-actions .btn-secondary {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  #dashboard-view {
    height: auto;
  }

  .admin-workspace {
    flex-direction: column;
    overflow: visible;
  }

  .admin-smart-chat-panel,
  .admin-workspace.smart-chat-open .admin-smart-chat-panel {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .smart-chat-card {
    min-height: 480px;
    max-height: 70vh;
  }

  .admin-workspace.smart-chat-open .smart-chat-toggle-tab {
    display: none !important;
  }
}

/* Access Denied */
.access-denied {
  padding: 2rem;
  text-align: center;
}

.access-denied h1 {
  color: #ef4444;
  margin-bottom: 1rem;
}

/* Custom Alert Modal */
.alert-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.alert-modal-overlay.open {
  display: flex;
}

.alert-modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

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

.alert-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.alert-modal-icon.success {
  color: var(--success);
}

.alert-modal-icon.error {
  color: var(--danger);
}

.alert-modal-icon.warning {
  color: var(--warning);
}

.alert-modal-icon.info {
  color: var(--primary);
}

.alert-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.alert-modal-message {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.alert-modal-button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  width: 100%;
}

.alert-modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

/* Custom Confirm Modal */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.confirm-modal-overlay.open {
  display: flex;
}

.confirm-modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

.confirm-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--warning);
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.confirm-modal-message {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.confirm-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-modal-button {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  min-width: 100px;
}

.confirm-modal-button.cancel {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.confirm-modal-button.cancel:hover {
  background: rgba(99, 102, 241, 0.1);
}

.confirm-modal-button.confirm {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.confirm-modal-button.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.confirm-modal-button.danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.confirm-modal-button.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

/* Analytics Section Styles */
.analytics-section {
  width: 100%;
}

.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.analytics-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.analytics-card h4 {
  font-weight: 600;
}

.analytics-card::-webkit-scrollbar {
  width: 6px;
}

.analytics-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.analytics-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.analytics-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .analytics-card {
    padding: 1rem;
  }
  
  .analytics-card h4 {
    font-size: 0.9rem;
  }
  
  .jems-team-row {
    grid-template-columns: 1fr !important;
  }
}

/* Top Three 2-column grid layout */
.top-three-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .top-three-grid {
    grid-template-columns: 1fr;
  }
}

/* Spinner animation for loading states */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Role select dropdown styling - ensures proper contrast across all browsers */
.role-select-dropdown {
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
}

.role-select-dropdown option {
  background: #1f2937 !important;
  color: #fff !important;
  padding: 0.5rem !important;
}

/* For browsers that support color-scheme */
.role-select-dropdown {
  color-scheme: dark;
}

/* ── Status Reason Popup ────────────────────────────────────────────────── */
.reason-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: reasonFadeIn 0.15s ease;
}

@keyframes reasonFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reason-popup {
  background: var(--card-bg, #181b21);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  width: min(520px, 90vw);
  padding: 1.5rem;
}

.reason-popup h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.reason-popup textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.reason-popup textarea:focus {
  border-color: var(--primary, #6366f1);
}

.reason-popup textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.reason-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.reason-popup-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}

.reason-popup-actions .reason-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
}

.reason-popup-actions .reason-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.reason-popup-actions .reason-submit-btn {
  background: var(--primary, #6366f1);
  color: #fff;
}

.reason-popup-actions .reason-submit-btn:hover {
  background: var(--primary-hover, #4f46e5);
}

.reason-popup-actions .reason-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reason-popup-card-preview {
  margin-bottom: 1rem;
}
