.audio-delivery-panel {
  min-height: 520px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--stroke);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(70, 161, 255, 0.17), transparent 48%),
    rgba(4, 20, 45, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.audio-delivery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
}

.audio-delivery-card,
.audio-delivery-history {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(162, 215, 255, 0.13);
  border-radius: 22px;
  background: rgba(4, 19, 43, 0.68);
}

.audio-delivery-card h2,
.audio-delivery-history h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.audio-delivery-card > p,
.audio-delivery-history > p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.audio-delivery-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.audio-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.audio-delivery-field {
  display: grid;
  gap: 8px;
}

.audio-delivery-field.audio-delivery-wide {
  grid-column: 1 / -1;
}

.audio-delivery-field label,
.audio-delivery-file-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.77rem;
  font-weight: 780;
  letter-spacing: 0.025em;
}

.audio-delivery-field input,
.audio-delivery-field select,
.audio-delivery-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(162, 215, 255, 0.17);
  border-radius: 13px;
  background: rgba(1, 10, 24, 0.68);
  color: white;
  padding: 12px 13px;
  font: inherit;
}

.audio-delivery-field textarea {
  min-height: 100px;
  resize: vertical;
}

.audio-delivery-file {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px dashed rgba(82, 176, 255, 0.42);
  border-radius: 16px;
  background: rgba(19, 83, 155, 0.08);
}

.audio-delivery-file input {
  color: rgba(255, 255, 255, 0.7);
}

.audio-delivery-file small {
  color: var(--muted);
  line-height: 1.45;
}

.audio-delivery-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.audio-delivery-submit,
.audio-delivery-new {
  min-height: 44px;
  border: 1px solid rgba(82, 176, 255, 0.44);
  border-radius: 999px;
  background: linear-gradient(135deg, #1979de, #36a7ff);
  color: white;
  padding: 0 20px;
  font: inherit;
  font-weight: 820;
  cursor: pointer;
}

.audio-delivery-submit:disabled {
  opacity: 0.54;
  cursor: wait;
}

.audio-delivery-status {
  min-height: 1.3em;
  color: var(--muted);
  font-size: 0.82rem;
}

.audio-delivery-status.error {
  color: #ffb1b1;
}

.audio-delivery-success {
  display: grid;
  place-items: center;
  min-height: 410px;
  text-align: center;
}

.audio-delivery-success-badge {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(91, 223, 158, 0.48);
  border-radius: 50%;
  background: rgba(91, 223, 158, 0.14);
  color: #a0f4ca;
  font-size: 1.7rem;
  font-weight: 900;
}

.audio-delivery-success h2 {
  margin-top: 18px;
}

.audio-delivery-code {
  margin: 16px 0 20px;
  color: #8fd3ff;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.audio-delivery-history-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.audio-delivery-history-item {
  padding: 14px;
  border: 1px solid rgba(162, 215, 255, 0.11);
  border-radius: 14px;
  background: rgba(1, 10, 24, 0.46);
}

.audio-delivery-history-item strong {
  display: block;
}

.audio-delivery-history-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.audio-delivery-history-empty {
  padding: 24px 10px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .audio-delivery-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .audio-delivery-panel {
    padding: 15px;
    border-radius: 20px;
  }

  .audio-delivery-grid {
    grid-template-columns: 1fr;
  }

  .audio-delivery-field.audio-delivery-wide {
    grid-column: auto;
  }

  .audio-delivery-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.audio-delivery-history-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.audio-delivery-history-download {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid rgba(111, 191, 244, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(
      145deg,
      rgba(57, 150, 207, 0.34),
      rgba(20, 72, 111, 0.34)
    );
  color: #e1f6ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 9px 25px rgba(1, 14, 28, 0.2);
  text-decoration: none;
}

.audio-delivery-history-download svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-delivery-history-filename {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.audio-delivery-retention {
  margin-top: 10px;
  color: rgba(196, 226, 246, 0.78);
  font-size: 0.72rem;
  line-height: 1.45;
}
.audio-delivery-retention-scheduled-for-purge { color: #ffd79a; }
.audio-delivery-retention-purged,
.audio-delivery-retention-missing { color: #ffbdc5; }
