/* ========================================
   DealSub - Static Review Site
   Thai Market / CoindPay Audit
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Thai', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #f8f9fc;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- Mobile Container ---------- */
.page-wrapper {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,.06);
}

.page-content {
  flex: 1;
  padding: 0;
}

/* ---------- Header / Navbar ---------- */
.site-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

.site-header .logo span {
  color: #60a5fa;
}

.site-header .nav-icon {
  font-size: 20px;
  cursor: pointer;
  opacity: .8;
}

/* Inner page header with back button */
.inner-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.inner-header .back-btn {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.inner-header .page-title {
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Hero / Banner ---------- */
.hero {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  padding: 28px 20px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 6px;
}

.hero p {
  font-size: 14px;
  color: #64748b;
}

/* ---------- Plan Cards ---------- */
.plans {
  padding: 16px 20px 20px;
}

.plan-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow .2s, border-color .2s;
}

.plan-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
}

.plan-card .plan-info {
  flex: 1;
}

.plan-card .plan-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 2px;
}

.plan-card .plan-desc {
  font-size: 12px;
  color: #94a3b8;
}

.plan-card .plan-pricing {
  text-align: right;
}

.plan-card .plan-price {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
}

.plan-card .plan-price-unit {
  font-size: 12px;
  color: #dc2626;
  font-weight: 400;
}

.plan-card .plan-original {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
}

.plan-card .btn-buy {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  cursor: pointer;
  border: none;
  transition: background .2s;
}

.plan-card .btn-buy:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: block;
  width: 100%;
  background: #2563eb;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background .2s;
}

.btn-primary:hover {
  background: #1d4ed8;
  text-decoration: none;
  color: #fff;
}

.btn-primary.disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-secondary {
  display: block;
  width: 100%;
  background: #f1f5f9;
  color: #475569;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  margin-top: 8px;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: #2563eb;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #2563eb;
  cursor: pointer;
  transition: all .2s;
}

.btn-outline:hover {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

/* ---------- Form Elements ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #f9fafb;
  outline: none;
  transition: border-color .2s;
}

.form-input:focus {
  border-color: #2563eb;
  background: #fff;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #f9fafb;
  outline: none;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.checkbox-line input[type="checkbox"] {
  margin-top: 4px;
  transform: scale(1.1);
  accent-color: #2563eb;
}

.checkbox-line a {
  color: #2563eb;
  font-weight: 500;
}

/* ---------- Info Cards / Panels ---------- */
.info-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

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

.info-row .label {
  color: #94a3b8;
}

.info-row .value {
  color: #1e3a5f;
  font-weight: 500;
}

/* ---------- Success Icon ---------- */
.success-icon {
  width: 72px;
  height: 72px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  margin: 28px auto 16px;
}

/* ---------- Status Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-danger { background: #fecaca; color: #dc2626; }

/* ---------- Task Panel ---------- */
.task-panel {
  background: #f8fafc;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.task-panel .panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.task-item .task-name {
  color: #334155;
}

.task-item .task-status {
  font-size: 11px;
  font-weight: 600;
}

.task-item.completed {
  background: #f0fdf4;
}

.task-item.completed .task-status {
  color: #16a34a;
}

/* ---------- Credential Box (Audit Mode) ---------- */
.credential-box {
  background: #eff6ff;
  border: 1px dashed #2563eb;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.credential-box .cred-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.credential-box .cred-value {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.credential-box .btn-copy {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

/* ---------- Notice / Alert Bars ---------- */
.notice-bar {
  padding: 10px 16px;
  font-size: 12px;
  line-height: 1.5;
}

.notice-bar.info {
  background: #eff6ff;
  color: #1e40af;
  border-bottom: 1px solid #bfdbfe;
}

.notice-bar.warning {
  background: #fffbeb;
  color: #92400e;
  border-left: 3px solid #f59e0b;
}

.notice-bar.success {
  background: #f0fdf4;
  color: #166534;
}

/* ---------- Section ---------- */
.section {
  padding: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 12px;
}

/* ---------- Legal / Prose Content ---------- */
.legal-content {
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

.legal-content h2 {
  font-size: 18px;
  color: #1e3a5f;
  margin: 24px 0 10px;
}

.legal-content h3 {
  font-size: 15px;
  color: #1e3a5f;
  margin: 18px 0 8px;
}

.legal-content p {
  margin-bottom: 12px;
}

.legal-content ul, .legal-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-content li {
  margin-bottom: 6px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #f1f5f9;
  padding: 20px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.8;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.site-footer .footer-links {
  margin-bottom: 8px;
}

.site-footer .footer-links a {
  color: #64748b;
  margin: 0 6px;
  font-size: 12px;
}

.site-footer .footer-links a:hover {
  color: #2563eb;
}

.site-footer .footer-note {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
}

.site-footer .service-hours {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 16px 0;
}

/* ---------- Spacing Utilities ---------- */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: #94a3b8; }
.text-danger { color: #dc2626; }
.fw-600 { font-weight: 600; }

/* ---------- Payment Badge ---------- */
.payment-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 12px;
  color: #64748b;
}

.payment-badge .lock-icon {
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (min-width: 481px) {
  body {
    background: #e8ecf1;
  }
}
