/* ===== PAYMENT CSS ===== */

.pay-body { background: #f1f5f9; min-height: 100vh; }

.pay-main { padding: 40px 0 80px; }

.pay-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  max-width: 900px; margin: 0 auto;
}
.pay-wrap-sm { max-width: 520px; grid-template-columns: 1fr; }

/* Section */
.pay-section {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 16px; padding: 28px;
}
.pay-section-title { font-size: 17px; font-weight: 800; margin: 0 0 20px; }

/* Package cards — accordion style */
.pkg-grid { display: flex; flex-direction: column; gap: 10px; }
.pkg-card {
  border: 2px solid #e2e8f0; border-radius: 14px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
  overflow: hidden; background: #fff;
}
.pkg-card:hover { border-color: #93c5fd; }
.pkg-card.selected { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

.pkg-card-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
}
.pkg-icon  { font-size: 24px; flex-shrink: 0; }
.pkg-name  { font-weight: 700; font-size: 15px; flex: 1; }
.pkg-price { font-weight: 800; font-size: 15px; color: #1d4ed8; }
.pkg-check {
  width: 24px; height: 24px; border-radius: 50%;
  background: #e2e8f0; color: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; transition: all .2s; flex-shrink: 0;
}
.pkg-card.selected .pkg-check { background: #1d4ed8; color: #fff; }

/* Accordion features */
.pkg-features {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.22,1,.36,1), padding .3s;
  padding: 0 16px; border-top: 0px solid #e2e8f0;
}
.pkg-card.selected .pkg-features {
  max-height: 400px;
  padding: 14px 16px 18px;
  border-top: 1px solid #dbeafe;
  background: #f8faff;
}
.pkg-feat-desc {
  font-size: 13px; color: #475569; margin: 0 0 12px; line-height: 1.5;
}
.pkg-feat-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
}
.pkg-feat-list li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 13px; color: #334155; line-height: 1.4;
}
.feat-check {
  color: #16a34a; font-weight: 800; font-size: 13px;
  flex-shrink: 0; margin-top: 1px;
}

/* Form */
.pay-form-group { margin-bottom: 18px; }
.pay-form-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.pay-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid #e2e8f0;
  border-radius: 10px; font-size: 15px; font-family: inherit;
  background: #fff; color: #14213d; transition: border-color .2s;
  box-sizing: border-box;
}
.pay-input:focus { outline: none; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.pay-hint { font-size: 12px; color: #64748b; margin-top: 5px; display: block; }
.req { color: #dc2626; }

.pay-input-prefix-wrap { display: flex; align-items: center; }
.pay-input-prefix {
  padding: 11px 12px; background: #f1f5f9; border: 1.5px solid #e2e8f0;
  border-right: none; border-radius: 10px 0 0 10px;
  font-size: 14px; font-weight: 600; color: #475569; white-space: nowrap;
}
.pay-input-prefixed { border-radius: 0 10px 10px 0; }

/* Order summary */
.order-summary {
  background: #f8faff; border: 1.5px solid #dbeafe;
  border-radius: 12px; padding: 16px; margin-bottom: 20px;
}
.order-summary-row {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 4px 0;
}
.order-summary-row.total { font-weight: 800; font-size: 16px; color: #1d4ed8; }
.order-summary-divider { border-top: 1px solid #dbeafe; margin: 8px 0; }

/* Button */
.pay-btn {
  display: block; width: 100%; padding: 14px;
  background: #1d4ed8; color: #fff; border: none;
  border-radius: 12px; font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; text-align: center;
  text-decoration: none; transition: background .2s;
}
.pay-btn:hover { background: #1e40af; }
.pay-btn:disabled { background: #93c5fd; cursor: not-allowed; }
.pay-btn-outline {
  background: transparent; color: #1d4ed8;
  border: 2px solid #1d4ed8;
}
.pay-btn-outline:hover { background: #eff6ff; }

.pay-secure-note { font-size: 12px; color: #64748b; text-align: center; margin-top: 12px; }
.pay-alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.pay-alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* Pay order card */
.pay-order-card {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 16px; padding: 32px;
}
.pay-order-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pay-order-icon { font-size: 40px; }
.pay-order-pkg { font-size: 20px; font-weight: 800; }
.pay-order-id { font-size: 12px; color: #64748b; font-family: monospace; margin-top: 2px; }
.pay-order-details { margin-bottom: 24px; }
.pay-order-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #f1f5f9; }
.pay-order-total { font-weight: 800; font-size: 16px; color: #1d4ed8; border-bottom: none; }
.pay-order-divider { border-top: 2px solid #e2e8f0; margin: 8px 0; }

/* Finish page */
.finish-card {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 16px; padding: 40px 32px; text-align: center;
}
.finish-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; margin: 0 auto 20px;
}
.finish-icon-success { background: #dcfce7; color: #16a34a; }
.finish-icon-pending { background: #fef9c3; color: #ca8a04; }
.finish-icon-error   { background: #fef2f2; color: #dc2626; }
.finish-title { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.finish-sub   { color: #64748b; margin: 0 0 24px; font-size: 15px; }

.finish-notice {
  background: #f0fdf4; border: 1.5px solid #bbf7d0;
  border-radius: 12px; padding: 20px; text-align: left;
  display: flex; gap: 14px; margin-bottom: 24px;
}
.finish-notice-warn  { background: #fefce8; border-color: #fde047; }
.finish-notice-error { background: #fef2f2; border-color: #fecaca; }
.finish-notice-icon  { font-size: 24px; flex-shrink: 0; }
.finish-notice p, .finish-notice ul { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.finish-notice ul { padding-left: 18px; }

.finish-order-detail {
  background: #f8faff; border: 1.5px solid #dbeafe;
  border-radius: 12px; padding: 16px; text-align: left; margin-bottom: 24px;
}
.finish-order-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 14px; border-bottom: 1px solid #e2e8f0;
}
.finish-order-row:last-child { border-bottom: none; }
.finish-order-row code { font-size: 12px; background: #e2e8f0; padding: 2px 8px; border-radius: 6px; }

.finish-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.finish-actions .pay-btn { flex: 1; }

/* Orders admin */
.orders-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.ostat-card { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 20px; text-align: center; }
.ostat-paid { border-color: #bbf7d0; background: #f0fdf4; }
.ostat-warn { border-color: #fde047; background: #fefce8; }
.ostat-fail { border-color: #fecaca; background: #fef2f2; }
.ostat-num  { font-size: 28px; font-weight: 800; color: #1d4ed8; line-height: 1; }
.ostat-paid .ostat-num { color: #16a34a; }
.ostat-warn .ostat-num { color: #ca8a04; }
.ostat-fail .ostat-num { color: #dc2626; }
.ostat-label { font-size: 13px; color: #64748b; margin-top: 6px; font-weight: 600; }

.orders-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.orders-table-wrap { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; overflow: auto; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table th { padding: 12px 16px; background: #f8fafc; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 2px solid #e2e8f0; text-align: left; white-space: nowrap; }
.orders-table td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: #f8faff; }

.order-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.status-paid    { background: #dcfce7; color: #16a34a; }
.status-pending { background: #fef9c3; color: #92400e; }
.status-failed  { background: #fef2f2; color: #dc2626; }

/* Responsive */
@media (max-width: 700px) {
  .pay-wrap { grid-template-columns: 1fr; }
  .finish-actions { flex-direction: column; }
}
