/* PharmaAdvance Materiovigilance Form — mv-form.css */
#pmv-wrap * { box-sizing: border-box; }
#pmv-wrap { max-width: 860px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1e293b; }

/* ── Header ── */
.pmv-header { background: linear-gradient(135deg, #0f766e 0%, #0d5c56 100%); border-radius: 14px; padding: 28px 28px 22px; margin-bottom: 20px; color: white; }
.pmv-mvpi-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 5px 14px; font-size: 11px; letter-spacing: 0.5px; margin-bottom: 14px; }
.pmv-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.pmv-subtitle { font-size: 13px; color: rgba(255,255,255,0.82); margin: 0 0 14px; line-height: 1.5; }
.pmv-ref-display { display: inline-block; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; padding: 8px 18px; font-family: monospace; font-size: 16px; letter-spacing: 2px; color: #ccfbf1; }

/* ── Progress ── */
.pmv-progress-wrap { margin-bottom: 20px; }
.pmv-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-bottom: 5px; }
.pmv-progress-track { background: #e2e8f0; border-radius: 6px; height: 7px; overflow: hidden; }
.pmv-progress-fill { background: linear-gradient(90deg, #0f766e, #14b8a6); height: 100%; width: 0%; border-radius: 6px; transition: width 0.4s ease; }

/* ── Section ── */
.pmv-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.pmv-sec-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid #f0fdfa; background: #f8fffe; }
.pmv-sec-letter { width: 36px; height: 36px; background: linear-gradient(135deg, #0f766e, #14b8a6); color: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.pmv-sec-title { font-size: 15px; font-weight: 700; color: #1e293b; }
.pmv-sec-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.pmv-mandatory-star { color: #0f766e; }
.pmv-sec-body { padding: 20px 22px; }

/* ── Fields ── */
.pmv-field { display: flex; flex-direction: column; gap: 5px; }
.pmv-field label { font-size: 12px; font-weight: 600; color: #374151; }
.pmv-field input[type="text"],
.pmv-field input[type="number"],
.pmv-field input[type="email"],
.pmv-field input[type="tel"],
.pmv-field input[type="date"],
.pmv-field select,
.pmv-field textarea,
#pmv-wrap input[type="text"],
#pmv-wrap input[type="number"],
#pmv-wrap input[type="email"],
#pmv-wrap input[type="tel"],
#pmv-wrap input[type="date"],
#pmv-wrap select,
#pmv-wrap textarea {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
#pmv-wrap input:focus, #pmv-wrap select:focus, #pmv-wrap textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.pmv-req { color: #ef4444; }
.pmv-inline-date { border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 8px; font-size: 11px; margin-left: 8px; }

/* ── Grid rows ── */
.pmv-row { display: grid; gap: 12px; }
.pmv-g2 { grid-template-columns: 1fr 1fr; }
.pmv-g3 { grid-template-columns: 1fr 1fr 1fr; }
.pmv-g4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 700px) {
  .pmv-g2, .pmv-g3, .pmv-g4 { grid-template-columns: 1fr; }
}

/* ── Radio / Checkbox ── */
.pmv-radio-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.pmv-radio-opt { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 6px 12px; transition: all 0.15s; }
.pmv-radio-opt:hover { border-color: #0f766e; background: #f0fdfa; }
.pmv-radio-opt input[type="radio"] { accent-color: #0f766e; width: 14px; height: 14px; }
.pmv-radio-opt input[type="checkbox"] { accent-color: #0f766e; width: 14px; height: 14px; }

/* ── Box ── */
.pmv-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; }
.pmv-box-title { font-size: 12px; font-weight: 700; color: #0f766e; margin-bottom: 12px; letter-spacing: 0.3px; }

/* ── Seriousness checks ── */
.pmv-seriousness-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; opacity: 0.4; pointer-events: none; transition: all 0.3s; }
.pmv-seriousness-checks.active { opacity: 1; pointer-events: auto; }
.pmv-check-opt { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; transition: all 0.15s; }
.pmv-check-opt:hover { border-color: #0f766e; background: #f0fdfa; }
.pmv-check-opt input { accent-color: #0f766e; flex-shrink: 0; }
@media (max-width: 600px) { .pmv-seriousness-checks { grid-template-columns: 1fr; } }

/* ── Outcome grid ── */
.pmv-outcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 600px) { .pmv-outcome-grid { grid-template-columns: 1fr 1fr; } }
.pmv-outcome-opt { display: flex; align-items: center; gap: 8px; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.15s; background: #fff; }
.pmv-outcome-opt:hover { border-color: #0f766e; background: #f0fdfa; }
.pmv-outcome-opt input { accent-color: #0f766e; }
.pmv-outcome-opt.pmv-out-green { border-color: #6ee7b7; }
.pmv-outcome-opt.pmv-out-amber { border-color: #fcd34d; }
.pmv-outcome-opt.pmv-out-red   { border-color: #fca5a5; }

/* ── Upload zone ── */
.pmv-upload-type-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pmv-upload-type-tags span { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 16px; padding: 4px 12px; font-size: 11px; color: #0f766e; }
.pmv-upload-zone { border: 2px dashed #99f6e4; border-radius: 12px; padding: 32px; text-align: center; cursor: pointer; transition: all 0.2s; background: #f0fdfa; }
.pmv-upload-zone:hover, .pmv-upload-zone.drag-over { border-color: #0f766e; background: #ccfbf1; }
.pmv-upload-icon { font-size: 36px; margin-bottom: 8px; }
.pmv-upload-zone p { margin: 4px 0; font-size: 13px; color: #374151; }
.pmv-upload-hint { color: #94a3b8 !important; font-size: 11px !important; }
.pmv-preview-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pmv-preview-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.pmv-preview-item .pmv-remove { color: #ef4444; cursor: pointer; font-size: 16px; margin-left: 4px; }
.pmv-preview-thumb { width: 40px; height: 32px; object-fit: cover; border-radius: 5px; }

/* ── Submit area ── */
.pmv-submit-area { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px; margin-top: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.pmv-privacy-note { display: flex; gap: 12px; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; padding: 14px; font-size: 12px; color: #374151; line-height: 1.6; margin-bottom: 18px; }
.pmv-submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pmv-btn-submit { background: linear-gradient(135deg, #0f766e, #14b8a6); color: white; border: none; border-radius: 10px; padding: 14px 28px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.2s, transform 0.15s; }
.pmv-btn-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.pmv-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pmv-mvpi-link { font-size: 12px; color: #64748b; }
.pmv-mvpi-link a { color: #0f766e; }

/* ── Success ── */
.pmv-success { text-align: center; padding: 48px 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; margin-top: 16px; }
.pmv-success-icon { font-size: 48px; margin-bottom: 12px; }
.pmv-success h3 { font-size: 22px; color: #0f766e; margin: 0 0 8px; }
.pmv-success p { color: #64748b; font-size: 14px; margin: 4px 0; }
.pmv-success-ref { display: inline-block; background: #f0fdfa; border: 2px solid #5eead4; border-radius: 10px; padding: 12px 28px; font-family: monospace; font-size: 24px; letter-spacing: 4px; color: #0f766e; margin: 16px 0; }
.pmv-success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pmv-btn-pdf { background: #0f766e; color: white; border: none; border-radius: 8px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pmv-btn-new { background: #f8fafc; color: #374151; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pmv-btn-new:hover { background: #f0fdfa; }

/* ── Spinner ── */
.pmv-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: pmv-spin 0.7s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes pmv-spin { to { transform: rotate(360deg); } }
