/* ==========================================================================
   BioMov Tesi — design condiviso (portale studenti, dashboard staff, login)
   Stile "Apple": superfici bianche, raggi ampi, ombre morbide, vetro sfocato nei popup.
   Tutto è limitato alla classe .bmt per non interferire con il tema.
   ========================================================================== */

.bmt {
  --bmt-red: #b5121b;
  --bmt-red-d: #930f16;
  --bmt-red-soft: #fdecee;
  --bmt-ink: #1d1d1f;
  --bmt-mute: #6e6e73;
  --bmt-faint: #86868b;
  --bmt-bg: #f5f5f7;
  --bmt-card: #ffffff;
  --bmt-line: rgba(0, 0, 0, 0.08);
  --bmt-blue: #0071e3;
  --bmt-blue-soft: #e8f1fd;
  --bmt-green: #1f8a3b;
  --bmt-green-soft: #e5f5e9;
  --bmt-orange: #b25e00;
  --bmt-orange-soft: #fff1de;
  --bmt-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --bmt-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.22);
  --bmt-ease: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--bmt-ink);
  background: var(--bmt-bg);
  border-radius: 28px;
  padding: 36px;
  margin: 24px 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.bmt *, .bmt *::before, .bmt *::after { box-sizing: border-box; }
.bmt [hidden] { display: none !important; }
.bmt h2, .bmt h3, .bmt p, .bmt dl, .bmt dd, .bmt fieldset { margin: 0; padding: 0; }
.bmt a { text-decoration: none; }
.bmt small { font-size: 12px; }

/* Difesa dal tema: nessuno sfondo, ombra o "evidenziatore" sul testo dentro le card.
   (alcuni temi danno uno sfondo bianco a span, strong, small, label, dt, dd...) */
.bmt p, .bmt h2, .bmt h3, .bmt dt, .bmt dd, .bmt legend, .bmt label, .bmt strong, .bmt b, .bmt em, .bmt i, .bmt small, .bmt mark, .bmt time, .bmt code, .bmt li {
  background-color: transparent; box-shadow: none; text-shadow: none;
}
.bmt :is(span, strong, b, small, em, i, mark, time, code, li, p, dt, dd, legend, label, u):not([class]) {
  background: none !important; box-shadow: none !important; text-shadow: none !important;
}
.bmt mark { color: inherit; }
.bmt .bmt-tag, .bmt .bmt-status, .bmt .bmt-dot, .bmt .bmt-badge, .bmt .bmt-count-pill { box-shadow: none; text-shadow: none; }
.bmt span:not([class*="bmt-tag"]):not([class*="bmt-status"]):not([class*="bmt-dot"]):not([class*="bmt-badge"]):not([class*="bmt-count-pill"]) {
  background-color: transparent; box-shadow: none; text-shadow: none;
}
/* Testo della descrizione (spesso incollato da Word/Google Docs con colori e sfondi propri) */
.bmt .bmt-prose, .bmt .bmt-prose * { background: none !important; box-shadow: none !important; text-shadow: none !important; }
.bmt .bmt-prose *:not(a) { color: inherit !important; }
.bmt .bmt-prose span, .bmt .bmt-prose font { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }

/* ---------- Intestazione ---------- */
.bmt-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 26px; }
.bmt .bmt-eyebrow { font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bmt-red); margin-bottom: 6px; }
.bmt .bmt-title { font-family: inherit; text-transform: none; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; color: var(--bmt-ink); margin: 0; }
.bmt .bmt-sub { margin-top: 8px; max-width: 560px; color: var(--bmt-mute); font-size: 15px; }
.bmt-head-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }

.bmt-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.bmt-stat { background: var(--bmt-card); border-radius: 18px; padding: 12px 18px; min-width: 104px; box-shadow: var(--bmt-shadow); display: flex; flex-direction: column; gap: 2px; }
.bmt-stat strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--bmt-red); line-height: 1.1; }
.bmt-stat span { font-size: 12px; color: var(--bmt-mute); font-weight: 500; }

/* ---------- Controlli ---------- */
.bmt .bmt-input,
.bmt input.bmt-input,
.bmt select.bmt-input,
.bmt textarea.bmt-input {
  display: block;
  width: 100%;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--bmt-ink);
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.bmt select.bmt-input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.bmt textarea.bmt-input { min-height: 96px; resize: vertical; line-height: 1.45; }
.bmt .bmt-input::placeholder { color: #a1a1a6; }
.bmt .bmt-input:focus { border-color: var(--bmt-red); box-shadow: 0 0 0 4px rgba(181, 18, 27, 0.14); }
.bmt select.bmt-input.bmt-input--sm { min-height: 36px; padding: 7px 30px 7px 12px; font-size: 13px; font-weight: 600; }

.bmt-field { display: block; margin: 0 0 14px; }
.bmt-field > span { display: block; font-size: 12px; font-weight: 600; color: var(--bmt-mute); margin: 0 0 6px 2px; }
.bmt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.bmt-grid2--tight { grid-column: span 1; gap: 0 10px; }
.bmt-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* ---------- Pulsanti ---------- */
.bmt .bmt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0; padding: 11px 20px; min-height: 44px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: 980px; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s var(--bmt-ease), opacity 0.2s;
}
.bmt .bmt-btn:active { transform: scale(0.97); }
.bmt .bmt-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(181, 18, 27, 0.2); }
.bmt .bmt-btn--primary { background: var(--bmt-red); color: #fff !important; }
.bmt .bmt-btn--primary:hover { background: var(--bmt-red-d); box-shadow: 0 6px 18px rgba(181, 18, 27, 0.28); }
.bmt .bmt-btn--ghost { background: transparent; color: var(--bmt-red) !important; border-color: rgba(181, 18, 27, 0.35); }
.bmt .bmt-btn--ghost:hover { background: var(--bmt-red-soft); }
.bmt .bmt-btn--soft { background: #fff; color: var(--bmt-ink) !important; border-color: var(--bmt-line); }
.bmt .bmt-btn--soft:hover { background: #fafafc; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07); }
.bmt .bmt-btn--green { background: var(--bmt-green); color: #fff !important; }
.bmt .bmt-btn--green:hover { background: #197332; }
.bmt .bmt-btn--disabled, .bmt .bmt-btn:disabled { background: #e8e8ed; color: #8e8e93 !important; cursor: not-allowed; box-shadow: none; }
.bmt .bmt-btn--sm { min-height: 34px; padding: 7px 14px; font-size: 13px; }
.bmt .bmt-btn--block { display: flex; width: 100%; }
.bmt .bmt-link { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--bmt-red); background: none; border: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.bmt .bmt-link:hover { text-decoration: underline; }
.bmt .bmt-chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.25s var(--bmt-ease); }
.bmt [aria-expanded="true"] .bmt-chev { transform: rotate(-135deg) translateY(-2px); }

/* ---------- Filtri ---------- */
.bmt-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.bmt-toolbar--staff { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; align-items: center; margin-bottom: 20px; }
.bmt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bmt .bmt-chip {
  display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 8px 15px; min-height: 36px;
  font: inherit; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--bmt-ink);
  background: #fff; border: 1px solid var(--bmt-line); border-radius: 980px; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--bmt-ease), box-shadow 0.2s;
}
.bmt .bmt-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.bmt .bmt-chip.is-active { background: var(--bmt-ink); border-color: var(--bmt-ink); color: #fff; }
.bmt .bmt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bmt-red); }
.bmt .bmt-dot--bbsof { background: var(--bmt-blue); }
.bmt .bmt-dot--azienda { background: #e08a00; }
.bmt .bmt-dot--erasmus { background: var(--bmt-green); }
.bmt-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1fr); gap: 10px; flex: 1 1 380px; max-width: 640px; }
.bmt-count { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 14px; font-size: 13px; font-weight: 500; color: var(--bmt-mute); }

/* ---------- Elenco tesi ---------- */
.bmt-list { display: flex; flex-direction: column; gap: 12px; }
.bmt-row {
  display: grid; grid-template-columns: 148px minmax(0, 1fr) minmax(130px, 190px) minmax(150px, 190px) 132px; align-items: center; gap: 18px;
  background: var(--bmt-card); border-radius: 22px; padding: 20px 24px; box-shadow: var(--bmt-shadow);
  transition: box-shadow 0.25s var(--bmt-ease), transform 0.25s var(--bmt-ease);
}
.bmt-row:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 14px 34px rgba(0, 0, 0, 0.09); transform: translateY(-1px); }
.bmt .bmt-row-title { font-family: inherit; text-transform: none; font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--bmt-ink); margin: 0 0 4px; }
.bmt .bmt-row-abs { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--bmt-mute); }
.bmt-row-tutor { font-size: 13px; color: var(--bmt-mute); font-weight: 500; }
.bmt-ico { margin-right: 2px; }

.bmt .bmt-tag { display: inline-block; max-width: 100%; padding: 5px 11px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 980px; background: var(--bmt-red-soft); color: var(--bmt-red); }
.bmt .bmt-tag--bbsof { background: var(--bmt-blue-soft); color: #0058b3; }
.bmt .bmt-tag--azienda { background: var(--bmt-orange-soft); color: var(--bmt-orange); }
.bmt .bmt-tag--erasmus { background: var(--bmt-green-soft); color: var(--bmt-green); }

.bmt .bmt-status { display: inline-block; padding: 6px 13px; font-size: 12px; font-weight: 600; line-height: 1.25; border-radius: 980px; }
.bmt .bmt-status--ok { background: var(--bmt-green-soft); color: var(--bmt-green); }
.bmt .bmt-status--busy { background: var(--bmt-red-soft); color: var(--bmt-red); }

.bmt-drawer { grid-column: 1 / -1; background: var(--bmt-bg); border-radius: 16px; padding: 18px 20px; font-size: 14px; animation: bmt-fade 0.28s var(--bmt-ease); }
.bmt-drawer-block + .bmt-drawer-block { margin-top: 12px; }
.bmt-drawer-block strong { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--bmt-mute); margin-bottom: 4px; }
.bmt .bmt-prose p { margin: 0 0 8px; }
.bmt-drawer-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.bmt-empty { text-align: center; padding: 44px 20px; background: var(--bmt-card); border-radius: 22px; color: var(--bmt-faint); font-size: 14px; }
@keyframes bmt-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Finestre (modal) ---------- */
.bmt-overlay {
  position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 20, 24, 0.42); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  overflow-y: auto; animation: bmt-fade-in 0.25s ease;
}
@keyframes bmt-fade-in { from { opacity: 0; } to { opacity: 1; } }
.bmt-sheet {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; margin: auto;
  background: rgba(255, 255, 255, 0.96); border-radius: 28px; padding: 34px; box-shadow: var(--bmt-shadow-lg);
  animation: bmt-pop 0.35s var(--bmt-ease);
}
.bmt-sheet--wide { max-width: 760px; }
@keyframes bmt-pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.bmt .bmt-x {
  position: absolute; top: 18px; right: 18px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; padding: 0;
  font-size: 20px; line-height: 1; color: var(--bmt-mute); background: #ececf0; border: 0; border-radius: 50%; cursor: pointer; transition: background-color 0.2s;
}
.bmt .bmt-x:hover { background: #dcdce2; }
.bmt .bmt-sheet-title { font-family: inherit; text-transform: none; font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; margin: 0 40px 14px 0; color: var(--bmt-ink); }
.bmt .bmt-sheet-topic { margin: -6px 40px 16px 0; font-size: 14px; font-weight: 600; color: var(--bmt-red); }
.bmt-note { margin: 0 0 18px; padding: 13px 16px; font-size: 13px; line-height: 1.5; color: #8a4b00; background: var(--bmt-orange-soft); border-radius: 14px; }
.bmt-box { background: var(--bmt-bg); border-radius: 18px; padding: 16px 16px 2px; margin-bottom: 14px; }
.bmt-sheet-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.bmt-sheet-links { display: flex; flex-wrap: wrap; gap: 8px; }

.bmt .bmt-fieldset { border: 0; background: var(--bmt-bg); border-radius: 18px; padding: 16px 16px 8px; margin: 0 0 16px; min-width: 0; }
.bmt-fieldset legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--bmt-ink); }
.bmt-fieldset legend + * { clear: both; }
.bmt .bmt-hint { font-size: 13px; color: var(--bmt-mute); margin: 0 0 12px; }
.bmt-cc { display: grid; gap: 8px; margin-bottom: 8px; }
.bmt .bmt-cc .bmt-check, .bmt .bmt-cc > div .bmt-check { margin: 0; }
.bmt .bmt-check {
  display: flex; align-items: flex-start; gap: 12px; margin: 0 0 8px; padding: 11px 14px; cursor: pointer;
  font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--bmt-ink); background: #fff; border: 1px solid var(--bmt-line); border-radius: 14px;
  transition: border-color 0.2s, background-color 0.2s;
}
.bmt .bmt-check:hover { border-color: rgba(181, 18, 27, 0.35); }
.bmt .bmt-check input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bmt-red); cursor: pointer; }
.bmt .bmt-check small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--bmt-faint); }
.bmt .bmt-check--consent { background: transparent; border: 0; padding: 4px 2px; font-size: 13px; font-weight: 400; color: var(--bmt-mute); }
.bmt .bmt-check--consent a { color: var(--bmt-red); font-weight: 600; }
.bmt .bmt-check--me { margin-bottom: 8px; }

.bmt-subject { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 12px 16px; background: var(--bmt-bg); border-radius: 14px; }
.bmt-subject span { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bmt-faint); }
.bmt-subject strong { font-size: 14px; font-weight: 600; word-break: break-word; }
.bmt .bmt-error { margin: 0 0 14px; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--bmt-red); background: var(--bmt-red-soft); border-radius: 14px; }

.bmt-done-ico { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 6px 0 18px; font-size: 30px; font-weight: 700; color: #fff; background: var(--bmt-green); border-radius: 50%; box-shadow: 0 10px 26px rgba(31, 138, 59, 0.3); }
.bmt .bmt-done-text { margin: 0 0 20px; color: var(--bmt-mute); font-size: 15px; line-height: 1.55; }
#bmt-view-done .bmt-btn { margin-top: 10px; }

/* ---------- Dashboard staff ---------- */
.bmt-who { display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
.bmt-who span { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bmt-faint); margin-left: 2px; }
.bmt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bmt-kpi { background: var(--bmt-card); border-radius: 20px; padding: 16px 20px; box-shadow: var(--bmt-shadow); }
.bmt-kpi span { display: block; font-size: 12px; font-weight: 600; color: var(--bmt-mute); }
.bmt-kpi strong { display: block; margin-top: 2px; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--bmt-red); }

.bmt-tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; background: #e3e3e8; border-radius: 14px; max-width: 100%; overflow-x: auto; }
.bmt .bmt-tab { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--bmt-mute); background: transparent; border: 0; border-radius: 11px; cursor: pointer; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.bmt .bmt-tab.is-active { color: var(--bmt-ink); background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.bmt .bmt-count-pill { min-width: 22px; padding: 1px 7px; font-size: 12px; font-weight: 700; text-align: center; color: var(--bmt-mute); background: rgba(0, 0, 0, 0.07); border-radius: 980px; }
.bmt .bmt-count-pill--alert { color: #fff; background: var(--bmt-red); }

.bmt-table-wrap { background: var(--bmt-card); border-radius: 22px; box-shadow: var(--bmt-shadow); overflow-x: auto; }
.bmt .bmt-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 13px; background: transparent; }
.bmt .bmt-table th { padding: 14px 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-align: left; color: var(--bmt-faint); background: #fafafc; border: 0; border-bottom: 1px solid var(--bmt-line); white-space: nowrap; }
.bmt .bmt-table td { padding: 15px 16px; vertical-align: top; color: var(--bmt-ink); background: transparent; border: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.bmt .bmt-table tbody tr:last-child td { border-bottom: 0; }
.bmt .bmt-table tbody tr:hover td { background: #fbfbfd; }
.bmt .bmt-table td strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.bmt .bmt-table td small { display: block; color: var(--bmt-mute); line-height: 1.5; }
.bmt .bmt-table td small b { font-weight: 600; color: var(--bmt-ink); }
.bmt .bmt-table small.bmt-blue { color: var(--bmt-blue); }
.bmt .bmt-table small.bmt-red { color: var(--bmt-red); }
.bmt-th-act, .bmt-td-act { text-align: right; white-space: nowrap; }
.bmt .bmt-td-act { display: table-cell; }
.bmt-td-act .bmt-btn, .bmt-td-act .bmt-inline { margin: 0 0 0 6px; }
.bmt-inline { display: inline-block; margin: 0; }
.bmt-td-prog { min-width: 150px; }
.bmt-bar { height: 7px; margin-top: 7px; overflow: hidden; background: #e8e8ed; border-radius: 980px; }
.bmt-bar-fill { height: 100%; background: linear-gradient(90deg, var(--bmt-red), #e0603f); border-radius: 980px; }
.bmt .bmt-badge { display: inline-block; margin: 4px 4px 0 0; padding: 3px 10px; font-size: 11px; font-weight: 700; line-height: 1.4; border-radius: 980px; }
.bmt .bmt-badge--blue { background: var(--bmt-blue-soft); color: #0058b3; }
.bmt .bmt-badge--orange { background: var(--bmt-orange-soft); color: var(--bmt-orange); }
.bmt .bmt-badge--green { background: var(--bmt-green-soft); color: var(--bmt-green); }
.bmt .bmt-badge--red { background: var(--bmt-red-soft); color: var(--bmt-red); }
.bmt .bmt-empty-msg { padding: 36px 16px; text-align: center; font-size: 14px; color: var(--bmt-faint); }

.bmt-toast { margin: 0 0 18px; padding: 13px 18px; font-size: 14px; font-weight: 600; border-radius: 16px; animation: bmt-fade 0.3s var(--bmt-ease); }
.bmt-toast--ok { color: var(--bmt-green); background: var(--bmt-green-soft); }
.bmt-toast--err { color: var(--bmt-red); background: var(--bmt-red-soft); }

.bmt .bmt-dl { display: grid; grid-template-columns: 150px 1fr; gap: 0; margin: 0 0 16px; background: var(--bmt-bg); border-radius: 18px; overflow: hidden; }
.bmt .bmt-dl dt, .bmt .bmt-dl dd { margin: 0; padding: 11px 16px; font-size: 13px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.bmt .bmt-dl dt { font-weight: 600; color: var(--bmt-mute); }
.bmt .bmt-dl dd { color: var(--bmt-ink); white-space: pre-wrap; word-break: break-word; }
.bmt .bmt-dl dt:last-of-type, .bmt .bmt-dl dd:last-of-type { border-bottom: 0; }

/* ---------- Accesso staff ---------- */
.bmt-login-wrap { display: flex; align-items: center; justify-content: center; min-height: 520px; background: radial-gradient(circle at 20% 0%, #ffffff, var(--bmt-bg) 70%); }
.bmt-login { width: 100%; max-width: 400px; padding: 42px 34px 34px; text-align: center; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--bmt-line); border-radius: 28px; box-shadow: var(--bmt-shadow-lg); }
.bmt-login-ico { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; margin: 0 auto 18px; font-size: 30px; background: var(--bmt-red-soft); border-radius: 50%; }
.bmt .bmt-login-title { font-family: inherit; text-transform: none; color: var(--bmt-ink); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.bmt .bmt-login-sub { margin-bottom: 24px; font-size: 14px; color: var(--bmt-mute); line-height: 1.5; }
.bmt .bmt-login-foot { margin-top: 16px; font-size: 13px; }
.bmt .bmt-login-foot a { color: var(--bmt-red); font-weight: 600; }
.bmt-login form { text-align: left; }
.bmt-login form p { margin: 0 0 14px; }
.bmt-login label { display: block; margin: 0 0 6px 2px; font-size: 12px; font-weight: 600; color: var(--bmt-mute); }
.bmt-login input[type="text"], .bmt-login input[type="password"] {
  display: block; width: 100%; min-height: 46px; margin: 0; padding: 12px 15px; font: inherit; font-size: 15px; color: var(--bmt-ink); background: #fff; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 13px; box-shadow: none; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bmt-login input[type="text"]:focus, .bmt-login input[type="password"]:focus { border-color: var(--bmt-red); box-shadow: 0 0 0 4px rgba(181, 18, 27, 0.14); }
.bmt-login .login-remember label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--bmt-mute); }
.bmt-login .login-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--bmt-red); }
.bmt-login input[type="submit"] {
  display: block; width: 100%; min-height: 48px; margin: 6px 0 0; padding: 13px; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #fff; background: var(--bmt-red); border: 0; border-radius: 980px; cursor: pointer; box-shadow: 0 6px 18px rgba(181, 18, 27, 0.28);
  transition: background-color 0.2s, transform 0.2s var(--bmt-ease);
}
.bmt-login input[type="submit"]:hover { background: var(--bmt-red-d); }
.bmt .bmt-pw-error { margin: 0 0 14px; padding: 11px 15px; font-size: 13px; font-weight: 600; color: var(--bmt-red); background: var(--bmt-red-soft); border-radius: 13px; text-align: left; }
.bmt-login input[type="password"]::placeholder { color: #a1a1a6; }
.bmt-login input[type="submit"]:active { transform: scale(0.98); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .bmt-row { grid-template-columns: 140px minmax(0, 1fr) 150px 120px; }
  .bmt-row-tutor { display: none; }
  .bmt-toolbar--staff { grid-template-columns: 1fr 1fr 1fr; }
  .bmt-toolbar--staff #bmt-sq { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .bmt { padding: 20px 16px; border-radius: 22px; }
  .bmt .bmt-title { font-size: 28px; }
  .bmt-row { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
  .bmt-row-tutor { display: block; }
  .bmt-row-act .bmt-btn { width: 100%; }
  .bmt-filters { grid-template-columns: 1fr; max-width: none; flex-basis: 100%; }
  .bmt-grid2 { grid-template-columns: 1fr; }
  .bmt-toolbar--staff { grid-template-columns: 1fr; }
  .bmt-sheet { padding: 26px 20px; border-radius: 24px; }
  .bmt .bmt-dl { grid-template-columns: 1fr; }
  .bmt .bmt-dl dt { padding-bottom: 0; border-bottom: 0; }
  .bmt-login { padding: 34px 22px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .bmt *, .bmt *::before, .bmt *::after { animation: none !important; transition: none !important; }
}

/* Contenitore usato per spostare le finestre nel <body> senza sfondo né margini */
.bmt.bmt-host { background: none; padding: 0; margin: 0; border-radius: 0; }

/* Tabelle staff: menu stato leggibile e intestazione "Azioni" allineata ai pulsanti */
.bmt .bmt-inline select.bmt-input { width: auto; min-width: 124px; }
.bmt .bmt-table th.bmt-th-act, .bmt .bmt-table td.bmt-td-act { text-align: right; }

/* attività in laboratorio (scheda tesista) */
.bmt .bmt-act { margin: 4px 0 14px; padding: 12px 16px; background: var(--bmt-bg); border-radius: 16px; }
.bmt .bmt-act-h { margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bmt-mute); }
.bmt .bmt-act-l { margin: 0; padding: 0 0 0 18px; font-size: 13px; color: var(--bmt-ink); }
.bmt .bmt-act-l li { margin: 2px 0; }
.bmt .bmt-mat-l li { word-break: break-word; }
