/* ==========================================================
   Os Fixes · design system v4 (claro e divertido)
   Creme + branco, dourado do logótipo, toques de céu / menta / coral.
   ========================================================== */
:root {
  --bg: #fbf7ef;
  --surface: rgba(255, 255, 255, .86);
  --surface-solid: #ffffff;
  --field: #ffffff;
  --chip: #f5f1e8;
  --chip-2: #ece6d9;
  --line: rgba(29, 28, 36, .08);
  --line-2: rgba(29, 28, 36, .15);
  --text: #1d1c24;
  --muted: #6e6b78;
  --faint: #a19eaa;
  --ink: #1d1c24;
  --gold: #f4b41a;
  --gold-hi: #ffcf4a;
  --gold-ink: #a86f00;
  --gold-soft: #fff0c4;
  --sky: #2f9bf0;
  --sky-soft: #e2f1ff;
  --mint: #16b187;
  --mint-soft: #ddf7ee;
  --coral: #ff6b5b;
  --coral-soft: #ffe7e3;
  --pos: #0f946f;
  --neg: #e24d3c;
  --warn: #c98a00;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(14px) saturate(140%);
  --shadow: 0 12px 30px -18px rgba(60, 40, 0, .28), 0 2px 6px -2px rgba(60, 40, 0, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --head: "Outfit", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(520px 420px at 8% 6%, rgba(255, 207, 74, .38), transparent 70%),
    radial-gradient(520px 420px at 96% 12%, rgba(47, 155, 240, .18), transparent 70%),
    radial-gradient(560px 460px at 85% 92%, rgba(255, 107, 91, .16), transparent 70%),
    radial-gradient(520px 420px at 10% 90%, rgba(22, 177, 135, .16), transparent 70%),
    var(--bg); }
.backdrop::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(29, 28, 36, .08) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 70%); }
a { color: var(--gold-ink); text-decoration: none; transition: color .2s; }
a:hover { color: #7d5200; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 .25em; }
h2 { font-size: 1.15rem; margin: 0 0 .9em; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 1rem; margin: 0 0 .6em; }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.small { font-size: .84em; }
.center { text-align: center; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
h2 .i { width: 20px; height: 20px; color: var(--gold-ink); padding: 6px; box-sizing: content-box; border-radius: 10px; background: var(--gold-soft); }
pre.err-detail { white-space: pre-wrap; background: var(--coral-soft); padding: 12px; border-radius: 10px; color: #9b2518; font-size: .85rem; }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.eyebrow.gold { color: var(--gold-ink); }
.emo { display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; margin-left: 4px; white-space: nowrap; }
.emo b { font-weight: 700; font-size: .8rem; color: var(--text); }
.spacer { flex: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 10px; z-index: 50; margin: 10px auto 0; max-width: 1200px; width: calc(100% - 20px);
  display: flex; align-items: center; gap: 14px; padding: 7px 8px 7px 12px;
  background: rgba(255, 255, 255, .8); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--head); font-weight: 800; font-size: 1.12rem; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; object-fit: contain; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 14px; color: var(--muted);
  font-weight: 600; font-size: .9rem; white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--chip); }
.nav a.active { color: var(--gold-hi); background: var(--ink); box-shadow: 0 8px 18px -10px rgba(29,28,36,.7); }
.nav a .i { width: 17px; height: 17px; }
.me { display: flex; align-items: center; gap: 9px; color: var(--text); white-space: nowrap; padding: 3px 12px 3px 3px;
  border-radius: 999px; background: var(--chip); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; }
.me:hover { color: var(--text); border-color: var(--line-2); }
@media (max-width: 980px) { .nav a span { display: none; } }
@media (max-width: 720px) {
  /* backdrop-filter num antepassado prende o position:fixed; no telemóvel a barra de topo fica opaca */
  .topbar { top: 6px; margin-top: 6px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .97); }
  .me-name { display: none; }
  .me { padding: 2px; margin-left: auto; }
  .nav { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 60;
    justify-content: space-around; padding: 6px; background: rgba(255, 255, 255, .92);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 12px 34px -10px rgba(60,40,0,.35); }
  .nav a { flex-direction: column; gap: 3px; padding: 8px 2px; font-size: .64rem; flex: 1; border-radius: 16px; }
  .nav a span { display: block; }
  .nav a .i { width: 21px; height: 21px; }
  body { padding-bottom: 92px; }
}

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 22px 14px; }
@media (min-width: 720px) { .wrap { padding: 26px 20px; } }
.foot { text-align: center; color: var(--faint); font-size: .8rem; padding: 12px 16px 32px; }
.foot a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; animation: rise .6s var(--ease) both; }
.page-head p { margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 26px 0 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1%, -1%); } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); animation: rise .6s var(--ease) both;
}
@media (min-width: 720px) { .card { padding: 24px; } }
details.card > summary, .admin-box > summary, .new-player > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-weight: 600; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary .i:first-child, .admin-box > summary .i { color: var(--gold-ink); }
details.card > summary::after, .admin-box > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease); }
details[open] > summary::after { transform: rotate(-135deg); }
details.card[open] > summary, .admin-box[open] > summary { margin-bottom: 16px; }
.admin-box { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.new-player { margin-top: 16px; }
.new-player > summary { color: var(--muted); }
.new-player[open] > summary { margin-bottom: 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2 > :nth-child(2), .grid-3 > :nth-child(2) { animation-delay: .06s; }
.grid-3 > :nth-child(3) { animation-delay: .12s; }
.row { display: flex; flex-wrap: wrap; align-items: center; }
.row.gap { gap: 10px; margin-top: 14px; }
.row.gap.tight { gap: 6px; margin-top: 6px; }
.row-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.row-between h2 { margin: 0; }
.note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--gold-soft); border: 1px solid rgba(244, 180, 26, .45);
  color: #6b4800; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.note > span { flex: 1; min-width: 220px; }
.count-pill { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--chip); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; }
.link-more .i { width: 15px; height: 15px; transition: transform .2s; }
.link-more:hover .i { transform: translateX(3px); }
.sub-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 20px 0 10px; font-family: inherit; }

/* ---------- Photo heroes (fotos com véu escuro; tokens escuros lá dentro) ---------- */
.photo-hero {
  --text: #ffffff; --muted: rgba(255, 255, 255, .74); --faint: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .14); --line-2: rgba(255, 255, 255, .24);
  --chip: rgba(255, 255, 255, .1); --chip-2: rgba(255, 255, 255, .18); --field: rgba(255, 255, 255, .1);
  --gold-ink: var(--gold-hi); --ink: #fff;
  color: var(--text); color-scheme: dark;
  position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; margin-bottom: 20px;
  padding: 30px 22px; min-height: 240px; box-shadow: 0 26px 50px -26px rgba(40, 25, 0, .55);
  animation: rise .7s var(--ease) both;
}
.photo-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) center / cover no-repeat;
  animation: kenburns 24s ease-in-out infinite alternate; }
.photo-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(18, 16, 24, .88) 0%, rgba(18, 16, 24, .62) 48%, rgba(18, 16, 24, .2) 100%),
              linear-gradient(0deg, rgba(18, 16, 24, .55), transparent 55%); }
@media (min-width: 720px) { .photo-hero { padding: 40px 40px 34px; } }
.photo-hero h1 { max-width: 720px; }
.photo-hero h1 .accent { color: var(--gold-hi); }
.photo-hero .eyebrow { color: var(--gold-hi); }
.photo-hero a:not(.btn):not(.step) { color: var(--gold-hi); }
.photo-hero .seg label input:checked + span, .photo-hero .seg button.on { background: var(--gold-hi); color: #1d1c24; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: rgba(255,255,255,.85); margin: 6px 0 18px; }
.hero-meta .i { width: 16px; height: 16px; color: var(--gold-hi); }
.hero-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.4); }
.hero-rsvp { max-width: 620px; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.slim-hero { min-height: 0; padding-bottom: 28px; }
.slim-hero h1 { margin-bottom: 0; }
.game-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.game-hero-top .eyebrow { margin: 0; }
.hero-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin: 4px 0 20px; max-width: 460px; }
.hero-counters > div, .hero-stats > div { padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); }
.hero-counters b { display: block; font-family: var(--head); font-size: 1.5rem; line-height: 1.1; }
.hero-counters b small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.hero-counters span, .hero-stats span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(6, 1fr); } }
.hero-stats > div { text-align: center; }
.hero-stats b { display: block; font-family: var(--head); font-size: 1.35rem; }
.profile-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 200px; }
.profile-main h1 { margin: 0 0 6px; }
.profile-actions { display: flex; gap: 8px; }
.shirt-no { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .2em; border-radius: .3em; font-size: .7em; vertical-align: .12em;
  background: var(--gold-hi); color: #1d1c24; }

/* ---------- Avatars ---------- */
.av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden;
  background: #ece6d9; color: #1d1c24; font-family: var(--head); font-weight: 700; box-shadow: 0 0 0 2px #fff, 0 3px 8px -3px rgba(60,40,0,.3); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-ini { background: hsl(var(--h) 75% 88%); color: hsl(var(--h) 45% 28%); }
.av-xs { width: 24px; height: 24px; font-size: .6rem; box-shadow: 0 0 0 1.5px #fff; }
.av-sm { width: 34px; height: 34px; font-size: .75rem; }
.av-md { width: 46px; height: 46px; font-size: .95rem; }
.av-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.av-xl { width: 112px; height: 112px; font-size: 2rem; box-shadow: 0 0 0 4px #fff, 0 18px 36px -12px rgba(0,0,0,.5); }
@media (min-width: 720px) { .av-xl { width: 128px; height: 128px; } }
.av-empty { background: transparent; border: 2px dashed var(--line-2); box-shadow: none; color: var(--faint); font-size: 1.4rem; font-weight: 400; }
.av-more { background: #1d1c24; color: var(--gold-hi); font-size: .72rem; }
.gold-ring, .ring-1 { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--gold), 0 10px 30px rgba(244, 180, 26, .45); }
.ring-2 { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #b9bec8; }
.ring-3 { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #d09362; }
.stack-avatars { display: flex; }
.stack-avatars .av { margin-left: -10px; }
.stack-avatars .av:first-child { margin-left: 0; }
.avatar-edit label { position: relative; display: inline-block; cursor: pointer; }
.avatar-edit input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-edit-badge { position: absolute; right: 4px; bottom: 4px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #1d1c24; box-shadow: 0 4px 12px rgba(0,0,0,.35); transition: transform .2s var(--ease); }
.avatar-edit label:hover .avatar-edit-badge { transform: scale(1.1) rotate(-8deg); }
.g-pic { width: 22px; height: 22px; border-radius: 50%; }

/* Position badges */
.pos { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 7px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.pos-gr { background: var(--gold-soft); color: #8a5a00; }
.pos-def { background: var(--sky-soft); color: #11629f; }
.pos-med { background: var(--mint-soft); color: #0b7457; }
.pos-av { background: var(--coral-soft); color: #b7331f; }

/* ---------- Forms ---------- */
input, select, button, textarea { font: inherit; color: inherit; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=month], input[type=email], input[type=search], input[type=file], select {
  padding: 10px 13px; min-height: 44px; max-width: 100%; background: var(--field); border: 1px solid var(--line-2);
  border-radius: 12px; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
input[type=file] { padding: 8px; width: 100%; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 180, 26, .22); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6b78' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.photo-hero select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.photo-hero select option { background: #2a2733; color: #fff; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.search { width: 100%; margin-bottom: 14px; padding-left: 40px !important;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6b78' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.wide-search { margin-bottom: 18px; }
.inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.num { width: 80px; text-align: center; }
.num-wide { width: 110px; }

/* Grupos de formulário: título + caixinhas curtas */
.fgroups { display: flex; flex-direction: column; gap: 14px; }
.fgroup { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--chip); min-width: 0; }
.fgroup legend { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; margin-left: -4px; border-radius: 999px;
  background: #1d1c24; color: var(--gold-hi); font-family: var(--head); font-weight: 700; font-size: .85rem; }
.fgroup legend .i { width: 15px; height: 15px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; align-items: end; margin-top: 6px; }
.fgrid > .fbox:has(.seg) { grid-column: span 2; }
@media (max-width: 460px) { .fgrid { grid-template-columns: repeat(2, 1fr); } .fgrid > .fbox:has(.seg) { grid-column: 1 / -1; } }
.fbox { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fbox > span:first-child { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fbox input { width: 100%; }
.affix { position: relative; display: block; }
.affix input { padding-right: 42px; }
.affix i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--muted); font-size: .85rem; pointer-events: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.seg.wrap { max-width: 100%; }

/* Toggle pill (checkbox) */
.toggle { position: relative; display: inline-flex; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; min-height: 42px; border-radius: 12px; font-weight: 600; font-size: .86rem;
  color: var(--muted); background: var(--field); border: 1px solid var(--line-2); transition: all .2s var(--ease); white-space: nowrap; }
.toggle span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--faint); transition: all .2s; flex: none; }
.toggle input:checked + span { color: #0b6b50; background: var(--mint-soft); border-color: rgba(22, 177, 135, .45); }
.toggle input:checked + span::before { background: var(--mint); border-color: var(--mint); box-shadow: inset 0 0 0 3px #fff; }
.toggle.pay input:checked + span { color: #6b4800; background: var(--gold-soft); border-color: rgba(244,180,26,.6); }
.toggle.pay input:checked + span::before { background: var(--gold); border-color: var(--gold); }
.toggle input:disabled + span { opacity: .55; cursor: not-allowed; }
.toggle input:focus-visible + span { box-shadow: 0 0 0 3px rgba(244,180,26,.35); }

/* Segmented buttons */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--line-2); align-items: center; }
.seg-label { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.seg-label .i { width: 15px; height: 15px; color: var(--gold-ink); }
.seg button, .seg label span { display: inline-grid; place-items: center; min-width: 40px; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); font-weight: 600; font-size: .88rem; cursor: pointer; transition: all .2s; white-space: nowrap; }
.seg label { cursor: pointer; position: relative; }
.seg label input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg button:hover, .seg label:hover span { color: var(--text); background: var(--chip); }
.seg button.on, .seg label input:checked + span { background: #1d1c24; color: var(--gold-hi); }
.seg label input:focus-visible + span { box-shadow: 0 0 0 3px rgba(244,180,26,.35); }

/* Steppers */
.stepper { display: inline-flex; align-items: center; border-radius: 12px; background: var(--field); border: 1px solid var(--line-2); overflow: hidden; }
.stepper button { width: 36px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 1.15rem; cursor: pointer; transition: background .15s; }
.stepper button:hover { background: var(--chip); }
.stepper button:active { background: var(--gold-soft); }
.stepper input { width: 38px; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; font-weight: 700; }
.stepper input:focus { box-shadow: none; }
.stepper .st-emo { padding-left: 10px; font-size: .95rem; }
.stepper.big button { width: 48px; height: 54px; font-size: 1.35rem; }
.stepper.big input { width: 58px; min-height: 54px; font-family: var(--head); font-size: 1.7rem; }

/* Color picker (radios) */
.color-pick { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.color-pick label { position: relative; cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.color-pick span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); transition: transform .15s var(--ease), box-shadow .2s; }
.color-pick.small span { width: 26px; height: 26px; }
.color-pick label.none span { background: repeating-linear-gradient(45deg, #e7e2d6 0 4px, #f6f2ea 4px 8px); }
.color-pick label:hover span { transform: scale(1.12); }
.color-pick input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); transform: scale(1.05); }
.color-pick label.none input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #a19eaa; }
.color-pick input:disabled + span { opacity: .45; cursor: not-allowed; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; min-height: 44px;
  border-radius: 14px; border: 0; cursor: pointer; font-weight: 700; font-size: .92rem; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1d1c24;
  box-shadow: 0 10px 20px -10px rgba(244, 180, 26, .9), inset 0 -3px 0 rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s var(--ease), box-shadow .25s, background .2s;
}
.btn:hover { transform: translateY(-2px); color: #1d1c24; box-shadow: 0 14px 26px -10px rgba(244, 180, 26, 1), inset 0 -3px 0 rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.5); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: 0 4px 10px -6px rgba(244, 180, 26, .9), inset 0 2px 0 rgba(0,0,0,.08); }
.btn .i { width: 17px; height: 17px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: #1d1c24; color: var(--gold-hi); box-shadow: 0 10px 20px -10px rgba(29,28,36,.8), inset 0 -3px 0 rgba(0,0,0,.3); }
.btn.primary:hover { color: var(--gold-hi); }
.btn.ghost { background: var(--field); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 2px 6px -3px rgba(60,40,0,.15); }
.btn.ghost:hover { background: var(--chip); color: var(--text); }
.photo-hero .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); box-shadow: none; backdrop-filter: blur(8px); }
.photo-hero .btn.ghost:hover { background: rgba(255,255,255,.2); }
.btn.danger { background: var(--coral-soft); color: #b7331f; border: 1px solid rgba(255, 107, 91, .35); box-shadow: none; }
.btn.danger:hover { background: #ffd6cf; color: #9b2518; }
.btn.text { background: none; border: 0; box-shadow: none; color: var(--muted); }
.btn.text:hover { color: var(--text); }
.btn.tiny { padding: 5px 11px; min-height: 32px; font-size: .82rem; border-radius: 10px; }
.btn.icon-only { padding: 0; width: 34px; min-height: 34px; }
.btn.icon-only .i { width: 15px; height: 15px; }
.btn-arrow .i:last-child { transition: transform .25s var(--ease); }
.btn-arrow:hover .i:last-child { transform: translateX(4px); }

/* ---------- RSVP ---------- */
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.rsvp-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 12px 8px;
  border-radius: 18px; border: 1px solid var(--line-2); background: var(--chip); color: var(--text);
  font-weight: 700; font-size: .95rem; cursor: pointer; backdrop-filter: blur(8px); transition: all .25s var(--ease); }
.rsvp-btn .i { width: 26px; height: 26px; }
.rsvp-btn:hover { background: var(--chip-2); transform: translateY(-3px); }
.rsvp-btn:active { transform: scale(.95); }
.rsvp-sim.on { background: var(--mint); border-color: var(--mint); color: #fff; box-shadow: 0 14px 26px -12px rgba(22, 177, 135, .9); }
.rsvp-talvez.on { background: var(--gold-hi); border-color: var(--gold); color: #1d1c24; box-shadow: 0 14px 26px -12px rgba(244, 180, 26, .9); }
.rsvp-nao.on { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 14px 26px -12px rgba(255, 107, 91, .9); }
.rsvp-btn.on { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.07) rotate(-1deg); } }
.guests { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--chip); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.guests-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-weight: 700; margin-bottom: 10px; }
.guest-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.guest-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border-radius: 999px; background: var(--gold-hi); color: #1d1c24;
  font-size: .86rem; font-weight: 700; margin: 0; }
.guest-chip span { padding-right: 2px; }
.chip-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.12); color: #1d1c24; cursor: pointer; }
.chip-x .i { width: 13px; height: 13px; }
.chip-x:hover { background: rgba(0,0,0,.25); }
.guest-add { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: min(100%, 300px); margin: 0; }
.guest-add input { flex: 1; min-width: 160px; }
.admin-guest { margin-top: 14px; }

/* ---------- Debt banner ---------- */
.debt-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border-radius: 20px;
  background: var(--coral-soft); border: 1px solid rgba(255, 107, 91, .4); color: var(--text); animation: rise .5s var(--ease) both; box-shadow: var(--shadow); }
.debt-banner:hover { color: var(--text); border-color: var(--coral); }
.debt-amount { font-family: var(--head); font-size: 1.6rem; font-weight: 800; color: var(--neg); }
.debt-text { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.debt-text span { color: var(--muted); font-size: .88rem; }
.debt-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--neg); }

/* ---------- Flash ---------- */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px;
  background: var(--mint-soft); border: 1px solid rgba(22, 177, 135, .35); color: #0b5c45; font-weight: 500; animation: rise .4s var(--ease) both; }
.flash.err { background: var(--coral-soft); border-color: rgba(255, 107, 91, .4); color: #9b2518; }
.flash.warn { background: var(--gold-soft); border-color: rgba(244, 180, 26, .45); color: #6b4800; }
.flash a { color: inherit; text-decoration: underline; }
.flash.hide { opacity: 0; transform: translateY(-8px); transition: all .4s; }

/* ---------- Badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: #f5f1e8; color: #6e6b78; border: 1px solid rgba(29,28,36,.08); vertical-align: middle; white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge.member, .badge.gold { background: var(--gold-soft); color: #8a5a00; border-color: rgba(244,180,26,.45); }
.badge.s-agendado { background: var(--sky-soft); color: #11629f; border-color: rgba(47,155,240,.35); }
.badge.s-realizado, .badge.credit, .badge.r-sim { background: var(--mint-soft); color: #0b7457; border-color: rgba(22,177,135,.35); }
.badge.s-cancelado, .badge.debt, .badge.r-nao { background: var(--coral-soft); color: #b7331f; border-color: rgba(255,107,91,.35); }
.badge.r-talvez { background: var(--gold-soft); color: #8a5a00; border-color: rgba(244,180,26,.45); }
.chip { padding: 4px 11px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; }
.chip.paid { background: var(--mint-soft); color: #0b7457; border-color: rgba(22,177,135,.35); }
.chip.unpaid { background: var(--coral-soft); color: #b7331f; border-color: rgba(255,107,91,.35); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.team-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; transition: all .2s var(--ease); }
.chip-btn .i { width: 14px; height: 14px; color: var(--gold-ink); }
.chip-btn:hover { background: var(--gold-soft); border-color: var(--gold); transform: translateY(-2px); }

/* ---------- Stat tiles ---------- */
.stat-row { margin-bottom: 18px; }
.tile, .tile-photo { display: flex; flex-direction: column; gap: 4px; min-height: 140px; justify-content: center; }
.tile-photo { --text: #fff; --muted: rgba(255,255,255,.75); color: #fff; overflow: hidden; border: 0;
  background: linear-gradient(100deg, rgba(18,16,24,.82), rgba(18,16,24,.35)), var(--img) center / cover; }
.tile-photo .tile-link { color: var(--gold-hi); }
.stat-row .tile:nth-child(2) { background: linear-gradient(135deg, rgba(221,247,238,.95), rgba(255,255,255,.88)); }
.stat-row .tile:nth-child(3) { background: linear-gradient(135deg, rgba(226,241,255,.95), rgba(255,255,255,.88)); }
.label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.tile-value { font-family: var(--head); font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.tile-value small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.tile-sub { color: var(--muted); font-size: .88rem; }
.tile-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .88rem; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.stats > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--chip); border: 1px solid var(--line); }
.stats .value { font-family: var(--head); font-size: 1.3rem; font-weight: 700; }
.stats .value.big { font-size: 1.7rem; color: var(--gold-ink); }

/* Form dots */
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; font-style: normal; font-size: .6rem; font-weight: 800; }
.form .f-w { background: var(--mint); color: #fff; }
.form .f-d { background: #d9d5cc; color: #55525d; }
.form .f-l { background: var(--coral); color: #fff; }

/* ---------- Lists ---------- */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 9px 2px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plain li:last-child { border-bottom: 0; }
.top-list li { flex-wrap: nowrap; }
.top-list .tl-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.top-list .tl-name a { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-pts { text-align: right; line-height: 1.1; }
.tl-pts b { display: block; font-family: var(--head); font-size: 1.3rem; }
.tl-pts small { color: var(--muted); font-size: .75rem; }
.player-link { color: var(--text); font-weight: 700; }
.player-link:hover { color: var(--gold-ink); }

.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 18px;
  color: var(--text); background: var(--field); border: 1px solid var(--line); transition: all .25s var(--ease); }
.game-row:hover { border-color: var(--gold); transform: translateX(4px); color: var(--text); box-shadow: var(--shadow); }
.date-tile { display: grid; place-items: center; width: 50px; height: 54px; border-radius: 14px; line-height: 1; background: #1d1c24; }
.date-tile b { font-family: var(--head); font-size: 1.3rem; color: var(--gold-hi); }
.date-tile span { font-size: .62rem; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 700; letter-spacing: .08em; }
.gdate { font-weight: 700; }
.gsub { font-size: .84rem; color: var(--muted); }
.row-emos { display: flex; gap: 6px; }
@media (max-width: 560px) { .game-row { grid-template-columns: auto 1fr auto; } .game-row > .hide-sm, .game-row > span:empty { display: none; } }
.last-game { display: flex; align-items: center; gap: 12px; color: var(--text); margin-bottom: 12px; }
.last-game:hover { color: var(--gold-ink); }

/* ---------- Squad (quem vai) ---------- */
.squad { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.squad-player { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 6px 12px; border-radius: 18px; text-align: center;
  color: var(--text); background: var(--field); border: 1px solid var(--line); transition: all .25s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.squad-player:hover { color: var(--text); transform: translateY(-4px) rotate(-1deg); border-color: var(--gold); box-shadow: var(--shadow); }
.squad-player.empty { background: none; border-style: dashed; border-color: var(--line-2); }
.squad-player.empty:hover { transform: none; box-shadow: none; }
.sp-name { font-weight: 700; font-size: .84rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sp-tag { font-size: .68rem; color: var(--gold-ink); font-weight: 600; }
.mini-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-p { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); font-size: .84rem; font-weight: 600; }
.mini-p.maybe { border-color: rgba(244,180,26,.55); background: var(--gold-soft); }
.mini-p.no { opacity: .55; }
.empty-photo { display: grid; place-items: center; min-height: 150px; border-radius: 18px; margin-bottom: 14px; color: #fff; font-weight: 700; text-align: center; padding: 20px;
  background: linear-gradient(0deg, rgba(18,16,24,.7), rgba(18,16,24,.35)), var(--img) center / cover; }

/* ---------- Teams ---------- */
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.team { position: relative; overflow: hidden; border-radius: 20px; padding: 16px 16px 8px; background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); animation: rise .6s var(--ease) both; }
.team::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.team:nth-child(2) { animation-delay: .06s; } .team:nth-child(3) { animation-delay: .12s; } .team:nth-child(4) { animation-delay: .18s; } .team:nth-child(5) { animation-delay: .24s; }
.team-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.team-head h3 { margin: 0; flex: 1; color: color-mix(in srgb, var(--c) 70%, #1d1c24); }
.kit { width: 24px; height: 24px; border-radius: 8px; background: var(--c); box-shadow: inset 0 -6px 0 rgba(0,0,0,.15); }
.team-list li { flex-wrap: nowrap; border-color: color-mix(in srgb, var(--c) 15%, transparent); }
.tl-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Matches ---------- */
.match { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); margin-bottom: 8px; }
.match .sc { font-family: var(--head); font-size: 1.25rem; padding: 2px 12px; margin: 0 6px; border-radius: 10px; background: #1d1c24; color: var(--gold-hi); }
.match-builder { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; margin-top: 16px; padding: 16px; border-radius: 20px; background: var(--chip); border: 1px solid var(--line); }
@media (min-width: 760px) { .match-builder { grid-template-columns: 1fr auto 1fr; } .mb-actions { grid-column: 1 / -1; } }
.mb-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mb-vs { text-align: center; font-family: var(--head); font-size: 1.4rem; color: var(--faint); }
.mb-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.mb-noscore > summary { cursor: pointer; color: var(--muted); font-size: .88rem; padding: 8px; }
.mb-noscore[open] > summary { margin-bottom: 8px; }

/* ---------- My stats ---------- */
.my-stats { background: linear-gradient(135deg, rgba(255,240,196,.95), rgba(255,255,255,.88)); border-color: rgba(244,180,26,.45); }
.my-stats-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ms-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.ms-emo { font-size: 1.6rem; }
.ms-label { font-weight: 700; min-width: 90px; }

/* ---------- Marcadores ao vivo ---------- */
.live-card { border-color: rgba(22,177,135,.3); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--mint-soft); color: #0b7457; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(22,177,135,.6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(22,177,135,0); } 100% { box-shadow: 0 0 0 0 rgba(22,177,135,0); } }
.live-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.live-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 18px;
  background: var(--field); border: 1px solid var(--line); border-left: 5px solid var(--c); transition: background .3s; }
.live-row.me { background: linear-gradient(90deg, var(--gold-soft), #fff 70%); border-color: rgba(244,180,26,.45); }
.live-row.flash-up { animation: flashup .8s var(--ease); }
@keyframes flashup { 30% { background: var(--mint-soft); } }
.lr-player { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 200px; }
.lr-player b { display: block; }
.lr-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.vstat { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; }
.vstat .i { width: 12px; height: 12px; }
.vstat.ok { color: #0b7457; }
.vstat.wait { color: var(--muted); font-weight: 600; }
.btn-validate { border: 0; cursor: pointer; padding: 3px 10px; border-radius: 999px; background: var(--mint); color: #fff; }
.btn-validate:hover { background: #0f946f; }
.lr-counters { display: flex; gap: 8px; }
.lr-counter { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: var(--chip); border: 1px solid var(--line); }
.lr-emo { font-size: 1.05rem; padding: 0 4px 0 6px; }
.lr-counter b { min-width: 28px; text-align: center; font-family: var(--head); font-size: 1.25rem; }
.lv { width: 36px; height: 36px; border-radius: 11px; border: 0; background: #fff; color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.1); transition: transform .12s, background .15s; }
.lv:hover { background: var(--gold-soft); }
.lv:active { transform: scale(.9); }
.lv.plus { background: var(--gold-hi); }
.lv.plus:hover { background: var(--gold); }
.live-score { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ls-side { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--chip); }
.ls-side b { min-width: 30px; text-align: center; font-family: var(--head); font-size: 1.3rem; }
.lsb { width: 30px; height: 30px; border: 0; border-radius: 9px; background: #fff; cursor: pointer; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.lsb:active { transform: scale(.9); }
.ls-sep { color: var(--faint); font-weight: 700; }

/* ---------- MVP ---------- */
.mvp-leader { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 12px; border-radius: 18px; background: var(--gold-soft); border: 1px solid rgba(244,180,26,.5); }
.mvp-leader b { display: block; font-family: var(--head); font-size: 1.25rem; }
.mvp-leader .eyebrow { margin: 0; color: #8a5a00; }
.votes li { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 30px; gap: 12px; align-items: center; }
.v-name { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.votes .bar { height: 10px; border-radius: 999px; background: var(--chip-2); overflow: hidden; position: relative; }
.votes .bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); animation: grow 1s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.vote-grid.compact { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.vote-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 18px;
  border: 1px solid var(--line-2); background: var(--field); color: var(--text); cursor: pointer; font-weight: 700; font-size: .84rem;
  transition: all .25s var(--ease); text-align: center; }
.vote-card:hover { transform: translateY(-4px) rotate(1deg); border-color: var(--gold); background: var(--gold-soft); }
.vote-card.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 2px var(--gold), 0 14px 30px -16px rgba(244,180,26,.9); }
.vote-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: #1d1c24; color: var(--gold-hi); display: grid; place-items: center; }
.vote-check .i { width: 13px; height: 13px; }
.mvp-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; margin: 12px 0; background: var(--gold-soft); border: 1px solid rgba(244,180,26,.5); }
.mvp-card .eyebrow { display: block; margin: 0; }
.mvp-prompt { border-color: rgba(244,180,26,.5); background: linear-gradient(120deg, rgba(255,240,196,.95), rgba(255,255,255,.88) 60%); }

/* ---------- Game sheet (admin) ---------- */
.sheet-list { display: flex; flex-direction: column; gap: 10px; }
.sheet-row { position: relative; display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px; border-radius: 18px;
  background: var(--field); border: 1px solid var(--line); border-left: 5px solid var(--c); transition: background .2s, opacity .2s; }
.sheet-row:not(.is-present) { opacity: .65; }
.sr-player { display: flex; align-items: center; gap: 10px; padding-right: 40px; }
.sr-player b { display: block; }
.sr-remove { position: absolute; top: 12px; right: 12px; }
@media (min-width: 1000px) {
  .sheet-row { grid-template-columns: minmax(200px, 1.4fr) auto auto auto 34px; align-items: center; }
  .sr-player { padding-right: 0; }
  .sr-remove { position: static; }
}
.sheet-row > .toggle, .sheet-row > .color-pick, .sheet-row > .stepper, .sheet-row > .sr-paid { justify-self: start; }
.sheet-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 720px) { .sheet-save { bottom: 96px; } .sheet-save .btn { width: 100%; } }
.close-box { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--chip); border: 1px solid var(--line); margin-bottom: 8px; }
.close-box > div:first-child { flex: 1; min-width: 240px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -8px; padding: 0 8px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table th, .table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.table th { font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .1em; font-weight: 700; }
.table th .i { width: 15px; height: 15px; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(244, 180, 26, .07); }
.table .left { text-align: left; }
.table tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; font-weight: 700; }
.table.compact td, .table.compact th { padding: 8px 7px; }
.table tr.inactive { opacity: .45; }
.standings tbody tr { animation: rise .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 25ms); }
.standings tr.me-row td { background: var(--gold-soft); }
.standings tr.me-row td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.player-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.player-cell:hover { color: var(--gold-ink); }
.pts { font-family: var(--head); font-weight: 800; font-size: 1.05rem; }
.hot { color: var(--coral); font-weight: 800; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-family: var(--head); font-weight: 800; font-size: .85rem; background: var(--chip); color: var(--muted); }
.rank.r1 { background: linear-gradient(145deg, #ffe07a, #f4b41a); color: #3b2600; box-shadow: 0 4px 10px -4px rgba(244,180,26,.9); }
.rank.r2 { background: linear-gradient(145deg, #f1f3f6, #b9bec8); color: #2a2e36; }
.rank.r3 { background: linear-gradient(145deg, #f3c9a2, #cf8f5a); color: #3b1c05; }
.eff { position: relative; min-width: 80px; height: 22px; border-radius: 999px; background: var(--chip-2); overflow: hidden; display: grid; place-items: center; }
.eff::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, var(--gold), var(--gold-hi)); border-radius: 999px; animation: grow 1s var(--ease) both; transform-origin: left; }
.eff span { position: relative; font-size: .74rem; font-weight: 800; color: #1d1c24; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.pivot td, .pivot th { font-variant-numeric: tabular-nums; }

/* ---------- Podium (dentro da foto) ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin-top: 26px; max-width: 760px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px 16px; border-radius: 22px; text-align: center; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); animation: rise .7s var(--ease) both; transition: transform .25s var(--ease); }
.step:hover { color: #fff; transform: translateY(-5px); }
.step.s1 { padding-top: 24px; background: linear-gradient(180deg, rgba(255,207,74,.45), rgba(255,255,255,.1)); border-color: rgba(255,207,74,.6); animation-delay: .1s; }
.step.s2 { animation-delay: .2s; } .step.s3 { animation-delay: .3s; }
.step-rank { font-family: var(--head); font-weight: 800; color: rgba(255,255,255,.8); font-size: .9rem; }
.s1 .step-rank { color: var(--gold-hi); }
.step .ring-1 { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--gold-hi), 0 10px 30px rgba(244,180,26,.6); }
.pname { font-weight: 700; font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppts { font-family: var(--head); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.ppts small { font-size: .8rem; opacity: .75; }
.psub { font-size: .72rem; opacity: .75; }
@media (max-width: 480px) { .podium .av-xl { width: 84px; height: 84px; } .podium .av-lg { width: 56px; height: 56px; } }

/* ---------- Players grid ---------- */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
@media (max-width: 420px) { .player-grid { grid-template-columns: repeat(2, 1fr); } }
.player-card { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: var(--blur); box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s; animation: rise .5s var(--ease) both; }
.player-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.player-card.inactive { opacity: .45; }
.pc-shirt { position: absolute; top: 10px; left: 10px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center;
  background: #1d1c24; color: var(--gold-hi); font-family: var(--head); font-weight: 800; font-size: .8rem; }
.pc-link { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 8px; color: var(--text); text-align: center; }
.pc-link:hover { color: var(--text); }
.pc-name { font-weight: 700; line-height: 1.2; }
.pc-stats { font-size: .78rem; color: var(--muted); }
.pc-foot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 4px 10px 14px; min-height: 20px; }

/* ---------- Modal ---------- */
.modal { width: min(540px, calc(100% - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 26px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(29, 28, 36, .5); }
.modal::backdrop { background: rgba(29, 28, 36, .45); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .3s var(--ease) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal > form { padding: 22px; }
.modal-head { display: flex; align-items: center; gap: 12px; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Pick player (onboarding) ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 18px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--text); cursor: pointer; font-weight: 700; font-size: .86rem; transition: all .2s var(--ease); }
.pick:hover { background: var(--gold-soft); border-color: var(--gold); transform: translateY(-3px); }

/* ---------- Photo onboarding ---------- */
.onboard { max-width: 720px; margin: 0 auto; }
.onboard-hero { min-height: 220px; display: flex; align-items: flex-end; }
.onboard-card { text-align: center; }
.photo-form { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.photo-drop { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; width: 100%; border-radius: 22px; cursor: pointer;
  border: 2px dashed var(--line-2); transition: border-color .2s, background .2s; }
.photo-drop:hover { border-color: var(--gold); background: var(--gold-soft); }
.photo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-drop-text { display: flex; flex-direction: column; }
.photo-drop-text b { color: var(--gold-ink); font-size: 1.05rem; }
.photo-drop-text span { color: var(--muted); font-size: .88rem; }
.onboard-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Fees ---------- */
.fee { display: inline-block; min-width: 56px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: .8rem; font-weight: 800; transition: transform .15s var(--ease); }
.fee:hover { transform: scale(1.08); }
.fee.paid { background: var(--mint-soft); color: #0b7457; border-color: rgba(22,177,135,.4); }
.fee.unpaid { background: var(--coral-soft); color: #b7331f; border-color: rgba(255,107,91,.4); }
.fee.empty { background: transparent; color: var(--faint); border: 1px dashed var(--line-2); }
span.fee { cursor: default; }
span.fee:hover { transform: none; }

/* ---------- Compare ---------- */
.compare-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.compare-form .vs { font-family: var(--head); font-weight: 800; font-size: .8rem; padding: 6px 10px; border-radius: 10px; background: #1d1c24; color: var(--gold-hi); }
.cmp-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin-bottom: 14px; gap: 10px; }
.cmp-p { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); }
.cmp-p h2 { margin: 0; font-size: 1.1rem; justify-content: center; }
.cmp-p.ca .av { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sky); }
.cmp-p.cb .av { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--coral); }
.cmp-row { display: grid; grid-template-columns: 64px 1fr 64px; grid-template-areas: "a bar b" ". label ."; align-items: center; gap: 4px 12px; margin: 12px 0; text-align: center; }
.cmp-row > b:first-child { grid-area: a; font-family: var(--head); font-size: 1.1rem; }
.cmp-row > b:nth-of-type(2) { grid-area: b; font-family: var(--head); font-size: 1.1rem; }
.cmp-row .cmp-bar, .cmp-row > div { grid-area: bar; }
.cmp-label { grid-area: label; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.cmp-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--chip-2); gap: 3px; }
.cmp-bar .l { width: var(--w); background: var(--sky); border-radius: 999px; animation: grow 1s var(--ease) both; transform-origin: left; }
.cmp-bar .r { width: var(--w); background: var(--coral); margin-left: auto; border-radius: 999px; animation: grow 1s var(--ease) both; transform-origin: right; }
.cmp-row b.win { color: var(--pos); }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; isolation: isolate; }
.login-page::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--img) center / cover; animation: kenburns 30s ease-in-out infinite alternate; }
.login-page::after { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 45%, rgba(18,16,24,.25), rgba(18,16,24,.75) 75%); }
.login-card { width: 100%; max-width: 410px; padding: 34px 28px 24px; text-align: center; background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255,255,255,.8); border-radius: 30px; backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); animation: rise .8s var(--ease) both; }
.login-card h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login-logo { width: 160px; height: 160px; object-fit: contain; margin-top: -6px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.25)); animation: rise .8s var(--ease) both, float 6s ease-in-out 1s infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-1deg); } }
.login-feats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.login-feats span { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; color: var(--text);
  padding: 5px 11px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.login-feats span:nth-child(1) .i { color: var(--mint); }
.login-feats span:nth-child(2) .i { color: var(--sky); }
.login-feats span:nth-child(3) .i { color: var(--gold-ink); }
.login-feats span:nth-child(4) .i { color: var(--coral); }
.login-feats .i { width: 13px; height: 13px; }
.g_id_signin { display: flex; justify-content: center; margin: 22px 0 12px; min-height: 44px; }
.dev-login { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Misc ---------- */
.list-head { display: flex; align-items: center; gap: 8px; }
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.field > .seg, .fbox > .seg { align-self: flex-start; }
.fgrid > .fbox:has(input[name="location"]), .fgrid > .fbox:has(input[name="notes"]) { grid-column: span 2; }
@media (max-width: 460px) { .fgrid > .fbox:has(input[name="location"]) { grid-column: 1 / -1; } }

/* Vagas (admin) */
.cap-adjust { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.cap-adjust button { width: 24px; height: 24px; border-radius: 8px; border: 0; background: rgba(255,255,255,.2); color: #fff; font-weight: 800; cursor: pointer; }
.cap-adjust button:hover { background: var(--gold-hi); color: #1d1c24; }
.cap-adjust span { font-size: .7rem; color: rgba(255,255,255,.75); font-weight: 700; }
/* Cor da equipa */
.squad-player.has-team { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: inset 0 4px 0 var(--c); }
.sp-team { display: inline-flex; align-items: center; gap: 4px; font-size: .66rem; font-weight: 800; color: color-mix(in srgb, var(--c) 75%, #1d1c24); text-transform: uppercase; letter-spacing: .06em; }
.sp-team::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.live-team { display: flex; align-items: center; gap: 10px; margin: 10px 2px 2px; padding: 8px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #1d1c24); }
.live-team:first-child { margin-top: 0; }
.live-team b { flex: 1; font-family: var(--head); font-size: 1rem; }
