* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Manrope, Arial, sans-serif;
  background:
    radial-gradient(circle at 85% 10%, #16a34a 0%, transparent 32%),
    radial-gradient(circle at 30% 45%, #064e3b 0%, transparent 36%),
    linear-gradient(135deg, #04130f 0%, #06251d 48%, #0b3f2f 100%);
  color: #fff;
}

.page {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 120px 0 70px;
}

.visual {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 70px;
  align-items: center;
  margin-bottom: 56px;
}

.bars {
  height: 340px;
  display: flex;
  align-items: end;
  gap: 22px;
  padding-left: 24px;
  position: relative;
}

.bars span {
  width: 82px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(34, 197, 94, .92), rgba(187, 247, 208, .18));
  border: 1px solid rgba(134, 239, 172, .72);
  box-shadow: 0 0 25px rgba(34, 197, 94, .58);
}

.bars span:nth-child(1) { height: 90px; }
.bars span:nth-child(2) { height: 150px; }
.bars span:nth-child(3) { height: 220px; }
.bars span:nth-child(4) { height: 300px; }

.progress-card,
.upload-card,
button,
.download-button {
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.progress-card {
  padding: 48px;
  border-radius: 34px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.progress-card > p {
  margin: 0 0 18px;
  color: #86efac;
  font-size: 18px;
}

.progress-card h2 {
  margin: 0 0 36px;
  font-size: 34px;
}

.progress-content {
  display: flex;
  align-items: center;
  gap: 48px;
}

.circle {
  width: 190px;
  height: 190px;
  position: relative;
}

.circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle circle {
  fill: none;
  stroke-width: 12;
  stroke: rgba(34, 197, 94, .22);
}

#progressCircle {
  stroke: #34d399;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: .4s ease;
}

.circle strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 42px;
}

.progress-content span {
  color: #bbf7d0;
  font-size: 18px;
}

.progress-content h3 {
  margin: 8px 0 18px;
  font-size: 40px;
}

.progress-content p {
  margin: 0;
  color: #dcfce7;
  font-size: 20px;
  line-height: 1.45;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.completed-results-section {
  width: min(100%, 746px);
  margin: 30px auto 0;
}

.completed-results-button {
  width: min(100%, 360px);
  display: block;
  margin: 0 auto;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: none;
}

.completed-results-button:hover:not(:disabled) {
  background: rgba(255,255,255,.14);
}

.completed-results-panel {
  margin-top: 18px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.completed-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.completed-results-heading p,
.completed-results-heading h2 {
  margin: 0;
}

.completed-results-heading p {
  margin-bottom: 6px;
  color: #86efac;
}

.completed-results-heading h2 {
  font-size: 28px;
}

.completed-results-heading > span,
.completed-results-message,
.completed-result-item span {
  color: #bbf7d0;
}

.completed-results-heading > span {
  max-width: 270px;
  text-align: right;
  line-height: 1.35;
}

.completed-results-message {
  margin: 0;
  text-align: center;
}

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

.completed-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: rgba(3, 35, 27, .48);
  border: 1px solid rgba(134, 239, 172, .18);
}

.completed-result-item > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.completed-result-item strong {
  overflow-wrap: anywhere;
}

.completed-result-download {
  height: 50px;
  font-size: 17px;
}

.form-panel {
  display: grid;
  grid-template-rows: minmax(230px, auto) auto;
  justify-items: center;
  align-content: start;
  gap: 10px;
}

.upload-card {
  width: min(100%, 360px);
  min-height: 230px;
  border-radius: 28px;
  border: 1px dashed rgba(74, 222, 128, .75);
  background: rgba(255,255,255,.045);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: .25s;
  cursor: pointer;
}

.action-stack {
  width: min(100%, 360px);
  display: grid;
  align-items: start;
  align-content: start;
  gap: 10px;
}

.prepare-stack,
.monthly-stack {
  grid-template-columns: minmax(0, 1fr);
}

.prepare-stack {
  grid-template-rows: minmax(48px, auto) 72px;
  grid-auto-rows: 72px;
}

.monthly-stack {
  grid-template-rows: minmax(48px, auto) 72px;
  grid-auto-rows: 72px;
}

.action-stack > * {
  width: 100%;
}

.stack-slot {
  width: 100%;
}

.stack-slot-summary {
  min-height: 48px;
}

.upload-card:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-3px);
}

.upload-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.upload-card p {
  margin: 0 0 14px;
  max-width: 80%;
  color: #bbf7d0;
  font-size: 18px;
  text-align: center;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.upload-card span {
  padding: 8px 18px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #a7f3d0;
}

button,
.download-button {
  width: 100%;
  height: 72px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg, #059669, #86efac);
  color: white;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(16, 185, 129, .34);
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  padding: 0 18px;
  background: linear-gradient(90deg, #047857, #6ee7b7);
  box-shadow: 0 18px 40px rgba(16, 185, 129, .28);
}

.prepared-download-button {
  background: linear-gradient(90deg, #059669, #86efac);
  box-shadow: 0 18px 40px rgba(16, 185, 129, .34);
}

button:disabled {
  cursor: wait;
  opacity: .72;
}

.cancel-button {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: none;
}

#preparedSummary {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-align: center;
  color: #bbf7d0;
  font-size: 18px;
  line-height: 1.35;
}

.cancel-button:hover:not(:disabled) {
  background: rgba(255,255,255,.13);
}

[hidden] {
  display: none !important;
}

.loading-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  vertical-align: middle;
}

.loading-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .45;
  animation: loading-dot 1s ease-in-out infinite;
}

.loading-dots i:nth-child(2) {
  animation-delay: .16s;
}

.loading-dots i:nth-child(3) {
  animation-delay: .32s;
}

@keyframes loading-dot {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

@media (max-width: 900px) {
  .visual,
  .form {
    grid-template-columns: 1fr;
  }

  .form-panel,
  .action-stack {
    width: 100%;
  }

  .form-panel {
    grid-template-rows: auto auto;
  }

  .prepare-stack,
  .monthly-stack {
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .stack-slot {
    display: none;
  }

  .page {
    padding-top: 50px;
  }

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

@media (max-width: 560px) {
  .page {
    width: min(100% - 28px, 1180px);
    padding: 34px 0;
  }

  .visual {
    gap: 28px;
    margin-bottom: 28px;
  }

  .bars {
    height: 180px;
    gap: 12px;
    padding-left: 0;
  }

  .bars span {
    width: 22%;
  }

  .progress-card {
    padding: 28px;
    border-radius: 24px;
  }

  .progress-card h2 {
    font-size: 28px;
  }

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

  button,
  .download-button {
    height: 64px;
    font-size: 18px;
  }

  .completed-results-panel {
    padding: 20px;
  }

  .completed-results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .completed-results-heading > span {
    text-align: left;
  }

  .completed-result-item {
    grid-template-columns: 1fr;
  }
}
