/* Thaivo WA portal (Telegram Mini App) — matches the admin panel's light,
   brand-green theme. No dark canvas, no glow/blur effects. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --canvas: #f6f8f6;
  --surface: #ffffff;
  --border: #dfe6df;
  --ink: #141a15;
  --ink-soft: #4d5c4f;
  --ink-faint: #5f715f;
  --brand: #3a7f3d;
  --brand-dark: #2f6a32;
  --success: #166534;
  --success-soft: #dcfce7;
  --danger: #991b1b;
  --danger-soft: #fee2e2;
  --warning: #92400e;
  --warning-soft: #fef3c7;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; color: var(--ink); background: var(--canvas);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; font-size: 14px;
}

.portal-header {
  background: var(--brand);
  color: #fff; padding: 22px 18px 26px; border-radius: 0 0 20px 20px;
}
/* Full white, not a dimmed tint — this green's ceiling is ~4.9:1 with pure
   white; anything dimmed (tint or opacity) measured 4.0-4.3:1 and failed.
   Hierarchy comes from size/weight, not lower contrast. */
.portal-header .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: #fff; }
.portal-header .brand .dot { width: 8px; height: 8px; border-radius: 2px; background: #fff; }
.portal-header h1 { margin: 10px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.portal-header p { margin: 4px 0 0; font-size: 13px; color: #fff; }

.portal-body { padding: 16px; max-width: 480px; margin: 0 auto; }

.p-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(20,26,21,0.05);
}
.p-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-card .primary { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.p-card .secondary { color: var(--ink-faint); font-size: 12px; margin-top: 2px; }
.p-card .amount { font-weight: 800; font-size: 15px; color: var(--brand-dark); }

.p-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.p-badge.success, .p-badge.sent, .p-badge.linked { background: var(--success-soft); color: var(--success); }
.p-badge.pending { background: var(--warning-soft); color: var(--warning); }
.p-badge.failed { background: var(--danger-soft); color: var(--danger); }

.p-empty { text-align: center; padding: 60px 20px; color: var(--ink-faint); }
.p-empty .icon { font-size: 40px; margin-bottom: 10px; }

.p-form { padding: 24px 18px; max-width: 380px; margin: 40px auto 0; text-align: center; }
.p-form h2 { color: var(--ink); margin-bottom: 6px; }
.p-form p { color: var(--ink-soft); margin-bottom: 20px; font-size: 13px; }
.p-form input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: 14px; margin-bottom: 12px; text-align: center;
}
.p-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #e7f3e8; }
.p-form button {
  width: 100%; padding: 12px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; font-family: inherit;
}
.p-form button:hover { background: var(--brand-dark); }
.p-form .error { background: var(--danger-soft); color: var(--danger); padding: 10px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 14px; }

.p-detail-sheet {
  position: fixed; inset: 0; background: rgba(20, 26, 21, 0.45); display: none; align-items: flex-end; justify-content: center; z-index: 30;
}
.p-detail-sheet.open { display: flex; }
.p-detail-sheet .sheet {
  background: var(--surface); border-radius: 18px 18px 0 0; width: 100%; max-width: 480px; max-height: 75vh; overflow-y: auto; padding: 18px;
}
.p-detail-sheet .sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.p-detail-sheet .close-btn { background: none; border: none; font-size: 20px; color: var(--ink-faint); cursor: pointer; }
