/* =========================
   VARIABILI BASE
   ========================= */
:root {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --border: #d5dde7;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --accent: #2563eb;
}

/* =========================
   RESET / BASE
   ========================= */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--text-main);
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    padding: 14px;
  }
}

/* =========================
   CONTAINER BASE (universale)
   ========================= */
.bbdb-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0px;
}

@media (max-width: 768px) {
  .bbdb-container {
    padding: 0px;
  }
}

/* =========================
   WRAPPER CENTRATO (opzionale)
   ========================= */
.bbdb-page {
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================
   HEADER + LOGO
   ========================= */
.bb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  background: #ffffff;
  padding: 14px 24px 18px;
  z-index: 2000;

  border-bottom: 1px solid rgba(0, 0, 0, .08);
  transition: box-shadow .18s ease;
}

.bb-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bb-header-center {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
}

.bb-header-right {
  display: flex;
  align-items: center;
}

.bb-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.bbdb-app-footer {
  margin-top: 24px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bbdb-app-footer-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.bbdb-app-footer-left img {
  height: 48px;
  width: auto;
  display: block;
}

.bbdb-app-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  color: #475569;
  font-size: 0.85rem;
}

.bbdb-app-footer-title {
  font-weight: 600;
  color: #0f172a;
}

.bbdb-app-footer-version {
  color: #64748b;
}

@media (max-width: 700px) {
  .bbdb-app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .bbdb-app-footer-right {
    align-items: flex-start;
    text-align: left;
  }
}

.bb-header-titles h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: .08em;
  white-space: nowrap;
}

.subtitle {
  font-size: .85rem;
  color: var(--text-muted);
}

/* spazio sotto header fisso */
.bb-header-spacer {
  height: 70px;
}

/* =========================
   HAMBURGER BUTTON
   ========================= */
.bb-menu-toggle {
  width: 40px;
  height: 40px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1.1rem;
}

/* =========================
   MENU HAMBURGER
   ========================= */
.bb-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.10);
  z-index: 2500;
}

body.bb-menu-open .bb-menu-backdrop {
  display: block;
}

.bb-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background: #ffffff;
  padding: 20px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
  z-index: 3000;

  flex-direction: column;
  gap: 16px;
}

.bbdb-menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.bb-menu-open .bb-menu {
  display: flex;
}

.bb-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
}

.bbdb-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.bbdb-menu-desc {
  display: block;
  font-size: 12px;
  opacity: .75;
  margin-left: 26px;
}

.bbdb-menu-sep {
  border: none;
  margin: 6px 0;
}

/* =========================
   MENU – TOP BUTTON BAR
   ========================= */
.bb-menu-top {
  display: flex;
  gap: 8px;
}

.bb-menu-top .bbdb-btn {
  padding: 10px;
}

.bbdb-menu-user {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  padding-top: 6px;
}

.bbdb-menu-user--spaced {
  margin-top: 10px;
}

.bbdb-admin-select-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bbdb-admin-table .bbdb-card-title {
  margin-bottom: 0;
}

.bbdb-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bbdb-admin-msg {
  font-size: 12px;
  color: #1d4ed8;
  font-weight: 600;
}

.bbdb-admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.bbdb-admin-filter .bbdb-input {
  flex: 1 1 240px;
}

.bbdb-table-admin {
  width: 100%;
  min-width: 0;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
}

.bbdb-admin-table .bb-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  display: block;
}

.bbdb-admin-table {
  overflow: hidden;
}

.bbdb-table-admin th,
.bbdb-table-admin td {
  min-width: 12ch;
  max-width: 50ch;
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

.bbdb-table-admin td .bbdb-input,
.bbdb-table-admin td textarea,
.bbdb-table-admin td select {
  max-width: 100%;
  margin-bottom: 0;
}

.bbdb-table-admin td textarea.bbdb-admin-input,
.bbdb-admin-new-row textarea.bbdb-input {
  min-height: 54px;
  resize: vertical;
  white-space: pre-wrap;
}

.bbdb-table-admin th.col-actions,
.bbdb-table-admin td.col-actions {
  width: 72px;
  min-width: 72px;
  white-space: nowrap;
  text-align: right;
}

.bbdb-table-admin th.col-id,
.bbdb-table-admin td.col-id {
  width: 72px;
  min-width: 72px;
  white-space: nowrap;
}

.bbdb-table-admin thead th {
  padding: 10px 12px;
  font-weight: 800;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.bbdb-table-admin thead th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bbdb-table-admin thead th a:hover {
  text-decoration: underline;
}

.bbdb-table-admin td {
  padding: 10px 12px;
  vertical-align: top;
}

.bbdb-admin-input {
  width: 100%;
  min-width: 120px;
}

.bbdb-table-admin .bbdb-admin-input {
  min-width: 0;
}

.bbdb-table-corsi-descr .bbdb-cd-hide-col {
  display: none;
}

.bbdb-table-corsi-descr .bbdb-cd-title-row td {
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  padding-top: 8px;
  padding-bottom: 8px;
}

.bbdb-cd-title-wrap {
  display: grid;
  gap: 6px;
}

.bbdb-template-new-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
  align-items: stretch;
  min-height: 0;
  height: auto;
}

.bbdb-template-code {
  min-height: 0;
  height: auto;
  max-height: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

#pe-html.bbdb-input {
  height: auto !important;
  min-height: calc(30 * 1.35em) !important;
  line-height: 1.35;
  margin-bottom: 0 !important;
  resize: vertical;
}

#pe-css-editor.bbdb-input {
  height: auto !important;
  min-height: calc(16 * 1.35em) !important;
  line-height: 1.35;
  margin-bottom: 0 !important;
  resize: vertical;
}

.bbdb-template-preview {
  width: 100%;
  height: min(66dvh, 760px);
  min-height: 520px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.bbdb-template-editor-wrap {
  margin-bottom: 0 !important;
}

.bbdb-template-editor-left,
.bbdb-template-editor-right {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
}

.bbdb-template-editor-left .bbdb-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  min-height: 0;
}

.bbdb-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bbdb-search-row .bbdb-input {
  flex: 1 1 auto;
  margin-bottom: 0 !important;
}

.bbdb-template-editor-right .bbdb-card-title {
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .bbdb-template-new-grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }
  .bbdb-template-editor-left .bbdb-stack {
    grid-template-rows: auto auto;
    height: auto;
  }
  .bbdb-template-preview {
    min-height: 420px;
  }
}

.bbdb-admin-readonly {
  display: inline-block;
  font-size: 0.9rem;
  color: #475569;
}

.bbdb-admin-utente {
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.bbdb-admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.bbdb-admin-new {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #f8fafc;
}

.bbdb-admin-new-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.bbdb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  flex: 1 1 180px;
}

.bbdb-field-small {
  flex: 0 0 120px;
}

.bbdb-field-actions {
  flex: 0 0 100%;
  display: flex;
  justify-content: flex-end;
}

.bbdb-admin-roles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.bbdb-inline-form {
  display: inline-flex;
}

.bb-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (min-width: 900px) {
  .bb-header-center {
    display: flex;
  }
}

.bbdb-menu-bottom {
  margin-top: auto;
  padding: 12px 0 4px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.bb-menu {
  flex-direction: column;
}


/* =========================
   CARD BASE
   ========================= */
.bbdb-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.bbdb-card-docenti {
  background: #f3f8ff;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.bbdb-card-partecipanti {
  background: #f3fbf5;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.bbdb-anagrafica-label {
  font-weight: 700;
}

.bbdb-card-warning {
  background: rgba(234, 179, 8, 0.08);
}

.bbdb-card-danger {
  background: #334155;
  color: #f8fafc;
}

.bbdb-card-pending {
  background: rgba(249, 115, 22, 0.12);
}

/* =========================
   STACK BASE
   ========================= */
.bbdb-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* =========================
   FORM ELEMENTS
   ========================= */
.bbdb-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 1rem;
  margin-bottom: 12px;
}
.bbdb-input.bbdb-input-static {
  display: flex;
  align-items: center;
  background: #f8fafc;
}

.bbdb-textarea-auto {
  height: 42px;
  min-height: 42px;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
}

/* Safari fix: uniforma select agli input */
select.bbdb-input {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.bbdb-input,
.bbdb-input select {
  height: 42px;
  line-height: 1.2;
}

.bbdb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
  min-height: 36px;
}

/* =========================
   BUTTONS
   ========================= */
.bbdb-btn {
  --bbdb-btn-padding: 6px 10px;
  --bbdb-btn-font-size: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--bbdb-btn-padding);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  -webkit-text-fill-color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--bbdb-btn-font-size);
  line-height: 1;
}

.bbdb-btn-primary {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
}

.bbdb-btn-add {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.35);
}

.bbdb-btn-edit {
  background: rgba(140, 200, 255, 0.25);
  border-color: rgba(80, 140, 220, 0.35);
}

.bbdb-btn-danger {
  border-color: rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .08);
}

.bbdb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.bbdb-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}

/* Helpers: rendi alcuni pulsanti a larghezza piena quando necessario */
.bbdb-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.bbdb-edit-actions .bbdb-btn {
  width: auto;
}

.bbdb-home-head {
  margin-top: 14px;
}

.bbdb-home-head form {
  width: 240px;
}

/* =========================
   ERROR BOX
   ========================= */
.bbdb-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 0, 0, .10);
  border: 1px solid rgba(255, 0, 0, .25);
  margin-bottom: 14px;
}

.bbdb-home-section {
  width: 100%;
  max-width: none;
  margin: 18px 0 8px;
}

.bbdb-home-section-title {
  font-weight: 800;
  letter-spacing: .02em;
  margin: 0 0 10px;
  color: #1f3a5f;
}

.bbdb-home-collapsible > summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

.bbdb-home-collapsible > summary::-webkit-details-marker {
  display: none;
}

.bbdb-home-collapsible > summary::marker {
  content: "";
}

.bbdb-home-collapsible-head {
  margin-bottom: 8px;
}

.bbdb-home-collapsible-head .bbdb-home-section-title {
  margin: 0;
}

.bbdb-home-collapsible-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}

.bbdb-home-collapsible-meta i {
  transition: transform .18s ease;
}

.bbdb-home-collapsible[open] .bbdb-home-collapsible-meta i {
  transform: rotate(180deg);
}

.bbdb-home-collapsible > .bb-table-scroll {
  margin-top: 2px;
}

/* =========================================================
   HOME – GRID + CARD
   ========================================================= */

.bbdb-grid {
  display: grid;
  gap: 12px;
}

.bbdb-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bbdb-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================
   GRID APP PRINCIPALI (BIG)
   max 4 per riga
   ========================= */
.bbdb-grid-main {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* Tablet */
@media (max-width: 900px) {
  .bbdb-grid-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 800px) {
  .bbdb-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .bbdb-grid-main {
    grid-template-columns: 1fr;
  }
}

/* =========================
   GRID UTILITÀ (SMALL)
   max 3 per riga
   ========================= */
.bbdb-grid-small {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Tablet */
@media (max-width: 900px) {
  .bbdb-grid-small {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 700px) {
  .bbdb-grid-small {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CARD BASE (LINK)
   ========================================================= */
.bbdb-card-link {
  display: block;
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  /* 🔥 FIX */
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  transition: transform .15s ease, box-shadow .15s ease;
}

.bbdb-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

/* =========================================================
   APP PRINCIPALI (BIG)
   ========================================================= */
.bbdb-card-big {
  text-align: center;
  padding: 18px 16px;
  min-height: 240px;
  /* uniforma l’altezza */
}

.bbdb-card-big i {
  font-size: 82px;
  margin: 12px 0 14px;
  display: inline-block;
  color: #1f3a5f;
}

.bbdb-card-big h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: .01em;
  color: #1f3a5f;
}

.bbdb-card-big p {
  margin: 0;
  color: #6b7280;
  font-size: .92rem;
}

/* =========================================================
   APP UTILITÀ (SMALL)
   ========================================================= */
.bbdb-card-small {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.bbdb-card-small .bbdb-ico {
  width: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
}

.bbdb-card-small .bbdb-ico i {
  font-size: 16px;
}

.bbdb-card-small .bbdb-txt {
  min-width: 0;
  /* evita overflow testo */
}

.bbdb-card-small .bbdb-txt h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 900;
}

.bbdb-card-small .bbdb-txt p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: .85rem;
}

/* =========================
   TOAST
   ========================= */
.bbdb-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 220px;
  max-width: 90vw;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  display: none;
  font-weight: 600;
}

.bbdb-toast.is-ok {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(220, 252, 231, 0.95);
}

.bbdb-toast.is-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 226, 226, 0.95);
}

/* =========================
   Form base (login, edit, gestione)
   ========================= */
.bbdb-input,
.bbdb-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  font-size: 1rem;
}

.bbdb-textarea {
  resize: vertical;
  min-height: 42px;
}

.bbdb-radio,
.bbdb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  min-height: 36px;
}

.bbdb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
  color: #475569;
}

.bbdb-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bbdb-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 0, 0, .10);
  border: 1px solid rgba(255, 0, 0, .25);
}

.bbdb-input-error {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(239, 68, 68, 0.08);
}

.bbdb-import-table td {
  vertical-align: top;
}

.bbdb-import-table {
  table-layout: auto;
  min-width: 1400px;
}

.bbdb-import-table thead th {
  white-space: normal;
}

.bbdb-import-table td .bbdb-input {
  width: 100%;
  min-width: 140px;
}

.bbdb-import-table .col-text {
  white-space: normal;
}

.bbdb-import-options {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #475569;
}

.bbdb-import-static {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(148, 163, 184, 0.08);
  display: flex;
  align-items: center;
}

.bbdb-muted {
  color: #94a3b8;
}

.bbdb-meta {
  font-size: 0.85em;
  color: #94a3b8;
}

.bbdb-import-cf {
  min-width: 18ch;
}

.bbdb-dd {
  position: relative;
}

.bbdb-dd-btn {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.bbdb-dd-label {
  display: block;
  text-align: left;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bbdb-dd-menu {
  position: absolute;
  z-index: 1200;
  left: 0;
  top: calc(100% + 6px);
  min-width: max-content;
  max-width: min(520px, 90vw);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: none;
}

.bbdb-dd.is-right .bbdb-dd-menu {
  right: 0;
  left: auto;
}

.bbdb-dd.is-open .bbdb-dd-menu {
  display: block;
}

.bbdb-card-docenti .bbdb-dd.is-open,
.bbdb-card-partecipanti .bbdb-dd.is-open {
  z-index: 6000;
}

.bbdb-dd-option,
.bbdb-dd-check {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.bbdb-dd-option:hover,
.bbdb-dd-check:hover {
  background: rgba(15, 23, 42, 0.06);
}

.bbdb-dd-check input {
  margin: 0;
}

.bbdb-dd-option-icon {
  color: #64748b;
  font-size: 0.9rem;
}

.bbdb-dd-multi .bbdb-dd-menu {
  max-height: 220px;
  overflow-y: auto;
}

.bbdb-import-error {
  margin-top: 4px;
  color: #dc2626;
  font-size: 0.8rem;
}

.bbdb-import-error-silent {
  display: none;
}

.bbdb-dd.has-error .bbdb-dd-btn {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(239, 68, 68, 0.08);
}

/* =========================
   LOGIN CENTERED
   ========================= */
.bbdb-login-wrap {
  min-height: calc(100vh - 70px);
  /* header spacer */
  display: flex;
  align-items: center;
  justify-content: center;
}

.bbdb-login-card {
  width: 100%;
  max-width: 420px;
}

/* =========================
   TABLE SCROLL WRAPPER
   ========================= */
.bb-table-scroll {
  width: 100%;
  overflow-x: auto;
  /* scroll orizzontale */
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  /* swipe fluido iOS */
}

/* =========================================================
   TABLE – CORSI (LAYOUT DEFINITIVO)
   ========================================================= */

.bbdb-table {
  width: 100%;
  min-width: 980px;
  /* 🔥 CHIAVE */
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
}

/* HEADER */
.bbdb-table thead th {
  padding: 10px 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.bbdb-table thead th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bbdb-table thead th a:hover {
  text-decoration: underline;
}

/* CELLE */
.bbdb-table td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: none;
}

.bbdb-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.bbdb-table-logs {
  min-width: 1700px;
}

.bbdb-table-logs th.col-id,
.bbdb-table-logs td.col-id {
  width: 80px;
}

.bbdb-table-logs th.col-created,
.bbdb-table-logs td.col-created {
  width: 170px;
}

.bbdb-table-logs th.col-user,
.bbdb-table-logs td.col-user {
  width: 240px;
}

.bbdb-table-logs th.col-category,
.bbdb-table-logs td.col-category {
  width: 120px;
}

.bbdb-table-logs th.col-level,
.bbdb-table-logs td.col-level {
  width: 90px;
}

.bbdb-table-logs th.col-context,
.bbdb-table-logs td.col-context {
  width: 150px;
}

.bbdb-table-logs th.col-message,
.bbdb-table-logs td.col-message {
  width: 180px;
}

.bbdb-table-logs td.col-message {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bbdb-table-logs th.col-data,
.bbdb-table-logs td.col-data {
  width: 620px;
}

.bbdb-table-logs .bbdb-filter-row th {
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
}

.bbdb-table-logs .bbdb-filter-row .bbdb-input {
  width: 100%;
  min-width: 80px;
  height: 34px;
}

.bbdb-table-logs .bbdb-filter-actions {
  white-space: nowrap;
}

.bbdb-table-logs .bbdb-filter-actions .bbdb-btn {
  margin-right: 6px;
}

.bbdb-table-logs td.col-data {
  font-size: .85em;
  color: #4b5563;
}

.bbdb-log-data-clamp {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  max-height: 2.7em;
  cursor: help;
}

.bbdb-table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.bbdb-table-page-info {
  font-size: 12px;
  color: #64748b;
}

.bbdb-row-danger td {
  background: #334155;
  color: #f8fafc;
}

.bbdb-row-warning td {
  background: rgba(234, 179, 8, 0.15);
}

.bbdb-row-pending td {
  background: rgba(249, 115, 22, 0.18);
}

.bbdb-cell-danger {
  background: rgba(239, 68, 68, 0.18);
}

/* === COLONNE STRETTE === */

/* Date (Inizio / Fine) */
.bbdb-table td.col-date {
  width: 90px;
  min-width: 90px;
  white-space: nowrap;
  font-size: .85rem;
}

.bbdb-table th.col-date {
  width: 90px;
  min-width: 90px;
  white-space: nowrap;
  font-size: inherit;
  /* 🔥 uguale alle altre intestazioni */
}

.bbdb-table-bugs {
  table-layout: fixed;
}

.bbdb-table-bugs td,
.bbdb-table-bugs th {
  vertical-align: top;
}

.bbdb-table-bugs th.col-date,
.bbdb-table-bugs td.col-date {
  width: 120px;
  min-width: 120px;
  white-space: nowrap;
}

.bbdb-table-bugs th.col-status,
.bbdb-table-bugs td.col-status {
  width: 100px;
  min-width: 100px;
  white-space: nowrap;
}

.bbdb-table-bugs th.col-actions,
.bbdb-table-bugs td.col-actions {
  width: 60px;
  min-width: 60px;
  white-space: nowrap;
}

.bbdb-table-bugs th.col-page,
.bbdb-table-bugs td.col-page {
  width: 30%;
  white-space: normal;
  word-break: break-word;
}

.bbdb-table-bugs th.col-desc,
.bbdb-table-bugs td.col-desc {
  width: 70%;
  white-space: normal;
  word-break: break-word;
}

/* ECM */
.bbdb-table .col-ecm {
  width: 80px;
  min-width: 80px;
  text-align: center;
  vertical-align: top;
}

.bbdb-table .col-icagenda {
  width: 64px;
  min-width: 64px;
  text-align: center;
  vertical-align: top;
}

.bbdb-table .col-pref {
  width: 64px;
  min-width: 64px;
  text-align: center;
  vertical-align: top;
}

.bbdb-pref-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}

.bbdb-pref-link i {
  font-size: 16px;
}

.bbdb-icagenda-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Partecipanti */
.bbdb-table .col-part {
  width: 64px;
  min-width: 64px;
  text-align: center;
  vertical-align: top;
}

/* Azioni */
.bbdb-table .col-actions {
  width: 80px;
  min-width: 80px;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
  padding-left: 16px;
  /* respiro visivo da ECM */
}

.bbdb-table-allegati {
  width: 100%;
  table-layout: fixed;
  min-width: 980px;
}

.bbdb-table-allegati.has-disciplina {
  min-width: 1100px;
}

.bbdb-table-allegati .col-date {
  width: 110px;
  min-width: 110px;
  white-space: nowrap;
}

.bbdb-table-allegati .col-actions {
  width: 90px;
  min-width: 90px;
}

.bbdb-table-allegati:not(.has-disciplina) th:nth-child(1),
.bbdb-table-allegati:not(.has-disciplina) td:nth-child(1) {
  width: 10ch;
}

.bbdb-table-allegati:not(.has-disciplina) th:nth-child(2),
.bbdb-table-allegati:not(.has-disciplina) td:nth-child(2) {
  width: 16ch;
}

.bbdb-table-allegati:not(.has-disciplina) th:nth-child(3),
.bbdb-table-allegati:not(.has-disciplina) td:nth-child(3) {
  width: 40%;
}

.bbdb-table-allegati:not(.has-disciplina) th:nth-child(4),
.bbdb-table-allegati:not(.has-disciplina) td:nth-child(4) {
  width: 30%;
}

.bbdb-table-allegati.has-disciplina th:nth-child(1),
.bbdb-table-allegati.has-disciplina td:nth-child(1) {
  width: 10ch;
}

.bbdb-table-allegati.has-disciplina th:nth-child(2),
.bbdb-table-allegati.has-disciplina td:nth-child(2) {
  width: 16ch;
}

.bbdb-table-allegati.has-disciplina th:nth-child(3),
.bbdb-table-allegati.has-disciplina td:nth-child(3) {
  width: 40%;
}

.bbdb-table-allegati.has-disciplina th:nth-child(4),
.bbdb-table-allegati.has-disciplina td:nth-child(4) {
  width: 30%;
}

.bbdb-table-allegati.has-disciplina th:nth-child(5),
.bbdb-table-allegati.has-disciplina td:nth-child(5) {
  width: 30%;
}

/* === COLONNE ELASTICHE === */

/* Corso – dominante */
.bbdb-table .col-text {
  white-space: normal;
}

/* Corso più largo (≈1.5×) */
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) th.col-text:nth-child(3),
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) td.col-text:nth-child(3) {
  width: 50%;
}

/* Sede evento */
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) th.col-text:nth-child(4),
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) td.col-text:nth-child(4) {
  width: 25%;
}

/* Direttore */
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) th.col-text:nth-child(5),
.bbdb-table:not(.bbdb-table-studenti):not(.bbdb-table-valutazioni) td.col-text:nth-child(5) {
  width: 25%;
}

/* azioni inline */
.bbdb-actions-inline {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  min-height: 100%;
  /* 🔥 OBBLIGATORIO */
}

/* =========================
   ICON BUTTONS (table actions)
   ========================= */
.bbdb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .9);
  color: var(--text-main);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}

.bbdb-icon-btn.bbdb-icon-btn-xs {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.bbdb-icon-btn.bbdb-icon-btn-xs i {
  font-size: 0.85em;
}

.bbdb-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}

.bbdb-table td.col-actions {
  vertical-align: top;
  white-space: nowrap;
  padding: 10px 12px;
}

/* =========================
   IMPORT PARTECIPANTI TABLE
   ========================= */
.bbdb-table.bbdb-import-table {
  table-layout: auto;
  min-width: 1600px;
}

.bbdb-table.bbdb-import-table th,
.bbdb-table.bbdb-import-table td {
  white-space: normal;
  vertical-align: top;
  font-size: 0.9rem;
}

.bbdb-table.bbdb-import-table th.col-text,
.bbdb-table.bbdb-import-table td.col-text {
  width: auto !important;
  min-width: 140px;
}

.bbdb-table.bbdb-import-table td .bbdb-input {
  width: 100%;
  min-width: 140px;
}

.bbdb-table.bbdb-import-table .bbdb-import-options {
  max-width: 320px;
}

.bbdb-import-row-ok td {
  background: rgba(16, 185, 129, 0.08);
}

.bbdb-import-row-warn td {
  background: rgba(245, 158, 11, 0.12);
}

.bbdb-import-row-error td {
  background: rgba(239, 68, 68, 0.12);
}

.bbdb-import-row-deleted {
  display: none;
}

.bbdb-import-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

.bbdb-import-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.bbdb-import-chip.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #0f766e;
}

.bbdb-import-chip.warn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.bbdb-import-chip.err {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #991b1b;
}

.bbdb-import-chip.info {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(0, 0, 0, 0.35);
  color: #313030;
}

.bbdb-import-error-list {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
  color: #dc2626;
}

.bbdb-import-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bbdb-import-tabs .bbdb-tab-btn.is-active {
  background: #e6f0ff;
  border-color: #9fc3ff;
  color: #1e40af;
}

.bbdb-modal-card-lg {
  max-width: 760px;
}

.bbdb-table-mail-jobs {
  min-width: 980px;
  table-layout: fixed;
}

.bbdb-table-mail-jobs .col-subject {
  width: 18%;
  max-width: 18%;
}

.bbdb-table-mail-jobs .col-body {
  width: 36%;
  max-width: 36%;
}

.bbdb-table-mail-jobs td.col-subject,
.bbdb-table-mail-jobs td.col-body {
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bbdb-mail-rec-modal {
  width: min(1280px, 96vw) !important;
  max-width: min(1280px, 96vw) !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bbdb-mail-rec-modal h3 {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.bbdb-mail-rec-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.bbdb-table-mail-recipients {
  width: 100%;
  table-layout: fixed;
}

.bbdb-table-mail-recipients .col-name {
  width: 34%;
}

.bbdb-table-mail-recipients .col-email {
  width: 46%;
}

.bbdb-table-mail-recipients .col-status {
  width: 20%;
}

.bbdb-table-mail-recipients td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bbdb-mail-rec-modal .bbdb-modal-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
}

@media (max-width: 900px) {
  .bbdb-mail-rec-wrap {
    overflow-x: auto;
  }

  .bbdb-table-mail-recipients {
    min-width: 760px;
  }
}

.bbdb-mail-editor {
  min-height: 220px;
  background: #fff;
  border-radius: 12px;
}

.bbdb-mail-editor .ql-container {
  border-radius: 12px;
}

.bbdb-import-textarea {
  min-height: 220px;
}

.bbdb-import-scroll {
  overflow-y: visible;
}

/* =========================
   FILTER CARD SPACING
   ========================= */
.bbdb-filters {
  margin-bottom: 14px;
}

/* =========================
   COLLAPSIBLE FILTERS
   ========================= */
.bbdb-filters-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
}

.bbdb-filters-head-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bbdb-filters-head i {
  opacity: .7;
}

.bbdb-filters-body {
  margin-top: 14px;
  display: none;
}

body.bbdb-filters-open .bbdb-filters-body {
  display: block;
}

/* =========================
   FILTRI – layout desktop
   ========================= */
@media (min-width: 900px) {

  .bbdb-filters .bbdb-input,
  .bbdb-filters select {
    width: auto;
    min-width: 180px;
  }

  .bbdb-filters input[type="date"] {
    min-width: 150px;
  }

  .bbdb-filters select {
    min-width: 220px;
  }
}

.bbdb-filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bbdb-filter-inline-label {
  font-weight: 600;
  color: #64748b;
  align-self: center;
}

.bbdb-filter-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

@media (min-width: 900px) {

  .bbdb-filters-row-1 input[type="date"] {
    width: 150px;
    /* misura reale della data */
    flex: 0 0 auto;
  }

  .bbdb-filters-row-1 select {
    flex: 1 1 auto;
    /* prende tutto il resto */
    min-width: 260px;
  }
}

@media (min-width: 900px) {

  /* Provincia: 2 lettere */
  .bbdb-filters-row-2 select[name="prov"] {
    width: 90px;
    flex: 0 0 auto;
  }

  /* Comune / Training / Direttore */
  .bbdb-filters-row-2 input,
  .bbdb-filters-row-2 select:not([name="prov"]) {
    flex: 1 1 0;
    min-width: 200px;
  }
}

.bbdb-autocomplete {
  position: absolute;
  z-index: 9000;
  min-width: 220px;
  max-width: 420px;
  width: max-content;
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  margin-top: 6px;
  overflow: hidden;
}

.bbdb-autocomplete-wrap {
  position: relative;
}

.bbdb-autocomplete div {
  padding: 8px 12px;
  cursor: pointer;
  color: #0f172a;
}

.bbdb-autocomplete div:hover {
  background: rgba(0, 0, 0, .05);
}

.bbdb-filters-row,
.bbdb-filters {
  position: relative;
}

.bbdb-filters-head.has-active-filters i {
  color: #dc2626;
  /* rosso elegante */
}

/* =========================
   SWITCH (ON / OFF)
   ========================= */
.bbdb-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.bbdb-switch input {
  display: none;
}

.bbdb-switch-ui {
  width: 42px;
  height: 22px;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  transition: background .2s ease;
}

.bbdb-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.bbdb-switch input:checked+.bbdb-switch-ui {
  background: #2563eb;
  /* stesso accent dei bottoni */
}

.bbdb-switch input:checked+.bbdb-switch-ui::after {
  transform: translateX(20px);
}

.bbdb-switch-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-main);
}

.bbdb-switch.bbdb-switch-vertical {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.bbdb-separator td {
  padding: 0;
  height: 1px;
  background: rgba(0, 0, 0, .08);
}

.bbdb-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
}

.bbdb-dot.is-green {
  background: #22c55e;
  border-color: #22c55e;
}

.bbdb-dot.is-red {
  background: #ef4444;
  border-color: #ef4444;
}

.bbdb-dot.is-yellow {
  background: #facc15;
  border-color: #facc15;
}

.bbdb-dot.is-black {
  background: #111827;
  border-color: #111827;
}

.bbdb-dot.is-purple {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.bbdb-dot.is-muted {
  background: #ffffff;
  border-color: #e5e7eb;
}

.bbdb-cert-status {
  display: inline;
  font-weight: 600;
}

.bbdb-cert-status.is-green {
  color: #22c55e;
}

.bbdb-cert-status.is-yellow {
  color: #facc15;
}

.bbdb-cert-status.is-black {
  color: #111827;
}

.bbdb-cert-status.is-purple {
  color: #8b5cf6;
}

.bbdb-cert-status.is-red {
  color: #ef4444;
}

.bbdb-anomalia-icon {
  color: #dc2626;
  margin-right: 6px;
}

.bbdb-table-studenti {
  table-layout: fixed;
  min-width: 1180px;
}

.bbdb-table-studenti th.col-cf,
.bbdb-table-studenti td.col-cf {
  width: 18ch;
  min-width: 18ch;
  white-space: nowrap;
}

.bbdb-table-studenti th.col-istr,
.bbdb-table-studenti td.col-istr {
  width: 60px;
  min-width: 60px;
  text-align: center;
}

.bbdb-table-studenti th.col-actions,
.bbdb-table-studenti td.col-actions {
  width: 92px;
  min-width: 92px;
}

.bbdb-table-studenti th.col-cognome,
.bbdb-table-studenti td.col-cognome,
.bbdb-table-studenti th.col-nome,
.bbdb-table-studenti td.col-nome,
.bbdb-table-studenti th.col-email,
.bbdb-table-studenti td.col-email,
.bbdb-table-studenti th.col-citta,
.bbdb-table-studenti td.col-citta,
.bbdb-table-studenti th.col-professione,
.bbdb-table-studenti td.col-professione {
  width: 20%;
  min-width: 16ch;
}

.bbdb-table-studenti td.col-email {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bbdb-table-studenti.has-cert th.col-cognome,
.bbdb-table-studenti.has-cert td.col-cognome,
.bbdb-table-studenti.has-cert th.col-nome,
.bbdb-table-studenti.has-cert td.col-nome,
.bbdb-table-studenti.has-cert th.col-email,
.bbdb-table-studenti.has-cert td.col-email,
.bbdb-table-studenti.has-cert th.col-citta,
.bbdb-table-studenti.has-cert td.col-citta,
.bbdb-table-studenti.has-cert th.col-professione,
.bbdb-table-studenti.has-cert td.col-professione,
.bbdb-table-studenti.has-cert th.col-cert,
.bbdb-table-studenti.has-cert td.col-cert {
  width: 16.66%;
  min-width: 14ch;
}

.bbdb-table-studenti.has-training-site th.col-cognome,
.bbdb-table-studenti.has-training-site td.col-cognome,
.bbdb-table-studenti.has-training-site th.col-nome,
.bbdb-table-studenti.has-training-site td.col-nome,
.bbdb-table-studenti.has-training-site th.col-citta,
.bbdb-table-studenti.has-training-site td.col-citta,
.bbdb-table-studenti.has-training-site th.col-training-site,
.bbdb-table-studenti.has-training-site td.col-training-site,
.bbdb-table-studenti.has-training-site th.col-professione,
.bbdb-table-studenti.has-training-site td.col-professione {
  width: 20%;
}

.bbdb-category-pills {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bbdb-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bbdb-detail-title {
  font-size: 1.4rem;
  font-weight: 800;
}

.bbdb-detail-dates {
  margin-top: 4px;
  font-weight: 700;
  color: #2563eb;
}

.bbdb-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.bbdb-kv-grid.is-2col {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

@media (max-width: 700px) {
  .bbdb-detail-head {
    flex-wrap: wrap;
  }

  .bbdb-detail-head .bbdb-actions-inline {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .bbdb-kv-grid.is-2col {
    grid-template-columns: 1fr;
  }
}

.bbdb-kv-item {
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 10px;
  background: #fafafa;
}

.bbdb-kv-label {
  font-size: .78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.bbdb-required-label {
  color: #7f1d1d;
}

.bbdb-required-note {
  color: #7f1d1d;
  font-size: .85rem;
}

.bbdb-kv-value {
  margin-top: 4px;
  font-weight: 600;
  color: var(--text-main);
}

.bbdb-detail-section {
  margin-top: 14px;
}

.bbdb-kv-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.bbdb-kv-item.is-compact {
  flex: 0 0 150px;
}

.bbdb-kv-compact.is-nowrap {
  flex-wrap: nowrap;
}

.bbdb-kv-compact.is-nowrap .bbdb-kv-item.is-compact {
  flex: 0 0 140px;
}

@media (max-width: 700px) {
  .bbdb-kv-compact.is-nowrap {
    flex-wrap: wrap;
  }
}

.bbdb-kv-item.is-wide {
  flex: 1 1 100%;
  min-width: 240px;
}

.bbdb-kv-item.is-ecm-yes {
  background: #ecfdf3;
  border-color: #86efac;
}

.bbdb-kv-item.is-fatt-yes {
  background: #fff1f2;
  border-color: #fca5a5;
}

.bbdb-kv-item.is-accr-yes {
  background: #fff1f2;
  border-color: #fca5a5;
}

.bbdb-kv-item.is-compact.is-accr-wide {
  flex: 0 0 300px;
}

.bbdb-kv-compact.is-nowrap .bbdb-kv-item.is-compact.is-accr-wide {
  flex: 0 0 300px;
}

.bbdb-kv-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.bbdb-kv-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.bbdb-kv-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.bbdb-kv-grid-ecm {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 16px;
}

.bbdb-kv-item.is-span-2 {
  grid-column: span 2;
}

.bbdb-kv-section-title {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bbdb-kv-grid-ecm .bbdb-kv-item.is-compact {
  max-width: 180px;
}

@media (max-width: 900px) {
  .bbdb-kv-grid-4col {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .bbdb-kv-grid-3col {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 700px) {
  .bbdb-kv-grid-2col,
  .bbdb-kv-grid-3col,
  .bbdb-kv-grid-4col,
  .bbdb-kv-grid-ecm {
    grid-template-columns: 1fr;
  }

  .bbdb-kv-item.is-span-2 {
    grid-column: span 1;
  }
}

.bbdb-table-training-site {
  table-layout: fixed;
}

.bbdb-table-training-site th.col-code,
.bbdb-table-training-site td.col-code {
  width: 10ch;
  white-space: nowrap;
}

.bbdb-table-training-site th.col-text:nth-child(4),
.bbdb-table-training-site td.col-text:nth-child(4) {
  width: 60%;
}

.bbdb-table-training-site th.col-text:nth-child(5),
.bbdb-table-training-site td.col-text:nth-child(5) {
  width: 40%;
}

.bbdb-table-training-site th.col-istr,
.bbdb-table-training-site td.col-istr {
  width: 70px;
  min-width: 70px;
  text-align: center;
  white-space: nowrap;
}

.bbdb-table-training-site th.col-date,
.bbdb-table-training-site td.col-date {
  width: 130px;
  min-width: 130px;
  white-space: nowrap;
}

.bbdb-table-training-site th.col-actions,
.bbdb-table-training-site td.col-actions {
  width: 70px;
  min-width: 70px;
  white-space: nowrap;
}

.bbdb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bbdb-btn.bbdb-btn-sm {
  padding: var(--bbdb-btn-padding);
  font-size: var(--bbdb-btn-font-size);
}

.bbdb-icon-btn.is-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, .35);
}

.bbdb-icon-btn.is-edit {
  color: #1d4ed8;
  border-color: rgba(80, 140, 220, 0.35);
  background: rgba(140, 200, 255, 0.25);
}

.bbdb-icon-btn.is-print i {
  font-size: 1.15em;
}

.bbdb-inline {
  display: inline;
}

.bbdb-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 8000;
  overflow: auto;
}

.bbdb-modal.is-open {
  display: block;
}

.bbdb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
}

.bbdb-modal-card {
  position: relative;
  background: #fff;
  max-width: 520px;
  margin: 6vh auto;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
  max-height: 86vh;
  overflow: visible;
}

.bbdb-hidden {
  display: none !important;
}

.bbdb-modal-new {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, .15);
}

.bbdb-modal-actions {
  flex-wrap: wrap;
}

.bbdb-repeat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bbdb-repeat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bbdb-repeat-row .bbdb-input,
.bbdb-repeat-row select.bbdb-input {
  flex: 1 1 220px;
}

.bbdb-input-narrow {
  flex: 0 0 12ch;
  max-width: 12ch;
  text-transform: uppercase;
  text-align: center;
}

.bbdb-address-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bbdb-address-fields .indirizzo-italiano,
.bbdb-address-fields .indirizzo-estero {
  grid-column: 1 / -1;
}

.bbdb-address-card {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.bbdb-address-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px auto;
  gap: 8px;
  align-items: center;
}

.bbdb-address-head.is-estero {
  grid-template-columns: 1fr auto;
}

.bbdb-address-head .bbdb-autocomplete-wrap,
.bbdb-address-head .bbdb-input {
  width: 100%;
}

.bbdb-address-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .bbdb-address-head {
    grid-template-columns: 1fr;
  }
}

.bbdb-table-docenti,
.bbdb-table-partecipanti {
  table-layout: fixed;
  width: 100%;
  min-width: 980px;
}

.bbdb-table-docenti th.col-cf,
.bbdb-table-docenti td.col-cf,
.bbdb-table-partecipanti th.col-cf,
.bbdb-table-partecipanti td.col-cf {
  width: 18ch;
  white-space: nowrap;
}

.bbdb-table-docenti th.col-actions,
.bbdb-table-docenti td.col-actions,
.bbdb-table-partecipanti th.col-actions,
.bbdb-table-partecipanti td.col-actions {
  width: 96px;
  min-width: 96px;
  text-align: right;
  padding-left: 0;
  padding-right: 8px;
}

.bbdb-table-docenti th.col-nome,
.bbdb-table-docenti td.col-nome,
.bbdb-table-partecipanti th.col-nome,
.bbdb-table-partecipanti td.col-nome {
  width: 10%;
}

.bbdb-table-docenti th.col-cognome,
.bbdb-table-docenti td.col-cognome,
.bbdb-table-partecipanti th.col-cognome,
.bbdb-table-partecipanti td.col-cognome {
  width: 10%;
}

.bbdb-table-docenti th.col-dati,
.bbdb-table-docenti td.col-dati,
.bbdb-table-partecipanti th.col-dati,
.bbdb-table-partecipanti td.col-dati {
  width: auto;
}

.bbdb-table-docenti th.col-crediti,
.bbdb-table-docenti td.col-crediti {
  min-width: 16ch;
  width: 18ch;
  text-align: left;
}

.bbdb-table-docenti td.col-crediti .bbdb-actions-inline {
  justify-content: flex-start;
  gap: 6px;
  align-items: center;
}

.bbdb-table-docenti .bbdb-actions-inline,
.bbdb-table-partecipanti .bbdb-actions-inline {
  justify-content: flex-end;
  flex-wrap: nowrap;
  align-items: center;
}

.bbdb-table-docenti td.col-actions,
.bbdb-table-partecipanti td.col-actions {
  vertical-align: middle;
}

.bbdb-table-docenti td.col-actions .bbdb-actions-inline,
.bbdb-table-partecipanti td.col-actions .bbdb-actions-inline {
  align-items: center;
}

.bbdb-edit-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.bbdb-edit-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.bbdb-edit-grid-2col .bbdb-autocomplete {
  z-index: 9500;
}

.bbdb-edit-row .bbdb-switch-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-main);
}

.bbdb-edit-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bbdb-edit-accr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 6px;
  align-items: start;
}

.bbdb-edit-accr-col {
  min-width: 0;
}

.bbdb-edit-row .bbdb-edit-item {
  flex: 1 1 180px;
  min-width: 160px;
}

.bbdb-edit-row.is-compact-row {
  gap: 8px;
}

.bbdb-edit-row.is-compact-row .bbdb-edit-item {
  flex: 0 0 150px;
  min-width: 150px;
}

.bbdb-edit-row.is-compact-row .bbdb-edit-item.is-switch {
  flex: 0 0 120px;
  min-width: 120px;
}

.bbdb-edit-row.bbdb-edit-row-category {
  display: grid;
  grid-template-columns: 220px minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
}

.bbdb-edit-row-category .bbdb-edit-item {
  min-width: 0;
}

.bbdb-edit-row-category .bbdb-edit-item:last-child {
  width: 100%;
}

.bbdb-edit-row-category .bbdb-edit-item:first-child {
  max-width: 240px;
}

.bbdb-edit-row-category .bbdb-edit-item:last-child .bbdb-input {
  width: 100%;
  min-width: 320px;
}

.bbdb-edit-row-category .bbdb-edit-item:last-child {
  justify-self: stretch;
}

.bbdb-edit-row-category .bbdb-category-pills {
  margin-top: 6px;
}

.bbdb-edit-row-category .bbdb-autocomplete-wrap,
.bbdb-edit-row-category .bbdb-input {
  width: 100%;
}

.bbdb-edit-row-category .bbdb-edit-item:last-child .bbdb-autocomplete-wrap,
.bbdb-edit-row-category .bbdb-edit-item:last-child .bbdb-input {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 700px) {
  .bbdb-edit-row.bbdb-edit-row-category {
    grid-template-columns: 1fr;
  }

  .bbdb-edit-accr-grid {
    grid-template-columns: 1fr;
  }
}

.bbdb-edit-row .bbdb-edit-item.is-fixed {
  flex: 0 0 150px;
  min-width: 150px;
  max-width: 150px;
}

.bbdb-edit-row .bbdb-edit-item.is-fixed .bbdb-input {
  width: 150px;
  max-width: 150px;
}

.bbdb-edit-row-ecm .bbdb-edit-item.is-fixed.is-wide {
  flex: 0 0 300px;
  min-width: 300px;
  max-width: 300px;
}

.bbdb-edit-row-ecm .bbdb-edit-item.is-fixed.is-wide .bbdb-input {
  width: 300px;
  max-width: 300px;
}

.bbdb-edit-row .bbdb-edit-item.is-switch {
  flex: 0 0 auto;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bbdb-edit-row .bbdb-edit-item.is-switch .bbdb-kv-label {
  margin-bottom: 0;
}

.bbdb-edit-row .bbdb-edit-item.is-switch .bbdb-switch {
  margin-top: 2px;
}

.bbdb-edit-row-geo .bbdb-field-narrow {
  flex: 0 1 120px;
  min-width: 120px;
  max-width: 160px;
}

.bbdb-edit-row-geo .bbdb-field-wide {
  flex: 2 1 240px;
  max-width: 420px;
}

.bbdb-edit-row-geo .bbdb-field-mid {
  flex: 1 1 220px;
  max-width: 360px;
}

.bbdb-edit-row-ecm .bbdb-edit-item {
  flex: 1 1 120px;
  min-width: 110px;
}

.bbdb-edit-item .bbdb-input {
  width: 100%;
}

@media (max-width: 900px) {
  .bbdb-edit-grid-4col {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .bbdb-edit-grid-2col {
    grid-template-columns: 1fr;
  }

  .bbdb-edit-grid-4col {
    grid-template-columns: 1fr;
  }
}

.bbdb-table-docenti th.col-cf,
.bbdb-table-docenti td.col-cf,
.bbdb-table-partecipanti th.col-cf,
.bbdb-table-partecipanti td.col-cf {
  font-variant-numeric: tabular-nums;
}

.bbdb-pill {
  background: #e5e7eb;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bbdb-pill-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Presenze */
.bbdb-presenze-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bbdb-presenze-nav-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bbdb-presenze-nav .bbdb-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .bbdb-presenze-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .bbdb-presenze-nav-left,
  .bbdb-presenze-nav-right {
    width: 100%;
    justify-content: space-between;
  }
  .bbdb-presenze-nav-right .bbdb-btn {
    flex: 1 1 auto;
  }
}
@media (max-width: 640px) {
  .bbdb-presenze-nav {
    display: none !important;
  }
}
.bbdb-row-clickable {
  cursor: pointer;
}
.bbdb-menu-quick {
  display: none;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .bb-menu-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .bbdb-menu-quick {
    display: flex;
  }

  .bbdb-header-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .bbdb-card-actions-stack .bbdb-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .bbdb-card-actions-stack .bbdb-card-actions,
  .bbdb-card-actions-stack .bbdb-actions-inline {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
  }
}

/* =========================================================
   CORSI DETAILS – datetime più largo (+20%)
   SOLO per data_inizio / data_fine
   ========================================================= */

.bbdb-edit-row .bbdb-edit-item.is-fixed.is-datetime-wide {
  flex: 0 0 180px;       /* 150px → ~180px (+20%) */
  min-width: 180px;
  max-width: 180px;
}

.bbdb-edit-row .bbdb-edit-item.is-fixed.is-datetime-wide .bbdb-input {
  width: 180px;
  max-width: 180px;
}

/* =========================================================
   CORSI DETAILS – allineamento pulsanti azioni (docenti/partecipanti)
   ========================================================= */

.bbdb-table-docenti td.col-actions,
.bbdb-table-partecipanti td.col-actions {
  vertical-align: middle !important;
}

.bbdb-table-docenti td.col-actions .bbdb-actions-inline,
.bbdb-table-partecipanti td.col-actions .bbdb-actions-inline {
  align-items: center !important;
}

/* =========================================================
   FIRMA STUDENTE – anteprima
   ========================================================= */

.bbdb-firma-preview {
  max-width: 360px;
  width: 100%;
  height: auto;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  background: #fff;
}

.bbdb-training-site-logo-preview {
  max-width: 420px;
  max-height: 180px;
  width: 100%;
  height: auto;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

/* =========================================================
   VALUTAZIONI CORSO – tabelle dedicate
   ========================================================= */

.bbdb-table.bbdb-table-valutazioni {
  table-layout: fixed;
}

.bbdb-table.bbdb-table-valutazioni th,
.bbdb-table.bbdb-table-valutazioni td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

.bbdb-table.bbdb-table-valutazioni thead th {
  white-space: nowrap;
}

.bbdb-table.bbdb-table-valutazioni td .bbdb-input {
  width: 100%;
  min-width: 0;
}

.bbdb-table.bbdb-table-valutazioni-studenti {
  min-width: 1480px;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-cf,
.bbdb-table.bbdb-table-valutazioni-studenti td.col-cf {
  width: 18ch;
  min-width: 18ch;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(2),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(2) {
  width: 12% !important;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(3),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(3) {
  width: 12% !important;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(4),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(4) {
  width: 20% !important;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(5),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(5),
.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(6),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(6) {
  width: 14% !important;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-text:nth-child(7),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-text:nth-child(7) {
  width: 10% !important;
  text-align: center;
}

.bbdb-table.bbdb-table-valutazioni-studenti th.col-actions:nth-child(8),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-actions:nth-child(8),
.bbdb-table.bbdb-table-valutazioni-studenti th.col-actions:nth-child(9),
.bbdb-table.bbdb-table-valutazioni-studenti td.col-actions:nth-child(9) {
  width: 92px !important;
  min-width: 92px !important;
  text-align: right;
  white-space: nowrap;
}

.bbdb-table.bbdb-table-valutazioni-docenti {
  min-width: 980px;
}

.bbdb-table.bbdb-table-valutazioni-docenti th.col-cf,
.bbdb-table.bbdb-table-valutazioni-docenti td.col-cf {
  width: 18ch;
  min-width: 18ch;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.bbdb-table.bbdb-table-valutazioni-docenti th.col-text:nth-child(2),
.bbdb-table.bbdb-table-valutazioni-docenti td.col-text:nth-child(2),
.bbdb-table.bbdb-table-valutazioni-docenti th.col-text:nth-child(3),
.bbdb-table.bbdb-table-valutazioni-docenti td.col-text:nth-child(3) {
  width: 18% !important;
}

.bbdb-table.bbdb-table-valutazioni-docenti th.col-text:nth-child(4),
.bbdb-table.bbdb-table-valutazioni-docenti td.col-text:nth-child(4) {
  width: 44% !important;
}

.bbdb-table.bbdb-table-valutazioni-docenti th.col-actions:nth-child(5),
.bbdb-table.bbdb-table-valutazioni-docenti td.col-actions:nth-child(5) {
  width: 120px !important;
  min-width: 120px !important;
  text-align: right;
  white-space: nowrap;
}
