:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.65);
  --border: rgba(15, 23, 42, 0.10);

  --primary: #2563eb;
  --success: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #a855f7;

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 25% 0%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(168, 85, 247, 0.10), transparent 60%),
    var(--bg);
}

.shell {
  height: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.shell.shell--collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 12px;
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brandText {
  font-size: 13px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell.shell--collapsed .brandText {
  display: none;
}

.iconBtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.iconBtn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.iconBtn:active {
  transform: translateY(1px);
}

.iconBtn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: rgba(15, 23, 42, 0.78);
}

.sidebar__nav {
  display: grid;
  gap: 8px;
}

.sideItem {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sideItem:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--border);
}

.sideItem--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.20);
}

.sideItem__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sideItem--active .sideItem__icon {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.18);
}

.sideItem__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  color: rgba(15, 23, 42, 0.78);
}

.sideItem--active .sideItem__icon svg {
  color: rgba(37, 99, 235, 1);
}

.sideItem__text {
  font-size: 13px;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.85);
  white-space: nowrap;
}

.shell.shell--collapsed .sideItem {
  grid-template-columns: 28px;
  justify-content: center;
}

.shell.shell--collapsed .sideItem__text {
  display: none;
}

.sidebar__bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.sideMeta {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell.shell--collapsed .sideMeta {
  display: none;
}

.content {
  overflow: auto;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.workspace {
  margin-top: 16px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.headerTitleRow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.miniBadges--title {
  gap: 6px;
}

.miniBadges--title .miniBadge {
  height: 24px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 750;
}

.miniBadges--title .miniBadge__dot {
  width: 7px;
  height: 7px;
}

.header__nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}

.navBtn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  white-space: nowrap;
}

.navBtn--active {
  background: rgba(37, 99, 235, 0.12);
  color: rgba(37, 99, 235, 1);
}

.navBtn:active {
  transform: translateY(1px);
}

.h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actionsGroup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.homeGrid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.homeCol {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.homeSpan {
  grid-column: 1 / -1;
}

.kpiGrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kpiTile {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.kpiTile__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.kpiTile__label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpiTile__meta {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  white-space: nowrap;
}

.kpiTile__valueRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.kpiTile__value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.kpiTile__sub {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(34, 197, 94, 0.95));
}

.bar__fill.isBad {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.92), rgba(245, 158, 11, 0.92));
}

.miniBadges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.miniBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 750;
  color: rgba(15, 23, 42, 0.78);
  white-space: nowrap;
}

.miniBadge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 1);
}

.miniBadge.isOk .miniBadge__dot { background: rgba(34, 197, 94, 1); }
.miniBadge.isWarn .miniBadge__dot { background: rgba(245, 158, 11, 1); }
.miniBadge.isBad .miniBadge__dot { background: rgba(239, 68, 68, 1); }

.dataSources {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dataSource {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.dataSource[data-drop] {
  outline: none;
}

.dataSource[data-drop].isDragOver {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.dataSource__left {
  min-width: 0;
}

.dataSource__title {
  font-size: 14px;
  font-weight: 850;
}

.dataSource__meta {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.dataSource__titleRow {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.dataSource__hintInline {
  font-size: 11px;
  color: rgba(15, 23, 42, 0.60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 560px;
}

.dataSource__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.homeActions {
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scheduleBar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sheetTabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sheetTab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.78);
  white-space: nowrap;
}

.sheetTab--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.20);
  color: rgba(37, 99, 235, 1);
}

.scheduleBar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.04s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(37, 99, 235, 0.86));
  border-color: rgba(37, 99, 235, 0.35);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn--secondary:hover:not(:disabled),
.btn--ghost:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.04);
}

.file {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.25);
  background: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.file input {
  display: none;
}

.panel {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panelHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panelTitle {
  font-size: 16px;
  font-weight: 850;
}

.panelHint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  text-align: right;
  max-width: 760px;
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.25);
}

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

.status__right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.goal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.60);
  font-size: 12px;
  color: rgba(15, 23, 42, 0.75);
  white-space: nowrap;
}

.goal__input {
  width: 72px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.85);
  outline: none;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.goal__input:focus {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.60);
  font-size: 12px;
  color: rgba(15, 23, 42, 0.75);
  white-space: nowrap;
}

.filters {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.60);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.80);
}

.tab--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.30);
  color: rgba(37, 99, 235, 1);
}

.filters__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.60);
}

.seg__btn {
  height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  color: rgba(15, 23, 42, 0.70);
}

.seg__btn--active {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.92);
}

.input {
  height: 34px;
  width: 240px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.60);
  outline: none;
  font-size: 13px;
}

.input:focus {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.cards--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#rtViolationCards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card {
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  cursor: default;
  transition: transform 0.04s ease, box-shadow 0.12s ease, background 0.12s ease;
}

button.card,
.card.card--clickable {
  cursor: pointer;
}

button.card:hover,
.card.card--clickable:hover {
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

button.card:active,
.card.card--clickable:active {
  transform: translateY(1px);
}

.card__label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 700;
}

.card__value--pair {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.card__sep {
  opacity: 0.55;
}

.metricMuted {
  color: rgba(15, 23, 42, 0.55);
}

.metricVal.isGood { color: rgba(21, 128, 61, 1); }
.metricVal.isWarn { color: rgba(146, 64, 14, 1); }
.metricVal.isBad { color: rgba(185, 28, 28, 1); }

.card__pct { display: none; }

.card__value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.card--danger { border-color: rgba(239, 68, 68, 0.28); background: rgba(239, 68, 68, 0.07); }
.card--warn { border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.07); }
.card--info { border-color: rgba(168, 85, 247, 0.28); background: rgba(168, 85, 247, 0.07); }
.card--success { border-color: rgba(22, 163, 74, 0.28); background: rgba(22, 163, 74, 0.07); }
.card--muted { border-color: rgba(15, 23, 42, 0.18); background: rgba(15, 23, 42, 0.04); }

#rtViolationCards .card:nth-child(-n + 6) {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.07);
}

#rtViolationCards .card:nth-child(n + 7) {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.07);
}

.main {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.section {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.section__head {
  padding: 14px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

summary.section__head {
  cursor: pointer;
  list-style: none;
}

summary.section__head::-webkit-details-marker { display: none; }

.section__title {
  font-size: 16px;
  font-weight: 850;
}

.section__titleRow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.section__hint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  max-width: 760px;
  text-align: right;
}

.section--danger .section__head { background: rgba(239, 68, 68, 0.06); }
.section--warn .section__head { background: rgba(245, 158, 11, 0.06); }
.section--info .section__head { background: rgba(168, 85, 247, 0.06); }

.tableWrap {
  overflow: auto;
  max-height: 440px;
}

.tableWrap--tall {
  max-height: 640px;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.table--compact {
  min-width: 0;
  table-layout: fixed;
}

.table--compact th,
.table--compact td {
  padding: 6px 8px;
  font-size: 12px;
}

.table--compact td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.table--compact .colType {
  width: 92px;
  text-align: center;
}

.table--compact .colTimeWide {
  width: 420px;
}

.table--compact .tag {
  padding: 2px 8px;
  font-size: 11px;
}

#tblRiders {
  min-width: 1320px;
  table-layout: auto;
}

#tblRiders th,
#tblRiders td {
  white-space: nowrap;
}

.table thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  z-index: 1;
  border-bottom: 1px solid var(--border);
}

.table th {
  text-align: left;
  font-weight: 850;
  white-space: nowrap;
}

.table th, .table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(15, 23, 42, 0.03);
}

.table .colHandled { width: 72px; text-align: center; }
.table .colMins { width: 96px; text-align: center; }
.table .colOnline { width: 92px; text-align: center; }
.table .colType { width: 96px; text-align: center; }
.table .colOrders { width: 128px; text-align: center; }

.table input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--border);
}

.tag--danger { background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.25); color: rgba(185, 28, 28, 1); }
.tag--warn { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.25); color: rgba(146, 64, 14, 1); }
.tag--info { background: rgba(168, 85, 247, 0.10); border-color: rgba(168, 85, 247, 0.25); color: rgba(107, 33, 168, 1); }
.tag--success { background: rgba(22, 163, 74, 0.10); border-color: rgba(22, 163, 74, 0.25); color: rgba(21, 128, 61, 1); }
.tag--muted { background: rgba(15, 23, 42, 0.06); border-color: rgba(15, 23, 42, 0.15); color: rgba(15, 23, 42, 0.78); }

.rowHandled {
  opacity: 0.62;
}

.rowImportant {
  background: rgba(239, 68, 68, 0.08);
}

.lateGroup {
  padding: 10px 12px 14px;
}

.lateGroup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 10px;
}

.lateGroup__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}

.lateGroup__summary::-webkit-details-marker { display: none; }

.lateGroup__title {
  font-size: 14px;
  font-weight: 850;
}

.lateGroup__titleRow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sortBtn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  color: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.sortBtn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.sortBtn:active {
  transform: translateY(1px);
}

.copyBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  color: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.copyBtn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.copyBtn:active {
  transform: translateY(1px);
}

.copyBtn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.9;
}

.copyBtn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.lateGroup__meta {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.70);
  font-weight: 750;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot--danger { background: var(--danger); }
.dot--warn { background: var(--warn); }
.dot--info { background: var(--info); }
.dot--success { background: var(--success); }

@media (max-width: 1200px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .input { width: 200px; }
  .homeGrid { grid-template-columns: 1fr; }
  .kpiGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app { padding: 16px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input { width: 100%; }
  .dataSource__meta { max-width: 280px; }
  .dataSource__hintInline { max-width: 240px; }
  .kpiGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { grid-template-columns: 220px 1fr; }
  .shell.shell--collapsed { grid-template-columns: 76px 1fr; }
}
