/* Bundled and Cleaned CSS - Trajeto App App */

@font-face {
  font-family: 'Barakat';
  src: url('../fonts/barakat_regular.woff2') format('woff2'),
       url('../fonts/barakat_regular.ttf') format('truetype'),
       url('../fonts/barakat_regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- tokens.css --- */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #697586;
  --line: #d9e2ec;
  --accent: #19735e;
  --accent-strong: #125545;
  --accent-soft: #e4f3ef;
  --ink: #0f1f2f;
  --warning: #9a5b00;
  --danger: #b42318;
  --shadow-sm: 0 10px 28px rgba(17, 31, 48, 0.08);
  --shadow-md: 0 18px 50px rgba(17, 31, 48, 0.12);
  --sidebar-width: 264px;
  --sidebar-collapsed-width: 76px;
  --topbar-height: 58px;
}




/* --- layout.css --- */
.app-shell {
  background: #f4f7fb;
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
.app-shell .app-main {
  flex: 1;
  max-width: none;
  padding: 28px 28px 18px;
  width: 100%;
  min-width: 0;
}
@media (max-width: 639.98px) {
  .app-shell .app-main {
    padding: 16px 12px 18px;
  }
}
.app-sidebar {
  background:
    linear-gradient(180deg, rgba(40, 169, 129, 0.14), transparent 220px),
    #102238;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 34px rgba(15, 31, 47, 0.14);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  transition: width 0.24s ease;
  width: var(--sidebar-width);
  z-index: 30;
}
.app-sidebar-edge-toggle {
  align-items: center;
  background: rgba(18, 85, 69, 0.92);
  border: 1px solid rgba(121, 215, 189, 0.45);
  border-radius: 999px;
  box-shadow:
    0 12px 28px rgba(15, 31, 47, 0.22),
    0 0 0 6px rgba(40, 169, 129, 0.08);
  color: #f8fafc;
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 48px;
  z-index: 35;
}
.app-sidebar-edge-toggle:hover {
  background: #19735e;
  box-shadow:
    0 14px 32px rgba(15, 31, 47, 0.26),
    0 0 0 8px rgba(40, 169, 129, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.03);
}
.app-sidebar-edge-icon {
  line-height: 1;
}
.app-sidebar-edge-icon-expand {
  display: none;
}
.app-clock-sidebar-toggle {
  align-items: center;
  background: rgba(18, 85, 69, 0.92);
  border: 1px solid rgba(121, 215, 189, 0.45);
  border-radius: 999px;
  box-shadow:
    0 12px 28px rgba(15, 31, 47, 0.22),
    0 0 0 6px rgba(40, 169, 129, 0.08);
  color: #f8fafc;
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  left: 16px;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 48px;
  z-index: 60;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-toggle {
  left: calc(var(--sidebar-width) - 24px);
}
.app-clock-sidebar-toggle:hover {
  background: #19735e;
  box-shadow:
    0 14px 32px rgba(15, 31, 47, 0.26),
    0 0 0 8px rgba(40, 169, 129, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.03);
}
.app-clock-sidebar-icon-close {
  display: none;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-icon-open {
  display: none;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-icon-close {
  display: inline-block;
}
.app-clock-page .app-sidebar {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}
.app-clock-page .app-shell.clock-sidebar-open .app-sidebar {
  transform: translateX(0);
}
.app-clock-page .app-content-shell,
.app-clock-page .app-shell.sidebar-collapsed .app-content-shell {
  margin-left: 0;
  width: 100%;
}
.app-clock-page .app-sidebar-edge-toggle {
  display: none;
}
.app-sidebar-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  min-height: var(--topbar-height);
  padding: 12px 18px;
}
.app-sidebar-brand-link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  gap: 10px;
  min-width: 0;
}
.app-sidebar-brand-link:hover {
  color: #fff;
}
/* A marca só existe dentro dos links de brand (sidebar e header público). */
.brand-logo {
  transition: opacity 0.2s ease;
  /* O contorno é traçado em cima da borda do viewBox e precisa vazar alguns px. */
  overflow: visible;
}
/* A marca é um bloco só: logo e texto reagem juntos ao hover do link. */
a:hover > .brand-logo,
a:hover > .app-sidebar-brand-text {
  opacity: 0.75;
}

/* Contorno traçado como um percurso único: o triângulo externo primeiro, depois
   o A e os dois T, um de cada vez. Ao fechar a última forma tudo dissolve e a
   marca descansa até o ciclo recomeçar.

   A ilusão de "uma linha só" depende de duas coisas:

   1. Velocidade constante da caneta — 2141,7 unidades/s, de onde saem as
      janelas de tempo abaixo. Cada forma leva o tempo proporcional ao seu
      próprio comprimento, e nenhuma corre mais que a outra.
   2. Easing LINEAR, obrigatoriamente. Com curva de aceleração a caneta
      desaceleraria no fim de cada forma e arrancaria de novo na seguinte,
      expondo as emendas.

   O ciclo é de 14,6s: 3s de desenho, 0,3s com o contorno completo em tela, 0,1s
   de dissolução, 1,2s de reflexo e 10s de repouso. Todos os paths compartilham
   essa duração e diferem apenas nas porcentagens, o que os mantém em fase sem
   depender de animation-delay:

     forma        compr.    janela             keyframes
     triângulo    3000,0    0,000s a 1,401s    0%       a  9,596%
     A            1159,5    1,401s a 1,942s    9,596%   a 13,301%
     T esquerdo   1132,8    1,942s a 2,471s   13,301%   a 16,925%
     T direito    1132,8    2,471s a 3,000s   16,925%   a 20,548%
     completo               3,000s a 3,300s   20,548%   a 22,603%
     dissolve               3,300s a 3,400s   22,603%   a 23,288%
     reflexo                3,400s a 4,600s   23,288%   a 31,507%
     repouso                4,600s a 14,600s  31,507%   a 100%

   As porcentagens são relativas à duração: ao mexer nos 14,6s, todas mudam de
   significado e precisam ser recalculadas.

   Cada dasharray é o comprimento da própria forma com ~10 de folga, para o
   traço fechar sem deixar sobra no ponto de emenda. Remedir se a arte mudar. */
@keyframes brand-logo-traco-externo {
  0%       { stroke-dashoffset: 3010; }
  9.596%   { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 0; }
}
@keyframes brand-logo-traco-a {
  0%       { stroke-dashoffset: 1170; }
  9.596%   { stroke-dashoffset: 1170; }
  13.301%  { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 0; }
}
@keyframes brand-logo-traco-t-esq {
  0%       { stroke-dashoffset: 1143; }
  13.301%  { stroke-dashoffset: 1143; }
  16.925%  { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 0; }
}
@keyframes brand-logo-traco-t-dir {
  0%       { stroke-dashoffset: 1143; }
  16.925%  { stroke-dashoffset: 1143; }
  20.548%  { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 0; }
}
/* O patamar entre 20,548% e 22,603% é o contorno completo parado em tela; a
   queda seguinte, de apenas 0,685% do ciclo, é a dissolução de 0,1s. */
@keyframes brand-logo-trajeto-presenca {
  0%       { opacity: 0; }
  0.959%   { opacity: 1; }
  22.603%  { opacity: 1; }
  23.288%  { opacity: 0; }
  100%     { opacity: 0; }
}
/* Reflexo diagonal sobre a área preenchida, depois que o contorno se dissolve.
   O translate corre no eixo já girado pelo transform do SVG. Os extremos (0 e
   2600) deixam a faixa inteiramente fora da marca, então ela não precisa de
   controle de opacidade: durante o repouso simplesmente não há o que ver.
   Conferido: no sistema girado a marca ocupa x de -132,9 a 1132,9. */
@keyframes brand-logo-brilho {
  0%       { transform: translateX(0); }
  23.288%  { transform: translateX(0); }
  31.507%  { transform: translateX(2600px); }
  100%     { transform: translateX(2600px); }
}
.brand-logo-trajeto {
  opacity: 0;
  animation: brand-logo-trajeto-presenca 14.6s ease infinite;
}
.brand-logo-trajeto > path {
  animation-duration: 14.6s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.brand-logo-brilho {
  transform: translateX(0);
  animation: brand-logo-brilho 14.6s ease-in-out infinite;
}
.brand-logo-traco-halo,
.brand-logo-traco-externo {
  stroke-dasharray: 3010;
  stroke-dashoffset: 3010;
  animation-name: brand-logo-traco-externo;
}
.brand-logo-traco-halo {
  stroke-width: 50;
  opacity: 0.3;
}
.brand-logo-traco-a {
  stroke-dasharray: 1170;
  stroke-dashoffset: 1170;
  animation-name: brand-logo-traco-a;
}
.brand-logo-traco-t-esq {
  stroke-dasharray: 1143;
  stroke-dashoffset: 1143;
  animation-name: brand-logo-traco-t-esq;
}
.brand-logo-traco-t-dir {
  stroke-dasharray: 1143;
  stroke-dashoffset: 1143;
  animation-name: brand-logo-traco-t-dir;
}
/* Espessura única nas quatro formas: caneta uniforme reforça a leitura de traço
   contínuo. O teto é a parte estreita do "A", de ~19 unidades — acima disso o
   traço fecha o vão em vez de contorná-lo. */
.brand-logo-traco-externo,
.brand-logo-traco-a,
.brand-logo-traco-t-esq,
.brand-logo-traco-t-dir {
  stroke-width: 18;
}
@media (prefers-reduced-motion: reduce) {
  .brand-logo-trajeto,
  .brand-logo-trajeto > path,
  .brand-logo-brilho {
    animation: none;
  }
}
.app-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  font-family: 'Barakat', sans-serif;
  font-size: 12px;
  line-height: 1.15;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.18s ease;
  white-space: nowrap;
  width: 122px;
}
/* Reflexo do texto, irmão do .brand-logo-brilho: mesmo ciclo de 14,6s e mesma
   leitura (lóbulo escuro + núcleo claro), porque texto branco sobre fundo
   escuro não mostraria uma faixa só de branco.

   A faixa é pintada como background e recortada nos glifos, então a cor do
   texto precisa ser transparente — daí o @supports: sem background-clip: text
   o texto sumiria. O fundo branco sob a faixa é o que faz as vezes da cor.

   A janela é 2,7% (~0,4s) depois da janela da logo: a varredura é diagonal e
   corre da esquerda para a direita, então acerta a logo primeiro e o texto em
   seguida, lendo como um reflexo só atravessando a marca inteira. */
@keyframes brand-text-brilho {
  0%       { background-position: 130% 0; }
  26%      { background-position: 130% 0; }
  34.219%  { background-position: -30% 0; }
  100%     { background-position: -30% 0; }
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .app-sidebar-brand-text {
    -webkit-background-clip: text;
    background-clip: text;
    background-color: #fff;
    /* Imagem 3x mais larga que o elemento: a faixa de ~17% dela cobre cerca de
       metade da largura do texto, na mesma proporção do reflexo da logo. */
    background-image: linear-gradient(100deg,
        rgba(0, 0, 0, 0) 42%,
        rgba(0, 0, 0, 0.5) 47%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(0, 0, 0, 0.3) 54%,
        rgba(0, 0, 0, 0) 59%);
    background-position: 130% 0;
    background-repeat: no-repeat;
    background-size: 300% 100%;
    color: transparent;
    /* Safari antigo ignora color: transparent junto do clip prefixado. */
    -webkit-text-fill-color: transparent;
    animation: brand-text-brilho 14.6s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) {
    .app-sidebar-brand-text {
      animation: none;
    }
  }
}
.brand-line {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  white-space: nowrap;
  width: 100%;
}
.app-sidebar-nav {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px;
}
.app-sidebar-link,
.app-sidebar-sublink {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(248, 250, 252, 0.78);
  display: flex;
  gap: 12px;
  min-height: 42px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  width: 100%;
}
.app-sidebar-link:hover,
.app-sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.app-sidebar-link.active,
.app-sidebar-sublink.active {
  background: rgba(40, 169, 129, 0.18);
  border-color: rgba(121, 215, 189, 0.28);
  color: #fff;
}
.app-sidebar-link i,
.app-sidebar-sublink i {
  flex: 0 0 24px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}
.app-sidebar-link span,
.app-sidebar-sublink span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-toggle {
  cursor: pointer;
  justify-content: space-between;
}
.app-sidebar-link-main {
  align-items: center;
  display: flex;
  flex: 1 1 0;
  gap: 12px;
  min-width: 0;
}
.app-sidebar-chevron {
  flex-basis: auto !important;
  font-size: 13px !important;
  transition: transform 0.18s ease;
}
.app-sidebar-toggle[aria-expanded="true"] .app-sidebar-chevron {
  transform: rotate(180deg);
}
.app-sidebar-submenu {
  
  background: rgba(3, 12, 22, 0.22);
  border-radius: 8px;
  margin: 2px 0 6px;
  padding: 4px;
}

.app-sidebar-sublink {
  font-size: 14px;
  min-height: 38px;
  padding-left: 14px;
}
.app-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 2px;
  padding: 10px 18px 14px;
}
.app-sidebar-focus-card {
  background:
    linear-gradient(145deg, rgba(40, 169, 129, 0.2), rgba(16, 34, 56, 0.82)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(121, 215, 189, 0.2);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 34px rgba(2, 6, 23, 0.18);
  color: #f8fafc;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 14px 14px 10px;
}
.app-sidebar-focus-card.hide-no-space {
  display: none !important;
}
.app-sidebar-focus-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.22;
}
.app-sidebar-focus-card p {
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.35;
}
.app-sidebar-focus-author {
  color: rgba(167, 243, 208, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.app-sidebar-focus-icon {
  align-items: center;
  background: rgba(121, 215, 189, 0.15);
  border: 1px solid rgba(121, 215, 189, 0.22);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.app-sidebar-focus-illustration {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 132px;
  opacity: 0.92;
  filter: drop-shadow(0 10px 16px rgba(2, 6, 23, 0.24));
  width: 78%;
}
.app-sidebar-build-info {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.app-sidebar-version-link {
  color: rgba(248, 250, 252, 0.52);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-version-link:hover {
  color: rgba(248, 250, 252, 0.86);
  text-decoration: underline;
}
.app-sidebar-environment {
  color: rgba(248, 250, 252, 0.48);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-content-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.24s ease;
  width: calc(100% - var(--sidebar-width));
}
.app-drawer-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  display: none;
  font-size: 22px;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}
.app-drawer-toggle:hover {
  background: rgba(15, 31, 47, 0.06);
}
.app-drawer-backdrop {
  background: rgba(8, 18, 30, 0.5);
  inset: 0;
  opacity: 0;
  position: fixed;
  transition: opacity 0.24s ease;
  z-index: 29;
}
.app-drawer-backdrop.is-visible {
  opacity: 1;
}
.app-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(15, 31, 47, 0.08);
  box-shadow: 0 10px 26px rgba(17, 31, 48, 0.06);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.tut-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 11px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tut-replay-btn:hover {
  background: #e2e8f0;
  color: #334155;
}
@media (max-width: 575.98px) {
  .tut-replay-btn {
    background: transparent;
    border-color: transparent;
    padding: 2px 4px;
    color: #94a3b8;
    font-size: 1.0rem;
  }
  .tut-replay-btn:hover {
    background: transparent;
    color: #334155;
  }
}
.app-user-toggle {
  align-items: center;
  color: #172033;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  max-width: min(360px, 44vw);
}
.app-user-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-user-toggle:hover {
  color: var(--accent);
}
.app-user-menu .focus-dropdown-item {
  align-items: center;
  display: flex;
  min-height: 38px;
}
.app-logout-form {
  margin: 0;
}
.app-shell .app-main {
  flex: 1;
  max-width: none;
  padding: 28px 28px 18px;
  width: 100%;
}
.app-shell .app-main-clock {
  min-height: calc(100vh - var(--topbar-height));
  padding: 0;
}
.app-shell .app-main-clock .study-clock-screen {
  min-height: calc(100vh - var(--topbar-height));
}
.app-shell .app-main-clock .flip-card {
  min-width: clamp(54px, 8vw, 150px);
}
.app-shell .app-main-clock .flip-card-number {
  font-size: clamp(58px, 9vw, 165px);
}
.app-shell .app-main-clock .flip-separator {
  font-size: clamp(28px, 4vw, 72px);
}
.app-shell.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}
.app-shell.sidebar-collapsed .app-sidebar-edge-icon-collapse {
  display: none;
}
.app-shell.sidebar-collapsed .app-sidebar-edge-icon-expand {
  display: inline-block;
}
.app-shell.sidebar-collapsed .app-content-shell {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}
.app-shell.sidebar-collapsed .app-sidebar-brand {
  justify-content: center;
  padding-inline: 10px;
}
.app-shell.sidebar-collapsed .app-sidebar-brand-text,
.app-shell.sidebar-collapsed .app-sidebar-link span:not(.app-sidebar-link-main),
.app-shell.sidebar-collapsed .app-sidebar-link-main span,
.app-shell.sidebar-collapsed .app-sidebar-sublink span,
.app-shell.sidebar-collapsed .app-sidebar-chevron,
.app-shell.sidebar-collapsed .app-sidebar-focus-card,
.app-shell.sidebar-collapsed .app-sidebar-build-info {
  display: none !important;
}
.app-shell.sidebar-collapsed .app-sidebar-link,
.app-shell.sidebar-collapsed .app-sidebar-sublink {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.app-shell.sidebar-collapsed .app-sidebar-footer {
  padding: 0;
}
.app-shell.sidebar-collapsed .app-sidebar-link-main {
  justify-content: center;
}
.app-shell.sidebar-collapsed .app-sidebar-submenu {
  display: none !important;
}
.topbar {
  background: rgba(11, 31, 47, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(15, 31, 47, 0.16);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.topbar.clock-nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.app-clock-page .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}
.app-clock-page .app-main-clock {
  min-height: 100vh;
}
.clock-nav-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(248, 250, 252, 0.5);
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.clock-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(248, 250, 252, 0.9);
}
.app-navbar {
  max-width: 1220px;
  min-height: 68px;
  padding-inline: 20px;
}
.topbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.topbar .navbar-toggler-icon { filter: invert(1) grayscale(1) brightness(2); }
.topbar .nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.topbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  margin: 0;
}
.brand:hover { color: #fff; }
.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #28a981, #79d7bd);
  border-radius: 8px;
  color: #082219;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.nav-logout { margin-left: 8px; }
.app-main {
  max-width: 1180px;
  padding: 32px 16px 18px;
}
.app-clock-page {
  background: #111315;
  overflow-x: hidden;
}
.app-main-clock {
  max-width: none;
  min-height: calc(100vh - 68px);
  padding: 0;
  width: 100%;
}
.app-clock-page .app-shell .app-main-clock {
  background: #111315;
  min-height: 100vh;
}
.app-clock-page .app-shell .study-clock-screen {
  min-height: 100vh;
}

.app-topbar-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 0.5rem;
}
.app-topbar-icon-button:hover {
  background: rgba(15, 31, 47, 0.06);
}
.focus-dropdown-menu {
  background: #fff;
  border: 1px solid rgba(15, 31, 47, 0.08);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  
  list-style: none;
  margin: 0;
  min-width: 220px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1050;
}
[data-focus-dropdown] {
  position: relative;
}
[data-focus-dropdown].is-open > .focus-dropdown-menu {
  display: block;
}
.focus-dropdown-menu-end {
  inset-inline-end: 0;
}
.focus-dropdown-item {
  align-items: center;
  border-radius: 8px;
  color: #172033;
  display: flex;
  min-height: 38px;
  padding: 8px 10px;
  text-decoration: none;
}
.focus-dropdown-item:hover {
  background: #f8fafc;
  color: var(--accent-strong);
}
.focus-dropdown-divider {
  border: 0;
  border-top: 1px solid rgba(15, 31, 47, 0.08);
  margin: 6px 0;
}

/* --- components.css --- */
.panel, .auth-card, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.auth-card {
  max-width: 460px;
  margin: 44px auto;
}
.clock-background-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  width: min(480px, 100%);
}
.clock-background-preview img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}
.panel h1, .auth-card h1 {
  color: var(--ink);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 16px;
}
.auth-options { display: grid; gap: 10px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.permission-group {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.permission-group:last-child { border-bottom: 0; }
.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.study-bottom-bar select {
  width: auto;
}
.button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  justify-content: center;
  min-width: fit-content;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}
.button.secondary {
  background: #24364a;
  border-color: #24364a;
}
.button.secondary:hover {
  background: #172638;
  border-color: #172638;
}
.inline { display: inline-flex; gap: 8px; align-items: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats div, .stats a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(17, 31, 48, 0.06);
  color: var(--muted);
  padding: 16px;
}
.stats strong {
  color: var(--ink);
  display: block;
  font-size: 28px;
  line-height: 1.1;
}
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; background: #e8f5ef; border: 1px solid #b8dfcf; }
.flash.danger { background: #fff1f0; border-color: #ffccc7; color: var(--danger); }
.flash.warning { background: #fff7e6; border-color: #ffd591; color: var(--warning); }
.badge { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #e2e8f0; margin: 2px; }
.focus-breadcrumb {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.focus-breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
}
.focus-breadcrumb-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.focus-breadcrumb-current[aria-current="page"] {
  color: var(--ink);
}
.focus-breadcrumb-separator {
  color: #94a3b8;
  font-weight: 600;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spaced { margin-top: 12px; }
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.pagination-nav { display: flex; justify-content: center; margin-top: 16px; }
.pagination {
  display: flex;
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: white;
}
.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pagination .disabled { color: var(--muted); }
.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.captcha-field { margin: 12px 0; }
.footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 18px 16px 28px;
}
.footer .version-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  min-height: auto;
  padding: 0;
}
.footer button.version-link {
  cursor: pointer;
}
.footer .version-link:hover {
  background: transparent;
}
.footer button.version-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}
.modal-dialog {
  border: 0;
  padding: 0;
  width: min(820px, calc(100vw - 32px));
  margin-inline: auto;
}
.modal-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.modal-content { background: white; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-md); }
.modal-header, .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.modal-body { padding: 18px; }
.icon-button {
  min-height: auto;
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  font-size: 22px;
}
.changelog-content {
  max-height: 70vh;
  overflow: auto;
}
.changelog-content h2, .changelog-content h3 { margin-top: 0; }
.danger-text { color: var(--danger); }


/* Cookie banner */
.cookie-fab-container {
  position: fixed;
  bottom: 96px; /* acima do icone de cronometro */
  right: 24px;
  z-index: 1055;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.cookie-fab-popup {
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  width: 300px;
  max-width: calc(100vw - 48px);
  /* Oculto por padrão via display inline no JS, mas a classe garante o estilo. */
}

.cookie-fab {
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 56px;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 56px;
  padding: 0;
  color: #fff;
}

.cookie-fab:hover {
  transform: scale(1.06);
}
/* Professor notes */
.teacher-notes-fab {
  align-items: center;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  bottom: 24px;
  box-shadow: 0 14px 44px -14px rgba(15, 23, 42, 0.45);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  left: calc(var(--sidebar-width) + 16px);
  line-height: 1;
  padding: 0;
  position: fixed;
  transition: left 0.24s ease, transform 0.2s ease, box-shadow 0.2s ease;
  width: 56px;
  z-index: 42;
}
.teacher-notes-fab:hover {
  box-shadow: 0 18px 52px -16px rgba(15, 23, 42, 0.55);
  transform: scale(1.06);
}
.app-shell.sidebar-collapsed .teacher-notes-fab {
  left: calc(var(--sidebar-collapsed-width) + 16px);
}
.teacher-notes-fab-icon {
  font-size: 24px;
}
.teacher-notes-fab-badge {
  align-items: center;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  position: absolute;
  right: -5px;
  top: -5px;
}
@keyframes fab-ping {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes fab-ping-delayed {
  0%, 33% { transform: scale(1); opacity: 0; }
  34% { opacity: 0.35; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes fab-icon-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-3px); }
}
.teacher-notes-fab.has-unread {
  border-color: rgba(52, 183, 241, 0.45);
  box-shadow: 0 14px 44px -14px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(52, 183, 241, 0.15);
  animation: fab-icon-bounce 3s ease-in-out 2s 3;
}
.teacher-notes-fab.has-unread::before,
.teacher-notes-fab.has-unread::after {
  border: 2px solid rgba(52, 183, 241, 0.55);
  border-radius: 50%;
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.teacher-notes-fab.has-unread::before {
  animation: fab-ping 2.4s ease-out infinite;
}
.teacher-notes-fab.has-unread::after {
  animation: fab-ping-delayed 2.4s ease-out infinite;
}
.teacher-notes-modal {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 80px -30px rgba(15, 23, 42, 0.55);
}
.teacher-notes-kicker {
  color: #059669;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.teacher-notes-loading {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.teacher-notes-list,
.teacher-notes-center-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.teacher-note-preview,
.teacher-note-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  gap: 14px;
  padding: 14px;
}
.teacher-note-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.teacher-note-card.is-unread {
  border-left: 4px solid #10b981;
}
.teacher-note-card.is-highlighted {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}
.teacher-note-avatar {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 50%;
  color: #047857;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.teacher-note-content {
  min-width: 0;
  width: 100%;
}
.teacher-note-header,
.teacher-notes-page-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.teacher-note-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}
.teacher-note-context,
.teacher-note-new,
.teacher-notes-unread-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}
.teacher-note-context {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.teacher-note-new,
.teacher-notes-unread-pill {
  background: #dcfce7;
  color: #166534;
}
.teacher-note-text {
  background: #edf2f0; /* Cinza meio esverdeado */
  border: 1px solid #dce3df;
  border-radius: 10px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 12px 0 0;
  padding: 12px 14px;
  white-space: pre-wrap;
}
.teacher-note-reply-prof {
  background: #edf2f0 !important;
  border-color: #dce3df !important;
  border-left: 2px solid #10b981 !important;
}
.teacher-note-thread {
  border-left: 2px solid #d1fae5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-left: 8px;
}
.teacher-note-reply {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.86rem;
  padding: 10px 12px;
}
.text-prof-name {
  color: #166534;
}
.teacher-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.teacher-note-response {
  align-items: center;
  display: flex;
  gap: 8px;
}
.teacher-notes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.teacher-notes-tab {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 8px 13px;
  text-decoration: none;
}
.teacher-notes-tab.is-active,
.teacher-notes-tab:hover {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}
@media (max-width: 900px) {
  .teacher-notes-fab,
  .app-shell.sidebar-collapsed .teacher-notes-fab {
    left: 16px;
  }
}
@media (max-width: 576px) {
  .teacher-notes-fab {
    bottom: 24px;
    height: 52px;
    left: 16px;
    width: 52px;
  }
  .teacher-note-preview,
  .teacher-note-card {
    gap: 10px;
    padding: 12px;
  }
  .teacher-note-avatar {
    height: 36px;
    width: 36px;
  }
  .teacher-notes-page-header {
    flex-direction: column;
  }
  .teacher-note-response {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Loading overlay central ─────────────────────────────────── */
#focus-loading-overlay {
  /* A marca é monocromática e herda daqui via currentColor. É o mesmo --accent
     que o spinner anterior usava no arco em movimento. Cor saturada, e não um
     quase-preto, porque os ecos vivem em opacidade baixa: a 38% sobre a página
     desfocada, escuro lê como borrão e o verde lê como rastro.
     Para marca branca, o overlay precisaria também de fundo escuro em
     .is-loading — hoje ele só desfoca, então branco sumiria na página clara. */
  color: var(--accent);
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.15s ease;
  z-index: 99999;
}
#focus-loading-overlay.is-loading {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 1;
}
.focus-navigation-loading #focus-loading-overlay {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 1;
}
/* ── Marca em modo carregamento ───────────────────────────────────
   Marcação em components/brand_logo_loading.html — as coordenadas citadas aqui
   (centro 500 ; 433, viewBox -1100..2100) vêm de lá.

   Ciclo de 2,1s com 3 ecos por lado defasados de 0,7s: um pulso nasce a cada
   0,7s e o último se apaga quando o quarto nasceria, então a emissão é contínua
   e sem costura visível. Os delays são negativos para a propagação já estar em
   curso no primeiro quadro — sem eles a tela ficaria 1,4s com o núcleo sozinho,
   justamente no instante em que o overlay aparece.

   Mexer nos 2,1s obriga a mexer nos delays: eles são frações fixas do ciclo
   (0, 1/3, 2/3), não valores independentes. */
.focus-loading-marca {
  height: clamp(52px, 8vw, 76px);
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.22));
}
@keyframes focus-loading-eco-dir {
  from { transform: translateX(24px) scale(1); }
  to   { transform: translateX(790px) scale(0.82); }
}
@keyframes focus-loading-eco-esq {
  from { transform: translateX(-24px) scale(1); }
  to   { transform: translateX(-790px) scale(0.82); }
}
/* O pico de opacidade fica em 12% do ciclo, não em 0: o eco acende já um pouco
   afastado do núcleo, o que evita o clarão de duas marcas sobrepostas. */
@keyframes focus-loading-eco-fade {
  0%   { opacity: 0; }
  12%  { opacity: 0.38; }
  100% { opacity: 0; }
}
/* Uma batida por eco emitido: 0,7s, um terço do ciclo de propagação. */
@keyframes focus-loading-nucleo {
  0%, 100% { transform: scale(1); }
  45%      { transform: scale(1.03); }
}
.focus-loading-eco,
.focus-loading-nucleo {
  /* Centro da marca. Sem isto o transform-origin do SVG seria (0 ; 0) e a
     escala jogaria a peça para fora do eixo. */
  transform-origin: 500px 433.0127px;
}
.focus-loading-eco {
  animation-duration: 2.1s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}
.focus-loading-eco-esq { animation-name: focus-loading-eco-esq; }
.focus-loading-eco-dir { animation-name: focus-loading-eco-dir; }
.focus-loading-eco-fade {
  animation-duration: 2.1s;
  animation-iteration-count: infinite;
  animation-name: focus-loading-eco-fade;
  animation-timing-function: linear;
  opacity: 0;
}
/* Vale para o <g> do movimento e para o <use> do fade — os dois carregam a
   classe da onda, é isso que os mantém em fase. */
.focus-loading-onda-1 { animation-delay: 0s; }
.focus-loading-onda-2 { animation-delay: -0.7s; }
.focus-loading-onda-3 { animation-delay: -1.4s; }
.focus-loading-nucleo {
  animation-duration: 0.7s;
  animation-iteration-count: infinite;
  animation-name: focus-loading-nucleo;
  animation-timing-function: ease-in-out;
}
/* Sem movimento: os ecos somem por completo e sobra a marca respirando em
   opacidade, que continua sinalizando "carregando" sem deslocamento na tela. */
@media (prefers-reduced-motion: reduce) {
  .focus-loading-eco,
  .focus-loading-eco-fade {
    animation: none;
    opacity: 0;
  }
  .focus-loading-nucleo {
    animation-duration: 1.6s;
    animation-name: focus-loading-respiro;
    transform: none;
  }
}
@keyframes focus-loading-respiro {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
#focus-loading-timer {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
#focus-loading-timer.fast      { color: #16a34a; }
#focus-loading-timer.slow      { color: #ca8a04; }
#focus-loading-timer.very-slow { color: #dc2626; }

/* ── Spinner de botão ────────────────────────────────────────── */
@keyframes focus-spin {
  to { transform: rotate(360deg); }
}
.focus-btn-spinning {
  animation: focus-spin 0.7s linear infinite;
  display: inline-block;
}

.flash-list {
  display: grid;
  gap: 10px;
}
.flash-entry {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.flash-message {
  min-width: 0;
}
.flash-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  margin-left: 8px;
  min-height: auto;
  opacity: 0.8;
  padding: 6px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.flash-close:hover {
  background: rgba(0, 0, 0, 0.08);
  opacity: 1;
}
.focus-pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.focus-pagination-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.focus-pagination-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
  padding: 7px 11px;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.focus-pagination-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ink);
}
.focus-pagination-link:focus-visible {
  border-color: rgba(25, 115, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(25, 115, 94, 0.12);
  outline: 0;
}
.focus-pagination-link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.focus-pagination-link.is-disabled {
  color: var(--muted);
  cursor: default;
}
.focus-pagination-link-label {
  padding-inline: 14px;
}
.focus-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* --- public.css --- */
.app-public-main {
  max-width: 1180px;
  padding-top: 40px;
}

.public-nav-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.public-nav-actions .btn {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  min-height: 36px;
}

.landing-hero {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: calc(100vh - 238px);
  padding: 28px 0 44px;
}

.landing-hero-content {
  display: grid;
  gap: 18px;
}

.landing-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero h1 {
  color: var(--ink);
  font-size: clamp(40px, 5.8vw, 68px);
  font-weight: 850;
  line-height: 0.98;
  margin: 0;
  max-width: 820px;
}

.landing-hero p {
  color: #405268;
  font-size: 18px;
  line-height: 1.65;
  margin: 0;
  max-width: 680px;
}

.landing-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.landing-band-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.landing-actions .btn,
.landing-band-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.landing-preview {
  background: var(--panel);
  border: 1px solid rgba(15, 31, 47, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  position: relative;
}

.landing-preview-header {
  align-items: center;
  background: #102233;
  display: flex;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-dot {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}
.header-dot:nth-child(1) { background: #ff5f56; }
.header-dot:nth-child(2) { background: #ffbd2e; }
.header-dot:nth-child(3) { background: #27c93f; }

.header-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-family: monospace;
  margin-left: 12px;
}

/* Tabs de Navegação */
.landing-preview-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.landing-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.landing-tab-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.landing-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--panel);
}

/* Content Area */
.landing-preview-content {
  flex: 1;
  padding: 24px;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(228, 243, 239, 0.45) 0%, rgba(255, 255, 255, 0) 90%);
}

.landing-tab-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.landing-tab-panel.active {
  display: block;
}

/* 1. MOCKUP: PLANEJAMENTO */
.planner-mock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.planner-header-mock,
.calendar-header-mock,
.charts-header-mock,
.timer-header-mock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.planner-title-mock,
.calendar-title-mock,
.charts-title-mock,
.timer-title-mock {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.planner-subtitle-mock,
.charts-subtitle-mock,
.timer-subject-mock {
  font-size: 12px;
  color: var(--muted);
}

.planner-days-mock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.planner-day-mock {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-name-mock {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.day-slots-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.planner-slot-mock {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
}

.planner-slot-mock.slot-1 { border-left-color: var(--accent); }
.planner-slot-mock.slot-2 { border-left-color: #3b82f6; }
.planner-slot-mock.slot-3 { border-left-color: #8b5cf6; }
.planner-slot-mock.slot-4 { border-left-color: #ec4899; }
.planner-slot-mock.slot-5 { border-left-color: #f59e0b; }
.planner-slot-mock.slot-6 { border-left-color: #10b981; }

.subject-mock {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.2;
}

.time-mock {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

@keyframes slotSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. MOCKUP: CALENDÁRIO */
.calendar-mock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.calendar-legend-mock {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}

.calendar-grid-mock {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.grid-header-mock {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  color: var(--muted);
  padding-bottom: 4px;
}

.grid-cell-mock {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text);
  border-radius: 6px;
  border: 1px solid transparent;
  position: relative;
}

.grid-cell-mock.empty {
  visibility: hidden;
}

.grid-cell-mock.completed {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  border-color: rgba(25, 115, 94, 0.15);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
}

.cell-num {
  z-index: 1;
}

.cell-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--ink);
  color: #ffffff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.grid-cell-mock.completed:hover .cell-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

@keyframes cellPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 3. MOCKUP: METAS & GRÁFICOS */
.charts-mock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.charts-layout-mock {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
  flex: 1;
}

.charts-radial-mock {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
}

.radial-svg-mock {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-bg-mock {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 8;
}

.radial-bar-mock {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
}

@keyframes drawProgress {
  from {
    stroke-dashoffset: 251.32;
  }
  to {
    stroke-dashoffset: 45.24; /* 82% */
  }
}

.radial-overlay-mock {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radial-percent-mock {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
}

.radial-label-mock {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.charts-bars-mock {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-bar-item-mock {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-bar-info-mock {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text);
}

.chart-bar-info-mock span {
  font-weight: 500;
}

.chart-bar-info-mock strong {
  color: var(--ink);
}

.chart-bar-track-mock {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar-fill-mock {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 0;
}

.chart-bar-fill-mock.fill-hours { background: var(--accent); }
.chart-bar-fill-mock.fill-questions { background: #3b82f6; }
.chart-bar-fill-mock.fill-revisions { background: #10b981; }

@keyframes fillHours { to { width: 82%; } }
@keyframes fillQuestions { to { width: 82%; } }
@keyframes fillRevisions { to { width: 90%; } }

/* 4. MOCKUP: CRONÔMETRO DE FOCO */
.timer-mock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  align-items: center;
}

.timer-header-mock {
  width: 100%;
  text-align: center;
}

.timer-body-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.timer-pulse-rings {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-circle-mock {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
}

.timer-display-mock {
  font-size: 32px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.1;
}

.timer-status-mock {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.pulse-ring {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: var(--accent-soft);
  z-index: 1;
  animation: pulseOut 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

.pulse-ring.ring-2 {
  animation-delay: 1s;
}

@keyframes pulseOut {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.timer-controls-mock {
  display: flex;
  gap: 12px;
}

.control-btn-mock {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn-mock:hover {
  background: #e2e8f0;
  color: var(--text);
}

.control-btn-mock.success {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(25, 115, 94, 0.15);
}

.control-btn-mock.success:hover {
  background: #d1eae2;
}

.landing-section {
  display: grid;
  gap: 24px;
  padding: 18px 0 46px;
}

.landing-section-heading {
  max-width: 620px;
}

.landing-section-heading h2,
.landing-band h2 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
}

.landing-section-heading p,
.landing-band p {
  margin: 0;
}

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

.landing-feature {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 20px;
}

.landing-feature i {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 8px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.landing-feature h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.landing-feature p {
  line-height: 1.55;
  margin: 0;
}

.landing-band {
  align-items: center;
  background: #102233;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 26px;
}

.landing-band h2,
.landing-band p {
  color: #ffffff;
}

.landing-band p {
  opacity: 0.78;
}

.landing-faq {
  width: 100%;
  margin: 0 auto;
}

.landing-faq .accordion-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.landing-faq .accordion-button {
  font-weight: 600;
  color: var(--ink);
  background-color: #fff;
  box-shadow: none;
  padding: 18px 20px;
}

.landing-faq .accordion-button:not(.collapsed) {
  color: var(--accent-strong);
  background-color: var(--accent-soft);
}

.landing-faq .accordion-body {
  color: #405268;
  line-height: 1.6;
  padding: 0 20px 20px 20px;
  background-color: #fff;
}

.landing-auth-form {
  margin-top: 14px;
}

.landing-auth-link {
  margin: 14px 0 0;
  text-align: center;
}

.landing-empty-register {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 0;
  text-align: center;
}

.landing-empty-register i {
  color: var(--accent);
  font-size: 34px;
}

.landing-empty-register h3 {
  color: var(--ink);
  font-size: 20px;
  margin: 0;
}

.landing-empty-register p {
  margin: 0;
  max-width: 360px;
}

@media (max-width: 900px) {
  .app-public-main {
    padding-top: 26px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-hero h1 {
    font-size: 42px;
  }

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

  .landing-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .app-navbar {
    gap: 12px;
  }

  .public-nav-actions {
    gap: 8px;
  }

  .public-nav-actions .btn {
    padding-inline: 10px;
  }

  .landing-hero h1 {
    font-size: 34px;
  }

  .landing-hero p {
    font-size: 16px;
  }

  .landing-actions .btn,
  .landing-band-actions .btn {
    justify-content: center;
    flex: 1;
  }

  .landing-preview {
    height: auto;
    min-height: 420px;
  }

  .landing-tab-btn {
    font-size: 11px;
    padding: 8px 4px;
    flex-direction: column;
    gap: 2px;
  }

  .landing-tab-btn span {
    font-size: 9px;
  }

  .landing-preview-content {
    padding: 16px;
  }

  .planner-days-mock {
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
  }

  .planner-day-mock {
    padding: 8px;
  }

  .charts-layout-mock {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
  }

  .charts-radial-mock {
    width: 100px;
    height: 100px;
  }

  .radial-percent-mock {
    font-size: 20px;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }
}

.modal-subtitle-text {
  margin-bottom: 18px;
  color: #405268;
  font-size: 14px;
  line-height: 1.5;
}

/* Animações Auxiliares */
.animate-fade-in {
  animation: modalFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --- responsive.css --- */
@media (max-width: 720px) {
  .app-navbar { padding-inline: 14px; }
  .app-shell .app-main { padding: 22px 16px 16px; }
  .app-shell .app-main-clock {
    min-height: calc(100vh - 68px);
    padding: 0;
  }
  .hero-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .studies-dashboard-header,
  .calendar-toolbar,
  .day-activity-item,
  .study-time-custom,
  .study-time-chart-layout {
    display: grid;
    align-items: stretch;
    grid-template-columns: 1fr;
  }
  .study-time-header,
  .study-time-mode {
    display: grid;
  }
  .studies-dashboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .study-time-periods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .study-time-chart-tab {
    border-radius: 8px;
    justify-content: center;
    width: 100%;
  }
  .study-time-navigation {
    grid-template-columns: 48px 1fr 48px;
  }
  .study-time-arrow {
    font-size: 34px;
    height: 44px;
    width: 44px;
  }
  .study-time-legend li {
    grid-template-columns: 16px minmax(0, 1fr);
  }
  .study-time-legend strong {
    grid-column: 2;
    white-space: normal;
  }
  .study-time-bars {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .study-time-axis,
  .study-time-bars-plot {
    min-height: 280px;
  }
  .study-time-axis {
    height: 280px;
  }
  .study-time-bar-stack {
    height: 240px;
  }

  .calendar-toolbar h2 {
    order: -1;
  }
  .calendar-weekday {
    min-width: 0;
    text-align: center;
    font-size: 11px;
    padding: 0 0 8px;
  }
  .calendar-day {
    min-width: 0;
    min-height: 64px;
    padding: 8px 0 !important;
    align-items: center;
    justify-content: flex-start;
  }
  .calendar-day-number {
    position: static;
  }
  .calendar-day.is-today .calendar-day-number {
    position: static;
  }
  .calendar-day-summary,
  .calendar-day-time {
    display: none !important;
  }
  .calendar-day.has-activities::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--accent, #10b981);
    border-radius: 50%;
    margin-top: 4px;
  }
  .day-activity-item {
    display: grid;
  }
  .timer-value { font-size: 34px; }
  .nav-logout { margin: 8px 0 0; }
  .app-body:has(.study-bottom-bar) .app-main:not(.app-main-clock) {
    padding-bottom: 120px;
  }
  .study-bottom-bar {
    padding: 12px 16px;
    bottom: 16px;
    border-radius: 100px;
    width: max-content;
    max-width: calc(100% - 32px);
    justify-content: flex-start;
  }
  .study-bottom-inner {
    gap: 8px;
  }
  /* Barra de estudos compacta: textos viram ícones, selects com largura fixa */
  .study-bottom-btn-text {
    display: none;
  }
  .study-bottom-icon {
    display: inline-flex;
    font-size: 17px;
    margin-right: 0 !important;
  }
  .study-bottom-button {
    padding: 6px 10px;
  }
  .study-bottom-button svg {
    margin-right: 0 !important;
  }
  .study-bottom-bar select {
    flex: 0 0 auto;
    width: 84px;
    max-width: 84px;
    min-height: 34px;
    padding: 4px 20px 4px 10px;
    font-size: 13px;
  }
  .study-bottom-subject {
    font-size: 13px;
    max-width: 96px;
  }
  .study-bottom-timer {
    font-size: 16px;
    min-width: 0;
  }
  .session-panel .study-real-end {
    grid-template-columns: 1fr;
  }
  .study-clock-screen {
    min-height: calc(100vh - 68px);
    padding: 22px 14px;
  }
  .study-clock-meta,
  .study-clock-start {
    grid-template-columns: 1fr;
  }
  .flip-clock {
    gap: 6px;
  }
  .flip-unit {
    gap: 4px;
    grid-template-columns: repeat(2, minmax(35px, 1fr));
  }
  .flip-card {
    border-radius: 6px;
    min-width: clamp(35px, 13vw, 62px);
  }
  .flip-card-number {
    font-size: clamp(42px, 15vw, 72px);
  }
  .flip-separator {
    font-size: clamp(18px, 5vw, 32px);
  }
}

/* Navegação mobile: sidebar vira drawer (gaveta) com hambúrguer + backdrop */
@media (max-width: 900px) {
  .app-drawer-toggle { display: inline-flex; }
  .app-sidebar-edge-toggle { display: none; }
  
  .studies-calendar-layout {
    grid-template-columns: 1fr;
  }

  body:not(.app-clock-page) .app-shell .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    box-shadow: none;
  }
  body:not(.app-clock-page) .app-shell.drawer-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 18px 0 48px rgba(8, 18, 30, 0.4);
  }
  body:not(.app-clock-page) .app-content-shell {
    margin-left: 0;
    width: 100%;
  }
}






/* RESTORED STUDY BAR CSS */

.app-body:has(.study-bottom-bar) .app-main:not(.app-main-clock) {
  padding-bottom: 96px;
}

.study-bottom-bar {
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  bottom: 24px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  color: #fff;
  display: flex;
  gap: 8px;
  left: 50%;
  transform: translateX(-50%);
  min-height: 54px;
  padding: 10px 20px;
  position: fixed;
  width: max-content;
  max-width: 95%;
  z-index: 40;
  transition: all 0.3s ease;
}

.study-bottom-inner {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
  min-width: 0;
  overflow-x: auto;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.study-bottom-inner::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.study-bottom-minimize {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  transition: all 0.2s ease;
  width: 30px;
}

.study-bottom-minimize:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.study-fab {
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  bottom: 24px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  color: #fff;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 0;
  height: 56px;
  justify-content: center;
  line-height: 1;
  position: fixed;
  right: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 56px;
  z-index: 41;
}

.study-fab:hover {
  transform: scale(1.06);
}

.study-fab-icon {
  font-size: 20px;
}

.study-fab-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.study-fab .study-fab-icon {
  font-size: 24px;
}

.study-fab:has(.study-fab-time) .study-fab-icon {
  font-size: 18px;
}

body.study-minimized .study-bottom-bar {
  display: none;
}

body.study-minimized .study-fab {
  display: inline-flex;
}

.app-body.study-minimized:has(.study-bottom-bar) .app-main:not(.app-main-clock) {
  padding-bottom: 24px;
}

.study-bottom-bar select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  min-height: 36px;
  padding: 4px 34px 4px 16px;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-bottom-bar select:hover,
.study-bottom-bar select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.study-bottom-bar select option {
  background: #1e293b;
  color: #fff;
}

.study-bottom-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 6px;
}

.study-bottom-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid transparent;
  border-radius: 100px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  min-height: 36px;
  padding: 6px 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.study-bottom-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.study-bottom-button-primary {
  background: #10b981;
  color: #fff;
}

.study-bottom-button-primary:hover {
  background: #059669;
}

.study-bottom-message {
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
}

.study-bottom-subject {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  max-width: 300px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a.study-bottom-subject:hover {
  color: #f8fafc;
  opacity: 0.8;
}

.study-bottom-subject-name,
.study-bottom-content-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-bottom-subject-name {
  flex: 0 1 auto;
}

.study-bottom-content-name {
  color: rgba(248, 250, 252, 0.55);
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 400;
}

.study-bottom-timer {
  color: #fff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 86px;
  text-align: center;
  letter-spacing: 0.5px;
}

.study-bottom-timer-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.5;
  margin: 0 3px 0 1px;
  letter-spacing: 0;
}

  bottom: 24px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  color: #fff;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 0;
  height: 56px;
  justify-content: center;
  line-height: 1;
  position: fixed;
  right: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 56px;
  z-index: 41;
}

.study-fab:hover {
  transform: scale(1.06);
}

.study-fab-icon {
  font-size: 20px;
}

.study-fab-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.study-fab .study-fab-icon {
  font-size: 24px;
}

.study-fab:has(.study-fab-time) .study-fab-icon {
  font-size: 18px;
}

body.study-minimized .study-bottom-bar {
  display: none;
}

body.study-minimized .study-fab {
  display: inline-flex;
}

.app-body.study-minimized:has(.study-bottom-bar) .app-main:not(.app-main-clock) {
  padding-bottom: 24px;
}

.study-bottom-bar select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  min-height: 36px;
  padding: 4px 34px 4px 16px;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-bottom-bar select:hover,
.study-bottom-bar select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.study-bottom-bar select option {
  background: #1e293b;
  color: #fff;
}

.study-bottom-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid transparent;
  border-radius: 100px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  min-height: 36px;
  padding: 6px 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.study-bottom-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.study-bottom-button-primary {
  background: #10b981;
  color: #fff;
}

.study-bottom-button-primary:hover {
  background: #059669;
}

.study-bottom-message {
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
}

.study-bottom-subject {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  max-width: 300px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a.study-bottom-subject:hover {
  color: #f8fafc;
  opacity: 0.8;
}

.study-bottom-subject-name,
.study-bottom-content-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-bottom-subject-name {
  flex: 0 1 auto;
}

.study-bottom-content-name {
  color: rgba(248, 250, 252, 0.55);
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 400;
}

.study-bottom-timer {
  color: #fff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 86px;
  text-align: center;
  letter-spacing: 0.5px;
}

.study-bottom-timer-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.5;
  margin: 0 3px 0 1px;
  letter-spacing: 0;
}

.study-bottom-inline {
  display: inline-flex;
  margin: 0;
}

.study-bottom-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.hide-no-space {
  display: none !important;
}

/* --- Animações do Calendário de Estudos --- */
.study-calendar-day:hover .calendar-activity-card {
  transform: translateY(-5px);
  border-color: #34d399;
  background-color: #d1fae5;
  box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.2), 0 4px 6px -4px rgba(5, 150, 105, 0.1);
}

.study-calendar-day:hover .calendar-activity-check {
  transform: scale(1.35) rotate(14deg);
  color: #059669;
}

.study-calendar-day:hover .calendar-activity-timer {
  color: #047857;
}

/* --- Brilho dos blocos cumpridos (planner semanal) ---
   Marcação em templates/planejamentos/_calendario.html.

   Três estrelas de 4 pontas cintilando no canto inferior direito do card, em
   sequência, como um ponto de luz que pisca. Cada uma fica visível ~0,6s num
   ciclo de 3,6s: o card passa a maior parte do tempo parado, senão sete colunas
   de blocos cumpridos viram um pisca-pisca.

   A estrela é branca, mas o card cumprido é verde-claro (bg-emerald-50/60) —
   branco sobre isso não apareceria sozinho. Quem desenha a forma é o
   drop-shadow esmeralda: o halo escuro recorta o núcleo branco e o conjunto lê
   como um reflexo pontual.

   Os cards são dessincronizados por --brilho-fase, calculada no template a
   partir do índice do dia e do bloco. Sem ela as sete colunas piscariam no
   mesmo quadro, o que denuncia a animação como enfeite. */
.planner-brilho {
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.planner-brilho-estrela {
  color: #fff;
  filter: drop-shadow(0 0 2px rgba(5, 150, 105, 0.95))
          drop-shadow(0 0 6px rgba(16, 185, 129, 0.55));
  opacity: 0;
  position: absolute;
  animation-duration: 3.6s;
  animation-iteration-count: infinite;
  animation-name: planner-cintilar;
  animation-timing-function: ease-out;
}
/* Posições fixas: um núcleo maior e dois satélites menores, agrupados num canto
   vazio do card — o texto ocupa a esquerda e o topo. */
.planner-brilho-1 { bottom: 8px;  right: 9px;  width: 15px; }
.planner-brilho-2 { bottom: 21px; right: 25px; width: 9px; }
.planner-brilho-3 { bottom: 25px; right: 5px;  width: 7px; }
/* Defasagem entre as três + a fase do card. O ciclo é o mesmo para as três, só
   a largada muda: nasce uma, morre, nasce a seguinte. */
.planner-brilho-1 { animation-delay: calc(var(--brilho-fase, 0s) + 0s); }
.planner-brilho-2 { animation-delay: calc(var(--brilho-fase, 0s) + 0.75s); }
.planner-brilho-3 { animation-delay: calc(var(--brilho-fase, 0s) + 1.35s); }
/* 0 a 16% é a cintilação (0,58s); o resto do ciclo é repouso apagado. A rotação
   é pequena de propósito: estrela girando muito lê como carregamento, não como
   brilho. */
@keyframes planner-cintilar {
  0%   { opacity: 0; transform: scale(0.2) rotate(-25deg); }
  6%   { opacity: 1; transform: scale(1) rotate(0deg); }
  16%  { opacity: 0; transform: scale(0.25) rotate(25deg); }
  100% { opacity: 0; transform: scale(0.2) rotate(-25deg); }
}
/* Enfeite puro: sem movimento, some por completo. */
@media (prefers-reduced-motion: reduce) {
  .planner-brilho { display: none; }
}

/* --- Cronometro rodando no FAB (barra minimizada) --- */
/* Registrada para o browser saber interpolar: gradiente puro nao faz transition. */
@property --study-seg {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

/* Anel do minuto: --study-seg (0-59) vem do renderBottomTimer(), 1x por segundo.
   A cor sai de --study-materia-cor, setada inline no FAB com a cor da materia. */
.study-fab-ring {
  border-radius: 50%;
  background: conic-gradient(var(--study-materia-cor, #10b981) calc(var(--study-seg, 0) * 6deg), rgba(255, 255, 255, 0.09) 0);
  inset: -4px;
  pointer-events: none;
  position: absolute;
  transition: --study-seg 0.25s linear;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}

/* Pausado: anel apagado, mantendo a cor da materia. Unico sinal de pausa no FAB. */
.study-fab-ring-paused {
  opacity: 0.4;
}

/* Virada 59 -> 0: sem isso o anel volta girando pra tras. */
.study-fab-ring-instant {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .study-fab-ring {
    transition: none;
  }
}
