/* ============ MEMBERS AREA ============ */
body.members-body { background: var(--bg-alt); }

.members-header { background: #fff; border-bottom: 1px solid #e8ebf3; position: sticky; top: 0; z-index: 40; }
.members-header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.members-nav { display: flex; gap: 20px; margin-left: 12px; }
.members-nav a { color: var(--ink-soft); font-weight: 500; font-size: 0.92rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.members-nav a.active, .members-nav a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.members-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.plan-badge { background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; }
.plan-badge.trial { background: #b45309; }
.credit-chip { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

.members-main { padding: 32px 0 72px; }

.trial-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 14px;
  padding: 16px 20px; margin-bottom: 24px; font-size: 0.95rem; color: var(--ink);
}

/* dashboard stat cards */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.dash-grid.dash-grid--2 { grid-template-columns: repeat(2, 1fr); }
.dash-card { background: #fff; border: 1px solid #e8ebf3; border-radius: 14px; padding: 20px 22px; }
.dash-card .label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.dash-card .value { font-size: 1.7rem; font-weight: 800; margin-top: 4px; }
.dash-card .sub { font-size: 0.85rem; color: var(--ink-soft); }
.meter { height: 8px; background: var(--bg-alt); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.meter > div { height: 100%; background: var(--brand); border-radius: 999px; }

/* search panel */
.search-panel { background: #fff; border: 1px solid #e8ebf3; border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.search-panel h2 { font-size: 1.2rem; margin-bottom: 14px; }

/* Photo tab: upload / drag-&-drop zone in the lookup row (mirrors the homepage) */
.input-row .photo-drop { flex: 1; display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin: 0; border: 1.5px dashed #d8ddeb; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.input-row .photo-drop[hidden] { display: none; }
.type-tabs { display: flex; gap: 6px; background: var(--bg-alt); border-radius: 12px; padding: 5px; margin-bottom: 16px; overflow-x: auto; }
.type-tabs button { flex: 1; border: none; background: transparent; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); padding: 9px 8px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.type-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(19, 26, 46, 0.10); }
/* out-of-credits upsell shown under the search box (replaces the plain red error) */
.search-upsell {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--brand-light); border: 1px solid #c8ebd9;
  font-size: 0.92rem; color: var(--ink); line-height: 1.5;
}
.search-upsell > span { flex: 1; min-width: 220px; }
.search-upsell .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) { .search-upsell .btn { width: 100%; } }

/* recent lookups */
.recent-list { background: #fff; border: 1px solid #e8ebf3; border-radius: 16px; padding: 8px 0; }
.recent-list h2 { font-size: 1.05rem; padding: 14px 22px 6px; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid #f0f2f8; color: inherit; }
.recent-item:hover { background: var(--bg-alt); }
.recent-item .ri-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--brand-light); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.recent-item .ri-icon .type-ico { width: 18px; height: 18px; }
.recent-item .ri-label { font-weight: 600; font-size: 0.95rem; }
.recent-item .ri-q { color: var(--ink-soft); font-size: 0.85rem; }
.recent-item .ri-meta { margin-left: auto; font-size: 0.78rem; color: var(--ink-soft); text-align: right; }
.recent-item .nomatch { color: #b45309; font-weight: 600; }

/* report */
.report-wrap { max-width: 880px; margin: 0 auto; }
.report-head { background: #fff; border: 1px solid #e8ebf3; border-radius: 16px; padding: 24px; margin-bottom: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.report-head h1 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.report-head h1 .type-ico { width: 26px; height: 26px; color: var(--brand); flex-shrink: 0; }
/* inline status/lock icons that replaced emoji */
.lock-ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; opacity: .85; }
.check-ico { width: 17px; height: 17px; vertical-align: -3px; margin-right: 7px; color: var(--brand); }
.credit-chip .chip-ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; }
.report-head .source-tag { font-size: 0.78rem; color: var(--ink-soft); }
.report-section { background: #fff; border: 1px solid #e8ebf3; border-radius: 16px; padding: 22px 24px; margin-bottom: 18px; }
.report-section h2 { font-size: 1.05rem; margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.field { background: var(--bg-alt); border-radius: 10px; padding: 10px 14px; }
.field .f-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.field .f-value { font-weight: 600; font-size: 0.97rem; overflow-wrap: anywhere; }
.field .f-value#email-value { font-size: 0.85rem; }
.masked { position: relative; }
.masked .f-value { filter: blur(5px); user-select: none; }
.masked::after { content: ""; width: 13px; height: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .55; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }

.upsell-card { background: linear-gradient(160deg, #fff, var(--brand-light)); border: 1.5px solid #c8ebd9; border-radius: 16px; padding: 24px; margin-bottom: 18px; }
.upsell-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.upsell-card p { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 12px; }
.upsell-card ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-bottom: 16px; }
.upsell-card li { display: flex; gap: 8px; font-size: 0.9rem; font-weight: 500; }
.upsell-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upsell-price { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); }
.locked-note { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 14px; font-size: 0.88rem; color: #92400e; }
.nmvtis-note { font-size: 0.74rem; color: var(--ink-soft); margin-top: 10px; }

.status-banner { border-radius: 12px; padding: 12px 18px; margin-bottom: 18px; font-size: 0.92rem; font-weight: 600; }
.status-banner.cached { background: var(--brand-light); color: var(--brand-dark); }
.status-banner.warn { background: #fff7ed; border: 1px solid #fed7aa; color: #92400e; }

.match-list { list-style: none; display: grid; gap: 10px; }
.match-list li { display: flex; align-items: center; gap: 12px; background: var(--bg-alt); border-radius: 10px; padding: 12px 14px; }
.match-thumb { width: 44px; height: 44px; border-radius: 8px; background: linear-gradient(135deg, #c9d4ec, #e7ecf7); flex-shrink: 0; }
.match-list .m-url { font-weight: 600; font-size: 0.9rem; word-break: break-all; }
.match-list .m-meta { font-size: 0.78rem; color: var(--ink-soft); }

/* billing */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.history-list { list-style: none; }
.history-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f8; font-size: 0.92rem; }
.history-list .h-ts { color: var(--ink-soft); font-size: 0.8rem; }

/* purchase confirmation overlay */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 17, 34, 0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.confirm-box {
  background: #fff; border-radius: 18px; padding: 32px 30px 24px;
  max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg); animation: pop 0.22s ease;
}
.confirm-box h3 { font-size: 1.25rem; margin-bottom: 10px; text-align: center; }
.confirm-item { font-size: 1.02rem; margin-bottom: 12px; text-align: center; }
.confirm-legal {
  background: var(--bg-alt); border-radius: 10px; padding: 12px 14px;
  font-size: 0.85rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: 18px;
}
.confirm-legal a { color: var(--brand); text-decoration: underline; }
.confirm-box .confirm-cancel { margin-top: 8px; }

/* login */
.login-main { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.demo-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

.empty-note { color: var(--ink-soft); font-size: 0.92rem; padding: 14px 22px; }

@media (max-width: 760px) {
  .dash-grid, .billing-grid { grid-template-columns: 1fr; }
  .type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .type-tabs button { flex: none; }
  .members-nav { display: none; }
}

/* members footer */
.members-footer { border-top: 1px solid #e8ebf3; background: #fff; padding: 24px 0; margin-top: 40px; text-align: center; }
.members-footer p { font-size: 0.8rem; color: var(--ink-soft); margin: 3px 0; }
.members-footer a { color: var(--brand); }

/* ---- per-report "Download PDF" control (top-right of each report heading) ---- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head h2 { margin-bottom: 0; }
.btn-pdf { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--brand-dark); border: 1.5px solid var(--brand); font-weight: 700; padding: 7px 13px; font-size: 0.84rem; }
.btn-pdf:hover { background: var(--brand-light); }
.btn-pdf svg { width: 15px; height: 15px; }
.btn-pdf.locked { color: var(--ink-soft); border-color: #d7dcea; }
.btn-pdf.locked:hover { background: var(--bg-alt); border-color: var(--brand); color: var(--brand-dark); }

/* ---- print: a clean, branded ONE-report PDF (not the whole website) ---- */
#rs-print { display: none; }
#rs-print .pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--brand); padding-bottom: 12px; margin-bottom: 18px; }
#rs-print .pd-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.3rem; color: var(--ink); }
#rs-print .pd-brand em { color: var(--brand); font-style: normal; }
#rs-print .pd-brand svg { color: var(--brand); flex: none; }
#rs-print .pd-meta { text-align: right; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; }
#rs-print .pd-meta strong { display: block; color: var(--ink); font-size: 0.95rem; }
#rs-print .pd-subject { font-size: 1.5rem; font-weight: 800; margin: 0 0 18px; }
#rs-print .report-section { background: #fff; border: 1px solid #e8ebf3; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; break-inside: avoid; }
#rs-print .report-section h2 { font-size: 1.02rem; margin-bottom: 12px; }
#rs-print .pd-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid #e8ebf3; font-size: 0.72rem; color: var(--ink-soft); line-height: 1.55; }
#rs-print .pd-foot p { margin: 0 0 4px; }
@media print {
  body.rs-printing { background: #fff !important; }
  body.rs-printing > *:not(#rs-print) { display: none !important; }
  body.rs-printing #rs-print { display: block !important; }
  #rs-print, #rs-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 16mm 14mm; }
}
