:root {
  --header-h: 56px;
  --footer-h: 35px;
}

/* HEADER FISSO */
.pwa-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 2000;
  background: #0066cc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.pwa-header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.pwa-header-left,
.pwa-header-right {
  width: 40px;
  display: flex;
  align-items: center;
}

.pwa-btn-back,
.pwa-btn-logout {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-btn-back svg,
.pwa-btn-logout svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* OFFSET HEADER */
.pwa-main {
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* FOTOCAMERA */
.pwa-camera-preview {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.pwa-camera-preview video,
.pwa-camera-preview img {
  width: 100%;
  display: block;
}


/* FOOTER FISSO */
.pwa-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  font-size: 0.75rem;
  z-index: 2000;
}

.pwa-main {
  padding-bottom: 2.5rem;
}


/* FIX MODAL */
.modal.show {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--header-h) + 0.5rem) 1rem calc(var(--footer-h) + 0.5rem) 1rem !important;
}

.modal.show .modal-dialog.modal-dialog-centered {
  margin: 0;
  width: 100%;
  max-width: 500px;
}

.modal-content {
  max-height: calc(100dvh - var(--header-h) - var(--footer-h) - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}