:root {
  --gmc-bg: #020617;
  --gmc-panel: rgba(15, 23, 42, .82);
  --gmc-border: rgba(148, 163, 184, .18);
  --gmc-text: #e2e8f0;
  --gmc-muted: #94a3b8;
  --gmc-primary: #10b981;
  --gmc-primary-2: #38bdf8;
  --gmc-danger: #ef4444;
  --gmc-warning: #f59e0b;
  --gmc-radius: 18px;
  --gmc-shadow: 0 24px 60px rgba(2, 6, 23, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 0; overflow-x: hidden; text-rendering: optimizeLegibility; }
img, video, iframe, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.gmc-glass {
  background: var(--gmc-panel);
  border: 1px solid var(--gmc-border);
  backdrop-filter: blur(18px);
  border-radius: var(--gmc-radius);
  box-shadow: var(--gmc-shadow);
}

.gmc-page-shell { width: min(1440px, 100%); margin-inline: auto; padding-inline: clamp(14px, 3vw, 34px); }
.gmc-badge { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--gmc-border); border-radius: 999px; padding: .4rem .72rem; font-size: .75rem; font-weight: 800; }
.gmc-field { width: 100%; min-height: 46px; border: 1px solid #334155; border-radius: 12px; background: rgba(2,6,23,.72); color: #fff; padding: .75rem .9rem; outline: none; transition: .2s; }
.gmc-field:focus { border-color: var(--gmc-primary); box-shadow: 0 0 0 4px rgba(16,185,129,.14); }
.gmc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; border-radius: 12px; padding: .72rem 1rem; font-weight: 800; transition: transform .18s, filter .18s, background .18s; cursor: pointer; }
.gmc-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.gmc-btn-primary { color: #03130e; background: linear-gradient(135deg, var(--gmc-primary), #34d399); }
.gmc-btn-secondary { color: #e2e8f0; background: #172033; border: 1px solid #334155; }
.gmc-btn-danger { color: #fff; background: #b91c1c; }
.gmc-alert { border-radius: 14px; padding: .9rem 1rem; border: 1px solid; font-size: .9rem; }
.gmc-alert-success { color: #a7f3d0; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); }
.gmc-alert-error { color: #fecaca; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.38); }
.gmc-alert-warning { color: #fde68a; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.38); }

/* Corrige tabelas e grids legados em telas menores */
.gmc-table-wrap, .overflow-x-auto { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; }
textarea { resize: vertical; min-height: 110px; }

/* Modais nunca ultrapassam a viewport */
[role="dialog"], .modal-content, .swal2-popup { max-width: min(94vw, 760px) !important; max-height: 92vh; overflow-y: auto; }

/* Status de pontuação real */
.gmc-score-ring { --score: 0; width: 110px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--gmc-primary) calc(var(--score) * 1%), rgba(148,163,184,.16) 0); position: relative; }
.gmc-score-ring::before { content: ''; position: absolute; inset: 9px; background: #0f172a; border-radius: 50%; }
.gmc-score-ring > span { position: relative; z-index: 1; font-weight: 900; font-size: 1.35rem; color: #fff; }

/* Cabeçalhos fixos existentes ficam mais compactos no mobile */
@media (max-width: 767px) {
  body { font-size: 15px; }
  nav.sticky, header.sticky { position: sticky; top: 0; }
  .fixed.bottom-6.right-6 { right: 14px !important; bottom: 14px !important; }
  .p-10, .md\:p-10 { padding: 1.15rem !important; }
  .p-8, .md\:p-8 { padding: 1rem !important; }
  .gap-8 { gap: 1rem !important; }
  .rounded-3xl { border-radius: 1.1rem !important; }
  h1 { overflow-wrap: anywhere; }
  .input-dark, input, select, textarea { font-size: 16px !important; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { min-width: 0; }
}

@media (max-width: 520px) {
  .gmc-mobile-stack { display: grid !important; grid-template-columns: 1fr !important; }
  .gmc-btn { width: 100%; }
  .hidden-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.gmc-cookie-banner {
  position: fixed;
  z-index: 9999;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(760px, calc(100vw - 28px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(2, 6, 23, .97);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .46);
  color: #e2e8f0;
}
.gmc-cookie-banner strong { color: #fff; }
.gmc-cookie-banner p { margin: 5px 0 0; color: #94a3b8; font-size: .86rem; line-height: 1.5; }
.gmc-cookie-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.gmc-cookie-actions button { border: 1px solid #334155; border-radius: 11px; padding: 10px 13px; background: #172033; color: #e2e8f0; font-weight: 800; cursor: pointer; }
.gmc-cookie-actions button:last-child { background: #10b981; color: #03130e; border-color: #10b981; }
@media (max-width: 680px) {
  .gmc-cookie-banner { align-items: stretch; flex-direction: column; }
  .gmc-cookie-actions { display: grid; grid-template-columns: 1fr; }
  .gmc-cookie-actions button { width: 100%; }
}
