/* Zularich admin dashboard — stat cards & layout (ported from FCP portal pattern) */
:root {
  --zp-dash-surface: #ffffff;
  --zp-dash-on-surface: #1a1f1c;
  --zp-dash-muted: #6b7280;
  --zp-dash-outline: #e5e7eb;
  --zp-dash-accent: #ad7f00;
  --zp-dash-font: "Inter", "Segoe UI", system-ui, sans-serif;
  --zp-dash-headline: "Sora", "Segoe UI", sans-serif;
}

html.dark {
  --zp-dash-surface: #1c1810;
  --zp-dash-on-surface: #f5efe3;
  --zp-dash-muted: #c2b59a;
  --zp-dash-outline: #3d3424;
  --zp-dash-accent: #d4a84b;
}

.zp-dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.zp-dash-head__title {
  margin: 0;
  font-family: var(--zp-dash-headline);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--zp-dash-on-surface);
  letter-spacing: -0.02em;
}

.zp-dash-head__sub {
  margin: 0.25rem 0 0;
  color: var(--zp-dash-muted);
  font-size: 0.92rem;
}

.zp-dash-search {
  margin-bottom: 1.25rem;
}

.zp-dash-search .list-group {
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 22px -14px rgba(18, 32, 22, 0.35);
  border-radius: 0.5rem;
}

.zp-stat-grid > [class*="col-"] {
  margin-bottom: 1rem;
}

.zp-stat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 148px;
  padding: 1.05rem 1.1rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid var(--zp-dash-outline);
  background: var(--zp-dash-surface);
  text-decoration: none !important;
  color: var(--zp-dash-on-surface) !important;
  box-shadow: 0 8px 22px -14px rgba(18, 32, 22, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.zp-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--zp-stat-accent, var(--zp-dash-accent));
}

.zp-stat-card:hover,
.zp-stat-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px rgba(18, 32, 22, 0.35);
  border-color: color-mix(in srgb, var(--zp-stat-accent, var(--zp-dash-accent)) 45%, var(--zp-dash-outline));
  color: var(--zp-dash-on-surface) !important;
  text-decoration: none !important;
}

.zp-stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.zp-stat-card__value {
  font-family: var(--zp-dash-font);
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--zp-dash-on-surface) !important;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
  margin-right: auto;
}

.zp-stat-card__icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  background: color-mix(in srgb, var(--zp-stat-accent, var(--zp-dash-accent)) 16%, transparent);
  color: var(--zp-stat-accent, var(--zp-dash-accent)) !important;
  font-size: 1.05rem;
}

.zp-stat-card__icon i {
  color: inherit !important;
}

.zp-stat-card__body {
  min-width: 0;
}

.zp-stat-card__label {
  margin-top: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--zp-dash-on-surface) !important;
}

.zp-stat-card__meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--zp-dash-muted) !important;
}

.zp-stat-card__cta {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--zp-stat-accent, var(--zp-dash-accent)) !important;
}

.zp-stat-card__cta span,
.zp-stat-card__cta i {
  color: inherit !important;
}

.zp-stat-card__cta i {
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.zp-stat-card:hover .zp-stat-card__cta i {
  transform: translateX(3px);
}

.zp-stat-card--emerald { --zp-stat-accent: #1f7a4d; }
.zp-stat-card--green { --zp-stat-accent: #28a745; }
.zp-stat-card--forest { --zp-stat-accent: #155a26; }
.zp-stat-card--teal { --zp-stat-accent: #0f766e; }
.zp-stat-card--blue { --zp-stat-accent: #2563eb; }
.zp-stat-card--indigo { --zp-stat-accent: #4f46e5; }
.zp-stat-card--violet { --zp-stat-accent: #7c3aed; }
.zp-stat-card--purple { --zp-stat-accent: #9333ea; }
.zp-stat-card--pink { --zp-stat-accent: #db2777; }
.zp-stat-card--red { --zp-stat-accent: #dc2626; }
.zp-stat-card--amber { --zp-stat-accent: #d97706; }
.zp-stat-card--gold { --zp-stat-accent: #ca8a04; }
.zp-stat-card--slate { --zp-stat-accent: #475569; }

.zp-dash-chart-card .card-header h5 {
  font-size: 1rem;
  font-weight: 600;
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .zp-stat-card__icon {
    background: rgba(40, 167, 69, 0.12);
  }
  .zp-stat-card:hover {
    border-color: var(--zp-stat-accent, var(--zp-dash-accent));
  }
}
