:root {
  --navy: #08245c;
  --blue: #145bc7;
  --light: #f4f7fb;
  --line: #d8e1ef;
  --text: #162033;
  --muted: #627089;
  --success: #0d7a3d;
  --error: #a31414;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: linear-gradient(135deg, #f6f9fd, #e8eef7); color: var(--text); }
.shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { width: 100%; max-width: 560px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: 0 18px 40px rgba(8, 36, 92, 0.12); }
.brand { color: var(--blue); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; margin-bottom: 18px; }
h1 { color: var(--navy); margin: 0 0 12px; font-size: 32px; line-height: 1.1; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-weight: 700; color: var(--navy); }
input { width: 100%; border: 1px solid #b7c4d8; border-radius: 10px; padding: 13px 14px; font-size: 16px; }
input:focus { outline: 3px solid rgba(20, 91, 199, .16); border-color: var(--blue); }
button, .buttonlink { display: inline-block; border: 0; background: var(--blue); color: white; padding: 13px 18px; border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
button:disabled { background: #9aa7ba; cursor: not-allowed; }
.note { margin-top: 22px; padding: 14px; background: var(--light); border-left: 4px solid var(--blue); color: var(--muted); border-radius: 8px; }
.error { color: var(--error); font-weight: 700; }
.success { color: var(--success); font-weight: 800; }
.devcode { margin: 18px 0; padding: 16px; background: #fff8d8; border: 1px solid #ead272; border-radius: 10px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
@media (max-width: 560px) { .card { padding: 24px; } .choice { grid-template-columns: 1fr; } }

/* Pre-start form additions */
.card:has(.longform) { max-width: 900px; }
h2 { color: var(--navy); margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 22px; }
.longform { gap: 18px; }
.question { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.q-label { font-weight: 800; color: var(--navy); }
.inline-options { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-option, .checkbox-option { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.inline-option input, .checkbox-option input { width: auto; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
textarea { width: 100%; border: 1px solid #b7c4d8; border-radius: 10px; padding: 13px 14px; font-size: 16px; font-family: Arial, Helvetica, sans-serif; }
textarea:focus { outline: 3px solid rgba(20, 91, 199, .16); border-color: var(--blue); }
.summarybox { margin: 16px 0 22px; padding: 14px; background: var(--light); border: 1px solid var(--line); border-radius: 10px; color: var(--text); line-height: 1.6; }
.errorbox { margin: 16px 0; padding: 14px; background: #fff0f0; border: 1px solid #f0b5b5; border-radius: 10px; color: var(--error); }
.stoplist { padding: 14px; background: #fbfdff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 7px; color: var(--text); }
.wide { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
@media (max-width: 680px) { .checkbox-grid { grid-template-columns: 1fr; } .inline-options { flex-direction: column; } }

.jsonblock {
  white-space: pre-wrap;
  background: #f6f9ff;
  border: 1px solid #d6e1f2;
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
  font-size: 13px;
}
.review-section {
  border-top: 1px solid #d6e1f2;
  padding-top: 16px;
  margin-top: 16px;
}
.buttonrow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.secondarybtn {
  background: #64748b;
}
.dangerbtn {
  background: #b42318;
}
.buttonlink.secondary {
  background: #64748b;
  margin-left: 8px;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid #d6e1f2;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f6f9ff;
  color: #002b67;
}

/* PM review readable answer display */
.pretty-review-section h2 {
  margin-bottom: 14px;
}
.answer-table {
  border: 1px solid #d6e1f2;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  border-bottom: 1px solid #e5edf8;
}
.answer-row:last-child {
  border-bottom: 0;
}
.answer-question {
  padding: 12px 14px;
  font-weight: 700;
  color: #08245c;
}
.answer-value {
  padding: 12px 14px;
  font-weight: 800;
  background: #f8fbff;
  border-left: 1px solid #e5edf8;
}
.answer-yes {
  color: #0d7a3d;
}
.answer-no {
  color: #b42318;
}
.answer-na {
  color: #64748b;
}
.subheading {
  font-weight: 800;
  color: #08245c;
  margin: 6px 0 8px;
}
.checklist-review {
  margin: 0 0 12px;
  padding: 12px 14px 12px 38px;
  background: #f8fbff;
  border: 1px solid #d6e1f2;
  border-radius: 12px;
}
.checklist-review li {
  margin: 5px 0;
  font-weight: 700;
}
.checklist-review li::marker {
  content: '✓  ';
  color: #0d7a3d;
  font-weight: 900;
}
.mutedline {
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid #d6e1f2;
  border-radius: 12px;
  color: #64748b;
}
.other-details {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fffdf5;
  border: 1px solid #ead272;
  border-radius: 12px;
  line-height: 1.45;
}
@media (max-width: 680px) {
  .answer-row { grid-template-columns: 1fr; }
  .answer-value { border-left: 0; border-top: 1px solid #e5edf8; }
}

.warningbox{background:#fff7e6;border:1px solid #ffd58a;border-radius:12px;padding:18px;margin:18px 0;color:#061b49;}

/* Vendor Portal branding */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 22px;
}
.brand-logo {
  display: block;
  max-width: 230px;
  width: 100%;
  height: auto;
}
.brand span {
  display: none;
}
@media (max-width: 560px) {
  .brand-logo { max-width: 190px; }
}

/* Review dashboard and completion review polish */
.evidence-table, .dashboard-table {
  border: 1px solid #d6e1f2;
  border-radius: 14px;
  overflow: hidden;
  margin: 14px 0 24px;
  background: #ffffff;
}
.evidence-row, .dash-row {
  display: grid;
  gap: 0;
  border-top: 1px solid #e5edf8;
}
.evidence-row { grid-template-columns: 1.1fr 2fr .7fr 1.4fr; }
.dash-row { grid-template-columns: 1.1fr 1fr 1.5fr 2fr 1.5fr 1.2fr .6fr; }
.evidence-row:first-child, .dash-row:first-child { border-top: 0; }
.evidence-row > div, .dash-row > div {
  padding: 11px 12px;
  border-left: 1px solid #e5edf8;
  overflow-wrap: anywhere;
}
.evidence-row > div:first-child, .dash-row > div:first-child { border-left: 0; }
.evidence-head, .dash-head {
  font-weight: 800;
  color: #061b49;
  background: #f1f6ff;
}
.status-pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #061b49;
  font-weight: 800;
  font-size: 12px;
}
.muted-small {
  color: #64748b;
  font-size: 12px;
}
.smalllink {
  color: #155bd5;
  font-weight: 800;
  text-decoration: none;
}
@media (max-width: 900px) {
  .evidence-row, .dash-row { grid-template-columns: 1fr; }
  .evidence-row > div, .dash-row > div { border-left: 0; border-top: 1px solid #e5edf8; }
  .evidence-row > div:first-child, .dash-row > div:first-child { border-top: 0; }
}


/* Admin dashboard full-width polish */
.shell:has(.admin-dashboard) {
  align-items: flex-start;
  justify-content: center;
}
.card:has(.admin-dashboard) {
  max-width: min(1380px, calc(100vw - 48px));
}
.admin-dashboard .dashboard-table {
  width: 100%;
  overflow-x: auto;
}
.admin-dashboard .dash-row {
  grid-template-columns: 150px 150px minmax(190px, 1.2fr) minmax(260px, 1.7fr) minmax(210px, 1.2fr) 170px 110px;
  min-width: 1180px;
}
.admin-dashboard .dash-head > div {
  white-space: nowrap;
}
.admin-dashboard .smalllink {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
}
.admin-dashboard .status-pill {
  white-space: normal;
}
@media (max-width: 900px) {
  .admin-dashboard .dashboard-table { overflow-x: auto; }
  .admin-dashboard .dash-row { grid-template-columns: 150px 150px minmax(190px, 1.2fr) minmax(260px, 1.7fr) minmax(210px, 1.2fr) 170px 110px; }
  .admin-dashboard .dash-row > div { border-left: 1px solid #e5edf8; border-top: 0; }
  .admin-dashboard .dash-row > div:first-child { border-left: 0; }
}

/* Completion lock and upload guidance */
.noticebox {
  background: #fff7e6;
  border: 1px solid #ffd58a;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  color: #4b3500;
}
.disabledlink {
  background: #d8dee8 !important;
  color: #526071 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}
.question .hint {
  margin-top: 6px;
}
input[type="file"] {
  width: 100%;
}

/* Upload submission protection */
.upload-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(6, 27, 73, 0.58);
  z-index: 9999;
}
.upload-overlay.active {
  display: flex;
}
.upload-card {
  width: min(560px, 100%);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #d8e1ef;
  box-shadow: 0 24px 70px rgba(8, 36, 92, 0.28);
  padding: 30px;
  text-align: center;
  color: #162033;
}
.upload-card h2 {
  border-top: 0;
  margin: 14px 0 10px;
  padding-top: 0;
}
.upload-card p {
  margin: 9px 0;
  color: #627089;
  line-height: 1.45;
}
.upload-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 5px solid #d8e1ef;
  border-top-color: #145bc7;
  animation: uploadSpin 0.9s linear infinite;
}
.upload-steps {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  text-align: left;
}
.upload-steps div {
  background: #f4f7fb;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  color: #08245c;
}
.upload-steps div::before {
  content: '✓';
  color: #0d7a3d;
  font-weight: 900;
  margin-right: 8px;
}
.upload-disabled-look {
  opacity: 0.72;
}
@keyframes uploadSpin {
  to { transform: rotate(360deg); }
}
@media (max-width: 560px) {
  .upload-card { padding: 24px; }
}
