/* Program flow — clean path selection & simulation */

.prog-flow-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.15s ease;
}

.prog-flow-back:hover {
  color: #0d9488;
}

.prog-path-stage-head {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.prog-path-stage-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.prog-path-stage-title {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

.prog-path-stage-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
  margin: 0;
}

.prog-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: 52rem;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .prog-path-grid {
    grid-template-columns: 1fr;
  }
}

.prog-path-card {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1.15rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
  width: 100%;
}

.prog-path-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
  padding: 1.35rem 1.35rem 1.15rem;
}

.prog-path-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #14b8a6);
  opacity: 0.85;
  transition: opacity 0.25s ease, height 0.25s ease;
}

.prog-path-card-accent--cancel {
  background: linear-gradient(90deg, #b91c1c, #f87171, #dc2626);
}

.prog-path-card:hover {
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow:
    0 4px 6px rgba(13, 148, 136, 0.04),
    0 20px 48px rgba(13, 148, 136, 0.12);
  transform: translateY(-3px);
}

.prog-path-card:hover .prog-path-card-accent {
  opacity: 1;
  height: 4px;
}

.prog-path-card:hover .prog-path-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.prog-path-card--cancel:hover {
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow:
    0 4px 6px rgba(239, 68, 68, 0.04),
    0 20px 48px rgba(239, 68, 68, 0.1);
}

.prog-path-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.prog-path-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.prog-path-badge--pre {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
}

.prog-path-badge--cancel {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
}

.prog-path-card-body {
  flex: 1;
  margin-bottom: 1.15rem;
}

.prog-path-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.prog-path-action {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d9488;
}

.prog-path-card--cancel .prog-path-action {
  color: #dc2626;
}

.prog-path-arrow {
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease, color 0.25s ease;
}

.prog-path-card:hover .prog-path-action {
  color: #0f766e;
}

.prog-path-card--cancel:hover .prog-path-action {
  color: #b91c1c;
}

.prog-path-card--cancel:hover .prog-path-arrow {
  color: #f87171;
}

.prog-path-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(13, 148, 136, 0.2),
    0 20px 48px rgba(13, 148, 136, 0.12);
}

.prog-path-card--cancel:focus-visible {
  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.18),
    0 20px 48px rgba(239, 68, 68, 0.1);
}

/* Bootstrap primary — path cards (Dívida Ativa) */
.prog-path-card--blue .prog-path-card-accent,
.prog-path-card-accent--blue {
  background: linear-gradient(90deg, #0d6efd, #6ea8fe, #0a58ca);
}

.prog-path-card--blue:hover {
  border-color: rgba(13, 110, 253, 0.28);
  box-shadow:
    0 4px 6px rgba(13, 110, 253, 0.04),
    0 20px 48px rgba(13, 110, 253, 0.12);
}

.prog-path-card--blue:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(13, 110, 253, 0.2),
    0 20px 48px rgba(13, 110, 253, 0.12);
}

.prog-path-badge--blue {
  color: #084298;
  background: rgba(13, 110, 253, 0.12);
}

.prog-path-icon--blue {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
}

.prog-path-card--blue .prog-path-action {
  color: #0d6efd;
}

.prog-path-card--blue:hover .prog-path-action {
  color: #0a58ca;
}

.prog-path-card--blue:hover .prog-path-arrow {
  color: #6ea8fe;
}

.prog-path-stage-kicker--blue {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
}

.prog-path-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.prog-path-icon--pre {
  background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
}

.prog-path-icon--cancel {
  background: linear-gradient(145deg, #b91c1c 0%, #f87171 100%);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.22);
}

.prog-path-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.prog-path-desc {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

.prog-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
}

.prog-search-bar .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.prog-search-bar .form-control {
  border-radius: 10px;
  border-color: rgba(15, 23, 42, 0.1);
  min-width: 200px;
}

.prog-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.2);
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f172a;
}

.prog-taxpayer-type {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.prog-summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), #fff 60%);
  border: 1px solid rgba(13, 148, 136, 0.12);
  margin-bottom: 1.25rem;
}

.prog-summary-item label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.prog-summary-item strong {
  font-size: 1rem;
  color: #0f172a;
}

.prog-summary-item--total strong {
  font-size: 1.15rem;
  color: #0d9488;
}

.prog-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.prog-plan-card {
  position: relative;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prog-plan-card:hover {
  border-color: rgba(13, 148, 136, 0.3);
}

.prog-plan-card.is-selected {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.prog-plan-card--single {
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.04), #fff 50%);
}

.prog-plan-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  margin-bottom: 0.5rem;
}

.prog-plan-badge--best {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.prog-plan-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.prog-plan-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.prog-plan-discount {
  font-size: 0.82rem;
  font-weight: 600;
  color: #16a34a;
  margin-top: 0.5rem;
}

.prog-installment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.prog-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prog-chip:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: #0d9488;
}

.prog-chip.is-active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.prog-parcel-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding-right: 0.35rem;
}

.prog-parcel-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.prog-parcel-num {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.2);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d9488;
}

.prog-parcel-due {
  font-size: 0.78rem;
  color: #94a3b8;
}

.prog-parcel-breakdown {
  font-size: 0.8rem;
  color: #475569;
}

.prog-parcel-breakdown span {
  color: #94a3b8;
}

.prog-parcel-total {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.prog-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}

.prog-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding-top: 0.5rem;
}

.prog-btn-primary {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.prog-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #fff;
}

.prog-btn-primary:disabled {
  opacity: 0.55;
}

.prog-btn-danger {
  background: #fff;
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.84rem;
}

.prog-btn-danger:hover {
  background: #fef2f2;
}

.prog-enrollment-card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  margin-bottom: 0.75rem;
}

.prog-enrollment-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.prog-enrollment-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.prog-enrollment-history {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.prog-enrollment-history .tax-mgmt-timeline {
  max-height: 260px;
  overflow-y: auto;
}


.prog-hint {
  font-size: 0.82rem;
  color: #64748b;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.25);
  margin-bottom: 1rem;
}

.prog-hint--info {
  background: #f0fdfa;
  border-color: rgba(13, 148, 136, 0.2);
  color: #0f766e;
}

.prog-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.88rem;
}

.prog-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.prog-hero-compact {
  text-align: center;
  margin-bottom: 1.75rem;
}

.prog-hero-compact h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.prog-hero-compact p {
  font-size: 0.86rem;
  color: #64748b;
  margin: 0;
}

#enrollment-flow:not(:empty) {
  animation: prog-flow-enter 0.35s ease-out;
}

@keyframes prog-flow-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tax-mgmt-body > #enrollment-flow:only-child,
.tax-mgmt-body > .prog-flow-back + #enrollment-flow {
  padding-top: 0.25rem;
}

.prog-decree-panel {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
}

.prog-decree-note {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.prog-decree-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.prog-decree-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  font-size: 0.84rem;
  color: #475569;
}

.prog-decree-row strong {
  color: #0d9488;
  font-size: 0.9rem;
}

.prog-breakdown-card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.12);
  background: #fff;
  margin-bottom: 1.25rem;
}

.prog-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.prog-breakdown-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
}

.prog-breakdown-grid span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.prog-breakdown-grid strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.prog-breakdown-total strong {
  color: #475569;
}

.prog-breakdown-discount strong {
  color: #16a34a;
}

.prog-breakdown-final {
  grid-column: 1 / -1;
  background: rgba(13, 148, 136, 0.06) !important;
}

.prog-breakdown-final strong {
  color: #0d9488;
  font-size: 1.05rem;
}

.prog-bracket-block {
  margin-bottom: 0.85rem;
}

.prog-bracket-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.prog-cancel-assessment {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.prog-cancel-status--eligible {
  border-color: rgba(239, 68, 68, 0.25);
  background: #fef2f2;
}

.prog-cancel-status--not-eligible {
  border-color: rgba(13, 148, 136, 0.15);
  background: #f0fdfa;
}

.prog-cancel-assessment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.prog-cancel-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.prog-cancel-status--eligible .prog-cancel-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.prog-cancel-grounds {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.prog-cancel-grounds li {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.8rem;
}

.prog-cancel-grounds li.is-met {
  border-color: rgba(239, 68, 68, 0.3);
  background: #fff5f5;
}

.prog-cancel-ground-label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.15rem;
}

.prog-cancel-ground-detail {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
}

.prog-cancel-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: #f1f5f9;
}

/* —— Loading ao localizar contribuinte —— */

.prog-flow-loading-inline {
  margin-bottom: 1.25rem;
}

.prog-flow-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.05), #fff 55%);
  border: 1px solid rgba(13, 148, 136, 0.14);
  text-align: center;
}

.prog-flow-loading-visual {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
}

.prog-flow-loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.prog-flow-loading-ring--outer {
  border-top-color: #0d9488;
  border-right-color: rgba(13, 148, 136, 0.25);
  animation: prog-spin 1.1s linear infinite;
}

.prog-flow-loading-ring--inner {
  inset: 0.55rem;
  border-bottom-color: #14b8a6;
  border-left-color: rgba(20, 184, 166, 0.2);
  animation: prog-spin 0.85s linear infinite reverse;
}

.prog-flow-loading-core {
  position: absolute;
  inset: 1.15rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.2);
  display: grid;
  place-items: center;
  color: #0d9488;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.12);
}

.prog-flow-loading-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.prog-flow-loading-step {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #0d9488;
  min-height: 1.25rem;
}

.prog-flow-loading-hint {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.prog-flow-loading-track {
  width: min(100%, 16rem);
  height: 4px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  overflow: hidden;
}

.prog-flow-loading-track-bar {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  animation: prog-loading-slide 1.4s ease-in-out infinite;
}

.prog-btn-spinner {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: prog-spin 0.7s linear infinite;
  vertical-align: -0.1rem;
  margin-right: 0.35rem;
}

@keyframes prog-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes prog-loading-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* —— Diálogos do programa —— */

.prog-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: transparent;
  isolation: isolate;
  animation: prog-dialog-fade 0.2s ease-out;
}

.prog-dialog-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.52);
  pointer-events: none;
}

.prog-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  background: #fff;
  border-radius: 1.15rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.22),
    0 8px 20px rgba(13, 148, 136, 0.08);
  overflow: hidden;
  isolation: isolate;
  animation: prog-dialog-rise 0.28s ease-out;
}

.prog-dialog-accent {
  height: 4px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #14b8a6);
}

.prog-dialog-accent--success {
  background: linear-gradient(90deg, #15803d, #22c55e);
}

.prog-dialog-accent--error {
  background: linear-gradient(90deg, #b91c1c, #f87171);
}

.prog-dialog-accent--warning {
  background: linear-gradient(90deg, #b45309, #fbbf24);
}

.prog-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.15rem 0.75rem;
}

.prog-dialog-head-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.prog-dialog-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d9488;
  margin-bottom: 0.2rem;
}

.prog-dialog-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.prog-dialog-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.prog-dialog-close {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.prog-dialog-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.prog-dialog-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.15rem 0.85rem;
}

.prog-dialog-step {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f8fafc;
}

.prog-dialog-step.is-active {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
}

.prog-dialog-step.is-done {
  color: #64748b;
  background: #f1f5f9;
}

.prog-dialog-step-line {
  flex: 1;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
}

.prog-dialog-body {
  padding: 0 1.15rem 1rem;
}

.prog-dialog-summary {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.prog-dialog-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.84rem;
}

.prog-dialog-summary-row span {
  color: #64748b;
}

.prog-dialog-summary-row strong {
  color: #0f172a;
  text-align: right;
}

.prog-dialog-summary-row--discount strong {
  color: #16a34a;
}

.prog-dialog-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.15);
}

.prog-dialog-summary-total span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
}

.prog-dialog-summary-total strong {
  font-size: 1.15rem;
  color: #0d9488;
}

.prog-dialog-code {
  font-size: 0.75rem;
  word-break: break-all;
}

.prog-dialog-legal {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.28);
  margin-bottom: 0.85rem;
}

.prog-dialog-legal-icon {
  color: #d97706;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.prog-dialog-legal-text {
  font-size: 0.84rem;
  line-height: 1.55;
  color: #92400e;
  margin: 0;
}

.prog-dialog-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  cursor: pointer;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
}

.prog-dialog-check input {
  margin-top: 0.15rem;
  accent-color: #0d9488;
}

.prog-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem 1.15rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.prog-dialog-foot--center {
  justify-content: center;
}

.prog-dialog-btn {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.prog-dialog-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prog-dialog-btn--ghost {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.prog-dialog-btn--ghost:hover:not(:disabled) {
  background: #f1f5f9;
}

.prog-dialog-btn--primary {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
}

.prog-dialog-btn--primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.prog-dialog-card--alert {
  width: min(100%, 24rem);
}

.prog-dialog-alert-body {
  padding: 1.35rem 1.25rem 0.5rem;
  text-align: center;
}

.prog-dialog-alert-icon {
  font-size: 2.2rem;
  margin-bottom: 0.65rem;
}

.prog-dialog-card--success .prog-dialog-alert-icon {
  color: #16a34a;
}

.prog-dialog-card--error .prog-dialog-alert-icon {
  color: #dc2626;
}

.prog-dialog-card--warning .prog-dialog-alert-icon {
  color: #d97706;
}

.prog-dialog-card--info .prog-dialog-alert-icon {
  color: #0d9488;
}

.prog-dialog-alert-message {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0.35rem 0 0;
}

@keyframes prog-dialog-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes prog-dialog-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
