/* ============================================================
   PvPI Vaccine Vigilance — AEFI Reporter
   Colors: Emerald (#059669) · Teal (#0891b2) · Slate greys
   Vaccine-focused green palette, no RED/BLACK backgrounds
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── WRAPPER ── */
#vv-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 72px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
}

/* ── HEADER ── */
.vv-header {
  background: linear-gradient(135deg, #064e3b 0%, #059669 65%, #0891b2 100%);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.vv-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.vv-pvpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #a7f3d0;
}
.vv-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
  color: #fff;
}
.vv-subtitle {
  font-size: 13px;
  color: #a7f3d0;
  margin: 0 0 14px;
}
.vv-ref-display {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6ee7b7;
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 6px;
  padding: 5px 14px;
  letter-spacing: 1.5px;
}

/* ── PROGRESS ── */
.vv-progress-wrap {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.vv-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #065f46;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.vv-progress-track { background: #bbf7d0; border-radius: 6px; height: 6px; }
.vv-progress-fill {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #059669, #0891b2);
  transition: width .4s ease;
  width: 0%;
}

/* ── SECTION CARD ── */
.vv-section {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(5,150,105,.06);
  animation: vvFadeUp .3s ease both;
}
.vv-section:nth-child(1){animation-delay:.03s}
.vv-section:nth-child(2){animation-delay:.07s}
.vv-section:nth-child(3){animation-delay:.11s}
.vv-section:nth-child(4){animation-delay:.15s}
.vv-section:nth-child(5){animation-delay:.19s}
.vv-section:nth-child(6){animation-delay:.23s}
.vv-section:nth-child(7){animation-delay:.27s}
.vv-section:nth-child(8){animation-delay:.31s}
@keyframes vvFadeUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── SECTION HEADER ── */
.vv-sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #d1fae5;
}
.vv-sec-letter {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #059669;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.vv-sec-title { font-size: 14px; font-weight: 600; color: #1e293b; letter-spacing: .2px; }
.vv-sec-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }
.vv-mandatory-star { color: #059669; font-size: 12px; }
.vv-sec-body { padding: 20px; }

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

/* ── FIELD ── */
.vv-field { display: flex; flex-direction: column; gap: 5px; }
#vv-wrap label {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  display: block;
  margin-bottom: 0;
}
.vv-req { color: #059669; }

/* ── INPUTS ── */
#vv-wrap input[type="text"],
#vv-wrap input[type="number"],
#vv-wrap input[type="date"],
#vv-wrap input[type="time"],
#vv-wrap input[type="email"],
#vv-wrap input[type="tel"],
#vv-wrap select,
#vv-wrap textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}
#vv-wrap input:focus,
#vv-wrap select:focus,
#vv-wrap textarea:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
#vv-wrap input:invalid:not(:placeholder-shown) { border-color: #f59e0b; }
#vv-wrap select { cursor: pointer; }
#vv-wrap textarea { resize: vertical; min-height: 72px; }

/* ── RADIO / CHECKBOX ── */
.vv-radio-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.vv-radio-opt {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: 13px; color: #374151; font-weight: 400;
}
.vv-radio-opt input { width: 15px; height: 15px; accent-color: #059669; }
.vv-g2-radio { gap: 18px; }
.vv-inline-date {
  border: 1px solid #a7f3d0; border-radius: 5px;
  padding: 3px 8px; font-size: 12px; margin-left: 10px; width: auto;
}

/* ── BOXES ── */
.vv-box {
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 16px;
}
.vv-box-title {
  font-size: 12px; font-weight: 600;
  color: #065f46; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 12px;
}

/* ── SERIOUSNESS CHECKS ── */
.vv-seriousness-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 8px;
  transition: opacity .2s;
  opacity: 0.4;
  pointer-events: none;
}
.vv-check-opt {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: #374151;
  background: #fff; border: 1px solid #a7f3d0;
  border-radius: 6px; padding: 8px 12px;
  transition: border-color .15s, background .15s;
}
.vv-check-opt:hover { border-color: #059669; background: #ecfdf5; }
.vv-check-opt input[type="checkbox"] { accent-color: #059669; width:15px; height:15px; flex-shrink:0; }

/* ── OUTCOME GRID ── */
.vv-outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 8px;
}
.vv-outcome-opt {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  background: #fff; border: 1.5px solid #d1fae5;
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; font-weight: 500; color: #374151;
  transition: all .15s;
}
.vv-outcome-opt:hover { border-color: #059669; background: #ecfdf5; }
.vv-outcome-opt input[type="radio"] { accent-color: #059669; width:15px; height:15px; flex-shrink:0; }
.vv-out-green { border-color: #a7f3d0; }
.vv-out-amber { border-color: #fed7aa; }
.vv-out-red   { border-color: #fecaca; }

/* ── VACCINE TABLE ── */
.vv-vax-table-wrap {
  overflow-x: auto;
  border: 1px solid #d1fae5;
  border-radius: 8px;
}
.vv-vax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 900px;
}
.vv-vax-table th {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 9px 10px;
  border-bottom: 2px solid #a7f3d0;
  white-space: nowrap;
}
.vv-vax-table td { padding: 7px 8px; border-bottom: 1px solid #f0fdf4; vertical-align: middle; }
.vv-vax-table tr:last-child td { border-bottom: none; }
.vv-vax-table tr:hover td { background: #f0fdf4; }
.vv-vax-table input[type="text"],
.vv-vax-table input[type="date"],
.vv-vax-table input[type="time"],
.vv-vax-table select {
  border: 1px solid #d1fae5;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  width: 100%;
  min-width: 90px;
}
.vv-vax-table input:focus,
.vv-vax-table select:focus { border-color: #059669; box-shadow: 0 0 0 2px rgba(5,150,105,.1); }
.vv-row-num { color: #059669; font-weight: 600; text-align: center; font-family: 'JetBrains Mono', monospace; }
.vv-del-row {
  background: none; border: none;
  color: #94a3b8; font-size: 18px; cursor: pointer;
  padding: 0 4px; line-height: 1;
  transition: color .15s;
}
.vv-del-row:hover { color: #ef4444; }

/* ── ADD ROW BTN ── */
.vv-add-row-btn {
  margin-top: 10px;
  background: none;
  border: 1.5px dashed #059669;
  color: #059669;
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.vv-add-row-btn:hover { background: #ecfdf5; }

/* ── UPLOAD ZONE ── */
.vv-upload-type-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.vv-upload-type-tags span {
  background: #ecfdf5; border: 1px solid #a7f3d0;
  color: #065f46; border-radius: 20px;
  padding: 4px 12px; font-size: 12px; font-weight: 500;
}
.vv-upload-zone {
  border: 2px dashed #a7f3d0;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: #f0fdf4;
  transition: border-color .2s, background .2s;
}
.vv-upload-zone:hover { border-color: #059669; background: #ecfdf5; }
.vv-upload-zone p { margin: 6px 0; color: #374151; font-size: 14px; }
.vv-upload-hint { color: #94a3b8; font-size: 12px; }
.vv-upload-icon { font-size: 28px; margin-bottom: 6px; }
.vv-preview-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.vv-preview-item {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #a7f3d0;
  border-radius: 6px; padding: 6px 10px;
  font-size: 12px; color: #374151;
}
.vv-preview-item .vv-rm { cursor: pointer; color: #94a3b8; font-size: 16px; margin-left: 4px; }
.vv-preview-item .vv-rm:hover { color: #ef4444; }

/* ── SUBMIT AREA ── */
.vv-submit-area {
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 22px;
  margin-top: 8px;
}
.vv-privacy-note {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 12px; color: #475569; line-height: 1.6;
  margin-bottom: 18px;
}
.vv-privacy-note > span { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.vv-submit-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vv-btn-submit {
  background: linear-gradient(135deg, #059669, #0891b2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  letter-spacing: .3px;
  font-family: 'Inter', sans-serif;
}
.vv-btn-submit:hover { opacity: .92; transform: translateY(-1px); }
.vv-btn-submit:active { transform: translateY(0); }
.vv-btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.vv-pvpi-link { font-size: 12px; color: #64748b; }
.vv-pvpi-link a { color: #059669; text-decoration: none; font-weight: 500; }

/* ── SUCCESS ── */
.vv-success {
  background: #fff;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 42px 28px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.vv-success-icon { font-size: 50px; margin-bottom: 14px; }
.vv-success h3 { color: #059669; font-size: 22px; margin: 0 0 10px; }
.vv-success p  { color: #374151; font-size: 14px; line-height: 1.7; margin: 0; }
.vv-success-ref {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  color: #059669;
  letter-spacing: 4px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 12px 24px;
  display: inline-block;
  margin: 14px 0;
}
.vv-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.vv-btn-pdf {
  background: #059669; color: #fff;
  border: none; border-radius: 7px;
  padding: 10px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.vv-btn-pdf:hover { opacity: .88; }
.vv-btn-new {
  background: #fff; color: #059669;
  border: 1.5px solid #059669; border-radius: 7px;
  padding: 10px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.vv-btn-new:hover { background: #ecfdf5; }

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

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .vv-title { font-size: 17px; }
  .vv-header { padding: 18px 16px; }
  .vv-sec-body { padding: 14px 12px; }
  .vv-submit-row { flex-direction: column; align-items: stretch; }
  .vv-btn-submit { width: 100%; }
}
