:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #63717b;
  --line: #dde5e7;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --nav: #122126;
  --nav-soft: #20363d;
  --field: #f9fbfb;
  --green: #18745a;
  --green-dark: #0e513f;
  --yellow: #f2b84b;
  --red: #c95043;
  --teal: #2f9d91;
  --blue: #3a6ea5;
  --shadow: 0 18px 45px rgba(23, 32, 38, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Athlete onboarding: quick registration first, progressive profile completion after login. */
#registerForm {
  max-width: 760px;
  margin-inline: auto;
}

.athlete-register-progress {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #f7fbf9;
}

#registerForm > .athlete-register-progress {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 520px);
}

.athlete-register-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #0b3f36;
  font-size: 0.86rem;
  font-weight: 800;
}

.athlete-register-progress-track,
.athlete-profile-completion-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcebe5;
}

.athlete-register-progress-track span,
.athlete-profile-completion-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f5f48, #08794f);
  transition: width 220ms ease;
}

.athlete-register-progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.athlete-register-progress[data-steps="3"] ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-registration-summary {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #f7fbf9;
}

.staff-registration-summary-icon {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: span 3;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #08794f;
}

.staff-registration-summary div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.staff-registration-summary small {
  color: #64748b;
}

.staff-registration-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.optional-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.athlete-register-progress li {
  color: #82918d;
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
}

.athlete-register-progress li.active,
.athlete-register-progress li.complete {
  color: #08794f;
}

#registerForm [data-athlete-register-step] {
  animation: athlete-step-in 180ms ease both;
}

@keyframes athlete-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sport-checks-help {
  margin: 4px 0 14px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 500;
}

.athlete-register-sport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.athlete-register-sport-card {
  position: relative;
  min-width: 0;
  min-height: 104px;
  padding: 16px !important;
  display: grid !important;
  place-items: center;
  align-content: center;
  gap: 8px !important;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  color: #0f172a !important;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.athlete-register-sport-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 121, 79, 0.42);
  box-shadow: 0 10px 24px rgba(11, 63, 54, 0.1);
}

.athlete-register-sport-card:has(input:checked) {
  border-color: #08794f;
  background: #edf9f4;
  box-shadow: 0 0 0 2px rgba(8, 121, 79, 0.12);
}

.athlete-register-sport-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.athlete-register-sport-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  font-size: 1.35rem;
  background: #e6f5ef;
}

.athlete-register-sport-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #08794f;
}

.athlete-register-sport-card:has(input:checked) .athlete-register-sport-check {
  display: grid;
}

.athlete-register-navigation {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.athlete-register-navigation button {
  min-width: 140px;
}

#registerForm > .athlete-register-navigation {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 360px);
}

#registerForm > .athlete-register-navigation button {
  flex: 1 1 0;
}

.athlete-profile-completion-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #cfe5dc;
  border-left: 5px solid #f7b733;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 63, 54, 0.08);
}

.athlete-profile-completion-banner[hidden] {
  display: none !important;
}

.athlete-profile-completion-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #08794f;
}

.athlete-profile-completion-copy {
  display: grid;
  gap: 5px;
}

.athlete-profile-completion-copy span {
  color: #08794f;
  font-weight: 800;
}

.athlete-profile-completion-copy strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.athlete-profile-completion-track {
  width: min(420px, 100%);
  margin-top: 3px;
}

.athlete-completion-form {
  grid-template-columns: 1fr;
  gap: 16px;
}

.profile-form-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fbfdfc;
}

.profile-form-section > header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.profile-form-section > header > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
  background: #0f5f48;
}

.profile-form-section h3,
.profile-form-section p {
  margin: 0;
}

.profile-form-section p {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.85rem;
}

.profile-form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-section-grid .wide-field,
.profile-sport-picker {
  grid-column: 1 / -1;
}

.profile-sport-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-sport-picker legend {
  margin-bottom: 10px;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-form-section input[readonly] {
  color: #0b3f36;
  font-weight: 800;
  background: #edf5f1;
}

.profile-form-section label small {
  color: #64748b;
  font-weight: 500;
}

.profile-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

@media (max-width: 720px) {
  .athlete-register-progress ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-register-sport-grid,
  .profile-form-section-grid {
    grid-template-columns: 1fr;
  }

  .staff-registration-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-form-section-grid .wide-field,
  .profile-sport-picker {
    grid-column: auto;
  }

  .athlete-register-navigation,
  .profile-form-actions,
  .athlete-profile-completion-banner {
    grid-template-columns: 1fr;
  }

  .athlete-register-navigation {
    display: grid;
  }

  .athlete-register-navigation button,
  .athlete-profile-completion-banner button {
    width: 100%;
  }
}

/* Operational simplification: stable sidebar, compact dashboards and responsive module cards. */
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-shortcut {
  min-height: 86px;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-operational-panel {
  min-height: 260px;
}

.championship-section-panel {
  display: grid;
  gap: 14px;
}

.championship-section-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.championship-section-actions {
  display: grid;
  grid-template-columns: minmax(260px, 460px);
}

.championship-section-actions .front-module-card {
  min-height: 92px;
  border-left: 4px solid var(--green);
}

#escolinhas .schools-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#escolinhas .schools-report-grid .metric-card {
  min-height: 82px;
}

#escolinhas .schools-admin-panel:not([hidden]) {
  grid-column: 1 / -1;
}

#escolinhas .schools-admin-panel:not([hidden]) .schools-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (min-width: 769px) {
  .app-shell:not(.sidebar-expanded),
  .app-shell:not(.sidebar-expanded):hover,
  .app-shell:not(.sidebar-expanded):focus-within,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover),
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .app-shell:not(.sidebar-expanded) .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar:hover,
  .app-shell:not(.sidebar-expanded) .sidebar:focus-within {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex-basis: 72px !important;
    padding: 18px 8px !important;
  }

  .app-shell:not(.sidebar-expanded) .brand,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand {
    justify-content: center !important;
    justify-items: center !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-logo-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-logo-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-logo-button {
    width: 38px !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-text,
  .app-shell:not(.sidebar-expanded) .nav-label,
  .app-shell:not(.sidebar-expanded) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .action-label {
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .app-shell:not(.sidebar-expanded) .nav-tab,
  .app-shell:not(.sidebar-expanded) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .ghost-button {
    width: 48px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
  }
}

@media (max-width: 980px) {
  .dashboard-content-grid,
  .championship-section-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dashboard-shortcuts,
  .dashboard-content-grid,
  .championship-section-cards,
  #escolinhas .schools-report-grid {
    grid-template-columns: 1fr;
  }

  .championship-section-actions {
    grid-template-columns: 1fr;
  }
}


* {
  box-sizing: border-box;
}


body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 116, 90, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 116, 90, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
}

body.auth-boot-pending .app-shell {
  visibility: hidden;
}

body.auth-boot-pending::before {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  color: #0f3f35;
  background: var(--paper);
  content: "Carregando sua área...";
  font-weight: 700;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.mvp-deferred {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px 18px;
  color: #f7fbfa;
  background:
    linear-gradient(150deg, rgba(47, 157, 145, 0.2), transparent 46%),
    var(--nav);
  transition: padding 180ms ease;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-text {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
}

.brand small {
  color: #b9c9cc;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  background: #1d3a41;
}

.brand-mark span {
  position: absolute;
  display: block;
  background: rgba(255, 255, 255, 0.72);
}

.brand-mark span:nth-child(1) {
  top: 20px;
  left: 0;
  width: 44px;
  height: 2px;
}

.brand-mark span:nth-child(2) {
  top: 0;
  left: 20px;
  width: 2px;
  height: 44px;
}

.brand-mark span:nth-child(3) {
  top: 13px;
  left: 13px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: transparent;
}

.sidebar-toggle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #eff7f6;
  font-size: 1.2rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab,
.ghost-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  color: #d7e3e5;
  text-align: left;
  background: transparent;
}

.nav-icon,
.action-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon svg,
.action-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label,
.action-label,
.brand-text {
  transition: opacity 120ms ease;
}

.nav-tab:hover,
.nav-tab.active {
  color: #fff;
  background: var(--nav-soft);
}

.nav-tab.active .nav-icon {
  color: var(--nav);
  background: var(--yellow);
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  background: rgba(8, 24, 30, 0.38);
}

.mobile-more-backdrop[hidden] {
  display: none;
}

.mobile-more-drawer {
  display: grid;
  gap: 14px;
  width: min(100%, 460px);
  max-height: min(82vh, 560px);
  margin-inline: auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 46px rgba(8, 24, 30, 0.18);
}

.mobile-more-drawer header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-more-list {
  display: grid;
  gap: 10px;
}

.mobile-more-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  background: #f8fbfb;
}

.mobile-more-option > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #1e88e5;
  background: #e8f3fe;
}

.mobile-more-option small {
  min-width: 0;
  color: var(--muted);
}

.ghost-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 24px 12px;
}

.app-shell.sidebar-collapsed .brand {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: 10px;
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .action-label {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  position: static;
  width: 28px;
  height: 28px;
  margin-left: 0;
  color: var(--nav);
  background: var(--yellow);
  border-color: rgba(18, 33, 38, 0.18);
  transform: rotate(180deg);
}

.app-shell.sidebar-collapsed .nav-tabs {
  margin-top: 18px;
}

.app-shell.sidebar-collapsed .nav-tab,
.app-shell.sidebar-collapsed .ghost-button {
  justify-content: center;
  padding-inline: 8px;
}

.app-shell.sidebar-collapsed .sidebar-actions {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.app-shell.sidebar-collapsed .ghost-button {
  min-height: 42px;
}

.ghost-button {
  min-height: 40px;
  color: #e8f0f1;
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button.danger {
  color: #ffd8d3;
}

.main-content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.panel p,
.metric-card span,
.status-pill span,
.empty-state span {
  color: var(--muted);
}

.status-pill {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: 0;
  max-width: min(280px, 100%);
  justify-self: end;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.status-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.status-copy strong,
.status-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status-line[data-sync-state="online"] {
  color: var(--green);
}

.sync-status-line[data-sync-state="syncing"] {
  color: #0f6db8;
}

.sync-status-line[data-sync-state="blocked"],
.sync-status-line[data-sync-state="error"] {
  color: #b42318;
}

.sync-now-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(24, 116, 90, 0.18);
  border-radius: 8px;
  background: rgba(24, 116, 90, 0.08);
  color: var(--green);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.sync-now-button:hover {
  background: rgba(24, 116, 90, 0.14);
}

.sync-now-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.status-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: var(--green);
}

.status-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.mobile-more-open {
  overflow: hidden;
}

.status-pill strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
}

.status-pill small {
  color: var(--green);
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
  min-height: 410px;
  margin-bottom: 18px;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 33, 38, 0.92), rgba(24, 116, 90, 0.86)),
    url("https://images.unsplash.com/photo-1526676037777-05a232554f77?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-copy .eyebrow {
  color: #f5c85d;
}

.hero-copy h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4.35rem);
  line-height: 1.04;
  text-wrap: balance;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #edf6f4;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions .secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.hero-board {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(24, 116, 90, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 50%, transparent 50%),
    #16735a;
  box-shadow: var(--shadow);
}

.hero-board::before,
.hero-board::after,
.field-line,
.field-circle {
  content: "";
  position: absolute;
  border-color: rgba(255, 255, 255, 0.72);
}

.hero-board::before {
  inset: 24px;
  border: 3px solid rgba(255, 255, 255, 0.72);
}

.hero-board::after {
  top: 24px;
  bottom: 24px;
  left: 50%;
  border-left: 3px solid rgba(255, 255, 255, 0.72);
}

.field-circle {
  top: 50%;
  left: 50%;
  width: 108px;
  height: 108px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.score-card {
  position: absolute;
  right: 34px;
  bottom: 34px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  background: #fff;
}

.score-card.alt {
  top: 34px;
  right: auto;
  bottom: auto;
  left: 34px;
  background: var(--yellow);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.role-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.role-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  color: var(--nav);
  background: var(--yellow);
}

.role-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-card h3 {
  margin: 0 0 8px;
}

.role-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 900px);
  justify-content: center;
  gap: 18px;
  align-items: start;
}

.auth-panel {
  width: 100%;
  max-width: 900px;
}

#registerForm .register-course-row:not(.single-field) {
  grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(160px, 0.9fr));
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f4;
}

.segmented-control.single-option {
  grid-template-columns: minmax(150px, 1fr);
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
}

.segmented-control button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 32, 38, 0.08);
}

.auth-feedback {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #f2c7c7;
  border-radius: 8px;
  color: #842029;
  font-weight: 800;
  background: #fff4f4;
}

.auth-feedback[data-tone="success"] {
  border-color: #bfe4d8;
  color: #07543f;
  background: #edf9f4;
}

.auth-registration-success {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 20px 8px;
  text-align: center;
}

.auth-registration-success[hidden] {
  display: none !important;
}

.auth-success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 60%, #08794f 100%);
  box-shadow: 0 16px 32px rgba(8, 121, 79, 0.18);
}

.auth-success-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-success-copy {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.auth-success-copy h2,
.auth-success-copy p {
  margin: 0;
}

.auth-success-copy h2 {
  color: #0f172a;
  font-size: 1.55rem;
}

.auth-success-copy p {
  max-width: 48ch;
  color: #64748b;
  line-height: 1.5;
}

.auth-success-copy strong {
  max-width: 100%;
  padding: 10px 14px;
  overflow-wrap: anywhere;
  border: 1px solid #cfe5dc;
  border-radius: 10px;
  color: #0b3f36;
  background: #f1faf6;
}

.auth-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100%, 420px);
}

.auth-success-actions button {
  flex: 1 1 170px;
  min-height: 46px;
}

.auth-registration-success small {
  max-width: 48ch;
  color: #08794f;
  font-weight: 700;
  line-height: 1.4;
}

.auth-form {
  display: none !important;
}

.auth-form.active {
  display: grid !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.team-card,
.championship-card,
.group-card,
.bracket-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.metric-card strong {
  font-size: 2rem;
}

.content-grid,
.draw-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#times .content-grid {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

#atleticas .content-grid {
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.22fr);
  max-width: 1280px;
}

#campeonatos .content-grid {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  max-width: 1280px;
}

.public-portal {
  display: grid;
  gap: 18px;
}

.public-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 22px;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(18, 61, 55, 0.96), rgba(31, 128, 96, 0.9));
  color: white;
}

.public-hero-panel .eyebrow,
.public-hero-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.public-hero-panel h2 {
  max-width: 680px;
  margin: 0 0 10px;
  color: white;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
}

.public-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-summary-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.public-summary-grid span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
}

.public-summary-grid strong {
  color: white;
  font-size: 2rem;
}

.public-card-list,
.public-match-list,
.public-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.public-championship-card,
.public-match-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.public-championship-card header,
.public-match-card {
  align-items: start;
}

.public-championship-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: start;
  padding-bottom: 4px;
}

.public-championship-card h3 {
  margin: 0 0 6px;
  color: #152229;
  font-size: clamp(1.12rem, 2vw, 1.34rem);
  line-height: 1.08;
  text-wrap: balance;
}

.public-championship-heading {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.public-championship-heading small {
  color: #0f5746;
  font-size: 0.78rem;
  font-weight: 800;
}

.public-championship-card p,
.public-card-actions {
  margin: 0;
  color: var(--muted);
}

.public-championship-card header > .tag {
  justify-self: end;
  white-space: nowrap;
}

.public-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.public-info-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  background: #eef4f4;
}

.public-info-grid strong {
  color: var(--ink);
}

.public-match-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.public-match-meta span:not(.tag) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-match-meta span:last-child {
  grid-column: 1 / -1;
}

.public-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: center;
}

.public-match-teams strong {
  overflow-wrap: anywhere;
}

.public-match-teams span {
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #0d3e36;
  font-weight: 900;
  background: #dff0ec;
}

.public-schedule-filter {
  justify-self: end;
  min-width: min(260px, 100%);
}

.public-match-status {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 32px;
}

#portal .panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 12px;
}

#portal .panel-header .panel-actions {
  flex: 0 1 280px;
}

.public-standing-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.muted-text {
  color: var(--muted);
}

body[data-role="sportsDirector"] #campeonatos .panel.wide,
body[data-role="sportsDirector"] #times .panel.wide {
  grid-column: 1 / -1;
}

#atleticas .form-panel {
  gap: 12px;
}

#atleticas .form-panel .panel-header {
  margin-bottom: 6px;
}

#atleticas .compact-form {
  gap: 9px;
  margin-bottom: 0;
}

#athleticForm label,
#athleticForm .form-row label,
#athleticForm .coach-fieldset label {
  gap: 5px;
}

#athleticForm input {
  min-height: 40px;
}

#athleticForm .coach-fieldset {
  gap: 9px;
  padding: 10px;
}

#athleticForm .form-actions-row {
  gap: 6px;
  padding-top: 2px;
}

.athletic-list-panel {
  min-height: 100%;
}

#athleticList {
  align-self: start;
}

.draw-layout {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 18px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.profile-card-panel {
  grid-row: span 2;
}

.profile-wide-panel {
  grid-column: 1 / -1;
}

.wide {
  grid-column: span 1;
}

#atletas .staff-only,
#times .panel.wide,
#campeonatos .panel.wide {
  grid-column: 1 / -1;
}

#campeonatos .panel.wide {
  grid-column: 1 / -1;
}

body[data-role="sportsDirector"] #times .panel.wide {
  grid-column: 1 / -1;
}

body[data-role="sportsDirector"] #campeonatos .panel.wide {
  grid-column: 1 / -1;
}

.form-row > .full-field {
  grid-column: 1 / -1;
}

#atletas .panel-header .filter-row {
  grid-template-columns: minmax(220px, 280px);
  justify-content: end;
}

#times .panel-header .filter-row {
  display: grid;
  width: 100%;
  max-width: 320px;
  justify-content: end;
  justify-self: end;
  margin-left: auto;
}

#times .panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: start;
}

body[data-role="athlete"] #atletas .athlete-only {
  grid-column: 1 / -1;
}

.draw-layout .wide {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-header p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.report-actions .secondary-button {
  white-space: nowrap;
}

.report-actions {
  flex-wrap: wrap;
}

.report-source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: #e8f4ff;
  color: #0f4676;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-source-pill[data-source="supabase"] {
  background: #dff5eb;
  color: var(--green-dark);
}

.report-source-pill[data-source="error"] {
  background: #fff1d1;
  color: #875100;
}

.report-filter-field {
  display: grid;
  gap: 4px;
  min-width: 136px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.report-filter-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(190px, 240px);
  gap: 10px;
}

.form-panel,
.form-panel label {
  display: grid;
  gap: 12px;
}

.compact-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-form label {
  display: grid;
  gap: 8px;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.form-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.coach-fieldset {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.coach-fieldset legend {
  padding-inline: 6px;
  color: #3f4e55;
  font-weight: 800;
}

.form-panel label,
.draw-form label {
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.form-row,
.draw-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-pair input[type="color"] {
  width: 100%;
  min-height: 40px;
  padding: 4px;
}

.category-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.category-card {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.category-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.category-card span,
.category-card small {
  color: var(--muted);
}

.form-row.single-field {
  grid-template-columns: 1fr;
}

.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #cdd8db;
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
}

textarea {
  min-height: 118px;
  resize: vertical;
}

select[multiple] {
  min-height: 168px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(24, 116, 90, 0.14);
}

.search-input {
  max-width: 240px;
}

.primary-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: var(--green);
}

.primary-button:hover {
  background: var(--green-dark);
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--red);
  background: #fff;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.edit-button {
  color: #9a6500;
  background: #fff8df;
  border-color: #f0d57a;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.sport-bars,
.stack-list,
.team-grid,
.athlete-card-grid,
.technician-card-grid,
.championship-list,
.groups-grid,
.match-list,
.standings-grid,
.bracket {
  display: grid;
  gap: 12px;
}

.municipal-report-panel {
  grid-column: 1 / -1;
}

.repository-diagnostic-panel {
  grid-column: 1 / -1;
}

.repository-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.diagnostic-card,
.diagnostic-section,
.diagnostic-empty,
.diagnostic-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.diagnostic-card {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.diagnostic-card span,
.diagnostic-row span,
.diagnostic-row small,
.diagnostic-empty span {
  color: var(--muted);
  font-size: 0.84rem;
}

.diagnostic-card strong {
  font-size: 1.05rem;
}

.diagnostic-card small {
  color: var(--muted);
  line-height: 1.35;
}

.diagnostic-section {
  grid-column: span 3;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.diagnostic-config-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.diagnostic-config-heading,
.diagnostic-config-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.diagnostic-config-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.diagnostic-config-heading p,
.diagnostic-config-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.diagnostic-config-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) minmax(260px, 1.2fr);
  gap: 12px;
}

.diagnostic-config-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.diagnostic-config-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.diagnostic-connection-status {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f8f8;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.diagnostic-connection-status.success {
  border-color: #b8ded3;
  background: #e8f6f0;
  color: #0b684e;
}

.diagnostic-connection-status.warning {
  border-color: #eed997;
  background: #fff8dc;
  color: #775b00;
}

.diagnostic-connection-status.error {
  border-color: #f3b8b8;
  background: #fff0f0;
  color: #9b1c1c;
}

.diagnostic-section h3 {
  margin: 0;
  font-size: 0.95rem;
}

.diagnostic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.diagnostic-row small {
  grid-column: 1 / -1;
}

.diagnostic-row.ok {
  border-color: #cfe9de;
}

.diagnostic-row.warning {
  border-color: #f1dfad;
  background: #fffaf0;
}

.diagnostic-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.diagnostic-ok-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.municipal-report-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.report-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.compact-report-card span,
.report-list-card h3 {
  color: var(--muted);
  font-size: 0.84rem;
}

.compact-report-card strong {
  font-size: 1.45rem;
}

.report-export-status {
  min-height: 0;
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.report-export-status:empty {
  display: none;
}

.report-export-status[data-tone="success"] {
  color: var(--green-dark);
}

.report-export-status[data-tone="warning"],
.report-export-status[data-tone="error"] {
  color: #8a4b00;
}

.report-list-card {
  grid-column: span 2;
}

.report-list-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.report-list-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-list-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.report-list-card li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-list-card li strong {
  color: var(--ink);
}

.athletic-list .stack-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.athletic-list small,
.athletic-director-line {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--muted);
  font-weight: 700;
}

.approval-list .stack-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  align-items: center;
}

.approval-copy {
  display: grid;
  gap: 4px;
  min-width: min(100%, 280px);
}

.approval-copy span,
.approval-copy small {
  color: var(--muted);
}

.approval-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.approval-actions .secondary-button {
  min-height: 36px;
  padding-inline: 12px;
  white-space: nowrap;
}

.sport-bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
}

.sport-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ecee;
}

.sport-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--yellow));
}

.stack-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.lookup-result {
  min-height: 46px;
}

.lookup-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.lookup-option {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fbfdfd;
}

.lookup-option + .lookup-option {
  margin-top: 8px;
}

.lookup-option:hover {
  border-color: var(--green);
  background: #effaf6;
}

.lookup-card span,
.lookup-option span {
  color: var(--muted);
}

.lookup-card strong {
  font-size: 0.95rem;
}

.lookup-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.inline-form label {
  display: grid;
  gap: 8px;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.confirmation-list {
  display: grid;
  gap: 10px;
}

.confirmation-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.confirmation-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.athlete-card .card-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.athlete-card .card-actions:has(.icon-button) {
  grid-template-columns: minmax(0, 1fr) 42px 42px;
}

.athlete-card .card-actions .secondary-button {
  width: 100%;
  min-width: 0;
}

.athlete-card .card-actions .icon-button {
  flex: 0 0 42px;
  min-height: 38px;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-athlete-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-athlete-summary article,
.document-card,
.history-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.admin-athlete-summary article span,
.document-card span,
.history-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-athlete-summary article strong {
  font-size: 1.35rem;
}

.document-review-strip,
.eligibility-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.document-review-strip div,
.eligibility-strip div {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.document-review-strip div {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.document-review-strip span {
  grid-column: 1;
}

.eligibility-strip div {
  border-color: #f0d28a;
  background: #fffaf0;
}

.document-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.document-upload-feedback {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #c7eadb;
  border-radius: 10px;
  background: #edf9f4;
  color: #075c44;
  font-size: 0.86rem;
  font-weight: 700;
}

.document-upload-feedback[data-tone="error"] {
  border-color: #f0d28a;
  background: #fff9ea;
  color: #8a4f00;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.profile-form .full-field {
  grid-column: span 2;
}

.profile-form button.full-field,
.profile-form .profile-photo-preview {
  grid-column: 1 / -1;
}

.form-status-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d7e3e3;
  border-left: 4px solid #f7b733;
  border-radius: 10px;
  background: #f7fbf9;
  color: #475569;
}

.form-status-notice strong {
  color: #0f172a;
}

.form-status-notice.approved {
  border-left-color: #08794f;
  background: #edf9f4;
}

.form-status-notice.rejected,
.form-status-notice.suspended {
  border-left-color: #b42318;
  background: #fff5f4;
}

.consent-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #f7fbf9;
}

.consent-field input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #08794f;
}

.profile-summary-list {
  display: grid;
  gap: 10px;
}

.profile-summary-list span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5faf9;
}

.document-form label,
.profile-form label {
  display: grid;
  gap: 8px;
  color: #3f4e55;
  font-size: 0.88rem;
  font-weight: 700;
}

.document-list,
.history-list,
.athlete-team-list {
  display: grid;
  gap: 10px;
}

.athlete-teams-section {
  display: grid;
  gap: 10px;
}

.athlete-teams-section + .athlete-teams-section {
  margin-top: 12px;
}

.athlete-teams-section h3,
.athlete-invitation-history summary {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.athlete-invitation-history summary {
  cursor: pointer;
  list-style-position: inside;
}

.document-card,
.history-card,
.athlete-team-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.athlete-team-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fbfdfd;
}

.athlete-team-card.muted-card {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.athlete-team-card div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.athlete-team-card strong,
.athlete-team-card span {
  overflow-wrap: anywhere;
}

.athlete-team-card span {
  color: var(--muted);
}

.athlete-team-invitation-card small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 4px;
}

.digital-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(24, 116, 90, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 116, 90, 0.18), transparent 68%),
    #fbfdfd;
}

.digital-card.compact {
  padding: 12px;
}

.digital-card-top,
.digital-card-main,
.digital-card-bottom {
  min-width: 0;
}

.digital-card-top,
.digital-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.digital-card-top div,
.digital-card-bottom div,
.digital-card-person {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.digital-card-person span strong {
  display: inline;
}

.digital-card-top span,
.digital-card-bottom span,
.digital-card-person span {
  color: var(--muted);
  font-size: 0.82rem;
}

.digital-card-top strong,
.digital-card-bottom strong,
.digital-card-person strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.digital-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.qr-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 9px);
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-grid.small {
  grid-template-columns: repeat(7, 7px);
  gap: 2px;
  padding: 8px;
}

.qr-grid span {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #e5edef;
}

.qr-grid.small span {
  width: 7px;
  height: 7px;
}

.qr-grid span.active {
  background: var(--ink);
}

.confirmation-lock {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.secondary-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  background: #fff;
}

.secondary-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.team-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.athlete-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.technician-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  align-items: stretch;
}

.athlete-card,
.technician-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 116, 90, 0.08), transparent 55%),
    #fbfdfd;
}

.athlete-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.athlete-card header > div {
  min-width: 0;
}

.athlete-card header strong,
.athlete-card header div {
  overflow-wrap: anywhere;
}

.technician-card {
  align-content: start;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.technician-card,
.technician-card * {
  min-width: 0;
}

.technician-card-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.technician-card-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.technician-card-identity strong,
.technician-card-identity span {
  overflow-wrap: anywhere;
}

.technician-card-identity span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.technician-card .athlete-avatar.large {
  width: 50px;
  height: 50px;
}

.athlete-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: var(--green);
  overflow: hidden;
}

.athlete-avatar.large {
  width: 58px;
  height: 58px;
  font-size: 1.1rem;
}

.athlete-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.athlete-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.athlete-meta span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  background: #eef5f6;
}

.athlete-meta strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.athlete-card-actions {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 44px 44px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.athlete-card-actions .secondary-button,
.athlete-card-actions .icon-button {
  width: 100%;
}

#tecnicos .panel.wide {
  grid-column: 1 / -1;
}

#tecnicos .panel-header .filter-row {
  grid-template-columns: minmax(220px, 340px);
  justify-content: end;
}

.technician-team-pill {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 116, 90, 0.14);
  border-radius: 8px;
  background: #eaf4f1;
}

.technician-team-pill span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.technician-team-pill strong {
  color: var(--green-dark);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.technician-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.technician-info-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  background: #eef5f6;
}

.technician-info-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.technician-card-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.2;
}

.technician-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.technician-card-actions span {
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.technician-card-actions .secondary-button {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .technician-card-grid {
    grid-template-columns: 1fr;
  }

  .technician-info-grid,
  .technician-card-actions {
    grid-template-columns: 1fr;
  }
}

.team-card,
.championship-card,
.group-card,
.bracket-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: none;
}

.team-card header,
.championship-card header,
.group-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.team-card {
  align-content: start;
}

.team-card-header {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0 !important;
}

.team-sport-badge {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.team-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-title strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.1;
}

.team-title div {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-tag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 2px 0 0;
}

.team-championship-pill {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #cfe6e1;
  border-radius: 999px;
  color: #0f5746;
  background: linear-gradient(180deg, #f4fbf9, #e8f4f1);
}

.team-championship-pill svg {
  width: 18px;
  height: 18px;
  place-self: center;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.team-championship-pill span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-status-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  color: #5f6e77;
  background: #eef4f3;
}

.team-status-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.team-status-icon.accepted {
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 14px rgba(24, 116, 90, 0.22);
}

.team-status-icon.pending {
  color: #6b4b00;
  background: #f6df98;
}

.team-status-icon.rejected {
  color: #fff;
  background: var(--red);
}

.team-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(58px, 0.55fr));
  gap: 6px;
  align-items: stretch;
}

.championship-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.team-stats span,
.championship-info-grid span {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  background: #f5faf9;
}

.team-stats .team-count-stat {
  justify-items: center;
  text-align: center;
}

.team-stats .team-coach-stat {
  min-width: 0;
}

.team-stats .team-coach-stat strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-stats strong,
.championship-info-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.team-roster-summary {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbfb;
}

.team-roster-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-card-actions {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 44px 44px;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.team-card-actions .secondary-button,
.team-card-actions .icon-button {
  width: 100%;
}

.icon-button.approve-button {
  color: #0f7657;
}

.icon-button.danger-button {
  color: #d7372f;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.championship-card {
  background:
    linear-gradient(135deg, rgba(58, 110, 165, 0.08), transparent 52%),
    #fbfdfd;
}

.championship-card .compact-action {
  min-height: 42px;
  padding-inline: 18px;
  white-space: nowrap;
}

.team-registration-slot {
  display: block;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.team-registration-slot[hidden] {
  display: none;
}

.embedded-team-form {
  width: 100%;
  box-shadow: none;
  background: #fff;
}

.embedded-team-form .panel-header {
  margin-bottom: 4px;
}

.championship-title {
  display: grid;
  gap: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #164139;
  font-size: 0.78rem;
  font-weight: 800;
  background: #dff0ec;
}

.tag.alt {
  color: #563a07;
  background: #fff1c8;
}

.tag.blue {
  color: #153c62;
  background: #dfeefa;
}

.tag.pending {
  color: #5a430f;
  background: #fff1c8;
}

.tag.accepted {
  color: #164139;
  background: #dff0ec;
}

.tag.approved {
  color: #164139;
  background: #dff0ec;
}

.tag.rejected {
  color: #6f1e16;
  background: #ffe1de;
}

.tag.neutral {
  color: #475569;
  background: #eef2f7;
}

.tag.gold {
  color: #73510a;
  background: #fff4d6;
}

.notice-link {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--green-dark);
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  background: transparent;
}

.notice-link:hover {
  text-decoration: underline;
}

.sport-checks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sport-checks legend {
  padding: 0 6px;
  color: #3f4e55;
  font-weight: 800;
}

.sport-checks div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sport-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.sport-checks input {
  width: 18px;
  min-height: 18px;
}

.draw-controls .draw-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.group-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.groups-grid,
.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 12px;
}

.match-row {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: #fbfdfd;
}

.match-order {
  justify-self: start;
}

.match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.score-form {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.score-form button[type="submit"] {
  grid-column: 1 / 3;
}

.score-form [data-open-match] {
  grid-column: 3 / 4;
  min-width: 0;
  white-space: normal;
}

.score-form input {
  min-height: 36px;
  padding: 7px;
  text-align: center;
}

.match-teams strong {
  min-width: 0;
  width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.16;
  text-align: center;
}

.match-versus {
  color: var(--muted);
  font-weight: 900;
}

.match-center {
  display: grid;
  gap: 14px;
}

.match-center-hero,
.match-actions,
.match-tabs,
.match-event-form,
.manual-score-form,
.lineup-grid,
.stats-grid {
  display: grid;
  gap: 10px;
}

.match-center-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #eef6f4;
}

.match-center-hero strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.match-actions,
.match-tabs {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.match-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  background: #f8fbfb;
}

.match-tabs button.active {
  color: #10302c;
  border-color: #b9d8d0;
  background: #dff0ec;
}

.match-tab-panel {
  display: none;
}

.match-tab-panel.active {
  display: grid;
  gap: 12px;
}

.lineup-grid,
.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineup-card,
.event-timeline-item,
.stats-grid span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.stats-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfd;
}

.event-timeline,
.lineup-grid > div,
.stats-grid {
  display: grid;
  gap: 10px;
}

.match-event-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

.manual-score-form {
  grid-template-columns: 90px 90px minmax(220px, 1fr) auto;
  align-items: end;
}

.match-event-form button {
  min-height: 42px;
}

.scoresheet-preview {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.scoresheet-preview h3,
.scoresheet-preview p,
.scoresheet-preview ul {
  margin: 0;
}

.scoresheet-preview ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.scoresheet-header {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.scoresheet-header strong {
  font-size: 1.1rem;
}

.detail-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.bracket {
  grid-template-columns: 1fr;
}

.standings-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.standing-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.standing-table {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(4, 44px);
  gap: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.standing-table > * {
  min-height: 36px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.standing-table > strong {
  color: var(--ink);
}

.bracket-card {
  position: relative;
  display: grid;
  gap: 8px;
}

.bracket-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.bracket-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  border-radius: 8px 0 0 8px;
  background: var(--blue);
}

.bracket-round {
  display: grid;
  gap: 10px;
}

.bracket-round h3 {
  margin: 0;
  font-size: 0.95rem;
}

.bracket-round-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.bracket-team-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fafb;
}

.bracket-team-line strong {
  min-width: 0;
}

.bracket-team-line span {
  min-height: 24px;
  text-align: center;
  font-weight: 900;
}

.bracket-team-line.winner {
  border-color: rgba(24, 116, 90, 0.42);
  background: #effaf6;
}

.bracket-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.knockout-score-form {
  margin-top: 2px;
}

.profile-photo-preview {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  margin: -4px 0 14px;
  padding: 0;
  border: 0;
  text-align: center;
  background: transparent;
  cursor: pointer;
}

.auth-photo-preview {
  margin: 0 0 16px;
}

.profile-photo-frame {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--green);
}

.profile-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-preview span {
  color: var(--muted);
  font-size: 0.86rem;
}

.hidden-file-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hidden-file-field input {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.empty-state {
  display: grid;
  gap: 4px;
  min-height: 110px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #bfcccf;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.52);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 33, 38, 0.5);
}

.detail-modal {
  width: min(760px, 100%);
  max-height: min(720px, 90vh);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(18, 33, 38, 0.26);
}

.detail-modal > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4faf9;
}

.detail-modal > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.detail-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 100%;
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-modal-meta p {
  margin: 0;
}

.detail-modal > header h2 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #0e2a32;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.12;
}

.detail-modal > header .tag[hidden] {
  display: none;
}

.detail-modal > header.title-only {
  align-items: center;
  border-color: #cfe4df;
  background: linear-gradient(135deg, #eff8f5, #ffffff);
}

.detail-modal > header.title-only h2 {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
  font-size: 1.34rem;
}

.detail-modal > header.title-only h2::before {
  content: "";
  position: static;
  flex: 0 0 6px;
  width: 6px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
}

.detail-modal h2,
.detail-modal h3,
.detail-modal p {
  margin-bottom: 0;
}

.detail-modal-body {
  display: grid;
  gap: 16px;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #eef5f6;
}

.detail-hero.team {
  justify-content: space-between;
}

.detail-hero div,
.detail-row div,
.roster-card div {
  display: grid;
  gap: 3px;
}

.detail-hero span,
.detail-row span,
.roster-card span {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.team-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.team-detail-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f7fbfb;
}

.team-detail-summary strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.detail-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfd;
}

.detail-grid strong {
  color: var(--ink);
}

.detail-section,
.roster-list {
  display: grid;
  gap: 10px;
}

.detail-row,
.roster-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.document-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}

.document-preview-frame,
.document-preview-image {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.document-preview-actions {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.document-preview-review-panel {
  margin-top: 14px;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfefd;
}

.document-preview-review-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-preview-review-panel strong {
  display: block;
  color: #0f172a;
}

.document-preview-review-panel span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: .82rem;
}

.document-preview-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.document-preview-image {
  display: block;
  min-height: 0;
  max-height: 520px;
  object-fit: contain;
}

.document-preview-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #f8fbfb;
}

.roster-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.roster-card.clickable {
  cursor: pointer;
}

.roster-card.clickable:hover {
  border-color: var(--green);
  background: #f0faf7;
}

.roster-card.clickable:focus-visible {
  outline: 3px solid rgba(24, 116, 90, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    gap: 20px;
    padding: 18px 10px;
  }

  .nav-tabs {
    grid-template-columns: 1fr;
  }

  .brand {
    display: grid;
    justify-content: center;
    justify-items: center;
    gap: 10px;
    padding-inline: 0;
  }

  .brand-text,
  .nav-label,
  .action-label {
    display: none;
  }

  .sidebar-toggle {
    position: static;
    display: inline-grid;
    width: 30px;
    height: 30px;
    margin-left: 0;
    color: var(--nav);
    background: var(--yellow);
    border-color: rgba(18, 33, 38, 0.18);
  }

  .nav-tab,
  .ghost-button {
    justify-content: center;
    padding-inline: 8px;
  }

  .sidebar-actions {
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 1180px) {
  #atletas .content-grid,
  #atleticas .content-grid {
    grid-template-columns: 1fr;
  }

  .municipal-report-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 18px;
  }

  .topbar,
  .panel-header {
    display: grid;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .status-pill,
  .search-input {
    min-width: 0;
    max-width: none;
  }

  .status-pill {
    grid-column: 2;
    grid-row: 1;
    width: fit-content;
    max-width: min(190px, 100%);
    justify-self: end;
    grid-template-columns: 36px minmax(0, max-content);
    gap: 8px;
    padding: 10px 12px;
  }

  .status-avatar {
    width: 36px;
    height: 36px;
  }

  .status-pill strong {
    font-size: 0.92rem;
  }

  .status-pill small {
    font-size: 0.82rem;
  }

  #times .panel-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  #times .panel-header .filter-row {
    grid-template-columns: minmax(190px, 220px);
    justify-self: end;
  }

  .dashboard-grid,
  .home-hero,
  .public-hero-panel,
  .public-summary-grid,
  .role-grid,
  .auth-layout,
  .profile-layout,
  .detail-grid,
  .content-grid,
  #times .content-grid,
  #campeonatos .content-grid,
  #atleticas .form-panel,
  .draw-layout,
  .approval-list .stack-item,
  .team-stats,
  .championship-info-grid,
  .filter-row,
  .form-row,
  .inline-form,
  .admin-athlete-summary,
  .document-form,
  .profile-form,
  .lineup-grid,
  .match-event-form,
  .manual-score-form,
  .digital-card,
  .lookup-row,
  .form-actions-row,
  .draw-controls .draw-form {
    grid-template-columns: 1fr;
  }

  #portal .panel-header {
    grid-template-columns: 1fr;
  }

  .public-schedule-filter {
    width: 100%;
    justify-self: stretch;
  }

  .municipal-report-grid,
  .repository-diagnostic-grid,
  .diagnostic-config-grid {
    grid-template-columns: 1fr;
  }

  .public-match-teams {
    grid-template-columns: 1fr;
  }

  .public-match-teams span {
    width: 100%;
  }

  .report-list-card {
    grid-column: auto;
  }

  .diagnostic-section {
    grid-column: auto;
  }

  .diagnostic-config-heading,
  .panel-actions,
  .diagnostic-config-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-role="sportsDirector"] #times .panel.wide {
    grid-column: 1 / -1;
  }

  .approval-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .profile-form .full-field {
    grid-column: auto;
  }

  .digital-card-top,
  .digital-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-tabs {
    grid-template-columns: 1fr;
  }

  .sport-checks div {
    grid-template-columns: 1fr;
  }

  #registerForm .register-course-row:not(.single-field),
  .athlete-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Escolinhas / Oficinas MVP module. */
.schools-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.schools-hero-panel,
.schools-layout .wide {
  grid-column: 1 / -1;
}

.schools-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 61, 55, 0.96), rgba(31, 128, 96, 0.9)),
    var(--green);
}

#escolinhas .front-overview-panel {
  padding-top: 16px;
}

#escolinhas .front-overview-panel .panel-header {
  margin-bottom: 10px;
}

#schoolFrontMetrics {
  display: none;
}

.schools-hero-panel .eyebrow,
.schools-hero-panel p {
  color: rgba(255, 255, 255, 0.8);
}

.schools-hero-panel h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.schools-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.schools-report-grid .metric-card {
  min-height: 92px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.schools-report-grid .metric-card span,
.schools-report-grid .metric-card strong {
  color: #fff;
}

.schools-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schools-filter-panel {
  padding: 14px;
}

.school-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: end;
}

.school-program-grid,
.school-enrollment-grid,
.school-report-detail-grid,
.school-session-grid,
.school-evaluation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.school-card,
.school-enrollment-card,
.school-report-card,
.school-history-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(24, 116, 90, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.school-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.school-card h3,
.school-enrollment-card h3 {
  margin: 4px 0 2px;
}

.school-card p,
.school-enrollment-card p,
.school-history-card p {
  margin: 0;
  color: var(--muted);
}

.school-history-card h3 {
  margin: 0;
}

.school-history-card > .tag {
  justify-self: start;
}

.school-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.school-info-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce9e8;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: linear-gradient(180deg, #f9fcfb, #f1f7f6);
}

.school-info-grid strong {
  color: var(--ink);
}

.school-class-list {
  display: grid;
  gap: 8px;
}

.school-class-list > span,
.school-class-card {
  padding: 10px;
  border-radius: var(--radius-md);
  color: #315056;
  background: #f4faf8;
}

.school-class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dce9e8;
}

.school-class-card div,
.school-class-kpis {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.school-class-card span,
.school-class-kpis small {
  color: var(--muted);
  font-weight: 700;
}

.school-class-kpis {
  justify-items: end;
}

.school-class-kpis b {
  font-size: 1.1rem;
  color: var(--green);
}

.school-enroll-button,
.school-enrollment-state {
  min-height: 34px;
  align-self: center;
  white-space: nowrap;
}

.school-enroll-button {
  padding-inline: 12px;
  color: #fff;
  border-color: rgba(24, 116, 90, 0.18);
  background: var(--green);
}

.school-enrollment-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #d7e7e3;
  border-radius: 999px;
  color: #6c4b00;
  background: #fff3c4;
  font-size: 0.78rem;
  font-weight: 900;
}

.school-enrollment-state.is-approved {
  color: #0f513f;
  background: #dff5ec;
}

.school-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.school-card-actions .secondary-button {
  min-height: 38px;
  padding: 8px 12px;
}

.school-card-actions .danger {
  color: #b42318;
  border-color: #f3b7b2;
}

.school-report-card h3 {
  margin: 0;
}

.school-report-card p {
  margin: -4px 0 0;
  color: var(--muted);
}

.school-counter-list {
  display: grid;
  gap: 8px;
}

.school-counter-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dce9e8;
  border-radius: var(--radius-md);
  background: #f8fcfb;
}

.school-counter-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.school-counter-list b {
  color: var(--green);
}

.attendance-editor {
  display: grid;
  gap: 8px;
}

.attendance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #dce9e8;
  border-radius: var(--radius-md);
  background: #fff;
}

.attendance-row span {
  font-weight: 800;
}

@media (max-width: 980px) {
  .schools-layout,
  .schools-hero-panel {
    grid-template-columns: 1fr;
  }

  .schools-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .schools-layout {
    gap: 12px;
  }

  .schools-report-grid,
  .schools-form,
  .school-filter-row,
  .attendance-row,
  .school-class-card {
    grid-template-columns: 1fr;
  }

  .school-class-kpis {
    justify-items: start;
  }

  .school-enroll-button,
  .school-enrollment-state {
    width: 100%;
  }

  .schools-hero-panel h2 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }
}

.auth-panel .register-course-row:not(.single-field) {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

@media (max-width: 520px) {
  .status-pill {
    max-width: min(170px, 100%);
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .status-avatar {
    width: 34px;
    height: 34px;
  }

  #times .panel-header {
    grid-template-columns: 1fr;
  }

  #times .panel-header .filter-row {
    width: 100%;
    grid-template-columns: 1fr;
    justify-self: stretch;
  }
}

/* Responsive polish for municipal SaaS views. Keep this layer last. */
.main-content > .view,
.content-grid,
.panel.wide,
#times .panel.wide,
#campeonatos .panel.wide,
#atletas .panel.wide,
#tecnicos .panel.wide,
.public-portal,
.profile-layout,
.draw-layout {
  width: 100%;
}

.team-card,
.athlete-card,
.technician-card,
.championship-card,
.public-match-card,
.public-championship-card,
.match-row,
.bracket-card,
.panel {
  min-width: 0;
}

.team-card *,
.athlete-card *,
.technician-card *,
.championship-card *,
.public-match-card *,
.match-row *,
.status-pill * {
  min-width: 0;
}

.team-card strong,
.team-card span,
.athlete-card strong,
.athlete-card span,
.technician-card strong,
.technician-card span,
.championship-card strong,
.championship-card span,
.public-match-card strong,
.public-match-card span {
  overflow-wrap: anywhere;
}

#times .panel.wide {
  max-width: none;
  justify-self: stretch;
}

#times .team-grid,
#atletas .athlete-card-grid,
#tecnicos .technician-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

#times .panel-header,
#atletas .panel-header,
#tecnicos .panel-header,
#portal .panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

#times .panel-header .filter-row,
#atletas .panel-header .filter-row,
#tecnicos .panel-header .filter-row,
#portal .panel-header .filter-row {
  width: min(100%, 320px);
  max-width: 320px;
  justify-self: end;
  margin-left: auto;
}

.topbar {
  position: relative;
}

.status-pill {
  align-self: start;
}

@media (min-width: 821px) and (max-width: 1180px) {
  .main-content {
    padding: 24px;
  }

  .home-hero,
  .public-hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-board {
    min-height: 320px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-layout,
  .auth-layout,
  #campeonatos .content-grid,
  #atleticas .content-grid {
    grid-template-columns: 1fr;
  }

  #times .team-grid,
  #atletas .athlete-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .main-content {
    padding: 18px 8px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
    gap: 12px;
    align-items: start;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  h1 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
    line-height: 1.08;
  }

  .status-pill {
    grid-column: 2;
    width: fit-content;
    max-width: min(190px, 42vw);
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 9px;
  }

  .status-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .status-pill strong,
  .status-pill small {
    max-width: 100%;
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .home-hero,
  .public-hero-panel {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .public-hero-panel {
    padding: 22px;
  }

  .hero-copy h2,
  .public-hero-panel h2 {
    font-size: clamp(2rem, 10vw, 3.05rem);
  }

  .hero-board {
    min-height: 270px;
  }

  .role-grid,
  .dashboard-grid,
  .public-summary-grid,
  .municipal-report-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .panel-header,
  #times .panel-header,
  #atletas .panel-header,
  #tecnicos .panel-header,
  #portal .panel-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #times .panel-header .filter-row,
  #atletas .panel-header .filter-row,
  #tecnicos .panel-header .filter-row,
  #portal .panel-header .filter-row,
  .public-schedule-filter {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    justify-self: stretch;
    margin-left: 0;
  }

  #times .team-grid,
  #atletas .athlete-card-grid,
  #tecnicos .technician-card-grid {
    grid-template-columns: 1fr;
  }

  .team-card,
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-match-card {
    padding: 14px;
  }

  .team-stats,
  .athlete-meta,
  .detail-grid,
  .championship-info-grid,
  .public-info-grid {
    grid-template-columns: 1fr;
  }

  .team-card-actions,
  .athlete-card-actions {
    grid-template-columns: 1fr 42px 42px;
  }

  .match-row,
  .score-form,
  .knockout-score-form {
    grid-template-columns: 1fr;
  }

  .score-form [data-open-match],
  .score-form .secondary-button,
  .score-form .primary-button {
    width: 100%;
    white-space: normal;
  }
}

/* Sidebar state is controlled only by the logo button. Hover never resizes the app. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell:hover,
  .app-shell:focus-within,
  .app-shell:has(.sidebar:hover),
  .app-shell:has(.sidebar:focus-within),
  .app-shell:not(.sidebar-expanded),
  .app-shell:not(.sidebar-expanded):hover,
  .app-shell:not(.sidebar-expanded):focus-within {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .app-shell.sidebar-expanded,
  .app-shell.sidebar-expanded:hover,
  .app-shell.sidebar-expanded:focus-within,
  .app-shell.sidebar-expanded:has(.sidebar:hover),
  .app-shell.sidebar-expanded:has(.sidebar:focus-within) {
    grid-template-columns: 228px minmax(0, 1fr) !important;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .app-shell:not(.sidebar-expanded) .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar:hover,
  .app-shell:not(.sidebar-expanded) .sidebar:focus-within {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 18px 8px !important;
  }

  .app-shell.sidebar-expanded .sidebar,
  .app-shell.sidebar-expanded .sidebar:hover,
  .app-shell.sidebar-expanded .sidebar:focus-within {
    width: 228px !important;
    min-width: 228px !important;
    max-width: 228px !important;
    padding: 16px 12px !important;
  }

  .app-shell:not(.sidebar-expanded) .brand {
    justify-content: center !important;
    justify-items: center !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-logo-button {
    width: 40px !important;
    margin-inline: auto !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-text,
  .app-shell:not(.sidebar-expanded) .nav-label,
  .app-shell:not(.sidebar-expanded) .action-label,
  .app-shell:not(.sidebar-expanded) .sidebar-help strong,
  .app-shell:not(.sidebar-expanded) .sidebar-meta small,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .action-label {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .app-shell:not(.sidebar-expanded) .nav-tab,
  .app-shell:not(.sidebar-expanded) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .ghost-button {
    width: 48px !important;
    grid-template-columns: 24px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
  }

  .app-shell.sidebar-expanded .brand-text,
  .app-shell.sidebar-expanded .nav-label,
  .app-shell.sidebar-expanded .action-label,
  .app-shell.sidebar-expanded .sidebar-help strong,
  .app-shell.sidebar-expanded .sidebar-meta small {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    width: 100% !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    justify-content: flex-start !important;
    justify-items: start !important;
    padding: 8px 10px !important;
  }
}

/* Focused, centered authentication experience. */
#auth {
  width: 100%;
}

#auth .auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  width: 100%;
  padding: 8px 0 36px;
}

#auth .auth-panel {
  width: 100%;
  max-width: 760px;
  padding: 30px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 44px rgba(11, 63, 54, 0.1);
}

.auth-panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-panel-heading h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.auth-panel-heading p {
  margin: 0;
  color: #64748b;
}

.auth-panel-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 60%, #08794f 100%);
}

.auth-panel-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

#auth .segmented-control {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 10px;
  background: #edf5f1;
}

#auth .segmented-control button {
  min-height: 44px;
  border-radius: 8px;
}

#auth .segmented-control button.active {
  color: #0b3f36;
  box-shadow: 0 7px 18px rgba(11, 63, 54, 0.09);
}

#auth .auth-form {
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#loginForm {
  max-width: 620px;
  margin-inline: auto;
}

#passwordRecoveryForm {
  max-width: 620px;
  margin-inline: auto;
}

.auth-recovery-intro {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #cfe5dc;
  border-radius: 9px;
  color: #0b3f36;
  background: #f1faf6;
}

.auth-recovery-intro strong {
  font-size: 1rem;
}

.auth-recovery-intro span {
  color: #64748b;
  font-size: 0.9rem;
}

#auth .auth-form label {
  gap: 7px;
  color: #334155;
  font-weight: 750;
}

.auth-input-shell {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border: 1px solid #d7e3e3;
  border-radius: 9px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-input-shell:focus-within {
  border-color: #08794f;
  box-shadow: 0 0 0 3px rgba(8, 121, 79, 0.12);
}

.auth-input-shell > input {
  min-width: 0;
  height: 46px;
  padding: 0 8px 0 0 !important;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.auth-input-shell-plain {
  grid-template-columns: minmax(0, 1fr) auto;
}

.auth-input-shell-plain > input {
  padding-left: 12px !important;
}

.auth-input-icon {
  display: grid;
  place-items: center;
  color: #0f5f48;
  font-weight: 850;
}

.auth-input-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-password-toggle,
.auth-forgot-button,
.auth-switch-copy button {
  border: 0;
  color: #08794f;
  font: inherit;
  font-weight: 800;
  background: transparent;
}

.auth-password-toggle {
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.auth-forgot-button {
  justify-self: end;
  margin-top: -7px;
  padding: 2px 0;
}

.auth-submit-button {
  width: 100%;
  min-height: 48px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 60%, #08794f 100%) !important;
}

.auth-submit-button:hover:not(:disabled) {
  filter: brightness(0.92);
}

.auth-submit-button.is-loading,
.auth-submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-switch-copy {
  margin: 0;
  text-align: center;
  color: #64748b;
}

#registerForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#registerForm [hidden] {
  display: none !important;
}

#registerForm > .auth-photo-preview,
#registerForm > .form-row,
#registerForm > .hidden-file-field,
#registerForm > .check-row,
#registerForm > .auth-submit-button {
  grid-column: 1 / -1;
}

#registerForm > label:not(.hidden-file-field):not(.check-row) {
  min-width: 0;
}

#registerForm > label:has(input[name="name"]) {
  grid-column: 1 / -1;
}

#registerForm .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#registerForm .auth-photo-preview {
  justify-self: center;
  width: min(100%, 320px);
  min-height: 150px;
  border: 1px dashed rgba(8, 121, 79, 0.36);
  border-radius: 10px;
  background: #f4faf7;
}

#registerForm .profile-photo-frame {
  width: 76px;
  height: 76px;
  border-radius: 50%;
}

#registerForm .auth-camera-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#auth input:user-invalid,
#auth select:user-invalid {
  border-color: #dc6b6b;
  box-shadow: 0 0 0 3px rgba(220, 107, 107, 0.1);
}

body[data-role]:not([data-role="guest"]) .status-action-label {
  display: none !important;
}

@media (max-width: 768px) {
  #auth .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 4px 0 96px;
  }

  #auth .auth-panel {
    padding: 22px 18px;
    border-radius: 10px;
  }

  #registerForm,
  #registerForm .form-row,
  #registerForm .register-course-row:not(.single-field) {
    grid-template-columns: 1fr !important;
  }

  #registerForm > *,
  #registerForm .form-row {
    grid-column: 1;
  }

  .auth-panel-heading {
    align-items: flex-start;
  }
}

/* Public sports portal. */
.public-portal {
  display: grid;
  gap: 24px;
}

.public-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 28px;
  min-height: 330px;
  align-items: center;
  padding: 34px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
  box-shadow: var(--shadow);
}

.public-dashboard-copy .eyebrow {
  color: #f7b733;
}

.public-dashboard-copy h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
}

.public-dashboard-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #e2f1ec;
  font-size: 1rem;
  line-height: 1.5;
}

.public-dashboard-hero .public-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-dashboard-hero .public-summary-grid article {
  display: grid;
  min-height: 112px;
  align-content: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}

.public-dashboard-hero .public-summary-grid span {
  color: #d5e9e2;
  font-size: 0.78rem;
}

.public-dashboard-hero .public-summary-grid strong {
  color: #fff;
  font-size: 2rem;
}

.public-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.public-filter-bar label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 800;
}

.public-filter-bar input,
.public-filter-bar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7e3e3;
  border-radius: 7px;
  background: #fbfdfc;
}

.public-filter-clear {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #cfe0db;
  border-radius: 7px;
  color: #0f5f48;
  font-weight: 850;
  background: #f1f8f5;
}

.public-section {
  padding: 22px;
  border-color: #d7e3e3;
  background: #fff;
}

.public-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.public-section-heading h2,
.public-section-heading p {
  margin-bottom: 0;
}

.public-section-heading button {
  border: 0;
  color: #08794f;
  font-weight: 850;
  background: transparent;
}

.public-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

.public-championship-card {
  padding: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11, 63, 54, 0.06);
}

.public-query-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.public-query-actions button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cfe1db;
  border-radius: 7px;
  color: #0f5f48;
  font-weight: 800;
  background: #f4faf7;
}

.public-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.public-match-list {
  display: grid;
  gap: 10px;
}

.public-match-card {
  padding: 15px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fbfdfc;
}

.public-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.public-friendly-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed #c6d9d3;
  border-radius: 8px;
  text-align: center;
  background: #f8fcfa;
}

.public-friendly-empty span {
  color: #64748b;
}

.public-standing-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.public-standing-filters select {
  min-height: 40px;
  border: 1px solid #d7e3e3;
  border-radius: 7px;
}

.standing-table {
  min-width: 720px;
  grid-template-columns: 48px minmax(150px, 1fr) repeat(8, 48px) !important;
}

.public-standing-card {
  overflow-x: auto;
}

.public-standing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.74rem;
}

.public-phase-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 8px;
  background: #edf5f2;
}

.public-phase-tabs button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  font-weight: 800;
  background: transparent;
}

.public-phase-tabs button.active {
  color: #0f5f48;
  background: #fff;
  box-shadow: 0 5px 14px rgba(11, 63, 54, 0.08);
}

.public-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.public-group-card {
  padding: 15px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fbfdfc;
}

.public-group-card ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.public-group-card li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.public-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: center;
  padding: 22px;
  border-top: 1px solid #d7e3e3;
  color: #64748b;
}

.public-footer div {
  display: grid;
  gap: 4px;
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.public-footer a {
  color: #0f5f48;
  font-weight: 750;
}

.public-footer small {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .public-dashboard-hero,
  .public-two-column {
    grid-template-columns: 1fr;
  }

  .public-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .public-portal {
    gap: 14px;
  }

  .public-dashboard-hero {
    min-height: 0;
    padding: 22px 18px;
  }

  .public-dashboard-copy h2 {
    font-size: 2.15rem;
  }

  .public-dashboard-hero .public-summary-grid,
  .public-filter-bar,
  .public-card-list,
  .public-standing-filters {
    grid-template-columns: 1fr;
  }

  .public-section {
    padding: 16px;
  }

  .public-section-heading {
    display: grid;
  }

  .public-filter-clear,
  .public-query-actions button,
  .public-section-heading button {
    min-height: 46px;
  }

  .public-footer {
    grid-template-columns: 1fr;
  }
}

/* Mobile bottom navigation: each visible item shares the available width equally. */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 6px !important;
    grid-template-columns: none !important;
  }

  .mobile-bottom-nav-item {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    inline-size: auto !important;
    display: grid !important;
    place-items: center !important;
    justify-content: center !important;
  }

  .mobile-bottom-nav-item.active {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .mobile-bottom-nav-label {
    max-width: 100% !important;
    text-align: center !important;
  }
}

/* Athlete sheet: scoped modal layout, preserving every other detail dialog. */
.detail-modal.athlete-detail-modal,
.detail-modal.technician-detail-modal {
  display: flex;
  flex-direction: column;
  width: min(780px, calc(100vw - 32px));
  max-height: 84vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce8e4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 74px rgba(11, 63, 54, 0.22);
}

.detail-modal.athlete-detail-modal > header,
.detail-modal.athlete-detail-modal > header.title-only,
.detail-modal.technician-detail-modal > header,
.detail-modal.technician-detail-modal > header.title-only {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  align-items: center;
  min-height: 66px;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid #dce8e4;
  border-radius: 0;
  background: #ffffff;
}

.detail-modal.athlete-detail-modal > header.title-only h2,
.detail-modal.technician-detail-modal > header.title-only h2 {
  gap: 0;
  color: #0f172a;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0;
}

.detail-modal.athlete-detail-modal > header.title-only h2::before,
.detail-modal.technician-detail-modal > header.title-only h2::before {
  display: none;
}

.detail-modal.athlete-detail-modal > header .icon-button,
.detail-modal.technician-detail-modal > header .icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  color: #52656b;
  background: #ffffff;
}

.detail-modal.athlete-detail-modal > header .icon-button:hover,
.detail-modal.technician-detail-modal > header .icon-button:hover {
  border-color: rgba(8, 121, 79, 0.3);
  color: #0b3f36;
  background: #f1f8f5;
}

.athlete-detail-modal .detail-modal-body,
.technician-detail-modal .detail-modal-body {
  display: block;
  min-height: 0;
  padding: 18px 20px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(8, 121, 79, 0.36) transparent;
  scrollbar-width: thin;
}

.athlete-detail-modal .detail-modal-body::-webkit-scrollbar,
.technician-detail-modal .detail-modal-body::-webkit-scrollbar {
  width: 8px;
}

.athlete-detail-modal .detail-modal-body::-webkit-scrollbar-thumb,
.technician-detail-modal .detail-modal-body::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(8, 121, 79, 0.34);
}

.athlete-detail-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce8e4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f1f8f5, #ffffff 68%);
}

.athlete-detail-summary .athlete-avatar.large {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 14px;
  color: #ffffff;
  background: #08794f;
  box-shadow: none;
}

.athlete-detail-summary .athlete-avatar.large img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.athlete-detail-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.athlete-detail-identity > strong {
  color: #0f172a;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.athlete-detail-identity > span {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.athlete-detail-identity svg,
.athlete-detail-badges svg,
.athlete-detail-actions svg,
.athlete-detail-tab svg,
.athlete-detail-row-icon svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.athlete-detail-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
}

.athlete-detail-status,
.athlete-detail-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
}

.athlete-detail-status.pending {
  color: #7a5100;
  background: #fff4cf;
}

.athlete-detail-status.accepted {
  color: #07633f;
  background: #dff5e9;
}

.athlete-detail-status.rejected {
  color: #a12b2b;
  background: #fde7e7;
}

.athlete-detail-team {
  color: #29534a;
  background: #eaf4f0;
}

.athlete-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.athlete-detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.84rem;
}

.athlete-detail-actions .secondary-button.danger,
.athlete-detail-row-actions .secondary-button.danger {
  border-color: rgba(190, 52, 52, 0.36);
  color: #a12b2b;
  background: #ffffff;
}

.athlete-detail-actions .secondary-button.danger:hover,
.athlete-detail-row-actions .secondary-button.danger:hover {
  border-color: rgba(190, 52, 52, 0.58);
  background: #fff4f4;
}

.athlete-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(max-content, 1fr));
  gap: 6px;
  margin-top: 16px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #dce8e4;
  border-radius: 12px;
  background: #f4f8f6;
  scrollbar-width: none;
}

.athlete-detail-tabs::-webkit-scrollbar {
  display: none;
}

.athlete-detail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  color: #64748b;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.athlete-detail-tab small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  color: #52656b;
  background: #e4eeea;
  font-size: 0.68rem;
}

.athlete-detail-tab.active {
  color: #08794f;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(11, 63, 54, 0.08);
}

.athlete-detail-tab.active small {
  color: #ffffff;
  background: #08794f;
}

.athlete-detail-panels {
  margin-top: 14px;
}

.athlete-detail-panel {
  display: grid;
  gap: 14px;
}

.athlete-detail-panel[hidden] {
  display: none;
}

.athlete-detail-section {
  padding: 16px 17px;
  border: 1px solid #dce8e4;
  border-radius: 12px;
  background: #ffffff;
}

.athlete-detail-section h3,
.athlete-detail-panel-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 800;
}

.athlete-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 12px;
}

.athlete-detail-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f0;
}

.athlete-detail-field > span,
.athlete-detail-modalities > span {
  color: #64748b;
  font-size: 0.73rem;
  line-height: 1.2;
}

.athlete-detail-field > strong {
  color: #1b2b34;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.athlete-detail-modalities {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.athlete-detail-modalities > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.athlete-detail-modality {
  padding: 6px 9px;
  border-radius: 999px;
  color: #07633f;
  background: #e6f5ef;
  font-size: 0.75rem;
  font-weight: 750;
}

.athlete-detail-empty-value,
.athlete-detail-emergency {
  color: #334155;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.athlete-detail-inline-empty {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: #64748b;
  font-size: 0.82rem;
}

.athlete-detail-inline-empty strong {
  color: #334155;
}

.athlete-detail-update-note {
  color: #78878c;
  font-size: 0.75rem;
  text-align: center;
}

.athlete-detail-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.athlete-detail-panel-heading p {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
}

.athlete-detail-list {
  display: grid;
  gap: 9px;
}

.athlete-detail-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce8e4;
  border-radius: 11px;
  background: #ffffff;
}

.athlete-detail-row-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #08794f;
  background: #e6f5ef;
}

.athlete-detail-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.athlete-detail-row-copy strong {
  color: #1b2b34;
  font-size: 0.86rem;
}

.athlete-detail-row-copy span {
  color: #64748b;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.athlete-detail-row-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.athlete-detail-row-actions .compact-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.74rem;
}

.athlete-detail-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 210px;
  align-content: center;
  padding: 24px;
  border: 1px dashed #c8ddd6;
  border-radius: 12px;
  text-align: center;
  background: #fbfdfc;
}

.athlete-detail-empty-state > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  background: #e6f5ef;
}

.athlete-detail-empty-state svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.athlete-detail-empty-state strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.athlete-detail-empty-state p {
  max-width: 420px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Technician sheet reuses the profile-detail language without changing the directory page. */
.detail-modal.technician-detail-modal {
  width: min(900px, calc(100vw - 32px));
}

.technician-detail-summary .athlete-avatar.large {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
}

.technician-detail-badges {
  max-width: 300px;
}

.technician-detail-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.technician-detail-overview-grid .athlete-detail-section {
  min-width: 0;
}

.technician-detail-overview-grid .athlete-detail-fields {
  grid-template-columns: 1fr;
}

.technician-management-summary {
  margin-top: 14px;
}

.technician-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.technician-management-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce8e4;
  border-radius: 11px;
  background: #f8fbfa;
}

.technician-management-grid article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #08794f;
  background: #e6f5ef;
}

.technician-management-grid svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.technician-management-grid article div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.technician-management-grid small {
  color: #64748b;
  font-size: 0.72rem;
}

.technician-management-grid strong {
  color: #0f172a;
  font-size: 1.16rem;
}

.technician-management-grid p {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .technician-detail-overview-grid,
  .technician-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-detail-overview-grid .athlete-detail-section:last-child,
  .technician-management-grid article:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .modal-backdrop:has(.athlete-detail-modal),
  .modal-backdrop:has(.technician-detail-modal) {
    padding: 8px;
  }

  .detail-modal.athlete-detail-modal,
  .detail-modal.technician-detail-modal {
    width: calc(100vw - 16px);
    max-height: 94vh;
    border-radius: 16px;
  }

  .detail-modal.athlete-detail-modal > header,
  .detail-modal.athlete-detail-modal > header.title-only,
  .detail-modal.technician-detail-modal > header,
  .detail-modal.technician-detail-modal > header.title-only {
    min-height: 58px;
    padding: 14px 15px;
  }

  .detail-modal.athlete-detail-modal > header.title-only h2,
  .detail-modal.technician-detail-modal > header.title-only h2 {
    font-size: 1.2rem;
  }

  .athlete-detail-modal .detail-modal-body,
  .technician-detail-modal .detail-modal-body {
    padding: 14px;
  }

  .athlete-detail-summary {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 14px;
  }

  .athlete-detail-summary .athlete-avatar.large {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .athlete-detail-badges {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .technician-detail-badges {
    max-width: none;
  }

  .technician-detail-overview-grid,
  .technician-management-grid {
    grid-template-columns: 1fr;
  }

  .technician-detail-overview-grid .athlete-detail-section:last-child,
  .technician-management-grid article:last-child {
    grid-column: auto;
  }

  .athlete-detail-status,
  .athlete-detail-team {
    max-width: 100%;
  }

  .athlete-detail-actions,
  .athlete-detail-fields {
    grid-template-columns: 1fr;
  }

  .athlete-detail-tabs {
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
  }

  .athlete-detail-section {
    padding: 14px;
  }

  .athlete-detail-list-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .athlete-detail-list-row > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .athlete-detail-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .athlete-detail-row-actions button {
    flex: 1 1 145px;
  }
}

/* Authentication: one clear login and explicit public registration profiles. */
#auth .auth-panel-heading {
  justify-content: center;
  text-align: center;
}

#auth .auth-panel-heading > div {
  min-width: 0;
}

#auth .auth-panel-heading p {
  max-width: 48ch;
  margin-inline: auto;
}

.registration-type-picker {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.registration-type-picker legend {
  width: 100%;
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.registration-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.registration-type-option {
  min-width: 0;
  min-height: 78px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  color: #334155;
  background: #f8fbfa;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.registration-type-option:hover {
  border-color: rgba(8, 121, 79, 0.38);
  box-shadow: 0 6px 16px rgba(11, 63, 54, 0.08);
}

.registration-type-option.active {
  border-color: #08794f;
  color: #0b3f36;
  background: #eaf7f1;
  box-shadow: inset 0 0 0 1px rgba(8, 121, 79, 0.12);
}

.registration-type-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  background: #e1f2ea;
}

.registration-type-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.registration-type-option > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.registration-type-option strong,
.registration-type-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-type-option strong {
  font-size: 0.9rem;
}

.registration-type-option small {
  color: #64748b;
  font-size: 0.7rem;
}

#registerForm > .registration-type-picker,
#registerForm > .register-login-switch {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .registration-type-options {
    grid-template-columns: 1fr;
  }

  .registration-type-option {
    min-height: 62px;
  }
}

@media (min-width: 769px) {
  html body[data-role="guest"] aside.sidebar .nav-tab[data-nav-auth-role] {
    display: flex !important;
  }
}

@media (max-width: 560px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    padding: 14px 8px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav-icon,
  .action-icon {
    width: 22px;
    height: 22px;
  }

  .main-content {
    padding: 16px 8px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .status-pill {
    max-width: 132px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .status-avatar {
    width: 30px;
    height: 30px;
  }

  .status-pill strong {
    font-size: 0.75rem;
  }

  .status-pill small {
    font-size: 0.7rem;
  }

  .hero-copy,
  .public-hero-panel,
  .panel {
    padding: 14px;
  }

  .hero-actions,
  .panel-actions,
  .card-actions,
  .team-card-actions,
  .athlete-card-actions {
    width: 100%;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .panel-actions .secondary-button,
  .panel-actions .primary-button {
    width: 100%;
  }

  .team-card-actions,
  .athlete-card-actions {
    grid-template-columns: 1fr 40px 40px;
  }

  .public-match-teams strong {
    font-size: 1rem;
  }
}

/* SUPER_ADMIN technical administration */
.super-admin-view .panel {
  border-color: rgba(21, 127, 98, 0.18);
}

.compact-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.6fr) minmax(140px, 0.5fr);
  gap: 10px;
  width: min(100%, 720px);
}

.admin-stack-row {
  align-items: center;
  background: rgba(247, 252, 249, 0.9);
  border: 1px solid rgba(21, 127, 98, 0.14);
  border-left: 4px solid #157f62;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.admin-stack-row[data-tone="danger"] {
  border-left-color: #b94040;
}

.admin-stack-row[data-tone="success"] {
  border-left-color: #157f62;
}

.admin-stack-row strong {
  display: block;
}

.admin-stack-row span {
  color: #526475;
  display: block;
  font-size: 0.92rem;
}

.admin-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compact-select {
  background: #fff;
  border: 1px solid #d3e2df;
  border-radius: 8px;
  color: #14212b;
  min-height: 36px;
  padding: 0 10px;
}

.admin-permission-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-permission-card {
  background: rgba(247, 252, 249, 0.9);
  border: 1px solid rgba(21, 127, 98, 0.14);
  border-radius: 8px;
  padding: 14px;
}

.admin-permission-card h3 {
  margin: 0;
}

.admin-permission-card p {
  color: #526475;
  margin: 3px 0 10px;
}

@media (max-width: 720px) {
  .admin-two-column,
  .admin-filter-row {
    grid-template-columns: 1fr;
  }

  .admin-stack-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-row-actions {
    justify-content: flex-start;
  }
}

/* Final responsive alignment pass for tablet and mobile review notes. */
.topbar {
  align-items: start;
}

.topbar .status-pill {
  justify-self: end;
}

#times .content-grid {
  width: 100%;
  max-width: none;
}

#times .panel.wide {
  width: 100%;
  max-width: none;
}

#times .panel-header {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
}

#times .panel-header .filter-row {
  width: min(100%, 320px);
  justify-self: end;
  justify-content: end;
}

#times .team-grid {
  width: 100%;
}

.municipal-report-panel {
  width: 100%;
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .topbar .status-pill {
    justify-self: end;
    width: auto;
    max-width: 148px;
    min-width: 0;
  }

  .status-copy {
    max-width: 86px;
  }

  #times .panel-header {
    grid-template-columns: 1fr;
  }

  #times .panel-header .filter-row {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    justify-content: stretch;
  }

  #times .panel-header .filter-row select {
    width: 100%;
  }

  .municipal-report-panel .panel-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar .status-pill {
    max-width: 118px;
    grid-template-columns: 28px minmax(0, 1fr) 26px;
    gap: 6px;
    padding: 6px;
  }

  .status-copy {
    max-width: 72px;
  }

  .topbar .status-avatar {
    width: 28px;
    height: 28px;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.68rem;
  }

  .sync-status-line {
    display: none;
  }

  .sync-now-button {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 0.72rem;
  }
}

/* Mobile and tablet product experience. This layer intentionally stays last. */
@media (min-width: 821px) and (max-width: 1180px) {
  .main-content {
    padding: 24px clamp(18px, 2.4vw, 28px);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 18px;
  }

  .topbar .status-pill {
    max-width: 230px;
  }

  .content-grid,
  .draw-layout,
  .auth-layout,
  .profile-layout,
  #campeonatos .content-grid,
  #atleticas .content-grid {
    grid-template-columns: 1fr;
  }

  #times .content-grid {
    grid-template-columns: 1fr;
  }

  #times .team-grid,
  #atletas .athlete-card-grid,
  #tecnicos .technician-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .municipal-report-grid,
  .public-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero,
  .public-hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-board {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
    min-height: 100vh;
  }

  .main-content {
    width: 100%;
    min-height: 100vh;
    padding: 16px clamp(12px, 3.5vw, 18px) 98px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    margin-bottom: 18px;
  }

  .topbar .eyebrow {
    max-width: min(100%, 58vw);
    font-size: 0.7rem;
    line-height: 1.2;
  }

  h1 {
    max-width: min(100%, 58vw);
    font-size: clamp(1.7rem, 8vw, 2.25rem);
    line-height: 1.02;
  }

  .topbar .status-pill {
    position: sticky;
    top: 10px;
    z-index: 20;
    width: fit-content;
    max-width: min(184px, 39vw);
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    justify-self: end;
    padding: 8px;
    border-radius: 12px;
  }

  .topbar .status-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .status-copy {
    max-width: none;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.76rem;
    line-height: 1.05;
  }

  .home-hero,
  .public-hero-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
  }

  .hero-copy,
  .public-hero-panel {
    padding: clamp(18px, 5vw, 24px);
  }

  .hero-copy h2,
  .public-hero-panel h2 {
    font-size: clamp(2.05rem, 10vw, 3.1rem);
    line-height: 1.03;
  }

  .hero-actions,
  .panel-actions,
  .card-actions,
  .confirmation-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .panel-actions .primary-button,
  .panel-actions .secondary-button,
  .card-actions .primary-button,
  .card-actions .secondary-button {
    width: 100%;
    min-height: 46px;
  }

  .hero-board {
    min-height: 260px;
  }

  .role-grid,
  .dashboard-grid,
  .content-grid,
  .draw-layout,
  .auth-layout,
  .profile-layout,
  #times .content-grid,
  #campeonatos .content-grid,
  #atleticas .content-grid,
  .public-summary-grid,
  .municipal-report-grid,
  .repository-diagnostic-grid,
  .diagnostic-config-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .metric-card,
  .role-card,
  .team-card,
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-match-card {
    border-radius: 10px;
  }

  .panel {
    padding: 15px;
  }

  .panel-header,
  #times .panel-header,
  #atletas .panel-header,
  #tecnicos .panel-header,
  #portal .panel-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #times .panel-header .filter-row,
  #atletas .panel-header .filter-row,
  #tecnicos .panel-header .filter-row,
  #portal .panel-header .filter-row,
  .filter-row,
  .public-schedule-filter {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    justify-self: stretch;
    margin-left: 0;
  }

  .search-input,
  select,
  input,
  textarea {
    width: 100%;
    min-height: 46px;
    font-size: 16px;
  }

  .form-row,
  .inline-form,
  .document-form,
  .profile-form,
  .match-event-form,
  .manual-score-form,
  .lookup-row,
  .form-actions-row,
  #registerForm .register-course-row:not(.single-field),
  .auth-panel .register-course-row:not(.single-field) {
    grid-template-columns: 1fr;
  }

  #times .team-grid,
  #atletas .athlete-card-grid,
  #tecnicos .technician-card-grid,
  .groups-grid,
  .match-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-card,
  .athlete-card,
  .technician-card {
    padding: 14px;
  }

  .team-card-actions,
  .athlete-card-actions,
  .technician-card-actions {
    grid-template-columns: 1fr 44px 44px;
    gap: 8px;
  }

  .team-card-actions .secondary-button,
  .athlete-card-actions .secondary-button,
  .technician-card-actions .secondary-button {
    min-height: 42px;
  }

  .team-stats,
  .athlete-meta,
  .detail-grid,
  .championship-info-grid,
  .public-info-grid,
  .admin-athlete-summary {
    grid-template-columns: 1fr;
  }

  .match-row,
  .knockout-score-form {
    grid-template-columns: 1fr;
  }

  .match-teams {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .match-teams span {
    transform: rotate(90deg);
  }

  .score-form {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .score-form button[type="submit"],
  .score-form [data-open-match] {
    grid-column: 1 / -1;
  }

  .score-form [data-open-match],
  .score-form .secondary-button,
  .score-form .primary-button {
    min-height: 44px;
    white-space: normal;
  }

  .municipal-report-panel .panel-header,
  .report-actions,
  .diagnostic-config-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .main-content {
    padding-inline: 10px;
    padding-bottom: 94px;
  }

  .topbar {
    gap: 8px;
  }

  .topbar .eyebrow,
  h1 {
    max-width: 54vw;
  }

  .topbar .status-pill {
    max-width: min(128px, 40vw);
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 6px;
  }

  .topbar .status-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.68rem;
  }

  .hero-copy h2,
  .public-hero-panel h2 {
    font-size: clamp(1.9rem, 11vw, 2.6rem);
  }

  .hero-board {
    min-height: 220px;
  }

  .panel,
  .metric-card,
  .team-card,
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-match-card {
    padding: 12px;
  }

  .team-card-actions,
  .athlete-card-actions,
  .technician-card-actions {
    grid-template-columns: 1fr 42px 42px;
  }
}

@media (max-width: 768px) {
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    display: none !important;
  }

  .main-content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar .eyebrow,
  .topbar h1 {
    min-width: 0;
    max-width: 100%;
  }

  .topbar .status-pill {
    grid-template-columns: 34px minmax(0, 1fr);
    justify-self: end;
    width: max-content;
    max-width: min(220px, 44vw);
    gap: 8px;
    padding: 8px;
  }

  .topbar .status-avatar {
    width: 34px;
    height: 34px;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.76rem;
    line-height: 1.05;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 68px;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  }

  .mobile-bottom-nav-item {
    display: grid;
    grid-template-rows: 26px auto;
    place-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 56px;
    padding: 5px 4px;
    border: 0;
    border-radius: 10px;
    color: #6b7280;
    background: transparent;
    font: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-item:focus-visible,
  .mobile-more-option:focus-visible {
    outline: 3px solid rgba(30, 136, 229, 0.24);
    outline-offset: 2px;
  }

  .mobile-bottom-nav-item.active {
    color: #1e88e5;
    background: #eff7ff;
  }

  .mobile-bottom-nav-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-size: 1.1rem;
    line-height: 1;
  }

  .mobile-bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-nav,
  .mobile-more-backdrop {
    display: none !important;
  }
}

/* Final shell polish: keeps the current app stable while resolving the mobile review notes. */
html,
body,
.app-shell,
.main-content {
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.topbar > div:first-child,
.status-copy,
.status-pill strong,
.status-pill small {
  min-width: 0;
}

.topbar .status-pill {
  justify-self: end;
  width: max-content;
  max-width: min(260px, 34vw);
}

.status-pill strong,
.status-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#times .content-grid {
  width: 100%;
  max-width: none;
}

#times .panel.wide {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

#times .panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

#times .panel-header .filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  width: min(100%, 320px);
  margin-left: auto;
  justify-content: end;
  justify-self: end;
}

#times .panel-header .filter-row select {
  width: 100%;
  min-width: 0;
}

#times .team-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

body[data-role="sportsDirector"] #times .content-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 768px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .topbar .eyebrow,
  .topbar h1 {
    max-width: calc(100vw - 190px);
  }

  .topbar .status-pill {
    grid-template-columns: 32px minmax(0, 1fr);
    max-width: min(170px, 42vw);
    gap: 7px;
    padding: 7px;
  }

  .topbar .status-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.72rem;
    line-height: 1.05;
  }

  #times .panel-header {
    grid-template-columns: 1fr;
  }

  #times .panel-header .filter-row {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    margin-left: 0;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .topbar .eyebrow,
  .topbar h1 {
    max-width: calc(100vw - 150px);
  }

  .topbar .status-pill {
    grid-template-columns: 28px minmax(0, 1fr);
    max-width: min(132px, 40vw);
    gap: 6px;
    padding: 6px;
  }

  .topbar .status-avatar {
    width: 28px;
    height: 28px;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.66rem;
  }
}

/* MVP review polish: stable compact sidebar, cleaner cards and mobile navigation. */
.app-shell,
.app-shell.sidebar-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar,
.app-shell.sidebar-collapsed .sidebar {
  width: 84px;
  padding: 18px 10px;
}

.brand,
.app-shell.sidebar-collapsed .brand {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: 10px;
  padding-inline: 0;
}

.brand-text,
.nav-label,
.action-label,
.sidebar-toggle,
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .action-label,
.app-shell.sidebar-collapsed .sidebar-toggle {
  display: none !important;
}

.nav-tabs,
.app-shell.sidebar-collapsed .nav-tabs {
  grid-template-columns: 1fr;
}

.nav-tab,
.ghost-button,
.app-shell.sidebar-collapsed .nav-tab,
.app-shell.sidebar-collapsed .ghost-button {
  justify-content: center;
  padding-inline: 8px;
}

.sidebar-actions,
.app-shell.sidebar-collapsed .sidebar-actions {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.athlete-card .tag-row {
  margin-bottom: auto;
}

.technician-card-note {
  color: var(--muted);
}

#times .panel-header {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: start;
}

#times .panel-header .filter-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 520px;
  gap: 10px;
  justify-self: end;
}

#times .panel-header .filter-row select {
  min-height: 42px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  #times .panel-header {
    grid-template-columns: 1fr;
  }

  #times .panel-header .filter-row {
    justify-self: stretch;
    max-width: none;
  }
}

/* Linked operational forms and document hierarchy */
#campeonatos .championship-directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

#campeonatos .championship-directory-header .primary-button {
  width: auto;
  min-width: 176px;
  flex: 0 0 auto;
  color: #fff;
}

#campeonatos #championshipForm,
#campeonatos .category-panel {
  scroll-margin-top: 24px;
}

#campeonatos .championship-form-feedback {
  padding: 12px 14px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #f8fbfa;
  color: #0f3f35;
  font-weight: 800;
  line-height: 1.35;
}

#campeonatos .championship-form-feedback[data-tone="error"] {
  border-color: #f5c2c7;
  background: #fff5f5;
  color: #9f1239;
}

#campeonatos .championship-form-feedback[data-tone="success"] {
  border-color: #b7e4cc;
  background: #f0fdf4;
  color: #08794f;
}

#escolinhas .school-program-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

#escolinhas .school-program-form > label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 750;
}

#escolinhas .school-program-form :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  background: #fff;
}

#escolinhas .school-program-form .school-program-description {
  grid-column: 1 / -1;
}

#escolinhas .school-program-form .school-program-description textarea {
  min-height: 92px;
  resize: vertical;
}

#escolinhas .school-program-form .school-program-submit {
  grid-column: 1 / -1;
  width: min(100%, 320px);
  justify-self: end;
}

#documentos .document-command-center {
  display: grid;
  gap: 24px;
}

#documentos .document-command-sidebar {
  display: block;
}

#documentos .document-support-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid #e5eeeb;
}

#documentos .document-support-grid #documentFrontModules,
#documentos .document-support-grid #documentFrontMetrics {
  width: 100%;
  min-width: 0;
}

#documentos .document-support-grid #documentFrontModules {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#documentos .document-support-grid #documentFrontMetrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  #escolinhas .school-program-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #documentos .document-support-grid #documentFrontMetrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #campeonatos .championship-directory-header { align-items: stretch; flex-direction: column; }
  #campeonatos .championship-directory-header .primary-button { width: 100%; }
  #escolinhas .school-program-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  #escolinhas .school-program-form { grid-template-columns: minmax(0, 1fr); }
  #escolinhas .school-program-form .school-program-submit { width: 100%; }
  #documentos .document-support-grid #documentFrontMetrics { grid-template-columns: minmax(0, 1fr); }
}

/* Relatórios full-width layout correction */
#relatorios,
#relatorios > .content-grid,
#relatorios .reports-dashboard-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#relatorios > .content-grid {
  display: block;
  margin: 0;
}

#relatorios .reports-dashboard-panel {
  box-sizing: border-box;
}

#relatorios .report-filter-bar {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) minmax(220px,1.2fr) auto;
  align-items: end;
  gap: 16px;
  box-sizing: border-box;
}

#relatorios .report-filter-bar > * {
  min-width: 0;
}

#relatorios .report-filter-bar label,
#relatorios .report-filter-bar :is(select,button) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#relatorios .report-export-button {
  width: auto !important;
  min-width: 164px;
  min-height: 42px;
  padding: 6px 13px;
  display: grid;
  align-content: center;
  gap: 1px;
  white-space: nowrap;
}

#relatorios .report-export-button span {
  font-size: .78rem;
  font-weight: 800;
}

#relatorios .report-export-button small {
  font-size: .62rem;
  font-weight: 600;
}

#relatorios #reportsFrontMetrics {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

#relatorios .report-metric-card {
  min-width: 0;
  padding: 20px 22px;
  box-sizing: border-box;
}

#relatorios .report-metric-card :is(small,strong,span) {
  min-width: 0;
  overflow-wrap: break-word;
}

#relatorios .report-visual-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
}

#relatorios .report-visual-card {
  width: 100%;
  min-width: 0;
  min-height: 320px;
  padding: 22px 26px;
  box-sizing: border-box;
  overflow: hidden;
}

#relatorios .report-visual-card :is(h3,p,strong,span) {
  min-width: 0;
  overflow-wrap: break-word;
}

#relatorios .report-chart-empty {
  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  box-sizing: border-box;
}

#relatorios .report-chart-empty p {
  max-width: 420px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  #relatorios .report-visual-grid {
    grid-template-columns: minmax(0,1fr);
  }

  #relatorios .report-export-button {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics {
    grid-template-columns: minmax(0,1fr);
  }

  #relatorios .report-visual-card {
    min-height: 300px;
    padding: 20px;
  }
}

/* Final PGE page and sidebar behavior. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-expanded,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0,1fr) !important;
  }

  .app-shell .sidebar,
  .app-shell.sidebar-expanded .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1000 !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: none !important;
    height: 100vh !important;
    overflow: hidden !important;
    transition: width 180ms ease, box-shadow 180ms ease !important;
  }

  .app-shell .sidebar.is-open,
  .app-shell.sidebar-expanded .sidebar.is-open {
    width: 220px !important;
    box-shadow: 18px 0 38px rgba(15,23,42,.2) !important;
  }

  .app-shell .main-content,
  .app-shell.sidebar-expanded .main-content,
  .app-shell.sidebar-collapsed .main-content {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  .app-shell .sidebar :is(.brand-text,.nav-label,.action-label,.sidebar-meta small) {
    display: block !important;
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }

  .app-shell .sidebar.is-open :is(.brand-text,.nav-label,.action-label,.sidebar-meta small) {
    width: auto !important;
    opacity: 1 !important;
  }

  .app-shell .sidebar :is(.brand,.brand-logo-button,.nav-tabs,.sidebar-actions) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .app-shell .sidebar .brand-logo-button {
    position: relative !important;
    z-index: 1002 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .app-shell .sidebar .nav-tab,
  .app-shell .sidebar .ghost-button {
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    margin-inline: 8px !important;
    grid-template-columns: 40px minmax(0,1fr) !important;
    justify-content: start !important;
    transform: none !important;
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999 !important;
    border: 0 !important;
    background: rgba(15,23,42,.22) !important;
  }

  .sidebar-overlay[hidden] { display: none !important; }
}

.main-content {
  background-color: #f4faf7 !important;
  background-image: linear-gradient(rgba(11,63,54,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(11,63,54,.075) 1px,transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: 0 0 !important;
}

.home-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }

#escolinhas .school-summary-card > header,
#campeonatos .championship-summary-card > header {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
}

#escolinhas button.school-summary-link,
#campeonatos button.championship-summary-link {
  position: static !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 0 0 auto !important;
  padding: 2px 0 !important;
  justify-self: end !important;
  white-space: nowrap !important;
  color: #08794f !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#championshipTeamSummary .front-metric-card,
#championshipTeamSummary .front-metric-card :is(span,strong,small) { color: #0f172a !important; }
#championshipTeamSummary .front-metric-card { background: #fff !important; }
#locais .location-add-button,
#locais .location-add-button * { color: #fff !important; }

#sidebarActions .ghost-button {
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
}

#perfil .profile-layout.account-profile {
  width: min(100%,760px) !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0,1fr) !important;
}

#perfil .profile-card-panel {
  padding: 28px !important;
  border: 1px solid #d7e3e3 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(11,63,54,.1) !important;
}

#perfil .account-photo-preview {
  width: 100% !important;
  min-height: 150px !important;
  margin: 18px 0 24px !important;
  border: 1px dashed rgba(8,121,79,.35) !important;
  border-radius: 14px !important;
  background: #f4faf7 !important;
}

#perfil .profile-layout.account-profile {
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

#perfil .profile-layout.account-profile .profile-card-panel {
  overflow: hidden;
}

#directorProfileForm {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start;
  gap: 18px !important;
}

#directorProfileForm > .form-status-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  max-width: none;
  padding: 16px 18px;
  border-left-width: 5px;
}

#directorProfileForm > .form-status-notice strong {
  font-size: 1rem;
}

#directorProfileForm > .form-status-notice span {
  min-width: 0;
  line-height: 1.35;
}

#directorProfileForm > label,
#directorProfileForm .profile-form-section label {
  display: grid;
  min-width: 0;
  gap: 8px;
}

#directorProfileForm input,
#directorProfileForm textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#directorProfileForm .profile-form-section {
  padding: 22px !important;
  overflow: hidden;
}

#directorProfileForm .profile-form-section > header {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1ece9;
}

#directorProfileForm .profile-form-section-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

#directorProfileForm .profile-form-section-grid .wide-field {
  grid-column: span 2 !important;
}

#directorProfileForm .profile-form-section-grid textarea {
  min-height: 120px;
  resize: vertical;
}

#directorProfileForm > .full-field,
#directorProfileForm > .hidden-file-field,
#directorProfileForm > .profile-form-section,
#directorProfileForm > button {
  grid-column: 1 / -1 !important;
}

#directorProfileForm > label:nth-of-type(4),
#directorProfileForm > label:nth-of-type(5) {
  grid-column: span 3 !important;
}

body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-role="sportsDirector"] #professionalAgeGroupsField {
  display: none !important;
}

body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid .wide-field {
  grid-column: span 3 !important;
}

body[data-role="professor"] #directorProfileForm .profile-form-section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-role="professor"] #directorProfileForm .profile-form-section-grid .wide-field {
  grid-column: span 3 !important;
}

body[data-role="sportsDirector"] #directorProfilePreview,
body[data-role="professor"] #directorProfilePreview {
  min-height: 118px !important;
  margin: 12px 0 18px !important;
}

@media (max-width: 768px) {
  .sidebar,.sidebar-overlay { display: none !important; }
  .home-metric-grid { grid-template-columns: minmax(0,1fr) !important; }
  #perfil .profile-card-panel { padding: 20px !important; }
  #directorProfileForm,
  #directorProfileForm .profile-form-section-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #directorProfileForm > label,
  #directorProfileForm .profile-form-section-grid .wide-field,
  body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid .wide-field,
  body[data-role="professor"] #directorProfileForm .profile-form-section-grid .wide-field {
    grid-column: 1 / -1 !important;
  }

  #directorProfileForm > .form-status-notice {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact institutional user card: layer-one */
.topbar .status-pill {
  width: auto;
  min-width: 0;
  max-width: 240px;
  min-height: 58px;
  height: auto;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 11px;
  box-sizing: border-box;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11,63,54,.08);
  color: #0f172a;
  text-align: left;
  transform: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.topbar .status-pill:hover {
  border-color: rgba(8,121,79,.28);
  box-shadow: 0 7px 18px rgba(11,63,54,.12);
  transform: none;
}

.topbar .status-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #08794f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.topbar .status-copy {
  min-width: 0;
  max-width: 164px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.topbar .status-pill strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #08794f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill .sync-now-button {
  display: none !important;
}

.topbar .status-action-label {
  grid-column: 2;
  width: fit-content;
  margin-top: 1px;
  padding: 2px 6px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .topbar .status-pill {
    max-width: 205px;
    min-height: 54px;
    padding: 8px 11px;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 9px;
  }

  .topbar .status-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .topbar .status-copy {
    max-width: 138px;
  }

  .topbar .status-pill strong { font-size: 14px; }
  .topbar .status-pill small { font-size: 11px; }
}

@media (max-width: 560px) {
  body:not([data-role="guest"]) .topbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  body:not([data-role="guest"]) .topbar .status-pill {
    display: grid !important;
    width: auto !important;
    max-width: 132px !important;
    min-height: 46px;
    padding: 6px 8px !important;
    grid-template-areas: none !important;
    grid-template-columns: 32px minmax(0,1fr) !important;
    gap: 7px !important;
  }

  body:not([data-role="guest"]) .topbar .status-avatar {
    grid-area: auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-copy {
    display: grid;
    max-width: 78px;
  }

  body:not([data-role="guest"]) .topbar .status-pill strong {
    grid-area: auto;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-pill small {
    display: none;
  }
}

.athlete-schools-module {
  display: grid;
  gap: 22px;
  width: 100%;
}

.athlete-schools-header,
.athlete-school-panel,
.athlete-school-detail-card,
.athlete-school-card,
.athlete-school-request-card,
.athlete-school-class-card {
  background: #fff;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(11, 63, 54, 0.07);
}

.athlete-schools-header {
  padding: 26px;
}

.athlete-schools-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.athlete-schools-header p:last-child {
  max-width: 680px;
  margin: 8px 0 0;
  color: #64748b;
  font-weight: 600;
}

.athlete-schools-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.athlete-school-tab {
  min-height: 54px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.athlete-school-tab:hover,
.athlete-school-tab.active {
  border-color: rgba(8, 121, 79, 0.45);
  background: #eaf7f1;
  box-shadow: 0 8px 18px rgba(11, 63, 54, 0.08);
  transform: translateY(-1px);
}

.athlete-school-panel {
  padding: 24px;
}

.athlete-school-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(140px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.athlete-school-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.athlete-school-toolbar input,
.athlete-school-toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}

.athlete-school-vacancy-toggle {
  display: flex !important;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #f8fcfa;
}

.athlete-school-card-grid {
  display: grid;
  gap: 16px;
}

.athlete-school-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: stretch;
  padding: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.athlete-school-card:hover {
  border-color: rgba(8, 121, 79, 0.35);
  box-shadow: 0 12px 26px rgba(11, 63, 54, 0.1);
  transform: translateY(-1px);
}

.athlete-school-card-media {
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(11,63,54,0.86), rgba(8,121,79,0.82)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 36px);
  color: #fff;
}

.athlete-school-card-media span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.13);
  font-size: 26px;
  font-weight: 900;
}

.athlete-school-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.athlete-school-card-heading,
.athlete-school-card-actions,
.athlete-school-inline-actions,
.athlete-school-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.athlete-school-card-heading {
  justify-content: space-between;
}

.athlete-school-card h3,
.athlete-school-request-card h3,
.athlete-school-class-card h3,
.athlete-school-detail-card h3 {
  margin: 0;
  color: #0f172a;
  line-height: 1.15;
}

.athlete-school-card p,
.athlete-school-request-card p,
.athlete-school-class-card p,
.athlete-school-detail-card p {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.athlete-school-sport {
  width: fit-content;
  color: #08794f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.athlete-school-status {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e6f5ef;
  color: #08794f;
  font-size: 12px;
  font-weight: 900;
}

.athlete-school-status.is-approved { background: #dcfce7; color: #166534; }
.athlete-school-status.is-pending { background: #fff7ed; color: #9a3412; }
.athlete-school-status.is-waiting { background: #fef3c7; color: #92400e; }
.athlete-school-status.is-closed { background: #fee2e2; color: #991b1b; }

.athlete-school-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.athlete-school-meta-grid span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #e6eeee;
  border-radius: 12px;
  background: #f8fcfa;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.athlete-school-meta-grid svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  stroke: #08794f;
  fill: none;
  stroke-width: 2;
}

.athlete-school-meta-grid strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.athlete-school-card-actions {
  justify-content: flex-end;
  align-self: center;
}

.athlete-school-detail-card {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
}

.athlete-school-detail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.athlete-school-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 58%, #08794f 100%);
  color: #fff;
}

.athlete-school-detail-hero h3,
.athlete-school-detail-hero p,
.athlete-school-detail-hero .athlete-school-sport {
  color: #fff;
}

.athlete-school-vacancy-box {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
}

.athlete-school-vacancy-box strong {
  font-size: 48px;
  line-height: 1;
}

.athlete-school-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.athlete-school-detail-grid section,
.athlete-school-profile-warning,
.athlete-school-confirmation,
.athlete-school-success {
  padding: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #f8fcfa;
}

.athlete-school-detail-grid h4,
.athlete-school-confirmation h4 {
  margin: 0 0 8px;
  color: #0f172a;
}

.athlete-school-detail-grid ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-weight: 600;
}

.athlete-school-teacher {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.athlete-school-teacher > span {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 14px;
  background: #08794f;
  color: #fff;
  font-weight: 900;
}

.athlete-school-profile-warning {
  border-left: 4px solid #f7b733;
}

.athlete-school-success {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  border-left: 4px solid #08794f;
  color: #0b3f36;
}

.athlete-school-request-card,
.athlete-school-class-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.athlete-school-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 260px;
  padding: 30px;
  border: 1px dashed rgba(8, 121, 79, 0.3);
  border-radius: 16px;
  background: #f8fcfa;
  text-align: center;
}

.athlete-school-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: #e6f5ef;
}

.athlete-school-empty-icon svg {
  width: 28px;
  height: 28px;
  stroke: #08794f;
  fill: none;
  stroke-width: 2;
}

.athlete-school-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.athlete-school-section-heading h3 {
  margin: 0;
  color: #0f172a;
}

.athlete-school-section-heading p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .athlete-school-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-school-search {
    grid-column: 1 / -1;
  }

  .athlete-school-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .athlete-school-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .athlete-school-card-actions .primary-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .athlete-schools-module {
    padding-bottom: 86px;
  }

  .athlete-schools-tabs,
  .athlete-school-toolbar,
  .athlete-school-card,
  .athlete-school-detail-hero,
  .athlete-school-detail-grid,
  .athlete-school-meta-grid {
    grid-template-columns: 1fr;
  }

  .athlete-school-panel,
  .athlete-schools-header,
  .athlete-school-detail-card {
    padding: 16px;
    border-radius: 14px;
  }

  .athlete-school-card-media {
    min-height: 132px;
  }

  .athlete-school-card-actions .primary-button,
  .athlete-school-inline-actions .secondary-button,
  .athlete-school-detail-actions .primary-button,
  .athlete-school-detail-actions .secondary-button {
    width: 100%;
  }
}

/* Athlete Escolinhas: structural responsive layout. */
#escolinhas .schools-layout.athlete-school-mode {
  display: block !important;
  width: 100% !important;
  max-width: min(1440px, 100%) !important;
  margin-inline: auto !important;
}

#escolinhas .schools-layout.athlete-school-mode > #athleteSchoolsModule {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.athlete-schools-module {
  gap: 24px;
  inline-size: 100%;
  min-inline-size: 0;
}

.athlete-schools-header {
  display: grid;
  gap: 8px;
  padding: clamp(18px, 2.2vw, 30px);
}

.athlete-schools-header h2 {
  max-width: 100%;
  font-size: clamp(30px, 3.1vw, 46px);
  line-height: 1.04;
  text-wrap: balance;
}

.athlete-schools-header p:last-child {
  max-width: 760px;
  line-height: 1.45;
}

.athlete-schools-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}

.athlete-school-tab {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.athlete-school-panel {
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 2vw, 26px);
}

.athlete-school-toolbar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
  align-items: end;
}

.athlete-school-toolbar > label {
  grid-column: span 2;
  width: 100%;
  min-width: 0;
}

.athlete-school-toolbar > .athlete-school-search {
  grid-column: span 4;
}

.athlete-school-toolbar > .athlete-school-vacancy-toggle {
  grid-column: span 2;
  align-self: end;
  justify-content: flex-start;
  gap: 10px;
  line-height: 1.2;
}

.athlete-school-toolbar > .athlete-school-vacancy-toggle input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

.athlete-school-card-grid {
  width: 100%;
  min-width: 0;
}

.athlete-school-card {
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) minmax(160px, auto);
  width: 100%;
  min-width: 0;
}

.athlete-school-card-body,
.athlete-school-card-heading,
.athlete-school-meta-grid,
.athlete-school-request-card,
.athlete-school-class-card,
.athlete-school-detail-card {
  min-width: 0;
}

.athlete-school-empty {
  width: 100%;
  min-width: 0;
  min-height: clamp(220px, 28vw, 300px);
}

@media (min-width: 1200px) {
  #escolinhas .schools-layout.athlete-school-mode {
    max-width: min(1440px, calc(100vw - var(--sidebar-collapsed-width) - 64px)) !important;
  }
}

@media (min-width: 960px) and (max-width: 1199px) {
  #escolinhas .schools-layout.athlete-school-mode {
    max-width: min(1180px, 100%) !important;
  }

  .athlete-school-toolbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .athlete-school-toolbar > .athlete-school-search {
    grid-column: 1 / -1;
  }

  .athlete-school-toolbar > label {
    grid-column: span 2;
  }

  .athlete-school-toolbar > .athlete-school-vacancy-toggle {
    grid-column: span 3;
  }

  .athlete-school-card {
    grid-template-columns: 144px minmax(0, 1fr);
  }

  .athlete-school-card-actions {
    grid-column: 1 / -1;
  }
}

@media (min-width: 769px) and (max-width: 959px) {
  #appShell > .main-content {
    padding-inline: 18px !important;
  }

  #escolinhas .schools-layout.athlete-school-mode {
    max-width: 100% !important;
  }

  .athlete-schools-module {
    gap: 18px;
  }

  .athlete-schools-header h2 {
    font-size: clamp(28px, 5vw, 38px);
  }

  .athlete-schools-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .athlete-school-tab {
    min-height: 64px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .athlete-school-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-school-toolbar > label,
  .athlete-school-toolbar > .athlete-school-search,
  .athlete-school-toolbar > .athlete-school-vacancy-toggle {
    grid-column: auto;
  }

  .athlete-school-toolbar > .athlete-school-search,
  .athlete-school-toolbar > .athlete-school-vacancy-toggle {
    grid-column: 1 / -1;
  }

  .athlete-school-card {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
  }

  .athlete-school-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .athlete-school-card-actions .primary-button {
    width: 100%;
  }

  .athlete-school-detail-hero,
  .athlete-school-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #escolinhas .schools-layout.athlete-school-mode {
    max-width: 100% !important;
  }

  .athlete-schools-module {
    gap: 16px;
    padding-bottom: 92px;
  }

  .athlete-schools-header {
    padding: 18px;
  }

  .athlete-schools-header h2 {
    font-size: clamp(27px, 9vw, 36px);
    line-height: 1.06;
  }

  .athlete-schools-tabs,
  .athlete-school-toolbar,
  .athlete-school-card,
  .athlete-school-meta-grid,
  .athlete-school-detail-hero,
  .athlete-school-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .athlete-school-tab {
    justify-content: flex-start;
    min-height: 52px;
    text-align: left;
  }

  .athlete-school-toolbar > label,
  .athlete-school-toolbar > .athlete-school-search,
  .athlete-school-toolbar > .athlete-school-vacancy-toggle {
    grid-column: 1 / -1;
  }

  .athlete-school-vacancy-toggle {
    align-items: center;
    justify-content: flex-start;
  }

  .athlete-school-card {
    padding: 14px;
  }

  .athlete-school-card-media {
    min-height: 128px;
  }

  .athlete-school-card-actions,
  .athlete-school-inline-actions,
  .athlete-school-detail-actions {
    justify-content: stretch;
  }

  .athlete-school-card-actions .primary-button,
  .athlete-school-inline-actions .secondary-button,
  .athlete-school-detail-actions .primary-button,
  .athlete-school-detail-actions .secondary-button {
    width: 100%;
  }

  .athlete-school-empty {
    min-height: 220px;
    padding: 22px 16px;
  }
}

/* Athlete Campeonatos: personal read-only module. */
#campeonatos .content-grid.athlete-championship-mode {
  display: block !important;
  width: 100% !important;
  max-width: min(1440px, 100%) !important;
  margin-inline: auto !important;
}

#campeonatos .content-grid.athlete-championship-mode > #athleteChampionshipModule {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.athlete-championship-module {
  display: grid;
  gap: 22px;
  width: 100%;
  min-width: 0;
  padding-bottom: 24px;
}

.athlete-championship-header,
.athlete-championship-panel,
.athlete-championship-detail,
.athlete-championship-summary-card,
.athlete-championship-card,
.athlete-match-card,
.panel-like {
  background: #ffffff;
  border: 1px solid #d7e3e3;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(11, 63, 54, 0.08);
}

.athlete-championship-header {
  padding: clamp(20px, 2.5vw, 32px);
}

.athlete-championship-header h2 {
  margin: 4px 0 8px;
  color: #0f172a;
  font-size: clamp(32px, 3.5vw, 50px);
  line-height: 1.04;
}

.athlete-championship-header p {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.athlete-championship-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.athlete-championship-summary-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.athlete-championship-summary-card > span,
.athlete-championship-empty-icon,
.athlete-championship-card-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #e6f5ef;
  color: #08794f;
  font-weight: 900;
}

.athlete-championship-summary-card svg {
  width: 22px;
  height: 22px;
}

.athlete-championship-summary-card small,
.athlete-championship-card p,
.athlete-championship-card small,
.athlete-match-card p,
.athlete-championship-note {
  color: #64748b;
}

.athlete-championship-summary-card strong {
  display: block;
  margin: 2px 0;
  color: #0f172a;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
}

.athlete-championship-tabs {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}

.athlete-championship-tab,
.athlete-match-filter-bar button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #d7e3e3;
  border-radius: 999px;
  background: #ffffff;
  color: #0b3f36;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.athlete-championship-tab.active,
.athlete-match-filter-bar button.active {
  background: #0f5f48;
  border-color: #0f5f48;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(11, 63, 54, 0.14);
}

.athlete-championship-panel,
.athlete-championship-detail {
  padding: clamp(16px, 2vw, 24px);
}

.athlete-championship-card-grid,
.athlete-match-list {
  display: grid;
  gap: 16px;
}

.athlete-championship-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.athlete-championship-card-body,
.athlete-championship-card-heading {
  min-width: 0;
}

.athlete-championship-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.athlete-championship-sport,
.section-kicker {
  color: #08794f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.athlete-championship-card h3,
.athlete-match-card h3,
.athlete-championship-detail h3 {
  margin: 6px 0;
  color: #0f172a;
}

.athlete-championship-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.athlete-championship-status.is-approved,
.athlete-championship-status.is-open {
  background: #e6f5ef;
  color: #08794f;
}

.athlete-championship-status.is-pending {
  background: #fff2c7;
  color: #7a4b00;
}

.athlete-championship-status.is-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.athlete-championship-status.is-closed {
  background: #e2e8f0;
  color: #334155;
}

.athlete-championship-meta-grid,
.athlete-championship-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.athlete-championship-meta-grid span,
.athlete-championship-detail-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #f8fcfa;
  color: #64748b;
}

.athlete-championship-meta-grid strong,
.athlete-championship-detail-grid strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
}

.athlete-next-match-inline {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f4faf7;
  border-left: 4px solid #f7b733;
}

.athlete-next-match-inline span,
.athlete-next-match-inline small {
  display: block;
}

.athlete-next-match-inline.muted {
  border-left-color: #d7e3e3;
}

.athlete-championship-detail > header,
.athlete-championship-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.athlete-championship-detail-hero {
  margin-top: 18px;
  padding: clamp(18px, 2vw, 26px);
  border-radius: 18px;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
  color: #ffffff;
}

.athlete-championship-detail-hero h3,
.athlete-championship-detail-hero p,
.athlete-championship-detail-hero .section-kicker {
  color: #ffffff;
}

.athlete-next-match-card {
  min-width: min(320px, 100%);
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.athlete-next-match-card strong,
.athlete-next-match-card span {
  display: block;
  margin-top: 5px;
}

.athlete-championship-detail-grid {
  margin-block: 18px;
}

.athlete-championship-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel-like {
  min-width: 0;
  padding: 18px;
}

.panel-like h4,
.athlete-championship-detail-grid h4 {
  margin: 0 0 10px;
  color: #0f172a;
}

.athlete-standing-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.athlete-standing-table [role="row"] {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(6, minmax(44px, .3fr));
  gap: 6px;
  align-items: center;
}

.athlete-standing-table span {
  padding: 10px;
  border-radius: 10px;
  background: #f4faf7;
  font-weight: 800;
}

.athlete-standing-table .is-athlete-team span {
  background: #e6f5ef;
  color: #0b3f36;
}

.athlete-performance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.athlete-performance-grid span,
.athlete-roster-grid article,
.athlete-document-list article {
  padding: 12px;
  border-radius: 12px;
  background: #f8fcfa;
  border: 1px solid #d7e3e3;
}

.athlete-performance-grid strong,
.athlete-performance-grid small {
  display: block;
}

.athlete-performance-grid strong {
  color: #08794f;
  font-size: 24px;
}

.athlete-roster-grid,
.athlete-document-list {
  display: grid;
  gap: 10px;
}

.athlete-roster-grid article,
.athlete-document-list article {
  display: flex;
  align-items: center;
  gap: 10px;
}

.athlete-roster-grid article > span,
.athlete-document-list article > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #08794f;
  color: #ffffff;
  font-weight: 900;
}

.athlete-match-filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.athlete-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.athlete-match-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.athlete-match-card dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.athlete-match-card dd {
  margin: 2px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.athlete-championship-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed #b8d4ca;
  border-radius: 16px;
  background: #f8fcfa;
  text-align: center;
}

.athlete-championship-empty p {
  max-width: 520px;
  color: #64748b;
}

@media (min-width: 1200px) {
  #campeonatos .content-grid.athlete-championship-mode {
    max-width: min(1440px, calc(100vw - var(--sidebar-collapsed-width) - 64px)) !important;
  }
}

@media (max-width: 1199px) {
  .athlete-championship-summary,
  .athlete-championship-meta-grid,
  .athlete-championship-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-championship-card,
  .athlete-match-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .athlete-championship-card-actions,
  .athlete-match-card dl {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .athlete-championship-two-columns,
  .athlete-championship-detail-hero {
    grid-template-columns: 1fr;
  }

  .athlete-championship-detail-hero {
    display: grid;
  }

  .athlete-match-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .athlete-championship-module {
    gap: 16px;
    padding-bottom: 104px;
  }

  .athlete-championship-header,
  .athlete-championship-panel,
  .athlete-championship-detail {
    padding: 16px;
    border-radius: 16px;
  }

  .athlete-championship-header h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .athlete-championship-summary,
  .athlete-championship-meta-grid,
  .athlete-championship-detail-grid,
  .athlete-match-card dl,
  .athlete-performance-grid {
    grid-template-columns: 1fr;
  }

  .athlete-championship-card,
  .athlete-match-card {
    grid-template-columns: 1fr;
  }

  .athlete-championship-card-icon {
    width: 52px;
    height: 52px;
  }

  .athlete-championship-card-actions .primary-button,
  .athlete-championship-card-actions,
  .athlete-championship-detail .secondary-button,
  .athlete-next-match-card {
    width: 100%;
  }

  .athlete-championship-detail > header {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .athlete-schools-header,
  .athlete-school-panel,
  .athlete-school-detail-card {
    padding: 14px;
    border-radius: 14px;
  }

  .athlete-school-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep the complete visitor card visible on the institutional mobile home. */
@media (max-width: 560px) {
  body[data-role="guest"] .account-entry-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 10px !important;
  }

  body[data-role="guest"] .account-entry-card .status-pill {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 46px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  body[data-role="guest"] .account-entry-card .status-copy {
    display: grid !important;
    max-width: none !important;
  }

  body[data-role="guest"] .account-entry-card .status-pill strong,
  body[data-role="guest"] .account-entry-card .status-pill small {
    display: block !important;
  }

  body[data-role="guest"] .visitor-account-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
}

/* Institutional public home. */
#home.view.active {
  display: grid;
  gap: 28px;
  padding-bottom: 24px;
}

.account-entry-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visitor-account-actions {
  display: none;
  align-items: center;
  gap: 7px;
}

body[data-role="guest"] .account-entry-card {
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 63, 54, 0.08);
}

body[data-role="guest"] .account-entry-card .status-pill {
  min-height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-role="guest"] .account-entry-card .status-copy {
  max-width: 180px;
}

body[data-role="guest"] .visitor-account-actions {
  display: flex;
}

.visitor-login-button,
.visitor-register-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #08794f;
  border-radius: 7px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.visitor-login-button {
  color: #fff;
  background: #08794f;
}

.visitor-register-button {
  color: #0b3f36;
  background: #fff;
}

.visitor-login-button:hover,
.visitor-register-button:hover {
  box-shadow: 0 6px 14px rgba(11, 63, 54, 0.12);
}

.institutional-hero {
  position: relative;
  display: grid;
  min-height: 330px;
  align-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
  box-shadow: 0 18px 38px rgba(11, 63, 54, 0.18);
}

.institutional-hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 760px;
  gap: 13px;
  padding: clamp(32px, 4vw, 54px);
}

.institutional-hero-copy .eyebrow {
  color: #f7b733;
}

.institutional-hero-copy h2 {
  max-width: 19ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 1.02;
  text-wrap: balance;
}

.institutional-hero-copy > p:not(.eyebrow) {
  max-width: 670px;
  margin: 0;
  color: #e6f2ee;
  font-size: 1.03rem;
  line-height: 1.55;
}

.institutional-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.institutional-primary-action,
.institutional-secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 7px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.institutional-primary-action {
  border: 1px solid #f7b733;
  color: #143c33;
  background: #f7b733;
}

.institutional-secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.institutional-primary-action:hover,
.institutional-secondary-action:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.institutional-field-art {
  position: absolute;
  top: 34px;
  right: -36px;
  bottom: 34px;
  width: min(42%, 530px);
  opacity: 0.13;
  border: 3px solid #fff;
  border-radius: 10px;
}

.institutional-field-art::before,
.institutional-field-art::after {
  content: "";
  position: absolute;
}

.institutional-field-art::before {
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 3px solid #fff;
}

.institutional-field-art::after {
  inset: 18% 9%;
  border: 3px solid #fff;
  border-radius: 5px;
}

.institutional-field-circle {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 104px;
  height: 104px;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.institutional-field-goal {
  position: absolute;
  z-index: 1;
  right: 9%;
  bottom: 18%;
  width: 72px;
  height: 44px;
  border: 3px solid #fff;
  border-bottom: 0;
}

.institutional-field-ball {
  position: absolute;
  z-index: 1;
  right: 28%;
  bottom: 29%;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.institutional-areas,
.institutional-steps {
  display: grid;
  gap: 16px;
}

.institutional-section-heading {
  display: grid;
  gap: 4px;
}

.institutional-section-heading h2,
.institutional-section-heading p {
  margin: 0;
}

.institutional-section-heading h2 {
  color: #0f172a;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.institutional-section-heading > p:not(.eyebrow) {
  color: #64748b;
}

.institutional-section-heading.centered {
  justify-items: center;
  text-align: center;
}

.institutional-area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.institutional-area-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 13px;
  min-height: 172px;
  padding: 20px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  color: #0f172a;
  text-align: left;
  background: #fff;
  box-shadow: 0 7px 20px rgba(11, 63, 54, 0.06);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.institutional-area-card:hover {
  border-color: rgba(8, 121, 79, 0.4);
  box-shadow: 0 13px 28px rgba(11, 63, 54, 0.11);
  transform: translateY(-2px);
}

.institutional-area-icon,
.institutional-step-icon {
  display: grid;
  place-items: center;
  color: #08794f;
  background: #e6f5ef;
}

.institutional-area-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.institutional-area-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.institutional-area-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.institutional-area-copy strong {
  font-size: 1.02rem;
}

.institutional-area-copy small {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.institutional-area-arrow {
  color: #0b3f36;
  font-size: 1.1rem;
  transition: transform 160ms ease;
}

.institutional-area-card:hover .institutional-area-arrow {
  transform: translateX(3px);
}

.institutional-steps {
  padding: 28px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 63, 54, 0.07);
}

.institutional-step-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.institutional-step-grid::before {
  content: "";
  position: absolute;
  top: 53px;
  right: 9%;
  left: 9%;
  border-top: 2px dashed #c7ddd5;
}

.institutional-step-grid li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 8px;
  text-align: center;
}

.institutional-step-number {
  color: #08794f;
  font-size: 0.75rem;
  font-weight: 900;
}

.institutional-step-icon {
  width: 48px;
  height: 48px;
  border: 6px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cfe3dc;
  font-size: 1.2rem;
  font-weight: 900;
}

.institutional-step-grid strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.institutional-step-grid p {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .topbar {
    align-items: start;
  }

  body[data-role="guest"] .topbar {
    grid-template-columns: 1fr;
  }

  body[data-role="guest"] .account-entry-card {
    width: fit-content;
  }

  .institutional-area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .institutional-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 26px;
  }

  .institutional-step-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  #home.view.active {
    gap: 22px;
    padding-bottom: 92px;
  }

  body[data-role="guest"] .account-entry-card {
    width: 100%;
    align-items: stretch;
  }

  body[data-role="guest"] .account-entry-card .status-pill {
    max-width: none;
  }

  .institutional-hero {
    min-height: 0;
  }

  .institutional-field-art {
    right: -70px;
    width: 58%;
    opacity: 0.08;
  }

  .institutional-hero-copy {
    padding: 30px 24px;
  }

  .institutional-hero-copy h2 {
    max-width: 17ch;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .institutional-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 560px) {
  body[data-role="guest"] .account-entry-card {
    display: grid;
  }

  body[data-role="guest"] .visitor-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .visitor-login-button,
  .visitor-register-button {
    width: 100%;
    min-height: 44px;
  }

  .institutional-hero-actions,
  .institutional-area-grid,
  .institutional-step-grid {
    grid-template-columns: 1fr;
  }

  .institutional-hero-actions {
    display: grid;
  }

  .institutional-primary-action,
  .institutional-secondary-action {
    width: 100%;
  }

  .institutional-field-art {
    display: none;
  }

  .institutional-area-card {
    min-height: 148px;
  }

  .institutional-steps {
    padding: 22px 18px;
  }

  .institutional-step-grid li {
    grid-template-columns: 28px 48px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .institutional-step-number {
    grid-row: 1 / span 2;
  }

  .institutional-step-icon {
    grid-row: 1 / span 2;
  }

  .institutional-step-grid strong,
  .institutional-step-grid p {
    grid-column: 3;
  }

}

/* PGE shell overrides - keep this block at the end of the stylesheet. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-expanded,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0,1fr) !important;
  }

  .app-shell .sidebar,
  .app-shell.sidebar-expanded .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1000 !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: none !important;
    height: 100vh !important;
    overflow: hidden !important;
    transition: width 180ms ease, box-shadow 180ms ease !important;
  }

  .app-shell .sidebar.is-open,
  .app-shell.sidebar-expanded .sidebar.is-open {
    width: 220px !important;
    box-shadow: 18px 0 38px rgba(15,23,42,.2) !important;
  }

  .app-shell .main-content,
  .app-shell.sidebar-expanded .main-content,
  .app-shell.sidebar-collapsed .main-content {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  .app-shell .sidebar :is(.brand-text,.nav-label,.action-label,.sidebar-meta small) {
    display: block !important;
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }

  .app-shell .sidebar.is-open :is(.brand-text,.nav-label,.action-label,.sidebar-meta small) {
    width: auto !important;
    opacity: 1 !important;
  }

  .app-shell .sidebar .brand,
  .app-shell .sidebar .brand-logo-button,
  .app-shell .sidebar .nav-tabs,
  .app-shell .sidebar .sidebar-actions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .app-shell .sidebar .brand-logo-button {
    position: relative !important;
    z-index: 1002 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .app-shell .sidebar .nav-tab,
  .app-shell .sidebar .ghost-button {
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    margin-inline: 8px !important;
    grid-template-columns: 40px minmax(0,1fr) !important;
    justify-content: start !important;
    transform: none !important;
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999 !important;
    border: 0 !important;
    background: rgba(15,23,42,.22) !important;
  }

  .sidebar-overlay[hidden] { display: none !important; }
}

.main-content {
  background-color: #f4faf7 !important;
  background-image:
    linear-gradient(rgba(11,63,54,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,63,54,.075) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: 0 0 !important;
}

.home-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }

#escolinhas .school-summary-card > header,
#campeonatos .championship-summary-card > header {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
}

#escolinhas button.school-summary-link,
#campeonatos button.championship-summary-link {
  position: static !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 0 0 auto !important;
  padding: 2px 0 !important;
  justify-self: end !important;
  white-space: nowrap !important;
  color: #08794f !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#championshipTeamSummary .front-metric-card,
#championshipTeamSummary .front-metric-card :is(span,strong,small) {
  color: #0f172a !important;
}

#championshipTeamSummary .front-metric-card { background: #fff !important; }
#locais .location-add-button,
#locais .location-add-button * { color: #fff !important; }

#sidebarActions .ghost-button {
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
}

#perfil .profile-layout.account-profile {
  width: min(100%,760px) !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0,1fr) !important;
}

#perfil .profile-card-panel {
  padding: 28px !important;
  border: 1px solid #d7e3e3 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(11,63,54,.1) !important;
}

#perfil .account-photo-preview {
  width: 100% !important;
  min-height: 150px !important;
  margin: 18px 0 24px !important;
  border: 1px dashed rgba(8,121,79,.35) !important;
  border-radius: 14px !important;
  background: #f4faf7 !important;
}

@media (max-width: 768px) {
  .sidebar,
  .sidebar-overlay { display: none !important; }
  .home-metric-grid { grid-template-columns: minmax(0,1fr) !important; }
  #perfil .profile-card-panel { padding: 20px !important; }
}

/* Final shell interaction and visual corrections */
body,
.app-shell,
.main-content {
  background-color: #f4faf7;
}

.main-content {
  background-image:
    linear-gradient(rgba(11,63,54,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,63,54,.075) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: 0 0 !important;
}

@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-expanded {
    grid-template-columns: 72px minmax(0,1fr) !important;
  }

  .sidebar,
  .app-shell .sidebar,
  .app-shell.sidebar-expanded .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: 72px !important;
    height: 100vh;
    overflow: hidden;
    transition: width 180ms ease, box-shadow 180ms ease !important;
  }

  .sidebar.is-open,
  .app-shell.sidebar-expanded .sidebar.is-open {
    width: 220px !important;
    box-shadow: 18px 0 38px rgba(15,23,42,.2);
  }

  .app-shell .brand,
  .app-shell.sidebar-expanded .brand {
    width: 100% !important;
  }

  .app-shell .brand-logo-button,
  .app-shell.sidebar-expanded .brand-logo-button {
    width: 100% !important;
    min-width: 0 !important;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1002;
  }

  .app-shell .brand-text,
  .app-shell .nav-label,
  .app-shell .action-label,
  .app-shell .sidebar-meta small {
    display: block !important;
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none;
    transition: opacity 160ms ease !important;
  }

  .app-shell .sidebar.is-open :is(.brand-text,.nav-label,.action-label,.sidebar-meta small) {
    width: auto !important;
    opacity: 1 !important;
  }

  .app-shell .nav-tabs,
  .app-shell.sidebar-expanded .nav-tabs,
  .app-shell .sidebar-actions {
    width: 100% !important;
    min-width: 0 !important;
  }

  .app-shell .nav-tab,
  .app-shell .ghost-button,
  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    margin-inline: 8px !important;
    grid-template-columns: 40px minmax(0,1fr) !important;
    justify-content: start !important;
  }

  .app-shell:not(.sidebar-expanded) .nav-tab:hover,
  .app-shell:not(.sidebar-expanded) .ghost-button:hover {
    transform: none !important;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    border: 0;
    background: rgba(15,23,42,.22);
    cursor: default;
  }

  .sidebar-overlay[hidden] { display: none !important; }
}

.home-metric-grid {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
}

#escolinhas .school-summary-card > header,
#campeonatos .championship-summary-card > header {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
}

#escolinhas button.school-summary-link,
#campeonatos button.championship-summary-link {
  position: static !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 0 0 auto !important;
  padding: 2px 0 !important;
  display: inline-flex !important;
  justify-self: end !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  color: #08794f !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#championshipTeamSummary .front-metric-card {
  background: #fff !important;
  color: #0f172a !important;
}

#championshipTeamSummary .front-metric-card :is(span,strong,small) {
  color: #0f172a !important;
}

#locais .location-add-button,
#locais .location-add-button * {
  color: #fff !important;
}

#sidebarActions .ghost-button {
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
  box-shadow: none !important;
}

#sidebarActions .ghost-button:hover {
  border-color: rgba(247,183,51,.55) !important;
  background: rgba(255,255,255,.15) !important;
}

#perfil .profile-layout.account-profile {
  width: min(100%, 760px) !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0,1fr) !important;
}

#perfil .profile-card-panel {
  padding: 28px !important;
  border: 1px solid #d7e3e3 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(11,63,54,.1) !important;
}

#perfil .account-photo-preview {
  width: 100% !important;
  min-height: 150px;
  margin: 18px 0 24px !important;
  border: 1px dashed rgba(8,121,79,.35) !important;
  border-radius: 14px !important;
  background: #f4faf7 !important;
}

@media (max-width: 768px) {
  .sidebar,
  .sidebar-overlay {
    display: none !important;
  }

  .home-metric-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }

  #perfil .profile-card-panel { padding: 20px !important; }
}

/* Compact institutional user card: layer-two */
.topbar .status-pill {
  width: auto;
  min-width: 0;
  max-width: 240px;
  min-height: 58px;
  height: auto;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 11px;
  box-sizing: border-box;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11,63,54,.08);
  color: #0f172a;
  text-align: left;
  transform: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.topbar .status-pill:hover {
  border-color: rgba(8,121,79,.28);
  box-shadow: 0 7px 18px rgba(11,63,54,.12);
  transform: none;
}

.topbar .status-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #08794f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.topbar .status-copy {
  min-width: 0;
  max-width: 164px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.topbar .status-pill strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #08794f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill .sync-now-button {
  display: none !important;
}

.topbar .status-action-label {
  grid-column: 2;
  width: fit-content;
  margin-top: 1px;
  padding: 2px 6px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .topbar .status-pill {
    max-width: 205px;
    min-height: 54px;
    padding: 8px 11px;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 9px;
  }

  .topbar .status-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .topbar .status-copy {
    max-width: 138px;
  }

  .topbar .status-pill strong { font-size: 14px; }
  .topbar .status-pill small { font-size: 11px; }
}

@media (max-width: 560px) {
  body:not([data-role="guest"]) .topbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  body:not([data-role="guest"]) .topbar .status-pill {
    display: grid !important;
    width: auto !important;
    max-width: 132px !important;
    min-height: 46px;
    padding: 6px 8px !important;
    grid-template-areas: none !important;
    grid-template-columns: 32px minmax(0,1fr) !important;
    gap: 7px !important;
  }

  body:not([data-role="guest"]) .topbar .status-avatar {
    grid-area: auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-copy {
    display: grid;
    max-width: 78px;
  }

  body:not([data-role="guest"]) .topbar .status-pill strong {
    grid-area: auto;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-pill small {
    display: none;
  }
}

/* Relatórios: simplified municipal BI dashboard */
#relatorios > .content-grid {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

#relatorios .reports-dashboard-panel {
  width: 100%;
  min-width: 0;
  padding: 24px;
  border-radius: 16px;
}

#relatorios .report-filter-bar {
  grid-template-columns: repeat(3,minmax(170px,1fr)) minmax(220px,auto);
  gap: 12px;
  padding: 16px;
}

#relatorios .report-filter-bar button:disabled,
#relatorios .report-action-bar button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

#relatorios #reportsFrontMetrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
  margin-top: 18px;
}

#relatorios .report-metric-card {
  min-width: 0;
  min-height: 116px;
  padding: 18px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(11,63,54,.07);
}

#relatorios .report-metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#relatorios .report-metric-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#relatorios .report-metric-card div { min-width: 0; display: grid; gap: 2px; }
#relatorios .report-metric-card small { color: #475569; font-size: .74rem; font-weight: 750; line-height: 1.25; }
#relatorios .report-metric-card strong { color: #0f172a; font-size: 1.75rem; line-height: 1.05; }
#relatorios .report-metric-card div span { color: #64748b; font-size: .7rem; }

#relatorios .report-visual-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin-top: 20px;
}

#relatorios .report-visual-card {
  min-width: 0;
  min-height: 240px;
  padding: 20px 22px;
  border-radius: 14px;
}

#relatorios .report-visual-card header {
  padding-bottom: 13px;
  border-bottom: 1px solid #e8efed;
}

#relatorios .report-chart-empty {
  min-height: 160px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}

#relatorios .report-chart-empty > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#relatorios .report-chart-empty svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#relatorios .report-chart-empty strong { color: #0f172a; font-size: .88rem; }
#relatorios .report-chart-empty p { max-width: 390px; margin: 0; color: #64748b; font-size: .76rem; line-height: 1.45; }

#relatorios .report-action-bar {
  margin-top: 20px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #e8efed;
}

#relatorios .report-action-bar button { min-height: 40px; }

@media (max-width: 1050px) {
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  #relatorios .reports-dashboard-panel { padding: 18px; }
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics,
  #relatorios .report-visual-grid { grid-template-columns: minmax(0,1fr); }
  #relatorios .report-action-bar { align-items: stretch; flex-direction: column; }
  #relatorios .report-action-bar button { width: 100%; }
}

@media (max-width: 520px) {
  #times .panel-header .filter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    min-height: 72px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background:
      linear-gradient(150deg, rgba(47, 157, 145, 0.16), transparent 48%),
      var(--nav);
    box-shadow: 0 -12px 28px rgba(8, 24, 30, 0.22);
  }

  .mobile-bottom-nav-item {
    color: #d7e3e5;
    border-radius: 8px;
  }

  .mobile-bottom-nav-item.active {
    color: var(--nav);
    background: var(--yellow);
  }

  .mobile-bottom-nav-icon {
    font-size: 1.05rem;
  }

  .mobile-bottom-nav-label {
    color: inherit;
    font-size: 0.66rem;
  }
}

/* Hard lock: the desktop sidebar must not expand on hover, focus or logo click. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .app-shell:hover,
  .app-shell:focus-within {
    grid-template-columns: 84px minmax(0, 1fr) !important;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .app-shell.sidebar-collapsed .sidebar {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    flex-basis: 84px !important;
    overflow: hidden;
  }

  .brand {
    pointer-events: none;
  }

  .brand-text,
  .nav-label,
  .action-label {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* Mobile comfort pass: simpler first screen and app-like navigation. */
@media (max-width: 768px) {
  body {
    background-size: 34px 34px;
  }

  .main-content {
    padding: 14px 10px calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .topbar {
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar .eyebrow {
    margin-bottom: 2px;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  .topbar h1 {
    max-width: none;
    font-size: clamp(1.65rem, 7.2vw, 2.1rem);
    line-height: 1.03;
  }

  .topbar .status-pill {
    grid-template-columns: 30px minmax(0, 1fr);
    width: auto;
    max-width: 138px;
    gap: 6px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
  }

  .topbar .status-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .topbar .status-pill strong,
  .topbar .status-pill small {
    font-size: 0.66rem;
    line-height: 1.05;
  }

  .home-hero {
    gap: 10px;
    min-height: 0;
    margin-bottom: 10px;
  }

  .hero-copy {
    gap: 12px;
    min-height: 0;
    padding: 18px;
    border-radius: 12px;
  }

  .hero-copy h2 {
    font-size: clamp(1.9rem, 9.2vw, 2.35rem);
    line-height: 1.02;
  }

  .hero-copy p {
    max-width: 32rem;
    font-size: 0.95rem;
    line-height: 1.34;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 2px;
  }

  .hero-actions button,
  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
    min-height: 46px;
    border-radius: 9px;
    font-size: 0.96rem;
  }

  .hero-board {
    height: clamp(145px, 38vw, 170px);
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 12px;
  }

  .role-grid {
    gap: 10px;
  }

  .role-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    padding: 12px;
    border-radius: 10px;
  }

  .role-card .role-icon {
    grid-row: span 2;
  }

  .role-card h3 {
    margin-bottom: 0;
    line-height: 1.1;
  }

  .role-card p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.28;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
  }

  .panel-header {
    gap: 12px;
  }

  .metric-card,
  .team-card,
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-card,
  .match-card {
    border-radius: 11px;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    min-height: 70px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.15), transparent 54%),
      linear-gradient(180deg, var(--green), var(--green-dark));
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 -14px 30px rgba(14, 81, 63, 0.28);
  }

  .mobile-bottom-nav-item {
    min-width: 0;
    min-height: 56px;
    gap: 4px;
    padding: 7px 4px;
    border-radius: 10px;
    color: rgba(246, 252, 250, 0.86);
  }

  .mobile-bottom-nav:has(.mobile-bottom-nav-item:first-child:nth-last-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-bottom-nav-item.active {
    color: var(--green-dark);
    background: var(--yellow);
    box-shadow: 0 8px 18px rgba(245, 190, 75, 0.18);
  }

  .mobile-bottom-nav-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    font-size: 0;
  }

  .mobile-bottom-nav-icon svg,
  .mobile-more-option svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 0.64rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-drawer {
    gap: 12px;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .mobile-more-option {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 4px 10px;
    min-height: 56px;
    padding: 10px;
    border-radius: 10px;
  }

  .mobile-more-option > span {
    display: grid;
    grid-row: span 2;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 9px;
    color: var(--green-dark);
    background: var(--yellow);
  }

  .team-tag-row {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 6px;
  }

  .team-championship-pill {
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 28px;
    padding-right: 8px;
  }

  .team-championship-pill span {
    font-size: 0.72rem;
  }

  .team-status-icon {
    width: 28px;
    height: 28px;
  }

  .team-status-icon svg {
    width: 16px;
    height: 16px;
  }

  .team-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .team-stats .team-coach-stat {
    grid-column: 1 / -1;
  }

  .team-stats span {
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .team-stats strong {
    font-size: 0.88rem;
  }
}

@media (max-width: 430px) {
  .main-content {
    padding-inline: 9px !important;
  }

  .topbar .eyebrow,
  .topbar h1 {
    max-width: calc(100vw - 150px);
  }

  .hero-copy {
    padding: 18px;
  }

  .hero-copy h2 {
    font-size: clamp(1.85rem, 9vw, 2.3rem);
  }

  .hero-board {
    height: 150px;
  }

  .mobile-bottom-nav {
    gap: 5px;
    padding-inline: 8px;
  }
}

/* Desktop logo toggle: compact by default, expanded only after clicking the logo. */
.brand-logo-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .app-shell:hover,
  .app-shell:focus-within {
    grid-template-columns: 84px minmax(0, 1fr) !important;
  }

  .app-shell.sidebar-expanded,
  .app-shell.sidebar-expanded:hover,
  .app-shell.sidebar-expanded:focus-within {
    grid-template-columns: 280px minmax(0, 1fr) !important;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .app-shell.sidebar-collapsed .sidebar {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    padding: 18px 10px !important;
    overflow: hidden;
  }

  .app-shell.sidebar-expanded .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    padding: 18px !important;
  }

  .brand,
  .app-shell.sidebar-collapsed .brand {
    display: block !important;
    padding: 0 0 18px !important;
    pointer-events: auto !important;
  }

  .brand-logo-button {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    justify-content: start;
    cursor: pointer;
  }

  .app-shell:not(.sidebar-expanded) .brand-logo-button {
    width: 44px;
    margin-inline: auto;
  }

  .brand-logo-button:focus-visible {
    outline: 3px solid rgba(242, 184, 75, 0.86);
    outline-offset: 4px;
  }

  .app-shell.sidebar-expanded .brand-text,
  .app-shell.sidebar-expanded .nav-label,
  .app-shell.sidebar-expanded .action-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .app-shell.sidebar-expanded .nav-tabs {
    grid-template-columns: 1fr !important;
  }

  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    justify-content: flex-start !important;
    padding-inline: 12px !important;
  }

.app-shell.sidebar-expanded .sidebar-actions {
    padding: 10px !important;
  }
}

/* Restore the light municipal grid background across the app shell. */
body {
  background:
    linear-gradient(90deg, rgba(23, 116, 90, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(23, 116, 90, 0.055) 1px, transparent 1px),
    #f5f8f3;
  background-size: 44px 44px;
}

/* Role visibility hard-stop: guest sees only Home and Portal; authenticated users do not see Home. */
body:not([data-role]) .nav-tab:not([data-view="home"]):not([data-view="portal"]),
body[data-role="guest"] .nav-tab:not([data-view="home"]):not([data-view="portal"]) {
  display: none !important;
}

body[data-role]:not([data-role="guest"]) .nav-tab[data-view="home"] {
  display: none !important;
}

/* Team directory card polish: cleaner hierarchy, compact metrics and calmer actions. */
.team-card {
  position: relative;
  gap: 12px !important;
  padding: 16px !important;
  overflow: hidden;
  border-color: rgba(24, 116, 90, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(24, 116, 90, 0.08), rgba(255, 255, 255, 0) 42%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(15, 51, 45, 0.055);
}

.team-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, var(--green), rgba(242, 184, 75, 0.88));
}

.team-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 51, 45, 0.11);
}

.team-card-header {
  align-items: center !important;
}

.team-title {
  gap: 3px;
}

.team-title strong {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.team-title div {
  font-size: 0.92rem;
  font-weight: 650;
}

.team-sport-badge {
  border-radius: 999px;
  color: #0c5140;
  background: #dcefe9;
}

.team-tag-row {
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
}

.team-championship-pill {
  min-height: 34px;
  padding: 6px 12px 6px 8px;
  border-color: rgba(24, 116, 90, 0.2);
  color: #0c5140;
  background: rgba(232, 246, 240, 0.9);
}

.team-championship-pill span {
  font-size: 0.78rem;
}

.team-status-icon {
  width: 34px;
  height: 34px;
}

.team-stats {
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(56px, 0.52fr));
  gap: 7px;
}

.team-stats span {
  min-height: 44px;
  padding: 8px 10px;
  border-color: rgba(24, 116, 90, 0.14);
  border-radius: 10px;
  background: rgba(248, 252, 250, 0.92);
}

.team-stats .team-count-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.team-stats .team-stat-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
}

.team-stats .team-stat-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.team-stats .team-stat-icon.accepted {
  color: #fff;
  background: var(--green);
}

.team-stats .team-stat-icon.pending {
  color: #6b4b00;
  background: #f6df98;
}

.team-stats .team-stat-icon.rejected {
  color: #fff;
  background: var(--red);
}

.team-stats strong {
  font-size: 0.95rem;
}

.team-card-actions {
  grid-template-columns: minmax(130px, 1fr) 42px 42px;
  gap: 8px;
  padding-top: 12px;
}

.team-card-actions .secondary-button {
  min-height: 38px;
  border-color: rgba(24, 116, 90, 0.18);
  color: #0c5140;
  background: rgba(255, 255, 255, 0.9);
}

.team-card-actions .secondary-button:hover {
  border-color: rgba(24, 116, 90, 0.34);
  background: #f6fbf8;
}

.team-card-actions .icon-button {
  min-height: 38px;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .team-card {
    padding: 14px !important;
  }

  .team-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-stats .team-coach-stat {
    grid-column: 1 / -1;
  }
}

/* Visual polish pass: calmer surfaces, clearer hierarchy and smoother controls. */
:root {
  --line: #d8e4e2;
  --paper: #f4f7f2;
  --field: #fbfdfc;
  --surface-soft: #f8fbfa;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 16px 38px rgba(15, 51, 45, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 51, 45, 0.06);
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(47, 157, 145, 0.12), transparent 26rem),
    linear-gradient(90deg, rgba(23, 116, 90, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(23, 116, 90, 0.045) 1px, transparent 1px),
    var(--paper);
}

.main-content {
  max-width: 1440px;
}

.topbar {
  align-items: center;
}

.topbar h1 {
  color: #121b20;
  line-height: 1.02;
}

.status-pill {
  border-color: rgba(24, 116, 90, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.panel,
.metric-card,
.team-card,
.athlete-card,
.technician-card,
.championship-card,
.group-card,
.bracket-card,
.public-championship-card,
.public-match-card,
.public-standing-card,
.role-card {
  border-color: rgba(24, 116, 90, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 20px;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-header h2,
.panel-header h3 {
  margin-bottom: 2px;
}

.panel-header p {
  color: #687780;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--teal));
}

.metric-card strong {
  color: #122126;
  line-height: 1;
}

.tag {
  min-height: 26px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0;
}

input,
select,
textarea {
  min-height: 44px;
  border-color: #d4e0e2;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b9cdcf;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 116, 90, 0.1);
  outline: 0;
}

.primary-button,
.secondary-button,
.icon-button,
.ghost-button,
.mobile-bottom-nav-item {
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.primary-button {
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #1b8869, var(--green));
  box-shadow: 0 10px 20px rgba(24, 116, 90, 0.16);
}

.primary-button:hover {
  background: linear-gradient(180deg, #1b7f63, var(--green-dark));
  box-shadow: 0 12px 24px rgba(14, 81, 63, 0.2);
}

.secondary-button {
  border-color: #d6e3e2;
  border-radius: var(--radius-md);
  background: #fff;
}

.secondary-button:hover {
  border-color: rgba(24, 116, 90, 0.34);
  background: #f5fbf8;
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.ghost-button:active,
.mobile-bottom-nav-item:active {
  transform: translateY(1px);
}

.icon-button {
  border-radius: var(--radius-md);
  box-shadow: 0 6px 14px rgba(15, 51, 45, 0.05);
}

.table-wrap {
  border: 1px solid rgba(24, 116, 90, 0.12);
  border-radius: var(--radius-lg);
  background: #fff;
}

table {
  min-width: 620px;
}

th {
  color: #4f6168;
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #f4faf8;
}

td {
  color: #213037;
}

tbody tr:hover {
  background: #f8fcfa;
}

.team-card,
.athlete-card,
.technician-card,
.championship-card,
.public-match-card,
.public-championship-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.team-card:hover,
.athlete-card:hover,
.technician-card:hover,
.championship-card:hover,
.public-match-card:hover,
.public-championship-card:hover {
  border-color: rgba(24, 116, 90, 0.28);
  box-shadow: var(--shadow);
}

.team-sport-badge {
  color: #0f5746;
  background: #dff1ec;
}

.team-stats span,
.championship-info-grid span,
.detail-grid span,
.public-info-grid span,
.admin-athlete-summary span {
  border-color: #dce9e8;
  background: linear-gradient(180deg, #f9fcfb, #f1f7f6);
}

.team-card-actions,
.athlete-card-actions,
.technician-card-actions {
  border-top-color: rgba(24, 116, 90, 0.12);
}

.hero-copy {
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 48px rgba(18, 33, 38, 0.16);
}

.hero-board {
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 42px rgba(24, 116, 90, 0.14);
}

.public-hero-panel {
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 61, 55, 0.96), rgba(31, 128, 96, 0.9)),
    var(--green);
  box-shadow: 0 22px 48px rgba(18, 61, 55, 0.16);
}

.public-hero-panel .eyebrow,
.public-hero-panel p {
  color: rgba(255, 255, 255, 0.8);
}

.public-hero-panel h2,
.public-hero-panel strong {
  color: #fff;
}

.public-hero-panel .public-summary-grid article {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.pge-confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  animation: pgeModalFade 180ms ease-out;
}

.pge-confirmation-modal {
  position: relative;
  width: min(500px, calc(100vw - 32px));
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(15, 51, 45, 0.09);
  border-radius: 24px;
  color: var(--ink);
  text-align: center;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
  animation: pgeModalIn 210ms ease-out;
}

.pge-confirmation-burst {
  position: absolute;
  inset: 36px 0 auto;
  pointer-events: none;
}

.pge-confirmation-burst span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(242, 184, 75, 0.75);
}

.pge-confirmation-burst span:nth-child(1) {
  left: calc(50% - 82px);
  top: 30px;
  background: rgba(24, 116, 90, 0.36);
}

.pge-confirmation-burst span:nth-child(2) {
  right: calc(50% - 88px);
  top: 18px;
}

.pge-confirmation-burst span:nth-child(3) {
  left: calc(50% - 58px);
  top: 78px;
  width: 6px;
  height: 6px;
}

.pge-confirmation-burst span:nth-child(4) {
  right: calc(50% - 56px);
  top: 86px;
  width: 7px;
  height: 7px;
  background: rgba(24, 116, 90, 0.26);
}

.pge-confirmation-icon {
  position: relative;
  display: inline-grid;
  width: 84px;
  height: 84px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(24, 116, 90, 0.14);
  border-radius: 999px;
  color: var(--green);
  background: #edf8f3;
  box-shadow: 0 16px 34px rgba(24, 116, 90, 0.14);
}

.pge-confirmation-icon svg,
.pge-confirmation-actions svg,
.pge-confirmation-info svg,
.pge-confirmation-note svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pge-confirmation-modal h2 {
  margin: 0;
  color: #101820;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
}

.pge-confirmation-modal > p {
  margin: 12px auto 0;
  max-width: 35rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.pge-confirmation-modal .pending-highlight {
  color: #8a6100;
  font-weight: 900;
}

.pge-confirmation-body {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.pge-confirmation-info,
.pge-confirmation-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-align: left;
}

.pge-confirmation-info {
  padding: 15px;
  border: 1px solid rgba(24, 116, 90, 0.16);
  border-radius: 16px;
  color: #113d35;
  background: #edf8f3;
}

.pge-confirmation-info span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: rgba(24, 116, 90, 0.08);
}

.pge-confirmation-info p,
.pge-confirmation-note p {
  margin: 0;
  line-height: 1.4;
}

.pge-confirmation-note {
  color: #667680;
  font-size: 0.86rem;
}

.pge-confirmation-note span {
  color: #7b8a92;
}

.pge-confirmation-prompt {
  display: grid;
  gap: 7px;
  text-align: left;
}

.pge-confirmation-prompt label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.pge-confirmation-prompt textarea {
  min-height: 98px;
  resize: vertical;
}

.pge-confirmation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.pge-confirmation-actions button {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 900;
}

.pge-confirmation-actions .secondary-button {
  background: #fff;
}

.pge-confirmation-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pge-confirmation-actions .primary-button.danger {
  border-color: #b42318;
  background: #b42318;
}

.pge-confirmation-actions .primary-button.danger:hover {
  background: #8f1d14;
}

.pge-confirmation-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 999px;
  animation: pgeSpin 760ms linear infinite;
}

.pge-toast-region {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2300;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.pge-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(24, 116, 90, 0.16);
  border-radius: 16px;
  color: #113d35;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.15);
  animation: pgeModalIn 180ms ease-out;
  pointer-events: auto;
}

.pge-toast.error {
  border-color: rgba(180, 35, 24, 0.2);
  color: #7a271a;
}

.pge-toast-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--green);
  background: #edf8f3;
}

.pge-toast.error .pge-toast-icon {
  color: #b42318;
  background: #fff1f0;
}

.pge-toast strong {
  display: block;
  margin-bottom: 2px;
}

.pge-toast p {
  margin: 0;
  color: #60717a;
  font-size: 0.9rem;
  line-height: 1.35;
}

@keyframes pgeModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pgeModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pgeSpin {
  to { transform: rotate(360deg); }
}

.role-icon {
  border-radius: var(--radius-md);
  box-shadow: 0 8px 16px rgba(242, 184, 75, 0.22);
}

.mobile-more-drawer {
  border-color: rgba(24, 116, 90, 0.14);
  box-shadow: 0 -22px 44px rgba(15, 51, 45, 0.18);
}

@media (min-width: 769px) {
  .app-shell.sidebar-expanded .nav-tab:hover,
  .app-shell.sidebar-expanded .ghost-button:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-tab.active,
  .app-shell.sidebar-expanded .nav-tab.active {
    box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.22);
  }
}

@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(47, 157, 145, 0.1), transparent 22rem),
      linear-gradient(90deg, rgba(23, 116, 90, 0.045) 1px, transparent 1px),
      linear-gradient(rgba(23, 116, 90, 0.035) 1px, transparent 1px),
      var(--paper);
  }

  .panel,
  .metric-card,
  .team-card,
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-match-card,
  .public-championship-card {
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(15, 51, 45, 0.055);
  }

  .panel {
    padding: 15px;
  }

  .topbar {
    margin-bottom: 16px;
  }

  .mobile-bottom-nav {
    backdrop-filter: blur(10px);
  }

  .public-championship-card header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .public-championship-card header > .tag {
    justify-self: start;
    order: -1;
  }

  .public-championship-card h3 {
    font-size: 1.2rem;
  }

  .public-championship-card p {
    max-width: 28rem;
    line-height: 1.28;
  }

  .pge-confirmation-backdrop {
    padding: 16px;
  }

  .pge-confirmation-modal {
    width: calc(100vw - 32px);
    padding: 28px 20px 22px;
  }

  .pge-confirmation-actions {
    grid-template-columns: 1fr;
  }

  .pge-toast-region {
    inset: auto 16px 92px 16px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pge-confirmation-backdrop,
  .pge-confirmation-modal,
  .pge-toast,
  .pge-confirmation-spinner {
    animation: none !important;
  }
}

/* Keep the Escolinhas hero from inheriting the later generic white panel skin. */
.panel.schools-hero-panel {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 61, 55, 0.98), rgba(21, 121, 88, 0.94)),
    #18745a;
  box-shadow: 0 20px 44px rgba(15, 51, 45, 0.18);
}

.panel.schools-hero-panel .eyebrow,
.panel.schools-hero-panel h2,
.panel.schools-hero-panel p,
.panel.schools-hero-panel .metric-card span,
.panel.schools-hero-panel .metric-card strong {
  color: #fff;
}

.panel.schools-hero-panel .metric-card {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.panel.schools-hero-panel .metric-card::before {
  background: var(--yellow);
}

/* Desktop sidebar refinement: thinner rest state, hover expansion and pinned open state. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .app-shell:has(.sidebar:hover),
  .app-shell:has(.sidebar:focus-within),
  .app-shell.sidebar-expanded,
  .app-shell.sidebar-expanded:hover,
  .app-shell.sidebar-expanded:focus-within {
    grid-template-columns: 228px minmax(0, 1fr) !important;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .app-shell.sidebar-collapsed .sidebar {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex-basis: 72px !important;
    gap: 22px;
    padding: 18px 8px !important;
    overflow: hidden;
    transition:
      width 180ms ease,
      min-width 180ms ease,
      max-width 180ms ease,
      padding 180ms ease;
  }

  .app-shell:has(.sidebar:hover) .sidebar,
  .app-shell:has(.sidebar:focus-within) .sidebar,
  .app-shell.sidebar-expanded .sidebar {
    width: 228px !important;
    min-width: 228px !important;
    max-width: 228px !important;
    flex-basis: 228px !important;
    padding: 16px 12px !important;
  }

  .brand,
  .app-shell.sidebar-collapsed .brand {
    display: grid !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 0 0 16px !important;
    pointer-events: auto !important;
  }

  .app-shell:has(.sidebar:hover) .brand,
  .app-shell:has(.sidebar:focus-within) .brand,
  .app-shell.sidebar-expanded .brand {
    justify-content: stretch !important;
    justify-items: stretch !important;
  }

  .brand-logo-button {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    width: 38px;
    padding: 0;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .app-shell:has(.sidebar:hover) .brand-logo-button,
  .app-shell:has(.sidebar:focus-within) .brand-logo-button,
  .app-shell.sidebar-expanded .brand-logo-button {
    width: 100%;
  }

  .brand-text,
  .nav-label,
  .action-label,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .action-label {
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    white-space: nowrap;
  }

  .app-shell:has(.sidebar:hover) .brand-text,
  .app-shell:has(.sidebar:hover) .nav-label,
  .app-shell:has(.sidebar:hover) .action-label,
  .app-shell:has(.sidebar:focus-within) .brand-text,
  .app-shell:has(.sidebar:focus-within) .nav-label,
  .app-shell:has(.sidebar:focus-within) .action-label,
  .app-shell.sidebar-expanded .brand-text,
  .app-shell.sidebar-expanded .nav-label,
  .app-shell.sidebar-expanded .action-label {
    visibility: visible !important;
    opacity: 1 !important;
  }

  .nav-tabs,
  .app-shell.sidebar-collapsed .nav-tabs {
    gap: 6px;
    grid-template-columns: 1fr !important;
    justify-items: center;
  }

  .nav-tab,
  .ghost-button,
  .app-shell.sidebar-collapsed .nav-tab,
  .app-shell.sidebar-collapsed .ghost-button {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 38px;
    width: 48px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
  }

  .app-shell:has(.sidebar:hover) .nav-tab,
  .app-shell:has(.sidebar:hover) .ghost-button,
  .app-shell:has(.sidebar:focus-within) .nav-tab,
  .app-shell:has(.sidebar:focus-within) .ghost-button,
  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    grid-template-columns: 24px minmax(0, 1fr);
    width: 100% !important;
    justify-content: flex-start !important;
    justify-items: start !important;
    padding-inline: 10px !important;
  }

  .nav-icon,
  .action-icon {
    flex: 0 0 24px;
  }

  .nav-label,
  .action-label {
    font-size: 0.92rem;
  }

  .sidebar-actions,
  .app-shell.sidebar-collapsed .sidebar-actions {
    justify-items: center;
    padding: 6px !important;
  }

  .app-shell:has(.sidebar:hover) .sidebar-actions,
  .app-shell:has(.sidebar:focus-within) .sidebar-actions,
  .app-shell.sidebar-expanded .sidebar-actions {
    padding: 10px !important;
  }
}

/* Final background lock: keep the white municipal grid visible behind content. */
body {
  background-color: #f5f8f3 !important;
  background-image:
    linear-gradient(90deg, rgba(23, 116, 90, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(23, 116, 90, 0.055) 1px, transparent 1px) !important;
  background-size: 44px 44px !important;
}

.main-content {
  background: transparent !important;
}

@media (max-width: 560px) {
  .topbar .status-pill {
    display: grid;
    grid-template-areas:
      "avatar name"
      "avatar role";
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 2px 8px;
    width: min(142px, 42vw);
    max-width: none;
    padding: 6px;
  }

  .topbar .status-avatar {
    grid-area: avatar;
  }

  .topbar .status-copy {
    display: contents;
  }

  .topbar .status-pill strong {
    grid-area: name;
    align-self: end;
  }

  .topbar .status-pill small {
    grid-area: role;
    align-self: start;
  }

  .topbar .sync-now-button {
    display: none;
  }

  .mobile-bottom-nav {
    right: 8px;
    bottom: 8px;
    left: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    min-height: 64px;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background:
      linear-gradient(160deg, rgba(255, 255, 255, 0.13), transparent 45%),
      linear-gradient(180deg, #1a8067, #075f4e);
    box-shadow:
      0 -8px 22px rgba(12, 56, 46, 0.22),
      0 10px 30px rgba(12, 56, 46, 0.18);
  }

  .mobile-bottom-nav-item {
    grid-template-rows: 23px auto;
    min-height: 52px;
    padding: 6px 3px;
    border-radius: 14px;
    color: rgba(243, 252, 248, 0.82);
  }

  .mobile-bottom-nav-item.active {
    color: #0d463c;
    background: linear-gradient(180deg, #f7c75a, #e5b449);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 16px rgba(6, 57, 47, 0.18);
  }

  .mobile-bottom-nav-icon {
    width: 23px;
    height: 23px;
  }

  .mobile-bottom-nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-bottom-nav-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0;
  }
}

/* Detail modal polish: cleaner team sheet, less tinted surfaces and stronger hierarchy. */
.detail-modal {
  width: min(720px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(24, 116, 90, 0.16);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(18, 33, 38, 0.26);
}

.detail-modal > header {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-color: rgba(24, 116, 90, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(24, 116, 90, 0.08), transparent 58%),
    #f8fcfa;
}

.detail-modal > header.title-only h2 {
  font-size: 1.22rem;
}

.detail-modal > header.title-only h2::before {
  height: 26px;
  background: linear-gradient(180deg, var(--green), rgba(242, 184, 75, 0.9));
}

.detail-modal-body {
  gap: 13px;
}

.detail-hero.team {
  padding: 13px 14px;
  border: 1px solid rgba(24, 116, 90, 0.12);
  border-radius: 12px;
  color: #12332f;
  background: #f6fbf8;
}

.detail-hero.team strong {
  font-size: 1rem;
}

.detail-hero.team span {
  font-size: 0.84rem;
}

.team-detail-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.team-detail-summary span {
  min-height: 58px;
  padding: 10px 11px;
  border-color: rgba(24, 116, 90, 0.13);
  border-radius: 10px;
  background: #fbfdfc;
}

.team-detail-summary span:nth-child(1),
.team-detail-summary span:nth-child(2) {
  grid-column: span 3;
}

.team-detail-summary strong {
  font-size: 0.92rem;
}

.roster-list {
  gap: 8px;
  max-height: min(340px, 42vh);
  overflow: auto;
  padding-right: 3px;
}

.roster-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border-color: rgba(24, 116, 90, 0.13);
  border-radius: 10px;
  background: #ffffff;
}

.roster-card strong {
  font-size: 0.92rem;
}

.roster-card span {
  font-size: 0.8rem;
}

.roster-card .tag {
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .detail-modal {
    width: min(100%, calc(100vw - 20px));
    padding: 14px;
  }

  .team-detail-summary {
    grid-template-columns: 1fr;
  }

  .team-detail-summary span:nth-child(1),
  .team-detail-summary span:nth-child(2) {
    grid-column: auto;
  }

  .roster-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

.roster-card .tag {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Shared card language: extend the Equipes visual style across MVP menus. */
.athlete-card,
.technician-card,
.championship-card,
.public-championship-card,
.public-match-card,
.school-card,
.school-enrollment-card,
.school-report-card,
.school-history-card {
  position: relative;
  gap: 12px !important;
  padding: 16px !important;
  overflow: hidden;
  border-color: rgba(24, 116, 90, 0.14) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(135deg, rgba(24, 116, 90, 0.07), rgba(255, 255, 255, 0) 42%),
    rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 12px 26px rgba(15, 51, 45, 0.055) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.athlete-card::before,
.technician-card::before,
.championship-card::before,
.public-championship-card::before,
.public-match-card::before,
.school-card::before,
.school-enrollment-card::before,
.school-report-card::before,
.school-history-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, var(--green), rgba(242, 184, 75, 0.88));
}

.athlete-card:hover,
.technician-card:hover,
.championship-card:hover,
.public-championship-card:hover,
.public-match-card:hover,
.school-card:hover,
.school-enrollment-card:hover,
.school-report-card:hover,
.school-history-card:hover {
  border-color: rgba(24, 116, 90, 0.28) !important;
  box-shadow: 0 18px 34px rgba(15, 51, 45, 0.11) !important;
  transform: translateY(-1px);
}

.athlete-card header,
.technician-card-header,
.championship-card header,
.public-championship-card header,
.school-card header {
  align-items: center;
}

.athlete-card strong,
.technician-card-identity strong,
.championship-card h3,
.public-championship-card h3,
.school-card h3,
.school-enrollment-card h3,
.school-history-card h3 {
  color: #122126;
  letter-spacing: 0;
}

.athlete-meta span,
.technician-info-grid span,
.championship-info-grid span,
.public-info-grid span,
.school-info-grid span,
.school-counter-list span,
.school-class-card {
  border-color: rgba(24, 116, 90, 0.13) !important;
  border-radius: 10px !important;
  background: rgba(248, 252, 250, 0.92) !important;
}

.athlete-card-actions,
.technician-card-actions,
.school-card-actions {
  border-top-color: rgba(24, 116, 90, 0.12) !important;
}

.athlete-card-actions .secondary-button,
.technician-card-actions .secondary-button,
.school-card-actions .secondary-button {
  min-height: 38px;
  border-color: rgba(24, 116, 90, 0.18);
  color: #0c5140;
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 720px) {
  .athlete-card,
  .technician-card,
  .championship-card,
  .public-championship-card,
  .public-match-card,
  .school-card,
  .school-enrollment-card,
  .school-report-card,
  .school-history-card {
    padding: 14px !important;
  }
}

/* Final mobile navigation pass: compact app bar and clean top status. */
@media (max-width: 560px) {
  .topbar .status-pill {
    display: grid !important;
    grid-template-areas:
      "avatar name"
      "avatar role" !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 2px 8px !important;
    width: min(142px, 42vw) !important;
    padding: 6px !important;
  }

  .topbar .sync-now-button {
    display: none !important;
  }

  .mobile-bottom-nav {
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
    width: auto !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
    min-height: 64px !important;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom)) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    background:
      linear-gradient(160deg, rgba(255, 255, 255, 0.13), transparent 45%),
      linear-gradient(180deg, #1a8067, #075f4e) !important;
    box-shadow:
      0 -8px 22px rgba(12, 56, 46, 0.22),
      0 10px 30px rgba(12, 56, 46, 0.18) !important;
  }

  .mobile-bottom-nav-item {
    grid-template-rows: 23px auto !important;
    min-height: 52px !important;
    padding: 6px 3px !important;
    border-radius: 14px !important;
    color: rgba(243, 252, 248, 0.82) !important;
    background: transparent !important;
  }

  .mobile-bottom-nav-item.active {
    color: #0d463c !important;
    background: linear-gradient(180deg, #f7c75a, #e5b449) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 16px rgba(6, 57, 47, 0.18) !important;
  }

  .mobile-bottom-nav-icon {
    width: 23px !important;
    height: 23px !important;
  }

  .mobile-bottom-nav-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .mobile-bottom-nav-label {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }
}

/* Two-front organization: Escolinhas and Campeonatos. */
.front-overview-panel {
  border-left: 4px solid var(--brand);
  overflow: hidden;
}

.front-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.front-metric-card {
  min-height: 72px;
  display: grid;
  align-content: space-between;
  padding: 11px 12px;
  border: 1px solid rgba(21, 127, 98, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 245, 0.92));
}

.front-metric-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.front-metric-card strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1;
}

.front-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.front-module-grid > .front-workbench {
  grid-column: 1 / -1;
}

.front-module-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(14, 47, 40, 0.05);
}

.front-module-card:hover,
.front-module-card:focus-visible {
  border-color: rgba(21, 127, 98, 0.45);
  outline: none;
  box-shadow: 0 12px 28px rgba(14, 47, 40, 0.1);
}

.front-module-card strong {
  font-size: 0.98rem;
}

.front-module-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.front-module-card small {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}

.front-workbench {
  display: grid;
  gap: 10px;
  padding: 0;
}

.front-workbench-top {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(420px, 1.45fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(21, 127, 98, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcfb, #eef7f4);
}

.front-workbench-top h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.front-workbench-top p {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.88rem;
}

.front-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.front-action-pill {
  min-height: 72px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(21, 127, 98, 0.22);
  border-radius: 8px;
  color: #0f3028;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(14, 47, 40, 0.05);
}

.front-action-pill:hover,
.front-action-pill:focus-visible {
  border-color: rgba(21, 127, 98, 0.52);
  outline: none;
  box-shadow: 0 10px 22px rgba(14, 47, 40, 0.1);
}

.front-action-pill strong {
  font-size: 1rem;
  line-height: 1.15;
}

.front-action-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.front-secondary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0 2px;
}

.front-secondary-nav > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.front-link-chip {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #d7e7e3;
  border-radius: 999px;
  color: #315056;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.front-link-chip:hover,
.front-link-chip:focus-visible {
  border-color: rgba(21, 127, 98, 0.5);
  color: #0f513f;
  outline: none;
}

.front-action-pill.active,
.front-link-chip.active {
  border-color: rgba(21, 127, 98, 0.65);
  color: #0f513f;
  background: rgba(21, 127, 98, 0.1);
}

.front-action-pill.active span {
  color: #0f513f;
}

.front-overview-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
}

.workspace-menu-panel {
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: linear-gradient(115deg, #0e4d42 0%, #126d55 52%, #17815f 100%);
  box-shadow: 0 16px 34px rgba(13, 66, 56, 0.14);
}

.workspace-menu-panel .front-workbench-top {
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 22px;
  align-items: center;
  padding: 20px;
  border: 0;
  background: transparent;
}

.front-workbench-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #fff;
}

.front-workbench-copy h3,
.front-workbench-copy p {
  margin: 0;
  color: inherit;
}

.front-workbench-copy h3 {
  font-size: 1.5rem;
  line-height: 1.1;
}

.front-workbench-copy p {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
}

.workspace-menu-kicker {
  color: #e4bb50;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-menu-panel .front-quick-actions,
.context-segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(4, 41, 35, 0.28);
}

.workspace-menu-panel .front-action-pill,
.context-option-button {
  min-height: 66px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.workspace-option-index {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
}

.workspace-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workspace-menu-panel .front-action-pill .workspace-option-copy,
.context-option-button .workspace-option-copy {
  color: inherit;
}

.workspace-menu-panel .front-action-pill .workspace-option-index,
.context-option-button .workspace-option-index {
  color: #fff;
}

.workspace-menu-panel .front-action-pill strong,
.context-option-button strong {
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.1;
}

.workspace-menu-panel .front-action-pill small,
.context-option-button small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.66rem;
  font-weight: 800;
}

.workspace-menu-panel .front-action-pill:hover,
.workspace-menu-panel .front-action-pill:focus-visible,
.context-option-button:hover,
.context-option-button:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  box-shadow: none;
}

.workspace-menu-panel .front-action-pill.active,
.workspace-menu-panel .front-action-pill[aria-pressed="true"],
.context-option-button.active,
.context-option-button[aria-pressed="true"] {
  color: #0f513f;
  border-color: #fff;
  background: #fff;
  box-shadow: 0 8px 18px rgba(4, 35, 30, 0.2);
}

.workspace-menu-panel .front-action-pill.active small,
.workspace-menu-panel .front-action-pill[aria-pressed="true"] small,
.context-option-button.active small,
.context-option-button[aria-pressed="true"] small {
  color: #507069;
}

.workspace-menu-panel .front-action-pill.active .workspace-option-index,
.workspace-menu-panel .front-action-pill[aria-pressed="true"] .workspace-option-index,
.context-option-button.active .workspace-option-index,
.context-option-button[aria-pressed="true"] .workspace-option-index {
  color: #0f513f;
  border-color: #cce2dc;
  background: #e7f3ef;
}

.document-section-menu {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: center;
  margin-block: 16px;
  padding: 18px;
}

.document-section-menu .context-segmented-control {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.approval-menu-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: linear-gradient(115deg, #0e4d42 0%, #126d55 52%, #17815f 100%);
  box-shadow: 0 12px 28px rgba(13, 66, 56, 0.12);
}

.approval-menu-stack > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.approval-menu-label {
  color: #f0cc73;
  font-size: 0.76rem;
  font-weight: 900;
}

.approval-menu-control {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 0;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(4, 41, 35, 0.28);
}

.approval-menu-control button {
  color: rgba(255, 255, 255, 0.84);
}

.approval-menu-control button:hover,
.approval-menu-control button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.approval-menu-control button.active {
  color: #0f513f;
  background: #fff;
}

@media (max-width: 1080px) {
  .workspace-menu-panel .front-workbench-top,
  .document-section-menu {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .document-section-menu .context-segmented-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace-menu-panel .front-workbench-top,
  .document-section-menu {
    padding: 15px;
  }

  .workspace-menu-panel .front-quick-actions,
  .context-segmented-control,
  .document-section-menu .context-segmented-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-menu-panel .front-action-pill,
  .context-option-button {
    min-height: 58px;
    justify-content: center;
    padding: 8px 5px;
    text-align: center;
  }

  .workspace-menu-panel .workspace-option-index,
  .context-option-button .workspace-option-index,
  .workspace-menu-panel .front-action-pill small,
  .context-option-button small {
    display: none;
  }

  .approval-menu-stack > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.users-management-layout {
  display: block;
  width: min(100%, 1280px);
  margin-inline: auto;
  align-items: start;
}

.users-switch-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(560px, 1.28fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: linear-gradient(115deg, #0e4d42 0%, #126d55 52%, #17815f 100%);
  box-shadow: 0 16px 34px rgba(13, 66, 56, 0.14);
}

.users-switch-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #fff;
}

.users-switch-copy h2,
.users-switch-copy p {
  margin: 0;
  color: inherit;
}

.users-switch-copy h2 {
  font-size: 1.65rem;
  line-height: 1.1;
}

.users-switch-copy p {
  max-width: 470px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.users-section-kicker,
.users-panel-step {
  color: #d7a82f;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.users-segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 41, 35, 0.28);
}

.users-segmented-control .users-option-button {
  min-height: 76px !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: rgba(255, 255, 255, 0.88) !important;
  background: transparent !important;
  text-align: left !important;
  font: inherit !important;
  cursor: pointer !important;
}

.users-option-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
}

.users-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.users-option-button strong {
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.1;
}

.users-option-button small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.7rem;
  font-weight: 800;
}

.users-segmented-control .users-option-button.active,
.users-segmented-control .users-option-button[aria-pressed="true"] {
  color: #0f513f !important;
  border-color: #fff !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(4, 35, 30, 0.2) !important;
}

.users-segmented-control .users-option-button.active small,
.users-segmented-control .users-option-button[aria-pressed="true"] small {
  color: #507069;
}

.users-segmented-control .users-option-button.active .users-option-icon,
.users-segmented-control .users-option-button[aria-pressed="true"] .users-option-icon {
  color: #0f513f;
  border-color: #cce2dc;
  background: #e7f3ef;
}

.users-segmented-control .users-option-button:focus-visible,
.users-segmented-control .users-option-button:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  outline: none !important;
}

.users-segmented-control .users-option-button.active:hover,
.users-segmented-control .users-option-button[aria-pressed="true"]:hover,
.users-segmented-control .users-option-button.active:focus-visible,
.users-segmented-control .users-option-button[aria-pressed="true"]:focus-visible {
  color: #0f513f !important;
  border-color: #fff !important;
  background: #fff !important;
}

.users-section {
  display: none;
  grid-template-columns: minmax(330px, 0.68fr) minmax(0, 1.32fr);
  gap: 18px;
  align-items: start;
}

.users-section.active {
  display: grid;
}

.users-section .wide {
  grid-column: auto;
}

.users-create-panel,
.users-directory-panel {
  border-color: #d5e4e0;
  box-shadow: 0 12px 28px rgba(21, 58, 50, 0.08);
}

.users-create-panel {
  position: sticky;
  top: 18px;
  padding: 20px;
  background: #fbfdfc;
}

.users-create-panel .panel-header,
.users-directory-panel .panel-header {
  margin-bottom: 18px;
}

.users-panel-step {
  display: block;
  margin-bottom: 4px;
  color: #98710e;
}

.users-create-panel .users-submit-button {
  min-height: 46px;
  margin-top: 2px;
}

.users-role-field {
  display: none !important;
}

.users-directory-panel {
  min-height: 420px;
  background: rgba(255, 255, 255, 0.96);
}

.users-directory-panel .panel-header {
  align-items: end;
}

.users-directory-panel .filter-row {
  display: block;
}

.users-directory-panel .search-input {
  width: min(100%, 260px);
}

.users-directory-panel .admin-athlete-summary {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
}

.users-directory-panel .admin-athlete-summary article {
  border-color: #dce9e6;
  background: #f3f8f7;
}

@media (max-width: 1080px) {
  .users-switch-panel {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .users-section {
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  }

  .users-directory-panel .admin-athlete-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  .users-switch-panel {
    margin-inline: 0;
    padding: 16px;
  }

  .users-segmented-control {
    gap: 4px;
  }

  .users-segmented-control .users-option-button {
    min-height: 62px !important;
    justify-content: center !important;
    padding: 8px 6px !important;
  }

  .users-option-icon,
  .users-option-button small {
    display: none;
  }

  .users-section {
    grid-template-columns: 1fr;
  }

  .users-create-panel {
    position: static;
  }

  .users-directory-panel .panel-header {
    align-items: stretch;
  }

  .users-directory-panel .search-input {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .front-metric-grid,
  .front-workbench-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .front-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile guest shell: keep the first screen clean and let bottom items fill the bar. */
@media (max-width: 560px) {
  .topbar .status-pill {
    display: none !important;
  }

  .topbar {
    display: block !important;
    margin-bottom: 10px !important;
  }

  .topbar > div:first-child {
    display: block !important;
    max-width: 100% !important;
  }

  .topbar .eyebrow {
    display: none !important;
  }

  .topbar h1 {
    max-width: min(100%, 360px) !important;
    margin: 0 !important;
    font-size: clamp(1.9rem, 9vw, 2.45rem) !important;
    line-height: 0.98 !important;
    letter-spacing: 0 !important;
  }

  body[data-role="guest"] .topbar .status-pill {
    display: none !important;
  }

  body[data-role="guest"] .topbar {
    grid-template-columns: 1fr !important;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)) !important;
  }

  .mobile-bottom-nav-item {
    width: 100% !important;
    min-width: 0 !important;
  }

  .front-metric-grid,
  .front-module-grid {
    grid-template-columns: 1fr !important;
  }

  .front-metric-card {
    min-height: 66px !important;
  }

  .front-workbench-top,
  .front-quick-actions {
    grid-template-columns: 1fr !important;
  }

  .front-workbench-top {
    padding: 12px !important;
  }
}

/* Validation reset/mobile portal polish: compact titles and graceful empty public data. */
@media (max-width: 560px) {
  .main-content {
    padding-top: 18px !important;
  }

  .topbar {
    display: block !important;
    margin-bottom: 14px !important;
  }

  .topbar > div:first-child {
    display: block !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .topbar .eyebrow {
    display: block !important;
    margin-bottom: 5px !important;
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.04em !important;
  }

  .topbar h1 {
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(1.72rem, 7.2vw, 2.12rem) !important;
    line-height: 1.04 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-wrap: balance !important;
  }

  .public-portal {
    gap: 12px !important;
  }

  .public-hero-panel {
    gap: 18px !important;
    padding: 22px !important;
    border-radius: 14px !important;
  }

  .public-hero-panel h2 {
    max-width: 12ch !important;
    margin-bottom: 12px !important;
    font-size: clamp(2rem, 11vw, 3rem) !important;
    line-height: 0.98 !important;
    text-wrap: balance !important;
  }

  .public-hero-panel p:not(.eyebrow) {
    font-size: 1rem !important;
    line-height: 1.22 !important;
  }

  .public-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .public-summary-grid article {
    min-height: 88px !important;
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .public-summary-grid span {
    font-size: 0.82rem !important;
  }

  .public-summary-grid strong {
    font-size: 2rem !important;
    line-height: 1 !important;
  }

  .public-card-list .empty-state,
  .public-match-list .empty-state,
  .public-standings-grid .empty-state {
    min-height: 104px !important;
    padding: 18px !important;
    border-color: rgba(24, 116, 90, 0.18) !important;
    border-style: solid !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 248, 0.94)) !important;
    box-shadow: 0 12px 24px rgba(15, 51, 45, 0.06) !important;
  }

  .public-card-list .empty-state strong,
  .public-match-list .empty-state strong,
  .public-standings-grid .empty-state strong {
    font-size: 1rem !important;
  }
}

/* Final operational layout lock. */
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.championship-section-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.championship-section-actions {
  display: grid;
  grid-template-columns: minmax(260px, 460px);
}

#escolinhas .schools-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#escolinhas .schools-admin-panel:not([hidden]) {
  grid-column: 1 / -1 !important;
}

@media (min-width: 769px) {
  .app-shell:not(.sidebar-expanded),
  .app-shell:not(.sidebar-expanded):hover,
  .app-shell:not(.sidebar-expanded):focus-within,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover),
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .app-shell:not(.sidebar-expanded) .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar:hover,
  .app-shell:not(.sidebar-expanded) .sidebar:focus-within {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex-basis: 72px !important;
    padding: 18px 8px !important;
  }

  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand {
    justify-content: center !important;
    justify-items: center !important;
  }

  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-logo-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-logo-button {
    width: 38px !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-text,
  .app-shell:not(.sidebar-expanded) .nav-label,
  .app-shell:not(.sidebar-expanded) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .action-label {
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .ghost-button {
    width: 48px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
  }
}

@media (max-width: 980px) {
  .dashboard-content-grid,
  .championship-section-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .dashboard-shortcuts,
  .dashboard-content-grid,
  .championship-section-cards,
  #escolinhas .schools-report-grid {
    grid-template-columns: 1fr !important;
  }

  .championship-section-actions {
    grid-template-columns: 1fr;
  }
}

/* Fluid desktop shell: use the complete workspace on wide monitors. */
@media (min-width: 981px) {
  .main-content {
    width: 100%;
    max-width: none;
    padding-inline: clamp(24px, 2vw, 44px);
  }

  .main-content > .view,
  .content-grid,
  #atleticas .content-grid,
  #campeonatos .content-grid,
  .schools-layout,
  .public-portal,
  .profile-layout,
  .draw-layout,
  .users-management-layout {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
}

/* Home dashboard: compact, operational and responsive. */
body {
  background:
    linear-gradient(90deg, rgba(23, 116, 90, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(23, 116, 90, 0.022) 1px, transparent 1px),
    var(--paper) !important;
  background-size: 44px 44px !important;
}

.topbar {
  align-items: center;
  margin-bottom: 18px;
}

.status-pill {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 8px 10px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.status-pill:hover {
  border-color: rgba(24, 116, 90, 0.34);
  box-shadow: 0 10px 24px rgba(15, 51, 45, 0.09);
  transform: translateY(-1px);
}

.status-avatar {
  width: 34px;
  height: 34px;
}

.status-action-label {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--green) !important;
  font-size: 0.74rem;
  font-weight: 900;
  background: rgba(24, 116, 90, 0.09);
}

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.home-metric-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.home-metric-icon,
.home-action-icon,
.home-activity-icon {
  display: grid;
  place-items: center;
  color: var(--green);
  background: #e7f3ef;
}

.home-metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.home-metric-icon svg,
.home-action-icon svg,
.home-activity-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-metric-card div {
  display: grid;
  gap: 2px;
}

.home-metric-card span:not(.home-metric-icon) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.home-metric-card strong {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.home-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 0;
  min-height: 220px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(120deg, #103f38 0%, #14644f 54%, #19815f 100%);
  box-shadow: var(--shadow);
}

.home-dashboard-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(24px, 3vw, 38px);
}

.home-dashboard-copy .eyebrow {
  color: #f4c453;
}

.home-dashboard-copy h2 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2rem, 3.1vw, 3.25rem);
  line-height: 1.02;
  text-wrap: balance;
}

.home-dashboard-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #e8f3f0;
  font-size: 1rem;
}

.home-activity-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  gap: 12px;
  padding: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.home-activity-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #153f36;
  background: var(--yellow);
}

.home-activity-copy {
  display: grid;
  gap: 4px;
}

.home-activity-copy > span {
  color: #cae6de;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-activity-copy strong {
  color: #fff;
  font-size: 1.15rem;
}

.home-activity-copy p {
  margin: 0;
  color: #dcece8;
  font-size: 0.88rem;
  line-height: 1.35;
}

.home-activity-action {
  grid-column: 2;
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
}

.home-action-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.home-section-heading h2,
.home-section-heading p {
  margin-bottom: 0;
}

.home-section-heading > p {
  color: var(--muted);
  font-size: 0.88rem;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-action-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #d5e3df;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fbfdfc;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home-action-card:hover {
  border-color: rgba(24, 116, 90, 0.48);
  box-shadow: 0 10px 24px rgba(15, 51, 45, 0.08);
  transform: translateY(-2px);
}

.home-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.home-action-copy {
  display: grid;
  gap: 4px;
}

.home-action-copy strong {
  font-size: 0.95rem;
}

.home-action-copy small {
  color: var(--muted);
  line-height: 1.3;
}

.home-action-copy em {
  color: var(--green);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.home-action-arrow {
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 900;
}

.profile-section-heading {
  margin-top: 2px;
}

.role-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
}

.role-card p {
  flex: 1;
}

.role-card-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid rgba(24, 116, 90, 0.24);
  border-radius: 7px;
  color: var(--green);
  font-weight: 850;
  background: #f0f8f5;
}

.role-card-action:hover {
  border-color: var(--green);
  background: #e6f4ef;
}

.nav-tab.active {
  position: relative;
  box-shadow: inset 3px 0 0 var(--yellow);
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 1180px) {
  .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  }
}

@media (max-width: 820px) {
  .home-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .home-dashboard-copy {
    padding: 24px 20px;
  }

  .home-dashboard-copy h2 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .home-activity-card {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .home-section-heading {
    display: grid;
    gap: 4px;
  }

  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .status-copy small {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-metric-grid,
  .home-action-grid,
  .role-grid {
    grid-template-columns: 1fr !important;
  }

  .home-metric-card {
    min-height: 66px;
    padding: 12px 14px;
  }

  .home-dashboard-hero {
    min-height: 0;
  }

  .home-dashboard-copy {
    padding: 22px 18px;
  }

  .home-dashboard-copy h2 {
    max-width: 15ch;
    font-size: 2rem;
  }

  .home-activity-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 18px;
  }

  .home-activity-icon {
    width: 38px;
    height: 38px;
  }

  .home-activity-action,
  .role-card-action {
    min-height: 48px;
  }

  .home-action-panel {
    padding: 14px;
  }

  .home-action-card {
    min-height: 88px;
  }

  .role-card {
    min-height: 0;
  }
}

/* Approved home composition. */
.sidebar {
  background: linear-gradient(180deg, #0b3f36 0%, #0d4b3d 54%, #07352e 100%);
}

.sidebar-meta {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: #bfd3cd;
}

.sidebar-help {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  color: #e8f4f0;
  background: transparent;
}

.sidebar-help > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.sidebar-meta small {
  padding-inline: 8px;
  font-size: 0.7rem;
}

#sidebarActions[hidden] + .sidebar-meta {
  margin-top: auto;
}

@media (min-width: 769px) {
  .app-shell:not(.sidebar-expanded) .sidebar-help {
    justify-content: center;
    padding-inline: 4px;
  }

  .app-shell:not(.sidebar-expanded) .sidebar-help strong,
  .app-shell:not(.sidebar-expanded) .sidebar-meta small {
    display: none;
  }
}

.home-metric-card {
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.home-metric-card small {
  color: #71817c;
  font-size: 0.7rem;
}

.home-metric-arrow {
  color: #75928a;
  font-weight: 900;
}

.home-metric-card:hover {
  border-color: rgba(8, 121, 79, 0.36);
  box-shadow: 0 12px 26px rgba(11, 63, 54, 0.1);
}

.home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
  margin-bottom: 18px;
}

.home-primary-banner {
  position: relative;
  display: grid;
  min-height: 260px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
  box-shadow: var(--shadow);
}

.home-primary-banner .home-dashboard-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 30px 34px;
}

.home-primary-banner .home-dashboard-copy h2 {
  max-width: 17ch;
  font-size: clamp(2rem, 3vw, 3rem);
}

.home-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 6px;
}

.home-banner-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 7px;
  color: #fff;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.1);
}

.home-banner-button.primary {
  border-color: #f7b733;
  color: #143c33;
  background: #f7b733;
}

.home-field-watermark {
  position: absolute;
  top: 20px;
  right: -22px;
  bottom: 20px;
  width: 42%;
  opacity: 0.14;
  border: 3px solid #fff;
  border-radius: 8px;
}

.home-field-watermark::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 3px solid #fff;
}

.home-field-watermark span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.home-next-match-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 22px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.next-match-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-match-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.home-match-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  background: #e8f5ef;
}

.home-match-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.next-match-badge {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  color: #0f5f48;
  font-size: 0.72rem;
  font-weight: 900;
  background: #e8f5ef;
}

.next-match-teams {
  font-size: 1.35rem;
}

.next-match-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.next-match-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 9px 11px;
  border: 1px solid rgba(8, 121, 79, 0.25);
  border-radius: 7px;
  color: #08794f;
  font-weight: 850;
  background: #f1f9f5;
}

.next-match-empty {
  display: grid;
  min-height: 145px;
  place-content: center;
  gap: 6px;
  text-align: center;
}

.next-match-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.home-info-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 20px;
  min-height: 126px;
  margin-top: 18px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #f4faf7;
}

.home-info-footer h2 {
  margin-bottom: 7px;
  font-size: 1.25rem;
}

.home-info-footer p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.home-info-illustration {
  width: 150px;
  height: 72px;
  justify-self: end;
  opacity: 0.26;
  border: 3px solid #0f5f48;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent 49%, #0f5f48 49%, #0f5f48 51%, transparent 51%);
}

.location-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.location-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.location-card > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  background: #e8f5ef;
}

.location-card svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.location-card div {
  display: grid;
  gap: 4px;
}

.location-card small {
  color: var(--muted);
}

@media (max-width: 820px) {
  .home-metric-grid,
  .home-main-grid,
  .role-grid {
    grid-template-columns: 1fr !important;
  }

  .home-primary-banner,
  .home-next-match-card {
    min-height: 0;
  }

  .home-field-watermark {
    display: none;
  }

  .home-info-footer {
    grid-template-columns: 1fr;
  }

  .home-info-illustration {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-primary-banner .home-dashboard-copy {
    padding: 22px 18px;
  }

  .home-banner-actions {
    display: grid;
  }

  .home-banner-button,
  .next-match-action {
    min-height: 48px;
  }

  .home-next-match-card,
  .home-info-footer {
    padding: 18px;
  }
}

/* Desktop proportions from the approved mockup. */
.page-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.home-metric-card {
  min-height: 110px;
  padding: 16px 18px;
}

.next-match-versus {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.next-team-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #cfe1db;
  border-radius: 50%;
  color: #0f5f48;
  font-size: 0.72rem;
  font-weight: 900;
  background: #eaf6f1;
}

.next-match-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  color: #08794f;
  background: #e8f5ef;
}

.next-match-empty-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.next-match-empty-action {
  min-height: 40px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid #cfe1db;
  border-radius: 7px;
  color: #0f5f48;
  font-weight: 850;
  background: #f4faf7;
}

.role-card {
  padding: 22px;
}

.home-info-footer {
  grid-template-columns: 44px minmax(0, 1fr) 160px;
  min-height: 108px;
}

.home-info-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
  background: #0f5f48;
}

@media (min-width: 1181px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .app-shell:not(.sidebar-expanded),
  .app-shell:not(.sidebar-expanded):hover,
  .app-shell:not(.sidebar-expanded):focus-within,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover),
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) {
    grid-template-columns: 190px minmax(0, 1fr) !important;
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar:hover,
  .app-shell:not(.sidebar-expanded) .sidebar:focus-within {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    padding: 18px 12px !important;
    gap: 14px;
  }

  .brand,
  .app-shell.sidebar-collapsed .brand,
  .app-shell:not(.sidebar-expanded) .brand {
    display: flex !important;
    justify-content: flex-start !important;
    justify-items: start !important;
  }

  .brand-logo-button,
  .app-shell:not(.sidebar-expanded) .brand-logo-button {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .brand-text,
  .nav-label,
  .action-label,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .action-label,
  .app-shell:not(.sidebar-expanded) .brand-text,
  .app-shell:not(.sidebar-expanded) .nav-label,
  .app-shell:not(.sidebar-expanded) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .action-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .nav-tabs {
    gap: 4px;
  }

  .nav-tab,
  .app-shell.sidebar-collapsed .nav-tab,
  .app-shell:not(.sidebar-expanded) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-tab {
    width: 100% !important;
    min-height: 40px;
    justify-content: flex-start !important;
    padding: 8px 10px !important;
  }

  .sidebar-help {
    justify-content: flex-start !important;
  }

  .sidebar-help strong,
  .sidebar-meta small {
    display: block !important;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .main-content {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    padding: 26px 30px;
  }
}

@media (max-width: 820px) {
  .home-info-footer {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .home-info-illustration {
    display: none;
  }
}

/* Last cascade rule: sidebar changes width only through .sidebar-expanded. */
@media (min-width: 769px) {
  .app-shell:not(.sidebar-expanded),
  .app-shell:not(.sidebar-expanded):hover,
  .app-shell:not(.sidebar-expanded):focus-within,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover),
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .app-shell:not(.sidebar-expanded) .sidebar,
  .app-shell:not(.sidebar-expanded) .sidebar:hover,
  .app-shell:not(.sidebar-expanded) .sidebar:focus-within {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 18px 8px !important;
  }

  .app-shell:not(.sidebar-expanded) .brand {
    justify-content: center !important;
    justify-items: center !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-logo-button {
    width: 40px !important;
    margin-inline: auto !important;
  }

  .app-shell:not(.sidebar-expanded) .brand-text,
  .app-shell:not(.sidebar-expanded) .nav-label,
  .app-shell:not(.sidebar-expanded) .action-label,
  .app-shell:not(.sidebar-expanded) .sidebar-help strong,
  .app-shell:not(.sidebar-expanded) .sidebar-meta small,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .action-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .brand-text,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-label,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .action-label {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .app-shell:not(.sidebar-expanded) .nav-tab,
  .app-shell:not(.sidebar-expanded) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:hover) .ghost-button,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .nav-tab,
  .app-shell:not(.sidebar-expanded):has(.sidebar:focus-within) .ghost-button {
    width: 48px !important;
    grid-template-columns: 24px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
  }

  .app-shell.sidebar-expanded,
  .app-shell.sidebar-expanded:hover,
  .app-shell.sidebar-expanded:focus-within,
  .app-shell.sidebar-expanded:has(.sidebar:hover),
  .app-shell.sidebar-expanded:has(.sidebar:focus-within) {
    grid-template-columns: 228px minmax(0, 1fr) !important;
  }

  .app-shell.sidebar-expanded .sidebar,
  .app-shell.sidebar-expanded .sidebar:hover,
  .app-shell.sidebar-expanded .sidebar:focus-within {
    width: 228px !important;
    min-width: 228px !important;
    max-width: 228px !important;
    padding: 16px 12px !important;
  }

  .app-shell.sidebar-expanded .brand-logo-button,
  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    width: 100% !important;
  }

  .app-shell.sidebar-expanded .brand-text,
  .app-shell.sidebar-expanded .nav-label,
  .app-shell.sidebar-expanded .action-label,
  .app-shell.sidebar-expanded .sidebar-help strong,
  .app-shell.sidebar-expanded .sidebar-meta small {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Secretary dashboard polish: compact navigation and administrative cards. */
@media (min-width: 769px) {
  .app-shell,
  .app-shell:hover,
  .app-shell:focus-within,
  .app-shell:has(.sidebar:hover),
  .app-shell:has(.sidebar:focus-within),
  .app-shell.sidebar-expanded,
  .app-shell.sidebar-expanded:hover,
  .app-shell.sidebar-expanded:focus-within {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .app-shell.sidebar-expanded .sidebar,
  .app-shell.sidebar-expanded .sidebar:hover,
  .app-shell.sidebar-expanded .sidebar:focus-within {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 18px 8px !important;
    background: linear-gradient(180deg, #06352f 0%, #052a28 100%) !important;
  }

  .brand,
  .app-shell.sidebar-expanded .brand {
    justify-content: center !important;
    justify-items: center !important;
  }

  .brand-logo-button,
  .app-shell.sidebar-expanded .brand-logo-button {
    width: 40px !important;
    margin-inline: auto !important;
    cursor: default;
  }

  .brand-text,
  .nav-label,
  .action-label,
  .sidebar-help strong,
  .sidebar-meta small,
  .app-shell.sidebar-expanded .brand-text,
  .app-shell.sidebar-expanded .nav-label,
  .app-shell.sidebar-expanded .action-label,
  .app-shell.sidebar-expanded .sidebar-help strong,
  .app-shell.sidebar-expanded .sidebar-meta small {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .nav-tab,
  .ghost-button,
  .app-shell.sidebar-expanded .nav-tab,
  .app-shell.sidebar-expanded .ghost-button {
    width: 48px !important;
    grid-template-columns: 24px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 7px !important;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  .nav-tab:hover,
  .ghost-button:hover,
  .sidebar-help:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .nav-tab.active,
  .app-shell.sidebar-expanded .nav-tab.active {
    color: #0b3f36 !important;
    border-color: rgba(247, 183, 51, 0.75) !important;
    background: #f7b733 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
  }

  .sidebar-help {
    width: 48px;
    justify-content: center !important;
    margin-inline: auto;
    padding: 6px !important;
  }
}

#painel {
  padding-bottom: 24px;
}

#painel .secretary-metric-grid {
  gap: 14px;
  margin-bottom: 18px;
}

#painel .secretary-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  min-height: 118px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-left: 4px solid #08794f;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11, 63, 54, 0.08);
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#painel .secretary-metric-card:hover,
#painel .secretary-metric-card:focus-visible {
  border-color: #8fc8b3;
  box-shadow: 0 14px 30px rgba(11, 63, 54, .13);
  transform: translateY(-2px);
}

.secretary-metric-icon,
.dashboard-shortcut-icon,
.dashboard-empty-icon,
.dashboard-attention-icon,
.secretary-status-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #08794f;
  background: #e9f6f0;
}

.secretary-metric-icon {
  width: 48px;
  height: 48px;
}

.secretary-metric-icon svg,
.dashboard-shortcut-icon svg,
.dashboard-empty-icon svg,
.dashboard-attention-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.secretary-metric-card > div {
  display: grid;
  gap: 2px;
}

.secretary-metric-card > div > span {
  color: #64748b;
  font-size: 0.85rem;
}

#painel .secretary-metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.secretary-metric-card small {
  color: #64748b;
  font-size: 0.72rem;
}

.secretary-metric-arrow,
.dashboard-shortcut-arrow {
  color: #7b968e;
  font-weight: 900;
}

#painel .dashboard-shortcuts {
  gap: 14px;
  margin-bottom: 20px;
}

#painel .dashboard-shortcut {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  color: #0f172a;
  text-align: left;
  background: #fff;
  box-shadow: 0 10px 24px rgba(11, 63, 54, 0.07);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

#painel .dashboard-shortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 121, 79, 0.34);
  box-shadow: 0 16px 30px rgba(11, 63, 54, 0.11);
}

.dashboard-shortcut-icon {
  width: 46px;
  height: 46px;
}

.dashboard-shortcut-copy {
  display: grid;
  gap: 5px;
}

.dashboard-shortcut-copy strong {
  font-size: 1rem;
}

.dashboard-shortcut-copy small {
  color: #64748b;
  line-height: 1.35;
}

#painel .dashboard-content-grid {
  gap: 16px;
}

#painel .dashboard-operational-panel {
  min-height: 330px;
  padding: 22px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 63, 54, 0.08);
}

#painel .dashboard-operational-panel .panel-header h2 {
  font-size: 1.08rem;
}

#painel .dashboard-operational-panel .panel-header p {
  color: #64748b;
}

.dashboard-rich-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(8, 121, 79, 0.24);
  border-radius: 12px;
  background: #f8fcfa;
}

.dashboard-rich-empty p {
  max-width: 460px;
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.dashboard-empty-icon {
  width: 50px;
  height: 50px;
}

.dashboard-empty-action {
  min-height: 38px !important;
  width: auto !important;
  margin-top: 4px;
  padding: 8px 13px !important;
  border: 1px solid rgba(8, 121, 79, 0.26) !important;
  border-radius: 8px !important;
  color: #08794f !important;
  font-weight: 850;
  background: #fff !important;
  box-shadow: none !important;
}

#painel .sport-bars {
  display: grid;
  gap: 14px;
}

#painel .sport-bar-row {
  grid-template-columns: minmax(105px, 0.35fr) minmax(120px, 1fr) 34px;
  gap: 12px;
}

#painel .sport-track {
  height: 10px;
  border-radius: 999px;
  background: #e8f1ed;
}

#painel .sport-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, #0f5f48, #08794f);
}

.dashboard-attention-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px auto;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #e5ecea;
}

.dashboard-attention-item:last-child {
  border-bottom: 0;
}

.dashboard-attention-icon {
  width: 40px;
  height: 40px;
}

.dashboard-attention-copy {
  display: grid;
  gap: 3px;
}

.dashboard-attention-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
}

.dashboard-priority-badge {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  color: #73510a;
  font-size: 0.64rem;
  font-weight: 900;
  background: #fff4d6;
}

.dashboard-priority-badge.high {
  color: #8a2e2e;
  background: #fde9e9;
}

.dashboard-attention-count {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: #0f5f48;
}

.dashboard-attention-action {
  width: auto !important;
  min-height: 36px !important;
  padding: 7px 10px !important;
  border: 1px solid #d7e3e3 !important;
  border-radius: 8px !important;
  color: #08794f !important;
  font-size: 0.76rem;
  font-weight: 850;
  background: #fff !important;
  box-shadow: none !important;
}

.secretary-status-strip {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 16px;
  min-height: 120px;
  margin-top: 18px;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #f1f9f5;
  box-shadow: 0 10px 24px rgba(11, 63, 54, 0.06);
}

.secretary-status-icon {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
  font-weight: 900;
}

.secretary-status-strip h2 {
  margin: 0 0 5px;
  font-size: 1.08rem;
}

.secretary-status-strip p {
  margin: 0;
  color: #64748b;
}

.secretary-status-art {
  width: 130px;
  height: 66px;
  justify-self: end;
  opacity: 0.2;
  border: 3px solid #0f5f48;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent 49%, #0f5f48 49%, #0f5f48 51%, transparent 51%);
}

#painel.technician-home-mode > :not(.technician-home-shell) {
  display: none !important;
}

#painel.technician-home-mode .technician-home-header {
  display: none;
}

.technician-home-shell {
  display: grid;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.technician-home-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.technician-home-header h2 {
  margin: 2px 0 4px;
  color: #0f172a;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04;
}

.technician-home-header p,
.technician-home-card header p,
.technician-home-empty p,
.technician-home-no-team p {
  margin: 0;
  color: #64748b;
  line-height: 1.4;
}

.technician-home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.technician-home-metric {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: 0 12px 28px rgba(11, 63, 54, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.technician-home-metric:hover,
.technician-home-metric:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(8, 121, 79, 0.32);
  box-shadow: 0 16px 32px rgba(11, 63, 54, 0.12);
}

.technician-home-metric > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.technician-home-metric small,
.technician-home-metric em,
.technician-home-team-open small,
.technician-home-team-next small,
.technician-home-pending-item small,
.technician-home-activity-item small,
.technician-home-pending-item em,
.technician-home-activity-item em,
.technician-home-championship-card small {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
}

.technician-home-metric strong {
  overflow-wrap: anywhere;
  font-size: 1.75rem;
  line-height: 1;
}

.technician-home-metric b[aria-hidden="true"] {
  color: #7b968e;
}

.technician-home-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr) minmax(280px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.technician-home-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.technician-home-card,
.technician-home-no-team {
  min-width: 0;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 63, 54, 0.08);
}

.technician-home-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.technician-home-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.technician-home-card header h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.15;
}

.technician-home-card header h3 span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  color: #0b3f36;
  font-size: 0.74rem;
  background: #f7d06a;
}

.technician-home-card .text-button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  justify-self: end;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #08794f;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

.technician-home-card .text-button:hover,
.technician-home-card .text-button:focus-visible {
  background: #edf7f3;
  box-shadow: none;
}

#technicianHome .team-crest {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #08794f;
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 44px;
}

#technicianHome .team-crest.has-image {
  background: #f8fbfa;
  border: 1px solid #d7e3e3;
}

#technicianHome .team-crest img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.technician-home-team-list,
.technician-home-pending-list,
.technician-home-activity-list {
  display: grid;
  gap: 10px;
}

.technician-home-team-open,
.technician-home-pending-item,
.technician-home-activity-item {
  width: 100%;
  min-width: 0;
  border: 1px solid #e0e9e7;
  border-radius: 12px;
  background: #fbfefd;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.technician-home-team-open {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto minmax(108px, auto) 14px;
  align-items: center;
  gap: 12px;
  padding: 13px;
}

.technician-home-team-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.technician-home-team-copy strong,
.technician-home-pending-item strong,
.technician-home-activity-item strong {
  overflow-wrap: anywhere;
}

.technician-home-team-copy b {
  color: #0f5f48;
  font-size: 0.78rem;
}

.technician-home-team-next {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.technician-next-match-card {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfefd 0%, #f3faf7 100%);
}

.technician-next-match-card > small {
  color: #64748b;
}

.technician-next-match-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: center;
}

.technician-next-match-versus span {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.technician-next-match-versus b {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #08794f;
}

.technician-next-match-versus strong {
  overflow-wrap: anywhere;
}

.technician-next-match-versus em {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #73510a;
  font-style: normal;
  font-weight: 900;
  background: #fff4d6;
}

.technician-next-match-details {
  display: grid;
  gap: 8px;
  color: #475569;
}

.technician-next-match-details span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.technician-next-match-details svg {
  width: 17px;
  height: 17px;
  color: #08794f;
}

.technician-next-match-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.technician-home-right-stack {
  display: grid;
  gap: 18px;
}

.technician-home-pending-item,
.technician-home-activity-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 12px;
}

.technician-home-pending-item > span:last-child,
.technician-home-activity-item > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.technician-home-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px dashed rgba(8, 121, 79, 0.24);
  border-radius: 12px;
  background: #f8fcfa;
  text-align: center;
}

.technician-home-empty.compact {
  min-height: 170px;
}

.technician-home-no-team {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 24px;
  text-align: center;
}

.technician-home-no-team h3 {
  margin: 0;
  font-size: 1.4rem;
}

.technician-home-no-team ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(880px, 100%);
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: technician-steps;
}

.technician-home-no-team li {
  counter-increment: technician-steps;
  padding: 14px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fbfefd;
  color: #0f172a;
  font-weight: 800;
}

.technician-home-no-team li::before {
  content: counter(technician-steps, decimal-leading-zero);
  display: block;
  color: #08794f;
  font-size: 0.72rem;
}

.technician-home-championship-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.technician-home-championship-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fbfefd;
}

.technician-home-championship-card h3 {
  margin: 0;
  color: #0f172a;
}

.technician-home-championship-card p {
  margin: 0;
  color: #64748b;
}

.technician-home-championship-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.technician-home-championship-card div {
  min-width: 0;
}

.technician-home-championship-card dt {
  color: #64748b;
  font-size: 0.72rem;
}

.technician-home-championship-card dd {
  margin: 2px 0 0;
  color: #0f172a;
  font-weight: 850;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  #painel .secretary-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #painel .dashboard-shortcuts {
    grid-template-columns: 1fr;
  }

  .technician-home-metrics,
  .technician-home-main-grid,
  .technician-home-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-home-right-stack,
  .technician-home-championships {
    grid-column: 1 / -1;
  }

  .technician-home-championship-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-home-no-team ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #painel .secretary-metric-grid,
  #painel .dashboard-content-grid {
    grid-template-columns: 1fr !important;
  }

  #painel .secretary-metric-card {
    min-height: 104px;
  }

  #painel .dashboard-operational-panel {
    min-height: 0;
    padding: 18px;
  }

  .dashboard-attention-item {
    grid-template-columns: 40px minmax(0, 1fr) 30px;
  }

  .dashboard-attention-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .secretary-status-strip {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 20px;
  }

  .secretary-status-art {
    display: none;
  }

  .technician-home-shell {
    gap: 16px;
    padding-bottom: 86px;
  }

  .technician-home-header {
    display: block;
  }

  .technician-home-header h2 {
    font-size: 2rem;
  }

  .technician-home-actions,
  .technician-next-match-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .technician-home-actions .primary-button,
  .technician-home-actions .secondary-button {
    width: 100%;
  }

  .technician-home-metrics,
  .technician-home-main-grid,
  .technician-home-bottom-grid,
  .technician-home-championship-grid,
  .technician-home-no-team ol {
    grid-template-columns: 1fr;
  }

  .technician-home-metric {
    min-height: 96px;
    padding: 15px;
  }

  .technician-home-card,
  .technician-home-no-team {
    padding: 16px;
    border-radius: 14px;
  }

  .technician-home-card header {
    align-items: flex-start;
  }

  .technician-home-card .text-button {
    flex: 0 0 auto;
    padding: 4px 0;
  }

  .technician-home-team-open {
    grid-template-columns: 42px minmax(0, 1fr) 14px;
  }

  .technician-home-team-open .tag,
  .technician-home-team-next {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .technician-next-match-versus {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-next-match-versus em {
    justify-self: center;
  }
}

/* Administrative workspace visual system */
:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) {
  --admin-green-dark: #0b3f36;
  --admin-green: #0f5f48;
  --admin-green-bright: #08794f;
  --admin-border: #d7e3e3;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  color: var(--admin-text);
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) > .content-grid,
#sorteio > .draw-layout {
  gap: 20px;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel,
#campeonatos .front-overview-panel,
#escolinhas .schools-hero-panel,
#escolinhas .front-overview-panel {
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(11, 63, 54, 0.07);
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel {
  padding: 22px;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel-header {
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8efed;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel-header h2 {
  margin: 0 0 5px;
  color: var(--admin-text);
  font-size: 1.12rem;
  line-height: 1.25;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel-header p {
  margin: 0;
  color: var(--admin-muted);
  line-height: 1.45;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) label {
  color: #334155;
  font-weight: 700;
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) :is(input, select, textarea) {
  min-height: 42px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #fbfefd;
  color: var(--admin-text);
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) :is(input, select, textarea):focus {
  border-color: var(--admin-green-bright);
  outline: 3px solid rgba(8, 121, 79, 0.12);
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .primary-button {
  min-height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--admin-green-dark), var(--admin-green-bright));
  box-shadow: 0 6px 14px rgba(8, 121, 79, 0.16);
}

:is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .secondary-button {
  min-height: 42px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-green-dark);
}

#times .content-grid {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.55fr);
  align-items: start;
}

#times .team-grid,
#campeonatos .championship-list,
#locais .location-card-grid {
  gap: 14px;
}

#times .team-card,
#campeonatos .championship-card,
#campeonatos .category-card,
#locais .location-card,
#sorteio :is(.group-card, .match-row),
#documentos .document-list > * {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 63, 54, 0.05);
}

#campeonatos .championship-section-panel,
#documentos .document-section-menu {
  border-color: var(--admin-border);
  background: #f7fbf9;
}

#sorteio .draw-controls {
  margin-bottom: 20px;
}

#sorteio .draw-form {
  align-items: end;
  gap: 14px;
}

#sorteio .draw-match-schedule-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) auto);
  align-items: end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--admin-border);
}

#sorteio .draw-match-schedule-editor label {
  display: grid;
  gap: 4px;
  color: #526a63;
  font-size: .72rem;
  font-weight: 750;
}

#sorteio .draw-match-schedule-editor :is(input, select) {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
}

#sorteio .draw-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#relatorios .front-metric-grid,
#documentos .front-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

#locais .location-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.administrative-empty-state {
  min-height: 210px;
  padding: 32px 24px;
  border: 1px dashed #bfd3cd !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #fbfefd 0%, #f4faf7 100%) !important;
  text-align: center;
}

.administrative-empty-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: #e5f4ed;
  color: #08794f;
}

.administrative-empty-icon svg {
  width: 22px;
  height: 22px;
}

.administrative-empty-state strong {
  color: #0f172a;
  font-size: 1rem;
}

.administrative-empty-state span:not(.administrative-empty-icon) {
  max-width: 480px;
  color: #64748b;
  line-height: 1.5;
}

.administrative-empty-action {
  display: inline-flex;
  min-height: 40px;
  margin-top: 16px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  background: #0f5f48;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.administrative-empty-action:hover {
  background: #0b3f36;
}

@media (max-width: 980px) {
  #times .content-grid,
  #sorteio .draw-layout {
    grid-template-columns: 1fr;
  }

  :is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .filter-row {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  :is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel {
    padding: 18px;
    border-radius: 10px;
  }

  :is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  :is(#escolinhas, #campeonatos, #times, #sorteio, #documentos, #relatorios, #locais) :is(.form-row, .draw-form) {
    grid-template-columns: 1fr;
  }

  .administrative-empty-state {
    min-height: 190px;
    padding: 26px 18px;
  }
}

/* Municipal administration dashboards */
#escolinhas .schools-hero-panel {
  min-height: 280px;
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border: 0;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
  color: #fff;
}

#escolinhas .schools-hero-panel .eyebrow {
  margin: 0 0 10px;
  color: #f7b733;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

#escolinhas .schools-hero-panel h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

#escolinhas .schools-hero-panel > div > p:last-child {
  max-width: 540px;
  color: rgba(255,255,255,.82);
  line-height: 1.55;
}

#escolinhas .schools-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#escolinhas .school-report-card {
  min-height: 100px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.2);
  border-left: 4px solid #f7b733;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(4px);
}

#escolinhas .school-report-card :is(span, strong) { color: #fff; }

#escolinhas .front-overview-panel,
#campeonatos .front-overview-panel {
  padding: 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b3f36, #08794f);
}

#escolinhas .front-overview-panel .front-metric-grid,
#campeonatos .front-overview-panel .front-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

#escolinhas .front-metric-card,
#campeonatos .front-metric-card {
  position: relative;
  min-height: 98px;
  padding: 16px 16px 14px 58px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
}

#escolinhas .front-metric-card::before,
#campeonatos .front-metric-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(247,183,51,.95);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.18);
}

#escolinhas .front-metric-card :is(span, strong),
#campeonatos .front-metric-card :is(span, strong) { color: #fff; }

#escolinhas .front-metric-card strong,
#campeonatos .front-metric-card strong { font-size: 1.75rem; }

#escolinhas .workspace-menu-panel,
#campeonatos .workspace-menu-panel {
  padding: 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(2,47,40,.28);
}

#escolinhas .front-workbench-top,
#campeonatos .front-workbench-top {
  grid-template-columns: minmax(190px,.38fr) minmax(0,1fr);
  align-items: stretch;
}

#escolinhas .front-workbench-copy :is(h3,p),
#campeonatos .front-workbench-copy :is(h3,p) { color: #fff; }

#escolinhas .front-quick-actions,
#campeonatos .front-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

#escolinhas .front-action-pill,
#campeonatos .front-action-pill {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  color: #fff;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#escolinhas .front-action-pill:hover,
#campeonatos .front-action-pill:hover,
#escolinhas .front-action-pill.active,
#campeonatos .front-action-pill.active {
  border-color: #f7b733;
  background: rgba(255,255,255,.2);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

#escolinhas .workspace-option-index,
#campeonatos .workspace-option-index {
  color: #f7b733;
  border-color: rgba(247,183,51,.5);
}

.administrative-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}

.administrative-overview-card {
  min-height: 220px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(11,63,54,.07);
}

.administrative-overview-card h3 { margin: 0 0 6px; font-size: 1rem; }
.administrative-overview-card p { margin: 0; color: #64748b; line-height: 1.45; }
.administrative-overview-card > strong { color: #0f5f48; font-size: 2rem; }
.administrative-overview-card .secondary-button { width: 100%; }

.administrative-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.administrative-summary-card {
  min-height: 92px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 9px;
  background: #f8fcfa;
}

.administrative-summary-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e2f3eb;
  color: #08794f;
}

.administrative-summary-icon svg { width: 20px; height: 20px; }
.administrative-summary-card div { display: grid; gap: 2px; }
.administrative-summary-card small { color: #64748b; }
.administrative-summary-card strong { color: #0f172a; font-size: 1.55rem; }

.administrative-filter-bar {
  margin-bottom: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3,minmax(160px,1fr)) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #f8fcfa;
}

.administrative-filter-bar label { display: grid; gap: 6px; font-size: .78rem; }

#times .content-grid { grid-template-columns: 1fr; }
#times #teamForm { max-width: 760px; }
#times .filter-row { display: grid; grid-template-columns: repeat(2,minmax(180px,1fr)); gap: 10px; }
#times .team-grid { grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); }

.document-command-layout {
  display: grid;
  grid-template-columns: minmax(290px,.72fr) minmax(0,1.65fr);
  align-items: start;
  gap: 20px;
}

.document-command-sidebar { display: grid; gap: 14px; }
#documentos .document-command-sidebar .front-module-grid,
#documentos .document-command-sidebar .front-metric-grid { grid-template-columns: 1fr; gap: 10px; }
#documentos .document-command-sidebar .front-module-card { min-height: 90px; text-align: left; }
#documentos .document-section-menu { margin: 0; padding: 16px; }
#documentos .context-segmented-control { display: grid; grid-template-columns: 1fr; gap: 8px; }
#documentos .context-option-button { min-height: 58px; width: 100%; }
#documentos .document-command-list { min-height: 100%; }
#documentos .document-card { padding: 18px; }

.report-visual-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  margin-top: 18px;
}

.report-visual-card {
  min-height: 180px;
  padding: 20px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(11,63,54,.06);
}

.report-visual-card header { display: flex; justify-content: space-between; gap: 12px; }
.report-visual-card h3 { margin: 0; font-size: .98rem; }
.report-visual-card header span { color: #0f5f48; font-size: 1.65rem; font-weight: 900; }
.report-visual-card p { color: #64748b; }
.report-visual-track { height: 12px; margin-top: 32px; overflow: hidden; border-radius: 8px; background: #e5efec; }
.report-visual-track i { display: block; min-width: 4px; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#0f5f48,#08794f); }

#locais .location-card { min-height: 110px; padding: 18px; }

@media (max-width: 1100px) {
  .administrative-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #escolinhas .front-overview-panel .front-metric-grid,
  #campeonatos .front-overview-panel .front-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .document-command-layout { grid-template-columns: 1fr; }
  #documentos .document-command-sidebar .front-module-grid,
  #documentos .document-command-sidebar .front-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  #escolinhas .schools-hero-panel { min-height: 0; padding: 24px 20px; grid-template-columns: 1fr; }
  #escolinhas .schools-report-grid,
  #escolinhas .front-overview-panel .front-metric-grid,
  #campeonatos .front-overview-panel .front-metric-grid,
  .administrative-overview-grid,
  .administrative-summary-grid,
  .report-visual-grid,
  #documentos .document-command-sidebar .front-module-grid,
  #documentos .document-command-sidebar .front-metric-grid { grid-template-columns: 1fr; }
  #escolinhas .front-workbench-top,
  #campeonatos .front-workbench-top { grid-template-columns: 1fr; }
  #escolinhas .front-quick-actions,
  #campeonatos .front-quick-actions { grid-template-columns: 1fr; }
  .administrative-filter-bar,
  #times .filter-row { grid-template-columns: 1fr; }
  .administrative-overview-card { min-height: 190px; }
  #sorteio :is(.standings-grid,.match-list,.bracket) { overflow-x: auto; }
}

/* Escolinhas summary layout correction */
#escolinhas .schools-layout {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

#escolinhas .schools-layout > * {
  min-width: 0;
}

#escolinhas .schools-admin-panel {
  grid-column: span 4;
}

#escolinhas .schools-layout > :is(.schools-hero-panel, .front-overview-panel, .administrative-overview-grid, .school-management-status, .wide) {
  grid-column: 1 / -1;
}

#escolinhas .school-metric {
  position: relative;
  padding-left: 62px;
}

#escolinhas .school-metric::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(247, 183, 51, 0.95);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.2);
}

#escolinhas .school-metric small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.74);
  font-size: .72rem;
  line-height: 1.25;
}

#escolinhas .front-quick-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#escolinhas .front-action-pill {
  min-width: 0;
}

#escolinhas .workspace-option-copy,
#escolinhas .workspace-option-copy strong,
#escolinhas .workspace-option-copy small {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

#escolinhas #schoolOperationalOverview {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

#escolinhas .school-summary-card {
  min-width: 0;
  min-height: 250px;
  padding: 20px 22px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11, 63, 54, .07);
}

#escolinhas .school-summary-card > header {
  min-width: 0;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e8efed;
}

#escolinhas .school-summary-card h3 {
  min-width: 0;
  margin: 0;
  color: #0f172a;
  font-size: .98rem;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
}

#escolinhas .school-summary-link {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #08794f;
  font-size: .75rem;
  font-weight: 800;
}

#escolinhas .school-summary-body {
  min-width: 0;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

#escolinhas .school-summary-body h4 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: .94rem;
  line-height: 1.35;
}

#escolinhas .school-summary-body p {
  max-width: 250px;
  margin: 0;
  color: #64748b;
  font-size: .8rem;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
}

#escolinhas .school-summary-body .administrative-summary-icon {
  width: 44px;
  height: 44px;
}

#escolinhas .school-summary-value {
  color: #0f5f48;
  font-size: 2rem;
  line-height: 1;
}

#escolinhas .school-summary-body .secondary-button {
  width: auto;
  min-width: 132px;
  min-height: 36px;
  margin-top: 4px;
  padding-inline: 14px;
  background: #f4faf7;
}

#escolinhas .school-management-status {
  min-height: 116px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 150px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #f3faf6;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#escolinhas .school-management-status-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0f5f48;
  color: #fff;
  font-weight: 900;
}

#escolinhas .school-management-status h2 { margin: 0 0 5px; font-size: 1.05rem; }
#escolinhas .school-management-status p { margin: 0; color: #64748b; line-height: 1.5; }
#escolinhas .school-management-status-art {
  width: 140px;
  height: 72px;
  justify-self: end;
  opacity: .18;
  border: 3px solid #0f5f48;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent 49%, #0f5f48 49%, #0f5f48 51%, transparent 51%);
}

@media (max-width: 1200px) {
  #escolinhas .front-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  #escolinhas #schoolOperationalOverview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #escolinhas .schools-admin-panel { grid-column: span 6; }
}

@media (max-width: 640px) {
  #escolinhas .schools-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
  #escolinhas .schools-admin-panel { grid-column: 1; }
  #escolinhas #schoolOperationalOverview,
  #escolinhas .front-quick-actions { grid-template-columns: 1fr; }
  #escolinhas .school-summary-card { min-height: 240px; }
  #escolinhas .school-management-status { grid-template-columns: 42px minmax(0,1fr); padding: 20px; }
  #escolinhas .school-management-status-icon { width: 42px; height: 42px; }
  #escolinhas .school-management-status-art { display: none; }
}

/* Escolinhas approved mockup refinements */
#escolinhas .schools-hero-panel {
  position: relative;
  min-height: 240px;
  height: clamp(240px, 18vw, 260px);
  padding: 26px 30px;
  border-radius: 16px;
}

#escolinhas .schools-hero-panel > div {
  position: relative;
  z-index: 2;
}

#escolinhas .schools-hero-sport-art {
  position: absolute;
  z-index: 1;
  right: -12px;
  bottom: -14px;
  width: min(44%, 560px);
  height: auto;
  fill: none;
  stroke: #d7eee5;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .12;
  pointer-events: none;
}

#escolinhas .school-metric {
  min-height: 92px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border-left: 4px solid #f7b733;
  border-radius: 14px;
}

#escolinhas .school-metric::before { content: none; }

#escolinhas .school-metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
}

#escolinhas .school-metric-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#escolinhas .school-metric > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

#escolinhas .school-metric > div > span {
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.2;
}

#escolinhas .school-metric > div > strong {
  font-size: 1.65rem;
  line-height: 1.05;
}

#escolinhas .front-overview-panel {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(11,63,54,.98), rgba(8,121,79,.95));
}

#escolinhas .front-overview-panel .front-metric-grid {
  margin-bottom: 14px;
}

#escolinhas .workspace-menu-panel {
  padding: 16px;
  background: rgba(255,255,255,.07);
}

#escolinhas .front-workbench-top {
  grid-template-columns: minmax(190px,.3fr) minmax(0,1fr);
  gap: 16px;
}

#escolinhas .front-action-pill {
  position: relative;
  min-height: 68px;
  padding: 10px 28px 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.11);
}

#escolinhas .front-action-pill::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 50%;
  color: rgba(255,255,255,.72);
  font-size: 1.25rem;
  transform: translateY(-50%);
}

#escolinhas .workspace-option-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(247,183,51,.65);
  border-radius: 50%;
}

#escolinhas #schoolOperationalOverview {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

#escolinhas .school-summary-card > header {
  align-items: flex-start;
  gap: 12px;
}

#escolinhas .school-summary-card h3 {
  flex: 1 1 auto;
  line-height: 1.15;
}

#escolinhas .school-summary-link {
  white-space: nowrap;
  flex: 0 0 auto;
}

#escolinhas .school-summary-body .administrative-summary-icon {
  width: 50px;
  height: 50px;
}

#escolinhas .school-summary-body .administrative-summary-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#escolinhas .school-management-status-art {
  width: 160px;
  height: 78px;
  border: 0;
  border-radius: 0;
  background: none;
  fill: none;
  stroke: #0f5f48;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .2;
}

@media (max-width: 1200px) {
  #escolinhas #schoolOperationalOverview { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
  #escolinhas .front-quick-actions { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  #escolinhas .schools-hero-panel {
    height: auto;
    min-height: 0;
    padding: 24px 20px;
  }
  #escolinhas .schools-hero-sport-art { width: 82%; opacity: .08; }
  #escolinhas .school-metric { min-height: 86px; }
  #escolinhas .front-workbench-top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  #escolinhas #schoolOperationalOverview { grid-template-columns: minmax(0,1fr); }
  #escolinhas .school-summary-card > header { align-items: flex-start; }
}

/* Campeonatos approved mockup correction */
#campeonatos > .content-grid {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 24px;
}

#campeonatos > .content-grid > * { min-width: 0; }
#campeonatos > .content-grid > :is(.front-overview-panel, #championshipOperationalOverview, .championship-management-status, .wide) { grid-column: 1 / -1; }
#campeonatos > .content-grid > .form-panel { grid-column: span 6; }

#campeonatos .championship-directory-header {
  align-items: center;
  gap: 16px;
}

#campeonatos .championship-directory-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

#campeonatos .championship-list {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

#campeonatos .championship-list.layout-list {
  grid-template-columns: 1fr;
}

#campeonatos .championship-list .championship-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-content: start;
}

#campeonatos .championship-list.layout-grid .championship-card header {
  align-items: flex-start;
}

#campeonatos .championship-list.layout-grid .championship-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#campeonatos .championship-list.layout-grid .tag-row {
  display: flex;
  flex-wrap: wrap;
}

#campeonatos .championship-list.layout-grid .notice-link,
#campeonatos .championship-list.layout-grid .championship-card > p {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1024px) {
  #campeonatos .championship-list.layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#campeonatos .front-overview-panel {
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(11,63,54,.98), rgba(8,121,79,.95));
}

#campeonatos .championship-desktop-context-nav {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(11,63,54,.05);
}

#campeonatos .championship-desktop-context-nav > span {
  margin: 0 6px 0 10px;
  color: #64748b;
  font-size: .75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#campeonatos .championship-desktop-context-nav button {
  min-height: 36px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  color: #315056;
  background: transparent;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

#campeonatos .championship-desktop-context-nav button:hover,
#campeonatos .championship-desktop-context-nav button:focus-visible,
#campeonatos .championship-desktop-context-nav button.active {
  outline: none;
  color: #0f5f48;
  background: #eaf6f0;
}

#campeonatos .front-overview-panel .front-metric-grid {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}

#campeonatos .championship-metric-card {
  min-width: 0;
  min-height: 96px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-left: 4px solid #f7b733;
  border-radius: 14px;
  background: rgba(255,255,255,.13);
  color: #fff;
}

#campeonatos .championship-metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
}

#campeonatos .championship-metric-icon svg,
#campeonatos .championship-summary-body .administrative-summary-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#campeonatos .championship-metric-card > div { min-width: 0; display: grid; gap: 1px; }
#campeonatos .championship-metric-card span { font-size: .76rem; font-weight: 750; line-height: 1.2; }
#campeonatos .championship-metric-card strong { font-size: 1.65rem; line-height: 1.05; }
#campeonatos .championship-metric-card small { color: rgba(255,255,255,.74); font-size: .72rem; line-height: 1.25; }

#campeonatos .workspace-menu-panel {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
}

#campeonatos .front-workbench-top {
  grid-template-columns: minmax(210px,.3fr) minmax(0,1fr);
  gap: 16px;
}

#campeonatos .front-quick-actions {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}

#campeonatos .front-action-pill {
  position: relative;
  min-width: 0;
  min-height: 68px;
  padding: 10px 28px 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.11);
}

#campeonatos .front-action-pill::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 50%;
  color: rgba(255,255,255,.72);
  font-size: 1.25rem;
  transform: translateY(-50%);
}

#campeonatos .workspace-option-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(247,183,51,.65);
  border-radius: 50%;
}

#campeonatos .workspace-option-copy,
#campeonatos .workspace-option-copy :is(strong,small) {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

#campeonatos #championshipOperationalOverview {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 20px;
}

#campeonatos .championship-summary-card {
  min-width: 0;
  min-height: 250px;
  padding: 22px 24px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.07);
}

#campeonatos .championship-summary-card > header {
  min-width: 0;
  padding-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e8efed;
}

#campeonatos .championship-summary-card h3 {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  color: #0f172a;
  font-size: .98rem;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
}

#campeonatos .championship-summary-link {
  padding: 0;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #08794f;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}

#campeonatos .championship-summary-body {
  min-width: 0;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

#campeonatos .championship-summary-body .administrative-summary-icon { width: 50px; height: 50px; }
#campeonatos .championship-summary-body .administrative-summary-icon svg { width: 28px; height: 28px; }
#campeonatos .championship-summary-body h4 { margin: 2px 0 0; color: #0f172a; font-size: .94rem; line-height: 1.35; }
#campeonatos .championship-summary-body p { max-width: 250px; margin: 0; color: #64748b; font-size: .8rem; line-height: 1.45; overflow-wrap: normal; word-break: normal; }
#campeonatos .championship-summary-value { color: #0f5f48; font-size: 2rem; line-height: 1; }
#campeonatos .championship-summary-body .secondary-button { width: auto; min-width: 132px; min-height: 36px; margin-top: 4px; padding-inline: 14px; background: #f4faf7; }

#campeonatos .championship-management-status {
  min-height: 116px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 170px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #f3faf6;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#campeonatos .championship-management-status-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #0f5f48; color: #fff; font-weight: 900; }
#campeonatos .championship-management-status h2 { margin: 0 0 5px; font-size: 1.05rem; }
#campeonatos .championship-management-status p { margin: 0; color: #64748b; line-height: 1.5; }
#campeonatos .championship-management-status-art { width: 170px; height: 82px; justify-self: end; fill: none; stroke: #0f5f48; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .2; }

@media (max-width: 1200px) {
  #campeonatos #championshipOperationalOverview { grid-template-columns: repeat(2,minmax(280px,1fr)); }
  #campeonatos .front-quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  #sorteio .desktop-match-schedule { display: none; }
  #campeonatos .championship-desktop-context-nav { display: none; }
  #campeonatos > .content-grid { grid-template-columns: 1fr; gap: 16px; }
  #campeonatos > .content-grid > .form-panel { grid-column: 1; }
  #campeonatos .championship-directory-header { align-items: stretch; flex-direction: column; }
  #campeonatos .championship-directory-tools { width: 100%; justify-content: space-between; }
  #campeonatos .championship-directory-tools .primary-button { flex: 1; }
  #campeonatos .championship-list.layout-grid { grid-template-columns: 1fr; }
  #campeonatos .front-overview-panel .front-metric-grid,
  #campeonatos .front-quick-actions,
  #campeonatos #championshipOperationalOverview { grid-template-columns: minmax(0,1fr); }
  #campeonatos .front-workbench-top { grid-template-columns: 1fr; }
  #campeonatos .championship-management-status { grid-template-columns: 42px minmax(0,1fr); padding: 20px; }
  #campeonatos .championship-management-status-art { display: none; }
}

/* Locais esportivos management center */
#locais > .content-grid {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

#locais > .content-grid > * { min-width: 0; width: 100%; }

#locais .location-metric-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

#locais .location-metric-card {
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 18px;
  align-items: center;
  gap: 13px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.07);
}

#locais .location-metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f4ed;
  color: #08794f;
}

#locais .location-metric-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#locais .location-metric-card div { min-width: 0; display: grid; gap: 2px; }
#locais .location-metric-card small { color: #475569; font-size: .78rem; font-weight: 750; }
#locais .location-metric-card strong { color: #0f172a; font-size: 1.75rem; line-height: 1.05; }
#locais .location-metric-card div span { color: #64748b; font-size: .72rem; line-height: 1.3; }
#locais .location-metric-card > b { color: #94a3b8; font-size: 1.35rem; }

#locais > .content-grid > .panel.wide {
  min-height: 390px;
  padding: 24px;
  border-radius: 16px;
}

#locais .location-add-button { display: inline-flex; align-items: center; gap: 8px; }
#locais .location-add-button > span { font-size: 1.2rem; line-height: 1; }

#locais .location-filter-bar {
  grid-template-columns: minmax(210px,1.35fr) repeat(3,minmax(150px,1fr)) auto;
  padding: 16px;
  margin-bottom: 20px;
}

#locais .location-card-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 16px;
}

#locais .location-card {
  min-width: 0;
  min-height: 220px;
  padding: 20px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: start;
  gap: 14px;
  border-radius: 14px;
}

#locais .location-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f4ed;
  color: #08794f;
}

#locais .location-card-icon svg { width: 25px; height: 25px; }
#locais .location-card-copy { min-width: 0; display: grid; gap: 12px; }
#locais .location-card-copy > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#locais .location-card-copy header > div { min-width: 0; display: grid; gap: 3px; }
#locais .location-card-copy strong { color: #0f172a; font-size: 1rem; }
#locais .location-card-copy small,
#locais .location-card-copy p { color: #64748b; line-height: 1.4; }
#locais .location-card-copy p { margin: 0; font-size: .8rem; }
#locais .location-card-copy dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#locais .location-card-copy dl > div { padding: 9px 10px; border-radius: 8px; background: #f4faf7; }
#locais .location-card-copy dt { color: #64748b; font-size: .68rem; }
#locais .location-card-copy dd { margin: 3px 0 0; color: #0f172a; font-size: .78rem; font-weight: 750; }
#locais .location-card-copy footer { display: flex; flex-wrap: wrap; gap: 8px; }
#locais .location-card-copy footer button { min-height: 36px; }

#locais .location-empty-state {
  width: 100%;
  min-height: 280px;
  grid-column: 1 / -1;
  padding: 42px 24px;
}

#locais .location-empty-state .administrative-empty-icon { width: 60px; height: 60px; }
#locais .location-empty-state .administrative-empty-icon svg { width: 30px; height: 30px; }
#locais .location-empty-state > span:not(.administrative-empty-icon) { max-width: 520px; }

#locais .location-support-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}

#locais .location-support-card { min-height: 230px; padding: 22px; border-radius: 16px; }
#locais .location-support-empty { min-height: 130px; padding: 24px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; border: 1px dashed #bfd3cd; border-radius: 10px; background: #f8fcfa; text-align: center; }
#locais .location-support-empty strong { color: #0f172a; }
#locais .location-support-empty span { max-width: 440px; color: #64748b; font-size: .82rem; line-height: 1.45; }
#locais .location-usage-row { padding: 11px 4px; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 11px; border-bottom: 1px solid #e8efed; }
#locais .location-usage-row > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e5f4ed; color: #08794f; }
#locais .location-usage-row svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
#locais .location-usage-row div { display: grid; gap: 2px; }
#locais .location-usage-row small { color: #64748b; }

#locais .location-management-status {
  min-height: 116px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 180px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #f3faf6;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#locais .location-management-status-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #0f5f48; color: #fff; font-weight: 900; }
#locais .location-management-status h2 { margin: 0 0 5px; font-size: 1.05rem; }
#locais .location-management-status p { margin: 0; color: #64748b; line-height: 1.5; }
#locais .location-management-status-art { width: 180px; height: 84px; justify-self: end; fill: none; stroke: #0f5f48; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .2; }

@media (max-width: 1100px) {
  #locais .location-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #locais .location-filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #locais .location-support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  #locais > .content-grid { gap: 16px; }
  #locais .location-metric-grid,
  #locais .location-filter-bar,
  #locais .location-support-grid,
  #locais .location-card-grid { grid-template-columns: minmax(0,1fr); }
  #locais > .content-grid > .panel.wide { padding: 18px; }
  #locais .panel-header { align-items: stretch; }
  #locais .location-add-button { width: 100%; justify-content: center; }
  #locais .location-card { grid-template-columns: 1fr; }
  #locais .location-card-icon { margin-inline: auto; }
  #locais .location-card-copy dl { grid-template-columns: 1fr; }
  #locais .location-management-status { grid-template-columns: 42px minmax(0,1fr); padding: 20px; }
  #locais .location-management-status-art { display: none; }
}

/* Escolinhas access menu: approved light card layout */
#escolinhas .front-overview-panel {
  margin-block: 4px 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#escolinhas #schoolFrontMetrics {
  display: none;
}

#escolinhas #schoolFrontModules {
  width: 100%;
}

#escolinhas .school-access-menu {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

#escolinhas .school-access-heading {
  margin-bottom: 14px;
}

#escolinhas .school-access-heading > span {
  display: block;
  margin-bottom: 4px;
  color: #08794f;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

#escolinhas .school-access-heading h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.22rem;
  line-height: 1.2;
}

#escolinhas .school-access-heading p {
  margin: 0;
  color: #64748b;
  font-size: .86rem;
  line-height: 1.45;
}

#escolinhas .school-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

#escolinhas .school-access-card {
  min-width: 0;
  min-height: 142px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 15px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: 0 6px 18px rgba(11,63,54,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#escolinhas .school-access-card::after {
  content: none;
}

#escolinhas .school-access-card:hover,
#escolinhas .school-access-card.active {
  border-color: #8fc8b3;
  background: #fff;
  box-shadow: 0 10px 24px rgba(11,63,54,.11);
  transform: translateY(-2px);
}

#escolinhas .school-access-top {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 18px;
  align-items: start;
  gap: 10px;
}

#escolinhas .school-access-top > b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b3f36;
  color: #fff;
  font-size: .68rem;
}

#escolinhas .school-access-top > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#escolinhas .school-access-top strong {
  color: #0f172a;
  font-size: .92rem;
  line-height: 1.2;
}

#escolinhas .school-access-top small {
  color: #64748b;
  font-size: .7rem;
  line-height: 1.25;
}

#escolinhas .school-access-top i {
  color: #0b3f36;
  font-size: 1rem;
  font-style: normal;
  transition: transform .18s ease;
}

#escolinhas .school-access-card:hover .school-access-top i {
  transform: translateX(3px);
}

#escolinhas .school-access-detail {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  align-items: center;
  gap: 11px;
  color: #475569;
  font-size: .74rem;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

#escolinhas .school-access-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#escolinhas .school-access-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1180px) {
  #escolinhas .school-access-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #escolinhas .school-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #escolinhas .school-access-grid {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Equipes inscritas: approved directory layout */
#times > .content-grid {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

#times > .content-grid > * { min-width: 0; width: 100%; }

#times .team-metric-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

#times .team-metric-card {
  min-width: 0;
  min-height: 112px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 18px;
  align-items: center;
  gap: 13px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.07);
}

#times .team-metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#times .team-metric-card.yellow .team-metric-icon { background: #fff3d6; color: #a16207; }
#times .team-metric-card.red .team-metric-icon { background: #fee2e2; color: #dc2626; }
#times .team-metric-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#times .team-metric-card div { min-width: 0; display: grid; gap: 2px; }
#times .team-metric-card small { color: #475569; font-size: .78rem; font-weight: 750; }
#times .team-metric-card strong { color: #0f172a; font-size: 1.75rem; line-height: 1.05; }
#times .team-metric-card div span { color: #64748b; font-size: .72rem; }
#times .team-metric-card > b { color: #94a3b8; font-size: 1.35rem; }

#times .team-filter-panel,
#times .team-directory-panel {
  padding: 22px 24px;
  border-radius: 16px;
}

#times .team-filter-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#times .team-filter-heading > div,
#times .team-directory-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

#times .team-filter-heading h2,
#times .team-directory-title h2 { margin: 0; font-size: 1.05rem; }

#times .team-heading-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#times .team-heading-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#times .team-clear-filters { min-height: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; }

#times .team-filter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

#times .team-filter-grid label {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  border: 1px solid #e4eeeb;
  border-radius: 12px;
  background: #fbfefd;
  font-size: .76rem;
}

#times .team-filter-grid label:nth-child(1),
#times .team-filter-grid label:nth-child(2),
#times .team-filter-grid label:nth-child(3),
#times .team-filter-grid label:nth-child(4) {
  grid-column: span 3;
}

#times .team-filter-grid :is(input,select) { width: 100%; }
#times .team-search-shell { position: relative; display: block; }
#times .team-search-shell input { padding-right: 40px; }
#times .team-search-shell svg { position: absolute; right: 13px; top: 50%; width: 19px; height: 19px; fill: none; stroke: #64748b; stroke-width: 1.8; transform: translateY(-50%); pointer-events: none; }

#times .team-directory-heading {
  align-items: center;
  margin-bottom: 18px;
}

#times .team-directory-title > div { display: grid; gap: 3px; }
#times .team-directory-title p { margin: 0; color: #64748b; font-size: .78rem; }
#times .team-directory-tools { display: flex; align-items: center; gap: 10px; }
#times .team-directory-tools select { min-width: 150px; min-height: 38px; }
:is(#times, #campeonatos) .team-view-toggle { display: flex; gap: 6px; }
:is(#times, #campeonatos) .team-view-toggle button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d7e3e3; border-radius: 8px; background: #fff; color: #0b3f36; }
:is(#times, #campeonatos) .team-view-toggle button.active { border-color: #08794f; background: #08794f; color: #fff; }
:is(#times, #campeonatos) .team-view-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

#times .team-grid.layout-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
#times .team-grid.layout-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 14px; }
#times .team-grid.layout-list .team-card { width: 100%; }
#times .team-card.is-selected {
  border-color: #08794f;
  box-shadow: 0 14px 34px rgba(8, 121, 79, .16);
}

#times .technician-team-detail {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  overflow: hidden;
}

#times .technician-team-detail[hidden] { display: none; }

#times .technician-team-detail-header {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
}

#times .team-crest {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #08794f;
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 58px;
}

#times .team-crest.has-image {
  background: #f8fbfa;
  border: 1px solid #d7e3e3;
}

#times .team-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#times .technician-team-detail-header h2 {
  margin: 2px 0;
  color: #0f172a;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
}

#times .technician-team-detail-header p {
  margin: 0;
  color: #64748b;
}

#times .technician-team-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#times .technician-team-edit-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(8, 121, 79, .18);
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbf9 0%, #fff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

#times .technician-team-edit-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#times .technician-team-edit-card h3 {
  margin: 4px 0 4px;
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.05;
}

#times .technician-team-edit-card p {
  margin: 0;
  color: var(--muted);
}

#times .technician-team-edit-form {
  gap: 18px;
}

#times .technician-team-edit-logo-field {
  min-height: 150px;
}

#times .technician-team-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

#times .technician-team-kpis article,
#times .technician-team-feature,
#times .technician-roster-card,
#times .technician-document-row {
  min-width: 0;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fff;
}

#times .technician-team-kpis article {
  padding: 14px;
}

#times .technician-team-kpis strong {
  display: block;
  color: #0b3f36;
  font-size: 1.45rem;
  line-height: 1;
}

#times .technician-team-kpis span,
#times .technician-team-feature span,
#times .technician-roster-card span,
#times .technician-document-row span {
  color: #64748b;
  overflow-wrap: anywhere;
}

#times .technician-team-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

#times .technician-team-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #d7e3e3;
  border-radius: 999px;
  background: #fff;
  color: #0b3f36;
  font-weight: 800;
  white-space: nowrap;
  min-width: 0;
}

#times .technician-team-tab svg {
  width: 17px;
  height: 17px;
}

#times .technician-team-tab.active {
  border-color: #f7b733;
  background: #08794f;
  color: #fff;
}

#times .technician-team-panel {
  display: grid;
  gap: 14px;
}

#times .technician-team-panel[hidden] { display: none; }

#times .technician-team-panel-grid,
#times .technician-roster-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

#times .technician-team-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#times .technician-team-panel-heading h3,
#times .technician-team-feature h3 {
  margin: 0;
  color: #0f172a;
}

#times .technician-team-feature {
  padding: 16px;
  display: grid;
  gap: 10px;
}

#times .technician-team-invite-feature {
  background: linear-gradient(180deg, #f8fffc 0%, #ffffff 100%);
  border-color: rgba(4, 120, 87, 0.22);
}

#times .technician-team-invite-feature .primary-button {
  justify-self: start;
}

#times .technician-team-feature strong {
  color: #0b3f36;
  font-size: 1.15rem;
}

#times .technician-roster-card,
#times .technician-document-row {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#times .technician-roster-card > div,
#times .technician-document-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1;
}

#times .technician-roster-card strong,
#times .technician-document-row strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

#times .compact-empty {
  min-height: 150px;
  padding: 22px;
  border: 1px dashed #b9d3cb;
  background: #fbfefd;
}

#times .team-empty-state {
  width: 100%;
  min-height: 260px;
  padding: 36px 24px;
  border: 1px solid #e5eeeb !important;
  background: #fbfefd !important;
}

#times .team-empty-state .administrative-empty-icon { width: 58px; height: 58px; }
#times .team-empty-state .administrative-empty-icon svg { width: 29px; height: 29px; }
#times .team-empty-state .administrative-empty-action { width: auto; background: #08794f; }
#times .team-empty-state .administrative-empty-action span { color: inherit; }

#times .team-help-strip {
  min-height: 90px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #eef9f4;
}

#times .team-help-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #0f5f48; color: #fff; font-weight: 900; }
#times .team-help-strip h2 { margin: 0 0 3px; font-size: .98rem; }
#times .team-help-strip p { margin: 0; color: #64748b; font-size: .8rem; }
#times .team-help-strip button { min-height: 38px; background: #fff; }

#times.technician-teams-mode > .content-grid {
  gap: 18px;
}

#times .technician-teams-shell {
  display: grid;
  gap: 18px;
}

#times .technician-teams-page-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d7e3e3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#times .technician-teams-page-header h2 {
  margin: 2px 0 4px;
  color: #0f172a;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1;
}

#times .technician-teams-page-header p {
  margin: 0;
  color: #52647a;
  font-weight: 750;
}

#times .technician-teams-page-header .primary-button {
  min-width: 150px;
  min-height: 44px;
}

#times .technician-teams-metrics .team-metric-card {
  min-height: 108px;
}

#times .technician-teams-filters {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(145px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#times .technician-teams-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: .76rem;
  font-weight: 800;
}

#times .technician-teams-filters :is(input, select) {
  width: 100%;
  min-height: 40px;
}

#times .technician-teams-filters .secondary-button {
  min-height: 40px;
  padding-inline: 14px;
  white-space: nowrap;
}

#times .technician-teams-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

#times .technician-teams-list-panel,
#times .technician-teams-next-actions,
#times .technician-teams-empty {
  min-width: 0;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#times .technician-teams-list-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

#times .technician-teams-list-panel > header,
#times .technician-teams-next-actions > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#times .technician-teams-list-panel h3,
#times .technician-teams-next-actions h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.12rem;
}

#times .technician-teams-list-panel p,
#times .technician-teams-next-actions p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: .8rem;
}

#times .technician-teams-next-actions {
  padding: 18px;
  display: grid;
  gap: 14px;
}

#times .technician-teams-next-actions > header > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f6ef;
  color: #08794f;
  font-size: .9rem;
  font-weight: 900;
}

#times .technician-next-action-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

#times .technician-next-action-item {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe8e6;
  border-radius: 14px;
  background: #fbfefd;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#times .technician-next-action-item:hover {
  border-color: #9fcac0;
  box-shadow: 0 10px 22px rgba(11,63,54,.08);
  transform: translateY(-1px);
}

#times .technician-next-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f6ef;
  color: #08794f;
}

#times .technician-next-action-icon svg {
  width: 19px;
  height: 19px;
}

#times .technician-next-action-item strong,
#times .technician-next-action-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

#times .technician-next-action-item strong {
  color: #0f172a;
  font-size: .9rem;
  line-height: 1.2;
}

#times .technician-next-action-item small {
  margin-top: 3px;
  color: #64748b;
  font-size: .75rem;
  font-weight: 750;
}

#times .technician-next-action-item b {
  color: #08794f;
  font-size: .78rem;
  white-space: nowrap;
}

#times .technician-next-action-empty {
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #bdd6d1;
  border-radius: 14px;
  color: #52647a;
  text-align: center;
}

#times .technician-next-action-empty strong {
  color: #0f172a;
}

#times .technician-team-row-list {
  display: grid;
  gap: 12px;
}

#times .technician-team-row {
  min-width: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(245px, .85fr) minmax(0, 1.55fr) minmax(170px, auto);
  align-items: stretch;
  gap: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #fbfefd;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#times .technician-team-row:hover {
  border-color: #9fcac0;
  box-shadow: 0 12px 26px rgba(11,63,54,.08);
  transform: translateY(-1px);
}

#times .technician-team-row-main {
  height: 100%;
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

#times .technician-team-row-main:hover {
  background: #f2faf7;
}

#times .technician-team-row-crest {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 13px;
}

#times .technician-team-row-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#times .technician-team-row-title strong {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

#times .technician-team-row-title small {
  color: #64748b;
  font-size: .76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#times .technician-team-row-title em {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef9f4;
  color: #08794f;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
}

#times .technician-team-row-status {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

#times .technician-team-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#times .technician-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4f6;
  color: #475569;
  font-size: .75rem;
  font-weight: 900;
}

#times .technician-status-badge.accepted {
  background: #e8f6ef;
  color: #08794f;
}

#times .technician-status-badge.pending,
#times .technician-status-badge.yellow {
  background: #fff4d7;
  color: #8a5c00;
}

#times .technician-status-badge.blue {
  background: #e8f2ff;
  color: #1d4f8f;
}

#times .technician-status-badge.rejected {
  background: #ffe8e8;
  color: #a32525;
}

#times .technician-team-row-data {
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: stretch;
}

#times .technician-team-row-data div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

#times .technician-team-row-data dt {
  color: #64748b;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

#times .technician-team-row-data dd {
  margin: 0;
  min-width: 0;
  color: #0f172a;
  font-size: .86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

#times .technician-team-row-data dd.status-text {
  color: #0b3f36;
}

#times .technician-team-progress {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  gap: 8px;
  border: 1px solid #dce8e7;
  border-radius: 12px;
  background: #fff;
}

#times .technician-team-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: .76rem;
  font-weight: 900;
}

#times .technician-team-progress progress {
  width: 100%;
  height: 8px;
  accent-color: #08794f;
}

#times .technician-team-progress small {
  color: #64748b;
  font-size: .74rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

#times .technician-team-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#times .technician-team-row-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f7f5;
  color: #52647a;
  font-size: .72rem;
  font-weight: 800;
}

#times .technician-team-row-actions {
  display: grid;
  align-content: start;
  gap: 8px;
}

#times .technician-team-row-actions :is(.primary-button, .secondary-button, .ghost-button) {
  width: 100%;
  justify-content: center;
}

#times .technician-team-row-actions .ghost-button {
  min-height: 38px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-weight: 900;
}

#times .technician-team-row-actions .ghost-button:hover {
  border-color: #9fcac0;
  color: #0b3f36;
  background: #f8fbfa;
}

#times .technician-roster-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d7e3e3;
  border-radius: 14px;
  background: #f8fbfa;
}

#times .technician-roster-add-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

#times .technician-roster-add-form input {
  width: 100%;
  min-height: 44px;
}

#times .technician-roster-lookup-slot {
  grid-column: 1 / -1;
  min-width: 0;
}

#times .technician-roster-lookup-result {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe1de;
  border-radius: 12px;
  background: #fff;
  color: #334155;
}

#times .technician-roster-lookup-result.error {
  border-color: #f2b8b5;
  background: #fff7f6;
  color: #9f1239;
  font-weight: 900;
}

#times .technician-roster-lookup-result strong,
#times .technician-roster-lookup-result small {
  display: block;
  overflow-wrap: anywhere;
}

#times .technician-roster-lookup-result strong {
  color: #0f172a;
  font-size: .98rem;
  line-height: 1.2;
}

#times .technician-roster-lookup-result small {
  margin-top: 2px;
  color: #64748b;
  font-weight: 800;
}

#times .technician-teams-empty {
  min-height: 360px;
  padding: 34px 24px;
  display: grid;
  place-items: center;
  text-align: center;
}

#times .technician-teams-empty > * {
  max-width: 720px;
}

#times .technician-teams-empty h2 {
  margin: 10px 0 6px;
  color: #0f172a;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

#times .technician-teams-empty p {
  margin: 0 0 16px;
  color: #52647a;
}

#times .technician-teams-empty ol {
  width: min(760px, 100%);
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

#times .technician-teams-empty li {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 6px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fbfefd;
  color: #0f172a;
  font-weight: 800;
}

#times .technician-teams-empty li strong {
  color: #08794f;
  font-size: .72rem;
}

#times .technician-teams-filter-empty {
  padding: 28px;
  display: grid;
  gap: 5px;
  place-items: center;
  border: 1px dashed #b9d3cb;
  border-radius: 12px;
  background: #fbfefd;
  text-align: center;
}

#times .technician-team-create-form {
  order: 2;
}

#times .technician-team-create-form:not([hidden]) {
  display: grid;
}

#times .technician-team-create-page {
  display: grid;
  gap: 20px;
  padding: 24px;
}

#times .technician-team-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

#times .technician-team-create-header h2 {
  margin: 4px 0 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

#times .technician-team-create-header p,
#times .technician-team-create-step p,
#times .technician-team-create-progress li,
#times .technician-team-logo-field em {
  color: var(--muted);
}

#times .technician-team-create-progress {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f7fbf9;
}

#times .technician-team-create-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

#times .technician-team-create-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dbe8e4;
}

#times .technician-team-create-progress progress::-webkit-progress-bar {
  background: #dbe8e4;
}

#times .technician-team-create-progress progress::-webkit-progress-value,
#times .technician-team-create-progress progress::-moz-progress-bar {
  background: var(--green);
  border-radius: 999px;
}

#times .technician-team-create-progress ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}

#times .technician-team-create-progress li.active,
#times .technician-team-create-progress li.done {
  color: var(--green);
}

#times .technician-team-create-notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7fbf9;
  font-weight: 800;
}

#times .technician-team-create-notice.error {
  border-color: rgba(185, 28, 28, .24);
  background: #fff1f2;
  color: #991b1b;
}

#times .technician-team-create-notice.info {
  border-color: rgba(6, 83, 74, .2);
  color: var(--green-dark);
}

#times .technician-team-create-form {
  display: grid;
  gap: 20px;
}

#times .technician-team-create-step {
  display: grid;
  gap: 14px;
}

#times .technician-team-create-step h3 {
  margin: 0;
  font-size: 1.25rem;
}

#times .technician-team-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#times .technician-team-create-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-weight: 800;
  color: var(--text);
}

#times .technician-team-create-grid .full-field,
#times .technician-team-logo-field {
  grid-column: 1 / -1;
}

#times .technician-team-create-grid :is(input, select, textarea) {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

#times .technician-team-create-grid textarea {
  min-height: 96px;
  padding-block: 12px;
  resize: vertical;
}

#times .technician-team-logo-field {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 170px;
  border: 1px dashed rgba(4, 120, 87, .35);
  border-radius: 14px;
  background: #f7fbf9;
  cursor: pointer;
  text-align: center;
}

#times .technician-team-logo-field > span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #e5f6ef;
  color: var(--green);
  overflow: hidden;
}

#times .technician-team-logo-field img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#times .technician-team-logo-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#times .technician-team-create-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

#times .technician-team-create-review div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbfa;
}

#times .technician-team-create-review dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

#times .technician-team-create-review dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 900;
}

#times .technician-team-create-actions,
#times .technician-team-create-success {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#times .technician-team-create-success {
  justify-content: flex-start;
  padding: 8px 0 0;
}

#times .technician-team-create-success :is(.primary-button, .secondary-button) {
  min-width: 150px;
  min-height: 44px;
}

.detail-modal.technician-detail-modal > header.title-only {
  min-height: 0;
  padding: 22px 24px 12px;
}

.detail-modal.technician-detail-modal > header.title-only h2 {
  max-width: 680px;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1.14;
}

.detail-modal.technician-detail-modal > header.title-only p {
  max-width: 680px;
  margin-top: 6px;
}

.detail-modal.technician-detail-modal:has(.technician-team-create-success) {
  max-width: 760px;
}

.detail-modal.technician-detail-modal:has(.technician-team-create-success) > header {
  min-height: 0;
  padding: 22px 24px 12px;
}

.detail-modal.technician-detail-modal:has(.technician-team-create-success) > header h2 {
  max-width: 680px;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1.14;
}

.detail-modal.technician-detail-modal:has(.technician-team-create-success) > header p {
  max-width: 680px;
  margin-top: 6px;
}

#times .technician-team-checklist {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

#times .technician-team-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

#times .technician-team-checklist li.done {
  color: var(--green-dark);
}

#times #technicianTeamsDetailMount .technician-team-detail {
  margin-top: 0;
}

@media (max-width: 1000px) {
  #times .team-metric-grid,
  #times .team-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #times .team-filter-grid label:nth-child(1),
  #times .team-filter-grid label:nth-child(2),
  #times .team-filter-grid label:nth-child(3),
  #times .team-filter-grid label:nth-child(4) {
    grid-column: span 1;
  }
  #times .technician-teams-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #times .technician-teams-filters .secondary-button {
    justify-self: start;
  }
  #times .technician-teams-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  #times .technician-team-row {
    grid-template-columns: minmax(0, 1fr);
  }
  #times .technician-team-row-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #times .technician-team-row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #times .technician-team-kpis,
  #times .technician-team-panel-grid,
  #times .technician-roster-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  #times .technician-team-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #times > .content-grid { gap: 16px; }
  #times .team-metric-grid,
  #times .team-filter-grid { grid-template-columns: minmax(0,1fr); }
  #times .technician-teams-filters,
  #times .technician-team-row-data,
  #times .technician-teams-empty ol {
    grid-template-columns: minmax(0, 1fr);
  }
  #times .technician-team-row {
    padding: 12px;
  }
  #times .technician-team-row-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  #times .technician-team-row-actions :is(.primary-button, .secondary-button, .ghost-button) {
    width: 100%;
  }
  #times .technician-team-create-page {
    padding: 18px;
  }
  #times .technician-team-create-header,
  #times .technician-team-create-actions,
  #times .technician-team-create-success {
    align-items: stretch;
    flex-direction: column;
  }
  #times .technician-team-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  #times .technician-team-tab {
    flex: 0 0 auto;
  }
  #times .technician-roster-add-form {
    grid-template-columns: minmax(0, 1fr);
  }
  #times .technician-team-create-progress ol,
  #times .technician-team-create-grid,
  #times .technician-team-create-review {
    grid-template-columns: minmax(0, 1fr);
  }
  #times .technician-team-create-actions :is(.primary-button, .secondary-button),
  #times .technician-team-create-success :is(.primary-button, .secondary-button) {
    width: 100%;
  }
  #times .technician-teams-empty {
    min-height: 0;
    padding: 28px 18px;
  }
  #times .team-filter-panel,
  #times .team-directory-panel { padding: 18px; }
  #times .team-filter-heading,
  #times .team-directory-heading { align-items: stretch; flex-direction: column; }
  #times .team-clear-filters { align-self: flex-start; }
  #times .team-directory-tools { width: 100%; justify-content: space-between; }
  #times .team-directory-tools select { min-width: 0; flex: 1; }
  #times .team-grid.layout-grid { grid-template-columns: minmax(0,1fr); }
  #times .team-empty-state { min-height: 0; padding: 30px 18px; }
  #times .team-help-strip { grid-template-columns: 40px minmax(0,1fr); }
  #times .team-help-strip button { grid-column: 2; justify-self: start; }
  #times .technician-team-detail { padding: 18px; }
  #times .technician-team-detail-header {
    grid-template-columns: 48px minmax(0,1fr);
  }
  #times .technician-team-edit-card {
    padding: 14px;
    border-radius: 14px;
  }
  #times .technician-team-edit-card > header {
    flex-direction: column;
  }
  #times .team-crest {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  #times .technician-team-detail-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }
  #times .technician-team-kpis,
  #times .technician-team-panel-grid,
  #times .technician-roster-grid {
    grid-template-columns: minmax(0,1fr);
  }
  #times .technician-team-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }
  #times .technician-team-panel-heading button,
  #times .technician-team-feature button {
    width: 100%;
  }
}

/* Technician championships workspace */
#campeonatos.technician-championship-mode > .content-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

#campeonatos .technician-championships-shell {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#campeonatos .technician-championship-section,
#campeonatos .technician-championship-empty,
#campeonatos .technician-championship-detail-card {
  min-width: 0;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(11,63,54,.07);
}

#campeonatos .technician-championship-section header p,
#campeonatos .technician-championship-filter-empty span,
#campeonatos .technician-championship-empty p,
#campeonatos .technician-championship-lite-card p,
#campeonatos .technician-championship-detail-header p,
#campeonatos .technician-championship-detail-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.42;
}

#campeonatos .technician-championship-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#campeonatos .technician-championship-metric {
  min-height: 112px;
  padding: 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 13px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: 0 10px 24px rgba(11,63,54,.07);
  cursor: pointer;
}

#campeonatos .technician-championship-metric span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#campeonatos .technician-championship-metric small,
#campeonatos .technician-championship-metric em {
  color: #64748b;
  font-size: .78rem;
  font-style: normal;
}

#campeonatos .technician-championship-metric strong {
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1;
}

#campeonatos .technician-championship-filters {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(5, minmax(128px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.06);
}

#campeonatos .technician-championship-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: .76rem;
  font-weight: 850;
}

#campeonatos .technician-championship-filters :is(input, select) {
  width: 100%;
  min-height: 40px;
}

#campeonatos .technician-championship-section {
  padding: 20px;
  display: grid;
  gap: 15px;
}

#campeonatos .technician-championship-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#campeonatos .technician-championship-section h3,
#campeonatos .technician-championship-lite-card h3,
#campeonatos .technician-championship-detail-card h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.08rem;
}

#campeonatos .technician-championship-card-grid,
#campeonatos .technician-championship-lite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#campeonatos .technician-championship-card,
#campeonatos .technician-championship-lite-card {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fbfefd;
  box-shadow: 0 6px 18px rgba(11,63,54,.05);
}

#campeonatos .technician-championship-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#campeonatos .technician-championship-card h3 {
  margin: 8px 0 5px;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#campeonatos .technician-championship-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.35;
}

#campeonatos .technician-championship-team-line,
#campeonatos .technician-championship-standings,
#campeonatos .technician-championship-lite-card dl,
#campeonatos .technician-championship-detail-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

#campeonatos .technician-championship-team-line {
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(86px, .7fr));
}

#campeonatos .technician-championship-team-line span,
#campeonatos .technician-championship-standings div,
#campeonatos .technician-championship-lite-card dl div,
#campeonatos .technician-championship-detail-card dl div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1ece9;
  border-radius: 10px;
  background: #fff;
}

#campeonatos .technician-championship-standings,
#campeonatos .technician-championship-lite-card dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#campeonatos .technician-championship-team-line small,
#campeonatos .technician-championship-standings dt,
#campeonatos .technician-championship-lite-card dt,
#campeonatos .technician-championship-detail-card dt {
  color: #64748b;
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

#campeonatos .technician-championship-team-line strong,
#campeonatos .technician-championship-standings dd,
#campeonatos .technician-championship-lite-card dd,
#campeonatos .technician-championship-detail-card dd {
  margin: 3px 0 0;
  color: #0f172a;
  font-weight: 900;
  overflow-wrap: anywhere;
}

#campeonatos .technician-championship-next {
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  border: 1px dashed #bdd6cf;
  border-radius: 12px;
  background: #f5fbf8;
}

#campeonatos .technician-championship-next div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#campeonatos .technician-championship-next small,
#campeonatos .technician-championship-next span {
  color: #64748b;
  font-size: .78rem;
}

#campeonatos .technician-championship-next strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

#campeonatos .technician-championship-card footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

#campeonatos .technician-championship-lite-card .primary-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

#campeonatos .technician-championship-team-awaiting {
  display: grid;
  gap: 10px;
}

#campeonatos .technician-championship-team-awaiting article {
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e1ece9;
  border-radius: 12px;
  background: #fbfefd;
}

#campeonatos .technician-championship-team-awaiting small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}

#campeonatos .technician-championship-empty,
#campeonatos .technician-championship-filter-empty {
  min-height: 280px;
  padding: 32px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

#campeonatos .technician-championship-empty h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

#campeonatos .technician-championship-empty > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#campeonatos .technician-championship-empty > div .secondary-button.compact-button {
  width: auto;
  min-width: 148px;
  padding-inline: 18px;
  justify-content: center;
}

#campeonatos .technician-championship-filter-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  border: 1px dashed #bdd6cf;
  border-radius: 14px;
  background: #fbfefd;
}

#campeonatos .technician-championship-detail {
  display: grid;
  gap: 18px;
}

#campeonatos .technician-championship-detail-header {
  padding: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(11,63,54,.07);
}

#campeonatos .technician-championship-detail-header h2 {
  margin: 3px 0;
  color: #0f172a;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.05;
}

#campeonatos .technician-championship-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#campeonatos .technician-championship-detail-card {
  padding: 18px;
}

#campeonatos .technician-championship-detail-card.wide {
  grid-column: 1 / -1;
}

#campeonatos .technician-championship-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#campeonatos .technician-championship-game-list {
  display: grid;
  gap: 10px;
}

#campeonatos .technician-championship-game-row {
  width: 100%;
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #e1ece9;
  border-radius: 12px;
  background: #fbfefd;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

#campeonatos .technician-championship-game-row span:first-child {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f4ed;
  color: #08794f;
}

#campeonatos .technician-championship-game-row small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}

@media (max-width: 1100px) {
  #campeonatos .technician-championship-metrics,
  #campeonatos .technician-championship-card-grid,
  #campeonatos .technician-championship-lite-grid,
  #campeonatos .technician-championship-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #campeonatos .technician-championship-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #campeonatos .technician-championship-section > header {
    align-items: stretch;
    flex-direction: column;
  }

  #campeonatos .technician-championship-card footer .primary-button,
  #campeonatos .technician-championship-card footer .secondary-button,
  #campeonatos .technician-championship-empty .primary-button,
  #campeonatos .technician-championship-empty .secondary-button {
    width: 100%;
  }

  #campeonatos .technician-championship-metrics,
  #campeonatos .technician-championship-card-grid,
  #campeonatos .technician-championship-lite-grid,
  #campeonatos .technician-championship-filters,
  #campeonatos .technician-championship-detail-grid,
  #campeonatos .technician-championship-stat-grid,
  #campeonatos .technician-championship-team-line,
  #campeonatos .technician-championship-standings,
  #campeonatos .technician-championship-lite-card dl,
  #campeonatos .technician-championship-card footer {
    grid-template-columns: minmax(0, 1fr);
  }

  #campeonatos .technician-championship-metric {
    min-height: 96px;
    padding: 15px;
  }

  #campeonatos .technician-championship-section,
  #campeonatos .technician-championship-card,
  #campeonatos .technician-championship-lite-card,
  #campeonatos .technician-championship-detail-card {
    padding: 16px;
    border-radius: 14px;
  }

  #campeonatos .technician-championship-team-awaiting article,
  #campeonatos .technician-championship-detail-header,
  #campeonatos .technician-championship-game-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #campeonatos .technician-championship-detail-header {
    align-items: start;
  }

  #campeonatos .technician-championship-game-row b {
    justify-self: start;
  }
}

/* Partidas e classificação: complete sports workspace */
#sorteio {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

#sorteio.technician-games-mode {
  display: block;
}

#sorteio.technician-games-mode > :not(#technicianGamesModule) {
  display: none !important;
}

#technicianGamesModule {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 18px;
}

.technician-games-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.technician-games-header h2 {
  margin: 4px 0 6px;
  color: #101828;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.98;
}

.technician-games-header p,
.technician-games-card header p,
.technician-games-compact-empty span,
.technician-games-empty p {
  margin: 0;
  color: #5b6f86;
}

.technician-games-header .primary-button {
  min-height: 44px;
  padding-inline: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.technician-games-header .primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.technician-games-selector {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  border: 1px solid #d9e8e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.technician-games-selector label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #102136;
  font-weight: 850;
}

.technician-games-selector select {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #cadcd7;
  border-radius: 10px;
  background: #fff;
  color: #102136;
  font: inherit;
  font-weight: 800;
}

.technician-games-selector small {
  color: #5b6f86;
  font-weight: 750;
}

.technician-games-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.technician-games-metric {
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  border: 1px solid #d9e8e3;
  border-radius: 14px;
  background: #fff;
  color: #102136;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.technician-games-metric > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.technician-games-metric small,
.technician-games-metric em {
  color: #5b6f86;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
}

.technician-games-metric strong {
  color: #102136;
  font-size: 1.65rem;
  line-height: 1;
}

.technician-games-metric b[aria-hidden="true"] {
  color: #6c8b86;
  font-size: 1.35rem;
}

.technician-games-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.technician-games-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.technician-games-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d9e8e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.technician-games-card.wide {
  grid-column: span 2;
}

.technician-games-card header {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.technician-games-card h3 {
  margin: 0 0 3px;
  color: #101828;
  font-size: 1.08rem;
}

.technician-games-card .text-button {
  min-width: max-content;
  color: #08794f;
  font-size: 0.82rem;
  font-weight: 850;
}

.technician-next-match-card {
  min-height: 300px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 18px;
  border: 1px solid #d9e8e3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fcfa 0%, #edf7f3 100%);
}

.technician-next-match-card > small {
  color: #08794f;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.technician-next-match-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.technician-next-match-versus span {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.technician-next-match-versus em {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #08794f;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.technician-next-match-versus strong {
  max-width: 100%;
  color: #102136;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.technician-next-match-versus b {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff3cf;
  color: #8a5b00;
  box-shadow: inset 0 0 0 1px #f7b733;
}

.technician-next-match-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.technician-next-match-details span {
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e8e3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #35506a;
  font-weight: 750;
}

.technician-next-match-details svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: #08794f;
  stroke-width: 2;
}

.technician-next-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.technician-games-season dl,
.technician-games-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.technician-games-season dl {
  margin: 0;
}

.technician-games-season div,
.technician-games-stat-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1ece8;
  border-radius: 11px;
  background: #f8fcfa;
}

.technician-games-season dt,
.technician-games-stat-grid small {
  color: #5b6f86;
  font-size: 0.76rem;
  font-weight: 800;
}

.technician-games-season dd,
.technician-games-stat-grid strong {
  margin: 3px 0 0;
  color: #102136;
  font-size: 1.02rem;
  font-weight: 900;
}

.technician-games-agenda-row,
.technician-games-result-row {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  display: grid;
  align-items: center;
  gap: 12px;
  border: 0;
  border-top: 1px solid #edf3f1;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.technician-games-agenda-row {
  grid-template-columns: 82px minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.9fr) 18px;
}

.technician-games-result-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.technician-games-agenda-row span,
.technician-games-result-row span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.technician-games-agenda-row strong,
.technician-games-result-row strong {
  color: #102136;
  font-weight: 900;
}

.technician-games-agenda-row small,
.technician-games-result-row small {
  color: #5b6f86;
  font-size: 0.82rem;
  font-weight: 700;
}

.technician-games-result-row b {
  color: #0b3f36;
  font-size: 1rem;
}

.technician-games-standing-table {
  display: grid;
  gap: 6px;
}

.technician-games-standing-table [role="row"] {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1fr) repeat(6, minmax(42px, 0.42fr));
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
}

.technician-games-standing-table [role="row"]:first-child {
  min-height: 34px;
  color: #5b6f86;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.technician-games-standing-table .is-technician-team {
  border: 1px solid #b9ded0;
  background: #eef8f3;
  color: #102136;
}

.technician-games-compact-empty,
.technician-games-empty {
  display: grid;
  justify-items: center;
  text-align: center;
}

.technician-games-compact-empty {
  min-height: 130px;
  align-content: center;
  gap: 6px;
  padding: 20px;
  border: 1px dashed #c7dcd5;
  border-radius: 12px;
  background: #fbfefd;
}

.technician-games-empty {
  max-width: 720px;
  width: 100%;
  margin: 32px auto;
  padding: 42px 28px;
  gap: 12px;
  border: 1px solid #d9e8e3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.technician-games-empty h2 {
  margin: 0;
  color: #102136;
}

@media (max-width: 1200px) {
  .technician-games-metrics,
  .technician-games-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-games-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-games-card.wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  #technicianGamesModule {
    padding-bottom: 88px;
  }

  .technician-games-header,
  .technician-games-selector,
  .technician-games-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-games-header h2 {
    font-size: clamp(1.85rem, 10vw, 2.5rem);
  }

  .technician-games-header .primary-button,
  .technician-next-match-actions .primary-button,
  .technician-next-match-actions .secondary-button {
    width: 100%;
  }

  .technician-games-metrics,
  .technician-games-season dl,
  .technician-games-stat-grid,
  .technician-next-match-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-games-metric {
    min-height: 104px;
    padding: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .technician-games-metric b[aria-hidden="true"] {
    display: none;
  }

  .technician-games-card {
    padding: 16px;
  }

  .technician-games-card header {
    display: grid;
  }

  .technician-games-card .text-button {
    width: fit-content;
  }

  .technician-next-match-card {
    padding: 16px;
  }

  .technician-next-match-versus {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-next-match-versus b {
    justify-self: center;
  }

  .technician-games-agenda-row,
  .technician-games-result-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-games-standing-table {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .technician-games-standing-table [role="row"] {
    min-width: 680px;
  }
}

@media (max-width: 520px) {
  .technician-games-metrics,
  .technician-games-season dl,
  .technician-games-stat-grid,
  .technician-next-match-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .technician-games-empty {
    margin-block: 18px;
    padding: 30px 18px;
  }
}

#sorteio .draw-controls,
#sorteio .draw-layout > .panel {
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.07);
}

#sorteio .draw-controls {
  padding: 22px 24px;
  margin-bottom: 20px;
}

#sorteio .draw-panel-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

#sorteio .draw-panel-title > div { min-width: 0; }
#sorteio .draw-heading-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e6f5ef;
  color: #08794f;
}

#sorteio .draw-heading-icon svg,
#sorteio .draw-field-label svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#sorteio .draw-heading-icon svg { width: 22px; height: 22px; }

#sorteio .draw-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(210px,1fr)) auto;
  align-items: end;
  gap: 14px;
}

#sorteio .draw-form label { min-width: 0; display: grid; gap: 6px; }
#sorteio .draw-field-label { display: flex; align-items: center; gap: 7px; }
#sorteio .draw-field-label svg { width: 17px; height: 17px; color: #08794f; }
#sorteio #runDraw { min-width: 142px; min-height: 42px; background: linear-gradient(135deg,#0b3f36,#08794f); }

#sorteio .draw-layout {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}

#sorteio .draw-layout > .panel { min-width: 0; min-height: 330px; padding: 22px; }
#sorteio .draw-layout > .panel.wide { grid-column: 1 / -1; }

#sorteio :is(.groups-grid,.match-list,.bracket,.standings-grid) { min-width: 0; }

#sorteio .draw-empty-state {
  width: 100%;
  min-height: 240px;
  padding: 30px 22px;
  border: 1px solid #e4eeeb !important;
  background: #fbfefd !important;
}

#sorteio .draw-empty-state .administrative-empty-icon { width: 56px; height: 56px; }
#sorteio .draw-empty-state .administrative-empty-icon svg { width: 28px; height: 28px; }
#sorteio .draw-empty-state .administrative-empty-action { width: auto; background: #08794f; }

#sorteio .group-card {
  padding: 16px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #f8fcfa;
}

#sorteio .group-card header { display: flex; justify-content: space-between; gap: 10px; }
#sorteio .group-card ol { margin: 14px 0 0; padding-left: 24px; color: #334155; }

#sorteio .match-row {
  padding: 16px;
  display: grid;
  grid-template-columns: auto minmax(180px,1fr) minmax(190px,.85fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
}

#sorteio .match-meta { min-width: 0; display: grid; gap: 3px; color: #64748b; font-size: .72rem; }
#sorteio .match-meta .tag { width: fit-content; }

#sorteio .bracket { min-height: 240px; }
#sorteio .bracket-round { min-width: 260px; }
#sorteio .bracket-round > h3 { color: #0f5f48; }

#sorteio .standings-filter-bar {
  margin-bottom: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3,minmax(180px,1fr));
  gap: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #f8fcfa;
}

#sorteio .standings-filter-bar label { min-width: 0; display: grid; gap: 6px; font-size: .76rem; }
#sorteio .standings-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
#sorteio .standing-card { overflow: hidden; border: 1px solid #d7e3e3; border-radius: 12px; background: #fff; }
#sorteio .standing-card > header { padding: 14px 16px; background: #eef8f3; }
#sorteio .standing-table {
  min-width: 760px;
  padding: 0;
  display: grid;
  grid-template-columns: 54px minmax(170px,1.8fr) repeat(8,minmax(52px,.55fr));
  overflow-x: auto;
}

#sorteio .standing-table > * { min-height: 42px; padding: 10px 8px; display: flex; align-items: center; border-bottom: 1px solid #edf2f0; }
#sorteio .standing-table > :nth-child(-n+10) { min-height: 38px; background: #f8fcfa; color: #475569; font-size: .72rem; font-weight: 800; text-transform: uppercase; }

@media (max-width: 900px) {
  #sorteio .draw-form,
  #sorteio .standings-filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #sorteio .draw-layout { grid-template-columns: 1fr; }
  #sorteio .draw-layout > .panel.wide { grid-column: 1; }
  #sorteio .match-row { grid-template-columns: auto minmax(0,1fr); }
  #sorteio .match-meta,
  #sorteio .score-form { grid-column: 2; }
}

@media (max-width: 640px) {
  #sorteio .draw-controls,
  #sorteio .draw-layout > .panel { padding: 18px; }
  #sorteio .draw-form,
  #sorteio .standings-filter-bar { grid-template-columns: minmax(0,1fr); }
  #sorteio #runDraw { width: 100%; }
  #sorteio .draw-layout > .panel { min-height: 0; }
  #sorteio .draw-empty-state { min-height: 220px; padding: 26px 16px; }
  #sorteio .match-row { grid-template-columns: 1fr; }
  #sorteio .match-order,
  #sorteio .match-meta,
  #sorteio .score-form { grid-column: 1; }
  #sorteio .match-teams { justify-content: center; }
  #sorteio .score-form { width: 100%; }
}

/* Documentos: manual review command center */
#documentos > .content-grid {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

#documentos .document-command-center {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#documentos .document-command-center > .panel-header {
  margin-bottom: 20px;
  padding: 0 0 16px;
}

#documentos .document-command-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(300px,.72fr) minmax(0,1.65fr);
  align-items: start;
  gap: 20px;
}

#documentos .document-command-sidebar {
  min-width: 0;
  display: grid;
  gap: 14px;
}

#documentos #documentFrontModules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#documentos .document-scope-card {
  min-width: 0;
  min-height: 92px;
  padding: 15px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 16px;
  align-items: center;
  gap: 11px;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: 0 5px 16px rgba(11,63,54,.06);
}

#documentos .document-scope-card:hover { border-color: #8fc8b3; box-shadow: 0 9px 20px rgba(11,63,54,.1); }
#documentos .document-scope-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e6f5ef; color: #08794f; }
#documentos .document-scope-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#documentos .document-scope-card > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
#documentos .document-scope-card strong { font-size: .9rem; }
#documentos .document-scope-card small { color: #64748b; font-size: .72rem; line-height: 1.4; }
#documentos .document-scope-card > b { color: #0b3f36; font-size: 1.15rem; }

#documentos #documentFrontMetrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

#documentos .document-metric-card {
  min-width: 0;
  min-height: 94px;
  padding: 13px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #d7e3e3;
  border-radius: 11px;
  background: #f8fcfa;
}

#documentos .document-metric-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e6f5ef; color: #08794f; }
#documentos .document-metric-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#documentos .document-metric-card div { min-width: 0; display: grid; gap: 3px; }
#documentos .document-metric-card small { color: #64748b; font-size: .68rem; line-height: 1.25; }
#documentos .document-metric-card strong { color: #0f172a; font-size: 1.45rem; }

#documentos .document-section-menu {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  background: linear-gradient(145deg,#0b3f36,#0f5f48);
  box-shadow: 0 8px 20px rgba(11,63,54,.12);
}

#documentos .document-section-menu .front-workbench-copy :is(h3,p) { color: #fff; }
#documentos .document-section-menu .workspace-menu-kicker { color: #f7b733; }
#documentos .context-segmented-control { display: grid; grid-template-columns: 1fr; gap: 7px; }
#documentos .context-option-button {
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
}

#documentos .context-option-button:hover,
#documentos .context-option-button.active { border-color: rgba(247,183,51,.75); background: rgba(255,255,255,.17); }
#documentos .context-option-button .workspace-option-copy { min-width: 0; }
#documentos .context-option-button :is(strong,small) { color: #fff; overflow-wrap: normal; word-break: normal; }
#documentos .context-option-button small { color: rgba(255,255,255,.72); }
#documentos .context-option-button .workspace-option-index { flex: 0 0 auto; }

#documentos .document-results-panel {
  min-width: 0;
  min-height: 650px;
  padding: 20px;
  border: 1px solid #d7e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,63,54,.07);
}

#documentos .document-results-panel > header {
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8efed;
}

#documentos .document-results-panel > header > div { display: flex; align-items: center; gap: 11px; }
#documentos .document-results-panel h3 { margin: 0 0 3px; color: #0f172a; font-size: 1.05rem; }
#documentos .document-results-panel p { margin: 0; color: #64748b; font-size: .76rem; }
#documentos .document-results-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #e6f5ef; color: #08794f; }
#documentos .document-results-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#documentos .document-command-list { display: grid; gap: 12px; }
#documentos .document-card { min-width: 0; padding: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; border-radius: 12px; }
#documentos .document-card > div:first-child { min-width: 0; display: grid; gap: 4px; }
#documentos .document-card span { color: #64748b; font-size: .76rem; line-height: 1.4; }
#documentos .document-row-actions { max-width: 330px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
#documentos .document-more-actions { position: relative; }
#documentos .document-more-actions summary {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e5e2;
  border-radius: 9px;
  background: #fff;
  color: #0b3f36;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
#documentos .document-more-actions summary::-webkit-details-marker { display: none; }
#documentos .document-more-actions > div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(240px, 80vw);
  padding: 8px;
  display: grid;
  gap: 7px;
  border: 1px solid #dbe8e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, .14);
}
#documentos .document-more-actions > div .compact-button { width: 100%; justify-content: center; }

#documentos .document-empty-state {
  min-height: 420px;
  padding: 40px 24px;
  border: 1px solid #e4eeeb !important;
  background: #fbfefd !important;
}

#documentos .document-empty-state .administrative-empty-icon { width: 60px; height: 60px; }
#documentos .document-empty-state .administrative-empty-icon svg { width: 30px; height: 30px; }
#documentos .document-empty-state .administrative-empty-action { width: auto; background: #08794f; }

@media (max-width: 1050px) {
  #documentos .document-command-layout { grid-template-columns: 1fr; }
  #documentos .document-command-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  #documentos .document-section-menu { grid-column: 1 / -1; }
  #documentos .context-segmented-control { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  #documentos .document-command-sidebar,
  #documentos #documentFrontMetrics,
  #documentos .context-segmented-control { grid-template-columns: minmax(0,1fr); }
  #documentos .document-section-menu { grid-column: 1; }
  #documentos .document-results-panel { min-height: 0; padding: 18px; }
  #documentos .document-card { grid-template-columns: 1fr; }
  #documentos .document-row-actions { max-width: none; justify-content: flex-start; }
  #documentos .document-more-actions > div { left: 0; right: auto; }
  #documentos .document-empty-state { min-height: 320px; padding: 30px 16px; }
}

/* Documentos menu containment correction */
#documentos .document-command-sidebar .document-section-menu {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b3f36 0%, #0f5f48 55%, #08794f 100%);
}

#documentos .document-section-menu .front-workbench-copy {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  position: static;
  transform: none;
}

#documentos .document-section-menu .front-workbench-copy :is(h3, p) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#documentos .document-section-menu .context-segmented-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  position: static;
  transform: none;
  overflow: hidden;
  box-sizing: border-box;
}

#documentos .document-section-menu .context-option-button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 58px;
  margin: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  position: static;
  transform: none;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
}

#documentos .document-section-menu .context-option-button:hover {
  transform: none;
  background: rgba(255,255,255,.14);
}

#documentos .document-section-menu .context-option-button.active,
#documentos .document-section-menu .context-option-button[aria-pressed="true"] {
  border-color: #f7b733;
  background: #fff;
  color: #0b3f36;
  box-shadow: 0 8px 18px rgba(11,63,54,.16);
}

#documentos .document-section-menu .workspace-option-index {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  color: inherit;
  font-size: .68rem;
}

#documentos .document-section-menu .context-option-button.active .workspace-option-index,
#documentos .document-section-menu .context-option-button[aria-pressed="true"] .workspace-option-index {
  border-color: #f7b733;
  background: #0b3f36;
  color: #fff;
}

#documentos .document-section-menu .workspace-option-copy {
  min-width: 0;
  max-width: 100%;
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  overflow: hidden;
  text-align: left;
}

#documentos .document-section-menu .workspace-option-copy strong {
  min-width: 0;
  color: inherit;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#documentos .document-section-menu .workspace-option-copy small {
  min-width: 0;
  color: inherit;
  font-size: .7rem;
  line-height: 1.25;
  opacity: .75;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  #documentos .document-command-sidebar .document-section-menu,
  #documentos .document-section-menu .context-segmented-control {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Documentos full-width layout correction */
#documentos,
#documentos > .content-grid,
#documentos .document-command-center,
#documentos .document-command-layout {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#documentos > .content-grid {
  display: block;
  margin: 0;
}

#documentos .document-command-layout {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

#documentos .document-command-sidebar {
  width: 100%;
  min-width: 0;
  grid-template-columns: 1fr;
}

#documentos .document-section-menu {
  grid-column: 1;
}

#documentos .document-results-panel {
  width: 100%;
  min-width: 0;
  min-height: 560px;
  padding: 24px 26px;
}

#documentos .document-results-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

#documentos .document-results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#documentos .document-results-actions button {
  min-height: 38px;
  padding-inline: 13px;
}

#documentos .document-command-list,
#documentos .document-card,
#documentos .document-empty-state {
  width: 100%;
  min-width: 0;
}

#documentos .document-empty-state {
  min-height: 420px;
  padding: 42px clamp(24px, 5vw, 72px);
}

#documentos .document-empty-state > span:not(.administrative-empty-icon) {
  max-width: 620px;
}

#documentos .document-card {
  overflow: hidden;
}

#documentos .document-card > div:first-child,
#documentos .document-row-actions {
  min-width: 0;
}

#documentos .document-card :is(strong,span) {
  overflow-wrap: break-word;
}

@media (max-width: 1100px) and (min-width: 901px) {
  #documentos .document-command-layout {
     grid-template-columns: minmax(280px, 300px) minmax(0, 1fr);
    gap: 18px;
  }

  #documentos .document-results-panel {
    padding: 22px;
  }
}

@media (max-width: 900px) {
  #documentos .document-command-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #documentos .document-command-sidebar {
    grid-template-columns: 1fr;
  }

  #documentos .document-results-panel {
    min-height: 520px;
  }
}

@media (max-width: 640px) {
  #documentos .document-command-layout { gap: 16px; }
  #documentos .document-results-panel { min-height: 0; padding: 18px; }
  #documentos .document-results-panel > header { align-items: flex-start; }
  #documentos .document-results-actions { width: 100%; }
  #documentos .document-results-actions button { flex: 1; }
  #documentos .document-empty-state { min-height: 320px; padding: 30px 16px; }
}

/* Relatórios full-width layout correction */
#relatorios,
#relatorios > .content-grid,
#relatorios .reports-dashboard-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#relatorios > .content-grid {
  display: block;
  margin: 0;
}

#relatorios .reports-dashboard-panel {
  box-sizing: border-box;
}

#relatorios .report-filter-bar {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) minmax(220px,1.2fr) auto;
  align-items: end;
  gap: 16px;
  box-sizing: border-box;
}

#relatorios .report-filter-bar > * {
  min-width: 0;
}

#relatorios .report-filter-bar label,
#relatorios .report-filter-bar :is(select,button) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#relatorios .report-export-button {
  width: auto !important;
  min-width: 164px;
  min-height: 42px;
  padding: 6px 13px;
  display: grid;
  align-content: center;
  gap: 1px;
  white-space: nowrap;
}

#relatorios .report-export-button span {
  font-size: .78rem;
  font-weight: 800;
}

#relatorios .report-export-button small {
  font-size: .62rem;
  font-weight: 600;
}

#relatorios #reportsFrontMetrics {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

#relatorios .report-metric-card {
  min-width: 0;
  padding: 20px 22px;
  box-sizing: border-box;
}

#relatorios .report-metric-card :is(small,strong,span) {
  min-width: 0;
  overflow-wrap: break-word;
}

#relatorios .report-visual-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
}

#relatorios .report-visual-card {
  width: 100%;
  min-width: 0;
  min-height: 320px;
  padding: 22px 26px;
  box-sizing: border-box;
  overflow: hidden;
}

#relatorios .report-visual-card :is(h3,p,strong,span) {
  min-width: 0;
  overflow-wrap: break-word;
}

#relatorios .report-chart-empty {
  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  box-sizing: border-box;
}

#relatorios .report-chart-empty p {
  max-width: 420px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  #relatorios .report-visual-grid {
    grid-template-columns: minmax(0,1fr);
  }

  #relatorios .report-export-button {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  #relatorios .report-filter-bar,
  #relatorios #reportsFrontMetrics {
    grid-template-columns: minmax(0,1fr);
  }

  #relatorios .report-visual-card {
    min-height: 300px;
    padding: 20px;
  }
}

/* Definitive sidebar system. Earlier legacy rules are intentionally superseded here. */
:root {
  --sidebar-collapsed-width: 72px;
  --sidebar-expanded-width: 240px;
  --sidebar-item-height: 48px;
  --sidebar-icon-size: 40px;
}

@media (min-width: 769px) {
  #appShell {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) !important;
  }

  #appSidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1000 !important;
    width: var(--sidebar-collapsed-width) !important;
    min-width: var(--sidebar-collapsed-width) !important;
    max-width: var(--sidebar-expanded-width) !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 0 12px !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #06352f 0%, #052a28 100%) !important;
    box-shadow: none !important;
    transition: width 180ms ease, min-width 180ms ease, box-shadow 180ms ease !important;
  }

  #appSidebar.is-open {
    width: var(--sidebar-expanded-width) !important;
    min-width: var(--sidebar-expanded-width) !important;
    box-shadow: 12px 0 30px rgba(0, 0, 0, .18) !important;
  }

  #appShell > .main-content {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  #appSidebar .sidebar-brand {
    position: relative !important;
    min-height: 88px !important;
    width: 100% !important;
    padding: 16px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
    overflow: hidden !important;
  }

  #appSidebar .sidebar-item {
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    min-height: var(--sidebar-item-height) !important;
    height: var(--sidebar-item-height) !important;
    margin: 4px 8px !important;
    padding: 4px !important;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, .84) !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
    transform: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease !important;
  }

  #appSidebar:not(.is-open) .sidebar-item {
    justify-content: center !important;
    gap: 0 !important;
  }

  #appSidebar .sidebar-item:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .1) !important;
  }

  #appSidebar .sidebar-item:is(.active, .is-active) {
    color: #0b3f36 !important;
    background: #f7b733 !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .14) !important;
  }

  #appSidebar .sidebar-icon {
    width: var(--sidebar-icon-size) !important;
    height: var(--sidebar-icon-size) !important;
    min-width: var(--sidebar-icon-size) !important;
    flex: 0 0 var(--sidebar-icon-size) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    color: inherit !important;
    background: rgba(255, 255, 255, .08) !important;
    transform: none !important;
  }

  #appSidebar .sidebar-item:is(.active, .is-active) .sidebar-icon {
    background: rgba(255, 255, 255, .2) !important;
  }

  #appSidebar .sidebar-icon svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    flex: 0 0 22px !important;
  }

  #appSidebar .sidebar-label {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    visibility: visible !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    transform: translateX(-6px) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    transition: opacity 140ms ease, max-width 180ms ease, transform 180ms ease !important;
  }

  #appSidebar.is-open .sidebar-label {
    max-width: 160px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  #appSidebar .brand-logo-button {
    position: relative !important;
    z-index: 1002 !important;
  }

  #appSidebar .brand-logo-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .72) !important;
    outline-offset: -3px !important;
  }

  #appSidebar .sidebar-logo {
    width: var(--sidebar-icon-size) !important;
    height: var(--sidebar-icon-size) !important;
    min-width: var(--sidebar-icon-size) !important;
    flex: 0 0 var(--sidebar-icon-size) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #appSidebar .sidebar-logo .brand-logo {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  #appSidebar .nav-tabs {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 4px 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #appSidebar .sidebar-footer {
    width: 100% !important;
    min-width: 0 !important;
    margin-top: auto !important;
    padding: 0 !important;
  }

  #appSidebar .sidebar-meta {
    width: 100% !important;
    min-height: 18px !important;
    padding: 0 12px !important;
    overflow: hidden !important;
  }

  #appSidebar .sidebar-meta small {
    display: block !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    white-space: nowrap !important;
  }

  #appSidebar.is-open .sidebar-meta small {
    max-width: 160px !important;
    opacity: .7 !important;
  }

  #sidebarOverlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999 !important;
    border: 0 !important;
    background: rgba(15, 23, 42, .2) !important;
  }

  #sidebarOverlay[hidden] {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #appSidebar,
  #sidebarOverlay {
    display: none !important;
  }
}

/* Approved municipal administration dashboards */
.main-content {
  background-color: #f4faf7 !important;
  background-image: linear-gradient(rgba(11,63,54,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(11,63,54,.075) 1px,transparent 1px) !important;
  background-size: 32px 32px !important;
  background-position: 0 0 !important;
}

.home-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
#escolinhas .school-summary-card > header,
#campeonatos .championship-summary-card > header { display:grid !important;grid-template-columns:minmax(0,1fr) auto !important;align-items:start !important;gap:12px !important; }
#escolinhas button.school-summary-link,
#campeonatos button.championship-summary-link { position:static !important;width:auto !important;min-width:max-content !important;max-width:none !important;margin:0 0 0 auto !important;padding:2px 0 !important;justify-self:end !important;white-space:nowrap !important;color:#08794f !important;background:transparent !important;border:0 !important;box-shadow:none !important; }
#championshipTeamSummary .front-metric-card,
#championshipTeamSummary .front-metric-card :is(span,strong,small) { color:#0f172a !important; }
#championshipTeamSummary .front-metric-card { background:#fff !important; }

#championshipGamesSummary .front-metric-card {
  border: 1px solid #d7e3e3 !important;
  background: #f8fcfa !important;
  color: #0f172a !important;
}

#championshipGamesSummary .front-metric-card :is(span,strong,small) {
  color: #0f172a !important;
}

#championshipGamesSummary .front-metric-card span {
  color: #475569 !important;
}

#championshipReportCards .front-metric-card {
  border-color: #d7e3e3 !important;
  background: #fff !important;
}

#championshipReportCards .front-metric-card span {
  color: #475569 !important;
}

#championshipReportCards .front-metric-card strong {
  color: #0f172a !important;
}
#locais .location-add-button,
#locais .location-add-button * { color:#fff !important; }
#sidebarActions .ghost-button { border:1px solid rgba(255,255,255,.14) !important;border-radius:10px !important;background:rgba(255,255,255,.09) !important;color:#fff !important; }
#perfil .profile-layout.account-profile { width:100% !important;max-width:1180px !important;margin-inline:auto !important;grid-template-columns:minmax(0,1fr) !important; }
#perfil .profile-card-panel { padding:28px !important;border:1px solid #d7e3e3 !important;border-radius:16px !important;background:#fff !important;box-shadow:0 12px 30px rgba(11,63,54,.1) !important; }
#perfil .account-photo-preview { width:100% !important;min-height:150px !important;margin:18px 0 24px !important;border:1px dashed rgba(8,121,79,.35) !important;border-radius:14px !important;background:#f4faf7 !important; }

#directorProfileForm { display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:18px !important;align-items:start !important; }
#directorProfileForm > .full-field,
#directorProfileForm > .hidden-file-field,
#directorProfileForm > .profile-form-section,
#directorProfileForm > button { grid-column:1/-1 !important; }
#directorProfileForm > label,
#directorProfileForm .profile-form-section label { display:grid !important;min-width:0 !important;gap:8px !important; }
#directorProfileForm input,
#directorProfileForm textarea { width:100% !important;min-width:0 !important;box-sizing:border-box !important; }
#directorProfileForm .profile-form-section { padding:22px !important;overflow:hidden !important; }
#directorProfileForm .profile-form-section > header { align-items:center !important;padding-bottom:8px !important;border-bottom:1px solid #e1ece9 !important; }
#directorProfileForm .profile-form-section-grid { display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:16px !important;align-items:start !important; }
#directorProfileForm .profile-form-section-grid .wide-field { grid-column:span 2 !important; }
body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid,
body[data-role="professor"] #directorProfileForm .profile-form-section-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
body[data-role="sportsDirector"] #professionalAgeGroupsField { display:none !important; }
body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid .wide-field,
body[data-role="professor"] #directorProfileForm .profile-form-section-grid .wide-field { grid-column:span 3 !important; }

@media (max-width: 900px) {
  #directorProfileForm,
  #directorProfileForm .profile-form-section-grid,
  body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid,
  body[data-role="professor"] #directorProfileForm .profile-form-section-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }

  #directorProfileForm .profile-form-section-grid .wide-field,
  body[data-role="sportsDirector"] #directorProfileForm .profile-form-section-grid .wide-field,
  body[data-role="professor"] #directorProfileForm .profile-form-section-grid .wide-field {
    grid-column:1/-1 !important;
  }
}

#perfil .profile-layout.athlete-only {
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}

#perfil .profile-layout.athlete-only > .panel {
  width: 100% !important;
  min-width: 0 !important;
  grid-column: 1 / -1 !important;
}

#perfil .profile-layout.athlete-only .profile-card-panel {
  grid-row: auto !important;
}

#perfil .profile-layout.athlete-only .athlete-completion-form,
#perfil .profile-layout.athlete-only .profile-form-section,
#perfil .profile-layout.athlete-only .profile-form-section-grid,
#perfil .profile-layout.athlete-only .profile-form-actions {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

#perfil .profile-layout.athlete-only .athlete-completion-form {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr)) !important;
  align-items: start;
  gap: 18px !important;
}

#perfil .profile-layout.athlete-only .athlete-completion-form > .full-field,
#perfil .profile-layout.athlete-only .athlete-completion-form > .profile-form-section,
#perfil .profile-layout.athlete-only .athlete-completion-form > .hidden-file-field,
#perfil .profile-layout.athlete-only .athlete-completion-form > .consent-field,
#perfil .profile-layout.athlete-only .athlete-completion-form > .profile-form-actions,
#perfil .profile-layout.athlete-only .athlete-photo-preview {
  grid-column: 1 / -1 !important;
}

#perfil .profile-layout.athlete-only .athlete-completion-form > .profile-form-section.full-field {
  grid-column: auto !important;
  align-self: stretch;
}

#perfil .profile-layout.athlete-only .profile-form-section {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  overflow: hidden;
  padding: 22px !important;
}

#perfil .profile-layout.athlete-only .profile-form-section > header {
  margin-bottom: 2px;
}

#perfil .profile-layout.athlete-only .profile-form-section h3 {
  line-height: 1.15;
}

#perfil .profile-layout.athlete-only .profile-form-section p {
  max-width: 58ch;
  line-height: 1.35;
}

#perfil .profile-layout.athlete-only .profile-form-section.required-section header h3::before {
  content: "*";
  display: inline-block;
  margin-right: 6px;
  color: #08794f;
  font-weight: 900;
}

#perfil .profile-layout.athlete-only .profile-form-section label > span[aria-hidden="true"],
#perfil .profile-layout.athlete-only .profile-sport-picker legend > span[aria-hidden="true"] {
  display: none !important;
}

#perfil .profile-layout.athlete-only .profile-form-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: start;
  align-items: start;
  gap: 16px !important;
}

#perfil .profile-layout.athlete-only .profile-form-section-grid .wide-field,
#perfil .profile-layout.athlete-only .profile-sport-picker {
  grid-column: 1 / -1 !important;
}

#perfil .profile-layout.athlete-only .profile-form-section label {
  display: grid;
  gap: 7px;
  align-content: start;
}

#perfil .profile-layout.athlete-only .profile-form-section label small {
  margin-top: 0;
  max-width: 32ch;
  line-height: 1.25;
}

#perfil .profile-layout.athlete-only .profile-form-section label,
#perfil .profile-layout.athlete-only .profile-form-section input,
#perfil .profile-layout.athlete-only .profile-form-section select,
#perfil .profile-layout.athlete-only .profile-form-section textarea,
#perfil .profile-layout.athlete-only .profile-form-actions button {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
}

#perfil .profile-layout.athlete-only .profile-sport-picker > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#perfil .profile-layout.athlete-only .profile-sport-grid .athlete-register-sport-card {
  min-height: 82px;
  padding: 12px !important;
}

#perfil .profile-layout.athlete-only .profile-sport-grid .athlete-register-sport-icon {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

#perfil .profile-layout.athlete-only .form-status-notice {
  width: 100%;
  max-width: none;
}

#perfil .profile-layout.athlete-only .profile-side-panel {
  order: 2;
}

#perfil .profile-layout.athlete-only > .profile-card-panel {
  order: 1;
}

#perfil .profile-layout.athlete-only .athlete-teams-panel,
#perfil .profile-layout.athlete-only .profile-side-panel + .panel {
  order: 3;
}

#perfil .profile-layout.athlete-only .athlete-documents-panel,
#perfil .profile-layout.athlete-only .profile-side-panel + .panel + .panel {
  order: 4;
}

#perfil .profile-layout.athlete-only .profile-side-panel + .panel + .panel + .panel {
  order: 5;
}

@media (min-width:1100px) {
  #perfil .profile-layout.athlete-only {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
  }

  #perfil .profile-layout.athlete-only > .profile-card-panel,
  #perfil .profile-layout.athlete-only > .athlete-teams-panel,
  #perfil .profile-layout.athlete-only > .profile-wide-panel {
    grid-column: 1 / -1 !important;
  }

  #perfil .profile-layout.athlete-only > .profile-side-panel,
  #perfil .profile-layout.athlete-only > .athlete-documents-panel {
    grid-column: auto !important;
    align-self: stretch;
  }

  #perfil .profile-layout.athlete-only > .profile-side-panel {
    order: 2 !important;
  }

  #perfil .profile-layout.athlete-only > .athlete-documents-panel {
    order: 3 !important;
  }

  #perfil .profile-layout.athlete-only > .athlete-teams-panel {
    order: 4 !important;
  }

  #perfil .profile-layout.athlete-only > .profile-wide-panel {
    order: 5 !important;
  }

  #perfil .profile-layout.athlete-only .athlete-documents-panel .document-form {
    grid-template-columns: minmax(0, 1fr);
  }

  #perfil .profile-layout.athlete-only .athlete-documents-panel .document-form button {
    width: 100%;
  }
}

@media (max-width:768px) {
  .sidebar,.sidebar-overlay { display:none !important; }
  .home-metric-grid { grid-template-columns:minmax(0,1fr) !important; }
  #perfil .profile-card-panel { padding:20px !important; }
  #perfil .profile-layout.athlete-only .athlete-completion-form,
  #perfil .profile-layout.athlete-only .profile-form-section-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #perfil .profile-layout.athlete-only .profile-sport-picker > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:420px) {
  #perfil .profile-layout.athlete-only .profile-sport-picker > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact institutional user card: layer-final */
.topbar .status-pill {
  width: auto;
  min-width: 0;
  max-width: 240px;
  min-height: 58px;
  height: auto;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 11px;
  box-sizing: border-box;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11,63,54,.08);
  color: #0f172a;
  text-align: left;
  transform: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.topbar .status-pill:hover {
  border-color: rgba(8,121,79,.28);
  box-shadow: 0 7px 18px rgba(11,63,54,.12);
  transform: none;
}

.topbar .status-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #08794f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.topbar .status-copy {
  min-width: 0;
  max-width: 164px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.topbar .status-pill strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #08794f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .status-pill .sync-now-button {
  display: none !important;
}

.topbar .status-action-label {
  grid-column: 2;
  width: fit-content;
  margin-top: 1px;
  padding: 2px 6px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .topbar .status-pill {
    max-width: 205px;
    min-height: 54px;
    padding: 8px 11px;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 9px;
  }

  .topbar .status-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .topbar .status-copy {
    max-width: 138px;
  }

  .topbar .status-pill strong { font-size: 14px; }
  .topbar .status-pill small { font-size: 11px; }
}

@media (max-width: 560px) {
  body:not([data-role="guest"]) .topbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  body:not([data-role="guest"]) .topbar .status-pill {
    display: grid !important;
    width: auto !important;
    max-width: 132px !important;
    min-height: 46px;
    padding: 6px 8px !important;
    grid-template-areas: none !important;
    grid-template-columns: 32px minmax(0,1fr) !important;
    gap: 7px !important;
  }

  body:not([data-role="guest"]) .topbar .status-avatar {
    grid-area: auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-copy {
    display: grid;
    max-width: 78px;
  }

  body:not([data-role="guest"]) .topbar .status-pill strong {
    grid-area: auto;
    font-size: 12px;
  }

  body:not([data-role="guest"]) .topbar .status-pill small {
    display: none;
  }
}
/* Central de notificações */
.topbar-actions {
  align-items: stretch;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
  position: relative;
}

.notification-center {
  align-items: stretch;
  display: flex;
  position: relative;
}

.notification-bell-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e3e3;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(11, 63, 54, 0.08);
  color: #065f46;
  cursor: pointer;
  display: inline-flex;
  min-height: 58px;
  height: 100%;
  justify-content: center;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  width: 58px;
}

.notification-bell-button::before {
  background: #e7f6ef;
  border-radius: 10px;
  content: "";
  height: 38px;
  position: absolute;
  transition: background 0.16s ease, transform 0.16s ease;
  width: 38px;
}

.notification-bell-button svg {
  fill: none;
  height: 20px;
  position: relative;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
  z-index: 1;
}

.notification-bell-button:hover,
.notification-bell-button:focus-visible {
  background: #f4faf7;
  border-color: rgba(8, 121, 79, 0.28);
  box-shadow: 0 7px 18px rgba(11, 63, 54, 0.12);
  outline: none;
  transform: none;
}

.notification-bell-button:hover::before,
.notification-bell-button:focus-visible::before {
  background: #d9f2e6;
  transform: scale(1.04);
}

.notification-badge {
  align-items: center;
  background: #fbbf24;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.24);
  color: #064e3b;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 18px;
  min-width: 18px;
  padding: 0 4px;
  position: absolute;
  right: 6px;
  top: 7px;
  z-index: 2;
}

.team-invitation-success-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 120;
}

.team-invitation-success-backdrop[hidden] {
  display: none !important;
}

.team-invitation-success-modal {
  animation: teamInvitationModalIn 220ms ease both;
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.24);
  color: #0f172a;
  display: grid;
  gap: 16px;
  justify-items: center;
  max-height: calc(100vh - 48px);
  max-width: 460px;
  overflow: auto;
  padding: 34px 30px 28px;
  position: relative;
  text-align: center;
  width: min(460px, calc(100vw - 32px));
}

.team-invitation-success-modal:focus {
  outline: none;
}

.team-invitation-success-icon {
  align-items: center;
  animation: teamInvitationIconIn 260ms ease 80ms both;
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(4, 120, 87, 0.26);
  color: #ffffff;
  display: inline-flex;
  height: 76px;
  justify-content: center;
  position: relative;
  width: 76px;
  z-index: 1;
}

.team-invitation-success-icon svg {
  fill: none;
  height: 34px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  width: 34px;
}

.team-invitation-success-burst {
  inset: 24px 0 auto;
  margin-inline: auto;
  pointer-events: none;
  position: absolute;
  width: 140px;
}

.team-invitation-success-burst span {
  background: #fbbf24;
  border-radius: 999px;
  display: block;
  height: 9px;
  position: absolute;
  width: 9px;
}

.team-invitation-success-burst span:nth-child(1) {
  background: #047857;
  left: 12px;
  top: 28px;
}

.team-invitation-success-burst span:nth-child(2) {
  right: 10px;
  top: 18px;
}

.team-invitation-success-burst span:nth-child(3) {
  background: #34d399;
  left: 26px;
  top: 72px;
  transform: scale(0.72);
}

.team-invitation-success-burst span:nth-child(4) {
  right: 28px;
  top: 78px;
  transform: scale(0.72);
}

.team-invitation-success-modal h2 {
  color: #064e3b;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 4px 0 0;
}

.team-invitation-success-modal > p {
  color: #475569;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  max-width: 360px;
}

.team-invitation-success-info {
  align-items: flex-start;
  background: #ecfdf5;
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-radius: 16px;
  color: #064e3b;
  display: grid;
  gap: 12px;
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 14px;
  text-align: left;
  width: 100%;
}

.team-invitation-success-info span {
  align-items: center;
  background: #d1fae5;
  border-radius: 12px;
  color: #047857;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.team-invitation-success-info svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.team-invitation-success-info p {
  color: #065f46;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.team-invitation-success-actions {
  display: grid;
  gap: 12px;
  width: 100%;
}

.team-invitation-success-actions .primary-button {
  border-radius: 12px;
  min-height: 48px;
  width: 100%;
}

.team-invitation-success-secondary {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #047857;
  cursor: pointer;
  font-weight: 900;
  min-height: 40px;
  padding: 10px 14px;
}

.team-invitation-success-secondary:hover,
.team-invitation-success-secondary:focus-visible {
  background: #ecfdf5;
  outline: 2px solid rgba(4, 120, 87, 0.2);
  outline-offset: 2px;
  text-decoration: underline;
}

@keyframes teamInvitationModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes teamInvitationIconIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.notification-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  max-height: min(520px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(420px, calc(100vw - 32px));
  z-index: 40;
}

.notification-panel-header {
  align-items: center;
  background: linear-gradient(180deg, #f8fffc 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(215, 227, 227, 0.86);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.notification-panel-header strong {
  color: #0f172a;
  font-size: 14px;
}

.notification-panel-header .text-button {
  background: #eefdf6;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 999px;
  color: #047857;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.notification-panel-header .text-button:hover,
.notification-panel-header .text-button:focus-visible {
  background: #dff8ed;
  border-color: rgba(4, 120, 87, 0.34);
  color: #065f46;
  outline: none;
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
  padding: 12px;
}

.notification-item {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid #d7e3e3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px;
}

.notification-item.unread {
  background: #f0fdfa;
  border-left-color: #047857;
}

.notification-item.priority-high,
.notification-item.priority-urgent {
  border-left-color: #f59e0b;
}

.notification-dot {
  background: #d7e3e3;
  border-radius: 999px;
  height: 8px;
  margin-top: 6px;
  width: 8px;
}

.notification-item.unread .notification-dot {
  background: #047857;
}

.notification-item-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notification-item-copy strong,
.notification-item-copy p,
.notification-item-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-item-copy p {
  color: var(--muted);
  margin: 0;
}

.notification-item-copy small {
  color: #64748b;
  font-weight: 700;
}

.notification-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.notification-read-button {
  min-height: 32px;
  min-width: 32px;
}

.notification-view-all {
  background: linear-gradient(180deg, #f8fafc 0%, #eefdf6 100%);
  border: 0;
  border-top: 1px solid rgba(215, 227, 227, 0.86);
  color: #064e3b;
  cursor: pointer;
  font-weight: 900;
  padding: 13px 16px;
  transition: background 0.18s ease, color 0.18s ease;
  width: 100%;
}

.notification-view-all:hover,
.notification-view-all:focus-visible {
  background: #dff8ed;
  color: #022c22;
  outline: none;
}

.notifications-full-view {
  display: grid;
  gap: 16px;
}

.notification-filter-bar {
  background: #f8fafc;
  border: 1px solid rgba(215, 227, 227, 0.9);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}

.notification-filter-bar .segmented-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 9px 12px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.notification-filter-bar .segmented-button:hover,
.notification-filter-bar .segmented-button:focus-visible {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.16);
  color: #065f46;
  outline: none;
}

.notification-filter-bar .segmented-button.active {
  background: #ffffff;
  border-color: rgba(4, 120, 87, 0.26);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  color: #047857;
}

.notification-full-list,
.notification-group {
  display: grid;
  gap: 10px;
}

.notification-group h3 {
  color: #475569;
  font-size: 13px;
  margin: 8px 0 0;
}

.athlete-invitations-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.athlete-invitations-panel h3 {
  font-size: 15px;
  margin: 0;
}

.athlete-invitation-card {
  align-items: center;
  border: 1px solid var(--border);
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-width: 0;
  padding: 12px;
}

.athlete-invitation-card div {
  min-width: 0;
}

.athlete-invitation-card span {
  color: var(--muted);
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .topbar-actions {
    align-items: stretch;
    width: 100%;
  }

  .notification-bell-button {
    min-height: 54px;
    width: 54px;
  }

  .notification-panel {
    left: auto;
    right: 0;
    width: calc(100vw - 24px);
  }

  .athlete-invitation-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .athlete-team-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .team-invitation-success-backdrop {
    padding: 16px;
  }

  .team-invitation-success-modal {
    border-radius: 20px;
    padding: 30px 20px 24px;
  }
}

@media (max-width: 560px) {
  body:not([data-role="guest"]) .notification-bell-button {
    min-height: 46px;
    width: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-invitation-success-modal,
  .team-invitation-success-icon {
    animation: none;
  }
}

/* Mobile validation fixes: keep contextual panels and authenticated titles inside the viewport. */
@media (max-width: 768px) {
  .notification-panel {
    position: fixed;
    top: calc(74px + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    width: auto;
    max-height: min(520px, calc(100dvh - 90px - env(safe-area-inset-top)));
  }

  .notification-list {
    max-height: min(380px, calc(100dvh - 210px - env(safe-area-inset-top)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 560px) {
  body:not([data-role="guest"]) .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body:not([data-role="guest"]) .topbar > div:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  body:not([data-role="guest"]) .topbar .topbar-actions {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-end;
    width: auto !important;
  }

  body:not([data-role="guest"]) .topbar h1 {
    overflow-wrap: normal !important;
  }
}
