.tasks-dashboard-card.company-dashboard-card {
  --tasks-accent: #60a5fa;
  --tasks-accent-soft: rgba(96, 165, 250, 0.16);
  --tasks-border: rgba(96, 165, 250, 0.48);
  position: relative;
  isolation: isolate;
  grid-column: span 2;
  grid-template-rows: auto auto auto auto;
  align-content: stretch;
  gap: 15px;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--tasks-border);
  border-radius: 10px;
  padding: 20px;
  background:
    radial-gradient(circle at 92% 5%, var(--tasks-accent-soft), transparent 38%),
    linear-gradient(145deg, rgba(21, 35, 57, 0.99), rgba(15, 25, 43, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(2, 8, 23, 0.26),
    0 0 0 1px rgba(15, 23, 42, 0.32);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tasks-dashboard-card.company-dashboard-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tasks-accent), transparent);
  opacity: 0.78;
}

.tasks-dashboard-card.company-dashboard-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  top: -112px;
  right: -72px;
  border-radius: 50%;
  background: var(--tasks-accent);
  opacity: 0.08;
  filter: blur(2px);
}

.tasks-dashboard-card.company-dashboard-card:hover {
  border-color: var(--tasks-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 44px rgba(2, 8, 23, 0.34),
    0 0 0 1px var(--tasks-accent-soft);
  transform: translateY(-2px);
}

.tasks-dashboard-card[data-task-state="clear"] {
  --tasks-accent: #34d399;
  --tasks-accent-soft: rgba(52, 211, 153, 0.15);
  --tasks-border: rgba(52, 211, 153, 0.42);
}

.tasks-dashboard-card[data-task-state="pending"] {
  --tasks-accent: #fbbf24;
  --tasks-accent-soft: rgba(251, 191, 36, 0.14);
  --tasks-border: rgba(251, 191, 36, 0.46);
}

.tasks-dashboard-card[data-task-state="urgent"] {
  --tasks-accent: #fb7185;
  --tasks-accent-soft: rgba(251, 113, 133, 0.17);
  --tasks-border: rgba(251, 113, 133, 0.58);
}

.tasks-dashboard-card[data-task-state="error"] {
  --tasks-accent: #94a3b8;
  --tasks-accent-soft: rgba(148, 163, 184, 0.12);
  --tasks-border: rgba(148, 163, 184, 0.38);
}

.tasks-dashboard-card .tasks-card-head,
.tasks-dashboard-card .tasks-card-body,
.tasks-dashboard-card .tasks-card-queue,
.tasks-dashboard-card .tasks-card-next {
  position: relative;
  z-index: 1;
}

.tasks-dashboard-card .tasks-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.tasks-dashboard-card .tasks-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--tasks-border);
  border-radius: 10px;
  background: var(--tasks-accent-soft);
  color: var(--tasks-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tasks-dashboard-card .tasks-card-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tasks-dashboard-card .tasks-card-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tasks-dashboard-card .tasks-card-title > span {
  color: #94a3b8;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tasks-dashboard-card .tasks-card-title > strong {
  color: #f8fafc;
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
}

.tasks-dashboard-card .tasks-card-priority {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tasks-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--tasks-accent-soft);
  color: var(--tasks-accent);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tasks-dashboard-card .tasks-card-body {
  display: grid;
  grid-template-columns: minmax(110px, 0.68fr) minmax(0, 1.5fr);
  align-items: end;
  gap: 18px;
}

.tasks-dashboard-card .tasks-card-hero {
  display: grid;
  align-content: end;
  gap: 0;
}

.tasks-dashboard-card .tasks-card-count {
  color: #f8fafc;
  font-size: clamp(2.7rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.9;
  text-transform: none;
}

.tasks-dashboard-card .tasks-card-hero > span {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tasks-dashboard-card .tasks-card-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tasks-dashboard-card .tasks-card-signal {
  display: grid;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(15, 23, 42, 0.45);
}

.tasks-dashboard-card .tasks-card-signal b {
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1;
}

.tasks-dashboard-card[data-task-state="urgent"] .tasks-card-signal:first-child b {
  color: #fda4af;
}

.tasks-dashboard-card .tasks-card-signal small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tasks-dashboard-card .tasks-card-queue {
  display: grid;
  gap: 7px;
}

.tasks-dashboard-card .tasks-card-queue-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tasks-dashboard-card .tasks-card-queue-labels span {
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tasks-dashboard-card .tasks-card-queue-labels b {
  color: #e2e8f0;
  font-size: inherit;
  font-weight: 850;
}

.tasks-dashboard-card .tasks-card-queue-track {
  display: flex;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.46);
}

.tasks-dashboard-card .tasks-card-queue-track i {
  display: block;
  width: 0;
  height: 100%;
  transition: width 260ms ease;
}

.tasks-dashboard-card .tasks-card-pending-bar {
  background: var(--tasks-accent);
}

.tasks-dashboard-card .tasks-card-progress-bar {
  background: #60a5fa;
}

.tasks-dashboard-card .tasks-card-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
}

.tasks-dashboard-card .tasks-card-next > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tasks-dashboard-card .tasks-card-next > div > span {
  color: var(--tasks-accent);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tasks-dashboard-card .tasks-card-next > div > strong {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 0.83rem;
  font-weight: 740;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.tasks-dashboard-card .tasks-card-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 50%;
  color: var(--tasks-accent);
  font-size: 1.12rem;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease;
}

.tasks-dashboard-card:hover .tasks-card-arrow {
  border-color: var(--tasks-border);
  transform: translateX(2px);
}

.tasks-dashboard-card[data-task-state="loading"] .tasks-card-count,
.tasks-dashboard-card[data-task-state="loading"] .tasks-card-signal b,
.tasks-dashboard-card[data-task-state="loading"] .tasks-card-next > div > strong {
  color: transparent;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.24), rgba(148, 163, 184, 0.1));
  background-size: 220% 100%;
  animation: tasks-card-shimmer 1.35s ease-in-out infinite;
}

.tasks-dashboard-card[data-task-state="loading"] .tasks-card-count {
  width: 58px;
}

.tasks-dashboard-card[data-task-state="loading"] .tasks-card-signal b {
  width: 24px;
}

.tasks-dashboard-card[data-task-state="loading"] .tasks-card-next > div > strong {
  width: min(270px, 78%);
}

@keyframes tasks-card-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.fleet-alert.task-urgent-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: 9px;
  padding: 11px 14px;
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.46), rgba(30, 41, 59, 0.92)),
    #111827;
  color: #f8fafc;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(69, 10, 10, 0.18);
}

.fleet-alert.task-urgent-strip[data-urgent-reason="aged"] {
  border-color: rgba(251, 191, 36, 0.42);
  background:
    linear-gradient(90deg, rgba(120, 53, 15, 0.42), rgba(30, 41, 59, 0.92)),
    #111827;
}

.fleet-alert.task-urgent-strip.hidden {
  display: none;
}

.task-urgent-strip .task-urgent-strip-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: 9px;
  background: rgba(127, 29, 29, 0.38);
  color: #fda4af;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.task-urgent-strip[data-urgent-reason="aged"] .task-urgent-strip-icon {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(120, 53, 15, 0.34);
  color: #fde68a;
}

.task-urgent-strip .task-urgent-strip-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.task-urgent-strip .task-urgent-strip-copy > strong {
  color: #fff7ed;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.task-urgent-strip .task-urgent-strip-copy > span {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.task-urgent-strip .task-urgent-strip-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(15, 23, 42, 0.42);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .tasks-dashboard-card.company-dashboard-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .tasks-dashboard-card.company-dashboard-card,
  html.flee7-phone-layout .tasks-dashboard-card.company-dashboard-card {
    grid-column: 1 / -1;
    min-height: 254px;
    gap: 13px;
    padding: 16px;
  }

  .tasks-dashboard-card .tasks-card-head {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .tasks-dashboard-card .tasks-card-icon {
    width: 40px;
    height: 40px;
  }

  .tasks-dashboard-card .tasks-card-body {
    grid-template-columns: minmax(86px, 0.58fr) minmax(0, 1.5fr);
    gap: 12px;
  }

  .tasks-dashboard-card .tasks-card-count {
    font-size: 2.75rem;
  }

  .tasks-dashboard-card .tasks-card-signal {
    min-height: 54px;
    padding: 8px;
  }

  .tasks-dashboard-card .tasks-card-signal small {
    font-size: 0.55rem;
    min-height: 1.25rem;
    white-space: normal;
  }

  .fleet-alert.task-urgent-strip {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 0;
    padding: 11px 12px;
  }

  .task-urgent-strip .task-urgent-strip-action {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 370px) {
  .tasks-dashboard-card .tasks-card-priority {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tasks-dashboard-card.company-dashboard-card,
  .tasks-dashboard-card .tasks-card-arrow,
  .tasks-dashboard-card .tasks-card-queue-track i {
    transition: none;
  }

  .tasks-dashboard-card[data-task-state="loading"] .tasks-card-count,
  .tasks-dashboard-card[data-task-state="loading"] .tasks-card-signal b,
  .tasks-dashboard-card[data-task-state="loading"] .tasks-card-next > div > strong {
    animation: none;
  }
}
