#wz-d4-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147482000;
  width: 220px;
  border: 0;
  border-radius: 18px;
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #0b8f73 0%, #0aa6a6 100%);
  box-shadow: 0 18px 48px rgba(7, 78, 91, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#wz-d4-launcher:hover {
  transform: translateY(-1px);
}

#wz-d4-launcher span {
  display: inline-block;
  margin-bottom: 4px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255,255,255,.18);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

#wz-d4-launcher strong,
#wz-d4-launcher small {
  display: block;
}

#wz-d4-launcher strong {
  font-size: 14px;
  line-height: 1.25;
}

#wz-d4-launcher small {
  margin-top: 3px;
  opacity: .82;
  font-size: 10px;
}

body.wz-d4-open {
  overflow: hidden !important;
}

#wz-d4-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(7, 20, 35, .54);
  backdrop-filter: blur(5px);
}

.wz-d4-modal {
  width: min(1180px, 96vw);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid #b7ece2;
  border-radius: 22px;
  background: #effdf8;
  box-shadow: 0 30px 90px rgba(5, 24, 38, .34);
  color: #0f2235;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wz-d4-sheet {
  padding: 22px;
}

.wz-d4-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.wz-d4-kicker {
  margin-bottom: 7px;
  color: #0a8d72;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}

.wz-d4-titlebar h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.wz-d4-titlebar p {
  max-width: 820px;
  margin: 7px 0 0;
  color: #3d5867;
  font-size: 13px;
  line-height: 1.55;
}

.wz-d4-close {
  border: 1px solid #cfe0e5;
  border-radius: 13px;
  padding: 9px 14px;
  cursor: pointer;
  background: #fff;
  color: #18304a;
  font-weight: 800;
}

.wz-d4-controls {
  display: grid;
  grid-template-columns: 1.05fr 2.2fr 1.1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #8fe9c8;
  border-radius: 17px;
  background: rgba(255,255,255,.74);
}

.wz-d4-controls label {
  display: block;
  margin-bottom: 7px;
  color: #148169;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.wz-d4-controls select {
  width: 100%;
  height: 40px;
  border: 1px solid #b8d9e2;
  border-radius: 11px;
  padding: 0 10px;
  background: #fff;
  color: #18304a;
  font-weight: 700;
}

.wz-d4-periods > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.wz-d4-period {
  border: 1px solid #9fe1cd;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  background: #eefdf7;
  color: #15594d;
  font-size: 12px;
  font-weight: 800;
}

.wz-d4-period.active {
  border-color: #087e65;
  background: #087e65;
  color: #fff;
}

.wz-d4-refresh {
  height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 15px;
  cursor: pointer;
  background: #14223c;
  color: #fff;
  font-weight: 900;
}

.wz-d4-scope-line {
  grid-column: 1 / -1;
  color: #526878;
  font-size: 10px;
  font-weight: 700;
}

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

.wz-d4-kpis article {
  min-height: 94px;
  border: 1px solid #cbe4e7;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.wz-d4-kpis article.mint {
  border-color: #a8ead3;
  background: #f2fff9;
}

.wz-d4-kpis article.violet {
  border-color: #d7ccff;
  background: #faf7ff;
}

.wz-d4-kpis article.cyan {
  border-color: #b9e6f0;
  background: #f3fcff;
}

.wz-d4-kpis article.rose {
  border-color: #ffc8ce;
  background: #fff7f8;
}

.wz-d4-kpis span {
  display: block;
  color: #317168;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.wz-d4-kpis strong {
  display: block;
  margin-top: 7px;
  color: #13223c;
  font-size: 20px;
  line-height: 1.1;
}

.wz-d4-kpis small {
  display: block;
  margin-top: 7px;
  color: #587081;
  font-size: 10px;
  line-height: 1.35;
}

.wz-d4-lots {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #aee6ef;
  border-radius: 17px;
  background: #fff;
}

.wz-d4-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #effcff;
}

.wz-d4-section-head span,
.wz-d4-section-head strong {
  display: block;
}

.wz-d4-section-head span {
  color: #087b87;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.wz-d4-section-head strong {
  margin-top: 4px;
  font-size: 11px;
}

.wz-d4-readonly {
  border-radius: 999px;
  padding: 5px 8px;
  background: #e5fff5;
  color: #08765c;
  font-size: 9px;
  font-weight: 900;
}

.wz-d4-table-wrap {
  overflow-x: auto;
}

.wz-d4-lots table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 11px;
}

.wz-d4-lots th,
.wz-d4-lots td {
  border-top: 1px solid #e3eef1;
  padding: 10px 11px;
  text-align: left;
  vertical-align: middle;
}

.wz-d4-lots th {
  color: #25404e;
  background: #f8fcfd;
  font-size: 9px;
  letter-spacing: .6px;
}

.wz-d4-lots td strong,
.wz-d4-lots td small {
  display: block;
}

.wz-d4-lots td small {
  margin-top: 3px;
  color: #71838d;
  font-size: 9px;
}

.wz-d4-empty {
  padding: 24px !important;
  text-align: center !important;
  color: #607683;
}

.wz-d4-info {
  margin-top: 14px;
  border: 1px solid #a8e4eb;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f1fdff;
  color: #244e5a;
  font-size: 11px;
  line-height: 1.5;
}

.wz-d4-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.wz-d4-print {
  border: 1px solid #cabfff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: #f6f2ff;
  color: #5d35d5;
  font-weight: 900;
}

.wz-d4-origin {
  max-width: 56%;
  color: #71838d;
  font-size: 9px;
  text-align: right;
  word-break: break-all;
}

.wz-d4-loading,
.wz-d4-error {
  padding: 50px 28px;
  text-align: center;
}

.wz-d4-loading {
  color: #1b695d;
  font-weight: 900;
}

.wz-d4-error strong {
  display: block;
  color: #a72235;
  font-size: 18px;
}

.wz-d4-error p {
  color: #566d79;
}

@media (max-width: 950px) {
  .wz-d4-controls {
    grid-template-columns: 1fr 1fr;
  }

  .wz-d4-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #wz-d4-launcher {
    width: 190px;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 650px) {
  #wz-d4-backdrop {
    padding: 8px;
  }

  .wz-d4-sheet {
    padding: 14px;
  }

  .wz-d4-titlebar {
    flex-direction: column;
  }

  .wz-d4-controls {
    grid-template-columns: 1fr;
  }

  .wz-d4-kpis {
    grid-template-columns: 1fr;
  }

  .wz-d4-scope-line {
    grid-column: auto;
  }
}