:root {
  --bg: #f4f7fa;
  --panel: #ffffff;
  --text: #172033;
  --muted: #5f6c80;
  --line: #d8e2ec;
  --brand: #075386;
  --brand-2: #0077bd;
  --brand-dark: #053e66;
  --green: #008f46;
  --green-dark: #006638;
  --gold: #c9952f;
  --accent: #b73e3e;
  --warn: #a86a05;
  --ok: #1f7a4d;
  --shadow: 0 16px 42px rgba(16, 24, 40, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, rgba(7, 83, 134, 0.05), rgba(0, 143, 70, 0.06)),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(31, 45, 61, 0.08);
  position: sticky;
  top: 0;
  z-index: 2;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--green));
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bank-logo {
  width: 210px;
  height: 56px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 12px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #eef2f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab,
button {
  border: 0;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.tab {
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.portal-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.secondary {
  background: #eef2f4;
  color: var(--text);
  border: 1px solid var(--line);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 44px;
}

main::before {
  content: "Developed by IT Section DCCB Ropar";
  display: block;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 143, 70, 0.18);
  border-radius: 8px;
  color: var(--green-dark);
  background: #f4fbf7;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head.compact {
  margin-top: 22px;
}

.section-head p,
.quality-panel p,
.metrics p {
  color: var(--muted);
  margin-bottom: 0;
}

.status-pill {
  background: #e7f4ef;
  color: var(--ok);
  border: 1px solid #b8decf;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

  margin: 0 0 16px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 143, 70, 0.15);
  border-radius: var(--radius-md);
  color: var(--green-dark);
  background: #f0fdf4;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  box-shadow: var(--shadow-sm);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head.compact {
  margin-top: 24px;
}

.section-head p,
.quality-panel p,
.metrics p {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 14px;
}

.status-pill {
  background: rgba(16, 185, 129, 0.08);
  color: var(--ok);
  border: 1px solid rgba(16, 185, 129, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(31, 45, 61, 0.08);
}

.upload-first,
.extraction-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  box-shadow: 0 12px 30px rgba(31, 45, 61, 0.06);
}

.upload-first h3 {
  margin: 0 0 6px;
}

.upload-first > div:first-child {
  grid-column: 1 / -1;
}

.upload-first p,
.extraction-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.extraction-panel {
  grid-template-columns: 260px 1fr;
  align-items: start;
  background: #f7fbfa;
  border-color: #c8ddd9;
}

.extraction-result {
  display: block;
}

.captured-preview {
  display: grid;
  gap: 14px;
}

.preview-main {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.preview-main.simple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-field {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #9ccbc3;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.preview-field span,
.submission-asset span {
  color: var(--muted);
  font-size: 12px;
}

.preview-field strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.preview-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-more span,
.source-rule {
  border-radius: 999px;
  background: #eef6f4;
  border: 1px solid #c8ddd9;
  padding: 8px 10px;
  font-size: 13px;
}

.page-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.source-rule {
  border-radius: 8px;
  color: var(--brand-dark);
  font-weight: 700;
}

.preview-empty {
  display: grid;
  place-items: center;
  min-height: 110px;
  border: 1px dashed #b9c7d5;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.submission-assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.submission-asset {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.submission-asset img {
  width: 96px;
  height: 76px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.asset-placeholder {
  width: 96px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f4f7;
  color: var(--muted);
  font-weight: 800;
}

.submission-asset a {
  display: inline-block;
  margin-top: 6px;
  color: var(--brand-dark);
  font-weight: 700;
}

.extracted {
  border: 1px solid #c8ddd9;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
}

.submission-asset a {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  color: var(--brand-2);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.submission-asset a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.extracted {
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  background: #ffffff;
}

.extracted.mandatory,
.mandatory-grid .field-card {
  border-color: rgba(16, 185, 129, 0.3);
  background: #f0fdf4;
}

.extracted span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.extracted strong {
  overflow-wrap: anywhere;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
}

.locked-field {
  color: var(--muted);
  background: #eef3f6;
  pointer-events: none;
}

textarea {
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

.checklist {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.scan-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.scan-panel legend {
  padding: 0 8px;
  font-weight: 700;
}

.checklist legend {
  padding: 0 8px;
  font-weight: 700;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}

.checklist input {
  width: 18px;
  min-height: 18px;
}

.quality-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 8px;
  padding: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 42, 0.48);
}

.modal.hidden {
  display: none;
}

.modal-panel {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  padding: 20px;
}

.crop-panel {
  width: min(1040px, 96vw);
}

#crop-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68vh;
  border: 1px solid #b8c7d3;
  border-radius: 8px;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 14px 34px rgba(15, 23, 42, 0.14);
  cursor: crosshair;
  touch-action: none;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.rescan-control {
  width: min(320px, 100%);
}

.rescan-control input {
  margin-top: 7px;
}

.replace-page {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.replace-page input {
  min-height: 36px;
  padding: 7px;
}

.page-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.page-tag {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.page-tag img,
.page-tag canvas,
.page-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.page-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.page-tag span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.blur-warning {
  color: var(--accent);
  font-size: 12px;
}

.sharp-ok {
  color: var(--ok);
  font-size: 12px;
}

.quality-panel ul {
  min-width: 280px;
  margin: 0;
  padding-left: 18px;
}

.quality-panel li {
  margin-bottom: 6px;
}

.quality-panel .ok {
  color: var(--ok);
}

.quality-panel .warn {
  color: var(--warn);
}

.quality-panel .reject,
.doc-list .reject {
  color: var(--accent);
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.receipt,
.track-result {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.receipt-actions {
  display: flex;
  gap: 10px;
.doc-list .reject {
  color: var(--accent);
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.receipt,
.track-result {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.receipt-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.button-link {
  display: inline-block;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.muted-note {
  color: var(--muted);
}

.sync-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.sync-status.ok {
  border-color: #b8decf;
  background: #e7f4ef;
  color: var(--ok);
}

.sync-status.warn {
  border-color: #e4c17d;
  background: #fff8e8;
  color: var(--warn);
}

.sync-status.error {
  border-color: #efb5b5;
  background: #f9e5e5;
  color: var(--accent);
}

.sync-retry {
  float: right;
  margin-left: 12px;
}

.sync-retry.is-soft {
  opacity: 0.72;
}

.track-list {
  display: grid;
  gap: 10px;
}

.track-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.track-card p {
  margin: 3px 0;
  color: var(--muted);
}

.track-card .query-line {
  margin-top: 8px;
  color: var(--warn);
  font-weight: 700;
}

.query-notice {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e4c17d;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--text);
}

.query-notice strong {
  color: var(--warn);
}

.query-notice p {
  margin: 6px 0;
  color: var(--text);
  font-weight: 700;
}

.query-notice span {
  color: var(--muted);
  font-size: 12px;
}

.verified-lock {
  border: 1px solid #b8decf;
  border-radius: 8px;
  padding: 12px;
  color: var(--ok);
  background: #e7f4ef;
  font-weight: 700;
}

.hidden {
  display: none;
}

.track-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(160px, 0.7fr) auto;
  gap: 14px;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.admin-dashboard {
  margin-top: 22px;
}

.data-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr) minmax(160px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metrics div {
  background: linear-gradient(180deg, #ffffff 0%, #f5faf8 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(31, 45, 61, 0.08);
}

.metrics span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #075386;
}

.branch-dashboard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.priority-panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.priority-list {
  display: grid;
}

.priority-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.priority-action {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.rectify-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.view-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #bfd7e8;
  border-radius: 6px;
  background: #f4f9fc;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.priority-card:hover,
.request-item:hover {
  background: #f5faf8;
}

.priority-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
}

.priority-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.priority-reason {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e4c17d;
  border-radius: 8px;
  background: #fff8e8;
}

.priority-reason strong {
  color: var(--warn);
  font-size: 12px;
}

.priority-reason p {
  margin: 4px 0;
  color: var(--text);
  font-weight: 700;
}

.priority-reason span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.dashboard-title h3 {
  margin: 0 0 4px;
}

.dashboard-title p {
  margin: 0;
  color: var(--muted);
}

.dashboard-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.status-table-scroll {
  overflow: auto;
}

.branch-status-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.branch-status-table th,
.branch-status-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.branch-status-table th:first-child,
.branch-status-table td:first-child,

.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.dashboard-title h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand);
}

.dashboard-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.status-table-scroll {
  overflow: auto;
}

.branch-status-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.branch-status-table th,
.branch-status-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}

.branch-status-table th {
  background: #f1f5f9;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.branch-status-table tbody tr:hover {
  background: #f8fafc;
}

.branch-status-table th:first-child,
.branch-status-table td:first-child,
.branch-status-table th:nth-child(2),
.branch-status-table td:nth-child(2) {
  text-align: left;
}

.branch-status-table th {
  background: #eef6f4;
  color: var(--brand-dark);
  font-size: 12px;
}

.branch-status-table tbody tr:hover {
  background: #fbfcfd;
}

.branch-status-table tfoot td {
  background: #f4f7f6;
  font-weight: 800;
  color: var(--brand-dark);
}

.status-count {
  min-width: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2f4;
  color: var(--text);
  font-weight: 800;
}

.status-count.query {
  background: #fff1d6;
  color: var(--warn);
}

.status-count.verified {
  background: #e7f4ef;
  color: var(--ok);
}

.status-count.rejected {
  background: #f9e5e5;
  color: var(--accent);
}

.workbench {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

aside,
.detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.list-head select {
  width: 150px;
  min-height: 36px;
  padding: 7px;
}

.request-list {
  max-height: 560px;
  overflow: auto;
}

.request-item {
  width: 100%;
  display: block;
  text-align: left;
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 0;
  padding: 14px;
}

.request-item.active {
  background: #eaf5f3;
  border-left-color: var(--brand);
}

.request-item.status-submitted,
.priority-card.status-submitted,
.request-item.status-under-scrutiny,
.priority-card.status-under-scrutiny,
.request-item.status-resubmitted,
.priority-card.status-resubmitted {
  border-left-color: var(--gold);
}

.request-item.status-query-raised,
.priority-card.status-query-raised {
  border-left-color: var(--warn);
}

.request-item.status-verified,
.priority-card.status-verified {
  border-left-color: var(--ok);
}

.request-item.status-rejected,
.priority-card.status-rejected {
  border-left-color: var(--accent);
}

.request-item strong {
  display: block;
  margin-bottom: 5px;
}

.request-item span {
  color: var(--muted);
  font-size: 13px;
}

.detail {
  min-height: 560px;
  padding: 20px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.empty-state {
  min-height: 500px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.field-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.field-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.asset-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.asset-card img {
  width: 120px;
  height: 90px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.asset-card .asset-placeholder {
  width: 120px;
  height: 90px;
}

.asset-card a {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-dark);
  font-weight: 700;
}

.doc-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.doc-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mini-button {
  padding: 7px 10px;
  min-width: 62px;
}

.mini-link {
  color: var(--brand-dark);
  font-weight: 800;
  white-space: nowrap;
}

.document-viewer {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 18px;
  background: #f8fbfb;
  overflow: hidden;
}

.document-viewer.fullscreen {
  position: fixed;
  inset: 14px;
  z-index: 30;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f8fbfb;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.document-viewer.fullscreen .viewer-stage {
  flex: 1;
  min-height: 0;
}

.document-viewer.fullscreen .viewer-scroll {
  height: calc(100vh - 160px);
}

.document-viewer.fullscreen .viewer-frame {
  height: calc(100vh - 190px);
}

.viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.viewer-head h3,
.viewer-head p {
  margin: 0;
}

.viewer-head p {
  color: var(--muted);
}

.viewer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#doc-zoom-label {
  min-width: 48px;
  text-align: center;
  font-weight: 800;
  color: var(--brand-dark);
}

.viewer-stage {
  min-height: 480px;
  background: linear-gradient(180deg, #eef5f4 0%, #f9fbfb 100%);
}

.viewer-empty {
  min-height: 480px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.viewer-file-name {
  padding: 10px 14px;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: #f7fbfa;
}

.viewer-scroll {
  height: min(68vh, 720px);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
}

.viewer-frame {
  width: min(940px, 100%);
  height: 680px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.viewer-image {
  max-width: min(940px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}

.timeline li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
}

.timeline li > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--brand);
}

.timeline p {
  color: var(--muted);
  margin-bottom: 0;
}

.status-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 10px;
  align-items: end;
}

.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.submitted,
.badge.scrutiny,
.badge.resubmitted {
  background: #fff8e8;
  color: var(--warn);
}

.badge.query {
  background: #fff1d6;
  color: var(--warn);
}

.badge.verified {
  background: #e7f4ef;
  color: var(--ok);
}

.badge.rejected {
  background: #f9e5e5;
  color: var(--accent);
}

@media (max-width: 860px) {
  .topbar,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-block {
    align-items: flex-start;
  }

  .bank-logo {
    width: 180px;
    height: 48px;
  }

  .tabs,
  .track-box,
  .data-filters,
  .workbench,
  .metrics,
  .detail-grid,
  .status-row,
  .page-thumb-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
  }

  .form-grid,
  .checklist,
  .scan-panel {
    grid-template-columns: 1fr;
  }

  .quality-panel {
    flex-direction: column;
  }

  .upload-first,
  .extraction-panel,
  .extraction-result,
  .preview-main,
  .submission-assets,
  .submission-asset,
  .asset-grid,
  .asset-card {
    grid-template-columns: 1fr;
  }
}

