/* Dedicated targets/objectives page aligned with latest realtime goals updates */

.targets-main-container {
  min-height: 60vh;
}

.targets-page-shell {
  padding-bottom: 2rem;
}

.targets-hero,
.targets-runtime,
.targets-panel .card {
  border-radius: 1.25rem;
}

.targets-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.targets-hero h4,
.targets-runtime h5,
.targets-panel h5 {
  font-weight: 700;
}

.targets-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.targets-metric-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.targets-metric-label {
  font-size: 0.8rem;
  color: #64748b;
}

.targets-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.targets-metric-chip-primary {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0.03));
}

.targets-metric-chip-success {
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(25, 135, 84, 0.03));
}

.targets-metric-chip-info {
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.12), rgba(13, 202, 240, 0.03));
}

.targets-metric-chip-dark {
  background: linear-gradient(135deg, rgba(33, 37, 41, 0.08), rgba(33, 37, 41, 0.03));
}

.targets-runtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.targets-runtime-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.targets-runtime-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0d6efd, #6f42c1);
  color: #fff;
  flex-shrink: 0;
}

.targets-runtime-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.targets-runtime-description {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
}

.targets-tabs {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.targets-tabs .nav-link {
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
}

.targets-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #6f42c1);
}

.targets-toolbar .input-group-text,
.targets-toolbar .form-control,
.targets-toolbar .form-select {
  border-radius: 0.8rem;
}

.targets-toolbar .input-group .input-group-text {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.targets-toolbar .input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.targets-custom-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.15rem;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.targets-custom-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
  border-color: rgba(13, 110, 253, 0.22);
}

.targets-scope-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.targets-custom-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.targets-success-rate {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #198754;
}

.targets-rate-caption {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.targets-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.9rem 0;
}

.targets-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.targets-mini-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.85);
}

.targets-mini-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.targets-mini-metric-label {
  font-size: 0.75rem;
  color: #64748b;
}

.targets-mini-metric-primary {
  border: 1px solid rgba(13, 110, 253, 0.18);
}

.targets-mini-metric-success {
  border: 1px solid rgba(25, 135, 84, 0.18);
}

.targets-mini-metric-warning {
  border: 1px solid rgba(255, 193, 7, 0.28);
}

.targets-mini-metric-info,
.targets-mini-metric-secondary {
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.targets-custom-card-footer {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.targets-global-groups {
  display: grid;
  gap: 1rem;
}

.targets-global-group {
  padding: 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.targets-global-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.targets-global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.targets-global-card {
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.targets-global-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.targets-global-icon {
  font-size: 1.35rem;
}

.targets-global-value {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.65rem;
}

.targets-global-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.targets-global-card-score {
  box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.22);
}

.targets-global-card-correct {
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.22);
}

.targets-global-card-fast {
  box-shadow: inset 0 0 0 1px rgba(13, 202, 240, 0.28);
}

.targets-global-empty {
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  color: #64748b;
  background: rgba(255, 255, 255, 0.8);
}

.targets-custom-item--active {
  border-left: 4px solid #0d6efd;
}

.targets-custom-item--completed {
  border-left: 4px solid #198754;
}

.targets-custom-item--stalled {
  border-left: 4px solid #f59e0b;
}

.targets-custom-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.targets-custom-kpis small {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #475569;
}

.targets-custom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.targets-custom-actions .targets-custom-overflow-btn {
  min-width: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.targets-empty,
.targets-loading {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.targets-form-modal .modal-content {
  border-radius: 1rem;
  border: none;
}

.targets-create-quiz-search-wrap {
  position: relative;
}

.targets-create-selected-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  scrollbar-width: thin;
}

.targets-create-selected-empty {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #64748b;
  background: #f8fafc;
  font-size: 0.85rem;
}

.targets-create-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  max-width: 220px;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 110, 253, 0.22);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(111, 66, 193, 0.08));
}

.targets-create-selected-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}

.targets-create-remove-selected {
  line-height: 1;
  color: #334155;
  text-decoration: none;
  font-size: 1.1rem;
}

.targets-create-remove-selected:hover {
  color: #dc3545;
}

.targets-detail .card,
.targets-attempt-detail .card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.targets-progression-chart svg {
  overflow: visible;
}

@media (max-width: 767.98px) {
  .targets-custom-card-head,
  .targets-global-group-head,
  .targets-custom-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .targets-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .targets-tabs .nav-link {
    flex: 1 1 0;
    text-align: center;
  }

  .targets-custom-kpis {
    grid-template-columns: 1fr;
  }

  .targets-custom-actions .btn {
    flex: 1 1 auto;
  }

  .targets-custom-actions .targets-custom-overflow-btn {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .targets-custom-card {
    transition: none;
  }

  .targets-custom-card:hover {
    transform: none;
  }
}
