:root {
  --bg-a: #020b1a;
  --bg-b: #051428;
  --bg-c: #0a1f3d;
  --panel-bg: linear-gradient(135deg, rgba(8, 28, 54, 0.95), rgba(5, 18, 36, 0.92));
  --panel-border: rgba(88, 166, 255, 0.18);
  --text-main: #f0f7ff;
  --text-muted: #8ba5c7;
  --accent-a: #3b9eff;
  --accent-b: #00e5a0;
  --accent-c: #ffb84d;
  --accent-d: #ff6b9d;
  --danger: #ff5370;
  --warning: #ffc107;
  --success: #00e676;
  --kpi-number-size: 32px;
  --glow-primary: 0 0 20px rgba(59, 158, 255, 0.3), 0 0 40px rgba(59, 158, 255, 0.15);
  --glow-success: 0 0 20px rgba(0, 229, 160, 0.3), 0 0 40px rgba(0, 229, 160, 0.15);
  --glow-warning: 0 0 20px rgba(255, 184, 77, 0.3), 0 0 40px rgba(255, 184, 77, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(ellipse at 15% 20%, rgba(59, 158, 255, 0.15), transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(0, 229, 160, 0.12), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 107, 157, 0.08), transparent 60%),
    linear-gradient(165deg, var(--bg-a) 0%, var(--bg-b) 45%, var(--bg-c) 100%);
  overflow-x: hidden;
  position: relative;
}

body {
  position: relative;
}

.screen-bg-orb {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.6;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-a {
  width: 400px;
  height: 400px;
  left: -150px;
  bottom: -100px;
  background: radial-gradient(circle, rgba(59, 158, 255, 0.4), transparent 70%);
  animation-delay: 0s;
}

.orb-b {
  width: 350px;
  height: 350px;
  right: -100px;
  top: -50px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.35), transparent 70%);
  animation-delay: 10s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -20px) scale(1.05); }
  50% { transform: translate(-15px, 15px) scale(0.95); }
  75% { transform: translate(15px, 20px) scale(1.02); }
}

.dashboard {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.panel {
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(59, 158, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 158, 255, 0.3), transparent);
  opacity: 0.5;
}

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

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #fff 0%, #3b9eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 158, 255, 0.3);
  filter: drop-shadow(0 2px 8px rgba(59, 158, 255, 0.2));
}

.brand-sub {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(59, 158, 255, 0.2);
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.8), rgba(5, 18, 36, 0.6));
  padding: 6px 12px;
  font-size: 12px;
  color: #b8d4f1;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(59, 158, 255, 0.25);
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.8), rgba(5, 18, 36, 0.6));
  color: #e0f0ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.icon-btn:hover {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.2), rgba(8, 28, 54, 0.8));
  border-color: rgba(59, 158, 255, 0.5);
  box-shadow: 0 0 20px rgba(59, 158, 255, 0.3);
  transform: translateY(-2px);
}

.icon-btn:hover svg {
  transform: scale(1.1);
}

.icon-btn:active {
  transform: translateY(0) scale(0.95);
}

.btn {
  border: 1px solid rgba(146, 198, 255, 0.3);
  background: rgba(23, 73, 136, 0.54);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 12px;
  padding: 7px 11px;
  cursor: pointer;
}

.btn:hover {
  background: rgba(33, 97, 177, 0.64);
}

.btn.primary {
  background: linear-gradient(145deg, rgba(68, 164, 255, 0.84), rgba(64, 114, 255, 0.82));
}

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

.kpi-item {
  border-radius: 16px;
  border: 1px solid rgba(59, 158, 255, 0.2);
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.95), rgba(5, 18, 36, 0.9));
  padding: 16px 14px 18px;
  overflow: hidden;
  position: relative;
  animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  min-height: 144px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.kpi-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-a), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(59, 158, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(59, 158, 255, 0.4);
}

.kpi-item:hover::before {
  opacity: 1;
}

.kpi-item.vehicle-status-card {
  min-height: 144px;
}

.kpi-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}

.kpi-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(85%) sepia(22%) saturate(458%) hue-rotate(170deg) brightness(104%) contrast(98%);
}

.kpi-label {
  font-size: 12px;
  color: rgba(184, 212, 241, 0.9);
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 10px;
  font-size: var(--kpi-number-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-a) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(59, 158, 255, 0.3));
}

.kpi-note {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(139, 165, 199, 0.8);
  font-weight: 500;
}

.vehicle-status-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr) minmax(0, 0.9fr);
  gap: 10px;
  align-items: center;
}

.vehicle-status-column {
  min-width: 0;
}

.vehicle-status-column-main {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.vehicle-status-column-shifts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.vehicle-status-shift-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-status-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.vehicle-status-column-main .vehicle-status-metric {
  min-height: 82px;
  width: 100%;
}

.vehicle-status-name {
  font-size: 11px;
  color: rgba(195, 220, 248, 0.82);
  line-height: 1.2;
  text-align: center;
}

.vehicle-status-value {
  font-size: var(--kpi-number-size);
  line-height: 1;
  font-weight: 800;
  color: #fff;
  text-align: center;
  filter: drop-shadow(0 4px 12px rgba(59, 158, 255, 0.3));
}

.vehicle-status-metric.state-working .vehicle-status-name,
.vehicle-status-metric.state-working .vehicle-status-value {
  color: var(--accent-a);
  filter: drop-shadow(0 0 8px rgba(59, 158, 255, 0.4));
}

.vehicle-status-metric.state-idle .vehicle-status-name,
.vehicle-status-metric.state-idle .vehicle-status-value {
  color: var(--accent-b);
  filter: drop-shadow(0 0 8px rgba(0, 229, 160, 0.4));
}

.vehicle-status-metric.state-maintenance .vehicle-status-name,
.vehicle-status-metric.state-maintenance .vehicle-status-value {
  color: var(--danger);
  filter: drop-shadow(0 0 8px rgba(255, 83, 112, 0.4));
}

.tire-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

.tire-category-grid .vehicle-status-metric {
  min-height: 82px;
}

.kpi-item.accent-a .kpi-value {
  background: linear-gradient(135deg, #fff 0%, var(--accent-a) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(59, 158, 255, 0.4));
}
.kpi-item.accent-b .kpi-value {
  background: linear-gradient(135deg, #fff 0%, var(--accent-b) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(0, 229, 160, 0.4));
}
.kpi-item.accent-c .kpi-value {
  background: linear-gradient(135deg, #fff 0%, var(--accent-c) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(255, 184, 77, 0.4));
}
.kpi-item.accent-d .kpi-value {
  background: linear-gradient(135deg, #fff 0%, var(--accent-d) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.4));
}

.grid-layout {
  display: grid;
  grid-template-areas: "left center right";
  grid-template-columns: minmax(290px, 0.96fr) minmax(620px, 1.42fr) minmax(290px, 0.96fr);
  gap: 8px;
  align-items: stretch;
}

.col {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  min-height: 0;
}

.left-col {
  grid-area: left;
}

.center-col {
  grid-area: center;
}

.right-col {
  grid-area: right;
}

.chart-panel {
  padding: 10px 10px 12px;
  overflow: hidden;
}

.repair-broadcast-panel {
  min-height: 100%;
}

.panel-head {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e8f4ff;
  margin-bottom: 12px;
  text-transform: uppercase;
  position: relative;
  padding-left: 12px;
}

.panel-head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 158, 255, 0.5);
}

.panel-head.sub {
  margin-bottom: 6px;
  font-size: 12px;
}

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

.svg-chart.compact {
  height: 180px;
}

.axis-text {
  fill: var(--text-muted);
  font-size: 11px;
}

.grid-line {
  stroke: rgba(183, 214, 255, 0.2);
  stroke-width: 1;
}

.series-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.series-dot {
  r: 3;
}

.production-bar {
  fill: rgba(84, 196, 255, 0.7);
  transform-origin: bottom;
  animation: barGrow 0.8s ease both;
}

.production-target {
  stroke: var(--accent-c);
}

.donut-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: center;
}

.donut-wrap.small {
  grid-template-columns: 140px 1fr;
}

.donut {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(#1a3a5c 0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(59, 158, 255, 0.2),
    0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.donut:hover {
  transform: scale(1.05);
}

.donut.small {
  width: 130px;
  height: 130px;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 11, 26, 0.98), rgba(5, 20, 40, 0.95));
  box-shadow:
    inset 0 0 0 1px rgba(59, 158, 255, 0.15),
    inset 0 4px 12px rgba(0, 0, 0, 0.5);
}

.donut.small::after {
  inset: 12px;
}

.donut-inner {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-label {
  font-size: 11px;
  color: var(--text-muted);
}

.donut-value {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent-a) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(59, 158, 255, 0.3));
}

.donut.small .donut-value {
  font-size: 21px;
}

.legend-list {
  display: grid;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #d9e8ff;
}

.legend-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.legend-value {
  font-weight: 700;
}

.equipment-overview {
  display: grid;
  gap: 8px;
}

.equipment-overview-row {
  border-radius: 12px;
  border: 1px solid rgba(59, 158, 255, 0.2);
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.85), rgba(5, 18, 36, 0.8));
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.equipment-overview-row:hover {
  border-color: rgba(59, 158, 255, 0.35);
  transform: translateX(4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

.equipment-overview-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0f7ff;
  letter-spacing: 0.3px;
}

.equipment-overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.equipment-overview-metric strong {
  color: #fff;
  font-weight: 800;
  margin-left: 4px;
}

.rank-list {
  display: grid;
  gap: 7px;
}

.rank-list.compact {
  gap: 5px;
}

.rank-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.rank-index {
  color: var(--text-muted);
  min-width: 20px;
}

.rank-bar-wrap {
  height: 16px;
  border-radius: 999px;
  background: rgba(59, 158, 255, 0.08);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.rank-bar {
  height: 100%;
  border-radius: 999px;
  width: var(--w, 0%);
  background: linear-gradient(90deg, rgba(59, 158, 255, 0.9), rgba(0, 229, 160, 0.85));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(59, 158, 255, 0.4);
  position: relative;
}

.rank-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 999px 999px 0 0;
}

.rank-label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.rank-value {
  color: #e8f2ff;
  font-weight: 700;
  min-width: 64px;
  text-align: right;
}

.repair-broadcast-wrap {
  position: relative;
  height: calc(100vh - 210px);
  min-height: 560px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(59, 158, 255, 0.2);
  background: linear-gradient(180deg, rgba(8, 28, 54, 0.6), rgba(2, 11, 26, 0.8));
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.repair-broadcast-list {
  display: grid;
  gap: 12px;
}

.repair-broadcast-list.is-animated {
  animation: broadcastScroll 32s linear infinite;
}

.repair-broadcast-item {
  border-radius: 14px;
  border: 1px solid rgba(59, 158, 255, 0.25);
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.9), rgba(5, 18, 36, 0.85));
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.repair-broadcast-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.repair-broadcast-item:hover {
  border-color: rgba(59, 158, 255, 0.4);
  transform: translateX(4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(59, 158, 255, 0.15);
}

.repair-broadcast-item:hover::before {
  opacity: 1;
}

.repair-broadcast-top,
.repair-broadcast-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.repair-broadcast-vehicle {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent-a) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(59, 158, 255, 0.3));
}

.repair-broadcast-status {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 158, 255, 0.3);
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.15), rgba(0, 229, 160, 0.1));
  color: #6dd4ff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 158, 255, 0.2);
}

.repair-broadcast-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #e0f0ff;
  min-height: 48px;
  font-weight: 400;
}

.repair-broadcast-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.is-hidden {
  display: none !important;
}

.status-panel,
.overview-panel,
.part-panel,
.fault-panel,
.tire-model-panel {
  min-height: 0;
}

.status-panel {
  min-height: 228px;
}

.overview-panel,
.fault-panel,
.tire-model-panel {
  min-height: 210px;
}

.part-panel {
  min-height: 292px;
}

.ops-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ops-card {
  border-radius: 10px;
  border: 1px solid rgba(138, 189, 255, 0.2);
  background: rgba(9, 36, 69, 0.62);
  padding: 9px;
  display: grid;
  gap: 8px;
}

.ops-title {
  font-size: 12px;
  color: var(--text-muted);
}

.ops-metric-list {
  display: grid;
  gap: 6px;
}

.ops-metric-item {
  border-radius: 8px;
  border: 1px solid rgba(137, 182, 245, 0.2);
  background: rgba(10, 39, 75, 0.76);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.ops-metric-label {
  color: var(--text-muted);
}

.ops-metric-value {
  color: #eaf3ff;
  font-weight: 700;
}

.ops-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-c);
  line-height: 1;
}

.ops-note {
  font-size: 11px;
  color: var(--text-muted);
}

.ops-trend-list {
  display: grid;
  gap: 4px;
}

.ops-trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.ops-trend-label {
  color: var(--text-muted);
}

.ops-trend-value {
  color: #dcedff;
  font-weight: 700;
}

.module-flow {
  display: grid;
  gap: 8px;
}

.module-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.module-name {
  color: #dbeaff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  line-height: 1.2;
}

.module-bar {
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(121, 173, 235, 0.16);
  display: flex;
}

.module-seg {
  height: 100%;
  width: 0;
  transition: width 0.45s ease;
}

.module-seg.pending { background: var(--warning); }
.module-seg.processing { background: var(--accent-a); }
.module-seg.completed { background: var(--accent-b); }
.module-seg.rejected { background: var(--danger); }

.module-total {
  text-align: right;
  color: #d7e8ff;
  font-weight: 700;
}

.two-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.two-split > * {
  min-width: 0;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(147, 195, 255, 0.2);
  background: rgba(9, 35, 67, 0.7);
}

.ticker-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 12px;
  color: #d8ebff;
  animation: tickerMove 18s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-c);
}

.alert-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.alert-item {
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid rgba(147, 191, 253, 0.2);
  background: rgba(11, 41, 77, 0.75);
  padding: 8px 9px;
  display: grid;
  gap: 4px;
}

.alert-item.critical {
  border-color: rgba(255, 125, 147, 0.5);
  background: rgba(89, 20, 38, 0.5);
}

.alert-item.warning {
  border-color: rgba(255, 205, 106, 0.45);
}

.alert-title {
  font-weight: 700;
}

.alert-detail {
  color: #d1e4ff;
}

.alert-time {
  color: var(--text-muted);
  font-size: 11px;
}

.alert-list::-webkit-scrollbar {
  width: 6px;
}

.alert-list::-webkit-scrollbar-thumb {
  background: rgba(150, 191, 255, 0.45);
  border-radius: 999px;
}

.warning-table-wrap {
  max-height: 220px;
  overflow: auto;
}

.warning-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.warning-table th,
.warning-table td {
  text-align: left;
  padding: 6px 6px;
  border-bottom: 1px solid rgba(132, 176, 235, 0.16);
}

.warning-table th {
  color: var(--text-muted);
  position: sticky;
  top: 0;
  background: rgba(13, 43, 80, 0.95);
}

.status-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(146, 188, 255, 0.2);
  background: rgba(16, 52, 98, 0.8);
}

.status-badge.danger {
  border-color: rgba(255, 133, 154, 0.55);
  color: #ffd7df;
  background: rgba(96, 25, 44, 0.56);
}

.config-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(2, 10, 18, 0.72);
  display: grid;
  place-items: center;
}

.config-modal.hidden {
  display: none;
}

.config-panel {
  width: min(620px, calc(100vw - 32px));
  padding: 14px;
  display: grid;
  gap: 10px;
}

.config-title {
  font-size: 18px;
  font-weight: 700;
}

.config-item {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.config-item input {
  border-radius: 8px;
  border: 1px solid rgba(132, 180, 244, 0.32);
  background: rgba(11, 38, 72, 0.85);
  color: var(--text-main);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
}

.config-item input:focus {
  border-color: rgba(101, 183, 255, 0.76);
  box-shadow: 0 0 0 2px rgba(95, 179, 255, 0.2);
}

.config-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(132, 180, 244, 0.32);
  background: rgba(11, 38, 72, 0.85);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
}

.config-radio input {
  margin: 0;
}

.config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.empty-state {
  border-radius: 12px;
  border: 1px dashed rgba(59, 158, 255, 0.25);
  padding: 16px;
  font-size: 13px;
  color: rgba(139, 165, 199, 0.8);
  text-align: center;
  background: rgba(8, 28, 54, 0.3);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes tickerMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes broadcastScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(calc(-50% - 6px));
  }
}

@media (max-width: 1480px) {
  .dashboard {
    padding: 10px;
    gap: 8px;
  }

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

  .kpi-value {
    font-size: 24px;
  }

  .kpi-item {
    min-height: 126px;
    padding: 10px 10px 12px;
  }

  .grid-layout {
    grid-template-columns: minmax(250px, 0.95fr) minmax(0, 1.26fr) minmax(250px, 0.95fr);
    gap: 8px;
  }

  .col {
    gap: 8px;
  }

  .chart-panel {
    padding: 8px 8px 10px;
  }

  .panel-head {
    margin-bottom: 6px;
  }

  .svg-chart {
    height: 188px;
  }

  .svg-chart.compact {
    height: 148px;
  }

  .two-split {
    grid-template-columns: 1fr;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut {
    width: 150px;
    height: 150px;
  }

  .donut.small {
    width: 118px;
    height: 118px;
  }

  .alert-list {
    max-height: 220px;
  }

  .repair-broadcast-wrap {
    height: 600px;
    min-height: 600px;
  }
}

@media (max-width: 1280px) {
  .top-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-layout {
    grid-template-areas:
      "left"
      "center"
      "right";
    grid-template-columns: 1fr;
  }

  .two-split {
    grid-template-columns: 1fr;
  }

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

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .repair-broadcast-wrap {
    height: auto;
    min-height: 460px;
  }

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

  .topbar-meta {
    justify-content: flex-start;
  }
}

@media (max-height: 980px) and (min-width: 1200px) {
  .dashboard {
    padding: 10px;
    gap: 8px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .brand-title {
    font-size: 26px;
  }

  .top-kpi {
    gap: 6px;
  }

  .kpi-item {
    min-height: 126px;
    padding: 10px 10px 12px;
  }

  .kpi-value {
    font-size: 24px;
    margin-top: 4px;
  }

  .kpi-note {
    margin-top: 5px;
  }

  .chart-panel {
    padding: 8px 8px 10px;
  }

  .panel-head {
    margin-bottom: 6px;
  }

  .svg-chart {
    height: 188px;
  }

  .svg-chart.compact {
    height: 148px;
  }

  .donut {
    width: 150px;
    height: 150px;
  }

  .donut.small {
    width: 118px;
    height: 118px;
  }

  .alert-list {
    max-height: 220px;
  }

  .repair-broadcast-wrap {
    height: 560px;
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  .top-kpi {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 22px;
  }

  .kpi-value {
    font-size: 22px;
  }
}

/* ── repair screen overrides ── */

.repair-dashboard {
  min-height: 100vh;
  gap: 8px;
  row-gap: 8px;
  align-content: start;
  grid-auto-rows: min-content;
}

.repair-dashboard .topbar {
  height: 56px;
  min-height: 56px;
  padding: 0 12px;
  align-items: center;
}

.repair-dashboard .brand-wrap {
  gap: 0;
  margin: 0;
  justify-content: center;
  height: 100%;
}

.repair-dashboard .brand-title {
  margin: 0;
  line-height: 1;
}

.repair-dashboard .topbar-meta {
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

.repair-dashboard .topbar-meta .chip {
  min-height: 28px;
  padding: 4px 8px;
}

.repair-dashboard .topbar-meta .icon-btn {
  width: 30px;
  height: 30px;
}

.repair-top-kpi {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

.repair-dashboard > .topbar + .top-kpi {
  margin-top: 0;
  padding-top: 0;
  align-self: start;
}

.repair-dashboard > .topbar + .top-kpi + .repair-layout {
  margin-top: 0;
  align-self: start;
}

.repair-top-kpi .kpi-value {
  margin-top: 2px;
  font-size: clamp(150px, 3.2vw, 66px);
  letter-spacing: 0.4px;
  text-align: center;
  min-height: 62px;
  display: flex;
  align-items: center;
}

.repair-top-kpi .kpi-label {
  font-size: 13px;
}

.repair-top-kpi .kpi-item {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.3s ease;
  min-height: 118px;
  position: relative;
}

.repair-top-kpi .kpi-item:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 197, 255, 0.45);
  box-shadow: 0 8px 24px rgba(59, 158, 255, 0.15);
}

.repair-top-kpi .kpi-item.active {
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(41, 128, 255, 0.28), var(--glow-primary);
  background: linear-gradient(180deg, rgba(12, 53, 100, 0.95), rgba(9, 34, 66, 0.9));
}

.repair-top-kpi .kpi-item.active::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.7), rgba(0, 229, 160, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.repair-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.95fr);
  gap: 8px;
  align-items: start;
}

.repair-side-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

.repair-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.repair-main-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.repair-main-meta .chip {
  font-size: 13px;
  min-height: 34px;
}

.repair-list {
  display: grid;
  gap: 12px;
}

.repair-ticket {
  border-radius: 12px;
  border: 1px solid rgba(148, 196, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(16, 55, 103, 0.5), rgba(8, 30, 58, 0.7)),
    rgba(7, 29, 54, 0.88);
  padding: 14px 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
}

.repair-ticket:hover {
  border-color: rgba(148, 196, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(59, 158, 255, 0.08);
}

.repair-ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.repair-ticket-vehicle {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, #e0f0ff, #76d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(59, 158, 255, 0.25));
}

.repair-ticket-fault {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.repair-ticket-desc {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #eff6ff;
  word-break: break-word;
}

.repair-ticket-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: box-shadow 0.2s ease;
}

.repair-ticket-status.pending {
  background: linear-gradient(135deg, rgba(255, 209, 106, 0.2), rgba(255, 184, 77, 0.12));
  color: #ffd76f;
  border-color: rgba(255, 209, 106, 0.28);
  box-shadow: 0 0 12px rgba(255, 209, 106, 0.1);
}

.repair-ticket-status.repairing {
  background: linear-gradient(135deg, rgba(79, 186, 255, 0.18), rgba(59, 158, 255, 0.1));
  color: #64d4ff;
  border-color: rgba(79, 186, 255, 0.3);
  box-shadow: 0 0 12px rgba(79, 186, 255, 0.12);
}

.repair-ticket-status.paused {
  background: linear-gradient(135deg, rgba(255, 165, 89, 0.18), rgba(255, 140, 50, 0.1));
  color: #ffbf66;
  border-color: rgba(255, 165, 89, 0.28);
  box-shadow: 0 0 12px rgba(255, 165, 89, 0.1);
}

.repair-ticket-status.completed {
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.18), rgba(0, 200, 140, 0.1));
  color: #82f2c3;
  border-color: rgba(0, 229, 160, 0.28);
  box-shadow: 0 0 12px rgba(0, 229, 160, 0.1);
}

.repair-ticket-status.danger {
  background: linear-gradient(135deg, rgba(255, 83, 112, 0.18), rgba(255, 60, 90, 0.1));
  color: #ff97ab;
  border-color: rgba(255, 83, 112, 0.26);
  box-shadow: 0 0 12px rgba(255, 83, 112, 0.1);
}

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

.repair-ticket-field {
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 37, 70, 0.7), rgba(6, 24, 48, 0.6));
  border: 1px solid rgba(148, 196, 255, 0.1);
  padding: 10px 12px;
  min-height: 82px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.repair-ticket-field:hover {
  border-color: rgba(148, 196, 255, 0.22);
  background: linear-gradient(135deg, rgba(14, 45, 82, 0.7), rgba(8, 30, 58, 0.6));
}

.repair-ticket-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.repair-ticket-value {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  word-break: break-word;
}

.repair-summary-amount {
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #76d9ff, #3b9eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(59, 158, 255, 0.35));
}

.repair-summary-amount .unit {
  font-size: 18px;
  -webkit-text-fill-color: #d4e9ff;
  margin-left: 6px;
}

.repair-summary-emphasis {
  font-size: 13px;
  color: #cfe5ff;
}

.repair-empty,
.repair-loading {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text-muted);
}

.repair-loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(59, 158, 255, 0.15);
  border-top-color: var(--accent-a);
  animation: boardSpin 1s linear infinite;
  box-shadow: 0 0 16px rgba(59, 158, 255, 0.2);
}

@media (max-width: 1440px) {
  .repair-top-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .repair-top-kpi .kpi-value {
    font-size: 38px;
  }

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

@media (max-width: 1100px) {
  .repair-ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .repair-top-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .repair-top-kpi .kpi-value {
    font-size: 30px;
  }

  .repair-ticket-head {
    flex-direction: column;
  }

  .repair-ticket-grid {
    grid-template-columns: 1fr;
  }
}
