/* Tarjeta y ventana de compra de créditos */
.credit-store-tile .tile-art {
  filter: saturate(1.08) contrast(1.04);
}

.credit-store-layer,
.credit-request-confirm-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.credit-store-layer {
  z-index: 55;
}

.credit-request-confirm-layer {
  z-index: 66;
}

.credit-store-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(88svh, 780px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #3a3a40;
  border-radius: 22px;
  background: linear-gradient(155deg, #1b1b1e, #101012 82%);
  box-shadow: 0 28px 90px rgb(0 0 0 / 72%), inset 0 1px 0 rgb(255 255 255 / 6%);
  transform-origin: center;
}

.credit-store-dialog h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 780;
}

.credit-store-dialog .dialog-subtitle {
  margin: 13px 0 8px;
}

.credit-store-message {
  display: block;
  margin: 0 0 14px;
}

.credit-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.credit-choice {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid #38383e;
  border-radius: 13px;
  background: #222225;
  color: #f4f4f5;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.credit-choice:hover {
  border-color: #777780;
  transform: translateY(-1px);
}

.credit-choice.is-selected {
  border-color: var(--accent, #ff9d2e);
  background: rgb(255 157 46 / 11%);
  box-shadow: inset 0 0 0 1px rgb(255 157 46 / 18%);
}

.credit-choice:focus-visible,
.small-action-button:focus-visible,
.credit-request-actions button:focus-visible {
  outline: 2px solid #ffc477;
  outline-offset: 2px;
}

.credit-choice-amount {
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.credit-choice-price {
  color: #ffc477;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: right;
}

.credit-choice-price.is-unconfigured {
  color: #a1a1aa;
  font-weight: 600;
}

.credit-store-dialog .accept-package {
  width: 100%;
  margin-top: 16px;
}

.credit-store-dialog > .form-note:last-child {
  margin-top: 12px;
  text-align: center;
}

.credit-orb-transition {
  position: fixed;
  z-index: 70;
  display: block;
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 44px rgb(255 196 119 / 42%), 0 0 100px rgb(50 130 255 / 20%);
  pointer-events: none;
  will-change: left, top, width, height, border-radius, transform, opacity;
}

/* Precios editables desde el panel Admin */
.admin-credit-settings {
  border-color: rgb(255 157 46 / 28%);
}

.admin-credit-settings[hidden] {
  display: none !important;
}

.admin-credit-price-grid {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.admin-credit-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 132px);
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #333338;
  border-radius: 11px;
  background: #1b1b1e;
}

.admin-credit-price-row label {
  color: #e4e4e7;
  font-size: 13px;
  font-weight: 650;
}

.admin-credit-price-row input {
  min-width: 0;
  padding: 9px 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-contact-form {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #343439;
}

.admin-request-card,
.credit-history-card {
  padding: 14px;
  border: 1px solid #333338;
  border-radius: 14px;
  background: #19191c;
}

.admin-request-card + .admin-request-card,
.credit-history-card + .credit-history-card {
  margin-top: 10px;
}

.credit-request-top,
.credit-history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.credit-request-top strong,
.credit-history-top strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f4f4f5;
  font-size: 14px;
}

.credit-request-meta,
.credit-history-meta {
  margin-top: 8px;
  color: #aaaab2;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.credit-request-reference {
  display: block;
  margin-top: 5px;
  color: #888891;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.credit-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.credit-request-actions button {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #343439;
  border-radius: 11px;
  background: #252529;
  color: #f4f4f5;
  font-weight: 700;
  cursor: pointer;
}

.credit-request-actions button[data-credit-decision="approve"] {
  border-color: rgb(63 190 117 / 34%);
  background: rgb(13 84 45 / 25%);
  color: #80e5a1;
}

.credit-request-actions button[data-credit-decision="deny"] {
  border-color: rgb(240 83 83 / 30%);
  color: #ff9c9c;
}

.small-action-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #37373d;
  border-radius: 10px;
  background: #202023;
  color: #dddde2;
  font-size: 12px;
  cursor: pointer;
}

.credit-status-label {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #46464d;
  border-radius: 999px;
  color: #d4d4d8;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.credit-status-label[data-status="approved"] {
  border-color: rgb(63 190 117 / 34%);
  color: #80e5a1;
}

.credit-status-label[data-status="denied"] {
  border-color: rgb(240 83 83 / 30%);
  color: #ff9c9c;
}

.credit-store-layer[hidden],
.credit-request-confirm-layer[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  .credit-store-dialog {
    padding: 16px;
  }

  .credit-choice {
    gap: 5px;
    padding-inline: 8px;
  }

  .credit-choice-amount {
    font-size: 13px;
  }

  .credit-choice-price {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .credit-choice {
    transition: none;
  }
}
