:root {
  --primary:       #1d4ed8;
  --primary-dark:  #1e40af;
  --primary-light: #eff6ff;
  --accent:        #f59e0b;
  --body-bg:       #f1f5f9;
  --border:        #e8eaed;
}
body {
  background: var(--body-bg);
  font-family: 'Inter', system-ui, sans-serif;
  color: #1e293b;
}

/* ---- Navbar — dark gradient ---- */
.top-nav {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-nav .brand {
  color: white; font-weight: 700; font-size: 1.15rem;
  text-decoration: none; display: flex; align-items: center; gap: 0.6rem;
}
.top-nav .brand .badge-entity {
  background: rgba(255,255,255,0.15); color: white;
  font-size: 0.7rem; padding: 0.25rem 0.6rem; border-radius: 20px; font-weight: 500;
}

/* ---- Hero — blue gradient ---- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  padding: 3.5rem 0 5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero h1 { color: white; font-size: 1.75rem; font-weight: 700; position: relative; }
.hero h1 i { color: rgba(255,255,255,0.85); }
.hero p  { color: rgba(255,255,255,0.85); font-size: 0.95rem; position: relative; }
.hero p strong { color: white; }

/* ---- Form card ---- */
.form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  padding: 2.5rem;
  margin-top: -3rem;
  position: relative;
  border: 1px solid var(--border);
}
.section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: #64748b;
  padding-bottom: 0.55rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid #f0f2f5;
  display: flex; align-items: center; gap: 0.5rem;
}
.form-label { font-weight: 600; font-size: 0.875rem; color: #374151; }
.form-label .req { color: #ef4444; }
.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fafafa;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
  background-color: white;
}
.form-control.is-invalid { border-color: #ef4444; }

/* ---- File upload ---- */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f9fafb;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone .upload-icon { font-size: 2.25rem; color: #94a3b8; margin-bottom: 0.75rem; }
.upload-zone.drag-over .upload-icon { color: var(--primary); }
#documents { display: none; }
.file-list { margin-top: 1rem; }
.file-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: #f9fafb; border: 1px solid var(--border);
  border-radius: 8px; padding: 0.6rem 0.85rem;
  margin-bottom: 0.5rem; font-size: 0.85rem;
}
.file-item .file-name { flex: 1; font-weight: 500; color: #1e293b; word-break: break-all; }
.file-item .file-size { color: #64748b; white-space: nowrap; }
.file-item .file-preview { cursor: pointer; color: #0891b2; padding: 0 0.25rem; font-size: 1rem; }
.file-item .file-remove  { cursor: pointer; color: #ef4444; padding: 0 0.25rem; font-size: 1rem; }
.file-item .file-icon    { font-size: 1.2rem; color: var(--primary); }

/* ---- Submit button ---- */
.btn-submit {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border: none; border-radius: 8px;
  padding: 0.8rem 2.5rem;
  font-size: 0.95rem; font-weight: 700;
  color: white; letter-spacing: 0.2px;
  transition: background 0.15s;
  width: 100%;
}
.btn-submit:hover { background: var(--primary-dark); color: white; }
.btn-submit:active { background: #3730a3; }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* ---- Info panel ---- */
.info-panel { position: sticky; top: 1.5rem; }
.info-card {
  background: white; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden; border: 1px solid var(--border);
}
.info-card-header {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white; padding: 1.1rem 1.5rem;
  border-bottom: none;
}
.info-card-header h6 { font-weight: 700; margin: 0; font-size: 0.875rem; }
.info-card-body { padding: 1.25rem 1.5rem; }
.info-step {
  display: flex; gap: 0.85rem; align-items: flex-start;
  margin-bottom: 1rem; font-size: 0.85rem; color: #374151;
}
.info-step:last-child { margin-bottom: 0; }
.step-num {
  width: 24px; height: 24px; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.72rem;
}
.entity-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--primary-light); color: var(--primary);
  border-radius: 6px; padding: 0.45rem 0.85rem;
  font-size: 0.82rem; font-weight: 600; margin: 0.25rem;
  border: 1px solid #c7d2fe;
}

/* ---- Errors ---- */
.error-box {
  background: #fff1f2; border: 1px solid #fecdd3;
  border-radius: 10px; padding: 1rem 1.25rem;
  color: #be123c; font-size: 0.875rem;
}

/* ---- Success ---- */
.success-wrap {
  min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 3rem 0;
}
.success-card {
  background: white; border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  padding: 3rem 2.5rem; text-align: center; max-width: 480px; width: 100%;
  border: 1px solid var(--border);
}
.success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; font-size: 2.25rem; color: white;
}
.ref-badge {
  display: inline-block;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  color: #1d4ed8; font-family: monospace; font-size: 1.05rem;
  font-weight: 700; letter-spacing: 1px;
  padding: 0.5rem 1.25rem; border-radius: 8px; margin: 0.75rem 0;
}
.btn-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: white; border: none; border-radius: 8px;
  padding: 0.65rem 1.75rem; font-weight: 600; font-size: 0.875rem;
  text-decoration: none; transition: background 0.15s;
}
.btn-back:hover { background: var(--primary-dark); color: white; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .form-card { padding: 1.5rem; }
  .hero h1 { font-size: 1.4rem; }
  .hero { padding-bottom: 4.5rem; }
}
