/* Spark Agency HR — Overview statistics band (v39), from the owner's design. */
@media screen {
  .hr-stats {
    position: relative;
    margin: 0 0 18px;
    padding: 26px 26px 28px;
    border-radius: 20px;
    background:
      radial-gradient(120% 140% at 100% 0%, #0a9a9c33 0%, transparent 55%),
      radial-gradient(90% 120% at 0% 100%, #3b5bdb26 0%, transparent 60%),
      #080b14;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
  }
  .hr-stats-head {
    margin-bottom: 22px;
  }
  .hr-stats-eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #60a5fa;
  }
  .hr-stats h2 {
    margin: 6px 0 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
  }
  .hr-stats-sub {
    margin: 6px 0 0;
    color: #ffffff80;
    font-size: 14px;
  }
  .hr-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  /* Glass card */
  .stat-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 0;
    margin: 0;
    padding: 22px 22px;
    border-radius: 16px;
    border: 1px solid #ffffff14;
    background: #ffffff0a;
    box-shadow: inset 0 1px 0 #ffffff12, 0 10px 30px #0000004d;
    color: #fff;
    text-align: left;
    font: inherit;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), border-color 0.3s, background-color 0.3s;
  }
  .stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: #ffffff10;
    border-color: #ffffff26;
    filter: none;
  }
  .stat-card:active {
    transform: translateY(-2px) scale(1.01);
  }
  .stat-card:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
  }
  .stat-wash {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    pointer-events: none;
  }
  .stat-text,
  .stat-icon {
    position: relative;
    z-index: 1;
  }
  .stat-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .stat-title {
    font-size: 13.5px;
    color: #ffffff99;
    font-weight: 600;
  }
  .stat-value {
    margin-top: 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
  }
  .stat-change.up {
    color: #34d399;
  }
  .stat-change.down {
    color: #f87171;
  }
  .stat-change.flat {
    color: #ffffff8c;
  }
  .stat-change svg {
    flex: none;
  }
  .stat-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 8px 22px -6px var(--g1);
    color: #fff;
  }

  /* Gradients from the design */
  .g-blue { --g1: #3b82f6; --g2: #06b6d4; }
  .g-purple { --g1: #a855f7; --g2: #ec4899; }
  .g-emerald { --g1: #10b981; --g2: #14b8a6; }
  .g-orange { --g1: #f97316; --g2: #f59e0b; }
  .g-indigo { --g1: #6366f1; --g2: #3b82f6; }
  .g-rose { --g1: #f43f5e; --g2: #ef4444; }

  /* Entrance: staggered rise, first view only */
  .hr-stats.enter .stat-card {
    animation: stat-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }
  .hr-stats.enter .stat-card:nth-child(2) { animation-delay: 0.1s; }
  .hr-stats.enter .stat-card:nth-child(3) { animation-delay: 0.2s; }
  .hr-stats.enter .stat-card:nth-child(4) { animation-delay: 0.3s; }
  .hr-stats.enter .stat-card:nth-child(5) { animation-delay: 0.4s; }
  .hr-stats.enter .stat-card:nth-child(6) { animation-delay: 0.5s; }
  @keyframes stat-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
  }

  /* The older three summary cards are replaced by the band */
  #dashboard .hr-stats ~ .cards,
  #dashboard .hr-stats ~ .muted:first-of-type {
    display: none;
  }

  @media (max-width: 1100px) {
    .hr-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 640px) {
    .hr-stats {
      padding: 20px 16px;
      border-radius: 16px;
    }
    .hr-stats h2 {
      font-size: 21px;
    }
    .hr-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .stat-card {
      align-items: flex-start;
      padding: 14px 12px;
    }
    .stat-title {
      font-size: 12px;
      padding-right: 30px;
    }
    .stat-value {
      font-size: 20px;
    }
    .stat-change {
      font-size: 11.5px;
      align-items: flex-start;
    }
    .stat-change svg {
      width: 14px;
      height: 14px;
      margin-top: 1px;
    }
    .stat-icon {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 32px;
      height: 32px;
      border-radius: 9px;
    }
    .stat-icon svg {
      width: 17px;
      height: 17px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .stat-card,
    .hr-stats.enter .stat-card {
      transition: none;
      animation: none;
    }
    .stat-card:hover {
      transform: none;
    }
  }
}
