/* ==========================================================================
   Funzioni aggiuntive: filtri, voti, notifiche, account, moderazione,
   ripresa della lettura nel PDF.
   ========================================================================== */

/* --- elementi comuni --------------------------------------------------------- */

.btn-small {
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-on {
  border-color: transparent;
  background: rgba(10, 122, 255, 0.14);
  color: var(--accent);
}

.btn,
.ql-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

a.btn {
  text-decoration: none;
  color: var(--text);
}

.btn-icon {
  width: 15px;
  height: 15px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

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

.pill {
  display: inline-block;
  margin: 0 6px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
}

.chip-static {
  cursor: default;
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.3);
  color: var(--danger);
}

/* --- Finder: filtri, gruppi, voti, nascosti, segui ---------------------------------- */

.filter-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 6px 14px;
  border-bottom: 0.5px solid var(--border);
  background: var(--toolbar-bg);
  font-size: 12px;
  color: var(--text-2);
}

.filter-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-select {
  height: 24px;
  max-width: 200px;
  padding: 0 4px;
  border: 0.5px solid var(--btn-border);
  border-radius: 6px;
  background: var(--field-bg);
  font-size: 12px;
}

.group-header {
  grid-column: 1 / -1;
  margin: 10px 4px 2px;
  padding-bottom: 4px;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.group-header:first-child {
  margin-top: 0;
}

.items-list tr.group-row td {
  padding: 10px 10px 4px;
  background: var(--content-bg) !important;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}

.vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  padding: 1px 7px;
  border: 0.5px solid var(--btn-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--text-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.vote-chip .svg {
  width: 11px;
  height: 11px;
}

.vote-chip:hover:not(.readonly) {
  border-color: var(--accent);
  color: var(--accent);
}

.vote-chip.on {
  border-color: transparent;
  background: rgba(10, 122, 255, 0.14);
  color: var(--accent);
}

.vote-chip.readonly {
  cursor: default;
}

.items-list .vote-chip {
  margin: 0;
}

.items-list tr.selected .vote-chip {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
}

.item.is-hidden .item-icon,
.item.is-hidden .row-icon {
  opacity: 0.45;
}

.item-icon {
  position: relative;
}

.hidden-badge {
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hidden-badge .svg {
  width: 13px;
  height: 13px;
}

.hidden-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(255, 59, 48, 0.14);
  color: var(--danger);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  vertical-align: middle;
}

.tool-follow {
  padding: 0 9px;
  font-weight: 500;
}

.tool-follow.on {
  color: var(--accent);
}

.finder-banner .svg {
  flex-shrink: 0;
}

/* --- barra dei menu: campanella --------------------------------------------------------- */

.menubar-bell {
  position: relative;
}

.menubar-badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

/* --- centro notifiche -------------------------------------------------------------- */

.notification-center {
  position: fixed;
  top: calc(var(--menubar-h) + 6px);
  right: 8px;
  bottom: 90px;
  z-index: 8800;
  width: min(370px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  backdrop-filter: blur(40px) saturate(1.8);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: notif-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.notification-center header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}

.notification-center h2 {
  flex: 1;
  margin: 0;
  font-size: 16px;
}

.nc-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.nc-item {
  position: relative;
  width: 100%;
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  padding: 10px 26px 10px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  text-align: left;
  color: var(--text);
}

/* Tema scuro: data-theme="dark" lo imposta js/theme.js (sistema o scelta manuale) */
:root[data-theme="dark"] .nc-item {
  background: rgba(255, 255, 255, 0.06);
}

/* Non lette: leggermente azzurre e con il titolo in grassetto. Lette: più tenui. */
.nc-item.unread {
  background: rgba(10, 132, 255, 0.1);
  box-shadow: inset 0 0 0 0.5px rgba(10, 132, 255, 0.25);
}

.nc-item:not(.unread) {
  background: transparent;
}

.nc-item:not(.unread) .nc-text strong {
  font-weight: 500;
  color: var(--text-2);
}

.nc-item:not(.unread) .nc-icon {
  opacity: 0.6;
  filter: saturate(0.6);
}

.nc-item:hover {
  background: var(--pressed);
}

.nc-section {
  margin: 6px 6px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.nc-section:not(:first-child) {
  margin-top: 14px;
}

.nc-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #5ac8fa, #0a64d8);
  color: #fff;
}

.nc-icon .svg {
  width: 16px;
  height: 16px;
}

.type-doc_hidden .nc-icon {
  background: linear-gradient(180deg, #ffd36b, #ff9500);
}

.type-moderator .nc-icon {
  background: linear-gradient(180deg, #ff8a65, #d63031);
}

.type-doc_deleted .nc-icon {
  background: linear-gradient(180deg, #ff7a70, #e0261b);
}

.type-announcement .nc-icon {
  background: linear-gradient(180deg, #ffcc4d, #ff9500);
}

/* Avvisi del Dipartimento (canale Telegram): azzurro Telegram */
.type-dieei .nc-icon,
.nc-promo .nc-icon {
  background: linear-gradient(180deg, #45c3ff, #1a8fe0);
}

/* Freccia: l'avviso si apre sulla pagina del Dipartimento */
.nc-link {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(26, 143, 224, 0.14);
  color: #1a8fe0;
  transition: transform 0.15s, background 0.15s;
}

.nc-link .svg {
  width: 12px;
  height: 12px;
}

.nc-item:hover .nc-link {
  transform: translate(1px, -1px);
  background: #1a8fe0;
  color: #fff;
}

.nc-promo {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 30px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(69, 195, 255, 0.2), rgba(26, 143, 224, 0.08));
  box-shadow: inset 0 0 0 0.5px rgba(26, 143, 224, 0.35);
}

.nc-promo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nc-promo-text strong {
  font-size: 13px;
}

.nc-promo-text > span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-2);
}

.nc-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.nc-promo-actions .btn {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

.nc-promo-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-3);
}

.nc-promo-x .svg {
  width: 11px;
  height: 11px;
}

.type-message .nc-icon {
  background: linear-gradient(180deg, #7ee8a2, #1d9b5a);
}

.type-new_version .nc-icon {
  background: linear-gradient(180deg, #c47cff, #6e3df5);
}

.nc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
}

/* Titolo al massimo su 2 righe e testo su 3: gli avvisi lunghi si leggono per intero aprendoli */
.nc-text strong {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nc-text span {
  color: var(--text-2);
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nc-text small {
  color: var(--text-3);
}

.nc-dot {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.nc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

.nc-empty strong {
  color: var(--text);
}

.nc-empty-icon {
  width: 36px;
  height: 36px;
  color: var(--text-3);
}

/* --- regole d'uso al primo accesso ---------------------------------------------------- */

.terms-screen {
  justify-content: center;
  overflow-y: auto;
}

.terms-card {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 28px 22px;
  border-radius: 22px;
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  backdrop-filter: blur(40px) saturate(1.6);
  box-shadow: var(--shadow-window);
  color: var(--text);
  text-shadow: none;
  animation: pop 0.25s ease-out;
}

.terms-logo {
  width: 64px;
  height: 64px;
}

.terms-card h1 {
  margin: 4px 0 0;
  font-size: 21px;
  text-align: center;
}

.terms-lead {
  margin: 0;
  color: var(--text-2);
  text-align: center;
}

.terms-list {
  width: 100%;
  margin: 6px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terms-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.terms-list li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.terms-list span {
  color: var(--text-2);
  line-height: 1.4;
}

.terms-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 8px;
  background: rgba(10, 122, 255, 0.12);
  color: var(--accent);
}

.terms-consent {
  width: 100%;
  margin-top: 6px;
  font-size: 13px;
}

.terms-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- finestre di dialogo ------------------------------------------------------------- */

.dialog-form {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 16px;
}

.dialog-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dialog-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.dialog-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}

.dialog-icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(10, 122, 255, 0.12);
  color: var(--accent);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 13px;
}

.radio-row:hover {
  background: var(--hover);
}

.radio-row input {
  margin: 0;
  accent-color: var(--accent);
}

.dropzone-small {
  flex-direction: row !important;
  padding: 12px 14px;
  text-align: left !important;
  font: inherit;
}

.version-file {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-file > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.version-file strong {
  overflow-wrap: anywhere;
}

.version-file small {
  color: var(--text-2);
}

.version-file-icon {
  width: 30px;
  height: 36px;
  color: var(--accent);
}

/* --- informazioni sul documento (caricamento e modifica) ---------------------------------- */

.meta-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.meta-grid label > span {
  font-size: 11px;
  color: var(--text-2);
}

.exam-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 0;
  padding: 10px 12px 12px;
  border: 0.5px solid rgba(255, 69, 58, 0.45);
  border-radius: 10px;
  background: rgba(255, 69, 58, 0.05);
}

.exam-box legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}

@media (max-width: 460px) {
  .meta-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Info: avvisi, versioni ---------------------------------------------------------- */

.info-alert {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 159, 10, 0.14);
  font-size: 12px;
}

.info-alert > .svg {
  width: 18px;
  height: 18px;
  color: #ff9500;
}

.info-alert div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-alert small {
  color: var(--text-2);
}

.info-actions-secondary {
  margin-top: 10px;
}

.info-versions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
}

.info-versions h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
}

.info-versions ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-versions li {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--row-alt);
  font-size: 12px;
}

.info-versions li small {
  color: var(--text-2);
}

.info-versions li p {
  margin: 4px 0;
  color: var(--text-2);
}

/* --- visualizzatore PDF: barra laterale a schede ------------------------------------------- */

.pdfv.with-thumbs .pdfv-sidebar {
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.pdfv-sidebar.has-tabs {
  width: 250px;
}

.pdfv-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-bottom: 0.5px solid var(--border);
}

.pdfv-tab {
  position: relative;
  flex: 1;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-2);
}

.pdfv-tab .svg {
  width: 16px;
  height: 16px;
}

.pdfv-tab:hover {
  background: var(--hover);
}

.pdfv-tab.on {
  background: var(--pressed);
  color: var(--accent);
}

.pdfv-panes {
  position: relative;
  flex: 1;
  min-height: 0;
}

.pdfv-pane-wrap {
  position: absolute;
  inset: 0;
  overflow-y: auto;
}

.pdfv-thumbs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
}

.pdfv-vote {
  width: auto;
  gap: 4px;
  padding: 0 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pdfv-vote {
  display: inline-flex;
}

/* --- "Ripreso da pagina…" nel visualizzatore ----------------------------------------- */

.study-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(28, 28, 30, 0.86);
  color: #fff;
  font-size: 12px;
  transform: translateX(-50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  animation: fade 0.2s;
  white-space: nowrap;
}

.study-toast button {
  padding: 2px 8px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
}

/* --- account ------------------------------------------------------------------------ */

.account h3 {
  margin: 18px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-profile h2 {
  margin: 0;
  font-size: 17px;
}

.account-profile div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-profile span,
.account-profile small {
  color: var(--text-2);
  font-size: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #5ac8fa, #0a64d8);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--row-alt);
  font-size: 13px;
}

.account-card p {
  margin: 0;
  line-height: 1.45;
}

.account-card .btn {
  align-self: flex-start;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.usage-row span {
  color: var(--text-2);
}

.usage-bar {
  height: 6px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switch-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row small {
  color: var(--text-2);
}

.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 11px;
  background: var(--text-3);
  transition: background 0.2s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.switch:checked {
  background: #30d158;
}

.switch:checked::after {
  transform: translateX(16px);
}

.follow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.follow-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.follow-list .link-btn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.legal-links {
  font-size: 12px;
  color: var(--text-2);
}

.legal-links a {
  color: var(--accent);
}

.danger-title {
  color: var(--danger) !important;
}

.danger-card {
  background: rgba(255, 59, 48, 0.07);
}

/* --- moderazione --------------------------------------------------------------------- */

.moderation {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mod-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
}

.seg-text {
  width: auto;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
}

.mod-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.mod-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.mod-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--row-alt);
}

.mod-card .info-actions {
  margin: 0;
  padding: 0;
  border: 0;
}

.mod-doc {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mod-doc > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mod-doc small {
  color: var(--text-2);
  font-size: 12px;
}

.mod-doc-icon {
  width: 34px;
  height: 42px;
}

.mod-title {
  font-size: 14px;
  font-weight: 600;
}

.mod-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.mod-notes span {
  color: var(--text-2);
}

.mod-notes p {
  margin: 2px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.mod-reason {
  margin: 0;
  font-size: 12px;
}

.mod-reason small {
  color: var(--text-2);
}

.mod-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--row-alt);
}

.mod-add label {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
}

.mod-table {
  border-radius: 10px;
  overflow: hidden;
}

/* --- Spotlight: frammenti trovati nel testo -------------------------------------------------- */

.spot-snippet b {
  margin-right: 2px;
  font-weight: 600;
}

.spot-snippet mark {
  padding: 0 1px;
  border-radius: 3px;
  background: rgba(255, 214, 10, 0.55);
  color: inherit;
}

.spot-item.active .spot-snippet mark {
  background: rgba(255, 255, 255, 0.35);
}

.spot-snippet i {
  opacity: 0.8;
}

/* --- schermi piccoli ---------------------------------------------------------------- */

@media (max-width: 720px) {
  .pdfv-sidebar.has-tabs {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 6;
    width: min(280px, 85%);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
  }

  .tool-follow span:not(.svg) {
    display: none;
  }

  .notification-center {
    bottom: 76px;
  }

  .study-toast {
    white-space: normal;
    width: calc(100% - 32px);
  }
}

/* --- barra del Finder in finestre strette ------------------------------------------------
   I pulsanti non si schiacciano mai: quando la barra è stretta "Segui" e "Carica" mostrano
   solo l'icona, poi spariscono le viste icone/elenco. Così il titolo della cartella resta leggibile. */

.finder .toolbar {
  container-type: inline-size;
}

.toolbar .tool-btn,
.toolbar .segmented,
.toolbar .nav-btns {
  flex-shrink: 0;
}

@container (max-width: 640px) {
  .tool-follow span:not(.svg),
  .tool-upload span:not(.svg) {
    display: none;
  }

  .tool-follow,
  .tool-upload {
    padding: 0 6px;
  }
}

@container (max-width: 500px) {
  .toolbar .segmented {
    display: none;
  }
}

/* Account e privacy: scelta degli avvisi del Dipartimento */
.account-select {
  flex-shrink: 0;
  width: auto;
  max-width: 210px;
  height: 28px;
  font-size: 12.5px;
}

/* Ingranaggio nella tendina delle notifiche: porta alle impostazioni in Account e privacy */
.nc-settings {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hover);
  color: var(--text-2);
  transition: transform 0.3s, background 0.15s, color 0.15s;
}

.nc-settings:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}

.nc-settings .svg {
  width: 15px;
  height: 15px;
}

/* Sezione raggiunta dall'ingranaggio: un breve alone */
.account-flash {
  animation: account-flash 1.6s ease-out;
}

@keyframes account-flash {
  0%,
  35% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
