/* The home dashboard: the greeting banner, stat cards with a trend line, and the two charts. */

/* Greeting banner: midnight navy with a teal glow. */
.dash-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.75rem 2rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(28rem 14rem at 95% 0%, rgba(var(--lb-accent-rgb), 0.35), transparent 70%),
    radial-gradient(20rem 12rem at 0% 120%, rgba(21, 57, 122, 0.8), transparent 70%),
    linear-gradient(120deg, var(--lb-primary-active) 0%, var(--lb-primary) 60%, var(--lb-navy-lift) 140%);
  border-radius: 22px;
  box-shadow: var(--lb-shadow-lg);
}

.dash-hero h1 {
  margin: 0.55rem 0 0.2rem;
  font-size: 1.9rem;
  letter-spacing: -0.025em;
  color: #fff;
}

.dash-hero p { margin: 0; color: rgba(255, 255, 255, 0.78); }

.dash-hero-date {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

@media (max-width: 575.98px) {
  .dash-hero { padding: 1.35rem 1.25rem; border-radius: 18px; }
  .dash-hero h1 { font-size: 1.55rem; }
}

/* Stat cards: the label on top, the number big, and a small pill that says how it is moving. */
.stat-card .stat-label { padding-right: 3.2rem; margin: 0 0 0.35rem; }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.6rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
}

.stat-trend.is-up { color: var(--lb-accent-ink); background: var(--lb-accent-soft); }
.stat-trend.is-down { color: var(--lb-danger); background: var(--lb-danger-soft); }
.stat-trend.is-flat { color: var(--lb-muted); background: var(--lb-neutral-soft); }

/* Charts */
.column-chart {
  height: 200px;
  gap: 8px;
  /* faint horizontal guide lines behind the bars */
  background-image: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--lb-border-soft) calc(25% - 1px), var(--lb-border-soft) 25%);
}

.column-chart-bar {
  background: var(--lb-primary);
  opacity: 0.5; /* earlier months: the same blue, softer, so this month stands out */
  border-radius: 8px 8px 0 0;
  transition: filter 0.15s ease;
}

/* This month: the full navy. */
.column-chart-bar.is-current { background: var(--lb-primary); opacity: 1; }
.column-chart-bar.is-empty { background: var(--lb-border-soft); opacity: 1; border-radius: 4px 4px 0 0; }

.column-chart-col:hover .column-chart-bar,
.column-chart-col:focus-visible .column-chart-bar { background: var(--lb-primary); opacity: 1; }
.column-chart-col:hover .column-chart-bar.is-empty { background: var(--lb-border); }
.column-chart-col:hover .column-chart-bar.is-current,
.column-chart-col:focus-visible .column-chart-bar.is-current { background: var(--lb-primary-hover); }

/* The number above a bar that has one. */
.column-chart-value {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lb-ink);
  text-align: center;
}

.column-chart-col:hover::after,
.column-chart-col:focus-visible::after { border-radius: 8px; background: var(--lb-primary); }

/* Departments */
.bar-list { gap: 1.1rem; }
.bar-list-track { height: 10px; background: var(--lb-hover); }
.bar-list-bar { background: var(--lb-primary); }


/* ---- The people dashboard (admins, HR manager): a dark band, headline cards over its edge, a line chart and a donut ---- */
/* The band starts right under the top bar and runs the full width of the page, in the bar's own navy, so the two read as one dark header. */
.dash-hero-band {
  margin: -28px calc(50% - 50vw) 0;
  padding: 1.6rem var(--lb-content-gutter) 6.2rem;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(28rem 14rem at 95% 0%, rgba(var(--lb-accent-rgb), 0.22), transparent 70%),
    linear-gradient(180deg, var(--lb-primary) 0%, #0E2B55 100%);
}
.dash-hero-band h1 { margin-top: 0; }

.dash-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: -4.4rem 0 1.25rem; }
.dash-stat {
  display: block;
  padding: 1.2rem 1.3rem 1.1rem;
  color: var(--lb-ink);
  text-decoration: none;
  background: var(--lb-surface);
  border: 1px solid var(--lb-border-soft);
  border-radius: 20px;
  box-shadow: var(--lb-shadow-lg);
  transition: transform 0.15s var(--lb-ease), box-shadow 0.15s var(--lb-ease);
}
a.dash-stat:hover { color: var(--lb-ink); transform: translateY(-2px); }
.dash-stat-icon { display: inline-grid; place-items: center; width: 2.7rem; height: 2.7rem; margin-bottom: 0.9rem; font-size: 1.1rem; border-radius: 50%; }
.dash-stat-icon.is-violet { color: var(--lb-primary); background: var(--lb-primary-soft); }
.dash-stat-icon.is-green { color: var(--lb-accent-ink); background: var(--lb-accent-soft); }
.dash-stat-icon.is-blue { color: #1D6FA5; background: #DDF1FB; }
.dash-stat-icon.is-amber { color: var(--lb-warning-ink); background: var(--lb-warning-soft); }
.dash-stat-figure { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; }
.dash-stat-figure strong { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.dash-stat-label { margin-top: 0.35rem; font-size: 0.875rem; color: var(--lb-muted); }
.dash-chip { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.18rem 0.6rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap; border-radius: 999px; }
.dash-chip.is-up { color: var(--lb-accent-ink); background: var(--lb-accent-soft); }
.dash-chip.is-down { color: var(--lb-danger); background: var(--lb-danger-soft); }
.dash-chip.is-flat { color: var(--lb-muted); background: var(--lb-hover); }

.dash-main { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 991.98px) { .dash-main { grid-template-columns: 1fr; } }
.dash-panel { padding: 1.25rem 1.4rem; background: var(--lb-surface); border: 1px solid var(--lb-border-soft); border-radius: 20px; box-shadow: var(--lb-shadow); }
.dash-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.dash-panel h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.dash-range { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.8rem; font-size: 0.78rem; color: var(--lb-muted); border: 1px solid var(--lb-border); border-radius: 10px; }
.dash-link { font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.dash-legend { display: flex; gap: 1rem; margin-top: 0.35rem; font-size: 0.75rem; font-weight: 600; color: var(--lb-muted); }
.dash-legend i { display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.35rem; border-radius: 50%; background: var(--series); }

/* Line chart */
.line-chart { display: block; width: 100%; height: auto; overflow: visible; }
.line-grid { stroke: var(--lb-border-soft); stroke-dasharray: 3 4; }
.line-axis { font-size: 11px; fill: var(--lb-muted); }
.line-path { fill: none; stroke: var(--lb-accent-strong); stroke-width: 2.4; stroke-linecap: round; }
.line-area { fill: url(#joiners-fill); stroke: none; }
.line-band { fill: rgba(var(--lb-primary-rgb), 0.07); }
.line-dot { fill: var(--lb-surface); stroke: var(--lb-accent-strong); stroke-width: 2; opacity: 0; transition: opacity 0.12s ease; }
.line-hit { fill: transparent; }
.line-point:hover .line-dot, .line-point:focus .line-dot, .line-point.is-current .line-dot { opacity: 1; }
.line-point.is-current .line-dot { fill: var(--lb-primary); stroke: var(--lb-primary); }
.line-point:focus { outline: 0; }

/* Donut with the total in the middle */
.dash-donut { max-width: 13.5rem; margin: 0 auto; display: block; }
.dash-donut-total { font-size: 34px; font-weight: 700; fill: var(--lb-ink); }
.dash-donut-caption { font-size: 10px; fill: var(--lb-muted); }
.dash-donut-legend { display: grid; gap: 0.6rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.dash-donut-legend li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--lb-muted); }
.dash-donut-legend i { flex: none; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--series); }
.dash-donut-legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-donut-legend strong { color: var(--lb-ink); }

.dash-table th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--lb-muted); }
@media (max-width: 575.98px) { .dash-hero-band { padding-bottom: 5.8rem; } }

/* Dashboards for everyone else: the same band; a short one when there are no headline cards to overlap it. */
.dash-hero-band.is-short { padding-bottom: 1.9rem; margin-bottom: 1.25rem; }
.dash-list .list-group-item { padding-inline: 0; background: transparent; }
