:root {
  --brand: #0d4f8b;
  --brand-dark: #083a66;
  --accent: #ca2027;
  --bg: #f7f7f7;
  --card: #ffffff;
  --text: #222;
  --muted: #6b7280;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Public Sans", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

.topbar {
  background: #fff;
  box-shadow: 0 3px 5px rgba(0,0,0,.1);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 10px 20px;
}
.topbar .wrap {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { height: 48px; width: auto; }
.tagline { font-size: 14px; color: var(--muted); }
.tagline a { color: var(--accent); text-decoration: underline; }

.page {
  max-width: 1170px;
  margin: 110px auto 40px;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 32px;
}

.verified-section { text-align: center; }
.loader { width: 100px; margin: 0 auto 12px; display: block; }
.badge { width: 72px; margin: 8px auto; display: block; }
.status-title { font-size: 22px; font-weight: 700; margin: 8px 0 4px; }
.status-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }

.row-info {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.row-info:last-child { border-bottom: none; }
.row-label { flex: 0 0 30%; color: var(--muted); font-size: 14px; }
.row-value { flex: 1; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 12px; }
.row-value img { max-height: 60px; max-width: 110px; object-fit: contain; }

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 24px;
  border-radius: 8px;
  background: #4da54c;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.view-btn img { height: 18px; }

.detail-section { display: none; margin-top: 24px; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.viewer {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}
.viewer img { width: 100%; height: auto; display: block; }
.viewer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.viewer-controls button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.viewer-controls .page-info { font-size: 13px; color: var(--muted); }

.meta-title { font-size: 13px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.meta-value { font-size: 16px; font-weight: 600; margin-bottom: 16px; word-break: break-word; }
.meta-value.small { font-size: 13px; font-family: monospace; background: #f9f9f9; padding: 8px; border-radius: 6px; border: 1px solid var(--border); }

.note { font-size: 14px; color: var(--muted); margin: 16px 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.action-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.action-btn.blockchain { background: var(--brand); color: #fff; }
.action-btn.download { background: #4da54c; color: #fff; }

.footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer a { color: var(--brand); }

.otp-section { display: none; text-align: center; }
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.otp-inputs input {
  width: 48px; height: 52px;
  text-align: center; font-size: 22px; font-weight: 700;
  border: 2px solid var(--border); border-radius: 8px;
}
.otp-inputs input:focus { border-color: var(--brand); outline: none; }

.doc-selector {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  background: #fff;
}
.doc-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.hidden { display: none !important; }