.login-bg { background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%); }
.login-logo { width: 64px; height: 64px; border-radius: 50%; background: #0d6efd; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 30px; }

.table-hover tbody tr { cursor: pointer; }
.table td, .table th { vertical-align: middle; }
.card-stato { cursor: pointer; transition: transform .1s; }
.card-stato:hover { transform: translateY(-2px); }
.card-stato.attivo { outline: 3px solid var(--bs-primary); }

/* ---------- Visualizzatore PDF ---------- */
.pdf-viewer { background: #525659; border-radius: .5rem; padding: 16px; overflow: auto; max-height: calc(100vh - 170px); }
.pdf-page { position: relative; margin: 0 auto 16px; box-shadow: 0 2px 10px rgba(0,0,0,.4); background: #fff; }
.pdf-page canvas { display: block; width: 100%; height: auto; }
.pdf-page .overlay { position: absolute; inset: 0; }
.pdf-page .num-pagina { position: absolute; top: -2px; left: -2px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 0 0 4px 0; }
.pdf-viewer.modo-disegno .overlay { cursor: crosshair; }

/* riquadro firma (editor) */
.riquadro { position: absolute; border: 2px dashed #dc3545; background: rgba(220,53,69,.12); cursor: move;
  display: flex; align-items: center; justify-content: center; color: #dc3545; font-size: 12px; font-weight: 600;
  user-select: none; touch-action: none; }
.riquadro.selezionato { border-style: solid; background: rgba(220,53,69,.2); }
.riquadro .del { position: absolute; top: -11px; right: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: #dc3545; color: #fff; border: 2px solid #fff; font-size: 12px; line-height: 16px; text-align: center; cursor: pointer; padding: 0; }
.riquadro .resize { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; background: #dc3545;
  border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; }
.riquadro.readonly { cursor: default; }

/* riquadro lato firmatario */
.riquadro-firma { position: absolute; border: 2px dashed #0d6efd; background: rgba(13,110,253,.12); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; color: #0d6efd; font-weight: 600; font-size: 13px;
  cursor: pointer; animation: pulse 1.6s infinite; }
.riquadro-firma img { max-width: 100%; max-height: 100%; }
.riquadro-firma.firmato { animation: none; border-style: solid; background: rgba(25,135,84,.08); border-color: #198754; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(13,110,253,.5); } 50% { box-shadow: 0 0 0 6px rgba(13,110,253,0); } }

.link-box { font-family: Consolas, monospace; font-size: 12px; }
.log-list { max-height: 260px; overflow: auto; font-size: 13px; }

/* ---------- Pagina firma (mobile first) ---------- */
.firma-page { background: #f1f3f5; min-height: 100vh; }
.firma-page .pdf-viewer { max-height: none; border-radius: 0; padding: 10px; }
.firma-bar { position: sticky; bottom: 0; z-index: 10; background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.12); }
.pad-wrap { position: relative; border: 2px dashed #adb5bd; border-radius: .5rem; background: #fff; touch-action: none; }
.pad-wrap canvas { width: 100%; height: 220px; display: block; touch-action: none; }
.pad-wrap .linea { position: absolute; left: 8%; right: 8%; bottom: 40px; border-bottom: 1px solid #ced4da; pointer-events: none; }
.pad-wrap .x { position: absolute; left: 8%; bottom: 44px; color: #adb5bd; pointer-events: none; }
@media (min-width: 768px) { .pad-wrap canvas { height: 260px; } }
