.mg-flasher {
  display: grid;
  gap: 22px;
  color: #17211d;
}

.mg-flasher-hero,
.mg-flasher-panel {
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
}

.mg-flasher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
  padding: 34px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(20, 35, 31, 0.94), rgba(20, 35, 31, 0.72)),
    url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1400&q=80") center / cover;
  color: #ffffff;
}

.mg-flasher-eyebrow {
  margin: 0 0 10px;
  color: #a8f1dd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mg-flasher-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.mg-flasher-hero p:not(.mg-flasher-eyebrow) {
  max-width: 660px;
  margin: 18px 0 0;
  color: #e5f2ee;
  font-size: 17px;
}

.mg-flasher-badge {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.mg-flasher-badge span {
  color: #dce9e4;
  font-size: 14px;
}

.mg-flasher-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.mg-flasher-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mg-flasher-controls label {
  display: grid;
  gap: 7px;
  color: #65736d;
  font-size: 13px;
  font-weight: 850;
}

.mg-flasher-controls select {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
  color: #17211d;
}

.mg-flasher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mg-flasher-actions button,
.mg-flasher-download {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
  color: #17211d;
  font-weight: 850;
  cursor: pointer;
}

.mg-flasher-actions button:first-child,
#mgFlasherProgram {
  border-color: #138875;
  background: #138875;
  color: #ffffff;
}

.mg-flasher-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.mg-flasher-download {
  color: #0c5f54;
}

.mg-flasher-download[aria-disabled="true"] {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.mg-flasher-alert {
  padding: 12px 14px;
  border: 1px solid #f2c178;
  border-radius: 8px;
  background: #fff8ec;
  color: #7a4f0a;
  font-weight: 750;
}

.mg-flasher-alert[hidden] {
  display: none;
}

.mg-flasher-summary {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #f7faf8;
}

.mg-flasher-summary img {
  width: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  background: #eef4f1;
}

.mg-flasher-summary img[hidden] {
  display: none;
}

.mg-flasher-summary img[hidden] + div {
  grid-column: 1 / -1;
}

#mgFlasherVersion {
  margin: 0 0 6px;
  color: #0c5f54;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

#mgFlasherName {
  margin: 0;
  font-size: 24px;
}

#mgFlasherDescription {
  margin: 10px 0 0;
  color: #65736d;
}

.mg-flasher-files {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mg-flasher-files a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
}

.mg-flasher-files span {
  color: #65736d;
  font-size: 13px;
}

.mg-flasher-progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #edf4f0;
}

.mg-flasher-progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #138875;
  transition: width 160ms ease;
}

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

.mg-flasher-logbar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.mg-flasher-log {
  min-height: 260px;
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #101915;
  color: #dff3ec;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

@media (max-width: 820px) {
  .mg-flasher-hero,
  .mg-flasher-controls,
  .mg-flasher-summary,
  .mg-flasher-files {
    grid-template-columns: 1fr;
  }

  .mg-flasher-hero,
  .mg-flasher-panel {
    padding: 20px;
  }

  .mg-flasher-actions button,
  .mg-flasher-download {
    width: 100%;
  }
}
