.ogm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 10001; display: flex; align-items: stretch; justify-content: center;
}
.ogm-overlay.hidden { display: none; }
.ogm-dialog {
  background: #f8fafc; width: 100%; max-width: 580px;
  display: flex; flex-direction: column;
  height: 100dvh; max-height: 100dvh; overflow: hidden; position: relative;
}
@media (max-width: 639px) {
  .ogm-dialog { max-width: 100vw; width: 100vw; }
  .ogm-body { padding: 10px 10px; overflow-x: hidden; }
  /* Prevent iOS zoom on input focus — must be 16px+ */
  .ogm-field input,
  .ogm-field textarea,
  .ogm-field select,
  .ogm-sig-typed-input { font-size: 16px !important; }
  /* Rows wrap on small screens so nothing bleeds off-screen */
  .ogm-row { flex-wrap: nowrap; padding: 8px 8px 2px; gap: 6px; }
  .ogm-field { min-width: 0; box-sizing: border-box; flex: 1; }
  .ogm-field-mi { flex: 0 0 52px !important; width: 52px !important; }
  .ogm-field-grow { flex: 1; }
  .ogm-section { overflow: hidden; }

}
@media (min-width: 640px) {
  .ogm-overlay { align-items: center; padding: 16px; }
  .ogm-dialog  { border-radius: 14px; height: min(760px, 94vh); max-height: 94vh; }
}
.ogm-opt { font-weight: 400; color: #94a3b8; font-size: 0.68rem; }
.ogm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.ogm-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.95rem; color: #0f172a; }
.ogm-muni  { font-size: 0.78rem; color: #64748b; font-weight: 400; }
.ogm-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: #94a3b8; padding: 6px 8px; border-radius: 6px; }
.ogm-close:hover { background: #f1f5f9; color: #0f172a; }

/* Property strip — compact, no scroll needed */
.ogm-prop-strip {
  flex-shrink: 0;
  background: #eff6ff; border-bottom: 1px solid #dbeafe;
  padding: 8px 16px 10px;
}
.ogm-prop-addr {
  font-size: 0.88rem; font-weight: 600; color: #1e3a8a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.ogm-prop-meta { display: flex; gap: 12px; font-size: 0.75rem; color: #475569; }
.ogm-prop-meta span { font-weight: 500; }
.ogm-prop-meta strong { color: #1e3a8a; }

/* Scrollable body — everything below property strip */
.ogm-body { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.ogm-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: visible; padding-bottom: 4px; }
.ogm-section-title { padding: 8px 14px; font-size: 0.78rem; font-weight: 700; color: #1e3a8a; background: #eff6ff; border-bottom: 1px solid #dbeafe; display: flex; align-items: center; gap: 8px; border-radius: 10px 10px 0 0; }
.ogm-badge { font-size: 0.65rem; padding: 2px 7px; border-radius: 10px; background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.ogm-badge-req { background: #fef3c7; color: #92400e; }

.ogm-row { display: flex; gap: 8px; padding: 8px 12px 2px; }
.ogm-row-2 { }
.ogm-row-3 { }
.ogm-field { display: flex; flex-direction: column; gap: 3px; flex: 1; padding-bottom: 6px; }
.ogm-field label { font-size: 0.68rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.ogm-field input, .ogm-field textarea, .ogm-field select {
  border: 1.5px solid #e2e8f0; border-radius: 7px; padding: 7px 9px;
  font-size: 0.88rem; color: #0f172a; background: #fff; outline: none;
  font-family: inherit; transition: border-color 0.15s;
}
.ogm-field input:focus, .ogm-field textarea:focus, .ogm-field select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.ogm-field input[readonly] { background: #f8fafc; color: #475569; cursor: default; }
.ogm-field textarea { resize: none; min-height: 70px; }

.ogm-quick-picks { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.ogm-pick {
  padding: 5px 10px; border-radius: 20px; border: 1.5px solid #e2e8f0;
  background: #f8fafc; color: #475569; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.12s;
}
.ogm-pick:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.ogm-pick.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* OPRA Tracker */
.ogm-tracker { border-top: 1px solid #e2e8f0; }
.ogm-tracker-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 0.72rem; font-weight: 600; color: #64748b; cursor: pointer; user-select: none; }
.ogm-tracker-header:hover { background: #f8fafc; }
.ogm-tracker-count { font-weight: 400; }
.ogm-tracker-chevron { font-size: 0.6rem; color: #94a3b8; }
.ogm-tracker-list { max-height: 160px; overflow-y: auto; padding: 0 10px 6px; }
.ogm-tracker-item { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px; background: #f8fafc; border-radius: 5px; margin-bottom: 3px; border-left: 3px solid #22c55e; }
.ogm-tracker-item.ogm-tracker-warn { border-left-color: #f59e0b; }
.ogm-tracker-item.ogm-tracker-urgent { border-left-color: #ef4444; }
.ogm-tracker-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ogm-tracker-muni { font-size: 0.75rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ogm-tracker-meta { font-size: 0.65rem; color: #64748b; }
.ogm-tracker-clear { background: none; border: none; color: #94a3b8; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 2px; flex-shrink: 0; }
.ogm-tracker-clear:hover { color: #ef4444; }
.ogm-tracker-clear-all { background: none; border: none; font-size: 0.65rem; color: #94a3b8; cursor: pointer; padding: 0; }
.ogm-tracker-clear-all:hover { color: #ef4444; }

.ogm-footer {
  padding: 12px 16px; background: #fff; border-top: 1px solid #e2e8f0; flex-shrink: 0;
}
.ogm-disclaimer { font-size: 0.72rem; color: #94a3b8; margin: 0 0 10px; text-align: center; }
.ogm-footer-actions { display: flex; gap: 8px; align-items: center; }
.ogm-btn {
  flex: 1; padding: 11px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 0.88rem; font-weight: 700; transition: background 0.13s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ogm-btn-primary { background: #2563eb; color: #fff; }
.ogm-btn-primary:hover { background: #1d4ed8; }
.ogm-btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.ogm-btn-secondary { background: #f0fdf4; color: #15803d; border: 1.5px solid #86efac; }
.ogm-btn-secondary:hover { background: #dcfce7; }
.ogm-btn-ghost { background: transparent; color: #6b7280; border: 1.5px solid #e5e7eb; }
.ogm-btn-ghost:hover { background: #f9fafb; color: #374151; }

/* Generate OPRA button in OPRA section */
.btn-opra-generate {
  display: block;
  width: 100%;
  padding: 10px 22px;
  background: var(--color-primary, #2563eb);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.15s;
}
.btn-opra-generate:hover { background: #1d4ed8; }

.opra-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-width: 240px;
}
@media (max-width: 480px) {
  .opra-btn-row { max-width: 100%; }
}

.btn-opra-unified {
  display: block;
  width: 100%;
  background: #f3f4f6;
  color: #374151 !important;
  border: 1.5px solid #d1d5db;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn-opra-unified:hover {
  background: #e5e7eb;
  color: #111827 !important;
  text-decoration: none !important;
}

/* Send OPRA Request — the primary CTA, always blue */
.btn-opra-unified.btn-opra-cta {
  background: var(--color-primary, #2563eb);
  color: #fff !important;
  border: none;
}
.btn-opra-unified.btn-opra-cta:hover {
  background: #1d4ed8;
  color: #fff !important;
}


/* Signature pad */
/* Delivery + certifications */
.ogm-row-3 { display: flex; gap: 8px; }
.ogm-field-grow { flex: 1; }
.ogm-field-mi { width: 52px; flex: 0 0 52px; flex-shrink: 0; }
.ogm-field-mi input { text-align: center; }

.ogm-delivery-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 14px 12px;
}
.ogm-radio-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  padding: 6px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  transition: all 0.15s;
}
.ogm-radio-opt:has(input:checked) {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
}
.ogm-cert {
  padding: 8px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.ogm-cert:last-child { border-bottom: none; }
.ogm-cert-label {
  font-size: 0.8rem;
  color: #374151;
  margin-bottom: 6px;
}
.ogm-cert-opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Signature outer layout */
.ogm-sig-outer {
  display: block;
  padding: 4px 12px 2px;
}

/* Hologram overlay */
#ogm-sig-hologram {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  overflow: hidden;
}
@keyframes ogm-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(220%); }
}

.ogm-sig-wrap {
  position: relative;
  flex: 1;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.ogm-sig-canvas {
  display: block;
  width: 100%;
  height: 80px;
  cursor: crosshair;
  touch-action: none;
}
@media (max-width: 639px) {
  .ogm-sig-canvas { height: 160px; }
}
.ogm-sig-clear {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 3px 8px;
  font-size: 0.65rem; font-weight: 600;
  color: #94a3b8; background: rgba(248,250,252,0.85);
  border: 1px solid #e2e8f0; border-radius: 5px;
  cursor: pointer;
  z-index: 2;
}
.ogm-sig-clear:hover { color: #ef4444; border-color: #fca5a5; }
.ogm-sig-hint {
  font-size: 0.68rem; color: #94a3b8;
  margin: 2px 12px 8px; text-align: center;
}

/* Signature mode tabs */
.ogm-sig-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 12px 8px;
}
.ogm-sig-tab {
  padding: 5px 14px;
  font-size: 0.75rem; font-weight: 600;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.ogm-sig-tab:hover { border-color: #c7d2fe; color: #4f46e5; background: #eef2ff; }
.ogm-sig-tab-active { background: #4f46e5 !important; color: #fff !important; border-color: #4f46e5 !important; }

/* Icon + label footer buttons */
.ogm-icon-btn {
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.ogm-icon-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.ogm-icon-btn span { display: inline; }
.ogm-icon-btn:hover   { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }
.ogm-icon-save:hover  { border-color: #a5b4fc; color: #4f46e5; background: #eef2ff; }
.ogm-icon-email       { border-color: #6366f1; background: #4f46e5; color: #fff; }
.ogm-icon-email:hover { background: #4338ca; border-color: #4338ca; color: #fff; }
.ogm-icon-download    { border-color: #6366f1; color: #4f46e5; background: #eef2ff; }
.ogm-icon-download:hover { background: #e0e7ff; border-color: #a5b4fc; }
.ogm-icon-btn.ogm-icon-success { border-color: #86efac !important; background: #f0fdf4 !important; color: #16a34a !important; }
.ogm-icon-btn.ogm-icon-loading { opacity: 0.6; cursor: wait; }

/* Mobile: Save + Download icon only, Email Clerk keeps text */
@media (max-width: 480px) {
  .ogm-icon-btn { width: 42px; padding: 0; }
  .ogm-icon-btn span { display: none; }
  .ogm-icon-email { width: auto; padding: 0 16px; flex: 1; }
  .ogm-icon-email span { display: inline; }
}

/* Save + clear X wrapper */
.ogm-save-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ogm-icon-saved { border-color: #a5b4fc !important; color: #4f46e5 !important; background: #eef2ff !important; }
.ogm-icon-saved:hover { background: #fee2e2 !important; border-color: #fca5a5 !important; color: #ef4444 !important; }

/* Typed signature input */
.ogm-sig-type-row {
  padding: 4px 12px 6px;
}
.ogm-sig-typed-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}
.ogm-sig-typed-input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }

/* Typed preview box */
.ogm-sig-type-preview-wrap {
  position: relative;
  margin: 0 12px 4px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  height: 80px;
  display: flex;
  align-items: center;
}
.ogm-sig-type-preview {
  padding: 0 14px;
  font-size: 40px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.3;
  transition: opacity 0.2s;
  line-height: 1;
  z-index: 1;
}
#ogm-sig-hologram-typed {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  overflow: hidden;
}

/* Font picker buttons */
.ogm-sig-font-row {
  display: flex;
  gap: 6px;
  padding: 4px 12px 6px;
  flex-wrap: wrap;
}
.ogm-sig-font-btn {
  padding: 4px 12px;
  font-size: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.ogm-sig-font-btn:hover { border-color: #a5b4fc; background: #eef2ff; }
.ogm-sig-font-active { background: #eef2ff !important; border-color: #6366f1 !important; color: #4f46e5 !important; }

/* ============================================================
   Risk Indicators Card — Collapsible rows
