/* Complementa gabarita.css. Carregar por último, após os estilos da página. */
body.gabarita-theme {
  --primary: #1e3a8a;
  --primary-dark: #1b2d59;
  --accent: #15803d;
  --danger: #b91c1c;
  --text-main: #17233b;
  --text-muted: #53647b;
  --border: #dbe3ee;
  --brand-yellow: #fbbf24;
  margin: 0;
  color: var(--text-main);
  background: #f4f7fb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
.gabarita-theme *, .gabarita-theme *::before, .gabarita-theme *::after { box-sizing: border-box; }
.gabarita-theme [hidden] { display: none !important; }
.gabarita-theme a { text-underline-offset: 3px; }
.gabarita-theme :focus-visible { outline: 3px solid #ca8a04; outline-offset: 4px; }
.gabarita-theme .skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: 0.6rem 1rem; background: #fff; color: #1b2d59; border-radius: 8px; }
.gabarita-theme .skip-link:focus { top: 1rem; }
.gabarita-theme .header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem max(1.25rem, calc((100vw - 1280px) / 2));
  background: #fff;
  border-bottom: 3px solid var(--brand-yellow);
  box-shadow: 0 3px 16px #1b2d5909;
  position: relative;
}
.gabarita-theme .brand { display: inline-flex; align-items: center; gap: 0.7rem; color: #1b2d59; text-decoration: none; white-space: nowrap; }
.gabarita-theme .brand-logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.gabarita-theme .brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.gabarita-theme .brand-copy strong { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.025em; }
.gabarita-theme .brand-copy small { margin-top: 0.2rem; font-size: 0.72rem; color: #53647b; font-weight: 500; }
.gabarita-theme .nav-links { display: flex; align-items: center; justify-content: center; gap: 0.2rem; min-width: 0; }
.gabarita-theme .nav-links a { display: block; padding: 0.6rem 0.65rem; color: #46566f; border-radius: 8px; font-size: 0.84rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.gabarita-theme .nav-links a:hover { color: #1e3a8a; background: #f1f5fb; }
.gabarita-theme .nav-links a.active { color: #1e3a8a; background: #eaf0fc; box-shadow: inset 0 -2px #1e3a8a; }
.gabarita-theme #user-menu { min-width: 0; justify-content: flex-end; }
.gabarita-theme #user-menu a { max-width: 170px; overflow-wrap: anywhere; }
.gabarita-theme .header-auth-links { display: flex; align-items: center; gap: 0.7rem; }
.gabarita-theme .header-auth-links a { font-size: 0.85rem; font-weight: 650; text-decoration: none; color: #1e3a8a; }
.gabarita-theme .header-auth-links .header-signup { padding: 0.5rem 0.8rem; border: 1px solid #dbe3ee; border-radius: 8px; }
.gabarita-theme main.container { width: min(1120px, calc(100% - 40px)); max-width: none; margin: 2rem auto 3rem; padding: 0; min-width: 0; }
.gabarita-theme h1, .gabarita-theme h2, .gabarita-theme h3, .gabarita-theme h4 { line-height: 1.3; letter-spacing: -0.02em; }
.gabarita-theme .card { border: 1px solid #dbe3ee; border-radius: 14px; background: #fff; padding: 1.5rem; box-shadow: 0 4px 18px #1b2d5907; min-width: 0; }
.gabarita-theme .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; border: 1px solid transparent; border-radius: 9px; padding: 0.7rem 1rem; background: #1e3a8a; color: #fff; font: inherit; font-size: 0.92rem; font-weight: 650; text-decoration: none; cursor: pointer; transition: box-shadow 0.18s, opacity 0.18s; }
.gabarita-theme .btn:hover:not(:disabled) { box-shadow: 0 3px 12px #1e3a8a25; }
.gabarita-theme .btn-secondary { background: #f1f5fb; color: #1e3a8a; border-color: #dbe3ee; }
.gabarita-theme button:disabled { opacity: 0.6; cursor: not-allowed; }
.gabarita-theme .form-control { width: 100%; min-height: 46px; border: 1px solid #c7d2e1; border-radius: 9px; padding: 0.75rem; color: #17233b; background: #fff; font: inherit; }
.gabarita-theme .form-control:focus { border-color: #1e3a8a; box-shadow: 0 0 0 3px #1e3a8a12; }
.gabarita-theme .auth-card { border-top: 4px solid #1e3a8a; }
.gabarita-theme .auth-card h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.gabarita-theme .filter-scroll { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.35rem 0.2rem 0.85rem; margin-bottom: 1rem; }
.gabarita-theme .filter-btn { border: 1px solid #dbe3ee; border-radius: 999px; padding: 0.55rem 0.9rem; white-space: nowrap; background: #fff; color: #46566f; font: inherit; font-size: 0.86rem; cursor: pointer; }
.gabarita-theme .filter-btn.active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.gabarita-theme .question-statement { font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.gabarita-theme .carousel-container { width: min(1120px, calc(100% - 40px)); max-width: none; margin: 2rem auto 0; border-radius: 18px; overflow: hidden; background: #1b2d59; }
.gabarita-theme .carousel-slide { background: linear-gradient(120deg, #1b2d59, #1e3a8a); color: #fff; }
.gabarita-theme .carousel-slide h2 { font-size: clamp(1.6rem, 4vw, 2.35rem); }
.gabarita-theme .carousel-slide p { max-width: 720px; line-height: 1.7; }
.gabarita-theme .carousel-slide .btn { border-left: 4px solid #fbbf24; }
.gabarita-theme .hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.gabarita-theme .hub-card { display: flex; flex-direction: column; justify-content: space-between; border-top: 3px solid #1e3a8a; }
.gabarita-theme .hub-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #eef3ff; font-size: 1.55rem; margin-bottom: 1rem; }
.gabarita-theme .site-footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 1.5rem 0 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid #dbe3ee; color: #53647b; font-size: 0.85rem; }
.gabarita-theme .site-footer p { margin: 0; }
.gabarita-theme .site-footer a { color: #1e3a8a; font-weight: 650; }
@media (max-width: 1180px) {
  .gabarita-theme .header { grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem; padding: 0.85rem 1.25rem 0.3rem; }
  .gabarita-theme .nav-links { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding: 0.25rem 0.1rem 0.6rem; }
}
@media (max-width: 600px) {
  .gabarita-theme .header { padding: 0.75rem 0.8rem 0.2rem; gap: 0.65rem; }
  .gabarita-theme .brand-logo { width: 34px; height: 34px; }
  .gabarita-theme .brand { gap: 0.45rem; }
  .gabarita-theme .brand-copy strong { font-size: 0.95rem; }
  .gabarita-theme .brand-copy small { font-size: 0.65rem; }
  .gabarita-theme #user-menu { gap: 0.45rem !important; }
  .gabarita-theme #user-menu a { max-width: 105px; }
  .gabarita-theme #user-menu .btn { padding: 0.3rem 0.55rem !important; }
  .gabarita-theme .header-auth-links { gap: 0.45rem; }
  .gabarita-theme .header-auth-links a { font-size: 0.76rem; }
  .gabarita-theme .header-auth-links .header-signup { padding: 0.35rem 0.5rem; }
  .gabarita-theme main.container { width: calc(100% - 24px); margin: 1.2rem auto 2rem; }
  .gabarita-theme .card { padding: 1.1rem; border-radius: 12px; }
  .gabarita-theme .auth-card { padding: 1.4rem 1.1rem; margin: 1.5rem auto; }
  .gabarita-theme .carousel-container { width: calc(100% - 24px); margin-top: 1.2rem; }
  .gabarita-theme .hub-grid { grid-template-columns: minmax(0, 1fr); }
  .gabarita-theme .site-footer { width: calc(100% - 24px); }
  .gabarita-theme .question-header, .gabarita-theme .progress-header, .gabarita-theme .history-pages { flex-wrap: wrap; gap: 0.5rem; }
  .gabarita-theme #modes-selection-container { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 380px) {
  .gabarita-theme .header { grid-template-columns: minmax(0, 1fr); }
  .gabarita-theme #user-menu, .gabarita-theme .header-auth-links { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .gabarita-theme .nav-links { grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .gabarita-theme *, .gabarita-theme *::before, .gabarita-theme *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 600px) {
  .gabarita-theme .header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
  }

  .gabarita-theme .header > .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .gabarita-theme #user-menu,
  .gabarita-theme .header-auth-links {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .gabarita-theme #user-name {
    display: block;
    max-width: clamp(55px, 18vw, 105px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .gabarita-theme #user-menu .btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .gabarita-theme .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 380px) {
  .gabarita-theme .brand-logo {
    width: 30px;
    height: 30px;
  }

  .gabarita-theme .brand-copy strong {
    font-size: 0.85rem;
  }
}
