/* Trust Pay — shared styles */
:root {
  --ink: #0b1f33;
  --ink-2: #44546a;
  --ink-3: #7b8799;
  --line: #e3e8f0;
  --bg: #f3f6fb;
  --card: #ffffff;
  --primary: #1f4fd8;
  --primary-2: #163bb0;
  --primary-soft: #e8eefd;
  --green: #0f9f5a;
  --green-soft: #e3f6ec;
  --amber: #b86e00;
  --amber-soft: #fff3dc;
  --red: #cf3434;
  --red-soft: #fde8e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 51, .06), 0 4px 16px rgba(11, 31, 51, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; }
.check input { width: auto; margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 13px 18px; cursor: pointer;
  background: var(--primary); color: #fff; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--primary-soft); color: var(--primary); }
.btn.ghost:hover { background: #dbe4fc; }
.btn.light { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.green { background: var(--green); } .btn.green:hover { background: #0b8549; }
.btn.red { background: var(--red-soft); color: var(--red); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.wa { background: #1fa855; } .btn.wa:hover { background: #178c46; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.b-paid { background: var(--green-soft); color: var(--green); }
.b-submitted { background: var(--amber-soft); color: var(--amber); }
.b-created { background: var(--primary-soft); color: var(--primary); }
.b-expired, .b-rejected { background: #eef0f4; color: var(--ink-3); }
.b-rejected { background: var(--red-soft); color: var(--red); }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.alert.warn { background: var(--amber-soft); color: #7a4a00; }
.alert.info { background: var(--primary-soft); color: #1c3a8c; }
.alert.ok { background: var(--green-soft); color: #0a6b3d; }
.alert.err { background: var(--red-soft); color: #9b2020; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; color: var(--ink); }
.logo svg { width: 28px; height: 28px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 1000; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); font-weight: 600; }

pre.code { background: #0d1b2a; color: #d7e3f4; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 8px 0; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
