/* JASKO HQ — Visual Effects (v1, 2026-10-03)
   Shared motion + polish for all office tabs.
   Modern, elegant, subtle — never distracting. */

/* Page load: staggered fade-up for cards */
@keyframes fx-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.score-card, .chart-box, .hq-card, .kpi-card {
  animation: fx-fade-up .45s ease both;
}
.score-grid > *:nth-child(2), .hq-grid > *:nth-child(2) { animation-delay: .06s; }
.score-grid > *:nth-child(3), .hq-grid > *:nth-child(3) { animation-delay: .12s; }
.score-grid > *:nth-child(4), .hq-grid > *:nth-child(4) { animation-delay: .18s; }

/* Card hover: gentle lift + glow */
.score-card, .chart-box, .hq-card, .kpi-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.score-card:hover, .chart-box:hover, .hq-card:hover, .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  border-color: #334155;
}

/* Table rows: hover highlight + smooth */
.tbl tbody tr {
  transition: background .12s ease;
}
.tbl tbody tr:hover {
  background: rgba(59,130,246,.07);
}

/* Buttons: press + hover feedback */
.btn {
  transition: transform .1s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.btn:active {
  transform: scale(.97);
}

/* Nav tabs: underline slide */
.hq-tabs a, .mod-bar a {
  position: relative;
  transition: color .15s ease;
}
.hq-tabs a::after, .mod-bar a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 6px;
  height: 2px; border-radius: 2px;
  background: #f59e0b;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.hq-tabs a:hover::after, .hq-tabs a.active::after,
.mod-bar a:hover::after, .mod-bar a.active::after {
  transform: scaleX(1);
}

/* SVG charts: bars grow on load */
@keyframes fx-grow-y {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
.chart-box rect[fill]:not([fill="#162032"]):not([fill="#1e293b"]) {
  transform-origin: bottom;
  transform-box: fill-box;
  animation: fx-grow-y .6s ease both;
}
.chart-box rect:nth-of-type(2) { animation-delay: .08s; }
.chart-box rect:nth-of-type(3) { animation-delay: .16s; }
.chart-box rect:nth-of-type(4) { animation-delay: .24s; }

/* SVG donut: draw-in */
@keyframes fx-draw {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.chart-box circle[stroke-dasharray] {
  animation: fx-draw .8s ease both;
}

/* Trend line: draw across */
@keyframes fx-line-draw {
  from { stroke-dashoffset: 1200; }
  to   { stroke-dashoffset: 0; }
}
.chart-box polyline[stroke-width="2.5"] {
  stroke-dasharray: 1200;
  animation: fx-line-draw 1.2s ease both;
}

/* Notices: slide in */
.notice {
  animation: fx-fade-up .3s ease both;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
