/* ============================================
   DOCUMENT PAGES — Upload & Report styles
   ============================================ */

/* ---- DOC PAGE SHELL ---- */
.doc-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
}

/* ---- HEADER ---- */
.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 8vw;
  border-bottom: 1px solid var(--border-subtle);
}

.doc-brand {
  text-decoration: none;
}

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}

.doc-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

/* ---- DOC HERO ---- */
.doc-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 8vw;
}

.doc-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.doc-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin: 0.5rem 0 1rem;
}

.doc-sub {
  font-size: 1rem;
  color: var(--silver-dim);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- FORM SECTIONS ---- */
.form-section {
  margin-bottom: 3rem;
}

.form-section .section-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-bright);
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: block;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

.field input, .field select, .field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.field input:focus, .field select:focus {
  border-color: var(--purple);
}

.field input::placeholder {
  color: var(--silver-muted);
}

/* ---- IMAGE GRID ---- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.image-slot {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  transition: border-color 0.2s;
  overflow: hidden;
}

.image-slot.filled {
  border-color: var(--purple);
}

.slot-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  width: 100%;
}

.slot-icon {
  width: 28px;
  height: 28px;
  color: var(--silver-muted);
}

.slot-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.file-input {
  display: none;
}

.slot-upload-btn {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-bright);
  border: 1px solid var(--purple);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.slot-upload-btn:hover {
  background: var(--purple-glow);
}

/* ---- FORM ACTIONS ---- */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.form-note {
  font-size: 0.75rem;
  color: var(--silver-muted);
  font-style: italic;
}

.btn-submit {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 0.9rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--purple-bright);
  box-shadow: 0 0 20px var(--purple-glow-strong);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- SUCCESS OVERLAY ---- */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 18, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.success-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.success-icon svg {
  width: 60px;
  height: 60px;
}

.success-card h2 {
  font-size: 1.8rem;
  margin: 0;
}

.vau-id-display {
  font-family: 'DM Sans', monospace;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--purple-bright);
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  background: var(--bg-raised);
}

.success-card p {
  color: var(--silver-dim);
  font-size: 0.9rem;
}

.btn-view-report {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 2.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.btn-view-report:hover {
  background: var(--purple-bright);
}

/* ============================================
   REPORT PAGE
   ============================================ */
.report-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 8vw;
}

.report-not-found {
  text-align: center;
  padding: 6rem 0;
}

.report-not-found h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.report-not-found p {
  color: var(--silver-dim);
  margin-bottom: 2rem;
}

.btn-home {
  display: inline-block;
  border: 1px solid var(--purple);
  color: var(--purple-bright);
  text-decoration: none;
  padding: 0.8rem 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Banner */
.report-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 0;
}

.banner-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--silver-dim);
  letter-spacing: 0.1em;
}

.banner-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #3DD68C;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(61, 214, 140, 0.5);
}

.status-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3DD68C;
}

/* VAU strip */
.vau-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-top: none;
  margin-bottom: 2rem;
}

.vau-strip-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.vau-strip-value {
  font-family: 'DM Sans', monospace;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--purple-bright);
  letter-spacing: 0.1em;
}

/* Report grid */
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.report-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.report-field-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.report-field-value {
  font-size: 0.95rem;
  color: var(--silver);
}

/* Report section */
.report-section {
  margin-bottom: 2rem;
}

.report-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-muted);
  margin-bottom: 1rem;
}

.report-images-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}

.report-image-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.report-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.report-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-img-placeholder span {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.report-img-label {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-muted);
  text-align: center;
}

/* Meta row */
.report-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.report-meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.report-meta-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.report-meta-value {
  font-size: 0.9rem;
  color: var(--silver);
}

.meta-placeholder {
  color: var(--silver-muted);
  font-style: italic;
}

.status-badge {
  color: #3DD68C;
  font-weight: 500;
}

/* Date */
.report-date {
  font-size: 0.75rem;
  color: var(--silver-muted);
  margin-bottom: 2.5rem;
}

/* QR section */
.report-qr-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
}

.qr-placeholder {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.qr-grid {
  width: 64px;
  height: 64px;
  background:
    linear-gradient(90deg, var(--silver-muted) 25%, transparent 25%) -2px 0,
    linear-gradient(var(--silver-muted) 25%, transparent 25%) -2px 0,
    var(--bg-card);
  background-size: 8px 8px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
}

.qr-label {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-muted);
}

.qr-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.qr-verification {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--purple-bright);
}

.qr-url {
  font-size: 0.75rem;
  color: var(--silver-dim);
  word-break: break-all;
}

/* Report footer */
.report-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 8vw 3rem;
  text-align: center;
}

.btn-new {
  display: inline-block;
  border: 1px solid var(--purple);
  color: var(--purple-bright);
  text-decoration: none;
  padding: 0.8rem 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.btn-new:hover {
  background: var(--purple-glow);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .doc-header { padding: 1.2rem 6vw; }
  .doc-main { padding: 3rem 6vw; }
  .report-main { padding: 2rem 6vw; }
  .fields-grid { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: repeat(4, 1fr); }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .report-images-grid { grid-template-columns: repeat(4, 1fr); }
  .report-meta-row { grid-template-columns: 1fr; }
  .report-qr-section { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .fields-grid { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: repeat(2, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
  .report-images-grid { grid-template-columns: repeat(4, 1fr); }
}