.agile-board-container {
  padding: 20px;
  background: #f8f9fa;
  min-height: 100vh;
}

.agile-board-header {
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agile-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.sprint-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Spillover Controls */
.spillover-controls {
  background: #f8f9fc;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 12px 16px;
  min-width: 280px;
}

.spillover-info {
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spillover-info.no-next-sprint {
  opacity: 0.7;
}

.incomplete-count {
  color: #bf2600;
  font-weight: 500;
}

.spillover-actions {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.spillover-btn {
  background: #0052cc;
  color: white !important;
  padding: 6px 12px;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spillover-btn:hover {
  background: #0747a6;
  color: white;
  text-decoration: none;
}

.spillover-btn .spillover-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.spillover-selective-btn {
  background: #6b778c;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spillover-selective-btn:hover {
  background: #5e6c84;
}

.spillover-selective-btn .spillover-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalFadeIn 0.2s ease-out;
}

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

.modal-header {
  background: #f4f5f7;
  padding: 20px 24px;
  border-bottom: 1px solid #dfe1e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #172b4d;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  color: #6b778c;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #172b4d;
}

.modal-body {
  padding: 24px;
}

/* Task Selection */
.task-selection {
  margin-bottom: 24px;
}

.select-all-wrapper {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f4f5f7;
}

.select-all-wrapper label {
  font-weight: 600;
  color: #172b4d;
}

.incomplete-tasks-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  padding: 8px 0;
}

.task-item {
  padding: 8px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #f4f5f7;
}

.task-item:last-child {
  border-bottom: none;
}

.task-item:hover {
  background-color: #f4f5f7;
}

.task-label {
  cursor: pointer;
  flex: 1;
  font-weight: normal;
}

.task-id {
  color: #6b778c;
  font-weight: 500;
  font-size: 12px;
}

.task-subject {
  display: block;
  color: #172b4d;
  font-weight: 500;
  margin: 2px 0 6px 0;
  line-height: 1.3;
}

.task-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.task-status {
  background: #dfe1e6;
  color: #42526e;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.task-assignee {
  color: #6b778c;
  font-size: 12px;
}

.task-points {
  color: #0052cc;
  font-size: 12px;
  font-weight: 600;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #f4f5f7;
}

.btn {
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #0052cc;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0747a6;
}

.btn-primary:disabled {
  background: #dfe1e6;
  color: #97a0af;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fafbfc;
  color: #42526e;
  border: 1px solid #dfe1e6;
}

.btn-secondary:hover {
  background: #f4f5f7;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Spillover notification */
.spillover-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.spillover-notification.success {
  background: #00875a;
}

.spillover-notification.error {
  background: #de350b;
}

.spillover-notification.info {
  background: #0052cc;
}

/* Sprint Show Page Breadcrumb Styles */
.sprint-breadcrumb {
  background: white;
  padding: 20px 24px;
  margin-bottom: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: #6b778c;
}

.breadcrumb-item:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: #97a0af;
  font-size: 16px;
}

.breadcrumb-item a {
  color: #0052cc;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #0747a6;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #172b4d;
  font-weight: 500;
}

.sprint-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.sprint-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #172b4d;
}

.sprint-status-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #e3fcef;
  color: #00875a;
  border: 1px solid #abf5d1;
}

.badge-primary {
  background: #deebff;
  color: #0052cc;
  border: 1px solid #b3d4ff;
}

.badge-secondary {
  background: #f4f5f7;
  color: #6b778c;
  border: 1px solid #dfe1e6;
}

/* Sprint Show Page Spillover Styles */
.sprint-info-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.sprint-details {
  flex: 1;
}

.sprint-show-spillover {
  background: #f8f9fc;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 16px;
  min-width: 300px;
}

.spillover-section h4 {
  margin: 0 0 12px 0;
  color: #172b4d;
  font-size: 16px;
  font-weight: 600;
}

.spillover-section .spillover-info {
  margin-bottom: 12px;
  line-height: 1.4;
}

.next-sprint-info {
  display: block;
  color: #6b778c;
  font-size: 14px;
  margin-top: 4px;
}

.spillover-section .spillover-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.spillover-section .spillover-actions .btn {
  justify-content: center;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .spillover-controls {
    min-width: auto;
    width: 100%;
  }

  .spillover-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .spillover-btn, .spillover-selective-btn {
    text-align: center;
    width: 100%;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .sprint-info-section {
    flex-direction: column;
    gap: 16px;
  }

  .sprint-show-spillover {
    min-width: auto;
    width: 100%;
  }

  .sprint-header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sprint-title {
    font-size: 24px;
  }

  .breadcrumb {
    flex-wrap: wrap;
    gap: 4px;
  }

  .sprint-breadcrumb {
    padding: 16px 20px;
  }
}

.agile-board-listing {
  display: flex;
  gap: 20px;
  padding-bottom: 2rem;
  overflow-x: auto;
}

.status-column {
  background: #f6f7f9;
  border-radius: 10px;
  padding: 10px;
  min-width: 280px;
  max-width: 300px;
  flex: 0 0 auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-header h3 {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  padding: 8px 0;
  background-color: #4f80a8;
  border-radius: 5px;
  color: #fff;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.card-title {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 14px;
}

.card-meta {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.priority-urgent {
  background-color: #f44336;
  color: white;
}
.priority-high {
  background-color: #ff9800;
  color: white;
}
.priority-normal, .priority-critical-p2 {
  background-color: #2196f3;
  color: white;
}
.priority-low, .priority-non-critical-p3 {
  background-color: #4caf50;
  color: white;
}
.priority-immediate, .priority-showstopper-p1 {
  background-color: #9c27b0;
  color: white;
}
.priority-lowest, .priority-trivial-p4 {
  background-color: #607d8b;
  color: white;
}
.priority-none {
  background-color: #e0e0e0;
  color: #000;
}

.query-form {
  margin-bottom: 1em;
}
.filters {
  margin-bottom: 20px;
}
.filters label {
  margin-right: 0.5em;
}
.filters select {
  margin-right: 2em;
}
.pagination {
  margin-top: 1em;
}
.flex-aligned {
  display: flex;
  justify-content: space-between;
}

.issues-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}
.issues-table th, .issues-table td {
  padding: 0.5em;
  border: 1px solid #ccc;
}
.sprint-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 8px;
  margin: 5px 0;
  border-radius: 4px;
  cursor: grab;
}
.droppable-area {
  background: #f1f8ff;
  min-height: 360px;
  max-height: 400px;
  overflow-y: auto;
}
.droppable-area.dragover {
  outline: 2px dashed #007acc;
}
.droppable-empty td {
  text-align: center;
  font-style: italic;
  color: #666;
  height: 60px;
}
.drag-container {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.drag-table {
  flex: 1;
  min-width: 300px;
}

#suggestion-box {
  padding: 1em;
  border: 2px dashed #ffc107;
  background-color: #fffde7;
  border-radius: 6px;
  margin-top: 1.5em;
  max-width: 100%;
  overflow-x: hidden;
}

#suggestion-box h3 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 1em;
  color: #333;
}
.smart-suggestions input[type="checkbox"] {
  transform: scale(1.1);
  margin-top: 2px;
}

.sprint-summary.box {
  padding: 1em;
  background: #f9f9f9;
  border-left: 5px solid #469;
  margin-bottom: 2em;
  border-radius: 4px;
}

.drag-container {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
}

.drag-table {
  flex: 1 1 45%;
  min-width: 400px;
}

.issues-table th, .issues-table td {
  padding: 0.5em;
  vertical-align: middle;
}

.issues-table tr:hover {
  background-color: #eef6ff;
}

.status-column.allowed-drop {
  border: 2px solid green;
  background-color: #eaffea;
}

.status-column.not-allowed-drop {
  border: 2px solid red;
  background-color: #ffeaea;
}

.rsbp-title {
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: bold;
}

.rsbp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.dashboard-card {
  background: #fafbfc;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-card-header {
  font-weight: bold;
  margin-bottom: 8px;
}

.kpi {
  text-align: center;
  background: #f9fafc;
}

.kpi-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 18px;
  font-weight: bold;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #4e79a7;
}

.chart-container {
  height: 280px;
}

@media (max-width: 768px) {
  .large {
    grid-column: span 1;
    height: 250px;
  }
}

.large {
  grid-column: span 2;
  min-height: 320px;
  max-height: 350px; /* prevents it from growing too tall */
}

.medium {
  grid-column: span 3;
  min-height: 250px;
  max-height: 270px;
  min-width: 300px;
}

/* Also control the canvas itself */
.card canvas {
  max-height: 100%;
  width: 100% !important;
}

.difficulty-values {
  font-size: 7px !important;
}

.chart-tabs {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.chart-tab {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none !important;
  background: #f5f5f5;
  color: #333;
  font-weight: 500 !important;
  transition: background 0.2s ease;
}

.chart-tab:hover {
  background: #e0e0e0;
}

.chart-tab.active {
  background: #007bff;
  color: #fff !important;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#status-filter {
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid #ddd;
  background: #f9f9f9;
}
#status-filter h3 {
  margin-top: 0;
}

#status-filter-form label {
  cursor: pointer;
}

.agile-controls .filters form {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

#status-list-section {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 21px;
}

#sprint-board-status-wrapper {
  max-height: 300px;
  overflow-y: auto;
  min-width: 200px;
}

.agile-board-container label {
  display: inline-block !important;
}

/* Empty State Styling */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 40px auto;
  max-width: 500px;
}

.empty-state-icon {
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-icon svg {
  width: 48px;
  height: 48px;
  color: #666;
}

.empty-state h3 {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.empty-state p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.empty-state .btn {
  background: #2d5aa0;
  border: 1px solid #2d5aa0;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  transition: all 0.2s ease;
}

.empty-state .btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Group By Section Styling */
.group-by-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e1e4e8;
  margin-top: 16px;
}

.group-by-section .field {
  margin: 0;
}

.group-by-section label {
  font-weight: 600;
  color: #24292f;
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
}

.group-by-section .values {
  flex: 1;
}

/* Enhanced Group By Dropdown */
.group-by-select {
  background: #ffffff;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  padding: 7px 32px 8px 12px;
  font-size: 14px;
  color: #24292f;
  width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23586069' viewBox='0 0 16 16'%3E%3Cpath d='M4.427 9.573 8 13.146l3.573-3.573a1 1 0 0 1 1.414 1.414l-4.28 4.28a1 1 0 0 1-1.414 0L3.013 10.987a1 1 0 0 1 1.414-1.414Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.group-by-select:hover {
  border-color: #8c959f;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.group-by-select:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.group-by-select:disabled {
  background-color: #f6f8fa;
  color: #8c959f;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Group By Option Styling */
.group-by-select option {
  padding: 8px 12px;
  font-size: 14px;
  color: #24292f;
  background: #ffffff;
}

.group-by-select option:checked {
  background: #0969da;
  color: #ffffff;
}

/* Responsive Group By */
@media (max-width: 768px) {
  .group-by-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .group-by-select {
    width: 100%;
  }
}