.ppi-request-page {
  max-width: none;
  padding-bottom: 24px;
}

.ppi-request-intro {
  background: var(--blue-50, #f5f8fb);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.55;
}

.ppi-request-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 14px;
}

.ppi-request-access-check {
  margin: 8px 0;
}

.ppi-request-hint {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.ppi-request-attachments {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--blue-50, #f5f8fb);
}

.ppi-request-attachments__title {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--blue-900);
}

.ppi-request-attach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
  align-items: center;
}

.ppi-request-form .ppi-request-attach-actions .btn,
.ppi-request-form .ppi-request-submit,
.ppi-scan-modal__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  margin-bottom: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.ppi-request-form .ppi-request-submit {
  margin-top: 6px;
}

@media (min-width: 769px) {
  .ppi-request-form .ppi-request-attach-actions #ppi-scan-open {
    display: none;
  }
}

.ppi-request-form .flatpickr-input {
  width: 100%;
}

.ppi-request-file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.ppi-request-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.ppi-request-file-list button {
  border: none;
  background: transparent;
  color: #9b1c1c;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.ppi-scan-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ppi-scan-modal[hidden] {
  display: none !important;
}

.ppi-scan-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 41, 74, 0.55);
}

.ppi-scan-modal__panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  box-shadow: var(--shadow-md, 0 12px 40px rgba(7, 41, 74, 0.18));
  font-family: var(--font);
}

.ppi-scan-modal__panel h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--blue-900);
}

#ppi-scan-video {
  width: 100%;
  max-height: 240px;
  background: #000;
  border-radius: 8px;
  object-fit: cover;
}

.ppi-scan-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  min-height: 40px;
}

.ppi-scan-pages img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--line);
}

.ppi-scan-page-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 88px;
}

.ppi-scan-page-size {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted, #51606f);
  text-align: center;
  line-height: 1.2;
}

.ppi-scan-page-over {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #9b1c1c;
  text-align: center;
  line-height: 1.2;
}

.ppi-scan-page-wrap--over img {
  border-color: #9b1c1c;
  box-shadow: 0 0 0 1px #9b1c1c;
}

.ppi-request-file-over {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9b1c1c;
}

.ppi-request-file-list li.is-over {
  border-color: #9b1c1c;
  background: #fef2f2;
}

.ppi-scan-page-wrap button {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: #9b1c1c;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.ppi-scan-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#ppi-scan-video[hidden] {
  display: none !important;
}

#ppi-scan-retake[hidden] {
  display: none !important;
}

.ppi-scan-modal__pick {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ppi-scan-fallback {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
