#mlp-mini-dashboard {
  --mlp-bg-1: #f8fbff;
  --mlp-bg-2: #eef2ff;
  --mlp-panel: rgba(255, 255, 255, 0.12);
  --mlp-panel-border: rgba(255, 255, 255, 0.34);
  --mlp-border: rgba(37, 99, 235, 0.18);
  --mlp-border-strong: rgba(15, 23, 42, 0.14);
  --mlp-text: #0f172a;
  --mlp-muted: #475569;
  --mlp-accent: #2563eb;
  --mlp-accent-2: #0d9488;
  --mlp-danger: #ef4444;
  --mlp-shadow: 0 16px 42px rgba(15, 23, 42, 0.11);
  --mlp-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.06);
  --mlp-radius: 18px;
  margin: 14px 0 28px;
  position: relative;
}

#mlp-mini-dashboard .mlp-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

#mlp-mini-dashboard .mlp-dashboard-card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--mlp-border);
  border-radius: var(--mlp-radius);
  padding: 14px 14px 10px;
  background:
    radial-gradient(circle at 110% -10%, rgba(37, 99, 235, 0.14), transparent 46%),
    radial-gradient(circle at -10% 110%, rgba(13, 148, 136, 0.14), transparent 44%),
    linear-gradient(160deg, var(--mlp-bg-1), var(--mlp-bg-2));
  box-shadow: var(--mlp-shadow);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

#mlp-mini-dashboard .mlp-dashboard-card.mlp-card-raise {
  z-index: 40;
}

#mlp-mini-dashboard .mlp-dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.42), transparent 38%);
  opacity: 0.9;
}

#mlp-mini-dashboard .mlp-dashboard-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

#mlp-mini-dashboard .mlp-dashboard-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

#mlp-mini-dashboard .mlp-dashboard-head {
  margin-bottom: 10px;
  position: relative;
  z-index: 4;
}

#mlp-mini-dashboard .mlp-dashboard-head h4 {
  margin: 0 0 4px;
  color: var(--mlp-text);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

#mlp-mini-dashboard .mlp-dashboard-head p {
  margin: 0;
  color: var(--mlp-muted);
  font-size: 0.9rem;
}

#mlp-mini-dashboard .mlp-dashboard-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--mlp-panel-border);
  background: var(--mlp-panel);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  box-shadow: var(--mlp-shadow-soft);
  position: relative;
  z-index: 2;
}

@media (max-width: 580px) {
  #mlp-mini-dashboard .mlp-dashboard-controls {
    grid-template-columns: 1fr;
  }
}

#mlp-mini-dashboard label {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(30, 41, 59, 0.92);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#mlp-mini-dashboard select,
#mlp-mini-dashboard input[type="range"],
#mlp-mini-dashboard button {
  font: inherit;
}

#mlp-mini-dashboard select {
  width: 100%;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: #0f172a;
  padding: 0 34px 0 10px;
  appearance: none;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(15, 23, 42, 0.7) 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.7) 50%, transparent 50%),
    linear-gradient(to right, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.08));
  background-position:
    calc(100% - 18px) 13px,
    calc(100% - 13px) 13px,
    calc(100% - 34px) 0.52rem;
  background-size:
    5px 5px,
    5px 5px,
    1px 1.6rem;
  background-repeat: no-repeat;
}

#mlp-mini-dashboard select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.8);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#mlp-mini-dashboard .mlp-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  grid-column: 1 / -1;
}

#mlp-mini-dashboard .mlp-switch input[type="checkbox"] {
  accent-color: var(--mlp-accent);
  transform: translateY(1px);
}

#mlp-mini-dashboard .mlp-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(30, 41, 59, 0.32);
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
  z-index: 50;
}

#mlp-mini-dashboard .mlp-help-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 5000;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 92vw);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.78rem;
  line-height: 1.22rem;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.32);
  transition: opacity 0.14s ease;
}

#mlp-mini-dashboard .mlp-help-wrap.mlp-help-align-left .mlp-help-box {
  left: 0;
  transform: translateX(0);
}

#mlp-mini-dashboard .mlp-help-wrap.mlp-help-align-right .mlp-help-box {
  left: auto;
  right: 0;
  transform: translateX(0);
}

#mlp-mini-dashboard .mlp-help-wrap:hover .mlp-help-box,
#mlp-mini-dashboard .mlp-help-wrap:focus .mlp-help-box,
#mlp-mini-dashboard .mlp-help-wrap:focus-within .mlp-help-box {
  visibility: visible;
  opacity: 1;
}

#mlp-mini-dashboard .mlp-map-controls {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--mlp-panel-border);
  background: var(--mlp-panel);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  box-shadow: var(--mlp-shadow-soft);
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  #mlp-mini-dashboard .mlp-map-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

#mlp-mini-dashboard #mlp-month-label {
  display: inline-block;
  min-width: 70px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  padding: 6px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

#mlp-mini-dashboard input[type="range"] {
  width: 100%;
  accent-color: #0ea5e9;
}

#mlp-mini-dashboard button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(226, 232, 240, 0.10));
  color: rgba(15, 23, 42, 0.92);
  font-weight: 600;
  padding: 0 11px;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.42) inset,
    0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

#mlp-mini-dashboard button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(219, 234, 254, 0.14));
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.09);
}

#mlp-mini-dashboard button:active {
  transform: translateY(1px);
}

#mlp-mini-dashboard .mlp-plot-canvas {
  width: 100%;
  min-height: 460px;
  height: 500px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  box-shadow: var(--mlp-shadow-soft);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#mlp-mini-dashboard #mlp-map-window {
  min-height: 540px;
  height: 620px;
}

@media (max-width: 760px) {
  #mlp-mini-dashboard .mlp-plot-canvas {
    height: 460px;
  }

  #mlp-mini-dashboard #mlp-map-window {
    height: 520px;
  }
}

#mlp-mini-dashboard .mlp-dashboard-status {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: #334155;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--mlp-shadow-soft);
}

#mlp-mini-dashboard .mlp-dashboard-status.is-ready {
  color: #065f46;
}

#mlp-mini-dashboard .mlp-dashboard-status.is-error {
  color: #991b1b;
  font-weight: 600;
}
