.panel, .auth-card, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.auth-card {
  max-width: 460px;
  margin: 44px auto;
}
.clock-background-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  width: min(480px, 100%);
}
.clock-background-preview img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}
.panel h1, .auth-card h1, h1 {
  color: var(--ink);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 16px;
}
h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}
p { color: var(--muted); }
.auth-options { display: grid; gap: 10px; margin-bottom: 16px; }
form:not(.inline):not(.nav-logout):not(.study-bottom-form):not(.study-bottom-inline):not(.app-logout-form) {
  display: grid;
  gap: 14px;
}
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
label {
  color: var(--ink);
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.permission-group {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.permission-group:last-child { border-bottom: 0; }
.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
input, select, textarea, :where(button:not(.btn):not(.navbar-toggler):not(.version-link):not(.study-bottom-button):not(.app-sidebar-toggle):not(.app-sidebar-edge-toggle):not(.app-clock-sidebar-toggle):not(.app-drawer-toggle):not(.dropdown-item)), .button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
input, select, textarea {
  background: #fff;
  color: var(--text);
  width: 100%;
}
.study-bottom-bar select {
  width: auto;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(25, 115, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(25, 115, 94, 0.12);
  outline: 0;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  min-height: auto;
  width: auto;
}
textarea { min-height: 90px; }
:where(button:not(.btn):not(.navbar-toggler):not(.version-link):not(.study-bottom-button):not(.app-sidebar-toggle):not(.app-sidebar-edge-toggle):not(.app-clock-sidebar-toggle):not(.app-drawer-toggle):not(.dropdown-item)), .button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  justify-content: center;
  min-width: fit-content;
}
:where(button:not(.btn):not(.navbar-toggler):not(.version-link):not(.study-bottom-button):not(.app-sidebar-toggle):not(.app-sidebar-edge-toggle):not(.app-clock-sidebar-toggle):not(.app-drawer-toggle):not(.dropdown-item)):hover, .button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}
.button.secondary {
  background: #24364a;
  border-color: #24364a;
}
.button.secondary:hover {
  background: #172638;
  border-color: #172638;
}
.inline { display: inline-flex; gap: 8px; align-items: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
table {
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
tbody tr {
  transition: background-color 0.2s ease;
}
tbody tr:nth-child(even) {
  background-color: #f8fafc; /* light grey for zebra effect */
}
tbody tr:hover {
  background-color: #f1f5f9; /* slightly darker grey on hover */
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats div, .stats a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(17, 31, 48, 0.06);
  color: var(--muted);
  padding: 16px;
}
.stats strong {
  color: var(--ink);
  display: block;
  font-size: 28px;
  line-height: 1.1;
}
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; background: #e8f5ef; border: 1px solid #b8dfcf; }
.flash.danger { background: #fff1f0; border-color: #ffccc7; color: var(--danger); }
.flash.warning { background: #fff7e6; border-color: #ffd591; color: var(--warning); }
.badge { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #e2e8f0; margin: 2px; }
.app-breadcrumb {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.app-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.app-breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.app-breadcrumb span[aria-current="page"] {
  color: var(--ink);
}
.app-breadcrumb-separator {
  color: #94a3b8;
  font-weight: 600;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spaced { margin-top: 12px; }
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.pagination-nav { display: flex; justify-content: center; margin-top: 16px; }
.pagination {
  display: flex;
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: white;
}
.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pagination .disabled { color: var(--muted); }
.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.recaptcha-field { margin: 12px 0; }
code, pre { white-space: pre-wrap; word-break: break-word; }
.footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 18px 16px 28px;
}
.footer .version-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  min-height: auto;
  padding: 0;
}
.footer button.version-link {
  cursor: pointer;
}
.footer .version-link:hover {
  background: transparent;
}
.footer button.version-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}
.modal-dialog {
  border: 0;
  padding: 0;
  width: min(820px, calc(100vw - 32px));
  margin-inline: auto;
}
.modal-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.modal-content { background: white; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-md); }
.modal-header, .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.modal-body { padding: 18px; }
.icon-button {
  min-height: auto;
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  font-size: 22px;
}
.changelog-content {
  max-height: 70vh;
  overflow: auto;
}
.changelog-content h2, .changelog-content h3 { margin-top: 0; }
.danger-text { color: var(--danger); }


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

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

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

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