:root {
  --pr-font: var(--font-family-base, "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --pr-accent: #ff5a00;
  --pr-radius: 16px;
  --pr-bg: #f4f5f7;
  --pr-surface: #ffffff;
  --pr-surface2: #f2f2f2;
  --pr-border: rgba(17, 17, 17, 0.1);
  --pr-border-hover: rgba(17, 17, 17, 0.2);
  --pr-text: #111111;
  --pr-muted: rgba(17, 17, 17, 0.38);
}

.pr-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  color: var(--pr-text);
  font-family: var(--pr-font);
  animation: prFadeUp 0.35s ease both;
}

.pr-form {
  animation: prFadeUp 0.42s ease both 0.08s;
}

.pr-success-banner {
  margin: 0 0 16px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(26, 127, 55, 0.25);
  background: rgba(26, 127, 55, 0.08);
  color: var(--pr-text);
}

.pr-success-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.pr-success-banner span {
  display: block;
  font-size: 12.5px;
  color: var(--pr-muted);
  font-weight: 600;
}

.pr-draft-banner {
  margin: 0 0 16px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 90, 0, 0.18);
  background: rgba(255, 90, 0, 0.08);
  color: var(--pr-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pr-draft-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.pr-draft-banner span {
  display: block;
  font-size: 12.5px;
  color: var(--pr-muted);
  font-weight: 600;
}

.pr-draft-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pr-form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(192, 57, 43, 0.28);
  background: rgba(192, 57, 43, 0.08);
  color: #8b1a0f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.pr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  min-width: 0;
}

.pr-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pr-field input,
.pr-field textarea,
.pr-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius);
  padding: 13px 14px;
  font-family: var(--pr-font);
  font-size: 15px;
  background: var(--pr-surface);
  color: var(--pr-text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s;
}

.pr-field input::placeholder,
.pr-field textarea::placeholder {
  color: var(--pr-muted);
}

.pr-field input[type="file"] {
  display: none;
}

#report_date {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color-scheme: light;
  min-height: 48px;
}

#report_date::-webkit-date-and-time-value {
  text-align: left;
  min-width: 0;
  width: 100%;
}

.pr-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.4;
}

.pr-field input:focus,
.pr-field textarea:focus,
.pr-field select:focus {
  border-color: rgba(255, 90, 0, 0.12);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.07);
}

.pr-field-checkbox .pr-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pr-font);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--pr-text);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.pr-field-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  flex: 0 0 auto;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--pr-accent);
  cursor: pointer;
}

.pr-email-hint {
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  padding: 6px 10px;
}

.pr-file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(255, 90, 0, 0.22);
  border-radius: var(--pr-radius);
  padding: 18px;
  background: rgba(255, 90, 0, 0.12);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--pr-accent);
  transition: border-color 0.2s, background 0.2s;
}

.pr-file-upload-label:hover {
  background: rgba(255, 90, 0, 0.06);
  border-color: rgba(255, 90, 0, 0.12);
}

.pr-file-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.pr-file-empty {
  color: var(--pr-muted);
  font-size: 12px;
  padding: 2px;
}

.pr-file-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius);
  background: var(--pr-surface);
}

.pr-file-meta {
  flex: 1;
  min-width: 0;
}

.pr-file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-file-size {
  font-size: 11px;
  color: var(--pr-muted);
}

.pr-file-remove {
  border: none;
  background: transparent;
  color: var(--pr-muted);
  cursor: pointer;
  padding: 4px;
}

/* JSA compliance warning -- shown only to In-House users, immediately
   above the Submit Report button. Same red palette as the existing
   .form-feedback-error banner for visual consistency (mirrors app-v2's
   new_report.css). */
.pr-jsa-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(192, 57, 43, 0.28);
  background: rgba(192, 57, 43, 0.08);
  color: #8b1a0f;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.pr-jsa-warning-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.pr-jsa-warning strong {
  font-weight: 800;
}

@media (max-width: 480px) {
  .pr-jsa-warning {
    font-size: 13px;
    padding: 10px 12px;
  }
}

.pr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.pr-btn {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-family: var(--pr-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.18s, transform 0.15s;
}

.pr-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.pr-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pr-btn-primary {
  background: var(--pr-accent);
  color: #fff;
}

.pr-btn-ghost {
  background: var(--pr-surface2);
  color: var(--pr-text);
  border: 1px solid var(--pr-border);
}

.pr-btn-small {
  padding: 9px 12px;
  font-size: 13px;
}

.pr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(4px);
}

.pr-overlay.is-visible {
  display: flex;
}

.pr-overlay-content {
  width: min(92vw, 360px);
  text-align: center;
  color: #fff;
  padding: 28px 22px;
}

.pr-overlay-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--pr-accent);
  animation: prSpin 0.9s linear infinite;
}

.pr-overlay-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pr-overlay-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 14px;
}

.pr-overlay-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.52);
  margin-top: 8px;
}

.pr-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin: 0 auto;
}

.pr-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--pr-accent);
  border-radius: 999px;
  transition: width 120ms linear;
}

.pr-dots::after {
  content: "";
  display: inline-block;
  width: 18px;
  text-align: left;
  animation: prDots 1.2s steps(4, end) infinite;
}

@keyframes prDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

@keyframes prFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes prSpin {
  to { transform: rotate(360deg); }
}

@media (min-width: 600px) {
  .pr-wrap {
    max-width: 640px;
  }
}
