:root {
  color-scheme: light;
  --ink: #2b1730;
  --muted: #74586f;
  --line: #f0bfd4;
  --paper: #ffffff;
  --panel: #fff5fa;
  --blue: #6d5dfc;
  --teal: #10a79c;
  --green: #16a36f;
  --yellow: #f2a516;
  --red: #e43f69;
  --navy: #2a1740;
  --violet: #9b4dff;
  --pink: #ff4f9a;
  --pink-soft: #ffe4f0;
  --pink-pale: #fff6fb;
  --shadow: 0 18px 46px rgba(123, 35, 83, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Be Vietnam Pro", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  background:
    linear-gradient(135deg, rgba(255, 79, 154, 0.16) 0 25%, transparent 25% 50%, rgba(255, 79, 154, 0.1) 50% 75%, transparent 75%) 0 0 / 26px 26px,
    linear-gradient(180deg, #ffe7f2 0, #fff8fc 330px, #fff1f7 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.46) 48%, transparent 60% 100%) 0 0 / 260% 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 44%);
  animation: pageGleam 11s ease-in-out infinite;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--line);
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.app-shell::before {
  position: fixed;
  inset: 18px auto auto 18px;
  z-index: -1;
  content: "♡ ✦ ♡";
  color: rgba(255, 79, 154, 0.32);
  font-size: 46px;
  font-weight: 900;
  animation: cuteFloat 5.5s ease-in-out infinite;
}

.app-shell::after {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: -1;
  content: "✧ ♡ ✧";
  color: rgba(109, 93, 252, 0.22);
  font-size: 54px;
  font-weight: 900;
  animation: cuteFloat 6.5s ease-in-out infinite reverse;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 32%, rgba(255, 255, 255, 0.16) 58%, transparent 70%),
    linear-gradient(100deg, #2a1740 0%, #d93682 48%, #ff74ad 100%);
  background-size: 220% 100%, auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: satinSweep 8s ease-in-out infinite;
}

.brand-block {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  background: #ffffff;
  color: var(--pink);
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 30px rgba(122, 28, 80, 0.26);
  position: relative;
}

.brand-mark::after {
  position: absolute;
  top: -10px;
  right: -10px;
  content: "♡";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: #ff4f9a;
  border: 2px solid #ffffff;
  border-radius: 50%;
  font-size: 15px;
  animation: heartPop 1.8s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar .eyebrow {
  color: #ffe8f4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
  font-weight: 750;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
  font-weight: 750;
}

.subtitle {
  margin-bottom: 0;
  max-width: 760px;
  color: #fff3fa;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 500;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 118px;
  gap: 10px;
  min-width: min(520px, 100%);
}

.control-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.control-panel input,
.control-panel select,
.control-panel button,
#sortSelect {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border-radius: 8px;
}

.control-panel button {
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  border-color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(161, 48, 120, 0.23);
}

.control-panel button:hover,
.range-actions button:hover,
#sortSelect:hover,
.staff-button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.control-panel button,
.staff-button,
#sortSelect {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.range-picker {
  position: relative;
  min-width: 0;
}

.range-toggle {
  display: grid;
  width: 100%;
  min-height: 54px;
  gap: 2px;
  text-align: left;
}

.range-toggle span {
  color: #fff2fa;
  font-size: 12px;
}

.range-toggle strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 230px minmax(290px, 1fr);
  gap: 18px;
  width: min(720px, calc(100vw - 32px));
  padding: 18px;
  background: #fff9fc;
  border: 1px solid #efbad1;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(130, 34, 86, 0.24);
}

.control-panel .range-panel button {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

.preset-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.control-panel .range-panel .preset-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid #f0bfd4;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.control-panel .range-panel .preset-option:hover {
  color: #39133a;
  background: #fff0f7;
  border-color: #ff8fbd;
}

.control-panel .range-panel .preset-option.active {
  color: #39133a;
  background: #ffe2ef;
  border-color: #ff4f9a;
  box-shadow: inset 4px 0 0 #ff4f9a;
}

.control-panel .range-panel .preset-option span {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid #c7d4e4;
  border-radius: 50%;
}

.control-panel .range-panel .preset-option.active span {
  border: 7px solid #ff4f9a;
}

.range-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.range-custom small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.range-actions {
  display: flex;
  grid-column: 2;
  justify-content: flex-end;
  gap: 10px;
}

.range-actions button:first-child {
  color: #0b1935;
  background: #ffffff;
  border-color: #b9c7d9;
}

.range-actions button {
  min-width: 94px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  border-color: transparent;
}

.status-box {
  margin: 18px 0;
  padding: 13px 16px;
  color: #732246;
  background: #fff0f7;
  border: 1px solid #ffb7d4;
  border-radius: 8px;
  font-weight: 700;
}

.status-box.error {
  color: #8f1f18;
  background: #fff0ee;
  border-color: #ffd1cc;
}

.live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: -8px 0 16px;
  padding: 12px 16px;
  color: #39133a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #f0bfd4;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(33, 49, 80, 0.06);
}

.live-dot {
  width: 11px;
  height: 11px;
  background: #ff4f9a;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(22, 136, 95, 0.16);
  animation: livePulse 1.4s ease-in-out infinite;
}

.live-strip span:not(.live-dot) {
  color: #40516a;
  font-weight: 700;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.quick-filter {
  min-height: 42px;
  padding: 0 16px;
  color: #7d224d;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ffd0e2;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(123, 35, 83, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.quick-filter:hover,
.quick-filter.active {
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  box-shadow: 0 14px 28px rgba(161, 48, 120, 0.22);
  transform: translateY(-1px);
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.executive-grid {
  align-items: stretch;
}

.goal-card,
.alert-card,
.podium-section {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f0bfd4;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(18, 35, 63, 0.09);
}

.goal-card {
  background:
    linear-gradient(135deg, rgba(255, 79, 154, 0.16), transparent 48%),
    linear-gradient(115deg, rgba(127, 92, 255, 0.1), transparent 62%),
    #ffffff;
}

.pace-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(161, 48, 120, 0.18);
}

.pace-badge.great,
.pace-badge.good {
  background: linear-gradient(135deg, #10a79c, #16a36f);
}

.pace-badge.watch {
  background: linear-gradient(135deg, #f2a516, #ff74ad);
}

.pace-badge.risk {
  background: linear-gradient(135deg, #e43f69, #7f5cff);
}

.goal-input {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.goal-input input {
  width: 110px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
  font-weight: 800;
}

.goal-meter {
  height: 18px;
  overflow: hidden;
  background: #ffe1ee;
  border: 1px solid #ffd0e2;
  border-radius: 999px;
}

.goal-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff4f9a, #7f5cff, #10a79c);
  background-size: 220% 100%;
  border-radius: inherit;
  transition: width 360ms cubic-bezier(0.2, 0.9, 0.2, 1);
  animation: progressFlow 2.8s linear infinite;
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.executive-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.executive-stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ffd0e2;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.executive-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-meta span {
  color: #d93682;
}

.alert-list {
  display: grid;
  gap: 9px;
}

.alert-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: #48223d;
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
  font-size: 13px;
}

.alert-item span {
  width: 10px;
  height: 10px;
  background: #ff4f9a;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 79, 154, 0.12);
}

.alert-item.ok span {
  background: #10a79c;
  box-shadow: 0 0 0 5px rgba(16, 167, 156, 0.12);
}

.podium-section {
  margin-bottom: 16px;
  background:
    linear-gradient(115deg, rgba(255, 79, 154, 0.13), transparent 35%, rgba(127, 92, 255, 0.11)),
  rgba(255, 255, 255, 0.96);
}

.winner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.winner-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 136px;
  padding: 16px;
  overflow: hidden;
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

.winner-card::after {
  position: absolute;
  right: 14px;
  top: 10px;
  content: "♡";
  color: rgba(255, 79, 154, 0.24);
  font-size: 34px;
  font-weight: 900;
}

.winner-card span {
  width: max-content;
  padding: 5px 9px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.winner-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.winner-card small {
  color: var(--muted);
  font-weight: 800;
}

.winner-card em {
  color: #d93682;
  font-style: normal;
  font-weight: 900;
}

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(255, 79, 154, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 79, 154, 0.08);
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card,
.staff-panel,
.detail-panel,
.chart-card,
.table-card,
.bonus-card,
.kpi-band,
.goal-card,
.alert-card,
.podium-section,
.winner-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f0bfd4;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(18, 35, 63, 0.09);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.metric-card::before,
.staff-panel::before,
.detail-panel::before,
.chart-card::before,
.table-card::before,
.bonus-card::before,
.kpi-band::before,
.staff-button::before,
.goal-card::before,
.alert-card::before,
.podium-section::before,
.winner-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.86), transparent 0 92px),
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.34) 49%, transparent 56% 100%);
  background-size: auto, 240% 100%;
  opacity: 0;
  transition: opacity 180ms ease;
}

.metric-card:hover::before,
.staff-panel:hover::before,
.detail-panel:hover::before,
.chart-card:hover::before,
.table-card:hover::before,
.bonus-card:hover::before,
.kpi-band:hover::before,
.staff-button:hover::before,
.goal-card:hover::before,
.alert-card:hover::before,
.podium-section:hover::before,
.winner-card:hover::before {
  opacity: 1;
  animation: cardSheen 1.2s ease;
}

.metric-card > *,
.staff-panel > *,
.detail-panel > *,
.chart-card > *,
.table-card > *,
.bonus-card > *,
.kpi-band > *,
.staff-button > *,
.goal-card > *,
.alert-card > *,
.podium-section > *,
.winner-card > * {
  position: relative;
  z-index: 1;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border-top: 5px solid var(--blue);
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card::after {
  position: absolute;
  top: 12px;
  right: 14px;
  content: "✦";
  color: rgba(255, 79, 154, 0.24);
  font-size: 24px;
}

.metric-card:hover,
.chart-card:hover,
.table-card:hover,
.bonus-card:hover,
.staff-panel:hover,
.detail-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(123, 35, 83, 0.16);
  border-color: #ff9cc5;
}

.metric-card:nth-child(2) {
  border-top-color: #10a79c;
}

.metric-card:nth-child(3) {
  border-top-color: #9b4dff;
}

.metric-card:nth-child(4) {
  border-top-color: #f2a516;
}

.metric-card span,
.employee-metrics span,
.bonus-card span {
  color: #47566b;
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}

.value-pop {
  animation: valuePop 520ms cubic-bezier(0.2, 0.9, 0.2, 1.15);
}

.metric-card small,
.bonus-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.highlight-card {
  color: #ffffff;
  background: linear-gradient(135deg, #3a1646, #dd3c87 55%, #ff8aba);
  border-color: #ffacd0;
  border-top-color: #ffd166;
}

.highlight-card strong {
  color: #ffffff;
}

.highlight-card span,
.highlight-card small {
  color: rgba(255, 255, 255, 0.78);
}

.kpi-band {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: center;
  margin-top: 16px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(100deg, #3a1646, #d93682 58%, #10a79c);
  border-color: #ffacd0;
  position: relative;
  overflow: hidden;
}

.compact-reward {
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  padding: 16px;
  opacity: 0.96;
}

.compact-reward h2 {
  font-size: 19px;
}

.compact-reward .milestone {
  padding: 10px;
}

.compact-reward .milestone strong {
  font-size: 17px;
}

.kpi-band::after {
  position: absolute;
  right: 18px;
  top: 12px;
  content: "♡ ✦";
  color: rgba(255, 255, 255, 0.28);
  font-size: 32px;
  font-weight: 900;
}

.kpi-band .eyebrow {
  color: #c8fff5;
}

.milestone-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.milestone {
  padding: 12px;
  color: var(--ink);
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

.milestone strong {
  display: block;
  color: #d93682;
  font-size: 20px;
}

.milestone span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 16px;
  margin-top: 0;
}

.workspace-grid > *,
.staff-panel,
.detail-panel,
.chart-card,
.table-card {
  min-width: 0;
}

.staff-panel,
.detail-panel {
  padding: 18px;
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#sortSelect {
  min-width: 150px;
  background: #fff9fc;
  font-weight: 700;
}

.staff-list {
  display: grid;
  gap: 10px;
}

.staff-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

.staff-button.active {
  background: #ffe6f1;
  border-color: #ff4f9a;
  box-shadow: inset 4px 0 0 #ff4f9a;
  animation: selectedGlow 2.4s ease-in-out infinite;
}

.staff-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.staff-name-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  border-radius: 50%;
  font-weight: 900;
}

.staff-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.staff-mini span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #7d224d;
  background: #ffe6f1;
  border: 1px solid #ffb7d4;
  border-radius: 999px;
  font-weight: 800;
}

.employee-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.employee-metrics article {
  display: grid;
  gap: 7px;
  padding: 15px;
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

.employee-metrics strong {
  font-size: 24px;
}

.bonus-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 18px;
}

.bonus-card strong {
  display: block;
  margin: 5px 0;
  color: #d93682;
  font-size: 32px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 14px;
  overflow: hidden;
  background: #ffe1ee;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff4f9a, #7f5cff, #10a79c);
  background-size: 220% 100%;
  border-radius: inherit;
  transition: width 360ms cubic-bezier(0.2, 0.9, 0.2, 1);
  animation: progressFlow 2.8s linear infinite;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.chart-card,
.table-card {
  padding: 16px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(5px, 1fr));
  gap: 5px;
  align-items: end;
  height: 190px;
  padding: 12px;
  background: #fff9fc;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

.bar {
  min-height: 5px;
  background: linear-gradient(180deg, #ff4f9a, #7f5cff);
  border-radius: 5px 5px 0 0;
  transform-origin: bottom;
  animation: barGrow 620ms cubic-bezier(0.22, 0.9, 0.2, 1) both;
}

.money-chart .bar {
  background: linear-gradient(180deg, #ffd166, #ff4f9a);
}

.table-card {
  margin-top: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #ffd0e2;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 12px 11px;
  text-align: left;
  border-bottom: 1px solid #e8eef6;
  white-space: nowrap;
}

th {
  color: #ffffff;
  background: #3a1646;
  font-size: 13px;
}

td {
  color: #3a2744;
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: #fff8fc;
}

tbody tr:hover {
  background: #ffeaf3;
}

@keyframes pageGleam {
  0%,
  100% {
    background-position: -120% 0, 0 0;
  }
  50% {
    background-position: 120% 0, 0 0;
  }
}

@keyframes cardSheen {
  from {
    background-position: 0 0, 120% 0;
  }
  to {
    background-position: 0 0, -80% 0;
  }
}

@keyframes barGrow {
  from {
    transform: scaleY(0.08);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes valuePop {
  0% {
    transform: translateY(0) scale(1);
    text-shadow: none;
  }
  38% {
    transform: translateY(-2px) scale(1.045);
    text-shadow: 0 10px 24px rgba(255, 79, 154, 0.24);
  }
  100% {
    transform: translateY(0) scale(1);
    text-shadow: none;
  }
}

@keyframes progressFlow {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 220% 0;
  }
}

@keyframes selectedGlow {
  0%,
  100% {
    box-shadow: inset 4px 0 0 #ff4f9a, 0 0 0 rgba(255, 79, 154, 0);
  }
  50% {
    box-shadow: inset 4px 0 0 #ff4f9a, 0 12px 26px rgba(255, 79, 154, 0.16);
  }
}

@keyframes satinSweep {
  0%,
  100% {
    background-position: 0% 0%, 0 0;
  }
  50% {
    background-position: 100% 0%, 0 0;
  }
}

@keyframes heartPop {
  0%,
  100% {
    transform: scale(1) rotate(-8deg);
  }
  50% {
    transform: scale(1.12) rotate(8deg);
  }
}

@keyframes cuteFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1120px) {
  .topbar,
  .kpi-band,
  .workspace-grid,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .winner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1460px);
    padding-top: 10px;
  }

  .topbar,
  .staff-panel,
  .detail-panel,
  .kpi-band {
    padding: 14px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
    font-size: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .control-panel,
  .summary-grid,
  .employee-metrics,
  .bonus-card,
  .chart-grid,
  .milestone-row,
  .winner-grid,
  .executive-stats {
    grid-template-columns: 1fr;
  }

  .quick-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-filter {
    width: 100%;
  }

  .control-panel {
    min-width: 0;
  }

  .range-panel {
    position: fixed;
    inset: 12px 10px auto;
    grid-template-columns: 1fr;
    width: auto;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .preset-list {
    max-height: 260px;
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .range-custom,
  .range-actions {
    grid-column: auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #sortSelect {
    width: 100%;
  }

  .bar-chart {
    grid-template-columns: repeat(15, minmax(7px, 1fr));
    height: 150px;
  }
}
