/* shell: estilos consolidados por responsabilidade. */
.nav-list {
  display: grid;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--text-2);
  transition: var(--transition-ui);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-link.is-active {
  color: var(--teal-dark);
  background: var(--active-bg);
}

.nav-link-label {
  font-size: 12px;
}

.menu-icon {
  color: var(--text-2);
  font-size: 14px;
}

.nav-link.is-active .menu-icon {
  color: var(--teal);
}

.button-icon,
.menu-button-icon {
  font-size: 14px;
}

.barra-lateral-brand {
  display: grid;
  gap: 4px;
  min-height: 34px;
}

.barra-lateral-brand__vale {
  display: none;
}

.barra-lateral-brand__identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.barra-lateral-turma {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  margin-left: 34px;
  padding: 2px 5px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--team-accent-bg);
  color: var(--team-accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.barra-lateral-turma--select {
  padding: 0;
  background: transparent;
}

.barra-lateral-turma__select {
  min-width: 82px;
  height: 28px;
  padding: 0 26px 0 9px;
  border: 1px solid #e7bfd0;
  border-radius: var(--radius-control);
  background-color: var(--team-accent-bg);
  color: var(--team-accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.barra-lateral-turma__select:hover {
  border-color: #d99ab4;
  background-color: #f7dce6;
}

.barra-lateral-turma__select:focus-visible {
  border-color: var(--team-accent);
  outline: 2px solid rgb(192 48 94 / 18%);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 70%);
}

.barra-lateral-turma--restricted {
  padding: 2px 6px;
  cursor: pointer;
}

.barra-lateral-turma:hover,
.barra-lateral-turma:focus-within {
  background: #F7DCE6;
}

.barra-lateral-user {
  display: grid;
  gap: 8px;
}

.barra-lateral-user-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.barra-lateral-user-link:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgb(0 96 93 / 12%);
  transform: translateY(-1px);
}

.barra-lateral-user-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.barra-lateral-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.app-barra-lateral .barra-lateral-user {
  padding: 10px;
}

.app-barra-lateral .logout-button {
  min-height: 30px;
}

@media (min-width: 1200px) {
  .barra-lateral-brand {
    gap: 8px;
    min-height: auto;
    padding: 2px 2px 12px;
    border-bottom: 1px solid rgb(255 255 255 / 12%);
  }

  .barra-lateral-brand__identity {
    gap: 9px;
    min-width: 0;
    padding: 0 6px;
  }

  .barra-lateral-turma {
    width: auto;
    margin-left: 37px;
    background: transparent;
    color: rgb(255 255 255 / 80%);
    font-size: 11.5px;
    font-weight: 500;
  }

  .barra-lateral-turma--select {
    width: calc(100% - 43px);
  }

  .barra-lateral-turma__select {
    appearance: none;
    width: 100%;
    min-width: 0;
    height: 29px;
    padding: 0 28px 0 9px;
    border-color: rgb(255 255 255 / 30%);
    background-color: #C0305E;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
    box-shadow: 0 4px 10px rgb(74 19 39 / 16%);
  }

  .barra-lateral-turma__select:hover {
    border-color: rgb(255 255 255 / 44%);
    background-color: #A92952;
  }

  .barra-lateral-turma__select:focus-visible {
    border-color: #ffffff;
    outline: 2px solid rgb(192 48 94 / 30%);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 46%), 0 5px 12px rgb(74 19 39 / 20%);
  }

  .barra-lateral-turma__select option {
    background: #ffffff;
    color: #1d2421;
  }

  .barra-lateral-turma--restricted {
    border: 1px solid rgb(255 255 255 / 16%);
    background: rgb(255 255 255 / 8%);
  }

  .barra-lateral-turma:hover,
  .barra-lateral-turma:focus-within {
    background: rgb(255 255 255 / 12%);
  }

  .nav-list {
    gap: 2px;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / 24%) transparent;
  }

  .nav-link {
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: rgb(255 255 255 / 72%);
    box-shadow: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }

  .nav-link:hover {
    border-color: rgb(255 255 255 / 8%);
    background: rgb(255 255 255 / 10%);
    color: #ffffff;
  }

  .nav-link.is-active {
    border-color: rgb(255 255 255 / 10%);
    background: rgb(255 255 255 / 16%);
    color: #ffffff;
    box-shadow: inset 3px 0 0 rgb(255 255 255 / 86%);
  }

  .nav-link-label {
    font-size: 11.5px;
    font-weight: 600;
  }

  .nav-link .menu-icon,
  .nav-link.is-active .menu-icon {
    width: 18px;
    color: currentColor;
    font-size: 15px;
  }

  .barra-lateral-footer {
    gap: 7px;
    padding-top: 10px;
    border-top: 1px solid rgb(255 255 255 / 12%);
  }

  .app-barra-lateral .pwa-install-button {
    min-height: 34px;
    border-color: rgb(255 255 255 / 15%);
    border-radius: 7px;
    background: rgb(255 255 255 / 8%);
    color: rgb(255 255 255 / 80%);
    font-size: 11.5px;
    font-weight: 500;
    font-size: 11px;
    font-weight: 620;
    transform: none;
  }

  .app-barra-lateral .pwa-install-button:hover,
  .app-barra-lateral .pwa-install-button:focus-visible {
    border-color: rgb(255 255 255 / 24%);
    background: rgb(255 255 255 / 13%);
    color: #ffffff;
    transform: none;
  }

  .app-barra-lateral .pwa-install-button.is-installed {
    border-color: rgb(255 255 255 / 10%);
    background: rgb(255 255 255 / 5%);
    color: rgb(255 255 255 / 54%);
  }

  .app-barra-lateral .barra-lateral-user {
    padding: 9px;
    border-color: rgb(255 255 255 / 15%);
    border-radius: 7px;
    background: rgb(255 255 255 / 8%);
    color: #ffffff;
    box-shadow: none;
  }

  .app-barra-lateral .barra-lateral-user-link:hover {
    border-color: rgb(255 255 255 / 24%);
    background: rgb(255 255 255 / 13%);
    box-shadow: none;
    transform: none;
  }

  .app-barra-lateral .barra-lateral-user-link:focus-visible {
    outline-color: rgb(255 255 255 / 72%);
  }

  .app-barra-lateral .barra-lateral-user .avatar {
    border-color: rgb(255 255 255 / 24%);
    background: rgb(255 255 255 / 14%);
    color: #ffffff;
  }

  .app-barra-lateral .barra-lateral-user .person-title strong {
    color: #ffffff;
    font-size: 11.5px;
  }

  .app-barra-lateral .barra-lateral-user .person-title span {
    color: rgb(255 255 255 / 62%);
    font-size: 11px;
  }

  .app-barra-lateral .logout-button {
    min-height: 32px;
    border-color: rgb(255 255 255 / 14%);
    border-radius: 7px;
    background: transparent;
    color: rgb(255 255 255 / 72%);
    font-size: 11px;
  }

  .app-barra-lateral .logout-button:hover,
  .app-barra-lateral .logout-button:focus-visible {
    border-color: rgb(255 184 184 / 28%);
    background: rgb(123 28 36 / 22%);
    color: #ffffff;
  }

  html[data-theme="dark"] .app-barra-lateral,
  html[data-theme="dark"] .desktop-shell-header {
    border-color: var(--desktop-chrome-border);
    background: var(--desktop-chrome-bg);
  }

  html[data-theme="dark"] .barra-lateral-brand,
  html[data-theme="dark"] .barra-lateral-footer {
    border-color: rgb(154 177 187 / 14%);
  }

  html[data-theme="dark"] .barra-lateral-turma--restricted,
  html[data-theme="dark"] .theme-toggle,
  html[data-theme="dark"] .app-barra-lateral .pwa-install-button,
  html[data-theme="dark"] .app-barra-lateral .barra-lateral-user,
  html[data-theme="dark"] .app-barra-lateral .logout-button {
    border-color: rgb(154 177 187 / 16%);
    background: rgb(255 255 255 / 5%);
  }

  html[data-theme="dark"] .nav-link {
    color: rgb(234 242 244 / 70%);
  }

  html[data-theme="dark"] .nav-link:hover {
    border-color: rgb(122 212 203 / 12%);
    background: rgb(122 212 203 / 8%);
    color: #f5fbfa;
  }

  html[data-theme="dark"] .nav-link.is-active {
    border-color: rgb(122 212 203 / 14%);
    background: rgb(122 212 203 / 12%);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #7ad4cb;
  }

  html[data-theme="dark"] .barra-lateral-turma:hover,
  html[data-theme="dark"] .barra-lateral-turma:focus-within,
  html[data-theme="dark"] .app-barra-lateral .pwa-install-button:hover,
  html[data-theme="dark"] .app-barra-lateral .pwa-install-button:focus-visible,
  html[data-theme="dark"] .app-barra-lateral .barra-lateral-user-link:hover {
    border-color: rgb(122 212 203 / 20%);
    background: rgb(122 212 203 / 9%);
  }

  html[data-theme="dark"] .barra-lateral-turma__select option {
    background: var(--card);
    color: var(--text);
  }
}

#app-root {
  width: min(100%, 1420px);
  max-width: 1420px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

.app-barra-lateral {
  display: none;
}

.desktop-shell-header,
.tablet-shell-header,
.menu-tablet,
.tablet-nav-scrim {
  display: none;
}

.app-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-width: 0;
}

.barra-superior {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 12px 0;
  background: var(--bg);
}

.barra-superior-copy {
  display: grid;
}

.barra-superior--branded .barra-superior-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

.barra-superior-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.barra-superior h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.barra-superior--branded h1 {
  color: #527674;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

.page-container {
  width: calc(100% - 24px);
  margin: 0 auto;
  padding: 16px 0 36px;
}

.app-footer {
  align-self: end;
  padding: 0 12px 18px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.page-section {
  display: grid;
  gap: 18px;
}

.page-header {
  min-height: 40px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.page-actions,
.toolbar,
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grid {
  display: grid;
  gap: 10px;
}

.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

.navegacao-inferior {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  height: calc(48px + env(safe-area-inset-bottom));
  padding: 0 6px env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: var(--menu-bg);
  box-shadow: 0 -3px 12px rgb(15 23 42 / 6%);
  backdrop-filter: none;
}

.app-main {
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
}

.navegacao-inferior__item {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 48px;
  padding: 5px 3px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.navegacao-inferior__item .menu-icon {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 17px;
  line-height: 1;
}

.navegacao-inferior__label {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(9px, 2.75vw, 10.5px);
  font-weight: 500;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.navegacao-inferior__item::before {
  position: absolute;
  top: 0;
  right: 16%;
  left: 16%;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: transparent;
  content: "";
  transition: background-color 160ms ease;
}

.navegacao-inferior__item:hover,
.navegacao-inferior__item:focus-visible {
  background: var(--active-bg);
  color: var(--teal-dark);
}

.navegacao-inferior__item.is-active {
  color: var(--teal-dark);
}

.navegacao-inferior__item.is-active::before {
  background: var(--teal);
}

.navegacao-inferior__item.is-active .navegacao-inferior__label {
  font-weight: 700;
}

.navegacao-inferior__item:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.navegacao-inferior__item--add {
  align-self: start;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0 auto;
  border: 1px solid #cfe1e0;
  border-radius: 50%;
  background: var(--active-bg);
  color: var(--teal-dark);
  box-shadow: 0 4px 10px rgb(15 23 42 / 10%);
  transform: translateY(-14px);
}

.navegacao-inferior__item--add:hover,
.navegacao-inferior__item--add:focus-visible {
  background: var(--surface-hover);
  color: var(--teal-dark);
}

.navegacao-inferior__item--add .menu-icon {
  font-size: 24px;
}

/* Responsive drawer: two fixed structural zones.
   The brand rail stays visible to the bottom; only the content panel owns
   the menu links and account controls. This keeps the existing page header
   untouched and mirrors the navigation structure used by the mobile design. */

.menu-mobile {
  --menu-responsivo-rail-width: 82px;
  --menu-responsivo-rail-bg: #047e7d;
  --menu-responsivo-rail-active: #035f5e;
  position: fixed;
  inset: var(--menu-responsivo-top-offset, 0px) auto 0 0;
  width: min(82vw, 340px);
  max-width: 340px;
  height: calc(100dvh - var(--menu-responsivo-top-offset, 0px));
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 0;
  background: var(--menu-responsivo-rail-bg);
  color: var(--text);
  box-shadow: 14px 0 38px rgb(15 23 42 / 18%);
}

.menu-mobile::backdrop {
  background: linear-gradient(
    to bottom,
    transparent 0 var(--menu-responsivo-top-offset, 0px),
    var(--drawer-backdrop) var(--menu-responsivo-top-offset, 0px) 100%
  );
}

.menu-mobile[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  animation: mobile-drawer-enter 180ms ease-out;
}

.menu-mobile::before,
.menu-tablet::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--menu-responsivo-rail-width, 82px);
  background: var(--menu-responsivo-rail-bg);
  content: "";
  pointer-events: none;
}

.menu-mobile > *,
.menu-tablet > * {
  position: relative;
  z-index: 1;
}

@keyframes mobile-drawer-enter {
  from { transform: translateX(-16px); opacity: .7; }
  to { transform: translateX(0); opacity: 1; }
}

.menu-mobile__close,
.menu-tablet__close {
  position: absolute;
  top: 13px;
  right: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--teal-dark);
  box-shadow: none;
}

.menu-mobile__close:hover,
.menu-mobile__close:focus-visible,
.menu-tablet__close:hover,
.menu-tablet__close:focus-visible {
  background: color-mix(in srgb, var(--teal) 7%, transparent);
}

.menu-mobile__close .menu-icon,
.menu-tablet__close .menu-icon {
  font-size: 25px;
}

.menu-responsivo-nav {
  display: grid;
  grid-template-columns: var(--menu-responsivo-rail-width, 82px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.menu-responsivo-nav__sections {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 0;
  overflow-y: auto;
  padding: 0;
  border-right: 0;
  background: var(--menu-responsivo-rail-bg, #047e7d);
  scrollbar-width: none;
}

.menu-responsivo-nav__sections::-webkit-scrollbar {
  display: none;
}

.menu-responsivo-nav__section {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 13px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.menu-responsivo-nav__section::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 0;
  background: transparent;
  content: "";
}

.menu-responsivo-nav__section-icon {
  color: currentColor;
  font-size: 24px;
  line-height: 1;
}

.menu-responsivo-nav__section-label {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-responsivo-nav__section:hover,
.menu-responsivo-nav__section:focus-visible {
  background: color-mix(in srgb, var(--menu-responsivo-rail-active, #035f5e) 72%, transparent);
  color: #ffffff;
}

.menu-responsivo-nav__section.is-active {
  background: var(--menu-responsivo-rail-active, #035f5e);
  color: #ffffff;
}

.menu-responsivo-nav__section.is-active::before {
  background: var(--team-accent);
}

.menu-responsivo-nav__section.is-blocked:not(.is-active) {
  color: rgb(255 255 255 / 90%);
}

.menu-responsivo-nav__section:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -3px;
  box-shadow: none;
}

.menu-responsivo-nav__links {
  min-width: 0;
  min-height: 0;
}

.menu-mobile__links,
.menu-tablet__links {
  display: grid;
  align-content: start;
  gap: 0;
  overflow-y: auto;
  padding: 58px 16px 18px;
  background: var(--card);
  scrollbar-gutter: stable;
}

.menu-responsivo-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 63px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.menu-responsivo-nav__link:hover,
.menu-responsivo-nav__link:focus-visible {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--teal) 4%, var(--card));
}

.menu-responsivo-nav__link.is-active {
  border-bottom-color: var(--border);
  background: transparent;
  color: var(--teal-dark);
}

.menu-responsivo-nav__link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
  box-shadow: none;
}

.menu-responsivo-nav__link-copy {
  display: grid;
  min-width: 0;
}

.menu-responsivo-nav__link-copy strong {
  overflow: hidden;
  color: currentColor;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.menu-responsivo-nav__link-chevron {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 23px;
}

.menu-responsivo-nav__message {
  align-self: start;
  margin: 16px 0 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.menu-mobile__footer,
.menu-tablet__footer {
  display: grid;
  gap: 10px;
  margin-left: var(--menu-responsivo-rail-width, 82px);
  padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--card);
}

.menu-mobile__footer .theme-toggle,
.menu-tablet__footer .theme-toggle {
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.menu-mobile__footer .theme-toggle__option,
.menu-tablet__footer .theme-toggle__option {
  min-height: 40px;
  border-radius: 0;
  font-size: 12px;
}

.menu-mobile__footer .theme-toggle__option .menu-icon,
.menu-tablet__footer .theme-toggle__option .menu-icon {
  font-size: 18px;
}

.menu-mobile__footer .pwa-install-button,
.menu-tablet__footer .pwa-install-button {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.menu-mobile__footer .pwa-install-button .menu-icon,
.menu-tablet__footer .pwa-install-button .menu-icon {
  font-size: 18px;
}

.menu-mobile__user,
.menu-tablet__user {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.menu-responsivo-user__chevron {
  color: var(--teal-dark);
  font-size: 22px;
}

.menu-mobile__user .person-header,
.menu-tablet__user .person-header {
  width: 100%;
  gap: 10px;
}

.menu-mobile__user .avatar,
.menu-tablet__user .avatar {
  width: 42px;
  height: 42px;
  font-size: 11px;
}

.menu-mobile__user .person-title strong,
.menu-tablet__user .person-title strong {
  font-size: 13px;
  font-weight: 740;
}

.menu-mobile__user .person-title span,
.menu-tablet__user .person-title span {
  font-size: 11px;
}

.menu-mobile__logout,
.menu-tablet__logout {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
}

.menu-mobile__logout .menu-icon,
.menu-tablet__logout .menu-icon {
  font-size: 18px;
}

html[data-theme="dark"] .menu-mobile,
html[data-theme="dark"] .menu-tablet:not([hidden]) {
  --menu-responsivo-rail-bg: var(--system-dark-barra-superior-solid);
  --menu-responsivo-rail-active: var(--system-dark-barra-superior-active);
  border-color: rgb(255 255 255 / 10%);
  background: var(--menu-responsivo-rail-bg);
  color: var(--text);
  box-shadow: 16px 0 44px rgb(0 0 0 / 46%);
}

html[data-theme="dark"] .menu-responsivo-nav__sections {
  background: var(--menu-responsivo-rail-bg, var(--system-dark-barra-superior-solid));
}

html[data-theme="dark"] .menu-mobile__links,
html[data-theme="dark"] .menu-tablet__links,
html[data-theme="dark"] .menu-mobile__footer,
html[data-theme="dark"] .menu-tablet__footer {
  background: var(--card);
}

html[data-theme="dark"] .menu-responsivo-nav__link:hover,
html[data-theme="dark"] .menu-responsivo-nav__link:focus-visible {
  background: color-mix(in srgb, var(--teal) 7%, var(--card));
}

@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 1200px) {
  #app-root {
    --desktop-barra-lateral-width: 210px;
    --desktop-header-height: 56px;
    --desktop-chrome-bg: #007e7a;
    --desktop-chrome-border: rgb(255 255 255 / 14%);
    --desktop-content-bg: var(--bg);
    --desktop-content-bg-top: var(--bg);
    --desktop-barra-lateral-shadow: 8px 0 22px rgb(20 55 54 / 12%);
    --desktop-header-shadow: 0 8px 20px rgb(20 55 54 / 9%);
    box-shadow: 0 0 0 1px rgb(15 23 42 / 4%), 0 18px 54px rgb(15 23 42 / 7%);
  }

  html[data-theme="dark"] #app-root {
    --desktop-chrome-bg: var(--system-dark-barra-superior-solid);
    --desktop-chrome-border: rgb(255 255 255 / 12%);
    --desktop-content-bg: var(--system-dark-page);
    --desktop-content-bg-top: var(--system-dark-page);
    --desktop-barra-lateral-shadow: 8px 0 24px rgb(0 0 0 / 28%);
    --desktop-header-shadow: 0 8px 22px rgb(0 0 0 / 24%);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 4%), 0 20px 58px rgb(0 0 0 / 26%);
  }

  .app-shell {
    grid-template-columns: var(--desktop-barra-lateral-width) minmax(0, 1fr);
    grid-template-rows: var(--desktop-header-height) minmax(0, 1fr);
    grid-template-areas:
      "barra-lateral desktop-header"
      "barra-lateral main";
  }

  #app-root:has(> .app-shell--area-trabalho-desktop) {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
  }

  .app-shell--area-trabalho-desktop {
    --desktop-barra-lateral-width: 172px;
    grid-template-columns: var(--desktop-barra-lateral-width) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "barra-lateral main";
  }

  .app-shell--area-trabalho-desktop > .desktop-shell-header {
    display: none;
  }

  .app-shell--area-trabalho-desktop > .app-barra-lateral {
    width: var(--desktop-barra-lateral-width);
    gap: 10px;
    padding: 16px 10px 14px;
    border-right-color: rgb(255 255 255 / 12%);
    background: linear-gradient(180deg, #087f7b 0%, #00736f 100%);
    box-shadow: 5px 0 18px rgb(20 55 54 / 10%);
  }

  html[data-theme="dark"] .app-shell--area-trabalho-desktop > .app-barra-lateral {
    border-right-color: rgb(255 255 255 / 9%);
    background: linear-gradient(180deg, var(--system-dark-barra-superior-solid) 0%, #062e2c 100%);
    box-shadow: 6px 0 22px rgb(0 0 0 / 28%);
  }

  .app-shell--area-trabalho-desktop .barra-lateral-brand {
    gap: 18px;
    padding: 0 0 14px;
    border-bottom: 0;
  }

  .app-shell--area-trabalho-desktop .barra-lateral-brand__vale {
    display: block;
    width: 92px;
    height: 34px;
    margin: 0 6px;
    object-fit: contain;
    object-position: left center;
  }

  .app-shell--area-trabalho-desktop .barra-lateral-brand__identity {
    display: none;
  }

  .app-shell--area-trabalho-desktop .barra-lateral-turma,
  .app-shell--area-trabalho-desktop .barra-lateral-turma--select {
    width: 100%;
    margin: 0;
  }

  .app-shell--area-trabalho-desktop .barra-lateral-turma__select {
    height: 41px;
    padding-inline: 14px 34px;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 9px;
    background-color: rgb(255 255 255 / 15%);
    box-shadow: none;
    font-size: 11px;
    font-weight: 700;
  }

  .app-shell--area-trabalho-desktop .barra-lateral-turma__select:hover,
  .app-shell--area-trabalho-desktop .barra-lateral-turma__select:focus-visible {
    border-color: rgb(255 255 255 / 25%);
    background-color: rgb(255 255 255 / 20%);
  }

  .app-shell--area-trabalho-desktop .app-main {
    display: block;
    min-height: 100vh;
    background: #f6f8f8;
  }

  html[data-theme="dark"] .app-shell--area-trabalho-desktop .app-main {
    background: var(--system-dark-page);
  }

  .app-shell--area-trabalho-desktop .page-container {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .app-shell--area-trabalho-desktop .app-footer {
    padding: 18px 24px;
  }

  .app-barra-lateral {
    grid-area: barra-lateral;
    position: sticky;
    top: 0;
    z-index: 24;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: var(--desktop-barra-lateral-width);
    min-height: 100vh;
    max-height: 100vh;
    padding: 14px 10px 12px;
    overflow: hidden;
    border-right: 1px solid var(--desktop-chrome-border);
    background: var(--desktop-chrome-bg);
    color: #ffffff;
    box-shadow: var(--desktop-barra-lateral-shadow);
  }

  .desktop-shell-header {
    grid-area: desktop-header;
    position: sticky;
    top: 0;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    height: var(--desktop-header-height);
    padding: 0 18px;
    border-bottom: 1px solid var(--desktop-chrome-border);
    background: var(--desktop-chrome-bg);
    color: #ffffff;
    box-shadow: var(--desktop-header-shadow);
  }

  .desktop-shell-header__inner {
    display: contents;
  }

  .desktop-shell-header__page {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .desktop-shell-header__page--compact {
    gap: 0;
  }

  .desktop-shell-header__title {
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-shell-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 8px;
    background: rgb(255 255 255 / 10%);
    color: #ffffff;
  }

  .desktop-shell-header__icon i {
    font-size: 16px;
  }

  .desktop-shell-header__copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    line-height: 1.15;
  }

  .desktop-shell-header__copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-shell-header__copy span {
    color: rgb(255 255 255 / 68%);
    font-size: 11px;
    font-weight: 600;
  }

  .desktop-shell-header__logo {
    width: auto;
    height: 30px;
    flex: 0 0 auto;
    object-fit: contain;
  }

  .app-main {
    grid-area: main;
    min-height: calc(100vh - var(--desktop-header-height));
    padding-bottom: 0;
    background: linear-gradient(
      180deg,
      var(--desktop-content-bg-top) 0,
      var(--desktop-content-bg) 180px
    );
  }

  .barra-superior {
    display: none;
  }

  .page-container {
    width: calc(100% - 44px);
    padding: 18px 0 40px;
  }

  .app-footer {
    padding-inline: 22px;
  }

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

  .navegacao-inferior {
    display: none;
  }
}

@media (max-width: 1199px) {
  body {
    background: var(--bg);
  }

  #app-root,
  .app-shell,
  .app-main {
    background: transparent;
  }

  .app-content {
    background: transparent;
  }

  html[data-theme="dark"] .app-content {
    background: var(--bg);
  }

  .navegacao-inferior {
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(54px + env(safe-area-inset-bottom));
    padding: 0 8px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid #e1e8e7;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 -8px 24px rgb(31 46 48 / 10%);
    backdrop-filter: none;
  }

  html[data-theme="dark"] .navegacao-inferior {
    border-top-color: rgb(255 255 255 / 8%);
    background: var(--card);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 34%);
  }

  .navegacao-inferior__item {
    min-height: 54px;
    border-radius: 0;
  }

  .navegacao-inferior__item--add {
    width: 50px;
    height: 50px;
    min-height: 50px;
    border: 2px solid #C0305E;
    border-radius: 50%;
    background: #ffffff;
    color: #C0305E;
    box-shadow: 0 6px 16px rgb(31 46 48 / 12%);
  }

  .navegacao-inferior__item--add .menu-icon {
    font-size: 30px;
  }

  .navegacao-inferior__item::before {
    display: none;
  }

  .navegacao-inferior__item:hover,
  .navegacao-inferior__item:focus-visible,
  .navegacao-inferior__item.is-active {
    background: rgb(0 137 128 / 12%);
  }

  html[data-theme="dark"] .navegacao-inferior__item:hover,
  html[data-theme="dark"] .navegacao-inferior__item:focus-visible,
  html[data-theme="dark"] .navegacao-inferior__item.is-active {
    background: var(--active-bg);
  }
}

@media (max-width: 1199px) {

  .page-container {
    padding-top: 12px;
  }
}

@media (max-width: 1199px) {

  .navegacao-inferior__item--add:hover,
  .navegacao-inferior__item--add:focus-visible,
  .navegacao-inferior__item--add.is-active {
    background: #ffffff;
    color: #C0305E;
  }
}

/* Rodapé e menu mobile no visual de vidro. */

@media (max-width: 1199px) {
  .app-main {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .app-footer {
    width: calc(100% - 24px);
    margin: 8px auto calc(78px + env(safe-area-inset-bottom));
    padding: 8px 10px;
    border: 1px solid rgb(255 255 255 / 42%);
    border-radius: 999px;
    background: rgb(255 255 255 / 42%);
    box-shadow: 0 10px 24px rgb(15 23 42 / 10%), inset 0 1px 0 rgb(255 255 255 / 52%);
    color: rgb(42 58 65 / 82%);
    font-size: 11px;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: none;
  }

  html[data-theme="dark"] .app-footer {
    border-color: rgb(255 255 255 / 14%);
    background: var(--surface);
    color: rgb(222 236 238 / 76%);
    box-shadow: 0 12px 28px rgb(0 0 0 / 24%), inset 0 1px 0 rgb(255 255 255 / 8%);
  }

}

/* Correção: rodapé simples e menu sem atraso visual no mobile. */

@media (max-width: 1199px) {
  .app-footer {
    width: auto;
    margin: 0 12px calc(74px + env(safe-area-inset-bottom));
    padding: 0 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgb(42 58 65 / 76%);
    font-size: 11px;
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    backdrop-filter: none;
  }

  html[data-theme="dark"] .app-footer {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: rgb(222 236 238 / 70%);
  }

}

/* Ajuste final do rodapé mobile claro. */

@media (max-width: 1199px) {
  .app-footer {
    margin: 0 12px 18px;
    padding: 0 0 4px;
    color: #ffffff;
  }
}

@media (max-width: 1199px) {
  .navegacao-inferior {
    height: calc(54px + env(safe-area-inset-bottom));
    padding: 0 8px env(safe-area-inset-bottom);
    border-color: #e1e8e7;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 -8px 24px rgb(31 46 48 / 10%);
    backdrop-filter: none;
  }

  .navegacao-inferior__item {
    height: 54px;
    color: #40524f;
  }

  .navegacao-inferior__item:hover,
  .navegacao-inferior__item:focus-visible,
  .navegacao-inferior__item.is-active {
    background: rgb(0 115 129 / 11%);
    color: #C0305E;
  }

  .navegacao-inferior__item--add {
    width: 50px;
    height: 50px;
    min-height: 50px;
    border: 2px solid #C0305E;
    border-radius: 50%;
    background: #ffffff;
    color: #C0305E;
    box-shadow: 0 6px 16px rgb(31 46 48 / 12%);
    transform: translateY(-14px);
  }

  .navegacao-inferior__item--add:hover,
  .navegacao-inferior__item--add:focus-visible {
    background: #ffffff;
    color: #C0305E;
  }

  .navegacao-inferior__item--add .menu-icon {
    font-size: 30px;
  }

  .app-footer {
    color: rgb(50 67 70 / 78%);
    text-shadow: 0 1px 0 rgb(255 255 255 / 64%);
  }

  html[data-theme="dark"] body {
    background: var(--system-dark-page);
  }

  html[data-theme="dark"] .navegacao-inferior {
    border-color: rgb(255 255 255 / 8%);
    background: var(--card);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 34%);
  }

  html[data-theme="dark"] .navegacao-inferior__item {
    color: rgb(222 236 238 / 82%);
  }

  html[data-theme="dark"] .navegacao-inferior__item:hover,
  html[data-theme="dark"] .navegacao-inferior__item:focus-visible,
  html[data-theme="dark"] .navegacao-inferior__item.is-active {
    background: var(--active-bg);
    color: #f2fbfb;
  }

  html[data-theme="dark"] .navegacao-inferior__item--add {
    border: 2px solid #C0305E;
    background: var(--surface);
    color: #C0305E;
    box-shadow: 0 8px 20px rgb(0 0 0 / 28%), inset 0 1px 0 rgb(255 255 255 / 8%);
  }

  html[data-theme="dark"] .navegacao-inferior__item--add:hover,
  html[data-theme="dark"] .navegacao-inferior__item--add:focus-visible {
    background: var(--surface);
    color: #C0305E;
  }

  html[data-theme="dark"] .app-footer {
    color: rgb(222 236 238 / 72%);
    text-shadow: none;
  }
}

@media (max-width: 1199px) {
  body::before,
  body::after {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    content: "";
  }

  body::before {
    top: 78px;
    left: 50%;
    width: min(118vw, 520px);
    height: min(118vw, 520px);
    background: linear-gradient(145deg, rgb(255 255 255 / 38%), rgb(212 225 224 / 30%));
    clip-path: polygon(0 27%, 23% 14%, 43% 24%, 58% 54%, 93% 18%, 100% 21%, 47% 96%);
    filter: none;
    opacity: 0.72;
    transform: translateX(-50%) rotate(-7deg);
    box-shadow: inset 18px 18px 28px rgb(255 255 255 / 66%), inset -20px -24px 34px rgb(131 151 151 / 18%);
  }

  body::after {
    top: 70px;
    left: 52%;
    width: min(82vw, 360px);
    height: min(34vw, 150px);
    background: linear-gradient(145deg, rgb(255 255 255 / 46%), rgb(218 229 226 / 34%));
    clip-path: polygon(0 64%, 22% 38%, 56% 20%, 80% 0, 100% 18%, 83% 62%, 55% 84%, 25% 82%);
    filter: none;
    opacity: 0.68;
    transform: translateX(-50%) rotate(-7deg);
    box-shadow: inset 14px 14px 22px rgb(255 255 255 / 70%), inset -16px -18px 26px rgb(131 151 151 / 16%);
  }

  html[data-theme="dark"] body::before {
    background: linear-gradient(145deg, rgb(154 219 214 / 9%), rgb(255 255 255 / 4%));
    filter: none;
    opacity: 0.52;
    box-shadow: inset 18px 18px 28px rgb(255 255 255 / 5%), inset -20px -24px 34px rgb(0 0 0 / 24%);
  }

  html[data-theme="dark"] body::after {
    background: linear-gradient(145deg, rgb(154 219 214 / 10%), rgb(255 255 255 / 5%));
    filter: none;
    opacity: 0.48;
    box-shadow: inset 14px 14px 22px rgb(255 255 255 / 5%), inset -16px -18px 26px rgb(0 0 0 / 22%);
  }
}

@media (max-width: 1199px) {
  body {
    position: relative;
  }

  body::before,
  body::after {
    top: 48dvh;
    left: 50%;
    z-index: 0;
    width: 24px;
    height: 24px;
    transform-origin: center;
  }

  body::before {
    background: linear-gradient(145deg, rgb(255 255 255 / 76%) 0%, rgb(226 236 235 / 58%) 45%, rgb(156 181 180 / 34%) 100%);
    clip-path: path("M21.91 8.05C13.601 15.511 10.343 -2.138 0 4.541L11.655 21 21.91 8.05z");
    opacity: 0.86;
    transform: translateX(-50%) scale(7.75) rotate(-5deg);
    filter: none;
  }

  body::after {
    background: linear-gradient(145deg, rgb(255 255 255 / 82%) 0%, rgb(229 238 236 / 62%) 48%, rgb(165 188 185 / 38%) 100%);
    clip-path: path("M12.779 7.636c5.5 -2.092 8.397 -5.323 11.221 -2.552 0 0 -1.105 1.88 -2.09 2.966 -1.567 1.728 -2.582 2.45 -4.566 2.482s-4.565 -2.896 -4.565 -2.896z");
    opacity: 0.9;
    transform: translateX(-50%) scale(7.75) rotate(-5deg);
    filter: none;
  }

  #app-root {
    position: relative;
    z-index: 1;
  }

  html[data-theme="dark"] body::before {
    background: linear-gradient(145deg, rgb(154 219 214 / 13%), rgb(255 255 255 / 5%));
    opacity: 0.58;
    filter: none;
  }

  html[data-theme="dark"] body::after {
    background: linear-gradient(145deg, rgb(154 219 214 / 15%), rgb(255 255 255 / 6%));
    opacity: 0.62;
    filter: none;
  }
}

@media (max-width: 1199px) {
  body::before,
  body::after {
    width: 28px;
    height: 26px;
  }

  body::before {
    background:
      radial-gradient(circle at 28% 20%, rgb(255 255 255 / 72%) 0%, transparent 30%),
      linear-gradient(145deg, rgb(230 248 246 / 80%) 0%, rgb(151 210 205 / 58%) 42%, rgb(0 115 129 / 28%) 100%);
    opacity: 0.9;
    filter: none;
  }

  body::after {
    background:
      radial-gradient(circle at 24% 22%, rgb(255 255 255 / 78%) 0%, transparent 34%),
      linear-gradient(145deg, rgb(255 248 220 / 86%) 0%, rgb(244 218 128 / 54%) 48%, rgb(168 129 22 / 26%) 100%);
    opacity: 0.94;
    filter: none;
  }

  html[data-theme="dark"] body::before,
  html[data-theme="dark"] body::after {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 1199px) {
  html:not([data-theme="dark"]) body::before,
  html:not([data-theme="dark"]) body::after {
    display: none;
  }
}

@media (max-width: 1199px) {
  .navegacao-inferior__item::before {
    display: block;
    top: 3px;
    right: 28%;
    left: 28%;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    content: "";
  }

  .navegacao-inferior__item:hover,
  .navegacao-inferior__item:focus-visible,
  .navegacao-inferior__item.is-active {
    background: transparent;
  }

  .navegacao-inferior__item.is-active {
    color: #C0305E;
  }

  .navegacao-inferior__item.is-active::before {
    background: #C0305E;
  }

  .navegacao-inferior__item:not(.is-active):hover,
  .navegacao-inferior__item:not(.is-active):focus-visible {
    color: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior__item:hover,
  html[data-theme="dark"] .navegacao-inferior__item:focus-visible,
  html[data-theme="dark"] .navegacao-inferior__item.is-active {
    background: transparent;
  }

  html[data-theme="dark"] .navegacao-inferior__item.is-active {
    color: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior__item.is-active::before {
    background: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior__item:not(.is-active):hover,
  html[data-theme="dark"] .navegacao-inferior__item:not(.is-active):focus-visible {
    color: #C0305E;
  }
}

@media (max-width: 1199px) {
  .hamburger-icon {
    display: grid;
    gap: 5px;
    width: 24px;
    color: currentColor;
  }

  .hamburger-icon__line {
    display: block;
    width: 100%;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 150ms ease, opacity 110ms ease;
  }

  .navegacao-inferior__item[aria-expanded="true"] .hamburger-icon__line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .navegacao-inferior__item[aria-expanded="true"] .hamburger-icon__line:nth-child(2) {
    opacity: 0;
  }

  .navegacao-inferior__item[aria-expanded="true"] .hamburger-icon__line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
}

.app-footer {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .app-footer {
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1199px) {
  .app-footer {
    width: auto;
    margin: 4px 16px 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgb(50 67 70 / 76%);
    text-shadow: 0 1px 0 rgb(255 255 255 / 58%);
  }

  html[data-theme="dark"] .app-footer {
    color: rgb(222 236 238 / 70%);
    text-shadow: none;
  }
}

.pwa-install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgb(0 126 123 / 18%);
  border-radius: 12px;
  background: rgb(0 126 123 / 8%);
  color: var(--teal-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 740;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pwa-install-button:hover,
.pwa-install-button:focus-visible {
  border-color: rgb(0 126 123 / 30%);
  background: rgb(0 126 123 / 12%);
  color: #035f5e;
  transform: translateY(-1px);
}

.pwa-install-button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pwa-install-button:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.pwa-install-button.is-installed {
  border-color: rgb(82 115 111 / 18%);
  background: rgb(82 115 111 / 8%);
  color: var(--text-2);
}

.pwa-install-button.is-unavailable {
  border-color: rgb(236 177 31 / 28%);
  background: rgb(236 177 31 / 10%);
  color: #8a6400;
}

.pwa-install-button.is-unavailable:hover,
.pwa-install-button.is-unavailable:focus-visible {
  border-color: rgb(236 177 31 / 42%);
  background: rgb(236 177 31 / 15%);
  color: #6f5100;
}

.pwa-install-button .menu-icon {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 17px;
}

html[data-theme="dark"] .pwa-install-button {
  border-color: rgb(154 219 214 / 16%);
  background: rgb(154 219 214 / 9%);
  color: #eef6f5;
}

html[data-theme="dark"] .pwa-install-button:hover,
html[data-theme="dark"] .pwa-install-button:focus-visible {
  border-color: rgb(154 219 214 / 24%);
  background: rgb(154 219 214 / 13%);
  color: #f2fbfb;
}

html[data-theme="dark"] .pwa-install-button.is-installed {
  border-color: rgb(222 236 238 / 10%);
  background: rgb(255 255 255 / 5%);
  color: rgb(222 236 238 / 72%);
}

html[data-theme="dark"] .pwa-install-button.is-unavailable {
  border-color: rgb(236 177 31 / 24%);
  background: rgb(236 177 31 / 10%);
  color: #f3ca67;
}

html[data-theme="dark"] .pwa-install-button.is-unavailable:hover,
html[data-theme="dark"] .pwa-install-button.is-unavailable:focus-visible {
  border-color: rgb(236 177 31 / 34%);
  background: rgb(236 177 31 / 14%);
  color: #f6d477;
}

/* FAB central da navegacao mobile. */

@media (max-width: 1199px) {
  .navegacao-inferior {
    height: calc(50px + env(safe-area-inset-bottom));
    padding: 0 10px env(safe-area-inset-bottom);
  }

  .navegacao-inferior .navegacao-inferior__item {
    height: 50px;
    min-height: 50px;
  }

  .navegacao-inferior .navegacao-inferior__item--add {
    align-self: start;
    width: 46px;
    height: 46px;
    min-height: 46px;
    margin: 0 auto;
    padding: 0;
    border: 2px solid #C0305E;
    border-radius: 50%;
    background: #ffffff;
    color: #C0305E;
    box-shadow: 0 7px 16px rgb(31 46 48 / 12%);
    transform: translateY(-10px);
  }

  .navegacao-inferior .navegacao-inferior__item--add:hover,
  .navegacao-inferior .navegacao-inferior__item--add:focus-visible,
  .navegacao-inferior .navegacao-inferior__item--add.is-active {
    background: #ffffff;
    color: #C0305E;
  }

  .navegacao-inferior .navegacao-inferior__item--add::before {
    display: none;
  }

  .navegacao-inferior .navegacao-inferior__item--add .menu-icon {
    font-size: 28px;
    line-height: 1;
  }

  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add {
    border-color: #C0305E;
    background: var(--surface);
    color: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:hover,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:focus-visible,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add.is-active {
    background: var(--surface);
    color: #C0305E;
  }
}

/* Botao adicionar mobile no estilo alvo. */

@media (max-width: 1199px) {
  .navegacao-inferior .navegacao-inferior__item--add {
    width: 54px;
    height: 54px;
    min-height: 54px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #C0305E;
    color: #C0305E;
    box-shadow: 0 8px 18px rgb(31 46 48 / 18%);
    transform: translateY(-15px);
  }

  .navegacao-inferior .navegacao-inferior__item--add:hover,
  .navegacao-inferior .navegacao-inferior__item--add:focus-visible,
  .navegacao-inferior .navegacao-inferior__item--add.is-active {
    background: #C0305E;
    color: #C0305E;
  }

  .navegacao-inferior .navegacao-inferior__item--add::after {
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #ffffff;
    content: "";
  }

  .navegacao-inferior .navegacao-inferior__item--add .menu-icon {
    position: relative;
    z-index: 1;
    color: #C0305E;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
  }

  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:hover,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:focus-visible,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add.is-active {
    border-color: #ffffff;
    background: #C0305E;
    color: #C0305E;
  }
}

@media (max-width: 1199px) {
  .navegacao-inferior {
    border-color: #d9e7e3;
    background: #ffffff;
    box-shadow: 0 -8px 22px rgb(31 46 48 / 12%);
  }

  .navegacao-inferior__item.is-active::before {
    background: #C0305E;
  }

  .navegacao-inferior__item:not(.navegacao-inferior__item--add):hover,
  .navegacao-inferior__item:not(.navegacao-inferior__item--add):focus-visible,
  .navegacao-inferior__item:not(.navegacao-inferior__item--add).is-active {
    background: transparent;
    color: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior {
    border-color: var(--border);
    background: var(--card);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 38%);
  }

  html[data-theme="dark"] .navegacao-inferior__item:not(.navegacao-inferior__item--add):hover,
  html[data-theme="dark"] .navegacao-inferior__item:not(.navegacao-inferior__item--add):focus-visible,
  html[data-theme="dark"] .navegacao-inferior__item:not(.navegacao-inferior__item--add).is-active {
    background: transparent;
    color: #C0305E;
  }

  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:hover,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add:focus-visible,
  html[data-theme="dark"] .navegacao-inferior .navegacao-inferior__item--add.is-active {
    border-color: var(--card);
    background: #C0305E;
    color: #C0305E;
  }
}

/* Fundo mobile solido, sem desenho decorativo. */

@media (max-width: 1199px) {
  body {
    background: var(--outer-bg);
  }

  body::before,
  body::after {
    display: none;
    content: none;
  }

  .app-content {
    background: var(--bg);
  }
}

/* Tablet: mesma arquitetura visual do mobile, com mais espaço útil. */

@media (min-width: 700px) and (max-width: 1199px) {
  #app-root {
    width: 100%;
    max-width: none;
  }

  .app-main {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .page-container {
    width: calc(100% - 32px);
    padding: 16px 0 34px;
  }

  .barra-superior {
    padding: 18px 16px 0;
  }

  .navegacao-inferior {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    height: calc(60px + env(safe-area-inset-bottom));
    padding: 0 max(16px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-right));
    border: 0;
    border-top: 1px solid #e1e8e7;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 -8px 24px rgb(31 46 48 / 10%);
  }

  html[data-theme="dark"] .navegacao-inferior {
    border-top-color: rgb(255 255 255 / 8%);
    background: var(--card);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 34%);
  }

  .navegacao-inferior .navegacao-inferior__item:not(:last-child) {
    display: flex;
  }

  .navegacao-inferior .navegacao-inferior__item {
    width: auto;
    height: 60px;
    min-height: 60px;
    padding: 6px 4px 5px;
    border-radius: 0;
  }

  .navegacao-inferior .navegacao-inferior__item .menu-icon {
    font-size: 20px;
  }

  .navegacao-inferior .navegacao-inferior__label {
    display: block;
    font-size: clamp(8.5px, 2.6vw, 10.5px);
  }

  .navegacao-inferior .navegacao-inferior__item--add {
    align-self: start;
    width: 54px;
    height: 54px;
    min-height: 54px;
    margin-inline: auto;
    padding: 0;
    border: 2px solid #C0305E;
    border-radius: 50%;
    transform: translateY(-14px);
  }

  .navegacao-inferior .navegacao-inferior__item--add .menu-icon {
    font-size: 31px;
  }

  .navegacao-inferior .navegacao-inferior__item:last-child .hamburger-icon {
    width: 22px;
  }

  .app-footer {
    margin-bottom: 18px;
  }

}

/* Tablet: navegação própria em formato de drawer abaixo do header. */

@media (min-width: 600px) and (min-height: 600px) and (max-width: 1199px),
       (min-width: 800px) and (min-height: 480px) and (max-width: 1199px) and (orientation: landscape) and (max-aspect-ratio: 2/1) {
  #app-root {
    --tablet-header-height: 68px;
    --tablet-menu-width: clamp(316px, 34vw, 356px);
  }

  .app-main {
    padding-bottom: 0;
  }

  .barra-superior,
  .navegacao-inferior {
    display: none;
  }

  .tablet-shell-header {
    position: sticky;
    top: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    min-height: calc(var(--tablet-header-height) + 6px);
    padding: 10px 20px;
    border-bottom: 1px solid rgb(255 255 255 / 18%);
    background: #007e7a;
    color: #ffffff;
    box-shadow: 0 4px 14px rgb(20 55 54 / 13%);
  }

  .tablet-shell-header__menu {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 10px;
    background: rgb(255 255 255 / 9%);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
  }

  .tablet-shell-header__menu:hover,
  .tablet-shell-header__menu:focus-visible,
  .tablet-shell-header__menu[aria-expanded="true"] {
    border-color: rgb(255 255 255 / 38%);
    background: rgb(255 255 255 / 17%);
  }

  .tablet-shell-header__menu:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
  }

  .tablet-shell-header__menu .hamburger-icon {
    display: grid;
    gap: 4px;
    width: 20px;
    color: currentColor;
  }

  .tablet-shell-header__menu .hamburger-icon__line {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 180ms cubic-bezier(.4, 0, .2, 1), opacity 130ms ease;
  }

  .tablet-shell-header__menu[aria-expanded="true"] .hamburger-icon__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .tablet-shell-header__menu[aria-expanded="true"] .hamburger-icon__line:nth-child(2) {
    opacity: 0;
  }

  .tablet-shell-header__menu[aria-expanded="true"] .hamburger-icon__line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .tablet-shell-header__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .tablet-shell-header__copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 20.5px;
    font-weight: 740;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tablet-shell-header__copy span {
    overflow: hidden;
    color: rgb(230 248 246 / 86%);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tablet-shell-header__logo {
    width: auto;
    height: 34px;
    object-fit: contain;
  }

  .tablet-shell-header__turma {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: rgb(255 255 255 / 86%);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }

  .tablet-shell-header__turma .shell-turma-selector__select {
    appearance: none;
    min-width: 52px;
    height: 30px;
    padding: 0 24px 0 9px;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 8px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23007e7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    color: #075d59;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .tablet-shell-header__turma .shell-turma-selector__select:focus-visible {
    outline: 2px solid #ecb11f;
    outline-offset: 2px;
  }

  .tablet-shell-header__copy--revezamento {
    grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  .tablet-shell-header__primary,
  .tablet-shell-header__meta {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .tablet-shell-header__meta strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tablet-shell-header__meta span,
  .tablet-shell-header__primary span {
    overflow: hidden;
    color: rgb(239 250 248 / 90%);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tablet-shell-header__divider {
    width: 1px;
    height: 36px;
    border-radius: 999px;
    background: rgb(255 255 255 / 34%);
  }

  .tablet-shell-header--revezamento {
    border-bottom: 3px solid #ecb11f;
  }

  .tablet-shell-header--revezamento .tablet-shell-header__copy {
    gap: 14px;
  }

  .tablet-shell-header--revezamento .tablet-shell-header__primary strong {
    font-size: 20.5px;
  }

  .tablet-shell-header--revezamento .tablet-shell-header__meta strong {
    font-size: 13px;
  }

  .tablet-nav-scrim:not([hidden]) {
    position: fixed;
    inset: var(--tablet-header-height) 0 0;
    z-index: 38;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    background: rgb(10 27 30 / 24%);
    cursor: default;
  }

  .menu-tablet:not([hidden]) {
    --menu-responsivo-rail-width: 92px;
    --menu-responsivo-rail-bg: #047e7d;
    --menu-responsivo-rail-active: #035f5e;
    position: fixed;
    top: var(--tablet-header-height);
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: min(430px, calc(100vw - 56px));
    height: calc(100dvh - var(--tablet-header-height));
    max-height: none;
    overflow: hidden;
    border: 0;
    border-right: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
    border-radius: 0;
    background: var(--menu-responsivo-rail-bg);
    color: var(--text);
    box-shadow: 14px 0 38px rgb(15 23 42 / 18%);
    animation: tablet-menu-drawer-enter 200ms cubic-bezier(.2, .8, .2, 1) both;
  }

  .menu-tablet .menu-responsivo-nav {
    grid-template-columns: var(--menu-responsivo-rail-width) minmax(0, 1fr);
  }

  .menu-tablet .menu-responsivo-nav__section {
    min-height: 102px;
  }

  .menu-tablet .menu-responsivo-nav__section-icon {
    font-size: 26px;
  }

  .menu-tablet .menu-responsivo-nav__section-label {
    max-width: 100%;
    overflow: hidden;
    color: currentColor;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-tablet__links {
    padding: 58px 20px 20px;
  }

  .menu-tablet__footer {
    gap: 10px;
    margin-left: var(--menu-responsivo-rail-width);
    padding: 12px 20px max(16px, env(safe-area-inset-bottom));
  }

  .menu-tablet__footer > * {
    min-width: 0;
  }

  html[data-theme="dark"] .tablet-shell-header {
    border-bottom-color: rgb(255 255 255 / 12%);
    background: var(--system-dark-barra-superior-solid);
    box-shadow: 0 5px 16px rgb(0 0 0 / 26%);
  }

  html[data-theme="dark"] .tablet-shell-header--revezamento {
    border-bottom-color: #ecb11f;
  }

  html[data-theme="dark"] .menu-tablet:not([hidden]) {
    --menu-responsivo-rail-bg: var(--system-dark-barra-superior-solid);
    --menu-responsivo-rail-active: var(--system-dark-barra-superior-active);
  }

  html[data-theme="dark"] .tablet-nav-scrim:not([hidden]) {
    background: rgb(0 0 0 / 34%);
  }
}

@keyframes tablet-menu-drawer-enter {
  from {
    opacity: .72;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tablet-shell-header__menu .hamburger-icon__line {
    transition: none;
  }

  .menu-tablet:not([hidden]) {
    animation: none;
  }
}

/* Chat: unread message indicator in the main navigation. */

.navegacao-inferior__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.navegacao-inferior__badge {
  position: absolute;
  top: -7px;
  left: calc(100% - 2px);
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid var(--menu-bg);
  border-radius: 999px;
  background: #C0305E;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgb(15 23 42 / 18%);
}

/* Mobile: cabeçalho corporativo compartilhado entre as páginas institucionais.
   Restrito ao celular; a partir de 600px o shell usa o header próprio de tablet. */

@media (max-width: 599px) {
  .barra-superior--branded {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 2px) 20px 8px;
    border: 0;
    border-bottom: 3px solid #ecb11f;
    border-radius: 0;
    background: #007e7a;
    box-shadow: 0 1px 0 rgb(20 55 54 / 13%);
  }

  .barra-superior--branded .barra-superior-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .barra-superior--branded .barra-superior-title {
    order: 1;
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .barra-superior--branded h1 {
    overflow: hidden;
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 740;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .barra-superior--branded .barra-superior-logo {
    order: 2;
    display: block;
    width: auto;
    height: 28px;
    margin-left: auto;
    object-fit: contain;
    flex: 0 0 auto;
  }

  html[data-theme="dark"] .barra-superior--branded {
    border-bottom-color: #ecb11f;
    background: var(--system-dark-barra-superior-solid);
    box-shadow: 0 1px 0 rgb(255 255 255 / 10%);
  }

  html[data-theme="dark"] .barra-superior--branded h1 {
    color: #ffffff;
  }

  html[data-theme="dark"] .barra-superior--branded .barra-superior-logo {
    filter: none;
  }

  .barra-superior--branded .barra-superior-date {
    display: none;
  }

  /* Revezamento usa o mesmo cabeçalho corporativo, com data própria e divisor neutro. */
  .app-main--revezamento > .barra-superior--branded {
    min-height: 62px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 7px);
    padding-bottom: 9px;
    border-bottom-width: 3px;
    border-bottom-color: #7f8b90;
  }

  .app-main--revezamento > .barra-superior--branded h1 {
    font-size: 19px;
    font-weight: 700;
  }

  .app-main--revezamento > .barra-superior--branded .barra-superior-date {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    font-weight: 440;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-theme="dark"] .app-main--revezamento > .barra-superior--branded {
    border-bottom-color: #8b98a0;
  }
}

/* Perfil: mantém o footer global e troca somente o acento cereja pelo verde do contexto do Perfil. */

/* Chat route: the phone view owns the useful viewport; larger layouts keep the shell structure. */

.app-main--chat {
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 100dvh;
  padding-bottom: 0;
  overflow: hidden;
}

.app-main--chat > .page-container {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

@supports not (height: 100dvh) {
  .app-main--chat {
    height: 100vh;
    min-height: 100vh;
  }
}

@media (min-width: 700px) {
  .app-main--chat {
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-main--chat > .page-container {
    width: calc(100% - 24px);
    height: 100%;
    margin: 0 auto;
    padding: 16px 0 36px;
    overflow: hidden;
  }
}

.app-main--perfil > .page-container { width: 100%; margin: 0; padding: 0 0 36px; }

.app-main--perfil .page-section { gap: 0px; }

@media (min-width: 1200px) {
  .app-main--perfil > .page-container { width: calc(100% - 44px); margin: 0px auto; padding: 18px 0px 40px; }
  .app-main--perfil .page-section { gap: 18px; }
}

@media (max-width: 1199px) {
  .app-main--revezamento { background: var(--bg); }
  html[data-theme="dark"] .app-main--revezamento { background: var(--system-dark-page); }
  html[data-theme="dark"] .app-main--central, html[data-theme="dark"] .app-main--movimentacoes, html[data-theme="dark"] .app-main--historico { background: var(--system-dark-page); }
  .app-main--revezamento .page-container { padding-top: 0px; background: var(--revezamento-page); }
  .app-main--revezamento .page-section { gap: 0px; }
}

@media (min-width: 600px) and (min-height: 600px) and (max-width: 1199px), (min-width: 800px) and (min-height: 480px) and (max-width: 1199px) and (orientation: landscape) and (max-aspect-ratio: 2 / 1) {
  .app-main--revezamento .page-container { width: 100%; max-width: none; padding: 0px 0px 26px; }
}

.area-trabalho-desktop-header { display: none; }

@media (min-width: 1200px) {
  .app-main--revezamento .page-container { width: 100%; max-width: none; margin: 0; padding: 0px; }
  .area-trabalho-desktop-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(0px, auto) auto;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 10px 24px 10px 28px;
    border-bottom: 1px solid rgb(229, 233, 233);
    background: rgb(255 255 255 / 96%);
    box-shadow: rgb(15 23 42 / 3%) 0 3px 14px;
    backdrop-filter: blur(12px);
  }
  .area-trabalho-desktop-header__copy { display: grid; gap: 3px; min-width: 0; }
  .area-trabalho-desktop-header__copy h1,
  .area-trabalho-desktop-header__copy p { margin: 0; }
  .area-trabalho-desktop-header__copy h1 { color: rgb(19, 33, 36); font-size: 17px; font-weight: 780; line-height: 1.15; letter-spacing: -0.02em; }
  .area-trabalho-desktop-header__copy p { display: flex; align-items: center; gap: 7px; color: rgb(102, 116, 118); font-size: 11px; font-weight: 600; }
  .area-trabalho-desktop-header__search { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid rgb(223, 229, 229); border-radius: 8px; background: var(--card); color: rgb(119, 131, 133); box-shadow: rgb(15 23 42 / 3%) 0 2px 8px; }
  .area-trabalho-desktop-header__search i { font-size: 16px; }
  .area-trabalho-desktop-header__search input { width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; }
  .area-trabalho-desktop-header__search:focus-within { border-color: color-mix(in srgb, var(--teal) 46%, #dfe5e5); box-shadow: rgb(0 126 122 / 8%) 0 0 0 3px; }
  .area-trabalho-desktop-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
  .area-trabalho-desktop-header__notification { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
  .area-trabalho-desktop-header__notification:hover,
  .area-trabalho-desktop-header__notification:focus-visible { background: var(--surface-hover); outline: none; }
  .area-trabalho-desktop-header__notification i { font-size: 19px; }
  .area-trabalho-desktop-header__notification-badge { position: absolute; top: 1px; right: 1px; display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border: 2px solid var(--card); border-radius: 999px; background: rgb(200, 59, 59); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
  .area-trabalho-desktop-header__profile { display: flex; align-items: center; gap: 6px; padding: 2px; border-radius: 999px; color: var(--text); text-decoration: none; }
  .area-trabalho-desktop-header__profile:hover,
  .area-trabalho-desktop-header__profile:focus-visible { background: var(--surface-hover); outline: none; }
  .area-trabalho-desktop-header__profile .avatar { width: 32px; height: 32px; border: 2px solid var(--card); box-shadow: var(--border) 0 0 0 1px; }
  .area-trabalho-desktop-header__profile > i { font-size: 14px; }
  html[data-theme="dark"] .area-trabalho-desktop-header { border-color: var(--border); background: var(--card); color: var(--text); box-shadow: rgb(0 0 0 / 20%) 0 3px 14px; }
  html[data-theme="dark"] .area-trabalho-desktop-header__copy h1 { color: var(--text); }
  html[data-theme="dark"] .area-trabalho-desktop-header__copy p { color: var(--text-2); }
  html[data-theme="dark"] .area-trabalho-desktop-header__search { border-color: var(--border); background: var(--field-bg); color: var(--text-2); }
  .area-trabalho-desktop-header { grid-template-columns: minmax(210px, 1fr) minmax(0px, auto) auto; }
  .area-trabalho-desktop-header--directory { grid-template-columns: minmax(190px, 0.75fr) minmax(520px, 1.65fr) auto; }
  .area-trabalho-desktop-header__controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0px; }
  .area-trabalho-desktop-header__controls .toggle-chip { flex: 0 0 auto; min-height: 30px; padding-inline: 10px; border-color: transparent; background: transparent; font-size: 11px; }
  .area-trabalho-desktop-header__controls .toggle-chip.is-active { border-color: rgb(215, 230, 228); background: rgb(255, 255, 255); box-shadow: rgba(15, 23, 42, 0.07) 0px 1px 3px; }
  html[data-theme="dark"] .area-trabalho-desktop-header__controls .toggle-chip.is-active { border-color: var(--border); background: var(--card); color: var(--teal); box-shadow: none; }
}

.app-main--chat .page-container { display: flex; min-height: 0px; }

@media (max-width: 699px) {
  body:has(.app-main--chat) { overflow: hidden; overscroll-behavior: none; }
  #app-root:has(.app-main--chat), #app-root:has(.app-main--chat) .app-shell, #app-root:has(.app-main--chat) .app-main--chat { width: 100%; height: 100dvh; min-height: 0px; overflow: hidden; }
  .app-main--chat { grid-template-rows: minmax(0, 1fr); padding-bottom: 0; }
  .app-main--chat .page-container { width: 100%; height: 100%; min-height: 0px; margin: 0px; padding: 0px; overflow: hidden; }
}

@media (min-width: 700px) and (max-width: 1199px) {
  .app-main--chat .page-container { width: calc(100% - 32px); height: calc(100dvh - 64px - 54px - env(safe-area-inset-bottom)); padding: 10px 0px 14px; }
}

@media (min-width: 1200px) {
  .app-main--chat .page-container { width: calc(100% - 44px); height: calc(-74px + 100vh); max-width: 1040px; padding: 18px 0px 22px; }
}


/* Contextos de navegação por página */

@media (max-width: 1199px) {
  .navegacao-inferior--perfil-context {
    --perfil-navegacao-destaque: #047e7d;
  }

  .navegacao-inferior--perfil-context .navegacao-inferior__item:not(.navegacao-inferior__item--add):hover,
  .navegacao-inferior--perfil-context .navegacao-inferior__item:not(.navegacao-inferior__item--add):focus-visible,
  .navegacao-inferior--perfil-context .navegacao-inferior__item:not(.navegacao-inferior__item--add).is-active {
    color: var(--perfil-navegacao-destaque);
  }

  .navegacao-inferior--perfil-context .navegacao-inferior__item--add,
  .navegacao-inferior--perfil-context .navegacao-inferior__item--add:hover,
  .navegacao-inferior--perfil-context .navegacao-inferior__item--add:focus-visible,
  .navegacao-inferior--perfil-context .navegacao-inferior__item--add.is-active {
    background: #ffffff;
    color: var(--perfil-navegacao-destaque);
  }

  .navegacao-inferior--perfil-context .navegacao-inferior__item--add .menu-icon {
    color: var(--perfil-navegacao-destaque);
  }

  .navegacao-inferior--perfil-context .navegacao-inferior__badge {
    background: var(--perfil-navegacao-destaque);
  }
}

.workspace-wide-shell-nav { display: none; }
.shell-turma-selector { display: none; }

/* Workspace operacional desktop: a partir de 1200px o sistema adota uma única linguagem visual sem sidebar.
   Revezamento mantém seu header específico porque possui busca e filtros próprios; as demais rotas
   usam o header do shell e a mesma navegação horizontal. Workspaces autônomos (Dados & Análises e MIKE)
   preservam sua composição própria. */
@media (min-width: 1200px) {
  #app-root:has(> .app-shell--workspace-wide) {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
  }

  .app-shell--workspace-wide {
    --workspace-wide-font: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    --workspace-wide-header: color-mix(in srgb, var(--teal-dark) 90%, #003e3c);
    --workspace-wide-page: #f4f7f7;
    --workspace-wide-surface: #ffffff;
    --workspace-wide-surface-soft: #f9fbfb;
    --workspace-wide-line: #d9e3e3;
    --workspace-wide-shadow: 0 10px 28px rgb(18 44 44 / 6%);
    --workspace-wide-accent: #3a65a1;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    background: var(--workspace-wide-page);
    color: var(--text);
    font-family: var(--workspace-wide-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .app-shell--workspace-wide > .app-barra-lateral {
    display: none;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) {
    grid-template-rows: var(--workspace-wide-header-height) var(--workspace-wide-nav-height) minmax(0, 1fr);
    grid-template-areas:
      "desktop-header"
      "controle-nav"
      "main";
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header {
    grid-area: desktop-header;
    position: sticky;
    top: 0;
    z-index: 30;
    display: block;
    width: 100%;
    height: var(--workspace-wide-header-height);
    padding: 0;
    border-bottom: 0;
    background: var(--workspace-wide-header);
    color: #fff;
    box-shadow: 0 8px 22px rgb(0 63 61 / 14%);
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header > .desktop-shell-header__inner {
    display: grid;
    grid-template-columns: 84px minmax(180px, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(100%, var(--workspace-wide-max-width));
    min-height: var(--workspace-wide-header-height);
    margin-inline: auto;
    padding: 9px var(--workspace-wide-gutter);
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header .desktop-shell-header__logo {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    box-sizing: content-box;
    width: 66px;
    height: 35px;
    padding-right: 14px;
    border-right: 1px solid rgb(255 255 255 / 20%);
    object-fit: contain;
    object-position: left center;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header .desktop-shell-header__page {
    grid-column: 2;
    min-width: 0;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header .desktop-shell-header__icon {
    display: none;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header .desktop-shell-header__copy strong {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .desktop-shell-header .desktop-shell-header__copy span {
    color: rgb(255 255 255 / 80%);
    font-size: 11.5px;
    font-weight: 500;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__notification,
  .app-shell--workspace-wide .workspace-wide-shell-header__profile {
    color: #fff;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__notification {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__notification:hover,
  .app-shell--workspace-wide .workspace-wide-shell-header__notification:focus-visible,
  .app-shell--workspace-wide .workspace-wide-shell-header__profile:hover,
  .app-shell--workspace-wide .workspace-wide-shell-header__profile:focus-visible {
    background: rgb(255 255 255 / 13%);
    outline: none;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__notification i {
    font-size: 18px;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-grid;
    place-items: center;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border: 2px solid var(--workspace-wide-header);
    border-radius: 999px;
    background: rgb(200, 59, 59);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__profile {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px;
    border-radius: 999px;
    text-decoration: none;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__profile .avatar {
    width: 32px;
    height: 32px;
    border: 2px solid rgb(255 255 255 / 74%);
    box-shadow: rgb(255 255 255 / 25%) 0 0 0 1px;
  }

  .app-shell--workspace-wide .workspace-wide-shell-header__profile > i {
    font-size: 14px;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .workspace-wide-shell-nav {
    grid-area: controle-nav;
  }

  .app-shell--workspace-revezamento {
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "main";
  }

  .app-shell--workspace-revezamento > .desktop-shell-header {
    display: none;
  }

  .app-shell--workspace-wide > .app-main {
    grid-area: main;
    width: 100%;
    min-width: 0;
    min-height: 0;
    background: var(--workspace-wide-page);
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .app-main {
    justify-self: center;
    max-width: var(--workspace-wide-max-width);
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) .app-main--chat .page-container {
    height: calc(100vh - 114px);
  }

  :is(
    .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .workspace-wide-shell-nav,
    .app-shell--workspace-revezamento .revezamento-workspace-wide-nav
  ) {
    position: sticky;
    z-index: 29;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 3px;
    width: 100%;
    min-height: var(--workspace-wide-nav-height);
    padding: 0 var(--workspace-wide-gutter);
    overflow-x: auto;
    border-bottom: 1px solid var(--workspace-wide-line);
    background: var(--workspace-wide-surface);
    box-shadow: 0 4px 14px rgb(15 23 42 / 4%);
    scrollbar-width: thin;
  }

  .workspace-wide-nav-tools {
    position: sticky;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    min-height: var(--workspace-wide-nav-height);
    margin-left: auto;
    padding-left: 10px;
    border-left: 1px solid var(--workspace-wide-line);
    background: var(--workspace-wide-surface);
  }

  .workspace-wide-nav-turma {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }

  .workspace-wide-nav-turma .shell-turma-selector__select,
  .workspace-wide-nav-turma .revezamento-lista-controle-turma__select {
    appearance: none;
    min-width: 54px;
    height: 28px;
    padding: 0 29px 0 8px;
    border: 1px solid color-mix(in srgb, var(--workspace-wide-accent) 32%, var(--workspace-wide-line));
    border-radius: 5px;
    background-color: var(--workspace-wide-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(var(--workspace-wide-accent), var(--workspace-wide-accent));
    background-repeat: no-repeat, no-repeat;
    background-position: right 7px center, right center;
    background-size: 11px, 24px 100%;
    color: var(--text);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }

  .workspace-wide-nav-turma .shell-turma-selector__select:focus-visible,
  .workspace-wide-nav-turma .revezamento-lista-controle-turma__select:focus-visible {
    border-color: var(--workspace-wide-accent);
    outline: 2px solid color-mix(in srgb, var(--workspace-wide-accent) 16%, transparent);
    outline-offset: 1px;
  }

  .workspace-wide-nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--workspace-wide-accent) 24%, var(--workspace-wide-line));
    border-radius: 6px;
    background: var(--workspace-wide-surface);
    color: var(--workspace-wide-accent);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }

  .workspace-wide-nav-logout:hover,
  .workspace-wide-nav-logout:focus-visible {
    border-color: color-mix(in srgb, var(--workspace-wide-accent) 48%, var(--workspace-wide-line));
    background: color-mix(in srgb, var(--workspace-wide-accent) 7%, var(--workspace-wide-surface));
    outline: none;
  }

  .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .workspace-wide-shell-nav {
    top: var(--workspace-wide-header-height);
  }

  .app-shell--workspace-revezamento .revezamento-workspace-wide-nav {
    top: var(--workspace-wide-header-height);
  }

  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ) {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: calc(var(--workspace-wide-nav-height) - 1px);
    padding: 0 11px;
    border: 0;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--text-2);
    font: inherit;
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
  }

  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ) > i {
    width: 16px;
    color: var(--workspace-wide-accent);
    font-size: 14px;
    text-align: center;
  }

  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ):hover,
  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ):focus-visible {
    background: color-mix(in srgb, var(--workspace-wide-accent) 6%, var(--workspace-wide-surface));
    color: color-mix(in srgb, var(--workspace-wide-accent) 84%, var(--text));
    outline: none;
  }

  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ).is-active {
    background: color-mix(in srgb, var(--workspace-wide-accent) 8%, var(--workspace-wide-surface));
    color: var(--workspace-wide-accent);
    font-weight: 700;
  }

  :is(
    .workspace-wide-shell-nav__item,
    .revezamento-workspace-wide-nav__item
  ).is-active::after {
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--workspace-wide-accent);
    content: "";
  }

  html[data-theme="dark"] .app-shell--workspace-wide {
    --workspace-wide-header: var(--system-dark-barra-superior-solid);
    --workspace-wide-page: var(--system-dark-page);
    --workspace-wide-surface: var(--card);
    --workspace-wide-surface-soft: var(--surface);
    --workspace-wide-line: var(--border);
    --workspace-wide-shadow: 0 12px 28px rgb(0 0 0 / 24%);
  }

  html[data-theme="dark"] :is(
    .app-shell--workspace-wide:not(.app-shell--workspace-revezamento) > .workspace-wide-shell-nav,
    .app-shell--workspace-revezamento .revezamento-workspace-wide-nav
  ) {
    background: var(--workspace-wide-surface);
  }
}
