:root {
    --bg: #0e0d16;
    --card: #181724;
    --card-2: #221f33;
    --line: #2e2a44;
    --text: #f3f1ff;
    --muted: #9d98b8;
    --pix: #32bcad;
    --pix-dark: #229c8f;
    --pink: #ff4d8d;
    --yellow: #ffc83d;
    --danger: #ff5c6c;
    --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.donate {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(56, 189, 248, .20), transparent 60%),
        radial-gradient(700px 500px at 110% 10%, rgba(168, 85, 247, .18), transparent 60%),
        var(--bg);
}
a { color: var(--pix); }
h1, h2, h3 { margin: 0 0 .4rem; line-height: 1.2; }
h2 { font-size: 1.35rem; }
.muted { color: var(--muted); }
.pix { color: var(--pix); font-weight: 800; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* ---------- Página de doação ---------- */
.wrap { max-width: 460px; margin: 0 auto; padding: 28px 16px 40px; }
.hero { margin-bottom: 18px; text-align: center; }
.hero .banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;          /* corta só um pouco em cima e embaixo, a arte fica centralizada */
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(56, 189, 248, .18);
    background: #0b1220;
}
.hero h1 { font-size: 1.6rem; margin: 16px 0 0; }

/* O logotipo tem fundo preto: "screen" faz o preto sumir sobre fundos escuros. */
.logo-mark { mix-blend-mode: screen; height: auto; }
.foot .logo-mark { display: block; width: 150px; margin: 0 auto 4px; }
.login-head { text-align: center; margin-bottom: 18px; }
.login-head .logo-mark { display: block; width: 100%; max-width: 320px; margin: 0 auto; }
.login-head p { margin: -12px 0 0; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.card.center { text-align: center; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input, textarea, select {
    width: 100%;
    background: var(--card-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    padding: 12px 14px;
    outline: none;
    transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--pix); }
textarea { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
    flex: 1 1 70px;
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--pix); color: var(--pix); }

.money-input { position: relative; }
.money-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money-input input { padding-left: 44px; font-size: 1.25rem; font-weight: 600; }

.btn-primary, .btn-secondary {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 14px 18px;
    text-decoration: none;
}
.btn-primary { width: 100%; margin-top: 18px; background: var(--pix); color: #062522; font-size: 1.1rem; }
.btn-primary:hover { background: var(--pix-dark); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--pix); }
.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; margin-top: 12px; text-decoration: underline; }

.error { color: var(--danger); margin: 12px 0 0; }

.amount-big { font-size: 2rem; font-weight: 800; color: var(--pix); margin: 0 0 12px; }
.qr { width: 240px; max-width: 100%; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 10px; }
.copy-row { display: flex; gap: 8px; margin: 8px 0 14px; }
.copy-row input { font-size: .8rem; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.check {
    width: 72px; height: 72px; margin: 4px auto 12px;
    border-radius: 50%;
    background: var(--pix); color: #062522;
    display: grid; place-items: center;
    font-size: 2.4rem; font-weight: 800;
    animation: pop .4s ease-out;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.foot { text-align: center; font-size: .8rem; margin-top: 18px; }

/* ---------- Painel ---------- */
body.admin { background: var(--bg); }
.topbar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card);
}
.topbar .logo { display: flex; align-items: center; text-decoration: none; }
/* Recorte do logotipo: amplia a arte e esconde as bordas pretas vazias. */
.logo-crop { display: block; width: 150px; height: 48px; overflow: hidden; }
.logo-crop img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); mix-blend-mode: screen; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.topbar nav a.on, .topbar nav a:hover { color: var(--text); background: var(--card-2); }

.page { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel h3 { font-size: 1.05rem; margin-bottom: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 0 0 auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
td.msg { max-width: 380px; word-break: break-word; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.badge.approved { background: rgba(50, 188, 173, .15); color: var(--pix); }
.badge.pending { background: rgba(255, 200, 61, .15); color: var(--yellow); }
.badge.test { background: rgba(255, 77, 141, .15); color: var(--pink); }

.btn-sm { padding: 6px 10px; font-size: .82rem; border-radius: 8px; font-weight: 600; }
form.inline { display: inline; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.tabs a.on { color: var(--text); border-color: var(--pix); }

.url-box { display: flex; gap: 8px; margin-bottom: 8px; }
.url-box input { font-size: .85rem; }
.preview-frame { position: relative; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #10131f; }
.preview-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
.qr-box {background: #fff; padding: 12px; border-radius: 12px; width: max-content; }
.flash { background: rgba(50, 188, 173, .12); border: 1px solid var(--pix); padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.warn { background: rgba(255, 200, 61, .1); border: 1px solid var(--yellow); padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }

.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.form-grid label small { font-weight: 400; }
.check-label { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 16px 0 6px; }
.check-label input { width: auto; }

.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; }

@media (max-width: 560px) {
    .card { padding: 18px; }
    .topbar nav { margin-left: 0; width: 100%; }
    td.msg { min-width: 200px; }
}
