.btn {
  display: inline-flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  color: #526278;
  font-size: 10px;
  font-weight: 620;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 2px 7px rgb(26 45 78 / 3%);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #3885fa);
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgb(35 104 245 / 18%);
}

.btn.success {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #16a38a);
  border-color: #10b981;
}

.btn.ghost {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #cfe0ff;
  box-shadow: none;
}

.btn.danger {
  color: #df3b4a;
  background: #fff5f6;
  border-color: #ffd5d9;
  box-shadow: none;
}

.btn.small {
  height: 27px;
  padding: 0 9px;
  font-size: 9px;
  border-radius: 6px;
}

.ui-icon {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.kpi-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-card {
  position: relative;
  min-width: 0;
  min-height: 100px;
  padding: 15px 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.kpi-card::after {
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 88px;
  height: 88px;
  content: "";
  background: radial-gradient(circle, var(--kpi-glow, rgb(35 104 245 / 12%)), transparent 67%);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.kpi-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--kpi-color, var(--primary));
  background: color-mix(in srgb, var(--kpi-color, var(--primary)) 9%, white);
  border-radius: 8px;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
}

.kpi-value strong {
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.kpi-value small {
  color: var(--muted);
  font-size: 9px;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--soft);
  font-size: 8px;
}

.trend-up {
  color: var(--green);
}

.trend-down {
  color: var(--red);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-grid.equal {
  grid-template-columns: 1fr 1fr;
}

.panel-grid.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid #edf1f5;
}

.panel-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.panel-head h3::before {
  width: 3px;
  height: 13px;
  content: "";
  background: linear-gradient(180deg, var(--primary), var(--cyan));
  border-radius: 4px;
}

.panel-head span,
.panel-head a {
  color: var(--muted);
  font-size: 9px;
}

.panel-body {
  padding: 15px 16px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  margin-bottom: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 5px 16px rgb(26 45 78 / 4%);
}

.filter-input,
.filter-select {
  height: 32px;
  padding: 0 10px;
  color: #526278;
  font-size: 9px;
  background: #fafbfd;
  border: 1px solid #dfe5ed;
  border-radius: 7px;
  outline: 0;
}

.filter-input {
  width: 190px;
}

.filter-select {
  min-width: 118px;
}

.filter-spacer {
  flex: 1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 10px 10px;
  overflow: hidden;
  font-size: 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #edf1f5;
}

.data-table th {
  color: #7b899d;
  font-weight: 650;
  background: #f8fafc;
}

.data-table td {
  color: #405069;
}

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

.data-table tr:hover td {
  background: #fbfdff;
}

.cell-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.device-mark,
.source-mark,
.user-mark {
  display: grid;
  width: 29px;
  height: 29px;
  flex: none;
  place-items: center;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  background: var(--primary-soft);
  border-radius: 8px;
}

.cell-copy {
  min-width: 0;
}

.cell-copy b,
.cell-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-copy b {
  color: #25344d;
  font-size: 9px;
}

.cell-copy small {
  margin-top: 3px;
  color: #98a4b5;
  font-size: 7px;
}

.badge {
  display: inline-flex;
  height: 21px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  color: #607088;
  font-size: 8px;
  font-weight: 650;
  background: #f2f5f8;
  border: 1px solid #e5eaf0;
  border-radius: 10px;
}

.badge::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentcolor;
  border-radius: 50%;
}

.badge.green {
  color: #0e9f6e;
  background: #ecfdf5;
  border-color: #c9f2df;
}

.badge.blue {
  color: #2f6fea;
  background: #eff5ff;
  border-color: #d6e4ff;
}

.badge.amber {
  color: #d5870b;
  background: #fff8e7;
  border-color: #f7e2b2;
}

.badge.red {
  color: #df4351;
  background: #fff2f3;
  border-color: #ffd4d8;
}

.badge.gray {
  color: #7e8999;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions a {
  color: var(--primary);
  font-size: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 8px;
  border-top: 1px solid #edf1f5;
}

.page-number {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #718096;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.page-number.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 190px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 190px;
}

.chart-grid line {
  stroke: #edf1f6;
  stroke-width: 1;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 3px;
  margin-top: -3px;
  color: #9aa6b5;
  font-size: 7px;
}

.chart-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #7d8a9e;
  font-size: 8px;
}

.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  background: var(--dot);
  border-radius: 50%;
}

.donut-wrap {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.donut {
  display: grid;
  position: relative;
  width: 138px;
  height: 138px;
  flex: none;
  place-items: center;
  background: var(--donut);
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  width: 82px;
  height: 82px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong,
.donut-center small {
  display: block;
}

.donut-center strong {
  font-family: Bahnschrift, sans-serif;
  font-size: 21px;
}

.donut-center small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
