.muted {
  color: var(--ink-muted);
  margin: 0;
}

.is-hidden {
  display: none !important;
}

body.dashboard-booting {
  overflow: hidden;
}

body.dashboard-booting .page,
body.dashboard-transitioning .page {
  visibility: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.99);
}

body.dashboard-transitioning .page,
body.dashboard-ready .page {
  visibility: visible;
}

body.dashboard-transitioning .page {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.dashboard-ready .page {
  opacity: 1;
  transform: none;
}

body .page {
  transition: opacity 0.3s ease, transform 0.32s ease;
}

.dashboard-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(74, 123, 196, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(246, 249, 255, 0.98), rgba(239, 244, 252, 0.98));
  opacity: 1;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.dashboard-transitioning .dashboard-boot-overlay {
  opacity: 0;
  visibility: hidden;
}

.dashboard-boot-card {
  width: min(480px, 100%);
  padding: 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(31, 58, 101, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  text-align: center;
  transition: opacity 0.28s ease, transform 0.32s ease;
}

body.dashboard-transitioning .dashboard-boot-card {
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
}

.dashboard-boot-logo {
  width: 88px;
  margin: 0 auto 14px;
  animation: dashboard-boot-float 1.8s ease-in-out infinite;
}

.dashboard-boot-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.dashboard-boot-card h2 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

.dashboard-boot-copy {
  margin: 0;
  color: var(--ink-muted);
}

@keyframes dashboard-boot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.delete-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 101, 0.14);
  background: rgba(245, 247, 255, 0.9);
  margin-bottom: 16px;
}

.delete-summary strong {
  color: var(--accent);
}

.app-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(24, 38, 68, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.is-hidden {
  display: block !important;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
}

.meta-card {
  background: #eef2ff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.meta-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(17, 26, 44, 0.18);
}

.meta-card.is-clickable {
  cursor: pointer;
}

.meta-card.is-clickable:focus-visible {
  outline: 2px solid rgba(38, 58, 108, 0.28);
  outline-offset: 2px;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ticket-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid var(--border);
  margin: 0 auto 18px;
  grid-column: 1 / -1;
  justify-self: center;
  backdrop-filter: blur(6px);
}

.grid {
  --panel-offset: 28px;
}

.grid.slide-left {
  --panel-offset: -28px;
}

.grid.slide-right {
  --panel-offset: 28px;
}

.tab {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(17, 26, 44, 0.25);
}

.tab:not(.is-active):hover {
  transform: translateY(-1px);
  background: rgba(28, 41, 71, 0.08);
}

.tab-panel {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
  min-height: 0;
  align-content: start;
}

.tab-panel .card {
  animation: riseIn 0.35s ease both;
}

.tab-panel .card:nth-child(1) {
  animation-delay: 0.02s;
}

.tab-panel .card:nth-child(2) {
  animation-delay: 0.08s;
}

.tab-panel .card:nth-child(3) {
  animation-delay: 0.14s;
}

.tab-panel .card:nth-child(4) {
  animation-delay: 0.2s;
}

.tab-panel.is-hidden {
  opacity: 0;
  transform: translateX(var(--panel-offset));
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.panel-todo .card {
  animation: none;
}

.metrics-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.metrics-filter-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.metrics-filter .field {
  margin: 0;
}

.metrics-filter .icon-button {
  background: rgba(31, 58, 101, 0.12);
}

.metrics-filter .icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

#task-metrics-groups {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.metrics-role-layout-host {
  grid-column: 1 / -1;
  width: 100%;
}

.metrics-role-layout {
  display: grid;
  gap: 20px;
}

.metrics-hero-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(234, 241, 251, 0.9)),
    radial-gradient(circle at top right, rgba(31, 58, 101, 0.08), transparent 38%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.metrics-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.metrics-hero-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  color: var(--accent-dark);
}

.metrics-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.1);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.metrics-summary-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metrics-summary-card-neutral {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 242, 250, 0.86));
}

.metrics-summary-card-active {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.98), rgba(214, 233, 255, 0.9));
}

.metrics-summary-card-accent {
  background: linear-gradient(180deg, rgba(243, 240, 255, 0.98), rgba(226, 220, 255, 0.9));
}

.metrics-summary-card-success {
  background: linear-gradient(180deg, rgba(239, 250, 244, 0.98), rgba(216, 241, 226, 0.9));
}

.metrics-summary-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.metrics-summary-value {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--accent);
}

.metrics-dashboard-grid {
  display: grid;
  gap: 20px;
}

.metrics-dashboard-grid-pm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics-contributor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.metrics-contributor-main,
.metrics-contributor-side {
  display: grid;
  gap: 18px;
  min-width: 0;
  align-content: start;
}

.metrics-contributor-shell-compact {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.metrics-summary-strip-contributor {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metrics-contributor-hero {
  gap: 14px;
}

.metrics-contributor-hero-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.metrics-contributor-focus,
.metrics-contributor-release-spotlight {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: rgba(255, 255, 255, 0.82);
  min-width: 0;
}

.metrics-contributor-release-spotlight-compact {
  align-content: center;
  min-height: 0;
  padding: 16px 18px;
}

.metrics-contributor-focus-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.metrics-contributor-focus-caption {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.metrics-contributor-focus h3,
.metrics-contributor-release-spotlight h3 {
  margin: 0;
  font-size: 1.22rem;
  color: var(--accent-dark);
}

.metrics-contributor-focus-summary {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.45;
}

.metrics-contributor-focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.metrics-queue-section {
  align-content: start;
}

.metrics-section-card-empty {
  gap: 8px;
  min-height: 0;
  padding-block: 16px;
}

.metrics-contributor-main > .metrics-queue-section {
  min-height: 100%;
}

.metrics-queue-list {
  display: grid;
  gap: 12px;
}

.metrics-queue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metrics-queue-summary-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

.metrics-queue-summary-item span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.metrics-queue-summary-item strong {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent-dark);
}

.metrics-queue-summary-item-warning {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.95), rgba(255, 237, 213, 0.86));
}

.metrics-queue-summary-item-active {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.95), rgba(214, 233, 255, 0.88));
}

.metrics-queue-groups {
  display: grid;
  gap: 14px;
}

.metrics-queue-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 58, 101, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

.metrics-queue-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metrics-queue-group-header h4 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--accent-dark);
}

.metrics-queue-group-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.metrics-queue-item {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metrics-queue-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.metrics-queue-item h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent-dark);
}

.metrics-queue-meta,
.metrics-queue-detail,
.metrics-queue-footnote {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.metrics-queue-footnote {
  color: var(--accent-dark);
  font-weight: 600;
}

.metrics-contributor-support {
  align-content: start;
}

.metrics-contributor-support .metrics-section-header h3,
.metrics-team-context > .metrics-section-header h3 {
  font-size: 1rem;
}

.metrics-support-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metrics-contributor-support .metrics-summary-card {
  min-height: 0;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.metrics-contributor-support .metrics-summary-value {
  font-size: 1.18rem;
}

.metrics-team-context {
  gap: 12px;
  background: linear-gradient(180deg, rgba(248, 250, 254, 0.96), rgba(240, 244, 251, 0.92));
}

.metrics-team-context-stack {
  display: grid;
  gap: 12px;
}

.metrics-team-context .metrics-section-card {
  padding: 16px;
  gap: 12px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

.metrics-team-context .metrics-queue-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.74);
}

.metrics-team-context .metrics-status-band-legend {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.metrics-team-context .metrics-section-card-empty {
  padding-block: 12px;
}

.metrics-status-band {
  display: grid;
  gap: 12px;
}

.metrics-status-band-bar {
  display: flex;
  min-height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
}

.metrics-status-band-segment {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  transform-origin: left center;
  animation: metricsBarGrow 520ms ease-out forwards;
}

.metrics-status-band-segment-neutral,
.metrics-status-band-key-neutral {
  background: #94a3b8;
}

.metrics-status-band-segment-active,
.metrics-status-band-key-active {
  background: #2d6cdf;
}

.metrics-status-band-segment-success,
.metrics-status-band-key-success {
  background: #1f9d55;
}

.metrics-status-band-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.metrics-status-band-item {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  color: var(--ink);
}

.metrics-status-band-key {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.metrics-dashboard-grid > .metrics-section-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.metrics-section-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 252, 0.92));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  min-width: 0;
}

.metrics-section-card-featured {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 243, 252, 0.94)),
    radial-gradient(circle at top right, rgba(31, 58, 101, 0.05), transparent 40%);
}

.metrics-section-card-compact {
  padding: 20px;
}

.metrics-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.metrics-section-header h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  color: var(--accent-dark);
}

.metrics-motion-in {
  animation: metricsFadeUp 260ms ease-out both;
}

.metrics-health-card,
.metrics-release-card,
.metrics-workload-card,
.metrics-priority-card,
.metrics-attention-card {
  min-width: 0;
}

.metrics-health-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.metrics-health-pill-success {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.metrics-health-pill-active {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.metrics-health-pill-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.metrics-health-pill-neutral {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.metrics-progress-block {
  display: grid;
  gap: 10px;
}

.metrics-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.metrics-progress-top strong {
  color: var(--accent-dark);
}

.metrics-progress-bar,
.metrics-workload-meter,
.metrics-pipeline-bar {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.1);
}

.metrics-progress-bar {
  height: 12px;
}

.metrics-progress-fill,
.metrics-workload-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transform-origin: left center;
  animation: metricsBarGrow 560ms ease-out forwards;
}

.metrics-progress-fill {
  background: linear-gradient(90deg, #2d6cdf, #1f9d55);
}

.metrics-chart-shell {
  display: grid;
  gap: 12px;
}

.metrics-chart-wrap {
  position: relative;
  min-height: 180px;
}

.metrics-chart-wrap-compact {
  min-height: 150px;
}

.metrics-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.metrics-release-focus {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.78);
}

.metrics-release-card-compact {
  align-content: start;
}

.metrics-release-card-compact .metrics-release-focus {
  min-height: 0;
}

.metrics-release-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.metrics-release-meta,
.metrics-release-facts,
.metrics-workload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.metrics-pipeline {
  display: grid;
  gap: 12px;
}

.metrics-pipeline-bar {
  display: flex;
  height: 16px;
}

.metrics-pipeline-segment {
  display: block;
  min-width: 0;
  transform-origin: left center;
  animation: metricsBarGrow 520ms ease-out forwards;
}

.metrics-pipeline-segment-neutral,
.metrics-pipeline-dot-neutral {
  background: #94a3b8;
}

.metrics-pipeline-segment-active,
.metrics-pipeline-dot-active {
  background: #2d6cdf;
}

.metrics-pipeline-segment-success,
.metrics-pipeline-dot-success {
  background: #1f9d55;
}

.metrics-pipeline-segment-danger,
.metrics-pipeline-dot-danger {
  background: #dc2626;
}

.metrics-pipeline-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metrics-pipeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  color: var(--ink);
}

.metrics-pipeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.metrics-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  grid-column: 1 / -1;
}

.metrics-capacity-section {
  grid-column: 1 / -1;
}

.metrics-capacity-header {
  padding: 0;
}

.metrics-capacity-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.metrics-capacity-section > .metrics-section-card {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

.metrics-attention-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 252, 0.92));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  min-height: 420px;
  height: 100%;
}

.metrics-attention-body {
  min-height: 0;
  overflow: hidden;
}

.metrics-attention-list,
.metrics-workload-list {
  display: grid;
  gap: 12px;
}

.metrics-attention-list {
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  align-content: start;
  overscroll-behavior: contain;
}

.metrics-attention-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
}

.metrics-workload-shell {
  display: grid;
  gap: 12px;
}

.metrics-workload-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.metrics-workload-summary {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.metrics-workload-toggle {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.metrics-attention-item,
.metrics-workload-row {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.82);
}

.metrics-workload-row {
  animation: metricsFadeUp 280ms ease-out both;
}

.metrics-attention-item-top,
.metrics-workload-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.metrics-attention-item-top h4,
.metrics-workload-row-head h4 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--accent-dark);
}

.metrics-attention-badge,
.metrics-workload-hours {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.metrics-attention-meta,
.metrics-attention-detail {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.metrics-workload-meter {
  height: 10px;
}

.metrics-workload-meter-fill {
  background: linear-gradient(90deg, #2d6cdf, #8ab2ff);
}

.metrics-priority-card-compact,
.metrics-workload-card {
  align-content: start;
}

.metrics-compact-distribution {
  display: grid;
  gap: 10px;
}

.metrics-compact-distribution-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 101, 0.1);
  background: rgba(255, 255, 255, 0.8);
  animation: metricsFadeUp 240ms ease-out both;
}

.metrics-compact-distribution-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.metrics-compact-distribution-track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
}

.metrics-compact-distribution-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #f0c987);
  transform-origin: left center;
  animation: metricsBarGrow 520ms ease-out forwards;
}

.metrics-compact-distribution-value {
  font-size: 0.86rem;
  color: var(--accent-dark);
}

#task-metrics-groups > .card-metrics,
#task-metrics-groups > .metrics-overview-shell,
#task-metrics-groups > .task-metrics-group {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.chart-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 253, 0.88));
  border-radius: 18px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  padding: 16px 16px 14px;
  box-shadow: 0 10px 28px rgba(17, 26, 44, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.chart-card-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.chart-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent-dark);
}

.chart-card-note {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.task-metrics-group {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.task-metrics-header.is-overview {
  align-items: flex-end;
}

.metrics-eyebrow {
  margin: 0 0 8px;
}

.task-metrics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.task-metrics-pill {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 242, 250, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.task-metrics-pill-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.task-metrics-pill-value {
  font-size: 1.65rem;
  line-height: 1;
  color: var(--accent);
}

.task-metrics-pill-active {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.98), rgba(214, 233, 255, 0.9));
}

.task-metrics-pill-success {
  background: linear-gradient(180deg, rgba(239, 250, 244, 0.98), rgba(216, 241, 226, 0.9));
}

.task-metrics-pill-accent {
  background: linear-gradient(180deg, rgba(243, 240, 255, 0.98), rgba(226, 220, 255, 0.9));
}

.metrics-overview-shell {
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-self: stretch;
}

.metrics-overview-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.metrics-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
}

.metrics-overview-section {
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 300px;
}

.metrics-overview-section-body {
  min-height: 0;
  overflow: visible;
  padding-right: 8px;
}

.metrics-overview-section-header h3 {
  margin: 0 0 4px;
}

.metrics-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metrics-clickable:hover,
.metrics-clickable:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(31, 58, 101, 0.24);
  box-shadow: 0 12px 22px rgba(17, 26, 44, 0.12);
  outline: none;
}

.metrics-summary-card.metrics-clickable:hover,
.metrics-summary-card.metrics-clickable:focus-visible {
  transform: translateY(-1px);
}

.metrics-info-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.metrics-info-meta,
.metrics-info-detail,
.metrics-info-footnote {
  margin: 0;
}

.metrics-info-meta {
  color: var(--ink-muted);
}

.metrics-info-detail {
  font-weight: 600;
  color: var(--ink);
}

.metrics-info-footnote {
  color: var(--accent-dark);
}

.metrics-info-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
}

.metrics-info-badge-success {
  background: rgba(109, 211, 168, 0.16);
  color: #146c43;
}

.metrics-info-badge-active {
  background: rgba(75, 108, 183, 0.16);
  color: var(--accent-dark);
}

.metrics-info-badge-warning {
  background: rgba(244, 177, 131, 0.22);
  color: #9a3412;
}

.metrics-grid-overview {
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(260px, 1fr));
  align-items: stretch;
}

@media (max-width: 1280px) {
  .metrics-grid-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .metrics-grid-overview {
    grid-template-columns: 1fr;
  }
}

.chart-card-primary {
  background: linear-gradient(160deg, rgba(230, 237, 255, 0.95), rgba(255, 255, 255, 0.96));
  border-color: rgba(31, 58, 101, 0.16);
}

.chart-wrap-tall {
  min-height: 320px;
}

.chart-wrap-tall canvas {
  height: 320px;
}

.chart-wrap {
  position: relative;
  min-height: 260px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 58, 101, 0.08);
  padding: 12px;
}

.chart-wrap.scrollable {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.chart-wrap canvas {
  width: 100%;
  height: 236px;
  cursor: pointer;
}

.metrics-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(243, 247, 252, 0.92)),
    linear-gradient(180deg, rgba(244, 247, 252, 0.92), rgba(235, 240, 248, 0.92));
  color: var(--ink-muted);
  font-weight: 600;
}

.metrics-empty.is-hidden {
  display: none;
}

.metrics-detail {
  display: grid;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 18px 20px 20px;
  align-content: start;
  overscroll-behavior: contain;
}

#metrics-modal .modal-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.metrics-detail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.metrics-detail li {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.metrics-detail-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metrics-detail-actions {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-shrink: 0;
}

.metrics-detail-open {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1;
}

.metrics-detail-cards {
  display: grid;
  gap: 12px;
}

.metrics-detail-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.metrics-detail-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  border-radius: 16px;
  border: 1px dashed rgba(31, 58, 101, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 255, 0.78));
}

.metrics-detail-empty-visual {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--accent-dark);
  background: rgba(31, 58, 101, 0.08);
  border: 1px solid rgba(31, 58, 101, 0.12);
}

.metrics-detail-empty-title {
  font-weight: 700;
  color: var(--accent-dark);
}

.metrics-detail-empty-copy {
  margin: 0;
  max-width: 420px;
  color: var(--ink-muted);
}

.time-log-summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 255, 0.82));
}

.time-log-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.time-log-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.time-log-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#time-modal .update-form {
  gap: 14px;
}

#time-modal .split {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metrics-detail .detail-title {
  font-weight: 600;
}

.metrics-detail .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.checklist {
  display: grid;
  gap: 10px;
  padding: 4px 0 0;
}

.checklist-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.checklist-table th,
.checklist-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(31, 58, 101, 0.12);
  text-align: left;
  vertical-align: middle;
}

.checklist-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: rgba(31, 58, 101, 0.06);
}

.checklist-table tbody tr:hover {
  background: rgba(31, 58, 101, 0.04);
}

.checklist-table tbody tr:last-child td {
  border-bottom: none;
}

.checklist-status-cell {
  width: 76px;
}

.checklist-action-cell {
  width: 74px;
  text-align: center;
}

.checklist-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checklist-text {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.checklist-date-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.checklist-date-icon {
  font-size: 0.9rem;
}

.checklist-date-empty {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.checklist-status {
  width: 18px;
  text-align: center;
  color: var(--accent-dark);
  font-weight: 700;
}

.checklist-table tbody tr.is-complete .checklist-text {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.checklist-table.is-readonly {
  min-width: 380px;
}

.checklist-readonly .checklist-table-wrap {
  background: rgba(255, 255, 255, 0.95);
}

.checklist-date-hint {
  color: var(--ink-muted);
  font-size: 1rem;
  user-select: none;
}

#todo-assignee-field .person-list {
  margin-top: 10px;
}

#todo-assignee-field .checklist-input-row {
  align-items: center;
}

#todo-assignee-select.is-hidden,
#todo-assignee.is-hidden {
  display: none;
}

.subtask-assignment-section {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}

.todo-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-bottom: 8px;
}

.todo-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.todo-view-switch-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.input,
.select,
.textarea {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
}

input[type="file"].input {
  padding: 0;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.95);
}

input[type="file"].input::file-selector-button {
  margin: 6px 10px 6px 6px;
  border: 1px solid rgba(31, 58, 101, 0.2);
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

input[type="file"].input::file-selector-button:hover {
  background: rgba(31, 58, 101, 0.16);
  border-color: rgba(31, 58, 101, 0.28);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 22px rgba(17, 26, 44, 0.25);
}

.button:hover {
  transform: translateY(-1px);
}

.button.ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  border: 1px solid var(--accent);
}

.button#todo-submit,
.button#save-subtask,
.button#change-submit,
#change-form .button[type="submit"] {
  background: linear-gradient(135deg, #1f3a65, #385b96);
  box-shadow: 0 14px 24px rgba(31, 58, 101, 0.28);
}

#time-form .button[type="submit"] {
  background: linear-gradient(135deg, #0f766e, #139c90);
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.24);
}

#status-form .button[type="submit"] {
  background: linear-gradient(135deg, #9a6700, #d28c12);
  box-shadow: 0 14px 24px rgba(154, 103, 0, 0.22);
}

#delete-form .button[type="submit"] {
  background: linear-gradient(135deg, #b42318, #d92d20);
  box-shadow: 0 14px 24px rgba(180, 35, 24, 0.24);
}

#delete-form .button[type="submit"]:hover {
  box-shadow: 0 16px 28px rgba(180, 35, 24, 0.3);
}

.todo-nav-button {
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  border-color: rgba(31, 58, 101, 0.24);
  box-shadow: none;
  padding-right: 16px;
}

.todo-nav-button::after {
  content: "→";
  margin-left: 8px;
  font-size: 0.95rem;
}

.todo-nav-button:hover {
  background: rgba(31, 58, 101, 0.14);
  border-color: rgba(31, 58, 101, 0.34);
}

.todo-nav-button:disabled {
  background: rgba(31, 58, 101, 0.05);
  border-color: rgba(31, 58, 101, 0.14);
  color: rgba(31, 58, 101, 0.45);
}

.account-menu {
  position: relative;
}

.account-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.account-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 92vw);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  z-index: 1000;
  display: grid;
  gap: 8px;
}

.account-menu-dropdown.is-hidden {
  display: none;
}

.account-menu-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.account-menu-subtitle {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.account-portal-links {
  display: grid;
  gap: 6px;
}

.account-portal-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  background: rgba(31, 58, 101, 0.04);
}

.account-portal-link:hover {
  background: rgba(31, 58, 101, 0.08);
}

.account-portal-link.is-active {
  border-color: var(--accent);
  background: rgba(31, 58, 101, 0.12);
}

.account-divider {
  height: 1px;
  background: var(--border);
}

.account-menu-dropdown .button.is-danger {
  border-color: #b42318;
  color: #b42318;
}

.account-menu-dropdown .button.is-danger:hover {
  background: rgba(180, 35, 24, 0.08);
}

.ticket-list,
.release-list {
  display: grid;
  gap: 12px;
}

.release-list {
  min-height: 0;
  align-content: start;
}

.ticket-list {
  padding-right: 0;
}

.task-list {
  min-height: 0;
  padding-right: 0;
}

.ticket-card,
.release-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-card:hover,
.release-card:hover {
  border-color: rgba(28, 41, 71, 0.28);
  box-shadow: 0 14px 28px rgba(17, 26, 44, 0.14);
}

.release-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.release-actions .tooltip::after {
  top: auto;
  bottom: calc(100% + 8px);
  left: auto;
  right: 0;
  transform: none;
}

.release-actions .tooltip::before {
  top: auto;
  bottom: calc(100% + 2px);
  left: auto;
  right: 12px;
  transform: none;
  border: 6px solid transparent;
  border-top-color: rgba(17, 26, 44, 0.92);
  border-bottom-color: transparent;
}

.release-panel-shell {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  min-height: 100%;
}

.release-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.release-table-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow-x: hidden;
  overflow-y: visible;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 40px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

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

.release-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 14px 16px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: #eef2fb;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.release-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(31, 58, 108, 0.08);
  vertical-align: middle;
  color: var(--ink);
  overflow: hidden;
}

.release-table tbody td:last-child,
.release-table tbody td:nth-child(8) {
  overflow: visible;
}

.release-table thead th:nth-child(2),
.release-table tbody td:nth-child(2),
.release-table thead th:nth-child(6),
.release-table tbody td:nth-child(6),
.release-table thead th:nth-child(8),
.release-table tbody td:nth-child(8) {
  text-align: center;
}

.release-table tbody tr:last-child td {
  border-bottom: none;
}

.release-table tbody tr:hover {
  background: rgba(239, 244, 255, 0.52);
  cursor: pointer;
}

.release-table-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.release-table-secondary {
  color: var(--ink-muted);
  font-size: 0.83rem;
  font-weight: 600;
}

.release-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.release-status-planning {
  background: rgba(86, 101, 127, 0.12);
  color: #455266;
  border-color: rgba(86, 101, 127, 0.18);
}

.release-status-progress {
  background: rgba(38, 58, 108, 0.12);
  color: #263a6c;
  border-color: rgba(38, 58, 108, 0.18);
}

.release-status-qa {
  background: rgba(180, 119, 29, 0.14);
  color: #8f5a0f;
  border-color: rgba(180, 119, 29, 0.2);
}

.release-status-ready {
  background: rgba(17, 120, 96, 0.14);
  color: #0e6e59;
  border-color: rgba(17, 120, 96, 0.2);
}

.release-status-released {
  background: rgba(20, 138, 60, 0.14);
  color: #18794b;
  border-color: rgba(20, 138, 60, 0.2);
}

.release-status-cancelled {
  background: rgba(180, 35, 24, 0.12);
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
}

.release-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.09);
  color: var(--accent-dark);
  font-weight: 700;
}

.release-count-button {
  border: 1px solid transparent;
  cursor: pointer;
}

.release-count-button:hover {
  background: rgba(31, 58, 101, 0.14);
  border-color: rgba(31, 58, 101, 0.12);
}

.release-count-button:focus-visible {
  outline: 2px solid rgba(38, 58, 108, 0.28);
  outline-offset: 2px;
}

.release-tagged-task-list {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.release-tagged-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(244, 247, 255, 0.98), rgba(234, 240, 251, 0.9));
}

.release-tagged-summary-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #263a6c;
  color: #fff;
  font-weight: 800;
}

.release-tagged-summary-copy {
  display: grid;
  gap: 2px;
}

.release-tagged-task-grid {
  display: grid;
  gap: 12px;
}

.release-tagged-task-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.release-tagged-task-card:hover {
  border-color: rgba(31, 58, 101, 0.24);
  box-shadow: 0 12px 24px rgba(17, 26, 44, 0.08);
  transform: translateY(-1px);
}

.release-tagged-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.release-tagged-task-title {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 1rem;
}

.release-tagged-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.release-tagged-task-open {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.release-tagged-task-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.release-tagged-task-fact {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(241, 244, 250, 0.82);
}

.release-tagged-task-label {
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.release-notes-cell {
  max-width: none;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-table th:nth-child(1),
.release-table td:nth-child(1) {
  width: 21%;
}

.release-table th:nth-child(2),
.release-table td:nth-child(2) {
  width: 12%;
}

.release-table th:nth-child(3),
.release-table td:nth-child(3) {
  width: 14%;
}

.release-table th:nth-child(4),
.release-table td:nth-child(4),
.release-table th:nth-child(5),
.release-table td:nth-child(5) {
  width: 10%;
}

.release-table th:nth-child(6),
.release-table td:nth-child(6) {
  width: 10%;
}

.release-table th:nth-child(7),
.release-table td:nth-child(7) {
  width: 13%;
}

.release-table th:nth-child(8),
.release-table td:nth-child(8) {
  width: 10%;
  min-width: 124px;
}

.release-actions-col {
  text-align: right;
}

.release-table td:last-child,
.release-table th:last-child {
  text-align: right;
}

.todo-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.todo-sections {
  display: grid;
  gap: 22px;
}

.todo-sections-single {
  grid-template-columns: minmax(0, 1fr);
}

.todo-workspace-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.todo-view-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 4px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 999px;
  background: rgba(239, 244, 255, 0.72);
}

.todo-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-dark);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.todo-view-switch:hover {
  background: rgba(31, 58, 101, 0.08);
}

.todo-view-switch.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.todo-view-switch-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.1);
  color: inherit;
  font-size: 0.76rem;
}

.todo-view-switch.is-active .todo-view-switch-count {
  background: rgba(255, 255, 255, 0.18);
}

.todo-section-card {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 253, 0.88));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.todo-section-card-primary {
  background:
    radial-gradient(circle at top left, rgba(74, 123, 196, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.9));
}

.todo-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.todo-section-header > div:first-child {
  min-width: 0;
}

.todo-section-header h3 {
  margin: 0 0 4px;
}

.todo-section-count {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.todo-filter-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 255, 0.82));
  min-width: 0;
}

.todo-filter-search {
  flex: 1 1 320px;
  min-width: 0;
}

.todo-filter-field {
  margin: 0;
  flex: 0 0 150px;
  min-width: 150px;
}

.todo-filter-field span {
  white-space: nowrap;
}

.todo-filter-summary {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  min-height: 36px;
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.todo-filter-clear {
  white-space: nowrap;
  flex-shrink: 0;
}

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

.todo-empty-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 58, 101, 0.18);
  background: rgba(247, 250, 255, 0.84);
}

.todo-empty-state-copy {
  display: grid;
  gap: 4px;
}

.todo-empty-state-copy > p,
.todo-empty-state-helper {
  margin: 0;
}

.todo-empty-state-helper {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.todo-my-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.todo-my-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
  border-color: rgba(31, 58, 101, 0.2);
}

.todo-my-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.todo-my-card-title-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.todo-my-card-title-block h3 {
  margin: 0;
  color: var(--accent-dark);
}

.todo-my-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-my-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.todo-my-card-metrics > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(243, 247, 255, 0.86);
  border: 1px solid rgba(31, 58, 101, 0.08);
}

.todo-my-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.todo-my-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.todo-my-card-footer > p {
  margin: 0;
  min-width: 0;
}

.todo-my-card .release-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.todo-table tbody tr.task-row {
  cursor: pointer;
}

.todo-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  overflow: auto;
}

.todo-table tbody tr.task-row[draggable="true"] {
  cursor: grab;
}

.todo-table tbody tr.task-row.is-dragging {
  opacity: 0.5;
}

.todo-table tbody tr.task-row.is-drop-target-before td {
  box-shadow: inset 0 3px 0 var(--accent);
}

.todo-table tbody tr.task-row.is-drop-target-after td {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.todo-table tbody tr.task-row.is-expanded {
  background: rgba(239, 244, 255, 0.72);
}

.todo-table-primary {
  display: grid;
  gap: 6px;
  min-width: 0;
  justify-items: start;
  text-align: left;
}

.todo-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.todo-drag-handle {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 1px;
  line-height: 1;
  user-select: none;
}

.todo-progress-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.todo-progress-cell strong {
  color: var(--accent-dark);
}

.todo-detail-row td {
  padding: 0;
  background: rgba(247, 249, 253, 0.98);
}

.todo-detail-wrap {
  padding: 18px 20px 20px;
}

.todo-detail-wrap .task-details {
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.todo-serial-cell {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.todo-table th:nth-child(1),
.todo-table td:nth-child(1) {
  width: 5%;
  min-width: 64px;
}

.todo-table th:nth-child(2),
.todo-table td:nth-child(2) {
  width: 24%;
  min-width: 260px;
  text-align: left;
}

.todo-table th:nth-child(3),
.todo-table td:nth-child(3) {
  width: 11%;
  min-width: 150px;
}

.todo-table th:nth-child(4),
.todo-table td:nth-child(4) {
  width: 14%;
  min-width: 180px;
}

.todo-table th:nth-child(5),
.todo-table td:nth-child(5) {
  width: 6%;
  min-width: 84px;
}

.todo-table th:nth-child(6),
.todo-table td:nth-child(6) {
  width: 6%;
  min-width: 84px;
}

.todo-table th:nth-child(7),
.todo-table td:nth-child(7) {
  width: 8%;
  min-width: 120px;
}

.todo-table th:nth-child(8),
.todo-table td:nth-child(8) {
  width: 15%;
  min-width: 200px;
}

.todo-table th:nth-child(9),
.todo-table td:nth-child(9) {
  width: 13%;
  min-width: 190px;
}

.todo-table th:nth-child(9) {
  text-align: center;
}

.todo-table {
  min-width: 1360px;
}

.todo-table th,
.todo-table td {
  white-space: nowrap;
}

.todo-table td:nth-child(2),
.todo-table td:nth-child(8) {
  white-space: normal;
}

@media (max-width: 1280px) {
  .todo-table {
    min-width: 1120px;
  }

  .todo-filter-toolbar {
    flex-wrap: wrap;
  }

  .todo-filter-search {
    flex: 1 1 100%;
  }

  .todo-filter-field {
    flex: 0 0 160px;
    min-width: 160px;
  }

  .todo-filter-summary {
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

  .todo-table th:nth-child(2),
  .todo-table td:nth-child(2) {
    min-width: 220px;
  }

  .todo-table th:nth-child(8),
  .todo-table td:nth-child(8) {
    min-width: 170px;
  }

  .todo-table th:nth-child(9),
  .todo-table td:nth-child(9) {
    min-width: 160px;
  }
}

@media (max-width: 1024px) {
  .todo-my-grid {
    grid-template-columns: 1fr;
  }

  .todo-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .todo-table {
    min-width: 980px;
  }

  .todo-filter-toolbar {
    flex-wrap: wrap;
  }

  .todo-filter-search {
    flex: 1 1 100%;
  }

  .todo-filter-field {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 160px;
  }

  .todo-filter-summary {
    width: 100%;
    margin-left: 0;
  }

  .todo-table th,
  .todo-table td {
    font-size: 0.9rem;
  }

  .todo-detail-wrap {
    padding: 16px;
  }
}

@media (max-width: 900px) {
  .todo-header {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .todo-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    justify-self: stretch;
  }

  .todo-view-switcher {
    width: auto;
  }

  .todo-view-switch {
    flex: 1 1 220px;
    justify-content: space-between;
  }

  .todo-empty-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .todo-table {
    min-width: 860px;
  }

  .todo-table th:nth-child(2),
  .todo-table td:nth-child(2) {
    min-width: 190px;
  }

  .todo-table th:nth-child(3),
  .todo-table td:nth-child(3),
  .todo-table th:nth-child(4),
  .todo-table td:nth-child(4),
  .todo-table th:nth-child(8),
  .todo-table td:nth-child(8),
  .todo-table th:nth-child(9),
  .todo-table td:nth-child(9) {
    min-width: 140px;
  }

  .todo-filter-toolbar {
    flex-wrap: wrap;
  }

  .todo-filter-search,
  .todo-filter-field,
  .todo-filter-summary {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .todo-view-switcher {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    border-radius: 18px;
  }

  .todo-view-switch {
    width: 100%;
  }

  .todo-section-card {
    padding: 14px;
  }

  .todo-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .todo-section-count {
    width: fit-content;
  }

  .todo-my-card {
    padding: 16px;
  }

  .todo-my-card-top,
  .todo-my-card-footer {
    flex-direction: column;
  }

  .todo-my-card-metrics {
    grid-template-columns: 1fr;
  }

  .todo-filter-toolbar {
    padding: 10px 12px;
  }

  .todo-filter-search,
  .todo-filter-field,
  .todo-filter-summary {
    width: 100%;
    flex: 1 1 100%;
  }

  .todo-filter-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .todo-filter-clear {
    width: 100%;
    justify-content: center;
  }

  .release-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .release-panel-shell {
    min-height: 0;
  }
}

.release-task-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-bottom: 10px;
}

.release-task-search {
  display: block;
}

.release-task-filter {
  min-width: 0;
}

.release-task-summary {
  margin-bottom: 10px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.release-task-summary.is-view-only {
  margin-bottom: 14px;
  font-weight: 600;
}

.release-task-field {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.release-task-picker {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(239, 244, 255, 0.45);
}

.release-task-table-wrap {
  height: 100%;
  overflow: auto;
}

.release-task-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

@media (max-width: 1024px) {
  .release-task-table {
    min-width: 560px;
  }
}

.release-task-table th,
.release-task-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(31, 58, 101, 0.1);
  text-align: left;
  vertical-align: top;
}

.release-task-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(233, 238, 248, 0.98);
  color: #23365f;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.release-task-table tbody tr {
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
}

.release-task-table tbody tr:hover {
  background: rgba(243, 247, 255, 0.98);
}

.release-task-select-col {
  width: 70px;
  text-align: center;
}

.release-task-table .release-task-select-col input {
  margin-top: 2px;
}

.release-task-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.release-task-link:hover {
  text-decoration: underline;
}

.release-task-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.release-task-selected {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(30, 90, 200, 0.12);
  color: #2443a6;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.release-task-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.release-task-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.08);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .release-task-toolbar {
    grid-template-columns: 1fr;
  }

  #release-modal .modal-content {
    width: min(99vw, 1280px);
    max-width: min(99vw, 1280px);
    height: min(94vh, 860px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ticket-card {
  cursor: pointer;
}

.task-card {
  cursor: pointer;
  position: relative;
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checklist-input-row {
  align-items: stretch;
}

.checklist-input-row .input[type="date"] {
  max-width: 180px;
}

.field-row .button.ghost {
  padding: 8px 12px;
  border-radius: 10px;
}

.person-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31, 58, 101, 0.12);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
}

.chip-button {
  background: transparent;
  border: none;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

.task-list {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.task-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
  border-color: rgba(28, 41, 71, 0.28);
  box-shadow: 0 14px 28px rgba(17, 26, 44, 0.14);
}


.history-panel {
  display: grid;
  gap: 12px;
  padding: 16px 20px 20px;
}

.history-toolbar {
  display: flex;
  justify-content: flex-end;
}

.history-search {
  width: min(100%, 420px);
}

.history-list {
  min-height: 260px;
}

.history-table-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(31, 58, 101, 0.1);
  text-align: left;
  vertical-align: top;
}

.history-table thead th {
  background: rgba(233, 238, 248, 0.98);
  color: #23365f;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.history-table tbody tr:hover {
  background: rgba(243, 247, 255, 0.86);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-time-cell {
  width: 220px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.history-message-cell {
  color: var(--ink);
  font-weight: 500;
}

.history-actor-cell {
  width: 180px;
  color: var(--accent-dark);
  font-weight: 600;
  white-space: nowrap;
}

.history-empty {
  min-height: 260px;
}

.task-created-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 4px;
  padding-top: 2px;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.task-created-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.task-created-label {
  color: var(--ink-muted);
}

.task-created-inline strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.start-missing {
  padding: 16px 20px;
}

.missing-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.permissions-layout {
  display: grid;
  gap: 10px;
}

.permission-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(31, 58, 101, 0.04);
}

.permission-group h4 {
  margin: 0 0 2px;
  font-size: 0.9rem;
  color: var(--ink);
}

.permission-group .muted {
  margin: 0 0 8px;
  font-size: 0.78rem;
}

.permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 1200px) {
  .permission-list {
    grid-template-columns: 1fr;
  }
}

.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 10px;
  background: #fff;
  font-size: 0.86rem;
}

.permission-item input[type="checkbox"] {
  width: auto;
  min-width: auto;
  margin: 0;
}

.permission-item.is-child {
  padding-left: 16px;
}

.permission-item.is-disabled {
  opacity: 0.6;
  background: rgba(31, 58, 101, 0.04);
  cursor: not-allowed;
}

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

.task-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.task-title strong {
  font-size: 1.05rem;
}


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

.requirements-line {
  display: grid;
  gap: 8px;
}

.attachment-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  border: 1px solid rgba(31, 58, 101, 0.12);
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, color 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: rgba(31, 58, 101, 0.14);
  border-color: rgba(31, 58, 101, 0.2);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.icon-button.icon-button-info,
.icon-button[data-action*="view"],
.icon-button[data-action*="history"] {
  background: rgba(31, 58, 101, 0.08);
  color: #1f3a65;
  border-color: rgba(31, 58, 101, 0.16);
}

.icon-button.icon-button-accent,
.icon-button[data-action*="time"],
.icon-button[data-action*="start"] {
  background: rgba(14, 116, 144, 0.12);
  color: #0f5f79;
  border-color: rgba(14, 116, 144, 0.2);
}

.icon-button.icon-button-success,
.icon-button[data-action*="complete"],
.icon-button[data-action*="save"],
.icon-button[data-action*="add"] {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.2);
}

.icon-button.icon-button-warning,
.icon-button[data-action*="reopen"],
.icon-button[data-action*="edit"],
.icon-button[data-action*="settings"] {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.22);
}

.icon-button.icon-button-danger,
.icon-button[data-action*="delete"] {
  background: rgba(220, 38, 38, 0.1);
  color: #b42318;
  border-color: rgba(220, 38, 38, 0.18);
}

.settings-button {
  font-size: 1.05rem;
  padding: 10px 12px;
  border-radius: 12px;
}

.settings-users {
  display: grid;
  gap: 10px;
}

.settings-form {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.settings-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.settings-user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
}

.settings-user-info {
  display: grid;
  gap: 4px;
}

.settings-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 26, 44, 0.92);
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(17, 26, 44, 0.92);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tooltip:hover::after,
.tooltip:hover::before,
.tooltip:focus::after,
.tooltip:focus::before {
  opacity: 1;
}

.task-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: grid;
  gap: 12px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.task-card.is-expanded .task-details {
  max-height: 1000px;
  opacity: 1;
}

.attachment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.attachment-list li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.helper {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

.pill.low {
  background: rgba(31, 58, 101, 0.1);
  color: #2a3657;
}

.pill.medium {
  background: rgba(31, 58, 101, 0.14);
  color: #2c3e6a;
}

.pill.high {
  background: rgba(241, 173, 90, 0.22);
  color: #7a4a1f;
}

.pill.critical {
  background: rgba(215, 90, 82, 0.22);
  color: #8c2d2b;
}

.ticket-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-chip {
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
}

.ticket-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.ticket-card.is-expanded .ticket-details {
  max-height: 800px;
  opacity: 1;
}

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

.ticket-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ticket-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ticket-key {
  font-weight: 700;
  color: var(--accent-dark);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.pill.open {
  background: rgba(100, 116, 139, 0.16);
  color: #334155;
}

.pill.progress {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}


.pill.done {
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
}

.todo-table th.todo-status-cell,
.todo-table td.todo-status-cell {
  text-align: center;
}

.todo-table td.todo-status-cell {
  vertical-align: middle;
}

.todo-table td.todo-status-cell .pill {
  margin-inline: auto;
}

.ticket-meta,
.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.ticket-section {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.timesheet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.timesheet-list li {
  display: grid;
  gap: 4px;
  background: rgba(31, 58, 101, 0.06);
  border-radius: 12px;
  padding: 8px 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  background: rgba(31, 58, 101, 0.12);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  width: fit-content;
}

.task-type-chip,
.task-priority-chip {
  border: 1px solid transparent;
}

.task-priority-chip.priority-low {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.16);
}

.task-priority-chip.priority-medium {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.16);
}

.task-priority-chip.priority-high {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.2);
}

.task-priority-chip.priority-critical {
  background: rgba(220, 38, 38, 0.14);
  color: #b42318;
  border-color: rgba(220, 38, 38, 0.18);
}

.task-type-chip.task-type-feature {
  background: rgba(14, 116, 144, 0.12);
  color: #0f5f79;
  border-color: rgba(14, 116, 144, 0.18);
}

.task-type-chip.task-type-bug {
  background: rgba(220, 38, 38, 0.1);
  color: #b42318;
  border-color: rgba(220, 38, 38, 0.16);
}

.task-type-chip.task-type-improvement {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.18);
}

.task-type-chip.task-type-research {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.18);
}

.task-type-chip.task-type-testing {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.18);
}

.task-type-chip.task-type-release {
  background: rgba(31, 58, 101, 0.12);
  color: #1f3a65;
  border-color: rgba(31, 58, 101, 0.18);
}

.task-type-chip.task-type-other {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.16);
}

.testing-doc {
  background: rgba(31, 58, 101, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.summary-week {
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: rgba(31, 58, 101, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.summary-chart {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.summary-chart canvas {
  display: block;
  max-width: 100%;
}

.summary-table {
  display: grid;
  gap: 8px;
}

.summary-header,
.summary-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.6fr;
  gap: 12px;
  align-items: center;
}

.summary-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  padding: 0 10px 6px;
}

.summary-row {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.summary-row strong {
  display: block;
}

.summary-role {
  color: var(--accent-dark);
  font-weight: 700;
  background: rgba(31, 58, 101, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.summary-hours {
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(31, 58, 101, 0.12);
  padding: 6px 10px;
  border-radius: 10px;
  width: fit-content;
}

.summary-row:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 41, 71, 0.25);
  box-shadow: 0 12px 24px rgba(17, 26, 44, 0.12);
}

.summary-row .muted {
  display: block;
  font-size: 0.8rem;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .summary-header,
  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-row {
    gap: 6px;
  }
}

.release-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.update-form {
  display: grid;
  gap: 12px;
}

.todo-stepper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 180px;
  width: 180px;
}

.todo-step-tab {
  border: 1px solid var(--border);
  background: #f5f6fa;
  color: #1f2738;
  border-radius: 999px;
  padding: 7px 18px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  width: 100%;
}

.todo-step-tab.is-active {
  background: #263a6c;
  border-color: #263a6c;
  color: #fff;
}

.todo-step-panel {
  display: grid;
  gap: 12px;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #b42318;
  font-size: 0.8rem;
  font-weight: 600;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 700;
  background: #fff1f1;
  border: 1px solid #f4c8c8;
  border-radius: 10px;
  padding: 10px 12px;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.14);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.field span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.activity-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.activity-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-item:hover {
  border-color: rgba(28, 41, 71, 0.25);
  box-shadow: 0 14px 28px rgba(17, 26, 44, 0.14);
}

.activity-item time {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 26, 44, 0.5);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}

#todo-modal {
  z-index: 60;
}

.modal.is-hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(17, 26, 44, 0.35);
  max-width: 820px;
  width: min(94vw, 820px);
  max-height: 88vh;
  overflow: auto;
  padding: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(31, 58, 101, 0.16);
  position: sticky;
  top: 0;
  background: linear-gradient(90deg, #ffffff 0%, rgba(239, 244, 255, 0.9) 100%);
  z-index: 1;
}

.modal-content .update-form {
  padding: 16px 20px 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sticky-actions {
  position: static;
  margin-top: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(31, 58, 101, 0.14);
  background: #fff;
  justify-content: space-between;
  align-items: center;
}

#todo-modal .modal-content {
  width: min(99vw, 1320px);
  height: min(95vh, 980px);
  max-height: min(95vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#todo-modal.modal-with-sidecar {
  justify-content: flex-start;
  padding-left: max(20px, calc((100vw - min(99vw, 1320px)) / 2));
  padding-right: min(420px, 32vw);
}

#todo-modal.modal-with-sidecar .modal-content {
  width: min(60vw, 900px);
}

#todo-modal .modal-header {
  position: static;
  flex-shrink: 0;
}

#todo-modal .update-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 16px 20px 12px;
}

#release-modal .modal-content {
  width: min(98vw, 1280px);
  max-width: min(98vw, 1280px);
  height: min(92vh, 860px);
  max-height: min(92vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#release-modal .modal-header {
  position: static;
  flex-shrink: 0;
}

#release-modal .update-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 16px 20px 12px;
}

#release-modal .todo-stepper,
#release-modal .sticky-actions {
  flex-shrink: 0;
}

#release-modal .todo-content-pane {
  min-height: 0;
}

#release-modal .todo-step-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.todo-workspace {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  flex: 1;
}

.todo-content-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.release-workspace {
  flex: 1;
}

#todo-modal .todo-stepper,
#todo-modal .sticky-actions {
  flex-shrink: 0;
}

#todo-modal .todo-step-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  align-content: start;
  gap: 10px;
}

.basic-metrics-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.todo-actions-left {
  display: flex;
  align-items: center;
}

.todo-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.todo-create-more {
  margin: 0;
}

.todo-advanced {
  border: none;
  border-radius: 0;
  background: transparent;
  margin-top: 6px;
}

.todo-advanced-title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
  padding: 0 0 6px;
  color: var(--accent-dark);
  border-bottom: 0;
}

.todo-advanced-body {
  padding: 0;
}

.todo-advanced .checkbox-grid {
  gap: 14px 18px;
}

.todo-advanced .checkbox-field {
  gap: 12px;
}

.todo-advanced .checkbox-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.todo-advanced .checkbox-field span {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.modal-section {
  background: rgba(239, 244, 255, 0.6);
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
}

.modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.modal-tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 700;
}

.modal-tab-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.modal-tab-panel {
  display: none;
}

.modal-tab-panel.is-active {
  display: grid;
}

#settings-modal .modal-content,
#project-modal .modal-content,
#role-modal .modal-content {
  width: min(1100px, 92vw);
  height: min(84vh, 860px);
  max-width: 1100px;
  max-height: min(84vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#settings-modal .update-form,
#project-modal .update-form,
#role-modal .update-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px 20px;
  min-height: 0;
  height: 100%;
  align-items: start;
}

#settings-modal .modal-tabs,
#project-modal .modal-tabs {
  display: grid;
  gap: 8px;
  border-right: 1px solid var(--border);
  border-bottom: none;
  padding-right: 14px;
  margin-right: 2px;
  padding-bottom: 0;
  align-self: start;
  position: sticky;
  top: 0;
}

#settings-modal .modal-tab-btn,
#project-modal .modal-tab-btn {
  text-align: left;
  width: 100%;
  border-radius: 14px;
  padding: 10px 12px;
}

#settings-modal .modal-tab-btn:disabled,
#project-modal .modal-tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#settings-modal .modal-tab-panel,
#project-modal .modal-tab-panel {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
  grid-auto-rows: max-content;
}

#role-modal .checkbox-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

#settings-modal .modal-actions,
#project-modal .modal-actions,
#role-modal .modal-actions {
  margin-top: auto;
}

#settings-modal .modal-actions,
#settings-modal .form-status,
#project-modal .modal-actions,
#project-modal .form-status {
  grid-column: 1 / -1;
}

#settings-modal .modal-section {
  margin: 0;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.switch-control {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: #9aa5b1;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch-control input:checked + .switch-slider {
  background: var(--accent);
}

.switch-control input:checked + .switch-slider::before {
  transform: translateX(20px);
}

@media (max-width: 960px) {
  .metrics-summary-strip,
  .metrics-dashboard-grid-pm {
    grid-template-columns: 1fr;
  }

  .metrics-contributor-shell {
    grid-template-columns: 1fr;
  }

  .metrics-contributor-hero-body {
    grid-template-columns: 1fr;
  }

  .metrics-attention-grid {
    grid-template-columns: 1fr;
  }

  .metrics-capacity-grid {
    grid-template-columns: 1fr;
  }

  .metrics-hero-card,
  .metrics-section-card {
    padding: 20px;
  }

  .metrics-hero-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .metrics-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-summary-strip-contributor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-support-card-grid {
    grid-template-columns: 1fr;
  }

  .metrics-queue-summary {
    grid-template-columns: 1fr;
  }

  .metrics-pipeline-legend {
    grid-template-columns: 1fr;
  }

  .metrics-chart-wrap {
    min-height: 160px;
  }

  .metrics-compact-distribution-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .metrics-summary-strip {
    grid-template-columns: 1fr;
  }

  .metrics-summary-strip-contributor {
    grid-template-columns: 1fr;
  }

  .metrics-contributor-focus,
  .metrics-contributor-release-spotlight {
    padding: 16px;
  }

  .metrics-summary-card {
    min-height: 0;
  }

  .metrics-release-meta,
  .metrics-release-facts,
  .metrics-workload-meta,
  .metrics-progress-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@keyframes metricsBarGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .metrics-motion-in,
  .metrics-workload-row,
  .metrics-progress-fill,
  .metrics-workload-meter-fill,
  .metrics-pipeline-segment {
    animation: none !important;
    transform: none !important;
  }
}
  #settings-modal .update-form,
  #project-modal .update-form {
    grid-template-columns: 1fr;
  }

  #settings-modal .modal-tabs,
  #project-modal .modal-tabs {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 12px;
    margin-right: 0;
    margin-bottom: 4px;
  }
}

.file-upload {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(31, 58, 101, 0.08);
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.file-trigger:hover {
  background: rgba(31, 58, 101, 0.16);
  border-color: rgba(31, 58, 101, 0.28);
}

.file-input:focus + .file-trigger {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.file-trigger svg {
  width: 18px;
  height: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group.compact {
  gap: 6px;
}

.field-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.attachment-field {
  min-width: 120px;
}

.attachment-field .file-upload {
  align-items: flex-start;
}

.attachment-field .file-trigger {
  width: 40px;
  height: 40px;
}

.attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31, 58, 101, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.attachment-pill button {
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
}

.release-attachment-link {
  color: inherit;
  text-decoration: none;
}

.release-attachment-link:hover {
  text-decoration: underline;
}

.modal-section.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.section-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.section-header p {
  margin: 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-header-copy {
  display: grid;
  gap: 2px;
}

.subtask-section-header {
  align-items: flex-start;
}

.subtask-drawer-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  background:
    linear-gradient(135deg, rgba(31, 58, 101, 0.08), rgba(255, 255, 255, 0.92)),
    #fff;
}

.subtask-drawer-copy {
  display: grid;
  gap: 2px;
}

.subtask-drawer-copy strong {
  font-size: 0.95rem;
  color: var(--accent-dark);
}

.subtask-drawer-copy span {
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.subtask-drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 58, 101, 0.12);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.subtask-list {
  display: grid;
  gap: 10px;
}

.subtask-list.is-collapsed {
  display: none;
}

.subtask-form.is-collapsed {
  display: grid;
}

.subtask-card {
  background: #fff;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.subtask-card:hover {
  border-color: rgba(31, 58, 101, 0.28);
  box-shadow: 0 10px 24px rgba(17, 26, 44, 0.1);
}

.subtask-card.is-active {
  border-color: rgba(31, 58, 101, 0.42);
  box-shadow: 0 14px 28px rgba(17, 26, 44, 0.14);
  transform: translateY(-1px);
}

.subtask-card:focus-visible {
  outline: 2px solid rgba(31, 58, 101, 0.24);
  outline-offset: 2px;
}

.subtask-card.is-complete {
  border-color: rgba(88, 183, 130, 0.4);
  background: rgba(88, 183, 130, 0.08);
}

.subtask-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.subtask-card-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.subtask-title {
  font-size: 0.96rem;
}

.subtask-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subtask-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(31, 58, 101, 0.1);
}

.subtask-date-icon {
  font-size: 0.82rem;
}

.subtask-assignees-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.subtask-assignees-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.subtask-assignee-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(31, 58, 101, 0.12);
}

.subtask-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(31, 58, 101, 0.08);
}

.subtask-card-linkhint {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.subtask-card-linkhint span {
  color: var(--ink-muted);
  font-weight: 600;
}

.subtask-empty {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(31, 58, 101, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.subtask-empty strong {
  color: var(--accent-dark);
}

.subtask-empty p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.subtask-form .modal-actions {
  justify-content: flex-start;
}

.subtask-form {
  padding: 16px 20px 20px;
  display: grid;
  gap: 14px;
  align-content: start;
  grid-auto-rows: min-content;
}

.sidecar-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  background: transparent;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  pointer-events: auto;
  z-index: 60;
}

.sidecar-modal .modal-content {
  width: clamp(400px, 34vw, 480px);
  min-width: 400px;
  max-width: 480px;
  max-height: 100%;
  pointer-events: auto;
  border-radius: 0;
  border-left: 1px solid rgba(31, 58, 101, 0.12);
  border-top: none;
  border-right: none;
  border-bottom: none;
  box-shadow: -24px 0 48px rgba(17, 26, 44, 0.22);
}

.subtask-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#subtask-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom-color: rgba(31, 58, 101, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, rgba(239, 244, 255, 0.96) 100%);
}

#subtask-modal .subtask-form {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

#subtask-modal .split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#subtask-modal .field-inline {
  grid-template-columns: minmax(0, 1fr) auto;
}

#subtask-modal .subtask-status-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 58, 101, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.92);
}

#subtask-modal .subtask-status-toggle-copy {
  display: grid;
  gap: 4px;
}

#subtask-modal .subtask-status-toggle-label {
  font-weight: 700;
  color: var(--ink);
}

#subtask-modal .subtask-status-toggle-helper {
  color: var(--muted);
  font-size: 0.94rem;
}

#subtask-modal .subtask-status-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

#subtask-modal .modal-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  margin-top: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), #ffffff 28%);
}

#optional-docs-section {
  display: grid;
  gap: 10px;
}

.doc-toggle-list {
  display: grid;
  gap: 8px;
}

.doc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-toggle-row span {
  font-weight: 600;
}

.doc-toggle-select {
  width: 120px;
  min-width: 120px;
}

#todo-section-subtasks {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field span {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .ticket-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .tab-panel {
    padding: 0;
  }

  .tab {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .metrics-overview-section {
    min-height: 240px;
  }

  .task-header,
  .ticket-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sticky-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .todo-actions-right {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .todo-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #todo-modal.modal-with-sidecar {
    padding-left: 16px;
    padding-right: 16px;
  }

  #todo-modal.modal-with-sidecar .modal-content {
    width: min(94vw, 820px);
  }

  .sidecar-modal {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 16px;
    display: grid;
    justify-content: center;
    align-items: center;
    background: rgba(17, 24, 39, 0.38);
    pointer-events: auto;
  }

  .sidecar-modal .modal-content {
    width: min(94vw, 520px);
    min-width: 0;
    max-width: none;
    max-height: 88vh;
  }

  #subtask-modal .split {
    grid-template-columns: 1fr;
  }

  .subtask-drawer-hint {
    align-items: flex-start;
    flex-direction: column;
  }

  .todo-stepper {
    flex-direction: row;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .todo-step-tab {
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
  }

  .basic-metrics-row {
    grid-template-columns: 1fr;
  }
}

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

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .task-metrics-summary,
  .metrics-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-overview-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .task-metrics-summary,
  .metrics-overview-summary {
    grid-template-columns: 1fr;
  }
}
