:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --surface-soft: #eef4eb;
  --text: #163020;
  --muted: #5b6d62;
  --border: #d8e4d7;
  --primary: #1d6b4f;
  --primary-dark: #124835;
  --urgent: #ef5350;
  --medium: #f5b940;
  --low: #7cb342;
  --development: #90caf9;
  --testing: #ffcc80;
  --deployed: #81c784;
  --hold: #ce93d8;
  --shadow: 0 20px 50px rgba(17, 47, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(125, 188, 135, 0.18), transparent 24%),
    linear-gradient(180deg, #f8fbf6 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1700px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, #19392b 0%, #2d6b4d 100%);
  color: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1,
.table-toolbar h2,
.modal-header h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.hero-copy {
  max-width: 700px;
  margin: 12px 0 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.hero-logo {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 8px;
}

.hero-logo-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.logo-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff9e2c;
}

.dot-1 {
  top: 2px;
  left: 2px;
}

.dot-2 {
  top: 2px;
  right: 4px;
}

.dot-3 {
  top: 14px;
  right: 10px;
}

.dot-4 {
  bottom: 2px;
  left: 9px;
}

.logo-line {
  position: absolute;
  height: 1.5px;
  background: #ff9e2c;
  transform-origin: left center;
  border-radius: 999px;
}

.line-1 {
  top: 5px;
  left: 7px;
  width: 14px;
  transform: rotate(6deg);
}

.line-2 {
  top: 8px;
  left: 8px;
  width: 14px;
  transform: rotate(58deg);
}

.line-3 {
  top: 17px;
  left: 11px;
  width: 11px;
  transform: rotate(154deg);
}

.hero-logo-wordmark {
  display: flex;
  align-items: end;
  gap: 0;
  color: #ff9e2c;
}

.logo-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ffb347 0%, #ff8a00 100%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.logo-text {
  font-size: 42px;
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.stat-card,
.controls-card,
.table-card {
  background: var(--surface);
  border: 1px solid rgba(216, 228, 215, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 12px 18px;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 800;
}

.stat-card.status-product-card {
  border-top: 5px solid #ffb74d;
}

.stat-card.status-design-card {
  border-top: 5px solid #f48fb1;
}

.stat-card.status-development-card {
  border-top: 5px solid #64b5f6;
}

.stat-card.status-testing-card {
  border-top: 5px solid #ffcc80;
}

.stat-card.status-on-hold-card {
  border-top: 5px solid #ce93d8;
}

.stat-card.status-deployed-card {
  border-top: 5px solid #81c784;
}

.controls-card {
  padding: 14px 20px;
}

.table-card {
  padding: 18px 20px;
}

.controls-top,
.filters-row,
.table-toolbar,
.modal-header,
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.filters-row {
  align-items: end;
  flex-wrap: wrap;
}

#exportButton,
#resetFiltersButton {
  align-self: end;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.input-group.compact {
  min-width: 180px;
  flex: 0 0 180px;
}

.multi-select {
  position: relative;
}

.multi-select-button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
}

.multi-select-button::after {
  content: "▾";
  font-size: 16px;
  color: var(--muted);
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 47, 31, 0.14);
  padding: 10px;
  z-index: 20;
}

.multi-select.is-closed .multi-select-menu {
  display: none;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.multi-select-option:hover {
  background: var(--surface-soft);
}

.multi-select-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.multi-select-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.required-mark {
  color: #c62828;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(29, 107, 79, 0.18);
  border-color: var(--primary);
}

.primary-button,
.secondary-button,
.icon-button,
.action-button {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.action-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.secondary-button {
  padding: 12px 18px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.table-toolbar p {
  margin: 0;
  color: var(--muted);
}

.table-wrapper {
  margin-top: 18px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.pagination-bar,
.pagination-size,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pagination-size {
  color: var(--muted);
}

.pagination-size select {
  width: auto;
  min-width: 90px;
}

.pagination-info {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px;
  background: #fff;
}

thead th {
  position: sticky;
  top: 0;
  background: #edf5ec;
  z-index: 1;
  text-align: left;
  padding: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #294234;
}

tbody td {
  padding: 14px;
  vertical-align: top;
  border-top: 1px solid #edf1eb;
  font-size: 14px;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.priority-urgent {
  background: rgba(239, 83, 80, 0.16);
  color: #b71c1c;
}

.priority-medium {
  background: rgba(245, 185, 64, 0.2);
  color: #8a5a00;
}

.priority-low {
  background: rgba(124, 179, 66, 0.18);
  color: #36670b;
}

.status-development {
  background: rgba(144, 202, 249, 0.28);
  color: #0b5394;
}

.status-product {
  background: rgba(255, 183, 77, 0.24);
  color: #9c4a00;
}

.status-design {
  background: rgba(244, 143, 177, 0.24);
  color: #ad1457;
}

.status-testing {
  background: rgba(255, 204, 128, 0.28);
  color: #995b00;
}

.status-deployed {
  background: rgba(129, 199, 132, 0.28);
  color: #1b5e20;
}

.status-on-hold {
  background: rgba(206, 147, 216, 0.3);
  color: #6a1b9a;
}

.progress-track {
  width: 110px;
  height: 10px;
  border-radius: 999px;
  background: #e8efe6;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7dc37c 0%, #2f8f46 100%);
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.action-button {
  padding: 8px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.action-button.delete {
  background: rgba(239, 83, 80, 0.12);
  color: #b71c1c;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 24, 17, 0.52);
  z-index: 1000;
}

.hidden {
  display: none !important;
}

.modal-panel {
  position: relative;
  z-index: 1001;
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.18);
}

body.modal-open {
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.full-width,
.form-actions {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 960px) {
  .hero,
  .controls-top,
  .filters-row,
  .table-toolbar,
  .modal-header,
  .form-actions,
  .stats-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 20px, 1400px);
    padding-top: 20px;
  }

  .hero-logo {
    align-items: center;
  }

  .logo-text {
    font-size: 42px;
  }

  .pagination-bar,
  .pagination-size,
  .pagination-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Multi-select & bulk actions */
.checkbox-col {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.checkbox-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

tr.row-selected {
  background: rgba(29, 107, 79, 0.06);
}

.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  margin-top: 12px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border: 1px solid rgba(29, 107, 79, 0.25);
  border-radius: 14px;
  animation: slideDown 0.2s ease;
}

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

.bulk-action-bar span {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-dark);
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-status-group label {
  white-space: nowrap;
  font-size: 13px;
}

.bulk-status-group select {
  width: auto;
  min-width: 130px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.bulk-status-btn {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 14px;
  font-weight: 700;
}

.bulk-action-bar .action-button.delete {
  padding: 8px 14px;
}

/* Description Column Overlay & Truncation styles */
.description-cell {
  max-width: 280px !important;
  min-width: 180px !important;
}

.description-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  cursor: help;
  display: block;
}

/* Premium Tooltip styling */
.description-global-tooltip {
  position: absolute;
  background: rgba(22, 48, 32, 0.98); /* Elegant deep slate matching the project theme */
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 340px;
  box-shadow: 0 12px 30px rgba(17, 47, 31, 0.25);
  z-index: 10000;
  pointer-events: none; /* Make sure it doesn't intercept mouse events */
  word-wrap: break-word;
  white-space: normal;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  font-family: "Manrope", sans-serif;
}

.description-global-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.description-global-tooltip.hidden {
  display: none;
}

