/* =============================================================================
 * MetaPilot · 服务记录 (legacy)
 * 继承共享页面变量与按钮样式。
 * =============================================================================
 */

.orders-hero {
  margin-bottom: 32px;
}
.orders-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--navy, #1B365D);
}
.orders-sub {
  margin: 0;
  color: var(--text-2, #475569);
  font-size: 14px;
}

.orders-empty {
  background: #fff;
  border: 1px dashed #e4e7ec;
  border-radius: 16px;
  padding: 60px 32px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.orders-empty.is-hidden { display: none; }
.orders-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.orders-empty h3 {
  margin: 0 0 8px;
  color: var(--navy, #1B365D);
  font-size: 18px;
}
.orders-empty p {
  margin: 0 0 20px;
  color: var(--text-2, #475569);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.orders-list.is-hidden { display: none; }

.order-card {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.order-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.order-card.refunded {
  background: #fafafa;
  opacity: 0.7;
}

.order-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.order-plan {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy, #1B365D);
}
.order-status {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.order-status.s-paid       { background: #d1fae5; color: #047857; }
.order-status.s-pending    { background: #fef3c7; color: #854d0e; }
.order-status.s-refunded   { background: #fee2e2; color: #991b1b; }
.order-status.s-expired,
.order-status.s-failed     { background: #f1f5f9; color: #475569; }

.order-meta {
  font-size: 13px;
  color: var(--text-2, #475569);
  line-height: 1.6;
}
.order-meta code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #94a3b8;
  background: #f8fafc;
  padding: 1px 5px;
  border-radius: 3px;
}
.order-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy, #1B365D);
  font-variant-numeric: tabular-nums;
}

.order-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f3f7;
  flex-wrap: wrap;
}
.order-action {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: var(--text, #0f172a);
  cursor: pointer;
  text-decoration: none;
}
.order-action:hover {
  border-color: #1B365D;
  color: #1B365D;
}
.order-action.primary {
  background: #1B365D;
  color: #fff;
  border-color: #1B365D;
}
.order-action:disabled,
.order-action.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.invoice-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.invoice-tag.requested { background: #dbeafe; color: #1e40af; }
.invoice-tag.issued    { background: #d1fae5; color: #047857; }
.invoice-tag.failed    { background: #fee2e2; color: #991b1b; }

/* Invoice request modal (reuses .pay-card / .modal-backdrop from pricing.css) */
#invoice-modal .pay-body {
  text-align: left;
  padding: 8px 0;
}
#invoice-modal .field {
  margin-bottom: 14px;
}
#invoice-modal label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
  font-weight: 500;
}
#invoice-modal .req {
  color: #8C2D19;
}
#invoice-modal input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}
#invoice-modal input:focus {
  outline: none;
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}
.invoice-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 10px 0;
}
