/* Cartão Solidário — estilo compartilhado (uma plataforma da Sistematiza) */
:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --ink: #1C1C1E;
  --ink2: #636366;
  --line: #EFEFF4;
  --field: #F7F7FA;
  --field-line: #D1D1D6;
  --indigo: #5E5CE6;
  --indigo-d: #4340C9;
  --indigo-t: #E8E7FC;
  --indigo-tt: #3A38B0;
  --coral: #FF9C7F;
  --coral-d: #FF7A59;
  --coral-t: #FFD3C7;
  --sun: #FFD23F;
  --sun-t: #FFE38A;
  --mint: #3DDBA7;
  --mint-t: #BFF5E1;
  --pink: #FF6FA5;
  --pink-t: #FFC4DB;
  --sky: #4CC3FF;
  --sky-t: #BFE9FF;
  --ok-bg: #D9F7E5;
  --ok-fg: #0A5C2A;
  --warn-bg: #FFF1C2;
  --warn-fg: #5C4000;
  --bad-bg: #FFE5E3;
  --bad-fg: #C4261D;
  --gray-bg: #E5E5EA;
  --gray-fg: #3A3A3C;
  --r: 24px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--indigo-d); }
a:hover { color: #2F2D9E; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; left: -9999px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; }
.wrapx { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.center { text-align: center; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.xs { font-size: 12px; }
.b { font-weight: 700; }
.semi { font-weight: 600; }
.mt { margin-top: 12px; }
.mt2 { margin-top: 24px; }

.h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

/* cartões */
.card { background: var(--card); border-radius: var(--r); padding: 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card.indigo { background: var(--indigo-d); color: #fff; }
.card.indigo .muted { color: #E1E0FF; }
.card.tint { background: var(--indigo-t); color: var(--indigo-tt); }
.card.sun { background: var(--sun); }
.card.mint { background: var(--mint-t); }
.card.sky { background: var(--sky-t); }
.card.pink { background: var(--pink-t); }
.card.coral { background: var(--coral-t); }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 16px; border: 0; background: var(--indigo); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .08s, filter .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.06); color: #fff; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.dark { background: var(--ink); }
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.mint { background: var(--mint); color: var(--ink); }
.btn.white { background: #fff; color: var(--indigo-tt); }
.btn.tint { background: var(--indigo-t); color: var(--indigo-tt); }
.btn.gray { background: var(--gray-bg); color: var(--ink); }
.btn.danger { background: var(--bad-bg); color: var(--bad-fg); }
.btn.ghost { background: transparent; color: var(--indigo-d); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.sun:hover, .btn.mint:hover, .btn.white:hover, .btn.tint:hover, .btn.gray:hover, .btn.danger:hover { color: inherit; }
.btn.sun:hover, .btn.mint:hover { color: var(--ink); }
.btn.tint:hover { color: var(--indigo-tt); }
.btn.danger:hover { color: var(--bad-fg); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--gray-bg); color: var(--gray-fg); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.chip.bad { background: var(--bad-bg); color: var(--bad-fg); }
.chip.indigo { background: var(--indigo-t); color: var(--indigo-tt); }
.chip.sun { background: var(--sun); color: var(--ink); }
.chip.mint { background: var(--mint); color: var(--ink); }
.chip.glass { background: rgba(255,255,255,.2); color: #fff; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--gray-bg); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.pill.on { background: var(--indigo); color: #fff; }
.pill .n { background: var(--coral-d); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 800; }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-weight: 600; font-size: 14px; }
.hint { font-size: 13px; color: var(--ink2); }
.input, select.input, textarea.input { font: inherit; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--field-line); background: var(--field); border-radius: 14px; color: var(--ink); }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: 3px solid var(--indigo-t); border-color: var(--indigo); background: #fff; }
.input.code { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: .4em; padding-left: .4em; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--indigo); flex: 0 0 auto; }
.fgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--field); border-radius: 999px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 999px; border: 0; background: #fff; font-size: 22px; font-weight: 700; color: var(--indigo-d); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper .v { min-width: 34px; text-align: center; font-weight: 800; font-size: 18px; }

/* barra de estoque */
.bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--gray-bg); }
.bar > i { display: block; height: 100%; }
.bar .v { background: var(--mint); }
.bar .r { background: var(--sun); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.legend b { font-size: 20px; display: block; letter-spacing: -0.02em; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { border-radius: var(--r); padding: 20px; }
.kpi .n { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.kpi .t { font-size: 14px; font-weight: 600; opacity: .8; }

/* listas */
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; gap: 14px; align-items: center; padding: 14px 0; flex-wrap: wrap; }
.avatar { width: 44px; height: 44px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.banner { border-radius: 20px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); }
.banner.ok { background: var(--ok-bg); color: var(--ok-fg); }
.banner.bad { background: var(--bad-bg); color: var(--bad-fg); }
.banner.info { background: var(--indigo-t); color: var(--indigo-tt); }

/* tabela */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); padding: 8px 10px; }
.tbl td { padding: 12px 10px; border-top: 1px solid var(--line); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* capa de evento */
.cover { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--coral), var(--sun)); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; }
.cover img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,28,30,0) 30%, rgba(28,28,30,.65) 100%); }
.cover > .in { position: relative; z-index: 1; padding: 20px 22px; }
.cover.pizza { background: linear-gradient(180deg, var(--pink), var(--coral)); }
.cover.outro { background: linear-gradient(180deg, var(--sky), var(--indigo)); }
.cover svg.art { position: absolute; inset: 0; width: 100%; height: 100%; }

/* apoiadores */
.sponsors { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: #fff; font-weight: 700; font-size: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sp img { height: 24px; width: auto; border-radius: 6px; }
.sp .tier { font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.tier.gold { background: var(--sun); }
.tier.silver { background: var(--gray-bg); }
.tier.bronze { background: var(--coral-t); }

/* toast e modal */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 600; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: up .2s ease-out; text-align: center; }
.toast.bad { background: var(--bad-fg); }
.toast.ok { background: var(--ok-fg); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-bg { position: fixed; inset: 0; background: rgba(28,28,30,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 28px 28px 0 0; padding: 24px 22px 28px; max-height: 92vh; overflow: auto; animation: up .2s ease-out; }
@media (min-width: 640px) { .modal-bg { align-items: center; padding: 20px; } .modal { border-radius: 28px; } }

.spinner { width: 28px; height: 28px; border-radius: 99px; border: 4px solid var(--indigo-t); border-top-color: var(--indigo); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 16px; color: var(--ink2); }
.empty .big { font-size: 40px; }

/* topo das páginas */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: inherit; text-decoration: none; }
.brand .logo { width: 36px; height: 36px; border-radius: 12px; background: var(--indigo); display: flex; align-items: center; justify-content: center; }
.footer { padding: 36px 0 48px; color: var(--ink2); font-size: 14px; }

/* shell do painel */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: #fff; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .navi { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; min-height: 48px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.side .navi:hover { background: var(--field); color: var(--ink); }
.side .navi.on { background: var(--indigo-t); color: var(--indigo-tt); }
.side .navi .ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.side .navi .n { margin-left: auto; background: var(--coral-d); color: #fff; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.main { padding: 28px 32px 64px; min-width: 0; }
.main > .in { max-width: 980px; margin: 0 auto; }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 96px; }
  .mobile-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; gap: 2px; }
  .mobile-nav a, .mobile-nav button { flex: 1 0 auto; min-width: 68px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink2); text-decoration: none; border: 0; background: none; border-radius: 12px; position: relative; }
  .mobile-nav .on { color: var(--indigo-d); background: var(--indigo-t); }
  .mobile-nav .n { position: absolute; top: 2px; right: 14px; background: var(--coral-d); color: #fff; font-size: 10px; font-weight: 800; padding: 0 6px; border-radius: 99px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* chips dentro de colunas não esticam */
.stack > .chip, .stack-s > .chip { align-self: flex-start; }

.tbl.tight th, .tbl.tight td { padding: 10px 5px; }
.chip.wrap { white-space: normal; }

/* ---- toque e contraste (padrão Apple: alvos de 44 pt) ---- */
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; }
  .stepper button { width: 44px; height: 44px; }
  .topbar .btn.sm { min-height: 44px; }
}
.pill:active, .stepper button:active, .navi:active { transform: scale(.97); }
.mobile-nav a, .mobile-nav button { font-size: 12px; }
@media (prefers-contrast: more) {
  :root { --ink2: #3A3A3C; --line: #8E8E93; }
  .chip, .pill { outline: 1px solid currentColor; }
}
