:root {
  --bg: #f3f7fa;
  --panel: #ffffff;
  --text: #18212f;
  --muted: #667085;
  --line: #dde3ea;
  --blue: #2f6bed;
  --green: #087a63;
  --red: #c24135;
  --amber: #b87322;
  --ink-soft: #344054;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(247, 250, 252, 0.9), rgba(240, 245, 249, 0.98)),
    url("assets/web-design/decorations/noise.svg?v=20260621163829") repeat,
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 118, 24, 0.16), transparent 24%),
    radial-gradient(circle at 36% 44%, rgba(62, 134, 180, 0.16), transparent 34%),
    linear-gradient(90deg, rgba(3, 9, 16, 0.72), rgba(7, 18, 30, 0.52) 42%, rgba(4, 10, 18, 0.78)),
    url("assets/web-design/decorations/data-wave.svg?v=20260621163829") left 6% bottom 30% / 58% auto no-repeat,
    url("assets/web-design/decorations/data-grid.svg?v=20260621163829") left bottom / 70% auto no-repeat,
    url("assets/web-design/backgrounds/login-bg-desktop.png?v=20260621163829") center / min(100vw, 1672px) auto no-repeat,
    #050b13;
  overflow: hidden;
}

.login-view::before,
.login-view::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.login-view::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 8, 14, 0.04), rgba(3, 8, 14, 0.52)),
    url("assets/web-design/decorations/noise.svg?v=20260621163829") repeat;
  opacity: 0.72;
}

.login-view::after {
  left: -8%;
  right: 42%;
  bottom: -18%;
  height: 56%;
  border-top: 1px solid rgba(255, 119, 24, 0.28);
  background:
    linear-gradient(16deg, transparent 0 38%, rgba(255, 119, 24, 0.5) 39%, transparent 40% 100%),
    repeating-linear-gradient(0deg, rgba(151, 174, 196, 0.12) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg, rgba(151, 174, 196, 0.12) 0 1px, transparent 1px 54px);
  transform: perspective(760px) rotateX(64deg);
  transform-origin: bottom;
}

.login-hero {
  position: relative;
  z-index: 1;
  width: min(1680px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(400px, 560px);
  align-items: center;
  gap: clamp(40px, 7vw, 104px);
}

.login-copy {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-left: clamp(10px, 4vw, 72px);
}

.login-copy-rule {
  width: 6px;
  height: 116px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a1f, #ff4d00);
  box-shadow: 0 0 28px rgba(255, 107, 16, 0.72);
}

.login-copy h1 {
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(44px, 4.6vw, 78px);
  line-height: 1.05;
  font-weight: 780;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.login-copy p {
  margin-top: 22px;
  color: rgba(226, 232, 240, 0.74);
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 620;
  letter-spacing: 3px;
}

.login-card {
  width: 100%;
  min-height: 640px;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(42px, 4.4vw, 70px);
  border: 1px solid rgba(132, 152, 176, 0.32);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 16, 28, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 113, 24, 0.14),
    0 34px 90px rgba(0, 0, 0, 0.52),
    0 0 36px rgba(255, 112, 24, 0.18);
  backdrop-filter: blur(22px);
}

.login-card-head {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.login-logo {
  width: 94px;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 14px 30px rgba(255, 105, 14, 0.34));
}

.login-card h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  font-weight: 780;
  letter-spacing: 6px;
  text-shadow: 0 14px 32px rgba(0, 0, 0, 0.48);
}

.login-card-head p {
  color: rgba(202, 213, 226, 0.66);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: 2px;
}

.login-field {
  display: grid;
  gap: 0;
  color: rgba(210, 220, 232, 0.68);
  font-size: 17px;
  font-weight: 620;
}

.login-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-field input {
  height: 64px;
  border: 1px solid rgba(137, 154, 177, 0.34);
  border-radius: 8px;
  padding: 0 22px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(5, 13, 24, 0.42);
  font: inherit;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.2);
}

.login-field input::placeholder {
  color: rgba(212, 220, 230, 0.5);
}

.login-field input:focus {
  border-color: rgba(255, 120, 24, 0.72);
  box-shadow:
    0 0 0 3px rgba(255, 112, 24, 0.12),
    inset 0 0 18px rgba(0, 0, 0, 0.16);
  outline: none;
}

.login-submit {
  height: 64px;
  border: 0;
  border-radius: 8px;
  margin-top: 10px;
  background: linear-gradient(180deg, #ff8719, #ff5000);
  color: #fff;
  font-size: 26px;
  font-weight: 780;
  letter-spacing: 12px;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(255, 82, 0, 0.34);
}

.login-submit:hover {
  background: linear-gradient(180deg, #ff9328, #ff5a08);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #ff9a76;
  font-size: 13px;
  text-align: center;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 190px;
  padding: 30px 44px 48px;
  background:
    linear-gradient(90deg, rgba(7, 20, 32, 0.96), rgba(11, 61, 70, 0.86) 48%, rgba(17, 31, 48, 0.7)),
    url("assets/web-design/decorations/data-wave.svg?v=20260621163829") right 28px center / 58% auto no-repeat,
    url("assets/web-design/decorations/data-grid.svg?v=20260621163829") right top / 54% auto no-repeat,
    url("assets/web-design/backgrounds/login-bg-desktop.png?v=20260621163829") center / cover no-repeat;
  border-bottom: 1px solid rgba(126, 167, 185, 0.42);
  box-shadow: 0 24px 56px rgba(12, 30, 43, 0.2);
  overflow: hidden;
}

.topbar::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(95, 206, 184, 0.2), transparent 34%),
    radial-gradient(circle at 82% 72%, rgba(255, 122, 26, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 44%),
    url("assets/web-design/decorations/noise.svg?v=20260621163829") repeat;
  opacity: 0.88;
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(72, 190, 170, 0.9), rgba(214, 172, 92, 0.68), transparent);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar > div:first-child {
  display: flex;
  min-height: 82px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

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

.brand-logo {
  width: 152px;
  max-width: 36vw;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

.brand-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.52), transparent);
}

.topbar-actions {
  position: absolute;
  top: 28px;
  right: 44px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.version-info {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  color: rgba(244, 251, 255, 0.86);
  background: rgba(6, 18, 30, 0.24);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.logout-button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(6, 18, 30, 0.3);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.logout-button:hover {
  border-color: rgba(255, 138, 31, 0.72);
  background: rgba(255, 116, 24, 0.16);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: 0;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

h2 {
  font-size: 16px;
  font-weight: 700;
}

#periodText {
  max-width: min(560px, 100%);
  padding: 9px 12px;
  color: #f4fbff;
  font-size: 13px;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.toolbar {
  position: relative;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: flex-start;
  width: min(1480px, calc(100% - 56px));
  margin: 18px auto 0;
  padding: 14px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 252, 0.94)),
    url("assets/web-design/decorations/noise.svg?v=20260621163829") repeat;
  border: 1px solid rgba(207, 217, 226, 0.78);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(12, 30, 43, 0.15);
  backdrop-filter: blur(16px);
}

#app.booting .toolbar {
  display: none;
}

.timebar {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 4px;
}

.time-controls {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.timebar label {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  align-items: center;
}

.period-label {
  align-self: center;
  margin-right: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 720;
}

.range-separator {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.quick {
  height: 32px;
  min-width: 42px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 620;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.quick[data-quarter] {
  background: #fff8e8;
  border-color: #e2c06c;
  color: #76520f;
}

.quick.selected {
  background: #e7f3ef;
  border-color: #8bbfaf;
  color: #0b6043;
  font-weight: 720;
}

.quick[data-quarter].selected {
  background: #f7e4b8;
  border-color: #c79738;
  color: #553b0f;
}

.section-filter {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.branch-filter {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.timebar .filter-label,
.branch-filter .filter-label,
.section-filter .filter-label {
  align-self: center;
  flex: 0 0 40px;
}

.branch-filter .quick-tabs,
.section-filter .quick-tabs {
  flex: 1 1 0;
  min-width: 0;
}

.filter-label {
  color: #24384a;
  font-size: 15px;
  font-weight: 780;
}

.section-quick {
  min-width: 62px;
}

.branch-quick {
  min-width: 56px;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

select,
button,
textarea {
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

select,
button {
  height: 36px;
  padding: 0 10px;
}

button {
  cursor: pointer;
  border-color: #b8c2cc;
}

button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

main {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 190px);
  margin: 0;
  padding: 22px 0 48px;
}

main > :not(.page-loading) {
  width: min(1480px, calc(100% - 56px));
  margin-right: auto;
  margin-left: auto;
}

.page-loading {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  padding-top: 72px;
  background: rgba(243, 247, 250, 0.74);
  backdrop-filter: blur(1.5px);
  pointer-events: auto;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ff8a1f;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
  filter: drop-shadow(0 10px 24px rgba(7, 18, 30, 0.26));
}

#app.loading .page-loading {
  display: flex;
}

#app.booting .page-loading {
  display: flex;
  background: rgba(243, 247, 250, 0.9);
  backdrop-filter: none;
}

#app.booting main > :not(.page-loading) {
  display: none;
}

#app.loading main > :not(.page-loading) {
  pointer-events: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi {
  min-height: 108px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(250,252,253,0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 36, 52, 0.06);
}

.kpi .label {
  color: var(--muted);
  font-size: 13px;
}

.kpi .value {
  margin-top: 10px;
  font-size: 25px;
  font-weight: 740;
  letter-spacing: 0;
}

.kpi .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.operating-chart-panel {
  margin-bottom: 16px;
}

.operating-chart {
  padding: 16px;
}

.operating-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}

.operating-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.operating-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.operating-toggle.selected {
  border-color: #8bbfaf;
  background: #e7f3ef;
  color: #0b6043;
}

.operating-toggle:not(.selected) {
  opacity: 0.52;
}

.operating-toggle:hover {
  border-color: #8fb1cf;
}

.operating-legend i {
  display: inline-block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.operating-legend i.blue,
.operating-bar.blue {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.operating-legend i.green,
.operating-bar.green {
  background: linear-gradient(180deg, #34c79d, #14845f);
}

.operating-legend i.amber,
.operating-bar.amber {
  background: linear-gradient(180deg, #f0bc66, #c8872b);
}

.operating-legend i.red,
.operating-bar.red {
  background: linear-gradient(180deg, #f17467, #c24135);
}

.operating-legend em {
  color: #7a8797;
  font-style: normal;
}

.operating-bars {
  display: grid;
  grid-auto-columns: minmax(118px, 1fr);
  grid-auto-flow: column;
  gap: 18px;
  min-height: calc(var(--chart-height) + 74px);
  overflow-x: auto;
  padding: 34px 6px 6px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent calc(18px + var(--positive-height)), rgba(75, 94, 113, 0.2) calc(18px + var(--positive-height)) calc(18px + var(--positive-height) + 1px), transparent calc(18px + var(--positive-height) + 1px)),
    linear-gradient(180deg, transparent calc(100% - 32px), rgba(237, 242, 247, 0.72) calc(100% - 32px)),
    repeating-linear-gradient(180deg, rgba(226, 233, 240, 0.6) 0 1px, transparent 1px 42px);
}

.compare-operating-bars {
  grid-auto-columns: minmax(236px, 1fr);
}

.operating-group {
  display: grid;
  align-items: end;
  gap: 10px;
  min-width: 118px;
}

.operating-compare-group {
  min-width: 236px;
}

.operating-compare-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 12px;
  align-items: end;
}

.operating-compare-branch {
  display: grid;
  gap: 6px;
  align-items: end;
  justify-items: center;
}

.operating-compare-branch > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operating-bar-cluster {
  display: flex;
  height: var(--chart-height);
  align-items: stretch;
  justify-content: center;
  gap: 7px;
}

.operating-bar-slot {
  display: flex;
  width: 18px;
  height: var(--chart-height);
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--negative-height);
}

.operating-bar {
  position: relative;
  display: block;
  width: 18px;
  min-height: 0;
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 10px 18px rgba(20, 36, 52, 0.12);
}

.operating-bar.negative {
  align-self: flex-end;
  transform: translateY(100%);
  border-radius: 2px 2px 6px 6px;
  opacity: 0.74;
  border: 1px dashed rgba(194, 65, 53, 0.42);
}

.operating-bar b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px + var(--label-offset, 0px));
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.operating-bar.negative b {
  top: calc(100% + 5px + var(--label-offset, 0px));
  bottom: auto;
}

.operating-group > strong {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.staff-trend-panel {
  margin-bottom: 16px;
}

.staff-trend-chart {
  padding: 16px;
}

.staff-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}

.staff-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.staff-trend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.staff-trend-toggle.selected {
  border-color: #8bbfaf;
  background: #e7f3ef;
  color: #0b6043;
}

.staff-trend-toggle:not(.selected) {
  opacity: 0.52;
}

.staff-trend-toggle:hover {
  border-color: #8fb1cf;
}

.staff-trend-legend i {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.staff-trend-bars {
  display: grid;
  grid-auto-columns: minmax(92px, 1fr);
  grid-auto-flow: column;
  gap: 16px;
  min-height: calc(var(--staff-chart-height) + 62px);
  overflow-x: auto;
  padding: 14px 8px 6px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent calc(100% - 28px), rgba(237, 242, 247, 0.78) calc(100% - 28px)),
    repeating-linear-gradient(180deg, rgba(226, 233, 240, 0.58) 0 1px, transparent 1px 42px);
}

.compare-staff-trend-bars {
  grid-auto-columns: minmax(142px, 1fr);
}

.staff-trend-group {
  display: grid;
  min-width: 92px;
  align-items: end;
  justify-items: center;
  gap: 7px;
}

.staff-trend-group > strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.staff-compare-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(48px, 1fr));
  gap: 10px;
  align-items: end;
}

.staff-compare-column {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 5px;
  min-width: 48px;
}

.staff-compare-column > strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.staff-compare-column > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-stack-column {
  display: flex;
  flex-direction: column-reverse;
  width: 34px;
  height: var(--staff-chart-height);
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 9px 9px 4px 4px;
  background: rgba(237, 242, 247, 0.9);
  box-shadow: 0 14px 24px rgba(20, 36, 52, 0.12);
}

.staff-compare-column .staff-stack-column {
  width: 28px;
}

.staff-stack-segment {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
}

.staff-trend-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(20, 36, 52, 0.06);
}

#keyIndicatorPanel {
  overflow: hidden;
}

#keyIndicatorPanel.key-indicators-wide {
  grid-column: 1 / -1;
}

.layout.compare-mode #detailPanel,
.layout.compare-mode #keyIndicatorPanel {
  grid-column: 1 / -1;
}

.layout.compare-mode #keyIndicatorPanel {
  order: 2;
}

.layout.compare-mode .panel:not(#detailPanel):not(#keyIndicatorPanel) {
  order: 3;
}

[hidden] {
  display: none !important;
}

.panel-title {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px;
  align-items: start;
}

.compare-indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 16px;
  padding: 14px;
  align-items: start;
}

.compare-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.compare-indicator-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.compare-indicator-card .indicator-grid,
.compare-indicator-card .promotion-section,
.compare-indicator-card .staff-section {
  margin: 12px;
}

.compare-indicator-card .promotion-content,
.compare-indicator-card .staff-content {
  grid-template-columns: 1fr;
}

.compare-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #edf1f5;
}

.compare-card-title h3 {
  margin: 0;
  font-size: 16px;
}

.compare-card-title span {
  color: var(--muted);
  font-size: 12px;
}

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

.compare-kpis div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fbfcfd;
}

.compare-kpis span,
.compare-kpis em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.compare-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  white-space: nowrap;
}

.compare-table-wrap {
  overflow: auto;
}

.compare-table {
  min-width: 900px;
}

.compare-table th,
.compare-table td {
  padding: 9px 10px;
  font-size: 12px;
}

.compare-card .indicator-grid,
.compare-card .promotion-section,
.compare-card .staff-section {
  margin: 12px;
}

.compare-card .promotion-content,
.compare-card .staff-content {
  grid-template-columns: 1fr;
}

.compare-card .promotion-donut,
.compare-card .staff-donut {
  width: 116px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #fbfcfd;
  font-weight: 650;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover,
th.active-sort {
  color: var(--blue);
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:hover {
  background: #f9fbff;
}

.has-detail-children td {
  border-bottom-color: #dbe4ee;
  font-weight: 650;
}

.detail-child-row {
  background: #fbfdff;
}

.detail-child-row td {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #475467;
  font-size: 12px;
}

.detail-child-row td:first-child span {
  position: relative;
  display: inline-block;
  padding-left: 18px;
}

.detail-child-row td:first-child span::before {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 7px;
  height: 1px;
  content: "";
  background: #98a2b3;
}

tr.total-row {
  background: #f7fafc;
  font-weight: 750;
}

tr.total-row td {
  border-top: 1px solid #dbe4ee;
  border-bottom: 0;
}

tr.total-row:hover {
  background: #f7fafc;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 12px;
  background: #fff4d6;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.alerts,
.quality {
  max-height: 418px;
  overflow: auto;
  padding: 10px;
}

.alert-item,
.quality-item {
  padding: 10px;
  border-bottom: 1px solid #edf1f5;
}

.alert-item strong,
.quality-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.alert-item > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.alert-item > span + span {
  margin-top: 2px;
}

.quality-item span {
  color: var(--muted);
  font-size: 12px;
}

.key-indicators {
  padding: 14px;
}

.indicator-headlines {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.indicator-card {
  min-height: 96px;
  padding: 12px;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.indicator-card.warn {
  border-color: #f0c6bd;
  background: linear-gradient(180deg, #fffdfb, #fff8f6);
}

.indicator-name {
  color: var(--muted);
  font-size: 12px;
}

.indicator-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 760;
}

.sparkline {
  display: flex;
  height: 40px;
  align-items: flex-end;
  gap: 4px;
  margin-top: 8px;
}

.sparkline span {
  display: block;
  width: 8px;
  border-radius: 4px 4px 0 0;
}

.pos-bg {
  background: rgba(20, 132, 95, 0.42);
}

.neg-bg {
  background: rgba(194, 65, 53, 0.42);
}

.indicator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.national-indicator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.national-indicator-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(204, 217, 229, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96)),
    #fff;
  box-shadow: 0 10px 24px rgba(20, 36, 52, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.national-indicator-card-clickable {
  cursor: pointer;
}

.national-detail-block {
  scroll-margin-top: 18px;
}

.national-indicator-card-clickable:hover,
.national-indicator-card.expanded,
.national-indicator-card.loading {
  border-color: rgba(37, 99, 235, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.98)),
    #fff;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.14), 0 0 0 1px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.national-indicator-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 233, 240, 0.9);
}

.national-indicator-title h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 760;
}

.national-indicator-title p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.national-indicator-title .detail-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: #49657f;
  background: rgba(239, 245, 251, 0.72);
  font-style: normal;
  font-weight: 780;
  line-height: 1.1;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.national-indicator-title .detail-action::after {
  content: "›";
  color: currentColor;
  font-size: 13px;
  line-height: 1;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.national-indicator-card.loading .detail-action::after {
  width: 11px;
  height: 11px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #1457c9;
  border-radius: 50%;
  content: "";
  animation: spin 720ms linear infinite;
  transform: none;
}

.national-indicator-title .detail-action::before {
  position: absolute;
  inset: -40% auto -40% -55%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  content: "";
  opacity: 0;
  transform: skewX(-18deg);
}

.national-indicator-card-clickable:hover .detail-action,
.national-indicator-card.expanded .detail-action,
.national-indicator-card.loading .detail-action {
  border-color: rgba(37, 99, 235, 0.34);
  color: #1457c9;
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.98), rgba(219, 234, 254, 0.94));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.national-indicator-card-clickable:hover .detail-action::after,
.national-indicator-card.expanded .detail-action::after {
  transform: translateX(2px);
}

.national-indicator-card.loading .detail-action::after {
  transform: none;
}

.national-indicator-card-clickable:hover .detail-action::before,
.national-indicator-card.expanded .detail-action::before {
  opacity: 1;
  animation: detail-action-shine 900ms ease forwards;
}

@keyframes detail-action-shine {
  from {
    left: -55%;
  }

  to {
    left: 120%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.national-indicator-title strong {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #526179;
  background: rgba(232, 239, 246, 0.78);
  font-size: 11px;
  font-weight: 650;
}

.national-indicator-bars {
  display: grid;
  gap: 10px;
}

.national-detail-block {
  margin: 0 18px 18px;
  padding: 14px;
  border: 1px solid rgba(191, 213, 255, 0.92);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.92);
}

.national-class-fill-table {
  min-width: 1060px;
}

.national-venue-table {
  min-width: 980px;
}

.national-promotion-table {
  min-width: 920px;
}

.national-staff-table {
  min-width: 1180px;
}

.national-staff-sort {
  cursor: pointer;
  user-select: none;
}

.national-bar-row {
  display: grid;
  grid-template-columns: 48px minmax(78px, 1fr) minmax(54px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.national-bar-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.national-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.national-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.72), rgba(20, 163, 127, 0.72));
}

.national-bar-row.warn .national-bar-track i {
  background: linear-gradient(90deg, #e7b46a, #c24135);
}

.national-bar-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.indicator-grid h3 {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

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

.target-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 86px;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.target-row strong {
  display: block;
  font-size: 13px;
}

.target-row span {
  color: var(--muted);
  font-size: 11px;
}

.target-row .target-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 3px;
}

.target-row .target-detail-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: #49657f;
  background: rgba(239, 245, 251, 0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.1;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.target-row .target-detail-action::after {
  content: "›";
  color: currentColor;
  font-size: 13px;
  line-height: 1;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.target-row .target-detail-action::before {
  position: absolute;
  inset: -40% auto -40% -55%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  content: "";
  opacity: 0;
  transform: skewX(-18deg);
}

.target-row.warn {
  border-color: #f0c6bd;
}

.target-row.ok {
  border-color: #cfe7dd;
}

.target-value {
  font-size: 14px;
  font-weight: 720;
  text-align: right;
}

.target-track {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.target-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6bb79f, #2563eb);
}

.target-row.warn .target-track span {
  background: linear-gradient(90deg, #e7b46a, #c24135);
}

.target-detail-card {
  display: block;
  overflow: hidden;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.target-detail-card:hover {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.target-detail-card[open] {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 14px 28px rgba(24, 33, 47, 0.08);
}

.target-detail-card summary {
  cursor: pointer;
  list-style: none;
}

.target-detail-card summary::-webkit-details-marker {
  display: none;
}

.target-detail-card .target-row {
  border: 0;
  border-radius: 0;
}

.target-detail-card:hover .target-row,
.target-detail-card[open] .target-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.98)),
    #fff;
}

.target-detail-card:hover .target-detail-action,
.target-detail-card[open] .target-detail-action {
  border-color: rgba(37, 99, 235, 0.34);
  color: #1457c9;
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.98), rgba(219, 234, 254, 0.94));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.target-detail-card:hover .target-detail-action::after,
.target-detail-card[open] .target-detail-action::after {
  transform: translateX(2px);
}

.target-detail-card:hover .target-detail-action::before,
.target-detail-card[open] .target-detail-action::before {
  opacity: 1;
  animation: detail-action-shine 900ms ease forwards;
}

.target-detail-card[open] .target-row {
  border-bottom: 1px solid rgba(226, 233, 240, 0.92);
}

.class-fill-detail,
.teacher-pay-ratio-detail,
.promotion-roi-detail,
.staff-structure-detail,
.revenue-capita-detail,
.channel-ratio-detail,
.venue-detail {
  display: grid;
  gap: 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
}

.class-fill-title,
.teacher-pay-ratio-title,
.promotion-roi-title,
.staff-structure-title,
.revenue-capita-title,
.channel-ratio-title,
.venue-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.class-fill-title strong,
.teacher-pay-ratio-title strong,
.promotion-roi-title strong,
.staff-structure-title strong,
.revenue-capita-title strong,
.channel-ratio-title strong,
.venue-title strong {
  color: var(--text);
  font-size: 13px;
}

.class-fill-title span,
.teacher-pay-ratio-title span,
.promotion-roi-title span,
.staff-structure-title span,
.revenue-capita-title span,
.channel-ratio-title span,
.venue-title span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2f5f99;
  font-weight: 760;
  white-space: nowrap;
}

.class-fill-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.class-fill-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 11px;
}

.class-fill-table th,
.class-fill-table td {
  padding: 8px 7px;
  border-bottom: 1px solid rgba(226, 233, 240, 0.82);
  text-align: right;
  white-space: nowrap;
}

.class-fill-table th:first-child,
.class-fill-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  text-align: left;
}

.class-fill-table th {
  background: rgba(239, 245, 251, 0.92);
  color: #5f7189;
  font-weight: 780;
}

.class-fill-table tr:last-child td {
  border-bottom: 0;
}

.class-fill-table tr.total td,
.class-fill-table tr.average td {
  background: rgba(37, 99, 235, 0.06);
  color: var(--text);
  font-weight: 780;
}

.class-fill-table .fill-rate-cell {
  color: #15803d;
  font-weight: 820;
}

.class-fill-table .fill-rate-cell.low {
  color: #c24135;
  background: rgba(194, 65, 53, 0.08);
}

.class-fill-table tr.total .fill-rate-cell,
.class-fill-table tr.average .fill-rate-cell {
  color: inherit;
  background: rgba(37, 99, 235, 0.06);
}

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

.venue-summary div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.venue-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.venue-summary strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.venue-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 11px;
}

.venue-table th,
.venue-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(226, 233, 240, 0.82);
  text-align: right;
  white-space: nowrap;
}

.venue-table th:first-child,
.venue-table td:first-child,
.venue-table th:nth-child(2),
.venue-table td:nth-child(2) {
  text-align: left;
}

.venue-table th {
  background: rgba(239, 245, 251, 0.92);
  color: #5f7189;
  font-weight: 780;
}

.venue-table td:nth-child(2) {
  color: var(--text);
  font-weight: 720;
}

.venue-table tr.total td {
  background: rgba(37, 99, 235, 0.06);
  color: var(--text);
  font-weight: 820;
}

.venue-table tr.grand-total td {
  background: rgba(20, 163, 127, 0.12);
  color: #0f3349;
  font-weight: 880;
}

.venue-table .metric-cell-low {
  color: #c24135;
  background: rgba(194, 65, 53, 0.08);
  font-weight: 860;
}

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

.promotion-roi-body {
  display: grid;
  grid-template-columns: minmax(140px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.target-promo-donut {
  width: 138px;
}

.target-staff-donut {
  width: 138px;
}

.staff-structure-detail .staff-content {
  grid-template-columns: minmax(140px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.staff-structure-detail .staff-roles {
  gap: 8px;
}

.staff-structure-detail .staff-role-row {
  padding: 8px;
}

.staff-structure-detail .staff-role-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.revenue-capita-chart,
.metric-trend-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 9px;
  align-items: end;
  min-height: 188px;
  padding: 18px 8px 8px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(239, 245, 251, 0.6), rgba(255, 255, 255, 0.82)),
    #fff;
}

.revenue-capita-chart::before,
.metric-trend-chart::before {
  position: absolute;
  right: 8px;
  left: 8px;
  bottom: calc(44px + var(--target-line) * 1.18);
  height: 1px;
  content: "";
  border-top: 1px dashed rgba(194, 65, 53, 0.62);
}

.revenue-capita-bar,
.metric-trend-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 118px auto auto;
  gap: 5px;
  justify-items: center;
  min-width: 0;
}

.revenue-capita-bar-plot,
.metric-trend-bar-plot {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 118px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(226, 235, 245, 0.86);
}

.revenue-capita-bar i,
.metric-trend-bar i {
  display: block;
  width: min(28px, 72%);
  min-height: 5px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #2563eb, #6bb79f);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.16);
}

.revenue-capita-bar.warn i,
.metric-trend-bar.warn i {
  background: linear-gradient(180deg, #c24135, #e7b46a);
}

.channel-ratio-chart .metric-trend-bar.ok i {
  background: linear-gradient(180deg, #2563eb, #6bb79f);
}

.revenue-capita-bar strong,
.metric-trend-bar strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  white-space: nowrap;
}

.revenue-capita-bar span,
.metric-trend-bar span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.revenue-capita-legend,
.metric-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.revenue-capita-legend span,
.metric-trend-legend span {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(239, 245, 251, 0.9);
}

.revenue-capita-rows,
.metric-trend-rows {
  display: grid;
  gap: 7px;
}

.revenue-capita-rows div,
.metric-trend-rows div {
  display: grid;
  grid-template-columns: 36px minmax(70px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(226, 233, 240, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.revenue-capita-rows span,
.metric-trend-rows span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.revenue-capita-rows strong,
.metric-trend-rows strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.revenue-capita-rows em,
.metric-trend-rows em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roi-platform-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.roi-platform-row {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.roi-platform-row.low {
  border-color: rgba(194, 65, 53, 0.36);
  background: rgba(194, 65, 53, 0.06);
}

.roi-platform-row > div:first-child {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.roi-platform-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roi-platform-row i {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--channel-color);
}

.roi-platform-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.roi-platform-row.low strong,
.roi-platform-row.low p {
  color: #c24135;
}

.roi-platform-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 235, 245, 0.86);
}

.roi-platform-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.78), var(--channel-color));
}

.roi-platform-row.low .roi-platform-track b {
  background: linear-gradient(90deg, #e7b46a, #c24135);
}

.roi-platform-row p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.mini-metric {
  min-height: 68px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
}

.mini-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.promotion-section,
.staff-section {
  margin-top: 14px;
  padding: 16px;
  min-width: 0;
  overflow: visible;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 253, 0.96)),
    #fff;
}

.promotion-summary,
.staff-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.promotion-summary h3,
.staff-summary h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.promotion-summary p,
.staff-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.promotion-summary strong,
.staff-summary strong {
  color: var(--text);
  font-size: 18px;
}

.promotion-headline {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
}

.staff-headline {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
}

.promotion-headline span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2f5f99;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.staff-headline span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(231, 180, 94, 0.14);
  color: #9b6b1f;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.promotion-content,
.staff-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.promotion-donut-wrap,
.staff-donut-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.promotion-channels,
.staff-roles {
  max-width: 100%;
}

.promotion-donut,
.staff-donut {
  position: relative;
  width: 148px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#2563eb 0 var(--full), #e7b46a var(--full) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(24, 33, 47, 0.05),
    0 18px 34px rgba(24, 33, 47, 0.12);
}

.staff-donut {
  width: 148px;
}

.staff-donut::before {
  position: absolute;
  inset: 11px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  pointer-events: none;
}

.donut-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)));
  min-width: 36px;
  padding: 2px 6px;
  border: 1px solid rgba(221, 227, 234, 0.96);
  border-left: 3px solid var(--label-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(24, 33, 47, 0.10);
  pointer-events: none;
}

.promo-donut-label {
  display: grid;
  gap: 1px;
  min-width: 52px;
  padding: 3px 7px;
}

.promo-donut-label b,
.promo-donut-label em {
  display: block;
  font-style: normal;
  line-height: 1.15;
}

.promo-donut-label em {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.staff-donut-label {
  display: grid;
  gap: 1px;
  min-width: 50px;
  padding: 3px 7px;
}

.staff-donut-label b,
.staff-donut-label em {
  display: block;
  font-style: normal;
  line-height: 1.15;
}

.staff-donut-label em {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promotion-donut::after,
.staff-donut::after {
  position: absolute;
  z-index: 1;
  inset: 34px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(221, 227, 234, 0.9);
}

.staff-donut::after {
  inset: 34px;
}

.staff-donut-center {
  position: absolute;
  z-index: 3;
  inset: 45px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.staff-donut-center span {
  font-size: 9px;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.staff-donut-center strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 820;
  line-height: 1;
}

.promotion-donut-center {
  position: absolute;
  z-index: 3;
  inset: 45px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.promotion-donut-center span {
  font-size: 9px;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.promotion-donut-center strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 820;
  line-height: 1.05;
}

.promotion-channels {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.promo-channel-row {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.promo-channel-main {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(190px, auto);
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.promo-channel-main span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.promo-channel-main i {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--channel-color);
}

.promo-channel-main strong {
  color: var(--text);
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
  overflow: visible;
}

.promo-channel-track {
  height: 8px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 235, 245, 0.86);
}

.promo-channel-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.78), var(--channel-color));
}

.promo-channel-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.promo-channel-metrics span {
  min-width: 0;
  padding: 5px 6px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(239, 245, 251, 0.82);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-channel-metrics b {
  color: var(--text);
  font-weight: 820;
}

.staff-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  max-width: 100%;
}

.staff-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 720;
  white-space: nowrap;
}

.staff-legend b {
  color: var(--text);
}

.staff-legend i,
.staff-role-title i {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--role-color);
}

.staff-contract-pill {
  color: var(--muted);
}

.staff-roles {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.staff-role-row {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 233, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.staff-role-title {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(112px, auto);
  gap: 10px;
  align-items: center;
}

.staff-role-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-role-title strong {
  color: var(--text);
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
  overflow: visible;
}

.staff-stack {
  display: flex;
  height: 8px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 235, 245, 0.86);
}

.staff-stack i {
  display: block;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.72), var(--role-color));
}

.staff-role-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.staff-role-metrics span {
  min-width: 0;
  padding: 5px 6px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(239, 245, 251, 0.82);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-role-metrics b {
  color: var(--text);
  font-weight: 820;
}

.pos {
  color: var(--green);
}

.neg {
  color: var(--red);
}

.note-input {
  width: min(260px, 26vw);
  height: 38px;
  min-height: 38px;
  max-height: 160px;
  padding: 7px 8px;
  resize: none;
  overflow-y: hidden;
  line-height: 22px;
  white-space: pre-wrap;
}

.empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .login-view {
    padding: 28px;
  }

  .login-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .login-copy {
    justify-content: center;
    padding-left: 0;
  }

  .login-card {
    width: min(560px, 100%);
    min-height: auto;
    justify-self: center;
    padding: 42px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    min-height: 180px;
    padding: 22px 18px 42px;
    background-position: center right, right top, center;
  }

  .brand-title {
    gap: 12px;
  }

  .brand-logo {
    width: 136px;
  }

  .toolbar {
    justify-content: flex-start;
    width: calc(100% - 36px);
    margin-top: 14px;
    padding: 12px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .compare-indicator-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .layout.compare-mode #detailPanel,
  .layout.compare-mode #keyIndicatorPanel {
    grid-column: 1;
  }

  .compare-kpis {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }

  .compare-kpis div {
    padding: 8px;
  }

  .compare-kpis strong {
    font-size: 14px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px;
    font-size: 11px;
  }

  .indicator-headlines,
  .indicator-grid,
  .promotion-content,
  .staff-content,
  .promotion-roi-body,
  .staff-structure-detail .staff-content {
    grid-template-columns: 1fr;
  }

  .national-indicator-grid {
    gap: 12px;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, rgba(247, 250, 252, 0.92), rgba(240, 245, 249, 0.98)),
      url("assets/web-design/decorations/noise.svg?v=20260621163829") repeat,
      var(--bg);
  }

  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  main {
    padding-right: 0;
    padding-left: 0;
  }

  main > :not(.page-loading) {
    width: calc(100% - 28px);
  }

  .topbar {
    min-height: 206px;
    background:
      linear-gradient(90deg, rgba(7, 20, 32, 0.96), rgba(11, 61, 70, 0.84)),
      url("assets/web-design/decorations/data-wave.svg?v=20260621163829") right 18px center / 86% auto no-repeat,
      url("assets/web-design/backgrounds/login-bg-mobile.png?v=20260621163829") center / cover no-repeat;
  }

  .login-view {
    padding: 18px;
    background:
      radial-gradient(circle at 70% 20%, rgba(255, 118, 24, 0.18), transparent 32%),
      linear-gradient(180deg, rgba(4, 10, 18, 0.92), rgba(3, 8, 14, 0.96)),
      url("assets/web-design/decorations/data-grid.svg?v=20260621163829") center bottom / 130% auto no-repeat,
      url("assets/web-design/backgrounds/login-bg-mobile.png?v=20260621163829") center / cover no-repeat,
      #050b13;
  }

  .login-copy {
    display: none;
  }

  .login-card {
    padding: 34px 22px;
  }

  .login-card h2 {
    font-size: 28px;
    letter-spacing: 4px;
  }

  .login-field input,
  .login-submit {
    height: 54px;
  }

  .login-submit {
    font-size: 22px;
    letter-spacing: 8px;
  }

  .topbar-actions {
    top: 18px;
    right: 14px;
  }

  .version-info {
    display: none;
  }

  .toolbar {
    width: calc(100% - 28px);
  }

  .venue-summary {
    grid-template-columns: 1fr;
  }

  .revenue-capita-rows div {
    grid-template-columns: 34px minmax(68px, auto);
  }

  .metric-trend-rows div {
    grid-template-columns: 34px minmax(68px, auto);
  }

  .revenue-capita-rows em,
  .metric-trend-rows em {
    grid-column: 1 / -1;
    text-align: left;
  }

  .topbar > div:first-child {
    min-height: 68px;
    align-items: flex-start;
  }

  .brand-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: 132px;
    max-width: 64vw;
  }

  .brand-divider {
    display: none;
  }

  .brand-title h1 {
    font-size: 24px;
  }

  #periodText {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .national-indicator-grid {
    grid-template-columns: 1fr;
  }
}
