[hidden] { display: none !important; }
:root {
  --bg: #0c0f12; --card: #191d23; --line: #252a32; --gold: #c2983d; --gold-hi: #d1a849;
  --green: #46a64b; --red: #e4443b; --text: #f2f4f6; --muted: #bac3cd; --faint: #7d8793;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.45;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand em { font-style: normal; color: var(--gold); font-weight: 500; }
.menu { display: flex; gap: 8px; align-items: center; }
.menu form { margin: 0; }

main { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 40px; flex: 1; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 34px 0 10px; }
.lead { color: var(--muted); margin: 0 0 22px; font-size: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--gold);
  border-radius: 6px; color: var(--gold); background: transparent; font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; min-height: 40px; }
.btn.solid { background: var(--gold); color: #0d0d0d; }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn.big { width: 100%; min-height: 64px; font-size: 19px; border-radius: 10px; }
.btn.wide { width: 100%; min-height: 52px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.danger { border-color: var(--red); color: var(--red); }
.stack { display: grid; gap: 12px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; cursor: pointer; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.thumb { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 3/4; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb .n { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: var(--text); font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.thumb .x { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.7); color: var(--text); font-size: 20px; line-height: 34px; cursor: pointer; }

.status { border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--card); }
.status.ok { border-color: rgba(70,166,75,.6); }
.status.err { border-color: rgba(228,68,59,.7); }
.done { text-align: center; padding: 30px 18px; }
.done .check { width: 72px; height: 72px; border-radius: 50%; background: rgba(70,166,75,.15); color: var(--green);
  display: grid; place-items: center; font-size: 40px; margin: 0 auto 14px; }
.done p { color: var(--muted); margin: 6px 0 22px; }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(0,0,0,.25); border-top-color: #0d0d0d; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list .meta { color: var(--faint); font-size: 12.5px; }
.pill { font-size: 12px; padding: 2px 9px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.pill.sent { color: var(--green); border-color: rgba(70,166,75,.45); }
.pill.failed { color: var(--red); border-color: rgba(228,68,59,.5); }
.pill.off { color: var(--faint); }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); margin-bottom: 8px; }
.messages .success { border-color: rgba(70,166,75,.55); }
.messages .error { border-color: rgba(228,68,59,.65); }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--gold); }
input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 16px; }
input:focus { border-color: var(--gold); outline: none; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--red); font-size: 13px; }
.help, .helptext { color: var(--faint); font-size: 12.5px; margin-top: 5px; display: block; }
.helptext ul { margin: 4px 0 0; padding-left: 18px; }

.auth { flex: 1; display: grid; place-items: center; padding: 30px 16px; }
.auth > div { width: 100%; max-width: 380px; }
.auth .brand { justify-content: center; margin-bottom: 22px; font-size: 19px; }
.auth .brand img { width: 50px; height: 50px; }
.auth h1 { text-align: center; font-size: 21px; margin-bottom: 18px; }
.password-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; letter-spacing: 1px;
  background: var(--bg); border: 1px dashed var(--gold); border-radius: 8px; padding: 14px; text-align: center; margin: 10px 0 16px; user-select: all; }

footer { text-align: center; color: var(--faint); font-size: 12px; padding: 18px 16px 22px; border-top: 1px solid var(--line); }
.details { margin-bottom: 14px; }
select { width: 100%; padding: 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 16px; color-scheme: dark; }
select:focus { border-color: var(--gold); outline: none; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.money-input:focus-within { border-color: var(--gold); }
.money-input span { padding: 0 4px 0 12px; color: var(--muted); font-size: 18px; }
.money-input input { border: 0; font-size: 22px; font-variant-numeric: tabular-nums; padding-left: 4px; }
.disclaimer { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(194,152,61,.08);
  border-radius: 0 6px 6px 0; font-size: 13.5px; color: var(--muted); }
.disclaimer strong { color: var(--gold); }
.disclaimer b { color: var(--text); }
.optional { font-weight: 400; color: var(--faint); }
.invalid, .invalid:focus, .money-input.invalid { border-color: var(--red) !important; }
