/* Staging home redesign: shared today-summary patterns + agent card cleanup */

.home-today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr) minmax(280px, 0.95fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.home-today-card {
  min-height: 100%;
}

.home-today-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.84));
}

body[data-theme="light"] .home-today-hero {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.10), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.home-today-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

body[data-theme="light"] .home-today-kicker {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.08);
}

.home-today-title {
  margin: 0.9rem 0 0.55rem;
  font-size: clamp(1.55rem, 1.8vw, 2.15rem);
  line-height: 1.1;
  color: #f8fafc;
}

body[data-theme="light"] .home-today-title {
  color: #0f172a;
}

.home-today-subtitle {
  margin: 0;
  max-width: 64ch;
  color: #cbd5e1;
  line-height: 1.55;
}

body[data-theme="light"] .home-today-subtitle {
  color: #475569;
}

.home-today-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.home-today-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.42);
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 600;
}

.home-today-chip.is-ok { border-color: rgba(34, 197, 94, 0.35); color: #bbf7d0; }
.home-today-chip.is-warn { border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
.home-today-chip.is-error { border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.home-today-chip.is-loading { opacity: 0.75; }

body[data-theme="light"] .home-today-chip {
  background: rgba(255, 255, 255, 0.86);
  color: #1e293b;
}
body[data-theme="light"] .home-today-chip.is-ok { color: #166534; }
body[data-theme="light"] .home-today-chip.is-warn { color: #a16207; }
body[data-theme="light"] .home-today-chip.is-error { color: #b91c1c; }

.home-today-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-today-stat {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.38);
}

body[data-theme="light"] .home-today-stat {
  background: rgba(255, 255, 255, 0.92);
}

.home-today-stat-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.home-today-stat-value {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.35;
}

body[data-theme="light"] .home-today-stat-value {
  color: #0f172a;
}

.home-today-agenda {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-today-item,
.home-today-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.32);
}

body[data-theme="light"] .home-today-item,
body[data-theme="light"] .home-today-empty {
  background: rgba(255, 255, 255, 0.88);
}

.home-today-item-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.14);
  font-size: 1.15rem;
}

.home-today-item-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7dd3fc;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

body[data-theme="light"] .home-today-item-label { color: #0369a1; }

.home-today-item-title {
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.4;
}
body[data-theme="light"] .home-today-item-title { color: #0f172a; }

.home-today-item-meta {
  margin-top: 0.25rem;
  color: #94a3b8;
  line-height: 1.45;
  font-size: 0.92rem;
}

.home-today-empty {
  grid-template-columns: 1fr;
  color: #94a3b8;
}

.home-today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.agent-card-modern {
  position: relative;
  overflow: hidden;
  border-width: 1px;
}

.agent-card-modern::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #38bdf8, #6366f1);
  opacity: 0.88;
}

.agent-card-modern:hover {
  transform: translateY(-3px);
}

.task-container-modern {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}

body[data-theme="light"] .task-container-modern {
  background: #f8fafc;
}

.task-text-modern {
  line-height: 1.45;
}

.agent-progress-mini {
  margin-top: 0.9rem;
  height: 6px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.agent-progress-fill-mini {
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 1180px) {
  .home-today-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .home-today-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-today-actions {
    flex-direction: column;
  }

  .home-today-actions .primary-cta,
  .home-today-actions .secondary-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .home-today-stats {
    grid-template-columns: 1fr;
  }
}
