/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  THE MASK CUP — BASE DAS PÁGINAS                                     ║
   ║  Peças comuns das páginas refeitas (topo, títulos, cards, filtros,   ║
   ║  avisos, vazio). Cada página só acrescenta o que é dela.             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pg {
  --gutter: clamp(16px, 4vw, 48px);
  --cut: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  --cut-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  --hex: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  padding-bottom: clamp(64px, 8vw, 110px);
}
/* hidden sempre esconde, mesmo em peças com display próprio */
.pg [hidden] { display: none !important; }
.pg-wrap { max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.pg-wrap.is-narrow { max-width: 820px; }
.pg-wrap.is-wide { max-width: 1180px; }

/* ═══════════════ TOPO ═══════════════ */
.pg-hero {
  padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); margin-bottom: 26px;
  background:
    radial-gradient(50% 120% at 20% 0%, rgba(79,163,157,.16), transparent 62%),
    radial-gradient(40% 100% at 90% 10%, rgba(217,169,76,.10), transparent 62%);
  border-bottom: 1px solid var(--border);
}
.pg-hero.is-gold {
  background:
    radial-gradient(50% 120% at 20% 0%, rgba(217,169,76,.18), transparent 62%),
    radial-gradient(40% 100% at 90% 10%, rgba(79,163,157,.10), transparent 62%);
}
.pg-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pg-title { margin: 12px 0 8px; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(46px, 7vw, 84px); line-height: .92; color: var(--silver-hi); }
.pg-title .t-teal { color: var(--teal-hi); }
.pg-title .t-gold { color: var(--gold); }
.pg-title .t-dim { color: var(--text-mute); }
.pg-sub { margin: 0; max-width: 620px; color: var(--text-dim); font-size: 15px; line-height: 1.6; }
.pg-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pg-stats > div {
  display: flex; flex-direction: column; min-width: 100px; padding: 10px 14px; clip-path: var(--cut-sm);
  background: linear-gradient(155deg, #121418, #0B0C0F); background: linear-gradient(155deg, light-dark(#fefefe, #121418), light-dark(#f5f6f8, #0B0C0F)); box-shadow: inset 0 0 0 1px var(--border);
}
.pg-stats b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 30px; line-height: 1; color: var(--silver-hi); }
.pg-stats span { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-mute); }

/* ═══════════════ SEÇÕES ═══════════════ */
.pg-sec { margin-top: clamp(30px, 4vw, 48px); }
.pg-sec:first-child { margin-top: 0; }
.pg-h2 {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: .5px; color: var(--silver-hi);
}
.pg-h2 .ico { color: var(--teal-hi); flex: 0 0 auto; }
.pg-h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }
.pg-h3 { margin: 0 0 6px; font-family: 'Rajdhani', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: .3px; color: var(--silver-hi); }
.pg-muted { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.pg-label { display: block; font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-mute); }

/* ═══════════════ CARDS ═══════════════ */
.pg-card {
  position: relative; padding: 18px; clip-path: var(--cut);
  background: radial-gradient(120% 90% at 0% 0%, rgba(79,163,157,.06), transparent 60%), linear-gradient(160deg, #131519, #0B0C0F); background: radial-gradient(120% 90% at 0% 0%, rgba(79,163,157,.06), transparent 60%), linear-gradient(160deg, light-dark(#ffffff, #131519), light-dark(#f5f6f8, #0B0C0F));
  box-shadow: inset 0 0 0 1px var(--border);
}
.pg-card.is-gold { background: radial-gradient(120% 90% at 0% 0%, rgba(217,169,76,.10), transparent 60%), linear-gradient(160deg, #15151A, #0B0C0F); background: radial-gradient(120% 90% at 0% 0%, rgba(217,169,76,.10), transparent 60%), linear-gradient(160deg, light-dark(#ffffff, #15151A), light-dark(#f5f6f8, #0B0C0F)); box-shadow: inset 0 0 0 1px rgba(217,169,76,.25); }
.pg-card.is-link { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.pg-card.is-link:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(79,163,157,.5); }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pg-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-ico {
  width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--teal-hi);
  background: rgba(79,163,157,.12); clip-path: var(--hex);
}
.pg-ico.is-gold { color: var(--gold-hi); background: rgba(217,169,76,.12); }
.pg-ico.is-red { color: #F08A83; color: light-dark(#c12217, #F08A83); background: rgba(217,100,92,.12); }
.pg-ico.is-lg { width: 56px; height: 56px; }

/* ═══════════════ TAGS ═══════════════ */
.pg-tag {
  --c: var(--silver); display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; white-space: nowrap;
  font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.pg-tag.is-teal { --c: var(--teal-hi); }
.pg-tag.is-gold { --c: var(--gold-hi); }
.pg-tag.is-green { --c: var(--success); }
.pg-tag.is-red { --c: var(--danger); }
.pg-tag.is-mute { --c: var(--text-dim); }
.pg-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

/* ═══════════════ FILTROS / BUSCA ═══════════════ */
.pg-bar { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pg-search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-mute); }
.pg-search:focus-within { box-shadow: inset 0 0 0 1px var(--teal); color: var(--teal-hi); }
.pg-search input { width: 100%; padding: 12px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; }
.pg-chips { display: flex; gap: 4px; padding: 4px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--border); overflow-x: auto; scrollbar-width: none; }
.pg-chips::-webkit-scrollbar { display: none; }
.pg-chips > * {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 0; background: none; cursor: pointer; text-decoration: none;
  font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-dim);
  transition: background .15s, color .15s;
}
.pg-chips > *:hover { color: var(--silver-hi); background: rgba(194,200,208,.05); background: light-dark(rgba(14,20,28,.053), rgba(194,200,208,.05)); }
.pg-chips > .is-on { color: #06110F; color: light-dark(#ffffff, #06110F); background: linear-gradient(100deg, var(--teal), var(--teal-hi)); }
.pg-chips b { font-weight: 700; opacity: .7; }

/* ═══════════════ AVISOS / VAZIO ═══════════════ */
.pg-alert {
  --c: var(--teal); display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 13px 16px; font-size: 14px; line-height: 1.5; color: var(--text);
  background: color-mix(in srgb, var(--c) 8%, transparent); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}
.pg-alert > .ico { flex: 0 0 auto; margin-top: 2px; color: var(--c); }
.pg-alert.is-ok { --c: var(--success); }
.pg-alert.is-bad { --c: var(--danger); }
.pg-alert.is-warn { --c: var(--gold); }
.pg-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 20px; text-align: center; color: var(--text-mute);
  background: var(--bg1); box-shadow: inset 0 0 0 1px var(--border);
}
.pg-empty p { margin: 0; max-width: 440px; color: var(--text-dim); line-height: 1.6; }
.pg-empty .g-btn { margin-top: 4px; text-decoration: none; }

/* ═══════════════ FORMULÁRIOS ═══════════════ */
.pg-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.pg-input, .pg-field input[type=text], .pg-field input[type=email], .pg-field select, .pg-field textarea {
  width: 100%; padding: 12px 14px; border: 0; outline: 0; border-radius: 0; font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg1); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s;
}
.pg-field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.pg-input:focus, .pg-field input:focus, .pg-field select:focus, .pg-field textarea:focus { box-shadow: inset 0 0 0 1px var(--teal); }
.pg-field select option { background: #0E0F12; background: light-dark(#f8f9fa, #0E0F12); }
.pg-hint { font-size: 12px; color: var(--text-mute); }

/* Botões pequenos */
.g-btn.is-sm { padding: 10px 16px; font-size: 12px; }
.g-btn.is-danger { color: var(--danger); background: transparent; box-shadow: inset 0 0 0 1px rgba(217,100,92,.35); }
.g-btn.is-danger:hover { color: #F08A83; color: light-dark(#c12217, #F08A83); box-shadow: inset 0 0 0 1px var(--danger); }
a.g-btn { text-decoration: none; }

/* ═══════════════ RESPONSIVO ═══════════════ */
@media (max-width: 800px) {
  .pg-grid.is-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pg-hero-row { flex-direction: column; align-items: stretch; }
  .pg-grid.is-2, .pg-grid.is-3 { grid-template-columns: 1fr; }
  .pg-bar { flex-direction: column; flex-wrap: nowrap; }
  .pg-bar > * { min-width: 0; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-card.is-link { transition: none; }
  .pg-card.is-link:hover { transform: none; }
}
