/* FRONT agent — shared styles for pay.html + admin.html (tokens come from /assets/brand.css) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; font-size: 17px; line-height: 1.65;
  font-family: var(--f-th);
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(var(--lime-rgb),.10), transparent 60%),
    radial-gradient(700px 480px at -10% 30%, rgba(var(--lime-rgb),.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(var(--fg-rgb),.025) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--fg-rgb),.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
* { scrollbar-width: thin; scrollbar-color: rgba(var(--fg-rgb),.18) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(var(--fg-rgb),.16); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(var(--lime-rgb),.45); }
a { color: var(--lime-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { body { font-size: 18px; } }
.lat { font-family: var(--f-lat); }
.mono { font-family: var(--f-mono); }
.eyebrow { font-family: var(--f-lat); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--lime-ink); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(var(--bg-rgb),.78); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--f-lat); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { font-family: var(--f-th); font-weight: 400; font-size: 14px; color: var(--text-3); margin-left: 2px; }
.secure { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--text-2); }
.secure svg { width: 15px; height: 15px; color: var(--lime-ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 17px; line-height: 1.3; transition: transform .18s, box-shadow .18s, background-color .18s, opacity .18s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lime { background: var(--lime); color: var(--on-lime); box-shadow: 0 8px 28px rgba(var(--lime-rgb),.22); }
.btn-lime:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(var(--lime-rgb),.32); }
.btn-ghost { background: rgba(var(--fg-rgb),.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(var(--fg-rgb),.08); }
.btn-bad { background: transparent; border-color: rgba(248,113,113,.5); color: var(--bad); }
.btn-bad:hover { background: rgba(248,113,113,.1); }
.btn-block { width: 100%; }
.btn-lg { min-height: 60px; font-size: 19px; padding: 0 28px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15.5px; }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(var(--fg-rgb),.04); font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--text); flex: none; }
.copy svg { width: 15px; height: 15px; }
.copy:hover { border-color: rgba(var(--lime-rgb),.5); color: var(--lime-ink); }
.copy.done { border-color: var(--lime-line); color: var(--lime-ink); background: var(--lime-dim); }

/* cards */
.card { background: linear-gradient(180deg, rgba(var(--c1-rgb),.72), rgba(var(--c2-rgb),.86)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.pad { padding: 22px; }
@media (min-width: 720px) { .pad { padding: 30px; } }

/* forms */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.4; }
.field label .opt { font-weight: 400; color: var(--text-3); margin-left: 6px; font-size: 14.5px; }
.input { width: 100%; min-height: 54px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: rgba(var(--bg-rgb),.6); color: var(--text); font-size: 17px; line-height: 1.5; outline: none; transition: border-color .18s, box-shadow .18s; }
textarea.input { min-height: 84px; resize: vertical; }
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--lime-line); box-shadow: 0 0 0 3px rgba(var(--lime-rgb),.16); }
.input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(248,113,113,.14); }
.err { color: var(--bad); font-size: 15px; line-height: 1.5; min-height: 0; }
.hint { color: var(--text-3); font-size: 15px; line-height: 1.55; }
.hint.lime { color: var(--lime-ink); }

/* pills / status */
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 2px 12px; border-radius: 999px; font-size: 14.5px; line-height: 1.35; font-weight: 700; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-paid { color: var(--ok); border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.st-review { color: var(--warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.st-pending { color: var(--text-2); }
.st-rejected { color: var(--bad); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text); border-radius: 14px; padding: 13px 16px; font-size: 16px; line-height: 1.5; box-shadow: var(--shadow-lg); animation: tin .25s ease-out; display: flex; gap: 10px; align-items: center; }
.toast.ok { border-color: rgba(var(--lime-rgb),.45); }
.toast.bad { border-color: rgba(248,113,113,.5); }
.toast svg { width: 18px; height: 18px; flex: none; color: var(--lime-ink); }
.toast.bad svg { color: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); margin-top: 48px; padding: 22px 0 34px; font-size: 14.5px; color: var(--text-3); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* THEME — light-mode polish + room for the bottom-left theme toggle */
.footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
:root[data-theme="light"] body::before { opacity: .7; }
:root[data-theme="light"] .card { background: #fff; border-color: rgba(11,15,25,.09); }
:root[data-theme="light"] .input { background: #fff; }
:root[data-theme="light"] .toast { background: #fff; }
:root[data-theme="light"] .btn-lime { box-shadow: 0 6px 20px rgba(122,160,0,.22), inset 0 0 0 1px rgba(77,107,0,.25); }
