/* Tá de Rolê? — identidade: azulejo modernista, céu de Brasília, ipê amarelo. */
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); }

:root {
  --ink: #161A33;
  --ink-2: #3D4466;
  --muted: #5E6688;
  --line: #DDE2EF;
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --sky: #1F4FD1;
  --sky-dark: #173CA3;
  --sky-soft: #E4EBFC;
  --ipe: #F2B705;
  --ipe-dark: #D9A300;
  --ipe-soft: #FFF4CC;
  --red: #B3261E;
  --red-soft: #FCE8E6;
  --green: #1E7A46;
  --green-soft: #E2F4E9;
  --display: 'Bricolage Grotesque', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body);
  font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--sky); text-underline-offset: 3px; }
img, svg { display: block; }
.icon { display: inline-block; flex: none; vertical-align: -3px; }
code { font-size: .9em; background: var(--sky-soft); padding: 1px 5px; border-radius: 4px; }

:focus-visible { outline: 3px solid var(--ipe); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 28px; padding-bottom: 48px; }
.narrow { max-width: 640px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin-bottom: .2em; }

/* ---------- Topo ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-sm .brand-name { font-size: 1.05rem; }
.topnav { display: none; align-items: center; gap: 6px; }
.topnav > a:not(.btn) { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 700; }
.topnav > a:not(.btn):hover { background: var(--bg); }
.topnav > a[aria-current="page"]:not(.btn) { color: var(--sky); }
.topnav-user { padding: 4px !important; border-radius: 999px !important; }
.topnav-user[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--sky); }

.demo-bar { background: var(--ipe-soft); color: #5C4500; font-size: .85rem; padding: 6px 0; border-bottom: 1px solid #F1DE9A; }
.flash { padding: 12px 0; font-weight: 700; }
.flash .wrap { display: flex; gap: 8px; align-items: center; }
.flash-ok { background: var(--green-soft); color: var(--green); }
.flash-info { background: var(--sky-soft); color: var(--sky-dark); }
.flash-error { background: var(--red-soft); color: var(--red); }

/* ---------- Barra inferior (celular) ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; }
.tabbar a[aria-current="page"] { color: var(--sky); }
.tab-create-dot { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -18px; border-radius: 14px; background: var(--ipe); color: var(--ink); box-shadow: 0 0 0 4px var(--surface); }
.tabbar a.tab-create { color: var(--ink); }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 2px solid transparent; font: 700 1rem/1.1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: var(--sky-dark); }
.btn-create { background: var(--ipe); color: var(--ink); }
.btn-create:hover { background: var(--ipe-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: #F1C4BF; }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #c7c7c7; }

/* ---------- Hero ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(2.1rem, 7.4vw, 3.6rem); letter-spacing: -0.03em; max-width: 14ch; margin-bottom: .35em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero-actions .btn { flex: 1 1 200px; }
.mural { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 460px; margin-left: auto; }
.mural-tile { aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.mural-tile .tiles { width: 100%; height: 100%; }
.mural-tile.m1, .mural-tile.m6 { border-radius: 50% 6px 6px 6px; }
.mural-tile.m3 { border-radius: 6px 6px 50% 6px; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1.15fr 1fr; align-items: center; padding-top: 64px; padding-bottom: 64px; }
  .hero-actions .btn { flex: 0 0 auto; }
}
@media (max-width: 899px) {
  .hero-art { order: -1; }
  .mural { grid-template-columns: repeat(8, 1fr); max-width: none; margin: 0 -16px 0; gap: 4px; }
  .mural-tile { border-radius: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .mural-tile { animation: tile-in .5s cubic-bezier(.2,.7,.3,1) both; }
  .mural-tile.m1 { animation-delay: .04s } .mural-tile.m2 { animation-delay: .08s } .mural-tile.m3 { animation-delay: .12s }
  .mural-tile.m4 { animation-delay: .16s } .mural-tile.m5 { animation-delay: .2s } .mural-tile.m6 { animation-delay: .24s } .mural-tile.m7 { animation-delay: .28s }
  @keyframes tile-in { from { opacity: 0; transform: scale(.85) rotate(-8deg); } }
}

/* ---------- Seções ---------- */
.section { padding-top: 36px; padding-bottom: 8px; }
.section-tight { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.link-more { font-weight: 700; white-space: nowrap; }

.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat-link { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.cat-link:hover { border-color: var(--cat); }
.cat-swatch { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
.cat-swatch .tiles { width: 100%; height: 100%; }
.cat-name { font-weight: 700; line-height: 1.2; font-size: .98rem; }
.cat-count { font-size: .8rem; color: var(--muted); }

.how { padding-bottom: 48px; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border-radius: var(--r); padding: 18px 18px 18px 60px; position: relative; border: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50% 50% 50% 4px; background: var(--sky); color: #fff; display: grid; place-items: center; font: 800 1rem var(--display); }
.steps strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.how-cta { margin-top: 16px; }

/* ---------- Cards de rolê ---------- */
.card-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; display: grid; grid-template-columns: 76px 1fr; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.card:hover { border-color: #B9C3DD; }
.card:focus-within { outline: 3px solid var(--ipe); outline-offset: 2px; }
.card-stub { position: relative; background: var(--cat); color: #fff; }
.card-stub .tiles { position: absolute; inset: 0; width: 100%; height: 100%; }
.stub-text { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 16px; text-align: center; line-height: 1; }
.stub-wd { font-size: .8rem; font-weight: 700; opacity: .92; }
.stub-day { font: 800 2.1rem/1 var(--display); margin: 4px 0 2px; }
.stub-mo { font-size: .85rem; font-weight: 700; }
.card-body { padding: 14px 16px 14px; min-width: 0; display: flex; flex-direction: column; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.card-when { font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.card-title { font-size: 1.14rem; margin: 0 0 4px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.stretched::after { content: ''; position: absolute; inset: 0; }
.stretched:focus-visible { outline: none; }
.card-desc { font-size: .93rem; color: var(--ink-2); margin: 0 0 8px; }
.card-meta .icon { margin-top: 3px; }
.card-meta { display: flex; align-items: flex-start; gap: 4px; font-size: .9rem; margin: 0 0 10px; font-weight: 700; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: .85rem; }
.organizer { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.counts { display: inline-flex; gap: 10px; color: var(--muted); }
.counts strong { color: var(--ink); }
.spots { color: var(--green); font-weight: 700; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-badges:empty { display: none; }
.card.state-cancelled, .card.state-ended { opacity: .72; }

.cat-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--cat) 14%, white); border-radius: 999px; padding: 2px 10px 2px 8px; }
.cat-chip::before { content: ''; width: 8px; height: 8px; border-radius: 2px 50% 50% 50%; background: var(--cat); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.badge-example { background: var(--ipe-soft); color: #6B5200; border: 1px dashed #D9B84A; }
.badge-full { background: #EEE7F7; color: #5B2D82; }
.badge-happening { background: var(--green-soft); color: var(--green); }
.badge-ended, .badge-hidden { background: #ECEEF4; color: var(--ink-2); }
.badge-cancelled { background: var(--red-soft); color: var(--red); }
.badge-mine { background: var(--sky); color: #fff; }
.badge-mine-soft { background: var(--sky-soft); color: var(--sky-dark); }

.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--sky-soft); color: var(--sky-dark); font-weight: 700; font-family: var(--display); }

/* ---------- Explorar ---------- */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin-bottom: 20px; display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--bg); color: var(--muted); }
.search:focus-within { border-color: var(--sky); }
.search input { border: 0; background: transparent; min-height: 44px; width: 100%; font: inherit; color: var(--ink); }
.search input:focus { outline: none; }
.filter-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.filter-row .select:first-child { grid-column: span 2; }
@media (min-width: 760px) { .filter-row { grid-template-columns: repeat(3, 1fr) auto; } .filter-row .select:first-child { grid-column: auto; } }
.filters.js .btn-filter { display: none; }
@media (max-width: 759px) { .filters.js .filter-row .select:first-child { grid-column: span 2; } }
.clear-filters { margin: 0; font-size: .9rem; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 16px; }
@media (min-width: 640px) { .form { padding: 28px; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend, .field label { font-weight: 700; margin-bottom: 6px; display: block; padding: 0; }
.field { display: grid; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-short input { max-width: 180px; }
input[type=text], input[type=number], input[type=datetime-local], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
  padding: 10px 12px; min-height: 48px; width: 100%;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235E6688' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.select select { min-height: 44px; }
textarea { resize: vertical; min-height: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }
[aria-invalid="true"] { border-color: var(--red) !important; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.field-error { display: flex; gap: 6px; align-items: center; color: var(--red); font-size: .9rem; font-weight: 700; margin: 6px 0 0; }
.form-alert { display: flex; gap: 8px; align-items: center; background: var(--red-soft); color: var(--red); font-weight: 700; border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-actions .btn { flex: 1 1 auto; }
@media (min-width: 640px) { .form-actions .btn { flex: 0 0 auto; } }

.cat-options { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-option { position: relative; }
.cat-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cat-option span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; font-size: .95rem; background: var(--surface); }
.cat-option span::before { content: ''; width: 12px; height: 12px; border-radius: 3px 50% 50% 50%; background: var(--cat); }
.cat-option input:checked + span { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, white); }
.cat-option input:focus-visible + span { outline: 3px solid var(--ipe); outline-offset: 2px; }
.radio, .check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-weight: 400; }
.radio input, .check input { width: 20px; height: 20px; accent-color: var(--sky); }

/* ---------- Detalhe ---------- */
.detail-banner { height: 84px; background: var(--cat); overflow: hidden; }
.detail-banner .tiles { width: 100%; height: 100%; }
@media (min-width: 760px) { .detail-banner { height: 120px; } }
.detail-in { padding-top: 16px; padding-bottom: 48px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; margin-bottom: 14px; font-size: .95rem; }
.detail-head h1 { margin: 10px 0 18px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-grid { display: flex; flex-direction: column; gap: 0; }
.detail-main, .detail-side { display: contents; }
.detail-main > *, .detail-side > * { order: 4; }
.detail-grid [data-manage] { order: 3; } /* organizador vê a lista logo abaixo das ações */
.detail-grid .facts { order: 1; }
.detail-grid .action-box { order: 2; margin-bottom: 28px; }
.detail-side > .organizer-box { margin-bottom: 14px; }
@media (min-width: 900px) {
  .detail-grid { display: grid; gap: 24px; }
  .detail-main { display: block; }
  .detail-side { display: grid; }
  .detail-grid .action-box, .detail-side > .organizer-box { margin-bottom: 0; }
}
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 340px; align-items: start; } .detail-side { position: sticky; top: 76px; } }
.facts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.facts li { display: flex; gap: 12px; }
.facts .icon { color: var(--sky); margin-top: 3px; }
.facts div { display: flex; flex-direction: column; }
.facts .muted { font-size: .92rem; }
.prose p { max-width: 68ch; }
.prose, .notes, .private, .manage { margin-bottom: 24px; }
.notes { background: var(--ipe-soft); border-radius: var(--r); padding: 16px 18px; }
.notes p { margin: 0 0 .4em; }
.private h2 { display: flex; gap: 8px; align-items: center; }
.soft-box { background: var(--bg); border: 1px dashed var(--line); border-radius: var(--r); padding: 14px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.people-name { flex: 1; display: flex; flex-direction: column; font-weight: 700; min-width: 0; }
.people-name small { font-weight: 400; color: var(--muted); }

@media (min-width: 900px) { .detail-side { display: grid; gap: 14px; } }
.action-box { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: 18px; box-shadow: 6px 6px 0 var(--ipe); }
.action-msg { display: grid; gap: 10px; }
.action-msg > strong { font-family: var(--display); font-size: 1.3rem; }
.action-msg p { margin: 0; }
.status-pill { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; border-radius: 999px; padding: 6px 12px; justify-self: start; }
.status-confirmed { background: var(--green-soft); color: var(--green); }
.status-interested { background: var(--sky-soft); color: var(--sky-dark); }
.organizer-box { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.organizer-box div { display: flex; flex-direction: column; }
.safety { display: flex; gap: 8px; color: var(--ink-2); margin: 0; }
.safety .icon { margin-top: 3px; color: var(--green); }
.report-link { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

.created { background: var(--green-soft); border-radius: var(--r-lg); padding: 18px; margin-bottom: 20px; }
.created h2 { color: var(--green); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-height: 40px; font-size: .9rem; }

/* ---------- Meus rolês ---------- */
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mine-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--cat, var(--sky)); border-radius: var(--r); padding: 14px 16px; }
.mine-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.mine-title { font-weight: 700; font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
.mine-side { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Perfil / login ---------- */
.login-box { display: grid; gap: 20px; }
.demo-login { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; }
.demo-login h2 { margin: 0; font-size: 1.15rem; }
.demo-login p { margin: 0; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h1 { margin: 0; }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- Estados vazios ---------- */
.empty { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 20px 32px; }
.empty-art { width: 132px; height: 44px; margin: 0 auto 16px; border-radius: 10px; overflow: hidden; }
.empty-art .tiles { width: 100%; height: 100%; }
.empty h2 { font-size: 1.25rem; }
.empty p { color: var(--muted); max-width: 44ch; margin-left: auto; margin-right: auto; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.prose-page h2 { margin-top: 1.4em; }
.prose-page li { margin-bottom: .4em; }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 28px; margin-top: 24px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.footer p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer nav a { color: var(--ink-2); font-size: .92rem; }

/* ---------- Login com Google ---------- */
.google-login { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; }
.google-login h2 { margin: 0; font-size: 1.15rem; }
.google-login p { margin: 0; }
.g-button { min-height: 44px; display: flex; align-items: center; }
.g-error { color: var(--red); font-weight: 700; }

/* ---------- Lista do organizador (confirmação rápida) ---------- */
.manage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.manage-head h2 { margin: 0; }
.manage-head form[hidden] { display: none; }
.manage-status { min-height: 1.4em; margin: 0 0 8px; color: var(--green); font-weight: 700; }
.manage-status.is-error { color: var(--red); }
.people-manage li { transition: border-color .15s, background-color .15s; }
.people-manage li.is-confirmed { border-color: #A9D8BC; background: var(--green-soft); }
.people-manage li.is-pending { opacity: .7; }
.toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .9rem/1 var(--body); cursor: pointer;
}
.toggle .icon { opacity: .35; }
.toggle:hover { border-color: var(--sky); }
.toggle-on { background: var(--green); border-color: var(--green); color: #fff; }
.toggle-on .icon { opacity: 1; }
.toggle-on:hover { border-color: var(--green); background: #186338; }
.toggle[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Eventos e grupos ---------- */
/* Tipo de conteúdo: rolê (independente), evento (atividade que já existe) e grupo (dentro de um evento). */
.kind-chip { display: inline-block; font-size: .74rem; font-weight: 700; line-height: 1.5; border-radius: 4px; padding: 0 7px; vertical-align: 1px; }
.kind-role { background: var(--ipe-soft); color: #6B5200; }
.kind-event { background: var(--ink); color: #fff; }
.kind-group { background: var(--sky-soft); color: var(--sky-dark); }

.mobile-account { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; font-weight: 700; text-decoration: none; color: var(--sky); border-radius: 999px; }
.mobile-account[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--sky); }
@media (min-width: 760px) { .mobile-account { display: none; } }

.page-head-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.section-sub { margin: -6px 0 14px; }

.event-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .event-grid { grid-template-columns: repeat(4, 1fr); } .event-grid-compact { grid-template-columns: repeat(3, 1fr); } }
.ecard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ecard:hover { border-color: #B9C3DD; }
.ecard:focus-within { outline: 3px solid var(--ipe); outline-offset: 2px; }
.ecard-cover { aspect-ratio: 16 / 8; background: var(--cat); overflow: hidden; border-bottom: 4px solid var(--cat); }
.ecard-cover .tiles, .cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ecard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.ecard-compact .ecard-cover { aspect-ratio: 16 / 6; }
.groups-count { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink-2); }
.also-events { margin-bottom: 24px; }
.also-events h2 { font-size: 1.1rem; }

.event-hero { height: 120px; background: var(--cat); overflow: hidden; }
.event-hero .tiles, .event-hero .cover-img { width: 100%; height: 100%; object-fit: cover; }
.event-hero.has-img { height: 200px; }
@media (min-width: 760px) { .event-hero { height: 160px; } .event-hero.has-img { height: 320px; } }

.groups-section { margin-bottom: 28px; }
.groups-section .section-head { margin-bottom: 4px; }
.groups-section .section-head h2 { font-size: 1.35rem; }
.my-group { margin: 8px 0 12px; }
.group-list { display: grid; gap: 10px; margin-top: 12px; }
.gcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--sky); border-radius: var(--r); padding: 12px 14px; }
.gcard:hover { border-color: #B9C3DD; border-left-color: var(--sky); }
.gcard:focus-within { outline: 3px solid var(--ipe); outline-offset: 2px; }
.gcard.is-mine { border-left-color: var(--green); background: var(--green-soft); }
.gcard.state-full { border-left-color: #8E6BB0; }
.gcard-when { display: flex; align-items: flex-start; gap: 5px; font-size: .9rem; font-weight: 700; margin: 2px 0 6px; color: var(--ink-2); }
.gcard-when .icon { margin-top: 3px; }

.event-context { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--cat); border-radius: var(--r); padding: 10px 14px; margin-bottom: 14px; }
.event-context:hover { border-color: #B9C3DD; border-left-color: var(--cat); }
.event-context .kind-chip { justify-self: start; }

.event-hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 14px; background: var(--surface); border: 1px dashed #B9C3DD; border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.event-hint:hover { border-color: var(--sky); }
.event-hint .kind-chip { flex: none; margin-top: 2px; }

.dupes { background: var(--ipe-soft); border: 1px solid #F1DE9A; border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.dupes h2 { font-size: 1.2rem; }
.dupes .event-grid { margin: 10px 0; }
.form-thumb { width: 100%; max-width: 320px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); margin-bottom: 8px; }
input[type=file] { font: inherit; max-width: 100%; }
input[type=url] { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 48px; width: 100%; }
.creator-box { display: block; }
.creator-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.creator-actions form { margin: 0; }

/* ---------- Moderação na página do conteúdo (só administradores) ---------- */
.admin-tools { display: grid; gap: 8px; background: var(--surface); border: 2px dashed var(--red); border-radius: var(--r-lg); padding: 14px; }
.admin-tools h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1.05rem; color: var(--red); }
.admin-tools p, .admin-tools form { margin: 0; }
