.coin-shop {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.coin-shop-title {
  text-align: center;
  font-family: "Cinzel", serif;
  color: var(--text);
  margin-bottom: 8px;
}

.coin-shop-title i {
  margin-right: 8px;
  color: #c8960c;
}

.coin-shop-balance {
  text-align: center;
  color: var(--number);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.coin-shop-balance strong {
  color: #c8960c;
}

.coin-shop-vat-info {
  text-align: center;
  font-size: 0.82rem;
  color: var(--number);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
}

.coin-shop-vat-info i {
  margin-right: 4px;
}

.coin-shop-vat-detail {
  color: var(--number);
  font-size: 0.7rem;
}

.coin-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.coin-shop-card {
  position: relative;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.coin-shop-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-2px);
}

.coin-shop-card.popular {
  border-color: #c8960c;
  box-shadow: 0 0 12px rgba(200, 150, 12, 0.2);
}

.coin-shop-card.best-value {
  border-color: #27ae60;
  box-shadow: 0 0 12px rgba(39, 174, 96, 0.2);
}

.coin-shop-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #e6ce6a, #c8960c);
  color: #1a1410;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
  text-transform: uppercase;
}

.coin-shop-badge.best {
  background: linear-gradient(135deg, #6ddb8a, #27ae60);
}

.coin-shop-icon {
  font-size: 2rem;
  color: #c8960c;
  margin-bottom: 10px;
}

.coin-shop-label {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 6px;
}

.coin-shop-coins {
  font-size: 1.4rem;
  font-weight: 700;
  color: #c8960c;
  margin-bottom: 4px;
}

.coin-shop-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.coin-shop-per-coin {
  font-size: 0.75rem;
  color: var(--number);
  margin-bottom: 14px;
}

.coin-shop-buy-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #e6ce6a, #c8960c);
  color: #1a1410;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.coin-shop-buy-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.coin-shop-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.coin-shop-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--number);
}

.coin-shop-note i {
  margin-right: 4px;
}

.coin-shop-consent {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--number);
  line-height: 1.5;
}

.coin-shop-consent label {
  cursor: pointer;
}

.coin-shop-consent input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.coin-shop-consent a {
  color: #4a90d9;
  cursor: pointer;
}

.coin-shop-country {
  text-align: center;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--number);
}

.coin-shop-country label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.coin-shop-country select {
  padding: 4px 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.82rem;
}

.coin-shop-footer {
  text-align: center;
  margin-bottom: 12px;
}

.coin-shop-history-link {
  color: #4a90d9;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
}

.coin-shop-history-link:hover {
  text-decoration: underline;
}

/* Shop Result */
.shop-result {
  text-align: center;
  padding: 40px 20px;
  color: var(--text);
}

.shop-result i:first-child {
  font-size: 3rem;
  margin-bottom: 16px;
}

.shop-result-success i:first-child { color: #27ae60; }
.shop-result-cancel i:first-child { color: #e74c3c; }

.shop-result h2 {
  font-family: "Cinzel", serif;
  color: var(--text);
  margin-bottom: 10px;
}

.shop-result p {
  color: var(--number);
  margin-bottom: 8px;
}

.shop-result-balance {
  margin: 16px 0;
  font-size: 1.1rem;
}

.shop-result-balance strong {
  color: #c8960c;
}

.shop-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Purchase History */
.purchase-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.purchase-history-item {
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.purchase-history-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.purchase-history-coins {
  font-weight: 700;
  color: #c8960c;
  font-size: 1rem;
}

.purchase-history-amount {
  color: var(--text);
  font-size: 0.9rem;
}

.purchase-history-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.purchase-history-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.purchase-status-fiscalized { background: rgba(39, 174, 96, 0.2); color: #27ae60; }
.purchase-status-paid { background: rgba(74, 144, 217, 0.2); color: #4a90d9; }
.purchase-status-pending { background: rgba(230, 126, 34, 0.2); color: #e67e22; }
.purchase-status-fiscal_pending { background: rgba(200, 150, 12, 0.2); color: #c8960c; }
.purchase-status-fiscal_failed { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.purchase-status-failed { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.purchase-history-date { color: var(--number); }

.purchase-history-jir {
  color: #4a90d9;
  cursor: pointer;
}

.purchase-history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--number);
}

.purchase-history-empty i:first-child {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.purchase-history-empty p {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 16px;
}

/* Receipt */
.receipt {
  max-width: 500px;
  margin: 0 auto;
  color: var(--text);
}

.receipt-header {
  text-align: center;
  margin-bottom: 20px;
}

.receipt-header i {
  font-size: 2rem;
  color: #c8960c;
  margin-bottom: 8px;
}

.receipt-header h2 {
  font-family: "Cinzel", serif;
  color: var(--text);
}

.receipt-body > div {
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.receipt-seller strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--number);
  text-transform: uppercase;
}

.receipt-seller p {
  font-size: 0.9rem;
  color: var(--text);
  margin: 2px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--surface-border);
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-total {
  font-weight: 700;
  font-size: 1rem;
  color: #c8960c;
}

.receipt-mono {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-all;
}

.receipt-qr {
  text-align: center;
  padding: 16px 0;
}

.receipt-qr-label {
  font-size: 0.82rem;
  color: var(--number);
  margin-bottom: 8px;
}

.receipt-qr-img {
  width: 160px;
  height: 160px;
}

.receipt-footer {
  text-align: center;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.receipt-footer p {
  font-size: 0.78rem;
  color: var(--number);
  margin: 2px 0;
}

.receipt-status-pending {
  color: #c8960c;
  font-size: 0.82rem;
  font-style: italic;
}

.receipt-notice {
  background: rgba(200, 150, 12, 0.1);
  border: 1px solid rgba(200, 150, 12, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}

.receipt-notice i {
  color: #c8960c;
  margin-right: 6px;
}

.receipt-notice-warn {
  background: rgba(220, 60, 60, 0.08);
  border-color: rgba(220, 60, 60, 0.3);
}

.receipt-notice-warn i {
  color: #dc3c3c;
}

.receipt-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  background: none !important;
  border: none !important;
  padding: 10px 0 0 !important;
}

.receipt-not-found {
  text-align: center;
  padding: 40px;
  color: var(--number);
}

/* Unavailable / Fallback */
.shop-unavailable {
  text-align: center;
  padding: 40px 20px;
  max-width: 450px;
  margin: 0 auto;
}

.shop-unavailable > i:first-child {
  font-size: 3rem;
  color: #c8960c;
  margin-bottom: 16px;
}

.shop-unavailable h2 {
  font-family: "Cinzel", serif;
  color: var(--text);
  margin-bottom: 12px;
}

.shop-unavailable p {
  color: var(--number);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.shop-unavailable-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 20px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #e6ce6a, #c8960c);
  color: #1a1410;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.shop-unavailable-email:hover {
  opacity: 0.9;
}

.shop-unavailable-actions {
  margin-top: 10px;
}

@media print {
  .sidebar, .navbar, .receipt-actions { display: none !important; }
  .receipt { max-width: 100%; }
}

@media (max-width: 640px) {
  .coin-shop-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto 20px;
  }

  .purchase-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
