/* ============================================================
   ServiceTransfer Module – Stylesheet
   Compatible with default WHMCS Six & Twenty-One themes
   ============================================================ */

/* ── Wrapper ── */
.st-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 0; }
.st-admin-wrap { padding: 10px 0; }

/* ── Page Header ── */
.st-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.st-page-title { font-size: 22px; font-weight: 600; margin: 4px 0 0; }
.st-page-sub { color: #6c757d; font-size: 14px; margin: 4px 0 0; }
.st-back-link { font-size: 13px; color: #6c757d; text-decoration: none; display: inline-block; margin-bottom: 6px; }
.st-back-link:hover { color: #333; }

/* ── Alert ── */
.st-alert { border-radius: 6px; }
.st-rejection-alert { margin-bottom: 20px; }
.st-verify-alert { margin-bottom: 20px; }
.st-inv-btn { margin-top: 8px; }

/* ── Panels ── */
.st-panel { border-radius: 8px; border: 1px solid #e3e6ea; }
.st-panel .panel-heading { font-weight: 600; font-size: 14px; background: #f8f9fa; border-bottom: 1px solid #e3e6ea; padding: 12px 16px; }
.st-no-pad { padding: 0 !important; }

/* ── Stats Row (Client) ── */
.st-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.st-stat-card { background: #f8f9fa; border: 1px solid #e3e6ea; border-radius: 8px; padding: 16px; text-align: center; }
.st-stat-label { font-size: 12px; color: #6c757d; margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.st-stat-value { font-size: 26px; font-weight: 700; color: #333; }
.st-stat-amber .st-stat-value { color: #d97706; }
.st-stat-blue  .st-stat-value { color: #2563eb; }
.st-stat-green .st-stat-value { color: #16a34a; }

/* ── Stats Row (Admin) ── */
.st-admin-stat { background: #f8f9fa; border: 1px solid #e3e6ea; border-radius: 8px; padding: 14px; text-align: center; margin-bottom: 16px; }
.st-admin-stat-val { font-size: 28px; font-weight: 700; color: #333; }
.st-admin-stat-label { font-size: 11px; color: #6c757d; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }
.st-stat-amber .st-admin-stat-val { color: #d97706; }
.st-stat-blue  .st-admin-stat-val { color: #2563eb; }
.st-stat-green .st-admin-stat-val { color: #16a34a; }
.st-stat-red   .st-admin-stat-val { color: #dc2626; }
.st-stat-pink  .st-admin-stat-val { color: #db2777; }

/* ── Table ── */
.st-table { font-size: 13px; margin: 0; }
.st-table thead th { background: #f8f9fa; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: #6c757d; border-bottom: 2px solid #e3e6ea; padding: 10px 14px; }
.st-table td { vertical-align: middle; padding: 11px 14px; }
.st-ref { font-size: 12px; background: #f1f3f5; border-radius: 4px; padding: 2px 6px; }
.st-date { color: #6c757d; font-size: 12px; }
.st-service-name { font-weight: 500; max-width: 160px; }
.st-total-row td { font-size: 14px; padding: 12px 14px; background: #fff8f0; }

/* ── Service Type Badges ── */
.st-svc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.st-svc-hosting  { background: #dbeafe; color: #1d4ed8; }
.st-svc-reseller { background: #ede9fe; color: #6d28d9; }
.st-svc-vps      { background: #d1fae5; color: #065f46; }
.st-svc-domain   { background: #fef3c7; color: #92400e; }

/* ── Direction Indicators ── */
.st-dir-out { color: #d97706; font-size: 12px; font-weight: 500; }
.st-dir-in  { color: #2563eb; font-size: 12px; font-weight: 500; }

/* ── Empty State ── */
.st-empty-state { text-align: center; padding: 60px 20px; color: #6c757d; }
.st-empty-icon { font-size: 40px; margin-bottom: 12px; }
.st-empty-state h4 { font-size: 18px; color: #333; margin-bottom: 8px; }

/* ── How It Works ── */
.st-info-panel { background: #f0f7ff; border: 1px solid #bfdbfe; }
.st-how-it-works { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-hiw-step { flex: 1; min-width: 140px; display: flex; align-items: flex-start; gap: 10px; }
.st-hiw-num { width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-hiw-text { font-size: 13px; color: #333; }
.st-hiw-arrow { font-size: 20px; color: #93c5fd; flex-shrink: 0; }

/* ── Service Type Cards (Create form) ── */
.st-type-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.st-type-card { border: 2px solid #e3e6ea; border-radius: 10px; padding: 16px 12px; cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s; }
.st-type-card:hover { border-color: #93c5fd; background: #f0f7ff; }
.st-type-card.selected { border-color: #2563eb; background: #eff6ff; }
.st-type-icon { font-size: 28px; margin-bottom: 8px; }
.st-type-label { font-size: 13px; font-weight: 600; color: #333; }

/* ── Form Sections ── */
.st-form-section { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.st-form-section:last-child { border-bottom: none; }
.st-section-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 12px; display: block; }
.st-optional { font-size: 12px; font-weight: 400; color: #6c757d; }
.st-select { border-radius: 6px; }

/* ── Destination Input ── */
.st-dest-input-wrap { display: flex; gap: 8px; }
.st-client-preview { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f0fff4; border: 1px solid #a7f3d0; border-radius: 8px; margin-top: 10px; }
.st-client-name { font-weight: 600; font-size: 14px; }
.st-client-email { font-size: 12px; color: #555; }
.st-client-status { margin-left: auto; }
.st-client-avatar { width: 36px; height: 36px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Terms & Submit ── */
.st-terms-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.st-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; font-weight: normal; }
.st-checkbox-label input { margin-top: 3px; flex-shrink: 0; }
.st-submit-row { display: flex; gap: 10px; justify-content: flex-end; }
.st-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Client Cards in Detail ── */
.st-clients-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.st-client-card { border: 1px solid #e3e6ea; border-radius: 8px; padding: 16px; text-align: center; }
.st-client-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; color: #6c757d; margin-bottom: 10px; }
.st-client-avatar-lg { width: 46px; height: 46px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.st-client-detail-name { font-weight: 600; font-size: 14px; }
.st-client-detail-email { font-size: 12px; color: #555; margin-top: 2px; }
.st-client-detail-company { font-size: 11px; color: #999; margin-top: 1px; }
.st-client-from .st-client-avatar-lg { background: #2563eb; }
.st-client-to .st-client-avatar-lg { background: #16a34a; }
.st-transfer-arrow { font-size: 28px; color: #adb5bd; text-align: center; }

/* ── Info Table ── */
.st-info-table td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
.st-info-table tr:last-child td { border-bottom: none; }
.st-info-label { width: 38%; color: #6c757d; }

/* ── Timeline ── */
.st-timeline-wrap { padding-top: 4px; }
.st-timeline { list-style: none; padding: 0; margin: 0; }
.st-tl-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.st-tl-item:last-child { border-bottom: none; }
.st-tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; background: #adb5bd; }
.st-tl-admin  .st-tl-dot { background: #2563eb; }
.st-tl-client .st-tl-dot { background: #16a34a; }
.st-tl-system .st-tl-dot { background: #adb5bd; }
.st-tl-action { font-weight: 600; font-size: 13px; }
.st-tl-notes  { font-size: 12px; color: #555; margin-top: 2px; }
.st-tl-meta   { font-size: 11px; color: #999; margin-top: 3px; }

/* ── Invoice Block Page ── */
.st-invoice-block-banner { display: flex; gap: 16px; align-items: flex-start; background: #fff8f8; border: 1.5px solid #fecaca; border-radius: 10px; padding: 20px; margin-bottom: 24px; }
.st-block-icon { font-size: 32px; color: #dc2626; flex-shrink: 0; }
.st-block-title { font-size: 18px; font-weight: 700; color: #dc2626; margin-bottom: 6px; }
.st-block-msg { color: #333; font-size: 14px; margin: 0 0 6px; }
.st-ref-note { font-size: 13px; color: #555; margin: 6px 0 0; }
.st-overdue-tag { margin-left: 6px; }
.st-pay-btn { white-space: nowrap; }
.st-next-steps { display: flex; flex-direction: column; gap: 14px; }
.st-next-step { display: flex; align-items: flex-start; gap: 14px; font-size: 13px; }
.st-next-num { width: 26px; height: 26px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-actions-footer { display: flex; gap: 10px; justify-content: flex-start; margin-top: 8px; }

/* ── Admin Header ── */
.st-admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.st-admin-header h2 { margin: 0; font-size: 20px; }

/* ── Buttons ── */
.st-btn-new { white-space: nowrap; }
.st-inline-form { display: inline; margin-left: 10px; }
.st-resend-btn { white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .st-stats-row { grid-template-columns: repeat(2, 1fr); }
  .st-type-cards { grid-template-columns: repeat(2, 1fr); }
  .st-clients-row { grid-template-columns: 1fr; }
  .st-transfer-arrow { display: none; }
  .st-page-header { flex-direction: column; gap: 12px; }
  .st-how-it-works { flex-direction: column; }
  .st-hiw-arrow { display: none; }
}

@media (max-width: 480px) {
  .st-stats-row { grid-template-columns: 1fr 1fr; }
  .st-type-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Email security note ── */
.st-email-note { background: #f0fff4; border: 1px solid #a7f3d0; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #065f46; margin-top: 10px; }

/* ── Status label ── */
.st-status-label { font-size: 12px; padding: 4px 10px; }
