html {
  margin-bottom: 40px;
}

body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f0f2f5;
  font-size: 16px;
  overflow-x: hidden;
}

body[data-app-mode="graduacao"] {
  --app-accent: #1976d2;
  --app-accent-strong: #0f3f7a;
  --app-accent-soft: #e8f1fb;
  --app-surface: #ffffff;
  --app-background: linear-gradient(180deg, #e8f1fb 0%, #f0f2f5 100%);
}

body[data-app-mode="tecnico"] {
  --app-accent: #0f8a5f;
  --app-accent-strong: #066344;
  --app-accent-soft: #e7f7ef;
  --app-surface: #fbfefc;
  --app-background: linear-gradient(180deg, #f2fbf7 0%, #f0f2f5 100%);
}

body[data-app-mode="responsavel"] {
  --app-accent: #7b3fe4;
  --app-accent-strong: #4d2c91;
  --app-accent-soft: #f0eaff;
  --app-surface: #fffdfd;
  --app-background: linear-gradient(180deg, #faf7ff 0%, #f0f2f5 100%);
}

body[data-app-mode] {
  background: var(--app-background, #f0f2f5);
}

body[data-app-mode] .page-header {
  border-color: color-mix(in srgb, var(--app-accent-strong) 18%, #d9e5ef);
}

body[data-app-mode] .page-header h1 {
  color: var(--app-accent-strong);
}

body[data-app-mode] .header-logo {
  filter: brightness(0) saturate(100%) invert(18%) sepia(60%) saturate(1800%) hue-rotate(196deg) brightness(90%) contrast(95%);
}

body[data-app-mode] .tab-button.active {
  background: var(--app-accent);
  color: #fff;
}

body[data-app-mode] .tab-button.active .material-icons,
body[data-app-mode] .tab-button.active .tab-label {
  color: #fff;
}

body[data-app-mode] .login-action-btn,
body[data-app-mode] .home-mode-action {
  background: var(--app-accent);
}

body[data-app-mode] .home-mode-action-secondary {
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
}

body[data-app-mode] .home-mode-switcher,
body[data-app-mode] .home-mode-shell,
body[data-app-mode] form,
body[data-app-mode] .desktop-actions-menu,
body[data-app-mode] .home-mode-card,
body[data-app-mode] .home-tech-widget {
  background: var(--app-surface, #fff);
}

body[data-app-mode] .home-mode-eyebrow,
body[data-app-mode] .home-mode-pill,
body[data-app-mode] .home-mode-switcher select {
  border-color: color-mix(in srgb, var(--app-accent) 18%, #cfdbea);
}

body[data-app-mode="tecnico"] .home-mode-hero-panel {
  background: linear-gradient(135deg, #066344 0%, #12a06f 100%);
}

body[data-app-mode="responsavel"] .home-mode-hero-panel {
  background: linear-gradient(135deg, #4d2c91 0%, #7b3fe4 100%);
}

body[data-app-mode="tecnico"] .home-mode-hero-panel-contrast {
  background: linear-gradient(135deg, #066344 0%, #0f8a5f 100%);
}

body[data-app-mode="responsavel"] .home-mode-hero-panel-contrast {
  background: linear-gradient(135deg, #4d2c91 0%, #8a54ff 100%);
}

body[data-app-mode="responsavel"] #top-progress-bar {
  background: linear-gradient(90deg, #a66cff 0%, #7b3fe4 50%, #a66cff 100%);
  box-shadow: 0 0 0 1px rgba(190, 155, 255, 0.45), 0 0 14px rgba(123, 63, 228, 0.78), 0 0 24px rgba(77, 44, 145, 0.58);
  animation-name: topProgressPurpleShift, topProgressGlowPulse;
}

body[data-app-mode="responsavel"] #top-progress-bar::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 38%, rgba(255, 255, 255, 0) 72%);
}

@keyframes topProgressPurpleShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

body[data-app-mode] .home-mode-note {
  border-color: color-mix(in srgb, var(--app-accent) 18%, #c8d7e7);
}

.home-consultation-shell {
  margin-bottom: 18px;
}

body[data-app-mode] .home-consultation-shell>.home-aviso,
body[data-app-mode] .home-consultation-shell>#home-content {
  border-color: color-mix(in srgb, var(--app-accent-strong) 16%, #d9e5ef);
}

body[data-app-mode] .home-consultation-shell>#home-content {
  background: var(--app-surface, #fff);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

body[data-app-mode] .home-consultation-shell #home-content-header {
  padding: 0;
}

body[data-app-mode="responsavel"] .novidades-toggle-btn.active {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

body[data-app-mode="responsavel"] .compare-mode-toggle input:checked {
  background: linear-gradient(135deg, #4d2c91, #8a54ff);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(123, 63, 228, 0.26);
}

body[data-app-mode="responsavel"] .compare-mode-toggle input:checked::before {
  box-shadow: 0 2px 4px rgba(123, 63, 228, 0.36);
}

body[data-app-mode="responsavel"] .compare-mode-toggle input:focus-visible {
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(123, 63, 228, 0.3);
}

body[data-app-mode="responsavel"] .compare-mode-toggle:hover {
  border-color: #d7c6f5;
  background: #f4ecff;
}

body[data-app-mode="responsavel"] .modal-header {
  border-bottom-color: #d9c9f7;
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
}

body[data-app-mode="responsavel"] .btn-primary {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  box-shadow: 0 2px 8px rgba(123, 63, 228, 0.24);
}

body[data-app-mode="responsavel"] .btn-primary:hover {
  background: linear-gradient(135deg, #3e2574, #6f36d6);
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3);
}

body[data-app-mode="responsavel"] .btn-secondary {
  background: #f0eaff;
  color: var(--app-accent-strong);
}

body[data-app-mode="responsavel"] .btn-secondary:hover {
  background: #e2d5fb;
  color: #4d2c91;
}

body[data-app-mode="responsavel"] #sigaa-form label {
  color: #4d2c91;
}

body[data-app-mode="responsavel"] #sigaa-form input[type="text"],
body[data-app-mode="responsavel"] #sigaa-form input[type="password"] {
  border-color: #d7c6f5;
  background: #fbf9ff;
}

body[data-app-mode="responsavel"] #sigaa-form input[type="text"]:focus,
body[data-app-mode="responsavel"] #sigaa-form input[type="password"]:focus {
  border-color: #7b3fe4;
  box-shadow: 0 0 0 2px rgba(123, 63, 228, 0.18);
}

body[data-app-mode="responsavel"] #sigaa-form button {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  border-color: #4d2c91;
}

body[data-app-mode="responsavel"] #sigaa-form button:hover {
  background: linear-gradient(135deg, #3e2574, #6f36d6);
  border-color: #3e2574;
}

body[data-app-mode="tecnico"] #sigaa-form button {
  background: linear-gradient(135deg, #066344, #0f8a5f);
  border-color: #066344;
}

body[data-app-mode="tecnico"] #sigaa-form button:hover {
  background: linear-gradient(135deg, #044b33, #0c7450);
  border-color: #044b33;
}

body[data-app-mode="responsavel"] #sigaa-form {
  background: linear-gradient(180deg, #ffffff 0%, #f7f1ff 100%);
  border: 1px solid #7b3fe4;
  box-shadow: 0 8px 20px rgba(77, 44, 145, 0.12);
}

body[data-app-mode="responsavel"] #sigaa-form::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(123, 63, 228, 0.08);
}

/* ===== Overrides verdes para modo técnico ===== */
body[data-app-mode="tecnico"] .home-mode-switcher {
  border-color: #0f8a5f !important;
  background: linear-gradient(135deg, #ffffff 0%, #f1faf6 100%) !important;
}

body[data-app-mode="tecnico"] .home-mode-switcher label {
  color: #066344 !important;
}

body[data-app-mode="tecnico"] .home-mode-switcher select {
  border-color: #bce8d5 !important;
  background: #f5fcf8 !important;
  color: #066344 !important;
}

body[data-app-mode="tecnico"] .home-mode-switcher select:focus {
  border-color: #0f8a5f !important;
  box-shadow: 0 0 0 2px rgba(15, 138, 95, 0.14) !important;
}

body[data-app-mode="tecnico"] #dados-institucionais {
  background: linear-gradient(180deg, #ffffff 0%, #f1faf6 100%);
  border-color: #0f8a5f;
  box-shadow: 0 8px 20px rgba(6, 99, 68, 0.1);
}

body[data-app-mode="tecnico"] #dados-institucionais h2 {
  background: linear-gradient(135deg, #066344, #0f8a5f);
  border-bottom-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #dados-institucionais li {
  border-bottom-color: #d2f2e3;
}

body[data-app-mode="tecnico"] #dados-institucionais strong {
  color: #066344;
}

body[data-app-mode="tecnico"] #dados-institucionais::after {
  color: #a8e6cf;
}

body[data-app-mode="tecnico"] .tab-button {
  color: #066344;
}

body[data-app-mode="tecnico"] .tab-button:hover:not(.active) {
  background: #e7f7ef;
  color: #044b33;
}

body[data-app-mode="tecnico"] .fab-toggle {
  background: #066344;
  color: #f1faf6;
}

body[data-app-mode="tecnico"] .fab-toggle:hover {
  background: #044b33;
}

body[data-app-mode="tecnico"] .fab-item {
  background: #0f8a5f;
  color: #ffffff;
}

body[data-app-mode="tecnico"] .tabela-horarios,
body[data-app-mode="tecnico"] .resumo-frequencia,
body[data-app-mode="tecnico"] .freq-card,
body[data-app-mode="tecnico"] .tabela-wrapper,
body[data-app-mode="tecnico"] .tabela-notas-wrapper {
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] .tabela-horarios thead th,
body[data-app-mode="tecnico"] .resumo-frequencia th,
body[data-app-mode="tecnico"] .freq-card-header {
  background: #0f8a5f;
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-horarios-hoje,
body[data-app-mode="tecnico"] #tabela-horarios-hoje th {
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-horarios-hoje thead th {
  background: #0f8a5f;
  border-color: #0f8a5f;
  color: #fff;
  border-bottom-width: 2px;
  border-bottom-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-wrapper-hoje td {
  border-color: #0f8a5f !important;
}

body[data-app-mode="tecnico"] #tabela-horarios-hoje td {
  border-color: #d2f2e3;
}

body[data-app-mode="tecnico"] #tabela-horarios-hoje tbody tr:nth-child(even) td {
  background: #f1faf6;
}

body[data-app-mode="tecnico"] #tabela-horarios-hoje tbody tr:hover td {
  background: #e2f7ed;
}

body[data-app-mode="tecnico"] .tabela-horarios tbody tr:hover td,
body[data-app-mode="tecnico"] .resumo-frequencia tbody tr:hover td {
  background: #e2f7ed;
}

body[data-app-mode="tecnico"] #select-disciplina-frequencia:focus {
  border-color: #0f8a5f;
  box-shadow: 0 0 0 2px rgba(15, 138, 95, 0.14);
}

body[data-app-mode="tecnico"] .freq-card,
body[data-app-mode="tecnico"] .resumo-frequencia {
  box-shadow: 0 4px 12px rgba(6, 99, 68, 0.05);
}

body[data-app-mode="tecnico"] .freq-filter-bar label {
  color: #066344;
}

body[data-app-mode="tecnico"] #select-disciplina-frequencia {
  border-color: #bce8d5;
  background: #f5fcf8;
  color: #066344;
}

body[data-app-mode="tecnico"] .freq-filter-bar select,
body[data-app-mode="tecnico"] #select-disciplina-frequencia:focus {
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #barra-progresso-faltas {
  background: #f1faf6;
  border-color: #bce8d5;
}

body[data-app-mode="tecnico"] #tabela-frequencias,
body[data-app-mode="tecnico"] .resumo-frequencia,
body[data-app-mode="tecnico"] .freq-card {
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-frequencias th,
body[data-app-mode="tecnico"] .resumo-frequencia th {
  background: #0f8a5f;
  border-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-frequencias thead th,
body[data-app-mode="tecnico"] .resumo-frequencia thead th {
  background: #95e0c4;
  border-color: #066344;
  color: #044b33;
  border-bottom-width: 2px;
  border-bottom-color: #0f8a5f;
}

body[data-app-mode="tecnico"] #tabela-frequencias td,
body[data-app-mode="tecnico"] .resumo-frequencia td {
  border-color: #d2f2e3;
}

body[data-app-mode="tecnico"] #tabela-frequencias tbody tr:nth-child(even) td,
body[data-app-mode="tecnico"] .resumo-frequencia tbody tr:nth-child(even) td {
  background: #f1faf6;
}

body[data-app-mode="tecnico"] #tabela-frequencias tbody tr:hover td,
body[data-app-mode="tecnico"] .resumo-frequencia tbody tr:hover td {
  background: #e2f7ed;
}

body[data-app-mode="responsavel"] .home-mode-switcher {
  border-color: #7b3fe4;
  background: linear-gradient(135deg, #ffffff 0%, #f7f1ff 100%);
}

body[data-app-mode="responsavel"] .home-mode-switcher label {
  color: #4d2c91;
}

body[data-app-mode="responsavel"] .home-mode-switcher select {
  border-color: #d8caf8;
  background: #fbf9ff;
  color: #4d2c91;
}

body[data-app-mode="responsavel"] .home-mode-switcher select:focus {
  border-color: #7b3fe4;
  box-shadow: 0 0 0 2px rgba(123, 63, 228, 0.14);
}

body[data-app-mode="responsavel"] #dados-institucionais {
  background: linear-gradient(180deg, #ffffff 0%, #f7f1ff 100%);
  border-color: #7b3fe4;
  box-shadow: 0 8px 20px rgba(77, 44, 145, 0.1);
}

body[data-app-mode="responsavel"] #dados-institucionais h2 {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  border-bottom-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #dados-institucionais li {
  border-bottom-color: #e6dbfb;
}

body[data-app-mode="responsavel"] #dados-institucionais strong {
  color: #4d2c91;
}

body[data-app-mode="responsavel"] #dados-institucionais::after {
  color: #d9c9f7;
}

body[data-app-mode="responsavel"] .home-painel-titulo {
  border-bottom-color: #7b3fe4;
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
}

body[data-app-mode="responsavel"] #tabela-novidades-container {
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-novidades-container .home-painel-titulo {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  border-bottom-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-atividades-container {
  border-color: #6f36d6;
}

body[data-app-mode="responsavel"] #tabela-atividades-container .home-painel-titulo {
  background: linear-gradient(135deg, #3e2574, #6f36d6);
  border-bottom-color: #6f36d6;
}

body[data-app-mode="responsavel"] #tabela-novidades-home thead th,
body[data-app-mode="responsavel"] #tabela-atividades-home thead th {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-novidades-home td {
  border-color: #ddcff8;
}

body[data-app-mode="responsavel"] #tabela-atividades-home td {
  border-color: #dfd3fa;
}

body[data-app-mode="responsavel"] #tabela-novidades-home tbody tr:nth-child(even) td {
  background: #f4edff;
}

body[data-app-mode="responsavel"] #tabela-atividades-home tbody tr:nth-child(even) td {
  background: #f3ebff;
}

body[data-app-mode="responsavel"] #tabela-novidades-home tbody tr:hover td,
body[data-app-mode="responsavel"] #tabela-atividades-home tbody tr:hover td {
  background: #eadcff;
}

body[data-app-mode="responsavel"] #novidades-home-vazio {
  border-color: #7b3fe4;
  background: #f4edff;
  color: #4d2c91 !important;
}

body[data-app-mode="responsavel"] #atividades-home-vazio {
  border-color: #6f36d6;
  background: #f3ebff;
  color: #4d2c91 !important;
}

body[data-app-mode="responsavel"] .tabela-horarios,
body[data-app-mode="responsavel"] .resumo-frequencia,
body[data-app-mode="responsavel"] .freq-card,
body[data-app-mode="responsavel"] .tabela-wrapper,
body[data-app-mode="responsavel"] .tabela-notas-wrapper {
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] .tabela-horarios thead th,
body[data-app-mode="responsavel"] .resumo-frequencia th,
body[data-app-mode="responsavel"] .freq-card-header {
  background: #7b3fe4;
  border-color: #7b3fe4;
}

/* Estilização de tabela-horarios-hoje alinhada à tabela-frequencias
   mas SEM a regra específica da 2ª coluna (esta tabela não a possui) */
body[data-app-mode="responsavel"] #tabela-horarios-hoje,
body[data-app-mode="responsavel"] #tabela-horarios-hoje th {
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-horarios-hoje thead th {
  background: #7b3fe4;
  border-color: #7b3fe4;
  color: #fff;
  border-bottom-width: 2px;
  border-bottom-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-wrapper-hoje td {
  border-color: #7b3fe4 !important;
}

body[data-app-mode="responsavel"] #tabela-horarios-hoje td {
  border-color: #e8defb;
}

body[data-app-mode="responsavel"] #tabela-horarios-hoje tbody tr:nth-child(even) td {
  background: #f4edff;
}

body[data-app-mode="responsavel"] #tabela-horarios-hoje tbody tr:hover td {
  background: #eadcff;
}

body[data-app-mode="responsavel"] .tabela-horarios thead th {
  background: #c8abff;
  border-color: #8e80a9;
  color: #402077;
}

body[data-app-mode="responsavel"] .tab-button {
  color: #402077;
}

body[data-app-mode="responsavel"] .fab-toggle {
  background: #4d2c91;
  color: #f0eaff;
}

body[data-app-mode="responsavel"] .tabela-horarios tbody tr:hover td,
body[data-app-mode="responsavel"] .resumo-frequencia tbody tr:hover td {
  background: #f3ebff;
}

body[data-app-mode="responsavel"] .tabela-horarios.comparison-mode thead tr:nth-child(2) th:not(.compare-col) {
  background: #7b3fe4;
  border-color: #4d2c91;
}

body[data-app-mode="responsavel"] .tabela-horarios.comparison-mode tbody tr:hover td:nth-child(1),
body[data-app-mode="responsavel"] .tabela-horarios.comparison-mode tbody tr:hover td:nth-child(3) {
  background: #efe3ff;
}

body[data-app-mode="responsavel"] .tabela-horarios.comparison-mode tbody tr:hover td.compare-col {
  background: #f4e6ff;
}

body[data-app-mode="responsavel"] #select-disciplina-frequencia:focus {
  border-color: #7b3fe4;
  box-shadow: 0 0 0 2px rgba(123, 63, 228, 0.14);
}

body[data-app-mode="responsavel"] .freq-card,
body[data-app-mode="responsavel"] .resumo-frequencia {
  box-shadow: 0 4px 12px rgba(77, 44, 145, 0.05);
}

body[data-app-mode="responsavel"] .freq-filter-bar label {
  color: #4d2c91;
}

body[data-app-mode="responsavel"] #select-disciplina-frequencia {
  border-color: #d8caf8;
  background: #fbf9ff;
  color: #4d2c91;
}

body[data-app-mode="responsavel"] .freq-filter-bar select,
body[data-app-mode="responsavel"] #select-disciplina-frequencia:focus {
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #barra-progresso-faltas {
  background: #f7f1ff;
  border-color: #dcccf8;
}

body[data-app-mode="responsavel"] #tabela-frequencias,
body[data-app-mode="responsavel"] .resumo-frequencia,
body[data-app-mode="responsavel"] .freq-card {
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-frequencias th,
body[data-app-mode="responsavel"] .resumo-frequencia th {
  background: #7b3fe4;
  border-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-frequencias thead th,
body[data-app-mode="responsavel"] .resumo-frequencia thead th {
  background: #c8abff;
  border-color: #8e80a9;
  color: #402077;
  border-bottom-width: 2px;
  border-bottom-color: #7b3fe4;
}

body[data-app-mode="responsavel"] #tabela-frequencias td,
body[data-app-mode="responsavel"] .resumo-frequencia td {
  border-color: #e8defb;
}

body[data-app-mode="responsavel"] #tabela-frequencias tbody tr:nth-child(even) td,
body[data-app-mode="responsavel"] .resumo-frequencia tbody tr:nth-child(even) td {
  background: #f4edff;
}

body[data-app-mode="responsavel"] #tabela-frequencias tbody tr:hover td,
body[data-app-mode="responsavel"] .resumo-frequencia tbody tr:hover td {
  background: #eadcff;
}

body[data-app-mode] .home-consultation-shell form {
  border: 1px solid color-mix(in srgb, var(--app-accent) 14%, #d9e5ef);
}

#top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 6px;
  z-index: 9999;
  border-radius: 0 0 2px 0;
  background: linear-gradient(90deg, #42a5f5 0%, #1976d2 50%, #42a5f5 100%);
  background-size: 220% 100%;
  transition: width 0.22s ease-out;
  box-shadow: 0 0 0 1px rgba(144, 202, 249, 0.45), 0 0 14px rgba(33, 150, 243, 0.85), 0 0 24px rgba(25, 118, 210, 0.65);
  animation: topProgressBlueShift 2.2s linear infinite, topProgressGlowPulse 1.8s ease-in-out infinite;
}

#top-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.48) 38%, rgba(255, 255, 255, 0) 72%);
  animation: topProgressShine 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes topProgressBlueShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

@keyframes topProgressGlowPulse {

  0%,
  100% {
    filter: brightness(1) saturate(1);
  }

  50% {
    filter: brightness(1.18) saturate(1.2);
  }
}

@keyframes topProgressShine {
  0% {
    transform: translateX(-42%);
    opacity: 0.2;
  }

  50% {
    opacity: 0.95;
  }

  100% {
    transform: translateX(42%);
    opacity: 0.2;
  }
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(10px + var(--scroll-pad-y, 0px)) calc(14px + var(--scroll-pad-x, 0px));
  margin: calc(-8px - var(--scroll-margin, 0px)) calc(-8px - var(--scroll-margin, 0px)) 20px calc(-8px - var(--scroll-margin, 0px));
  background: rgba(255, 255, 255, calc(0.95 + var(--scroll-bg, 0)));
  backdrop-filter: blur(calc(8px + var(--scroll-blur, 0px)));
  border: 1px solid #d9e5ef;
  border-bottom: 1px solid rgba(217, 229, 239, calc(1 - var(--scroll-progress, 0)));
  border-radius: calc(12px - var(--scroll-radius, 0px));
  box-shadow: 0 4px 16px rgba(15, 23, 42, calc(0 + var(--scroll-shadow, 0)));
  transition: none;
}

.page-header.swipe-fixed {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 400;
  margin: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.page-header h1 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f3f7a;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(18%) sepia(60%) saturate(1800%) hue-rotate(196deg) brightness(90%) contrast(95%);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-quick-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.desktop-saved-profiles {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.desktop-saved-profiles label {
  margin: 0;
  color: #1b4f80;
  font-size: 14px;
  font-weight: 600;
  width: auto;
}

#desktop-saved-profile-select {
  min-width: 170px;
  max-width: 220px;
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
}

.desktop-actions-separator {
  width: 1px;
  height: 30px;
  background: #b8cbe0;
  display: inline-block;
}

.desktop-actions-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: #e7eff7;
  color: #15569b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.desktop-actions-toggle:hover {
  background: #d6e4f2;
  color: #0d4685;
}

.desktop-actions-menu {
  position: absolute;
  top: 50px;
  right: 0;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 450;
}

.desktop-actions-menu.open {
  display: flex;
}

.desktop-action-item {
  border: none;
  border-radius: 8px;
  background: #f4f8fd;
  color: #1b4f80;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

.desktop-action-item:hover {
  background: #e3effb;
}

/* Material Icons Setup */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  color: inherit;
}

/* Keep default text selection color for content; disable selection visuals on interactive elements below */

/* Prevent tap highlight on mobile for the whole document */
html,
body {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Keep keyboard accessibility: show visible focus only for keyboard users */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
}

form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

label,
input {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

input {
  padding: 8px;
}

.saved-profiles-container {
  display: none;
  margin-bottom: 12px;
}

.home-mode-switcher {
  padding: 16px 18px;
  border: 1px solid #d9e5ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fd 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px 0;
  border-color: rgb(26, 115, 232);
  box-sizing: border-box;
}

body.sem-dados .home-mode-switcher {
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px 0;
  box-sizing: border-box;
}

body:not(.sem-dados) .home-mode-switcher {
  width: 100%;
  max-width: 100%;
  margin: 0 0 0px 0;
}

.home-mode-switcher label {
  width: auto;
  margin-bottom: 8px;
  font-weight: 700;
  color: #0f3f7a;
}

.home-mode-switcher select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 10px 12px;
  border: 1px solid #cfdbea;
  border-radius: 10px;
  background: #fff;
  color: #173b66;
}

.home-mode-hint {
  margin: 8px 0 0;
  color: #5d7287;
  font-size: 0.95rem;
}

.home-mode-panel {
  display: none;
}

.home-mode-panel.is-active {
  display: block;
}

.home-mode-panel-sem-dados {
  display: none;
}

/* Quando sem-dados está ativa na body, força exibição do painel reduzido e oculta os painéis de perfil */
body.sem-dados .home-mode-panel {
  display: none !important;
}

body.sem-dados .home-mode-panel-sem-dados {
  display: block !important;
  margin-top: 24px;
}

body:not(.sem-dados) .home-mode-panel-sem-dados {
  display: none !important;
}

.home-mode-shell {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d9e5ef;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.home-mode-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.home-mode-panel-sem-dados .home-mode-hero {
  background: linear-gradient(135deg, var(--app-accent-soft) 0%, #ffffff 100%);
  border: 1px solid color-mix(in srgb, var(--app-accent) 18%, #cfdbea);
  border-radius: 14px;
  margin-bottom: 24px;
  padding: 20px;
}

.home-mode-hero-copy h2 {
  margin: 6px 0 8px;
  color: var(--app-accent-strong);
}

.home-mode-hero-copy p {
  margin: 0;
  color: #4d6277;
}

.home-mode-eyebrow {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-mode-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f3f7a 0%, #1f6fc1 100%);
  color: #fff;
}

.home-mode-hero-panel strong {
  font-size: 1.05rem;
}

.home-mode-hero-panel span {
  color: rgba(255, 255, 255, 0.88);
}

.home-mode-hero-panel-contrast {
  background: linear-gradient(135deg, #4d2c91 0%, #7b3fe4 100%);
}

.home-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.home-mode-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #d9e5ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.home-mode-card h3 {
  margin: 0 0 8px;
  color: #143f72;
}

.home-mode-card p {
  margin: 0;
  color: #4d6277;
}

.home-mode-card-featured {
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
}

.home-mode-card-accent {
  background: linear-gradient(135deg, #eef9f3 0%, #ffffff 100%);
}

.home-tech-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
  margin-top: 18px;
}

.home-tech-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--app-accent) 20%, #d9e5ef);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--app-accent-soft) 72%, #ffffff) 0%, #ffffff 100%);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  font-family: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.home-tech-widget::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--app-accent) 0%, color-mix(in srgb, var(--app-accent) 55%, #ffffff) 100%);
}

.home-tech-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.09);
  border-color: color-mix(in srgb, var(--app-accent) 36%, #b9cde0);
}

.home-tech-widget h3 {
  margin: 0;
  color: var(--app-accent-strong);
  font-size: 1.04rem;
  line-height: 1.25;
}

.home-tech-widget p {
  margin: 0;
  color: #4d6277;
  line-height: 1.6;
}

.home-tech-widget-link::after {
  content: '→';
  position: absolute;
  top: 16px;
  right: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
  font-size: 1rem;
  font-weight: 700;
}

.home-tech-widget-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-tech-widget-tag-dev {
  background: color-mix(in srgb, var(--app-accent) 14%, #ffffff);
  color: var(--app-accent-strong);
}

.home-tech-widget-cta {
  margin-top: auto;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
  font-weight: 700;
}

.home-tech-widget-cta-disabled {
  background: #eff3f7;
  color: #7c8997;
}

.home-tech-widget-link.home-tech-widget-accent {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--app-accent-soft) 88%, #ffffff) 0%, #ffffff 100%);
  border-color: color-mix(in srgb, var(--app-accent) 32%, #bcd0e6);
}

body[data-app-mode="graduacao"] .home-tech-widget-link.home-tech-widget-accent {
  box-shadow: 0 12px 24px rgba(25, 118, 210, 0.08);
}

body[data-app-mode="graduacao"] .home-tech-widget-link.home-tech-widget-accent::before {
  background: linear-gradient(90deg, #1976d2 0%, #4b9cf2 100%);
}

body[data-app-mode="responsavel"] .home-tech-widget-link.home-tech-widget-accent {
  box-shadow: 0 12px 24px rgba(123, 63, 228, 0.08);
}

body[data-app-mode="responsavel"] .home-tech-widget-link.home-tech-widget-accent::before {
  background: linear-gradient(90deg, #7b3fe4 0%, #9b6fff 100%);
}

.home-tech-widget-development {
  border-style: dashed;
}

.home-tech-widget-development::after {
  content: 'Em desenvolvimento';
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(38deg);
  padding: 4px 42px;
  background: color-mix(in srgb, var(--app-accent) 12%, #ffffff);
  color: var(--app-accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}

body[data-app-mode="tecnico"] .home-tech-widget-link.home-tech-widget-accent {
  box-shadow: 0 12px 24px rgba(15, 138, 95, 0.08);
}

body[data-app-mode="tecnico"] .home-tech-widget-link.home-tech-widget-accent::before {
  background: linear-gradient(90deg, #0f8a5f 0%, #12a06f 100%);
}

body[data-app-mode="tecnico"] .home-tech-widget-link::after,
body[data-app-mode="responsavel"] .home-tech-widget-link::after {
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
}

body[data-app-mode] .home-tech-widget-development::after {
  opacity: 0.92;
}

body[data-app-mode] .home-mode-note {
  border-style: solid;
  border-radius: 14px;
  background: color-mix(in srgb, var(--app-accent-soft) 35%, #ffffff);
}

body[data-app-mode] .home-tech-widget-development {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--app-accent-soft) 62%, #ffffff) 0%, #ffffff 100%);
}

.home-mode-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.home-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f1fb;
  color: #0f3f7a;
  font-size: 0.86rem;
  font-weight: 600;
}

.home-mode-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f8fc;
  border: 1px dashed #c8d7e7;
  color: #4d6277;
}

.home-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.home-mode-action {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: #0f3f7a;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.home-mode-action-secondary {
  background: #e8f1fb;
  color: #0f3f7a;
}

.home-mode-action:hover,
.home-mode-action-secondary:hover {
  filter: brightness(0.98);
}

@media (max-width: 900px) {

  .home-mode-hero,
  .home-mode-grid,
  .home-mode-grid-wide,
  .home-tech-widget-grid {
    grid-template-columns: 1fr;
  }

  .home-tech-widget {
    min-height: 0;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 15px;
}

th {
  background-color: #f2f2f2;
}

.error {
  color: red;
  margin-top: 10px;
  font-size: 15px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  align-items: center;
  justify-content: flex-end;
}

.tab-button {
  padding: 10px 20px;
  cursor: pointer;
  background-color: #eee;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s;
  font-size: 15px;
}

.tab-button.active {
  /* 1. Mude o fundo para dar contraste com a borda */
  background-color: #ccc;

  /* 2. Defina a borda sólida */
  border: 2px 20px solid #fff;

  /* 3. O PULO DO GATO: */
  /* Isso força a borda a ser desenhada "para dentro" do tamanho total */
  box-sizing: border-box;
}

.tab-button:hover {
  background-color: #e0e0e0;
  color: #1976d2;
  transition: background-color 0.2s, color 0.2s;
}

button:hover {
  background-color: #2196f3;
  color: #fff;
  transition: background-color 0.2s, color 0.2s;
}

/* Remove blue tap highlight and text selection on touch devices */
button,
.tab-button,
.fab-toggle,
.fab-item,
#fechar-aviso,
#nao-mostrar-aviso {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  /* iOS/Android WebKit */
  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* prevent selection on double-tap */
  touch-action: manipulation;
  /* help prevent default selection gestures */
}

/* Remove default focus outline/box-shadow when tapping on mobile; keep accessibility via :focus-visible if desired */
button:focus,
.tab-button:focus,
.fab-toggle:focus,
.fab-item:focus,
#fechar-aviso:focus,
#nao-mostrar-aviso:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Prevent ::selection background on interactive elements (buttons/tabs/FAB) but keep normal selection in text content */
button::selection,
.tab-button::selection,
.fab-toggle::selection,
.fab-item::selection,
#fechar-aviso::selection,
#nao-mostrar-aviso::selection {
  background: transparent;
  color: inherit;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

/* Swipe tab transition classes */
.tab-content.swipe-dragging {
  transition: none;
  will-change: transform;
}

.tab-content.swipe-peek {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
  pointer-events: none;
  transition: none;
}

.tab-content.swipe-snap {
  will-change: transform;
}

.tab-content.swipe-peek.swipe-snap {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
  pointer-events: none;
}

.mobile-fab {
  display: none;
}


#tabela-horarios {
  margin: 0;
}

/* ===== Tabela "Hoje" — tema azul ===== */
.tabela-wrapper-hoje {
  border: 1px solid #1a73e8;
  border-radius: 8px;
  overflow: hidden;
}

#tabela-horarios-hoje th {
  background-color: #1565c0;
  color: #ffffff;
  border-color: #1a73e8;
}

#tabela-horarios-hoje td {
  border-color: #bbdefb;
}

#tabela-horarios-hoje tbody tr:nth-child(even) {
  background-color: #e3f2fd;
}

#tabela-horarios-hoje tbody tr:hover {
  background-color: #bbdefb;
}

/* Colunas de comparação na tabela Hoje */
#tabela-horarios-hoje.comparison-mode tbody td.compare-col {
  background: #fff3e0;
  border-color: #ffcc80;
  color: #655236;
}

#tabela-horarios-hoje.comparison-mode tbody tr:nth-child(even) td.compare-col {
  background: #ffe7c6;
}

#tabela-horarios-hoje.comparison-mode tbody tr:hover td.compare-col {
  background: #ffe0ba !important;
  border-color: #ffb74d;
}

#tabela-horarios-hoje.comparison-mode thead th.compare-col {
  background: #ffe7c6 !important;
  border-color: #ffcc80;
  color: #655236 !important;
}

/* Esconde o wrapper quando a tabela Hoje está oculta (ex: fim de semana) */
.tabela-wrapper-hoje:has(#tabela-horarios-hoje[style*="display: none"]) {
  display: none;
}

@media (min-width: 1041px) {
  #home-content {
    padding: 20px !important;
  }
}

#responsavel-calendar-container {
  display: none;
}

body[data-home-mode="responsavel"] #responsavel-calendar-container {
  display: none;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 1040px) {
  :root {
    --mobile-bottom-nav-height: 74px;
    --mobile-bottom-safe-space: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }


  .desktop-quick-actions {
    display: none;
  }

  .saved-profiles-container {
    display: block;
  }

  .desktop-saved-profiles,
  .header-calendar-toggle-wrapper {
    display: none !important;
  }

  .page-header {
    position: static;
    top: auto;
    z-index: auto;
    display: block;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
  }

  .page-header h1 {
    display: none;
  }


  .tabela-wrapper {
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
  }

  #tab-horarios {
    font-size: 12px;
    overflow: auto !important;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
  }

  #tabela-horarios-detalhados {
    margin: 0px;
  }

  /* Frequências mobile overrides */
  #tab-frequencias>* {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  div#resumo-frequencia-disciplina {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .resumo-frequencia {
    min-width: 420px;
  }

  .resumo-frequencia th,
  .resumo-frequencia td {
    font-size: 10px;
    padding: 6px 5px;
  }

  .resumo-frequencia th {
    white-space: nowrap;
  }

  .resumo-frequencia td:first-child {
    max-width: 100px;
    white-space: normal;
  }

  .resumo-frequencia td:first-child .disc-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }

  .freq-card {
    max-width: 100%;
    overflow: hidden;
  }

  .freq-card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #tabela-frequencias {
    min-width: 0;
    width: 100%;
  }

  #tabela-frequencias th,
  #tabela-frequencias td {
    font-size: 11px;
    padding: 6px 5px;
    white-space: nowrap;
  }

  /* Discipline name: wrap to max 2 lines with ellipsis */
  #tabela-frequencias td:first-child {
    max-width: 120px;
    white-space: normal;
  }

  #tabela-frequencias td:first-child .disc-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }

  #tabela-frequencias th {
    white-space: nowrap;
    font-size: 10px;
  }

  .freq-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  #select-disciplina-frequencia {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
  }

  #barra-progresso-faltas {
    max-width: 100%;
    box-sizing: border-box;
  }

  .freq-info-details,
  .freq-aviso-card {
    max-width: 100%;
    box-sizing: border-box;
  }

  .tab-novidades {
    font-size: 12px;
    margin: 0px;
    overflow-y: auto !important;
    overflow-x: auto !important;
    border: 1px solid #1f1f1f !important;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .tab-novidades table {
    min-width: 650px;
  }

  #tabela-novidades {
    font-size: 12px;
    margin: 0px;
    overflow-y: auto !important;
    overflow-x: auto !important;
  }

  body {
    padding: 10px;
    font-size: 18px;
  }

  form {
    padding: 15px;
    border: 1px solid #1f1f1f
  }

  label,
  input {
    font-size: 18px;
  }

  input {
    padding: 10px;
  }

  th,
  td {
    padding: 8px;
    font-size: 3.5vw;
  }

  .tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    gap: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px)) 0;
    height: auto;
    flex-wrap: nowrap;
  }

  body {
    padding-bottom: calc(var(--mobile-bottom-safe-space) + 12px);
  }

  .tab-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 4px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #1565c0;
    font-size: 0;
    white-space: nowrap;
    font-weight: 400;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin: 0 2px;
    height: 60px;
  }

  .tab-button:hover {
    background: rgba(21, 101, 192, 0.08);
  }

  .tab-button.active {
    flex: 1.4;
    color: #1565c0;
    padding: 10px 14px;
  }

  .tab-button.active .tab-icon {
    transform: scale(1.15);
  }

  .tab-icon {
    font-size: 28px;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    color: inherit;
  }

  .tab-label {
    display: none;
    font-size: 11px;
    color: inherit;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    word-break: break-word;
  }

  .tab-button.active .tab-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
  }

  /* Esconde tabs que não estão na barra de navegação (acessíveis via FAB) */
  .tab-button[data-tab="tab-horarios"],
  .tab-button[data-tab="tab-novidades"] {
    display: none;
  }

  /* Garante que conteúdo não fica atrás da bottom nav */
  .tab-content {
    padding-bottom: calc(var(--mobile-bottom-safe-space) + 18px);
  }

  .tab-content.active {
    min-height: calc(100dvh - var(--mobile-bottom-safe-space) - 12px);
    box-sizing: border-box;
    padding-bottom: calc(var(--mobile-bottom-safe-space) + 26px);
  }

  .tab-content.active::after {
    content: '';
    display: block;
    width: 100%;
    height: calc(var(--mobile-bottom-safe-space) + 8px);
    flex: 0 0 auto;
  }

  /* Floating Action Button (FAB) para mobile */
  .mobile-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--mobile-bottom-safe-space) + 12px);
    z-index: 1200;
    /* manter o toggle no fluxo; o menu ficará posicionado de forma absoluta acima */
    display: block;
    /* visível somente dentro deste bloco (mobile) */
    width: auto;
    opacity: 1;
    transform: scale(1);
    transition: opacity 300ms ease, transform 300ms ease;
  }

  .mobile-fab.minimized {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
  }

  .fab-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1976d2;
    color: #fff;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fab-menu {
    display: flex;
    position: absolute;
    right: 0;
    /* coloca o menu acima do botão (botão tem 56px + 8px de gap) */
    bottom: 72px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    transform-origin: bottom right;
    /* container com a mesma cor do botão */
    background: #1976d2;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    /* animação de expansão (scale X e Y) */
    transform: scale(0.6, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), opacity 180ms ease;
  }

  .fab-menu.open {
    transform: scale(1, 1);
    opacity: 1;
    pointer-events: auto;
  }

  /* animação dos itens (staggered) */
  .fab-item {
    transform: translateY(6px) scale(0.98);
    opacity: 0;
    transition: transform 220ms cubic-bezier(.2, .9, .2, 1), opacity 160ms ease;
  }

  .fab-menu.open .fab-item {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .fab-menu.open .fab-item:nth-child(1) {
    transition-delay: 40ms;
  }

  .fab-menu.open .fab-item:nth-child(2) {
    transition-delay: 80ms;
  }

  .fab-menu.open .fab-item:nth-child(3) {
    transition-delay: 120ms;
  }

  .fab-item {
    background: transparent;
    /* itens dentro do container colorido */
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #fff;
    /* texto branco sobre o fundo do container */
    cursor: pointer;
    text-align: right;
    min-width: 150px;
  }

  .fab-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .fab-item-minimize {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    padding-top: 10px;
    margin-top: 4px;
  }

  .fab-item-minimize:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  /* Minimized FAB indicator - thin bar at the corner */
  .fab-minimized {
    position: fixed;
    right: 0;
    bottom: calc(var(--mobile-bottom-safe-space) + 12px);
    width: 10px;
    height: 60px;
    background: linear-gradient(to bottom, #1976d2, #1565c0);
    z-index: 1100;
    cursor: pointer;
    display: none;
    align-items: flex-end;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 300ms ease, width 0.3s ease, transform 300ms ease;
    border-radius: 15px 0 0 15px;
  }

  .fab-minimized:hover {
    opacity: 1;
    width: 15px;
    border-radius: 10px 0 0 10px;
  }

  .fab-minimized.visible {
    display: flex;
    opacity: 1;
    transform: scale(1);
  }

  /* Touch feedback: provide a subtle 'pressed' state on touch devices
     without changing desktop hover behavior. Uses :active inside a
     touch-only media query so keyboard/desktop hovers are unaffected. */
  @media (hover: none) and (pointer: coarse) {

    button,
    .tab-button,
    .fab-toggle,
    .fab-item,
    #fechar-aviso,
    #nao-mostrar-aviso {
      transition: background-color 160ms ease, transform 120ms ease;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    button:active,
    .tab-button:active,
    .fab-toggle:active,
    .fab-item:active,
    #fechar-aviso:active,
    #nao-mostrar-aviso:active {
      background-color: rgba(0, 0, 0, 0.08);
      /* subtle darken on press */
      transform: translateY(1px) scale(0.998);
    }

    /* For colored buttons like the FAB, slightly reduce brightness on press */
    .fab-toggle:active {
      filter: brightness(0.92);
    }
  }

  /* reforça remoção de destaque em dispositivos touch dentro do media query mobile */
  .fab-toggle,
  .fab-item,
  .tab-button,
  button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}

/* Reset das abas para desktop - voltam comportamento original */
@media (min-width: 1041px) {
  .page-header {
    align-items: center;
  }

  .desktop-quick-actions {
    display: inline-flex;
  }

  .tabs {
    position: static !important;
    bottom: auto;
    left: auto;
    right: auto;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    background: transparent;
    z-index: auto;
    padding: 0;
    margin-top: 0;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
  }

  body {
    padding-bottom: auto;
  }

  .tab-button {
    flex: unset;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    background-color: #eee;
    color: #000;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
  }

  .tab-button:hover {
    background-color: #d0d0d0;
    color: #1565c0;
  }

  .tab-button.active {
    background-color: #ccc;
    color: #1565c0;
  }

  .tab-button.active .tab-icon {
    transform: none;
  }

  .tab-icon {
    font-size: 20px;
    display: inline;
    transition: none;
    line-height: 1;
    color: inherit;
  }

  .tab-label {
    display: inline;
    font-size: 15px;
    color: inherit;
  }

  .tab-content {
    padding-bottom: auto;
  }

  /* Mostra tabs que estão escondidas no mobile */
  .tab-button[data-tab="tab-horarios"],
  .tab-button[data-tab="tab-novidades"] {
    display: inline-flex;
  }
}

.tabela-notas-wrapper {
  overflow: auto;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
}

@media (min-width: 1041px) {
  #home-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "form novidades"
      "dados novidades";
    gap: 24px 32px;
    align-items: start;
    justify-items: stretch;
    height: 100%;
    /* Garante altura total do grid */
  }

  body[data-home-mode="responsavel"] #home-content {
    align-items: stretch;
  }

  #sigaa-form {
    grid-area: form;
    margin-bottom: 0;
  }

  #home-listas-container {
    grid-area: novidades;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-self: stretch;
  }

  body[data-home-mode="responsavel"] #home-listas-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-content: stretch;
    height: 100%;
    min-height: 0;
  }

  .novidades-toggle {
    display: none;
  }

  .novidades-toggle-btn {
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    color: #1f2328;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .novidades-toggle-btn.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
  }

  .home-lista-container {
    border: 1px solid #1a73e8;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    height: auto;
    max-height: 491px;
    transition: max-height 0.3s, box-shadow 0.25s ease, transform 0.25s ease;
  }

  body[data-home-mode="responsavel"] .home-lista-container {
    display: none !important;
  }

  body[data-home-mode="responsavel"] #responsavel-calendar-container,
  body[data-home-mode="graduacao"] #responsavel-calendar-container {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 0;
    padding: 0;
    border: 1px solid #1a73e8;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(16, 62, 93, 0.1);
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 !important;
    background: #ffffff;
  }

  body[data-home-mode="responsavel"] #home-listas-container {
    align-self: end !important;
  }

  .home-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1565c0;
    color: #ffffff;
    border-bottom: 1px solid #1a73e8;
    box-sizing: border-box;
  }

  .home-calendar-eyebrow {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #responsavel-calendar-title {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
  }

  .home-calendar-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 500;
  }

  .home-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
  }

  .home-calendar-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: block;
    flex-shrink: 0;
  }

  .home-calendar-legend .home-calendar-dot {
    border: 1.5px solid #ffffff;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .home-calendar-dot-today {
    background: var(--app-accent);
  }

  .home-calendar-dot-available {
    background: color-mix(in srgb, var(--app-accent-soft) 85%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--app-accent) 22%, #b7cce0);
  }

  .home-calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .home-calendar-dot-feriado {
    background-color: #ec4899 !important;
  }

  .home-calendar-dot-recesso {
    background-color: #fb7185 !important;
  }

  .home-calendar-dot-inicio-aulas {
    background-color: var(--app-accent, #8b5cf6) !important;
  }

  .home-calendar-dot-fim-aulas {
    background-color: #10b981 !important;
  }

  .home-calendar-dot-outros {
    background-color: #64748b !important;
  }

  .home-calendar-dot-entrega {
    background-color: #0d9488 !important;
  }

  .home-calendar-dot-prova {
    background-color: #dc2626 !important;
  }

  .home-calendar-day {
    position: relative;
    /* para posicionamento do tooltip */
  }

  .home-calendar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1e293b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    width: max-content;
    max-width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    text-align: left;
  }

  .home-calendar-day:hover .home-calendar-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .home-calendar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
  }

  .home-calendar-tooltip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
  }

  .home-calendar-tooltip-item:not(:last-child) {
    border-bottom: 1px solid #334155;
    margin-bottom: 4px;
    padding-bottom: 6px;
  }

  .home-calendar-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
  }

  .home-calendar-tooltip-dot-feriado {
    background-color: #ec4899;
  }

  .home-calendar-tooltip-dot-recesso {
    background-color: #fb7185;
  }

  .home-calendar-tooltip-dot-inicio-aulas {
    background-color: var(--app-accent, #8b5cf6);
  }

  .home-calendar-tooltip-dot-fim-aulas {
    background-color: #10b981;
  }

  .home-calendar-tooltip-dot-outros {
    background-color: #64748b;
  }

  .home-calendar-tooltip-dot-entrega {
    background-color: #0d9488;
  }

  .home-calendar-tooltip-dot-prova {
    background-color: #dc2626;
  }

  .home-calendar-tooltip-text {
    color: #f1f5f9;
    font-size: 0.75rem;
    white-space: normal;
  }

  .home-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 18px;
    background: #f0f4f9;
    border-bottom: 1px solid #e3f2fd;
    color: #1a3e6e;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-sizing: border-box;
  }

  .home-calendar-weekdays span {
    text-align: center;
  }

  .home-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 18px;
    min-height: 0;
    align-content: start;
    grid-auto-rows: 92px;
    box-sizing: border-box;
  }

  .home-calendar-month-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1565c0;
    text-transform: capitalize;
    user-select: none;
  }
  .home-calendar-month-divider::before,
  .home-calendar-month-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.15), rgba(26, 115, 232, 0.4));
  }
  .home-calendar-month-divider::after {
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.4), rgba(26, 115, 232, 0.15));
  }

  .home-calendar-day.is-empty-filler {
    opacity: 0.15;
    border: 1px dashed rgba(26, 115, 232, 0.2);
    background: transparent;
    pointer-events: none;
    box-shadow: none;
  }

  .home-calendar-day {
    min-height: 0;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--app-accent) 16%, #dce7f0);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .home-calendar-day.is-next-month {
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96) 0%, rgba(241, 246, 252, 0.96) 100%);
    border-style: dashed;
    border-color: color-mix(in srgb, var(--app-accent) 10%, #dce7f0);
    opacity: 0.9;
  }

  .home-calendar-day.is-muted {
    background: linear-gradient(180deg, rgba(249, 251, 253, 0.96) 0%, rgba(242, 246, 250, 0.96) 100%);
    color: #7b8a99;
  }

  .home-calendar-day.is-next-month .home-calendar-day-label::after {
    content: '';
  }

  /* Estilização para as novas tags de eventos do calendário */
  .home-calendar-event-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4.5px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    line-height: normal;
  }

  .home-calendar-event-tag .home-calendar-dot {
    width: 6px;
    height: 6px;
    margin: 0;
    display: block;
    align-self: center;
  }

  .home-calendar-event-tag-feriado {
    background-color: #fce7f3;
    color: #db2777;
  }

  .home-calendar-event-tag-recesso {
    background-color: #ffe3e8;
    color: #e63946;
  }

  .home-calendar-event-tag-inicio-aulas {
    background-color: var(--app-accent-soft, #f3e8ff);
    color: var(--app-accent-strong, #6d28d9);
  }

  .home-calendar-event-tag-fim-aulas {
    background-color: #d1fae5;
    color: #047857;
  }

  .home-calendar-event-tag-outros {
    background-color: #f1f5f9;
    color: #475569;
  }

  .home-calendar-event-tag-entrega {
    background-color: #e6fffa;
    color: #0f766e;
  }

  .home-calendar-event-tag-prova {
    background-color: #fee2e2;
    color: #dc2626;
  }

  .home-calendar-event-tag-text {
    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-block;
  }

  /* Estilização para segunda borda/borda interna colorida para dias com eventos */
  .home-calendar-day.has-event-feriado {
    border-color: #db2777 !important;
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.15) 0%, #ffffff 100%) !important;
    box-shadow: inset 0 0 0 1.5px #db2777, 0 4px 10px rgba(219, 39, 119, 0.08) !important;
  }

  .home-calendar-day.has-event-recesso {
    border-color: #fb7185;
    box-shadow: inset 0 0 0 1.5px #fb7185, 0 4px 10px rgba(251, 113, 133, 0.08);
  }

  .home-calendar-day.has-event-inicio-aulas {
    border-color: var(--app-accent, #8b5cf6);
    box-shadow: inset 0 0 0 1.5px var(--app-accent, #8b5cf6), 0 4px 10px rgba(139, 92, 246, 0.08);
  }

  .home-calendar-day.has-event-fim-aulas {
    border-color: #10b981;
    box-shadow: inset 0 0 0 1.5px #10b981, 0 4px 10px rgba(16, 185, 129, 0.08);
  }

  .home-calendar-day.has-event-entrega {
    border-color: #0d9488 !important;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, #ffffff 100%) !important;
    box-shadow: inset 0 0 0 1.5px #0d9488, 0 4px 10px rgba(13, 148, 136, 0.08) !important;
  }

  .home-calendar-day.has-event-prova {
    border-color: #dc2626 !important;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, #ffffff 100%) !important;
    box-shadow: inset 0 0 0 1.5px #dc2626, 0 4px 10px rgba(220, 38, 38, 0.08) !important;
  }

  .home-calendar-day.has-event-outros {
    border-color: #64748b;
    box-shadow: inset 0 0 0 1.5px #64748b, 0 4px 10px rgba(100, 116, 139, 0.08);
  }

  .home-calendar-day.is-today {
    border-color: var(--app-accent) !important;
    background: linear-gradient(180deg, rgba(25, 118, 210, 0.12) 0%, #ffffff 100%) !important;
    box-shadow: inset 0 0 0 2.5px var(--app-accent), 0 12px 24px rgba(25, 118, 210, 0.18) !important;
    z-index: 10;
  }

  .home-calendar-day.is-today .home-calendar-day-number {
    background-color: var(--app-accent);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.95rem;
    margin-top: -2px;
    margin-left: -2px;
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.35);
  }

  .home-calendar-day.is-today .home-calendar-day-label {
    color: var(--app-accent-strong) !important;
    font-weight: 800;
  }

  .home-calendar-day-number {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--app-accent-strong);
    transition: all 0.2s ease;
  }

  .home-calendar-day-label {
    font-size: 0.78rem;
    color: #647487;
  }

  .home-lista-container:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
  }

  .home-painel-titulo {
    margin: 0;
    padding: 12px 14px;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-bottom: 1px solid #1a73e8;
    background: #1565c0;
    color: #ffffff;
  }

  /* Novidades: base da tabela "Hoje" */
  #tabela-novidades-container {
    border-color: #1769d4;
    background: #ffffff;
  }

  #tabela-novidades-container .home-painel-titulo {
    background: #1156b0;
    border-bottom-color: #1769d4;
    color: #ffffff;
  }

  /* Atividades: azul escuro complementar */
  #tabela-atividades-container {
    border-color: #1565c0;
    background: #ffffff;
  }

  #tabela-atividades-container .home-painel-titulo {
    background: #0d47a1;
    border-bottom-color: #1565c0;
    color: #ffffff;
  }

  #tabela-novidades-home,
  #tabela-atividades-home {
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  #tabela-novidades-home thead th,
  #tabela-atividades-home thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  #tabela-novidades-home thead th {
    background: #1156b0;
    color: #ffffff;
    border-color: #1769d4;
  }

  #tabela-atividades-home thead th {
    background: #0d47a1;
    color: #ffffff;
    border-color: #1565c0;
  }

  #tabela-novidades-home td,
  #tabela-atividades-home td {
    background: #ffffff;
  }

  #tabela-novidades-home td {
    border-color: #bfdcf6;
  }

  #tabela-atividades-home td {
    border-color: #c5d9f1;
  }

  #tabela-novidades-home tbody tr:nth-child(even) td {
    background: #e6f1fc;
  }

  #tabela-atividades-home tbody tr:nth-child(even) td {
    background: #e8f0fb;
  }

  #tabela-novidades-home tbody tr:hover td {
    background: #c2dcf7;
  }

  #tabela-atividades-home tbody tr:hover td {
    background: #c8dbf2;
  }

  #novidades-home-vazio,
  #atividades-home-vazio {
    margin: 10px;
    border-radius: 10px;
    text-align: center;
  }

  #novidades-home-vazio {
    border: 1px dashed #1769d4;
    background: #e8f1fd;
    color: #255078 !important;
  }

  #atividades-home-vazio {
    border: 1px dashed #1565c0;
    background: #e9f0fb;
    color: #274d73 !important;
  }

  #dados-institucionais {
    grid-area: dados;
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media (min-width: 1040px) {

  #dados-institucionais.expanded~#home-listas-container .home-lista-container,
  #dados-institucionais:hover~#home-listas-container .home-lista-container {
    max-height: 871px;
  }
}

@media (max-width: 1040px) {
  body {
    padding: 8px;
  }

  body.sem-dados {
    padding: 0px;
    padding-top: 0px !important;
    margin: 0px;
    height: 100vh;
  }

  #tab-home {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  #home-consultation-shell {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
  }

  #home-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
    padding-top: 5% !important;
    padding-bottom: 5% !important;
  }

  #home-content-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
  }

  .home-mode-switcher,
  #dados-institucionais {
    width: 90% !important;
    max-width: 440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    align-self: center !important;
  }

  #dados-institucionais {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 12px;
    overflow: hidden;
  }

  #dados-institucionais h2 {
    font-size: 14px;
    padding: 10px 12px;
  }

  #dados-institucionais ul {
    margin: 0;
    padding: 0;
  }

  #dados-institucionais li {
    padding: 9px 12px;
    font-size: 13px;
    gap: 6px;
    line-height: 1.35;
    word-break: break-word;
  }

  #dados-institucionais .extra-info li {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #dados-institucionais::after {
    top: 12px;
    right: 12px;
  }

  #sigaa-form {
    width: 90% !important;
    max-width: 440px !important;
    margin: 0 auto 20px auto !important;
    padding: 22px 18px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #1a73e8 !important;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.12) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    align-self: center !important;
  }

  #sigaa-form label:not(.remember-login-label) {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1a3e6e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 4px !important;
    display: block !important;
  }

  #sigaa-form input[type="text"],
  #sigaa-form input[type="password"] {
    width: 100% !important;
    height: 46px !important;
    font-size: 16px !important;
    padding: 10px 14px !important;
    border: 1px solid #c5d9ed !important;
    border-radius: 10px !important;
    background: #f8fbff !important;
    box-sizing: border-box !important;
    color: #1e293b !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  #sigaa-form input[type="text"]:focus,
  #sigaa-form input[type="password"]:focus {
    border-color: #1565c0 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.14) !important;
    outline: none !important;
  }

  #sigaa-form .password-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 6px !important;
    width: 100% !important;
  }

  #sigaa-form .login-action-btn {
    width: 100% !important;
    height: 46px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, box-shadow 0.2s ease !important;
  }

  #sigaa-form .login-action-btn:active {
    transform: scale(0.98) !important;
  }

  #sigaa-form .remember-login-label {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: #f1f7fe !important;
    border: 1px solid #d0e3f7 !important;
    font-size: 13px !important;
    color: #1a3e6e !important;
    box-sizing: border-box !important;
  }

  #saved-profiles-container {
    width: 100%;
  }


  .novidades-toggle {
    display: none;
    gap: 8px;
    padding: 10px 10px 4px;
  }

  #home-listas-container {
    display: none !important;
  }

  .home-lista-container {
    border: none;
    border-radius: 0;
    background: transparent;
    max-height: none;
    box-shadow: none;
  }

  .home-painel-titulo {
    display: none;
  }

  .tabela-horarios th:nth-child(3),
  /* Turma */
  .tabela-horarios th:nth-child(4),
  /* Período */
  .tabela-horarios td:nth-child(3),
  .tabela-horarios td:nth-child(4) {
    display: none;
  }

  .tabela-horarios th,
  .tabela-horarios td {
    font-size: 13px;
    padding: 6px 4px;
  }

  .tabela-horarios.comparison-mode td .comparison-cell-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 3.6em;
  }

  h1 {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

.tabela-horarios th:nth-child(3),
.tabela-horarios td:nth-child(3) {
  display: none;
}

/* Defina larguras estáticas para as colunas restantes */
.tabela-horarios th:nth-child(1),
.tabela-horarios td:nth-child(1) {
  width: 55%;
  /* Exemplo: Código */
  min-width: 55%;
  max-width: 55%;
}

.tabela-horarios th:nth-child(2),
.tabela-horarios td:nth-child(2) {
  width: 25%;
  /* Exemplo: Nome da disciplina */
  min-width: 25%;
  max-width: 25%;
  text-align: center;
}

.tabela-horarios th:nth-child(5),
.tabela-horarios td:nth-child(5) {
  width: 20%;
  /* Exemplo: Horário */
  min-width: 20%;
  max-width: 20%;
  justify-content: center;
  text-align: center;
}

.tabela-horarios.comparison-mode th,
.tabela-horarios.comparison-mode td {
  width: auto;
  min-width: 0;
  max-width: none;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.tabela-horarios.comparison-mode {
  table-layout: fixed;
}

.tabela-horarios.comparison-mode th:nth-child(1),
.tabela-horarios.comparison-mode td:nth-child(1),
.tabela-horarios.comparison-mode th:nth-child(2),
.tabela-horarios.comparison-mode td:nth-child(2) {
  width: 23%;
  min-width: 23%;
  max-width: 23%;
}

.tabela-horarios.comparison-mode th:nth-child(3),
.tabela-horarios.comparison-mode td:nth-child(3),
.tabela-horarios.comparison-mode th:nth-child(4),
.tabela-horarios.comparison-mode td:nth-child(4) {
  width: 15%;
  min-width: 15%;
  max-width: 15%;
}

.tabela-horarios.comparison-mode th:nth-child(5),
.tabela-horarios.comparison-mode td:nth-child(5) {
  width: 12%;
  min-width: 12%;
  max-width: 12%;
}

.tabela-horarios.comparison-mode th:nth-child(6),
.tabela-horarios.comparison-mode td:nth-child(6) {
  width: 12%;
  min-width: 12%;
  max-width: 12%;
}

.tabela-horarios.comparison-mode th:nth-child(3),
.tabela-horarios.comparison-mode td:nth-child(3) {
  display: table-cell;
}

.tabela-horarios.comparison-mode th:nth-child(4),
.tabela-horarios.comparison-mode td:nth-child(4) {
  display: table-cell;
}

.tabela-horarios.comparison-mode thead tr:first-child th {
  background: #f2f2f2;
  color: #1f1f1f;
  text-align: center;
}

.tabela-horarios.comparison-mode thead tr:first-child th.compare-col {
  background: #ef6c00;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) thead tr:nth-child(2) th.compare-col,
.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody td.compare-col {
  background: #fff3e0;
  border-color: #ffcc80;
}

th.compare-col {
  background: #ffe7c6 !important;
  border-color: #ffcc80;
  color: #655236 !important;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody td:nth-child(1),
.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody td:nth-child(3) {
  background: #eaf3ff;
  border-color: #bcd7fb;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:nth-child(even) td:nth-child(1),
.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:nth-child(even) td:nth-child(3) {
  background: #dceeff;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:nth-child(even) td.compare-col {
  background: #ffe7c6;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:hover td:nth-child(1),
.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:hover td:nth-child(3) {
  background: #d5e8ff;
}

.tabela-horarios.comparison-mode:not(#tabela-horarios-hoje) tbody tr:hover td.compare-col {
  background: #ffe0ba;
}

.tabela-horarios.comparison-mode thead tr:nth-child(2) th {
  text-align: center;
}

.tabela-horarios.comparison-mode thead tr:nth-child(2) th:not(.compare-col) {
  background: #1a73e8;
  color: #fff;
  border-color: #0f5fc4;
}

.tabela-horarios.comparison-mode thead tr:nth-child(2) th.compare-col {
  background: #ef6c00;
  color: #fff;
  border-color: #d05d00;
}

#loading {
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

#loading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid #333;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Estilos para mensagem de scraping */
.scrape-success {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 8px;
}

.scrape-error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 8px;
}


button {
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
}

#tab-novidades table {
  width: 100%;
  border-collapse: collapse;
}

#tab-novidades th,
#tab-novidades td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

.frequencia-aviso {
  display: none;
}

.frequencia-info {
  display: none;
}

/* ===== Tab Frequências — Modern Card Style ===== */
.freq-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.freq-filter-bar label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #3c4043;
}

#select-disciplina-frequencia {
  flex: 1;
  min-width: 180px;
  max-width: 400px;
  padding: 8px 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: #1f2328;
  cursor: pointer;
  transition: border-color 0.2s;
}

#select-disciplina-frequencia:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

/* Summary card */
div#resumo-frequencia-disciplina {
  margin-bottom: 12px;
  border: none;
  border-radius: 0;
}

.resumo-frequencia {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1a73e8;
  margin-bottom: 0;
}

.resumo-frequencia th {
  background: #1565c0;
  color: #fff;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.resumo-frequencia th:last-child {
  border-right: none;
}

.resumo-frequencia td {
  border: none;
  border-right: 1px solid #e3f2fd;
  border-top: 1px solid #e3f2fd;
  padding: 10px 10px;
  font-size: 0.9rem;
  background: #fff;
}

.resumo-frequencia td:last-child {
  border-right: none;
}

/* Progress bar card */
#barra-progresso-faltas {
  margin: 0 0 14px 0;
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid #d0e3f7;
  border-radius: 10px;
}

#barra-progresso-faltas:empty {
  display: none;
}

/* Main table card */
.freq-card {
  border: 1px solid #1a73e8;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  margin-bottom: 14px;
}

.freq-card-header {
  background: #1565c0;
  color: #fff;
  padding: 11px 16px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.freq-card-body {
  overflow-x: auto;
}

#tabela-frequencias {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

#tabela-frequencias th {
  background: #e8f0fe;
  color: #1a3e6e;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 10px;
  border-bottom: 2px solid #1a73e8;
  border-right: 1px solid #d0e3f7;
  position: sticky;
  top: 0;
  z-index: 1;
}

#tabela-frequencias th:last-child {
  border-right: none;
}

#tabela-frequencias td {
  padding: 9px 10px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f5f5f5;
  color: #333;
}

#tabela-frequencias td:last-child {
  border-right: none;
}

#tabela-frequencias tbody tr:nth-child(even) {
  background: #f8fbff;
}

#tabela-frequencias tbody tr:hover {
  background: #e3f2fd;
}

/* Info details */
.freq-info-details {
  margin-bottom: 12px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.freq-info-details summary {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #3c4043;
  cursor: pointer;
  background: #f6f8fa;
  border-bottom: 1px solid transparent;
  list-style: none;
  display: flex;
  align-items: center;
}

.freq-info-details summary::-webkit-details-marker {
  display: none;
}

.freq-info-details summary::after {
  content: 'expand_more';
  font-family: 'Material Icons';
  font-size: 20px;
  margin-left: auto;
  transition: transform 0.2s;
  color: #5f6368;
}

.freq-info-details[open] summary::after {
  transform: rotate(180deg);
}

.freq-info-details[open] summary {
  border-bottom-color: #dadce0;
}

.freq-info-content {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #444;
}

.freq-info-content ul {
  margin: 4px 0 8px 18px;
  padding: 0;
}

.freq-info-content li {
  margin-bottom: 4px;
}

.freq-info-obs {
  margin: 8px 0 0;
  color: #666;
  font-style: italic;
  font-size: 0.88rem;
}

/* Warning notice */
.freq-aviso-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #5d4037;
  line-height: 1.5;
}

.freq-aviso-icon {
  color: #f9a825;
  font-size: 22px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Progress bar enhancements */
progress.custom-bar {
  border: none;
  height: 12px;
  border-radius: 6px;
  background-color: #e8eaed;
  appearance: none;
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

/* Chrome/Edge/Safari */
progress.custom-bar::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 8px;
}

progress.custom-bar::-webkit-progress-value {
  background-color: #2196f3;
  border-radius: 8px;
  transition: background-color 0.3s;
}

progress.custom-bar.amarelo::-webkit-progress-value {
  background-color: #ffeb3b !important;
}

progress.custom-bar.vermelho::-webkit-progress-value {
  background-color: #f44336 !important;
}

/* Firefox */
progress.custom-bar::-moz-progress-bar {
  background-color: #2196f3;
  border-radius: 8px;
  transition: background-color 0.3s;
}

progress.custom-bar.amarelo::-moz-progress-bar {
  background-color: #ffeb3b !important;
}

progress.custom-bar.vermelho::-moz-progress-bar {
  background-color: #f44336 !important;
}

/* Estilo para o select de filtro de disciplina */
select {
  padding: 8px 12px;
  border: 1px solid #b7d3e4;
  border-radius: 6px;
  background: #f8fcff;
  font-size: 16px;
  color: #1a5a7d;
  margin: 8px 0 16px 0;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(16, 62, 93, 0.06);
  min-width: 100%;
  max-width: 100%;
  appearance: none;
  cursor: pointer;
}

select:focus {
  border-color: #1f78a8;
  box-shadow: 0 0 0 2px rgba(31, 120, 168, 0.2);
}

select option {
  background: #ffffff;
  color: #1a5a7d;
  font-size: 16px;
}

.password-info {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

input#manter-logado {
  width: auto;
  margin: 0;
  accent-color: #1565c0;
}

.remember-login-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #bbdefb;
  border-radius: 999px;
  background: #f4f9ff;
  color: #1a3e6e;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.remember-login-label:hover {
  border-color: #90caf9;
  background: #eaf3ff;
}

.logout-inline-btn {
  margin: 0;
}

.login-action-btn {
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 7px rgba(13, 71, 161, 0.2);
}

.login-action-btn:hover {
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.26);
}

/* Tema azul compartilhado entre formulário e dados institucionais */
#sigaa-form {
  border: 1px solid #1a73e8;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9fd 100%);
  box-shadow: 0 8px 20px rgba(16, 62, 93, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Overlay Modal Escuro para Loading */
/* Spinner Container e Loading */
#loading-overlay {
  display: none !important;
}

#home-content.is-updating {
  position: relative;
}

#home-content.is-updating > #loading-overlay {
  border: 0 !important;
  outline: 0 !important;
  border-radius: inherit !important;
}

#loading-overlay[style*="display: flex"] {
  display: flex !important;
}

#sigaa-form:has(> #loading-overlay[style*="display: flex"]) input:focus {
  outline: none !important;
  box-shadow: none !important;
}

#loading-overlay[style*="display: none"] {
  display: none !important;
}

.overlay-liquid-logo {
  position: relative;
  width: 145px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-liquid-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  -webkit-mask-image: url('Logo_CEFET-MG.png');
  mask-image: url('Logo_CEFET-MG.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.2;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 22px rgba(66, 165, 245, 0.44));
  animation: overlayLogoEdgeGlowPulse 1.55s ease-in-out infinite;
  pointer-events: none;
}

.overlay-liquid-logo-surface {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-mask-image: url('Logo_CEFET-MG.png');
  mask-image: url('Logo_CEFET-MG.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  overflow: hidden;
  filter: none;
}

.overlay-liquid-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  overflow: hidden;
  background-color: transparent;
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: 705px auto;
  filter: grayscale(1) brightness(1.95) contrast(1.18);
  box-shadow: none;
  animation: overlayWaterFlow 1.8s linear infinite;
}

@keyframes overlayLogoEdgeGlowPulse {

  0%,
  100% {
    opacity: 0.16;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.34)) drop-shadow(0 0 16px rgba(66, 165, 245, 0.34));
  }

  50% {
    opacity: 0.28;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.62)) drop-shadow(0 0 28px rgba(66, 165, 245, 0.58));
  }
}

@keyframes overlayWaterFlow {
  from {
    background-position-x: 0;
  }

  to {
    background-position-x: -705px;
  }
}

#sigaa-form label {
  color: #1a3e6e;
  font-weight: 600;
}

#sigaa-form input[type="text"],
#sigaa-form input[type="password"] {
  border: 1px solid #bbdefb;
  border-radius: 8px;
  background: #f8fcff;
}

#sigaa-form input[type="text"]:focus,
#sigaa-form input[type="password"]:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

#sigaa-form button {
  background: #1565c0;
  border: 1px solid #1565c0;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

#sigaa-form button:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  color: #ffffff;
}

#sigaa-form button:active {
  transform: translateY(1px);
}

.token-status {
  font-size: 0.8em;
  color: #5f7ea5;
  margin-top: 10px;
  padding: 0;
  text-align: right;
  opacity: 0.7;
  order: 999;
}

#dados-institucionais {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9fd 100%);
  border: 1px solid #1a73e8;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(16, 62, 93, 0.1);
  transition: box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  pointer-events: auto;
  margin-top: 24px;
}

#dados-institucionais h2 {
  background: #1565c0;
  color: #ffffff;
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  border-bottom: 1px solid #1a73e8;
}

#dados-institucionais ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#dados-institucionais li {
  padding: 10px 16px;
  border-bottom: 1px solid #e3f2fd;
  font-size: 15px;
  display: flex;
  gap: 8px;
}

#dados-institucionais li.dados-user-row {
  background: #ffffff;
  color: #1e293b !important;
  padding: 12px 16px;
  border-bottom: 1px solid #e3f2fd;
  border-left: 4px solid #1565c0;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: none;
}

#dados-institucionais li.dados-user-row .dados-user-avatar {
  font-size: 24px;
  color: #1565c0;
  background: rgba(21, 101, 192, 0.1);
  padding: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

#dados-institucionais li.dados-user-row .dados-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#dados-institucionais li.dados-user-row .dados-user-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

#dados-institucionais li.dados-user-row .dados-user-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a3e6e !important;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dados-institucionais li:last-child {
  border-bottom: none;
}

#dados-institucionais strong {
  min-width: 120px;
  color: #1a3e6e;
  font-weight: 600;
  font-size: 15px;
}

/* Esconde extras por padrão — JS mostra as que cabem na tela */
#dados-institucionais .extra-info {
  display: block;
}

#dados-institucionais .extra-info li {
  display: none;
}

#dados-institucionais .extra-info li.visible-fit {
  display: flex;
}

/* Mostra tudo ao hover (desktop) */
@media (hover: hover) and (pointer: fine) {
  #dados-institucionais:hover .extra-info li {
    display: flex;
  }
}

/* Mostra tudo ao expandir (mobile) */
#dados-institucionais.expanded .extra-info li {
  display: flex;
}

#dados-institucionais::after {
  content: "▼";
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 13px;
  color: #d7ebf7;
  transition: transform 0.2s;
}

#dados-institucionais.expanded::after {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  #dados-institucionais:hover::after {
    transform: rotate(180deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.home-aviso {
  transition: box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  pointer-events: auto;
  user-select: none;
  background: #e8f5e9;
  border: 1px solid #b2dfdb;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 6px;
}

.home-aviso-collapsed #home-aviso-content {
  display: none;
}

.home-aviso::after {
  content: "▼";
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 13px;
  color: #888;
  transition: transform 0.2s;
  transform: rotate(0deg);
  pointer-events: none;
}

.home-aviso:not(.home-aviso-collapsed)::after {
  transform: rotate(180deg);
}

.home-aviso.home-aviso-collapsed::after {
  content: "▼";
  transform: rotate(0deg);
}

@media (hover: hover) and (pointer: fine) {
  .home-aviso:hover::after {
    transform: rotate(180deg);
  }
}

#fechar-aviso,
#nao-mostrar-aviso {
  background: #fff;
  border: 1px solid #b2dfdb;
  color: #388e3c;
  border-radius: 4px;
  cursor: pointer;
  padding: 4px 10px;
  font-size: 0.95em;
  margin-left: 2px;
  transition: background 0.2s, color 0.2s;
}

#fechar-aviso:hover,
#nao-mostrar-aviso:hover {
  background: #388e3c;
  color: #fff;
}

span#fechar-aviso-span {
  margin-right: 40px;
}

@media (max-width: 1030px) {

  #fechar-aviso,
  #nao-mostrar-aviso {
    background: #fff;
    border: 1px solid #b2dfdb;
    color: #388e3c;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 14px;
    font-size: 4vw !important;
    margin: 0 !important;
    transition: background 0.2s, color 0.2s;
    display: flex;
    width: 18vw;
    text-align: center;
    align-items: center;
    align-content: center;
    justify-content: center;
    /* Alinha o texto no centro */
  }

  span#fechar-aviso-span {
    margin-right: 32px;
    margin-left: 30px;
  }
}

#fechar-aviso:hover,
#nao-mostrar-aviso:hover {
  background: #388e3c;
  color: #fff;
}

/* Estado visual para novo usuário sem dados (Login) */
html:has(body.sem-dados) {
  margin-bottom: 0 !important;
}

body.sem-dados {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: background 0.4s ease, background-image 0.4s ease;
}

body.sem-dados[data-app-mode="graduacao"] {
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #e8f1fb 100%) !important;
}

body.sem-dados[data-app-mode="tecnico"] {
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #e7f7ef 100%) !important;
}

body.sem-dados[data-app-mode="responsavel"] {
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0eaff 100%) !important;
}

body.sem-dados .page-header {
  position: relative !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  flex-shrink: 0;
}

#tab-home.sem-dados {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 120px);
  box-sizing: border-box;
  padding: 40px 20px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

body.sem-dados #home-consultation-shell {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  box-sizing: border-box;
}

#home-content.sem-dados {
  background: #ffffff !important;
  border: 1px solid #d9e5ef !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 20px 25px -5px rgba(15, 23, 42, 0.12) !important;
  padding: 36px 28px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  min-height: unset !important;
  min-width: unset !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#home-content.sem-dados #sigaa-form {
  box-sizing: border-box !important;
}

@media (max-width: 1040px) {
  #home-content.sem-dados #sigaa-form {
    width: 90% !important;
    max-width: 440px !important;
    margin: 0 auto 20px auto !important;
    padding: 22px 18px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #1a73e8 !important;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.12) !important;
  }
}

#home-content.sem-dados #home-content-header {
  width: 100% !important;
}

@media (max-width: 1040px) {
  body.sem-dados .home-mode-switcher {
    width: 90% !important;
    max-width: 440px !important;
    margin: 0 auto 16px auto !important;
    box-sizing: border-box !important;
    align-self: center !important;
  }
}

/* Mobile: sem-dados ocupa tela toda */
@media (max-width: 1040px) {
  body.sem-dados {
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow-y: auto !important;
  }

  #tab-home.sem-dados {
    min-height: calc(100vh - 70px);
    padding: 20px 16px;
    justify-content: center;
  }

  body.sem-dados #home-consultation-shell {
    max-width: 100%;
  }

  #home-content.sem-dados {
    padding: 24px 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  }
}

#tab-home.sem-dados .mensagem-sem-dados,
#home-content.sem-dados .mensagem-sem-dados {
  color: #888;
  font-size: 1.15em;
  text-align: center;
  margin: 0 auto;
  max-width: 420px;
  background: #fff;
  border-radius: 8px;
  padding: 24px 18px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: none;
}

/* Por padrão (desktop) esconde o FAB mobile - mantido via media queries */

/* ===== Toggle de visualização (lista / semanal) ===== */
.view-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compare-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 2px;
  padding: 0 8px;
  border: 1px solid #dde6ef;
  border-radius: 999px;
  background: linear-gradient(135deg, #f9fbfd, #f3f8ff);
  color: #3d546d;
  font-size: 13px;
  font-weight: 600;
  line-height: 34px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  width: auto;
  height: 34px;
  flex-shrink: 0;
}

.compare-mode-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 51px;
  height: 50%;
  margin: 0;
  border-radius: 999px;
  border: none;
  background: #e0e7f1;
  position: relative;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.compare-mode-toggle {
  margin: 0 !important;
}

.compare-mode-toggle input::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  transform: translateY(-50%);
}

.compare-mode-toggle input:checked {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(21, 101, 192, 0.25);
}

.compare-mode-toggle input:checked::before {
  transform: translateY(-50%) translateX(32px);
  box-shadow: 0 2px 4px rgba(21, 101, 192, 0.35);
}

.compare-mode-toggle input:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(21, 101, 192, 0.3);
}

.compare-mode-toggle:hover {
  border-color: #c9d9ea;
  background: #f3f8ff;
}

.compare-mode-toggle input:disabled+span {
  opacity: 0.55;
}

.compare-mode-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  cursor: pointer;
  color: #556270;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.view-toggle-btn.active {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
  box-shadow: 0 3px 10px rgba(21, 101, 192, 0.22);
}

.view-toggle-btn:hover:not(.active) {
  background: #f3f8ff;
  border-color: #c2d6ec;
}

/* ===== Overrides roxos para modo responsavel: botões de visualização ===== */
body[data-app-mode="responsavel"] .view-toggle-btn {
  background: #fff;
  border: 1px solid #d8caf8;
  color: #4d2c91;
}

body[data-app-mode="responsavel"] .view-toggle-btn.active {
  background: linear-gradient(135deg, #4d2c91, #7b3fe4);
  border-color: #4d2c91;
  color: #fff;
  box-shadow: 0 3px 10px rgba(123, 63, 228, 0.22);
}

body[data-app-mode="responsavel"] .view-toggle-btn:hover:not(.active) {
  background: #fbf9ff;
  border-color: #d8caf8;
}

/* ===== Overrides roxos para Interactive Schedule Guide ===== */
body[data-app-mode="responsavel"] #interactive-schedule-guide {
  color: #402077;
}

body[data-app-mode="responsavel"] .schedule-timeline-container {
  background: #fffdfd;
  border-radius: 12px;
  border: 1px solid #d8caf8;
  box-shadow: 0 8px 20px rgba(77, 44, 145, 0.06);
}

body[data-app-mode="responsavel"] .schedule-timeline-labels::before {
  background: #7b3fe4;
  border-bottom: 1px solid #4d2c91;
}

body[data-app-mode="responsavel"] .schedule-timeline {
  padding: 14px 20px 16px;
}



body[data-app-mode="responsavel"] .schedule-timeline .wc-time-label,
body[data-app-mode="responsavel"] .schedule-timeline .wc-event-time {
  color: #5b35a7;
}

body[data-app-mode="responsavel"] .schedule-timeline .wc-event-title {
  color: #402077;
}

.schedule-auto-next-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #bbdefb;
  border-radius: 999px;
  background: #f3f8ff;
  color: #1a3e6e;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.schedule-auto-next-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1565c0;
}

.schedule-auto-next-toggle:hover {
  border-color: #90caf9;
  background: #eaf3ff;
}

.settings-card {
  border: 1px solid #1a73e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 0;
  max-width: none;
  width: 100%;
}

.settings-layout {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.settings-title {
  margin: 0;
  padding: 10px 12px;
  background: #1565c0;
  border-radius: 12px 12px 0 0;
  color: #fff;
  font-size: 0.98rem;
}

.settings-card-body {
  padding: 14px;
}

.settings-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #bbdefb;
  border-radius: 999px;
  background: #f3f8ff;
  color: #1a3e6e;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.settings-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1565c0;
}

.settings-option:hover {
  border-color: #90caf9;
  background: #eaf3ff;
}

.settings-help {
  margin: 10px 2px 0;
  color: #4f6480;
  font-size: 0.9rem;
}

.settings-info-card {
  border: 1px solid #bbdefb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 14px;
  color: #1a3e6e;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.settings-info-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #1565c0;
}

.settings-info-card p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.settings-info-card p:last-child {
  margin-bottom: 0;
}

.settings-debug-card {
  grid-column: 1 / -1;
  border: 1px solid #bbdefb;
  border-radius: 12px;
  background: #0f172a;
  color: #dbeafe;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  padding: 12px;
}

.settings-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.settings-debug-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-debug-header h4 {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.95rem;
}

.settings-debug-copy-btn,
.settings-debug-clear-btn {
  border: 1px solid #60a5fa;
  background: #1d4ed8;
  color: #eff6ff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-debug-copy-btn:hover,
.settings-debug-clear-btn:hover {
  background: #1e40af;
}

.settings-debug-help {
  margin: 0 0 10px;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.settings-debug-output {
  margin: 0;
  padding: 10px;
  border: 1px solid #1e3a8a;
  border-radius: 10px;
  background: #020617;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.35;
  min-height: 180px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== Visualização semanal (Google Calendar style) ===== */
.weekly-calendar {
  display: grid;
  grid-template-columns: 56px repeat(5, 1fr);
  grid-template-rows: auto 1fr;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  background: #fff;
}

.wc-header,
.wc-header-time {
  /* Cabeçalho minimalista: altura maior, fundo sólido, sem gradiente */
  padding: 14px 8px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: var(--app-accent-strong, #1f2b4a);
  background: color-mix(in srgb, var(--app-surface, #ffffff) 92%, var(--app-accent-soft, #f0f0ff));
  border-bottom: 1px solid color-mix(in srgb, var(--app-accent) 12%, #e9e9f3);
}

/* vertical separators between day headers (clear line) */
.weekly-calendar .wc-header,
.three-day-calendar .wc-header {
  position: relative;
}

.weekly-calendar .wc-header:not(:last-child)::after,
.three-day-calendar .wc-header:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: color-mix(in srgb, var(--app-accent) 12%, #e6e6f2);
  opacity: 1;
}

.wc-time-col {
  background: #fff;
}

.wc-time-label {
  text-align: right;
  color: #70757a;
  font-size: 11px;
  box-sizing: border-box;
}

.wc-time-label span {
  position: absolute;
  top: -7px;
  right: 6px;
  background: #fff;
  padding: 0 2px;
}

.wc-day-column {
  background: #fff;
}

.wc-day-col {
  position: relative;
  border-right: 1px solid #ebebeb;
  min-height: 48px;
  border-bottom: 1px solid #ebebeb;
}

.wc-day-col:last-child {
  border-right: none;
}

.wc-event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  color: #fff;
  cursor: default;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
}

.wc-event-title {
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-word;
}

.wc-event-time {
  font-size: 10px;
  opacity: 0.9;
  white-space: nowrap;
}

.wc-event-room {
  font-size: 10px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Visualização 3 dias (reutiliza classes wc-*) ===== */
.three-day-calendar {
  display: grid;
  grid-template-columns: 56px repeat(3, 1fr);
  grid-template-rows: auto 1fr;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  background: #fff;
}

.wc-header-today {
  /* Destaque para o dia atual: use um tom sólido leve do accent */
  background: color-mix(in srgb, var(--app-accent) 10%, var(--app-surface, #ffffff));
  color: var(--app-accent-strong, #1f2b4a);
}

.wc-day-today {
  background: #f8fbff;
}

/* Responsive: weekly calendar on mobile */
@media (max-width: 1040px) {
  .weekly-calendar {
    grid-template-columns: 32px repeat(5, 1fr);
    font-size: 10px;
  }

  .three-day-calendar {
    grid-template-columns: 36px repeat(3, 1fr);
    font-size: 12px;
  }

  .schedule-auto-next-toggle {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-debug-output {
    min-height: 160px;
    max-height: 260px;
    font-size: 0.74rem;
  }

  .wc-header {
    padding: 6px 2px;
    font-size: 11px;
  }

  /* Weekly (5 cols): compact — allow wrap, shrink padding */
  .weekly-calendar .wc-event {
    font-size: 9px;
    padding: 2px 3px;
    line-height: 1.2;
  }

  .weekly-calendar .wc-event-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 9px;
  }

  .weekly-calendar .wc-event-time {
    display: block;
    font-size: 8px;
  }

  .weekly-calendar .wc-event-room {
    display: block;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .weekly-calendar .wc-time-label {
    font-size: 8px;
  }

  .weekly-calendar .wc-time-label span {
    right: 2px;
  }

  /* 3-day (3 cols): more room — show details, wrap title */
  .three-day-calendar .wc-event {
    font-size: 10px;
    padding: 3px 5px;
    line-height: 1.25;
  }

  .three-day-calendar .wc-event-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 10px;
  }

  .three-day-calendar .wc-event-time {
    display: block;
    font-size: 9px;
  }

  .three-day-calendar .wc-event-room {
    display: block;
    font-size: 9px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .three-day-calendar .wc-time-label {
    font-size: 9px;
  }
}

/* ===== Interactive Schedule Guide ===== */
#interactive-schedule-guide {
  margin-bottom: 8px;
}

#interactive-schedule-guide>h3 {
  display: none;
}

.schedule-timeline-container {
  width: 100%;
  padding: 0;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #1a73e8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 800px;
  /* Garante que haja espaço para rolar */
  padding: 14px 20px 16px;
  box-sizing: border-box;
}

.schedule-timeline-labels {
  position: relative;
  min-height: 28px;
  margin: -14px 0 0;
  padding: 10px 0 12px;
  pointer-events: none;
}

.schedule-timeline-labels::before {
  content: '';
  position: absolute;
  inset: 0 -20px 0 -20px;
  background: #1a73e8;
  border-bottom: 1px solid #0f5fc4;
}

.schedule-timeline-selection-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.schedule-timeline-label {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.schedule-timeline-label.is-edge-start {
  transform: translateX(-50%);
  text-align: center;
}

.schedule-timeline-label.is-edge-end {
  transform: translateX(-50%);
  text-align: center;
}

.schedule-timeline-label.is-half {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.82;
}

.schedule-timeline-label.is-quarter {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.56;
}

.schedule-timeline-track {
  position: relative;
  min-height: 40px;
  padding-top: 4px;
}

.schedule-timeline-range-marker {
  position: absolute;
  top: -2px;
  bottom: -4px;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(21, 101, 192, 0.38);
  z-index: 2;
  pointer-events: none;
}

.schedule-timeline-range-marker::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #90caf9;
  border: 1px solid rgba(21, 101, 192, 0.55);
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(144, 202, 249, 0.22);
}

.schedule-timeline-range-chip {
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  text-shadow: none;
}

.schedule-timeline-range-chip.is-edge-start {
  transform: translateX(0);
}

.schedule-timeline-range-chip.is-edge-end {
  transform: translateX(-100%);
}

.schedule-timeline-hours {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.schedule-timeline-hours::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 2px solid #8ab4f8;
}

.schedule-timeline-hour {
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 0;
  transform: translateX(-50%);
  border-left: 1px dotted #9cbce0;
  opacity: 0.95;
}

.schedule-timeline-hour.is-half {
  top: 6px;
  bottom: 6px;
  border-left-style: solid;
  border-left-color: rgba(156, 188, 224, 0.72);
  opacity: 0.8;
}

.schedule-timeline-hour.is-quarter {
  top: 11px;
  bottom: 11px;
  border-left-style: solid;
  border-left-color: rgba(156, 188, 224, 0.45);
  opacity: 0.6;
}

.schedule-timeline-events {
  position: relative;
  height: 44px;
  z-index: 2;
}

.schedule-timeline-events.has-compare {
  height: 102px;
}

.schedule-timeline-events-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 44px;
}

.schedule-timeline-events-row-main {
  top: 0;
}

.schedule-timeline-events-row-compare {
  top: 52px;
}

.schedule-timeline-event {
  position: absolute;
  top: 0;
  height: 100%;
  box-sizing: border-box;
  background-color: #007bff;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 4px 6px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.schedule-timeline-event-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  max-height: 2.2em;
  line-height: inherit;
  word-break: break-word;
}

.schedule-timeline-event.is-compact {
  font-size: 11px;
  padding: 3px 5px;
}

.schedule-timeline-event.is-tight {
  font-size: 10px;
  padding: 2px 4px;
  line-height: 1.08;
}

.schedule-timeline-event:hover,
.schedule-timeline-event.is-active {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.18);
  filter: saturate(1.04);
}

.schedule-timeline-event.is-compare {
  border-color: rgba(255, 225, 181, 0.7);
  box-shadow: 0 3px 8px rgba(191, 92, 0, 0.22);
}

.schedule-timeline-needle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  transform: translateX(-50%);
  background-color: red;
  z-index: 3;
  pointer-events: none;
  transition: left 0.5s linear;
}

.schedule-timeline-needle.schedule-timeline-needle-compare {
  background-color: #ff8f00;
  top: 48px;
  bottom: -4px;
}

.schedule-timeline-needle::before {
  content: attr(data-time);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #f1b0b0;
  color: #c62828;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.schedule-timeline-needle::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid red;
}

.schedule-timeline-needle.schedule-timeline-needle-compare::before {
  border-color: #ffd08a;
  color: #bf5c00;
}

.schedule-timeline-needle.schedule-timeline-needle-compare::after {
  border-bottom-color: #ff8f00;
}

.schedule-timeline-range-marker.is-compare {
  background: rgba(239, 108, 0, 0.42);
}

.schedule-timeline-range-marker.is-compare::before {
  background: #ffd089;
  border-color: rgba(239, 108, 0, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 160, 64, 0.2);
}

.schedule-timeline-range-chip.is-compare {
  background: rgba(255, 179, 102, 0.35);
  border-color: rgba(255, 211, 157, 0.6);
  color: #fff7ee;
}

@media (max-width: 768px) {
  .schedule-timeline {
    min-width: 600px;
  }

  .schedule-timeline-label {
    font-size: 11px;
  }

  .schedule-timeline-label.is-quarter,
  .schedule-timeline-hour.is-quarter {
    display: none;
  }

  .schedule-timeline-event {
    font-size: 11px;
    line-height: 1.08;
    padding: 3px 5px;
  }

  .schedule-timeline-event.is-compact {
    font-size: 10px;
    padding: 2px 4px;
  }

  .schedule-timeline-event.is-tight {
    font-size: 9px;
    padding: 1px 3px;
  }
}

/* ===== Modal de Notifica��es Acad�micas ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e3f2fd;
  background: linear-gradient(135deg, #1565c0, #1876d2);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: white;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-body p {
  margin: 0 0 16px 0;
  color: #555;
}

.notification-alert {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 20px 0;
  color: #856404;
}

.notification-alert strong {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.notification-alert ol {
  margin: 0;
  padding-left: 20px;
}

.notification-alert li {
  margin-bottom: 8px;
}

.notification-alert li:last-child {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e3f2fd;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary {
  background: #1565c0;
  color: white;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.btn-primary:hover {
  background: #0d47a1;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e3f2fd;
  color: #1565c0;
}

.btn-secondary:hover {
  background: #bbdefb;
  color: #0d47a1;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    border-radius: 12px;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-footer {
    flex-direction: column-reverse;
    padding: 16px 18px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* Custom Toggle Switch for Calendar in Graduation Mode */
.calendar-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.calendar-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  user-select: none;
}

.calendar-switch input[type="checkbox"] {
  display: none;
}

.calendar-switch-pill {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-switch-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-switch input[type="checkbox"]:checked+.calendar-switch-pill {
  background-color: var(--app-accent, #1a73e8);
}

.calendar-switch input[type="checkbox"]:checked+.calendar-switch-pill .calendar-switch-handle {
  transform: translateX(24px);
}



/* Styling for the header calendar/table switch */
.header-calendar-toggle-wrapper {
  display: inline-flex;
  align-items: center;
}

.icon-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.icon-switch-pill {
  position: relative;
  width: 76px;
  height: 38px;
  background: var(--app-accent-soft, #e8f1fb);
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--app-accent, #1976d2) 18%, #cfdbea);
  transition: background-color 0.3s, border-color 0.3s;
}

.icon-switch-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.icon-switch input[type="checkbox"] {
  display: none !important;
}

/* When unchecked: slider is on left. Left icon (table) is active, Right icon (calendar) is inactive */
.icon-switch input[type="checkbox"]:not(:checked)~.icon-switch-pill .icon-switch-left {
  color: var(--app-accent-strong, #0f3f7a);
  opacity: 1;
}

.icon-switch input[type="checkbox"]:not(:checked)~.icon-switch-pill .icon-switch-right {
  color: #6a7b8e;
  opacity: 0.5;
}

/* When checked: slider is on right. Right icon (calendar) is active, Left icon (table) is inactive */
.icon-switch input[type="checkbox"]:checked~.icon-switch-pill .icon-switch-handle {
  transform: translateX(40px);
}

.icon-switch input[type="checkbox"]:checked~.icon-switch-pill .icon-switch-left {
  color: #6a7b8e;
  opacity: 0.5;
}

.icon-switch input[type="checkbox"]:checked~.icon-switch-pill .icon-switch-right {
  color: var(--app-accent-strong, #0f3f7a);
  opacity: 1;
}

.icon-switch .material-icons {
  font-size: 20px;
  z-index: 2;
  transition: color 0.3s, opacity 0.3s;
  pointer-events: none;
}

/* ───────────────────────────────────────────────────────────────────────────
   Organização de Atividades (Hoje, Futuras, Passadas)
   ─────────────────────────────────────────────────────────────────────────── */
.atividades-grupo-header td {
  background: var(--app-accent-soft) !important;
  color: var(--app-accent-strong) !important;
  font-weight: bold;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 14px !important;
  border-bottom: 2px solid var(--app-accent) !important;
  text-align: left;
  pointer-events: none;
  /* Disable hover/clicking */
}

/* Prevent zebra styling on header rows */
#tabela-atividades-home tbody tr.atividades-grupo-header:nth-child(even) td,
#tabela-atividades-atividades tbody tr.atividades-grupo-header:nth-child(even) td {
  background: var(--app-accent-soft) !important;
}

/* Prevent hover styling on header rows */
#tabela-atividades-home tbody tr.atividades-grupo-header:hover td,
#tabela-atividades-atividades tbody tr.atividades-grupo-header:hover td {
  background: var(--app-accent-soft) !important;
}

.atividades-grupo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.atividades-grupo-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.atividades-grupo-indicator.indicador-hoje {
  background-color: #ef5350;
  /* Light red/coral */
  box-shadow: 0 0 6px rgba(239, 83, 80, 0.5);
}

.atividades-grupo-indicator.indicador-futuras {
  background-color: #42a5f5;
  /* Premium blue */
  box-shadow: 0 0 6px rgba(66, 165, 245, 0.5);
}

.atividades-grupo-indicator.indicador-passadas {
  background-color: #9e9e9e;
  /* Muted gray */
}

.atividades-grupo-count {
  font-size: 0.78rem;
  opacity: 0.7;
  font-weight: normal;
}

/* ───────────────────────────────────────────────────────────────────────────
   Atividades com Entrega Marcada e Status Badges
   ─────────────────────────────────────────────────────────────────────────── */
.atividade-desc-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-entrega {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.badge-entrega .badge-icon {
  font-size: 13px !important;
}

.badge-concluida {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.badge-pendente {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* Linha com entrega marcada - visual diferenciado (borda esquerda e tint de fundo do tema) */
tr.atividade-entrega td:first-child {
  border-left: 4px solid var(--app-accent) !important;
}

tr.atividade-entrega.atividade-concluida td:first-child {
  border-left-color: #9e9e9e !important;
}

tr.atividade-entrega td {
  background-color: color-mix(in srgb, var(--app-accent) 4%, #ffffff) !important;
  font-weight: 500;
}

tr.atividade-entrega.atividade-concluida td {
  background-color: #f8fafc !important;
}

/* Hover em linhas com entrega marcada */
tr.atividade-entrega:hover td {
  background-color: var(--app-accent-soft) !important;
}

/* Linha concluída (visual atenuado/riscado) */
tr.atividade-concluida td {
  color: #88929a !important;
}

tr.atividade-concluida .atividade-desc-text {
  text-decoration: line-through;
  opacity: 0.7;
}

/* ───────────────────────────────────────────────────────────────────────────
   NOVA ABA CALENDÁRIO (VISÃO RESPONSIVA ESTILO GOOGLE AGENDA)
   ─────────────────────────────────────────────────────────────────────────── */

#tab-calendario {
  padding: 16px;
  background-color: #f8fafc;
  min-height: calc(100vh - 120px);
}

.tab-calendar-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 24px;
  box-sizing: border-box;
}

/* Layout Responsivo: Lado a Lado no Desktop, Empilhado no Mobile */
.tab-calendar-layout-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1041px) {
  .tab-calendar-layout-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr 320px;
    /* Colunas 1 e 2 dividem o espaço restante, Coluna 3 com espaço max limitado */
    gap: 24px;
    align-items: start;
  }

  .tab-calendar-main-panel {
    border-right: 1px solid #e2e8f0;
    padding-right: 24px;
  }

  .tab-calendar-side-panel {
    border-right: 1px solid #e2e8f0;
    padding-right: 24px;
  }
}

/* Cabeçalho do Calendário */
.tab-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#tab-calendar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.tab-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-action-btn-today {
  background-color: #ffffff;
  color: var(--app-accent-strong);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-action-btn-today:hover {
  background-color: var(--app-accent-soft);
  border-color: var(--app-accent);
  color: var(--app-accent-strong);
}

.calendar-nav-btn {
  background: transparent;
  color: #64748b;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.calendar-nav-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.calendar-nav-btn .material-icons {
  font-size: 24px;
}

/* Dias da Semana (Weekdays) */
.tab-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.tab-calendar-weekdays span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Grid do Calendário */
.tab-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

/* Célula do Dia */
.tab-calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.15s ease;
  user-select: none;
  min-height: 48px;
}

.tab-calendar-day:hover {
  background-color: #f1f5f9;
}

.tab-calendar-day-number {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  border-radius: 50%;
  transition: all 0.15s ease;
}

/* Célula com Dia de Outro Mês */
.tab-calendar-day.is-muted {
  opacity: 0.35;
}

/* Dia Atual (Hoje) */
.tab-calendar-day.is-today .tab-calendar-day-number {
  border: 2px solid var(--app-accent);
  color: var(--app-accent-strong);
  font-weight: 700;
}

/* Dia Selecionado */
.tab-calendar-day.is-selected .tab-calendar-day-number {
  background-color: var(--app-accent) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Indicadores de Eventos (Dots) */
.tab-calendar-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
  height: 6px;
  width: 100%;
}

.tab-calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Cores dos Dots */
.tab-calendar-dot.dot-entrega,
.legend-entrega {
  background-color: #22c55e;
  /* Green */
}

.tab-calendar-dot.dot-prova,
.legend-prova {
  background-color: #dc2626;
  /* Crimson Red */
}

.tab-calendar-dot.dot-feriado,
.legend-feriado {
  background-color: #ec4899;
  /* Prominent Pink */
}

.tab-calendar-dot.dot-recesso,
.legend-recesso {
  background-color: #f97316;
  /* Orange */
}

.tab-calendar-dot.dot-inicio-aulas,
.tab-calendar-dot.dot-fim-aulas {
  background-color: #a855f7;
  /* Purple */
}

.tab-calendar-dot.dot-outros {
  background-color: #64748b;
  /* Slate */
}

.legend-today {
  background-color: transparent;
  border: 1.5px solid var(--app-accent);
  width: 5px;
  height: 5px;
}

/* Legenda do Calendário */
.tab-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.tab-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Agenda de Eventos */
.tab-calendar-agenda {
  display: flex;
  flex-direction: column;
}

#tab-agenda-date-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
  margin-top: 0;
  margin-bottom: 16px;
  border-left: 4px solid var(--app-accent);
  padding-left: 10px;
}

.tab-agenda-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-agenda-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
  font-style: italic;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.tab-agenda-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}

.tab-agenda-upcoming-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--app-accent-strong);
  margin-top: 8px;
  margin-bottom: 4px;
  background: var(--app-accent-soft);
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Card de Evento da Agenda */
.tab-agenda-card {
  display: flex;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-agenda-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tab-agenda-card-border {
  width: 6px;
  flex-shrink: 0;
}

.tab-agenda-card.type-entrega .tab-agenda-card-border {
  background-color: #22c55e;
}

.tab-agenda-card.type-prova .tab-agenda-card-border {
  background-color: #dc2626;
}

.tab-agenda-card.type-feriado .tab-agenda-card-border {
  background-color: #ec4899;
}

.tab-agenda-card.type-recesso .tab-agenda-card-border {
  background-color: #f97316;
}

.tab-agenda-card.type-inicio-aulas .tab-agenda-card-border,
.tab-agenda-card.type-fim-aulas .tab-agenda-card-border {
  background-color: #a855f7;
}

.tab-agenda-card.type-outros .tab-agenda-card-border {
  background-color: #64748b;
}

.tab-agenda-card-content {
  padding: 12px 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-agenda-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.tab-agenda-card-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.tab-agenda-card-badge-row {
  margin-top: 4px;
}

.tab-agenda-card.is-completed {
  opacity: 0.65;
}

.tab-agenda-card.is-completed .tab-agenda-card-title {
  text-decoration: line-through;
  color: #64748b;
}

/* Responsividade Mobile - Ajuste do aspect ratio e layouts de aba */
@media (max-width: 1040px) {
  #tab-calendario {
    padding: 10px 10px calc(var(--mobile-bottom-safe-space) + 20px) 10px;
    background-color: #ffffff;
  }

  .tab-calendar-container {
    padding: 10px 0;
    box-shadow: none;
    border-radius: 0;
  }

  .tab-calendar-day {
    min-height: 40px;
  }

  .tab-calendar-day-number {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  /* Oculta o formulário de provas no mobile por padrão e estiliza como modal */
  .tab-calendar-form-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
  }

  .tab-calendar-form-panel.open {
    display: flex;
  }

  .tab-calendar-form-panel .tab-calendar-form-card {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    border: none !important;
  }

  #close-exam-modal-btn {
    display: block !important;
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    line-height: 1;
  }

  #close-exam-modal-btn:hover {
    color: #334155;
  }

  #mobile-add-exam-btn {
    display: inline-block !important;
    margin-right: 8px;
  }
}

/* Nota de calendário não oficial */
.tab-calendar-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 16px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.tab-calendar-warning .warning-icon {
  font-size: 16px;
  color: #94a3b8;
  flex-shrink: 0;
}

/* Painel e Card do Formulário de Provas (Apenas Desktop) */
@media (min-width: 1041px) {
  .tab-calendar-form-panel {
    display: block;
  }

  .tab-calendar-form-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  }
}

.tab-calendar-form-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--app-accent-soft);
  padding-bottom: 8px;
}

.tab-calendar-form-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
  padding: 0;
  background: transparent;
}

.tab-calendar-form-card label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.tab-calendar-form-card select,
.tab-calendar-form-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #334155;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tab-calendar-form-card select:focus,
.tab-calendar-form-card input:focus {
  outline: none;
  border-color: var(--app-accent);
  box-shadow: 0 0 0 3px var(--app-accent-soft);
}

.exam-submit-btn {
  margin-top: 8px;
  background-color: var(--app-accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.exam-submit-btn:hover {
  filter: brightness(0.92);
  background-color: var(--app-accent);
}

.exam-status-msg {
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  min-height: 18px;
}

.exam-status-msg.status-success {
  color: #16a34a;
}

.exam-status-msg.status-error {
  color: #dc2626;
}

/* Custom rule to hide inputs on home tab when logged in */
body:not(.sem-dados) .home-mode-switcher,
body:not(.sem-dados) #sigaa-form {
  display: none !important;
}

@media (min-width: 1041px) {
  body:not(.sem-dados) #home-content {
    display: grid !important;
    grid-template-columns: 340px 1fr !important;
    grid-template-rows: 1fr !important;
    grid-template-areas: "dados novidades" !important;
    gap: 24px 32px !important;
    align-items: start !important;
    height: 100% !important;
  }
}

/* Layout adjustments when logged in */
body:not(.sem-dados) #dados-institucionais {
  margin-top: 0 !important;
  cursor: default !important;
}

body:not(.sem-dados) #responsavel-calendar-container,
body:not(.sem-dados) .home-lista-container {
  align-self: start !important;
}

body:not(.sem-dados) #responsavel-calendar-grid {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 18px !important;
}

/* Minimal elegant scrollbar for calendar grid */
body:not(.sem-dados) #responsavel-calendar-grid::-webkit-scrollbar {
  width: 6px;
}

body:not(.sem-dados) #responsavel-calendar-grid::-webkit-scrollbar-track {
  background: transparent;
}

body:not(.sem-dados) #responsavel-calendar-grid::-webkit-scrollbar-thumb {
  background-color: var(--app-accent, #1976d2);
  opacity: 0.5;
  border-radius: 10px;
}

body:not(.sem-dados) #responsavel-calendar-grid::-webkit-scrollbar-thumb:hover {
  background-color: var(--app-accent-strong, #0f3f7a);
}

/* Keep dados institucionais always open/expanded when logged in */
body:not(.sem-dados) #dados-institucionais .extra-info li {
  display: flex !important;
}

body:not(.sem-dados) #dados-institucionais::after {
  display: none !important;
}

/* Top bar refresh button style */
.header-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #1565c0;
  border: 1px solid #90caf9;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 34px;
}

.header-refresh-btn:hover {
  background-color: #e3f2fd;
  border-color: #1e88e5;
  color: #0d47a1;
}

.header-refresh-btn:active {
  transform: scale(0.95);
}

.header-refresh-btn .material-icons {
  font-size: 16px;
  transition: transform 0.4s ease;
}

.header-refresh-btn.is-refreshing .material-icons {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Top bar logout button style */
.header-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 34px;
}

.header-logout-btn:hover {
  background-color: #ffe3e3;
  border-color: #fa5252;
  color: #e03131;
}

.header-logout-btn:active {
  transform: scale(0.95);
}

.header-logout-btn .material-icons {
  font-size: 16px;
}

/* Adjust layout on mobile devices if needed */
@media (max-width: 768px) {
  .header-logout-btn,
  .header-refresh-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Prevent wrapping on desktop top bar across all desktop screen sizes */
@media (min-width: 1041px) {
  .tabs {
    flex-wrap: nowrap !important;
  }
}

/* Step 1 (1350px - 1500px): Gentle reduction of font size & padding */
@media (min-width: 1350px) and (max-width: 1500px) {
  .tabs { gap: 8px !important; }
  .tab-button { padding: 9px 15px !important; font-size: 14px !important; }
  .tab-label { font-size: 14px !important; }
  .header-refresh-btn, .header-logout-btn { padding: 6px 10px !important; font-size: 12.5px !important; }
  #desktop-saved-profile-select { font-size: 13px !important; }
}

/* Step 2 (1200px - 1349px): Medium reduction of font size & padding */
@media (min-width: 1200px) and (max-width: 1349px) {
  .tabs { gap: 6px !important; }
  .tab-button { padding: 8px 11px !important; gap: 5px !important; font-size: 13px !important; }
  .tab-label { font-size: 13px !important; }
  .header-refresh-btn, .header-logout-btn { padding: 6px 8px !important; gap: 4px !important; font-size: 12px !important; }
  .desktop-saved-profiles label { font-size: 12px !important; }
  #desktop-saved-profile-select { min-width: 110px !important; max-width: 150px !important; font-size: 12.5px !important; padding: 5px 7px !important; }
}

/* Step 3 (1081px - 1199px): Minimum readable font size before hiding text */
@media (min-width: 1081px) and (max-width: 1199px) {
  .page-header h1 span { display: none !important; }
  .tabs { gap: 5px !important; }
  .tab-button { padding: 7px 8px !important; gap: 4px !important; font-size: 11.5px !important; }
  .tab-label { font-size: 11.5px !important; }
  .header-refresh-btn, .header-logout-btn { padding: 5px 7px !important; gap: 3px !important; font-size: 11.5px !important; }
  .desktop-saved-profiles label { font-size: 11px !important; }
  #desktop-saved-profile-select { min-width: 100px !important; max-width: 140px !important; font-size: 11.5px !important; padding: 4px 6px !important; }
}

/* Step 4 (1041px - 1080px): Hide text labels completely when font would be too small */
@media (min-width: 1041px) and (max-width: 1080px) {
  .page-header h1 span { display: none !important; }
  .tabs { gap: 6px !important; }
  .tab-button { padding: 8px 10px !important; gap: 0 !important; }
  .tab-button .tab-label { display: none !important; }
  .header-refresh-btn span:not(.material-icons),
  .header-logout-btn span:not(.material-icons),
  .desktop-saved-profiles label { display: none !important; }
  .header-refresh-btn, .header-logout-btn { padding: 6px 10px !important; gap: 0 !important; }
  .desktop-saved-profiles { gap: 6px !important; }
  #desktop-saved-profile-select { min-width: 110px !important; max-width: 150px !important; padding: 6px 8px !important; }
}

/* Mobile User Card (Exibido apenas em mobile quando logado) */
.mobile-user-card {
  display: none;
}

@media (max-width: 1040px) {
  body:not(.sem-dados) .mobile-user-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    width: 90% !important;
    box-sizing: border-box;
    align-self: center;
    background: var(--app-surface, #ffffff);
    border: 1px solid #d9e5ef;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    margin-bottom: 0;
  }

  /* Esconde a linha de nome dentro de Dados Institucionais no mobile */
  #dados-institucionais li.dados-user-row {
    display: none !important;
  }
}

.mobile-user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-user-card .mobile-user-avatar {
  font-size: 28px;
  color: #1565c0;
  background: #e3f2fd;
  border-radius: 50%;
  padding: 6px;
}

.mobile-user-details {
  display: flex;
  flex-direction: column;
}

.mobile-user-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 700;
}

.mobile-user-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a3e6e;
  word-break: break-word;
}

.mobile-user-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.mobile-user-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 38px;
}

.mobile-user-btn-refresh {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.mobile-user-btn-refresh:active {
  background: #bbdefb;
}

.mobile-user-btn-logout {
  background: #ffe3e3;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
}

.mobile-user-btn-logout:active {
  background: #ffc9c9;
}

.mobile-user-btn-refresh.is-refreshing .material-icons {
  animation: headerSpin 0.9s linear infinite;
}

/* Dynamic App Mode Overrides (Graduação / Técnico / Responsável) */

/* 1. Class Progress Bar Container */
.class-progress-bar-card {
  background: linear-gradient(to bottom, #ffffff 0%, #f3f9fd 100%);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #1a73e8;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08);
  transition: all 0.3s ease;
}
.class-progress-title {
  font-size: 11px;
  color: #0f3f7a;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.class-progress-row {
  font-size: 14px;
  color: #1a3e6e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.class-progress-name,
.class-progress-active-name {
  color: #0f3f7a;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.class-progress-meta-box {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e8f0fe;
  gap: 8px;
  flex-wrap: wrap;
}
.class-progress-time-text {
  font-size: 12px;
  color: #64748b;
}
.class-progress-countdown {
  font-size: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  min-width: 85px;
  text-align: center;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
}
.class-progress-room-badge {
  color: #1565c0;
  font-size: 11px;
  background: rgba(25, 118, 210, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.class-progress-track {
  width: 100%;
  height: 6px;
  background: #e8f0fe;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #d0e3f7;
}
.class-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1565c0 0%, #1e88e5 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(25, 118, 210, 0.3);
}
.class-progress-percent-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  text-align: right;
  font-weight: 600;
}

body[data-app-mode="tecnico"] .class-progress-bar-card {
  background: linear-gradient(to bottom, #ffffff 0%, #f1faf6 100%);
  border-color: #0f8a5f;
  box-shadow: 0 4px 12px rgba(15, 138, 95, 0.08);
}
body[data-app-mode="tecnico"] .class-progress-title,
body[data-app-mode="tecnico"] .class-progress-name,
body[data-app-mode="tecnico"] .class-progress-active-name {
  color: #066344;
}
body[data-app-mode="tecnico"] .class-progress-countdown,
body[data-app-mode="tecnico"] .class-progress-fill {
  background: linear-gradient(135deg, #066344 0%, #0f8a5f 100%);
}
body[data-app-mode="tecnico"] .class-progress-room-badge {
  color: #066344;
  background: rgba(15, 138, 95, 0.08);
}

body[data-app-mode="responsavel"] .class-progress-bar-card {
  background: linear-gradient(to bottom, #ffffff 0%, #f7f1ff 100%);
  border-color: #7b3fe4;
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.08);
}
body[data-app-mode="responsavel"] .class-progress-title,
body[data-app-mode="responsavel"] .class-progress-name,
body[data-app-mode="responsavel"] .class-progress-active-name {
  color: #4d2c91;
}
body[data-app-mode="responsavel"] .class-progress-countdown,
body[data-app-mode="responsavel"] .class-progress-fill {
  background: linear-gradient(135deg, #4d2c91 0%, #7b3fe4 100%);
}
body[data-app-mode="responsavel"] .class-progress-room-badge {
  color: #4d2c91;
  background: rgba(123, 63, 228, 0.08);
}

/* 2. Mobile User Card Theme Overrides */
body[data-app-mode="tecnico"] .mobile-user-card {
  border-color: #0f8a5f !important;
}
body[data-app-mode="tecnico"] .mobile-user-card .mobile-user-avatar {
  color: #066344 !important;
  background: #e7f7ef !important;
}
body[data-app-mode="tecnico"] .mobile-user-title {
  color: #0f8a5f !important;
}
body[data-app-mode="tecnico"] .mobile-user-name {
  color: #044b33 !important;
}
body[data-app-mode="tecnico"] .mobile-user-btn-refresh {
  background: #e7f7ef !important;
  color: #066344 !important;
  border-color: #a8e6cf !important;
}

body[data-app-mode="responsavel"] .mobile-user-card {
  border-color: #7b3fe4 !important;
}
body[data-app-mode="responsavel"] .mobile-user-card .mobile-user-avatar {
  color: #4d2c91 !important;
  background: #f0eaff !important;
}
body[data-app-mode="responsavel"] .mobile-user-title {
  color: #7b3fe4 !important;
}
body[data-app-mode="responsavel"] .mobile-user-name {
  color: #4d2c91 !important;
}
body[data-app-mode="responsavel"] .mobile-user-btn-refresh {
  background: #f0eaff !important;
  color: #4d2c91 !important;
  border-color: #d7c6f5 !important;
}

/* 3. Sigaa Form Theme Overrides */
body[data-app-mode="tecnico"] #sigaa-form,
body[data-app-mode="tecnico"] #home-content.sem-dados #sigaa-form {
  border-color: #0f8a5f !important;
  background: linear-gradient(180deg, #ffffff 0%, #f1faf6 100%) !important;
  box-shadow: 0 8px 24px rgba(15, 138, 95, 0.12) !important;
}
body[data-app-mode="tecnico"] #sigaa-form label:not(.remember-login-label) {
  color: #066344 !important;
}
body[data-app-mode="tecnico"] #sigaa-form input[type="text"],
body[data-app-mode="tecnico"] #sigaa-form input[type="password"] {
  border-color: #bce8d5 !important;
  background: #f5fcf8 !important;
}
body[data-app-mode="tecnico"] #sigaa-form input[type="text"]:focus,
body[data-app-mode="tecnico"] #sigaa-form input[type="password"]:focus {
  border-color: #0f8a5f !important;
  box-shadow: 0 0 0 3px rgba(15, 138, 95, 0.16) !important;
}
body[data-app-mode="tecnico"] #sigaa-form .login-action-btn {
  background: linear-gradient(135deg, #066344 0%, #0f8a5f 100%) !important;
  border-color: #066344 !important;
  box-shadow: 0 4px 14px rgba(15, 138, 95, 0.25) !important;
}
body[data-app-mode="tecnico"] #sigaa-form .remember-login-label {
  background: #e8f7f0 !important;
  border-color: #bce8d5 !important;
  color: #066344 !important;
}

body[data-app-mode="responsavel"] #sigaa-form,
body[data-app-mode="responsavel"] #home-content.sem-dados #sigaa-form {
  border-color: #7b3fe4 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f7f1ff 100%) !important;
  box-shadow: 0 8px 24px rgba(123, 63, 228, 0.12) !important;
}
body[data-app-mode="responsavel"] #sigaa-form label:not(.remember-login-label) {
  color: #4d2c91 !important;
}
body[data-app-mode="responsavel"] #sigaa-form input[type="text"],
body[data-app-mode="responsavel"] #sigaa-form input[type="password"] {
  border-color: #d7c6f5 !important;
  background: #fbf9ff !important;
}
body[data-app-mode="responsavel"] #sigaa-form input[type="text"]:focus,
body[data-app-mode="responsavel"] #sigaa-form input[type="password"]:focus {
  border-color: #7b3fe4 !important;
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.16) !important;
}
body[data-app-mode="responsavel"] #sigaa-form .login-action-btn {
  background: linear-gradient(135deg, #4d2c91 0%, #7b3fe4 100%) !important;
  border-color: #4d2c91 !important;
  box-shadow: 0 4px 14px rgba(123, 63, 228, 0.25) !important;
}
body[data-app-mode="responsavel"] #sigaa-form .remember-login-label {
  background: #f3eaff !important;
  border-color: #e1d0ff !important;
  color: #4d2c91 !important;
}

/* Tipo de entrada e credenciais compõem um único card de login. */
#sigaa-form .home-mode-switcher {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 20px !important;
  padding: 0 0 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--app-border, #e2e8f0) !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#sigaa-form .home-mode-hint {
  font-size: 12px;
  line-height: 1.5;
}

#dados-institucionais .dados-user-details {
  flex: 1;
}

#dados-institucionais li.dados-user-row .home-account-select,
.mobile-user-card .home-account-select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 7px 24px 7px 8px;
  border: 1px solid color-mix(in srgb, var(--app-accent, #1a73e8) 20%, #e2e8f0);
  border-radius: 9px;
  background-color: color-mix(in srgb, var(--app-accent, #1a73e8) 4%, #fff);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' 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 4px center;
  background-size: 18px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

#dados-institucionais li.dados-user-row .home-account-select:hover,
.mobile-user-card .home-account-select:hover {
  border-color: var(--app-accent, #1a73e8);
  background-color: color-mix(in srgb, var(--app-accent, #1a73e8) 7%, #fff);
}

#dados-institucionais .home-account-select:focus-visible,
.mobile-user-card .home-account-select:focus-visible {
  outline: 2px solid var(--app-accent, #1a73e8);
  outline-offset: 3px;
}

body.adding-account #home-content-header {
  display: block !important;
  grid-area: dados !important;
}

body.adding-account #sigaa-form,
body.adding-account #sigaa-form .home-mode-switcher {
  display: block !important;
}

body.adding-account #sigaa-form {
  margin: 0 auto !important;
}

body.adding-account #dados-institucionais {
  display: none !important;
}

.cancel-account-login {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}

@media (min-width: 1041px) {
  body:not(.sem-dados) #home-content-header {
    grid-area: dados;
    align-self: start;
    min-width: 0;
  }

  #home-listas-container {
    min-height: 0;
    min-width: 0;
    align-self: start;
  }

  #home-listas-container .home-lista-container {
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    transition: box-shadow 0.2s ease;
  }

  #home-listas-container .home-lista-container:hover {
    transform: none;
  }

  #home-listas-container .home-painel-titulo {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  #home-listas-container thead th {
    top: var(--home-panel-heading-height, 40px);
  }

  #responsavel-calendar-container {
    min-height: 0 !important;
    box-sizing: border-box;
  }
}

body.sem-dados #desktop-saved-profiles-container,
body.sem-dados #header-refresh-btn,
body.sem-dados #header-logout-btn,
body.sem-dados #desktop-quick-actions,
body.sem-dados #home-calendar-toggle-wrapper,
body.sem-dados #mobile-fab,
body.sem-dados #fab-minimized {
  display: none !important;
}

@media (max-width: 1040px) {
  body.home-account-switcher-enabled #dados-institucionais li.dados-user-row {
    display: none !important;
  }

  body.home-account-switcher-enabled .mobile-user-card-header {
    display: flex;
  }

  .mobile-user-details { flex: 1; min-width: 0; }

  body.adding-account .mobile-user-card {
    display: none !important;
  }
}

/* Login: fundo institucional e um único card adaptável à viewport. */
.login-backdrop { display: none; }

body.sem-dados {
  display: flex;
  flex-direction: column;
  height: 100svh !important;
  height: 100dvh !important;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  overflow-y: hidden !important;
  overflow-x: hidden;
  isolation: isolate;
}

html:has(body.sem-dados) { margin: 0; overflow: hidden; }

body.sem-dados[data-app-mode="graduacao"] {
  background: linear-gradient(135deg, #dceafa, #eff6ff 48%, #d2e4f8) !important;
}

body.sem-dados[data-app-mode="tecnico"] {
  background: linear-gradient(135deg, #d7eee1, #effaf4 48%, #cde8da) !important;
}

body.sem-dados[data-app-mode="responsavel"] {
  background: linear-gradient(135deg, #e4dbf5, #f6f1ff 48%, #ded0f4) !important;
}

body.sem-dados .login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  overflow: hidden;
}

.login-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.55), transparent 55%),
    radial-gradient(ellipse at 85% 80%, color-mix(in srgb, var(--app-accent) 9%, transparent), transparent 55%);
}

.login-backdrop span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size, clamp(80px, 9vw, 130px));
  aspect-ratio: 1.25;
  background: var(--app-accent-strong, #0f3f7a);
  opacity: 0.045;
  -webkit-mask: url('Logo_CEFET-MG.png') center / contain no-repeat;
  mask: url('Logo_CEFET-MG.png') center / contain no-repeat;
  transform: rotate(var(--angle, -18deg));
  animation: cefet-background-breathe var(--duration, 22s) ease-in-out var(--delay, 0s) infinite;
}

.login-backdrop span:nth-child(1) { --x: 3%; --y: 7%; --size: clamp(130px, 16vw, 230px); --angle: -22deg; --delay: -8s; --duration: 24s; }
.login-backdrop span:nth-child(2) { --x: 30%; --y: 4%; --size: clamp(68px, 8vw, 110px); --angle: 14deg; --delay: -3s; --duration: 19s; }
.login-backdrop span:nth-child(3) { --x: 70%; --y: 9%; --size: clamp(95px, 13vw, 175px); --angle: -8deg; --delay: -15s; }
.login-backdrop span:nth-child(4) { --x: 89%; --y: 28%; --size: clamp(160px, 24vw, 320px); --angle: 20deg; --delay: -10s; --duration: 29s; }
.login-backdrop span:nth-child(5) { --x: 8%; --y: 40%; --size: clamp(60px, 6vw, 90px); --angle: 12deg; --delay: -18s; }
.login-backdrop span:nth-child(6) { --x: 24%; --y: 29%; --size: clamp(105px, 12vw, 165px); --angle: -30deg; --delay: -5s; --duration: 26s; }
.login-backdrop span:nth-child(7) { --x: 76%; --y: 48%; --size: clamp(70px, 8vw, 120px); --angle: -18deg; --delay: -12s; --duration: 20s; }
.login-backdrop span:nth-child(8) { --x: -5%; --y: 67%; --size: clamp(170px, 25vw, 340px); --angle: 18deg; --delay: -2s; --duration: 30s; }
.login-backdrop span:nth-child(9) { --x: 29%; --y: 80%; --size: clamp(65px, 8vw, 110px); --angle: -10deg; --delay: -17s; }
.login-backdrop span:nth-child(10) { --x: 59%; --y: 85%; --size: clamp(115px, 15vw, 210px); --angle: -25deg; --delay: -6s; --duration: 27s; }
.login-backdrop span:nth-child(11) { --x: 86%; --y: 81%; --size: clamp(60px, 7vw, 95px); --angle: 12deg; --delay: -14s; --duration: 18s; }
.login-backdrop span:nth-child(12) { --x: 48%; --y: 53%; --size: clamp(80px, 10vw, 140px); --angle: 24deg; --delay: -9s; }

@keyframes cefet-background-breathe {
  0%, 100% { opacity: 0.025; transform: translate3d(0, 0, 0) rotate(var(--angle, -18deg)) scale(0.97); }
  50% { opacity: 0.095; transform: translate3d(6px, -12px, 0) rotate(calc(var(--angle, -18deg) + 4deg)) scale(1.035); }
}

@media (prefers-reduced-motion: reduce) {
  .login-backdrop span { animation: none; opacity: 0.045; }
}

body.sem-dados .page-header {
  position: relative;
  flex: none;
  margin: 0;
  z-index: 1;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 22px 32px !important;
}

body.sem-dados .page-header h1 { font-size: 18px; }

body.sem-dados #tab-home.sem-dados {
  display: grid !important;
  place-items: center;
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  overflow: hidden;
  min-height: 0 !important;
  width: 100%;
  padding: clamp(16px, 4vh, 40px) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

body.sem-dados #home-consultation-shell {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  overflow: visible;
}

body.sem-dados #tab-home > :not(#home-consultation-shell) {
  display: none !important;
}

body.sem-dados #tab-home::after { content: none; display: none; }

body.sem-dados[data-app-mode] #home-content.sem-dados {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 0 !important;
  padding: clamp(22px, 5vw, 32px) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 20px 60px color-mix(in srgb, var(--app-accent-strong) 13%, transparent),
    0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

body.sem-dados[data-app-mode] #home-content.sem-dados #home-content-header {
  gap: 0;
  min-width: 0;
}

body.sem-dados[data-app-mode] #home-content.sem-dados #sigaa-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sem-dados #sigaa-form::before { display: none !important; }

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.login-brand-logo {
  flex: none;
  width: 42px;
  height: 36px;
  margin-top: 0;
  background: var(--app-accent-strong, #0f3f7a);
  -webkit-mask: url('Logo_CEFET-MG.png') center / contain no-repeat;
  mask: url('Logo_CEFET-MG.png') center / contain no-repeat;
}

.login-brand > div { min-width: 0; }

.login-brand-mark {
  flex: 0 0 66px;
  min-height: 78px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--app-accent) 14%, #e2e8f0);
  border-radius: 14px;
  background: color-mix(in srgb, var(--app-accent) 6%, #fff);
}

.login-brand-mark-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-accent-strong);
  white-space: nowrap;
}

.login-brand-copy {
  flex: 1;
  padding-left: 16px;
  border-left: 1px solid color-mix(in srgb, var(--app-accent) 16%, #e2e8f0);
}

.login-brand-eyebrow {
  color: var(--app-accent-strong, #0f3f7a);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#sigaa-form .login-brand h2 {
  margin: 7px 0 8px;
  padding: 0;
  color: #172b40;
  font-size: clamp(20px, 4.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  background: transparent;
}

.login-brand p { margin: 0; font-size: 12px; line-height: 1.6; color: #64748b; }

body.sem-dados #sigaa-form label:not(.remember-login-label) {
  width: 100%;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}

body.sem-dados #sigaa-form input[type="text"],
body.sem-dados #sigaa-form input[type="password"],
body.sem-dados #sigaa-form .home-mode-switcher select {
  width: 100% !important;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--app-accent) 18%, #dbe3ed) !important;
  border-radius: 10px;
  background: #fff !important;
  font-size: 16px;
}

body.sem-dados #sigaa-form input[type="text"],
body.sem-dados #sigaa-form input[type="password"] { margin-bottom: 18px; }

body.sem-dados #sigaa-form .password-info { margin-top: 4px; gap: 10px; }
body.sem-dados #sigaa-form .login-action-btn { min-height: 46px; border-radius: 10px; }

@media (max-width: 1040px) {
  body.sem-dados #tab-home.sem-dados { justify-content: center; }
  .login-backdrop span:nth-child(3) { --x: 78%; }
  .login-backdrop span:nth-child(5) { --x: -7%; }
  .login-backdrop span:nth-child(7) { --x: 88%; }
}

@media (max-width: 360px), (max-height: 680px) {
  body.sem-dados #tab-home.sem-dados { padding-top: 12px; padding-bottom: 16px; }
  body.sem-dados[data-app-mode] #home-content.sem-dados { padding: 20px !important; border-radius: 18px !important; }
  .login-brand { gap: 10px; margin-bottom: 20px; }
  .login-brand-logo { width: 34px; height: 28px; }
  .login-brand-mark { flex-basis: 56px; min-height: 68px; padding: 10px 6px; }
  .login-brand-copy { padding-left: 12px; }
}

@media (max-height: 740px) {
  body.sem-dados .page-header { padding: 10px 20px !important; }
  body.sem-dados #tab-home.sem-dados { padding-top: 10px; padding-bottom: 10px; }
  body.sem-dados .login-brand { margin-bottom: 12px; gap: 10px; }
  body.sem-dados .login-brand-mark { min-height: 56px; padding: 8px 6px; }
  body.sem-dados .login-brand p { line-height: 1.35; }
  body.sem-dados #sigaa-form .home-mode-switcher { margin-bottom: 12px !important; padding-bottom: 10px !important; }
  body.sem-dados #sigaa-form input[type="text"],
  body.sem-dados #sigaa-form input[type="password"] { min-height: 40px; padding: 8px 10px; margin-bottom: 10px; }
  body.sem-dados #sigaa-form label:not(.remember-login-label) { margin-bottom: 5px; }
  body.sem-dados #sigaa-form .login-action-btn { min-height: 40px; }
}

.exam-source-label { display: block; font-size: .75rem; opacity: .8; margin: 4px 0; }
.calendar-page-heading { margin-bottom: 24px; }
.calendar-page-eyebrow { color: var(--app-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.calendar-page-heading h2 { margin: 6px 0; color: #172b40; font-size: 28px; }
.calendar-page-heading p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.5; }
.calendar-day-preview { display: none; }
body.calendar-dialog-open { overflow: hidden; }
html:has(body.calendar-dialog-open) { overflow: hidden; }
.tab-calendar-header { flex-wrap: wrap; gap: 12px; }
.tab-calendar-actions { flex-wrap: wrap; min-width: 0; }
.calendar-nav-btn { flex-shrink: 0; font-size: 28px; }
.exam-remove-btn { align-self: start; margin-top: 10px; padding: 6px 10px; border: 1px solid #fecaca; border-radius: 7px; background: #fff; color: #b91c1c; font: inherit; font-size: 12px; cursor: pointer; }
.exam-remove-btn:hover { background: #fef2f2; }
.exam-remove-btn:disabled { opacity: .5; cursor: wait; }
.tab-calendar-layout-grid > * { min-width: 0; }
.tab-calendar-main-panel, .tab-calendar-side-panel, .tab-calendar-form-panel, .tab-calendar-form-card { box-sizing: border-box; }
.tab-agenda-card-content { min-width: 0; }
.tab-agenda-card { flex-shrink: 0; }
.tab-calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tab-calendar-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tab-calendar-title-group { min-width: 0; }
.tab-calendar-warning { box-sizing: border-box; overflow-wrap: anywhere; }
.tab-calendar-warning .warning-icon { width: 18px; overflow: hidden; }
.tab-agenda-empty { line-height: 1.5; padding: 18px; }
.tab-agenda-section-title { margin: 12px 0 0; }
.exam-status-msg:empty { display: none; }
.tab-calendar-form-card select { text-overflow: ellipsis; }
.tab-calendar-form-card form { box-shadow: none; }
.tab-calendar-form-card input, .tab-calendar-form-card select, .tab-calendar-form-card label { margin: 0; }
.tab-calendar-form-card label:not(:first-child) { margin-top: 4px; }
.tab-calendar-form-card .exam-access-help { margin-bottom: 12px; }
.tab-calendar-form-card .exam-refresh-access { font: inherit; font-size: 12px; border-color: #cbd5e1; border-radius: 8px; padding: 8px 10px; background: #f8fafc; }
.tab-agenda-card-title, .tab-agenda-card-subtitle { overflow-wrap: anywhere; }
@media (min-width: 1041px) {
  #tab-calendario { background: transparent; padding: 20px 0; }
  .tab-calendar-container { max-width: 1600px; padding: 0; background: transparent; box-shadow: none; }
  .tab-calendar-layout-grid { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 20px; }
  .tab-calendar-main-panel { grid-column: 1; grid-row: 1; }
  .tab-calendar-side-panel { grid-column: 2; grid-row: 1; }
  .tab-calendar-form-panel { grid-column: 2; grid-row: 2; }
  .tab-calendar-main-panel, .tab-calendar-side-panel { border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.03); }
  .tab-calendar-form-card { border-radius: 16px; padding: 22px; }
  .tab-calendar-header { flex-wrap: wrap; gap: 12px; }
  .tab-calendar-day { aspect-ratio: auto; min-height: 82px; padding: 7px; align-items: flex-start; justify-content: flex-start; border: 1px solid #edf1f5; background: #fcfdff; box-sizing: border-box; min-width: 0; overflow: hidden; }
  .tab-calendar-grid { grid-auto-rows: 96px; }
  .tab-calendar-day-number { width: 26px; height: 26px; flex-shrink: 0; }
  .tab-calendar-day.is-selected { border-color: var(--app-accent); background: var(--app-accent-soft); }
  .tab-calendar-day.is-today { border-color: color-mix(in srgb, var(--app-accent) 40%, #e2e8f0); }
  .tab-calendar-dots { position: static; margin: 4px 0; }
  .calendar-day-preview { display: flex; flex-direction: column; gap: 3px; width: 100%; margin-top: 4px; }
  .calendar-day-preview span { font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; }
  .calendar-day-preview .calendar-day-more { color: var(--app-accent); font-weight: 600; }
  .tab-agenda-events-list { max-height: none; overflow: visible; padding-right: 0; }
  .tab-calendar-form-card select, .tab-calendar-form-card input { min-height: 42px; border-radius: 9px; }
}
@media (min-width: 1440px) {
  .tab-calendar-layout-grid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
  .tab-calendar-main-panel { grid-row: 1; }
  .tab-calendar-form-panel { grid-column: 3; grid-row: 1; }
}

/* The same proof dialog is used on desktop and mobile. */
.tab-calendar-form-panel {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  padding: 16px;
  background: rgba(15, 23, 42, .48);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.tab-calendar-form-panel.open { display: flex; }
.tab-calendar-form-panel .tab-calendar-form-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15,23,42,.2);
}
.tab-calendar-form-card h4 { padding-right: 32px; }
#mobile-add-exam-btn { display: inline-block !important; background: var(--app-accent); color: #fff; border-color: var(--app-accent); }
#close-exam-modal-btn { display: block !important; position: absolute; top: 18px; right: 18px; padding: 4px; background: transparent; border: 0; font-size: 20px; cursor: pointer; color: #64748b; }
@media (max-width: 1040px) {
  .calendar-page-heading { margin-bottom: 18px; }
  .calendar-page-heading h2 { font-size: 24px; }
  #tab-calendario { background: transparent; padding: 16px 4px calc(var(--mobile-bottom-safe-space) + 20px); }
  .tab-calendar-container { background: transparent; padding: 0; border-radius: 0; }
  .calendar-page-heading { padding: 0 4px; }
  #tab-calendario::after { content: none; display: none; }
  .tab-calendar-layout-grid { display: flex; gap: 20px; align-items: stretch; }
  .tab-calendar-main-panel, .tab-calendar-side-panel {
    padding: 16px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
  }
  .tab-calendar-header { align-items: center; }
  .tab-calendar-actions { width: 100%; gap: 6px; }
  #mobile-add-exam-btn { margin-right: auto; }
  .tab-calendar-day { aspect-ratio: auto; min-height: 42px; }
  .tab-calendar-form-panel { padding: 16px; height: 100dvh; }
  .tab-calendar-form-panel .tab-calendar-form-card { width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; }
  .tab-calendar-form-card h4 { padding-right: 28px; }
  .tab-calendar-form-card input, .tab-calendar-form-card select { min-height: 44px; font-size: 16px; }
}
.exam-access-help { font-size: .85rem; line-height: 1.5; opacity: .85; }
@media (max-width: 1040px) {
  body:not(.sem-dados) #home-content {
    box-sizing: border-box;
    padding: 16px !important;
  }
  body:not(.sem-dados) #home-content-header { width: 100%; min-width: 0; align-items: stretch; }
  body.adding-account:not(.sem-dados) #home-content-header > #sigaa-form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    align-self: stretch !important;
  }
  body:not(.sem-dados) #home-content-header > .mobile-user-card,
  body:not(.sem-dados) #home-content-header > #dados-institucionais {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: stretch !important;
  }
}
@media (max-width: 480px) {
  body:not(.sem-dados) #home-content { padding: 12px !important; }
}
.frequency-empty-cell { color: #64748b; font-size: .85rem; line-height: 1.5; }
.frequency-empty-notice { padding: 16px; border: 1px solid var(--app-accent-soft, #e2e8f0); border-radius: 10px; background: var(--app-accent-soft, #f8fafc); color: var(--app-accent-strong, #334155); font-size: 14px; line-height: 1.6; }
.exam-refresh-access { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 8px; padding: 7px 12px; cursor: pointer; margin-bottom: 12px; }
.exam-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
