/* =============================================================================
   Primary Market Research — Platform Theme
   Brand: Navy #1B3A6B | Teal #0A6E6E | Gold #C6922A
   ============================================================================= */

/* ── Reset / Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pmr-navy:   #1B3A6B;
  --pmr-teal:   #0A6E6E;
  --pmr-gold:   #C6922A;
  --pmr-light:  #EBF2FA;
  --pmr-bg:     #F5F7FA;
  --pmr-white:  #FFFFFF;
  --pmr-border: #DEE3EC;
  --pmr-text:   #2C3E50;
  --pmr-muted:  #6B7C93;
  --pmr-radius: 6px;
  --pmr-shadow: 0 2px 8px rgba(27,58,107,0.10);
  --pmr-font:   'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--pmr-font);
  color: var(--pmr-text);
  background: var(--pmr-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pmr-teal); text-decoration: none; }
a:hover { color: var(--pmr-navy); text-decoration: underline; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.pmr-site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.pmr-main         { flex: 1; }

.pmr-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
#pmr-header {
  background: var(--pmr-navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.pmr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.pmr-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pmr-white);
}
.pmr-logo-mark {
  width: 36px; height: 36px;
  background: var(--pmr-gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: var(--pmr-navy);
  flex-shrink: 0;
}
.pmr-logo-text { line-height: 1.1; }
.pmr-logo-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--pmr-white);
  letter-spacing: -0.3px;
}
.pmr-logo-text span {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Primary navigation */
.pmr-nav { display: flex; align-items: center; gap: 4px; }
.pmr-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--pmr-radius);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.pmr-nav a:hover,
.pmr-nav a.is-active {
  background: rgba(255,255,255,0.12);
  color: var(--pmr-white);
}
.pmr-nav a.pmr-nav-cta {
  background: var(--pmr-gold);
  color: var(--pmr-navy);
  font-weight: 700;
  margin-left: 8px;
}
.pmr-nav a.pmr-nav-cta:hover {
  background: #d4a035;
  color: var(--pmr-navy);
}

/* Mobile hamburger */
.pmr-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--pmr-white);
}
.pmr-nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--pmr-white);
  margin: 5px 0;
  transition: transform 0.2s;
}

/* ── Hero banner (front page) ──────────────────────────────────────────────── */
.pmr-hero {
  background: linear-gradient(135deg, var(--pmr-navy) 0%, #0D2545 100%);
  padding: 72px 24px;
  text-align: center;
  color: var(--pmr-white);
}
.pmr-hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--pmr-white);
}
.pmr-hero h1 em {
  color: var(--pmr-gold);
  font-style: normal;
}
.pmr-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.80);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.pmr-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn, .pmr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--pmr-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary, .pmr-btn-primary {
  background: var(--pmr-navy);
  color: var(--pmr-white);
  border-color: var(--pmr-navy);
}
.btn-primary:hover, .pmr-btn-primary:hover {
  background: #152f5a;
  border-color: #152f5a;
  color: var(--pmr-white);
  text-decoration: none;
}
.btn-secondary, .pmr-btn-secondary {
  background: var(--pmr-teal);
  color: var(--pmr-white);
  border-color: var(--pmr-teal);
}
.btn-gold {
  background: var(--pmr-gold);
  color: var(--pmr-navy);
  border-color: var(--pmr-gold);
}
.btn-gold:hover { background: #d4a035; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--pmr-white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--pmr-white);
  color: var(--pmr-white);
  text-decoration: none;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ── Page header ───────────────────────────────────────────────────────────── */
.pmr-page-header {
  background: var(--pmr-white);
  border-bottom: 1px solid var(--pmr-border);
  padding: 32px 24px;
}
.pmr-page-header .pmr-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pmr-page-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--pmr-navy);
  margin: 0;
}
.pmr-breadcrumb {
  font-size: 13px;
  color: var(--pmr-muted);
  margin-bottom: 6px;
}
.pmr-breadcrumb a { color: var(--pmr-muted); }
.pmr-breadcrumb a:hover { color: var(--pmr-teal); }

/* ── Content area ──────────────────────────────────────────────────────────── */
.pmr-content-area { padding: 32px 0; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.pmr-card {
  background: var(--pmr-white);
  border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius);
  box-shadow: var(--pmr-shadow);
  overflow: hidden;
}
.pmr-card-body { padding: 24px; }
.pmr-card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--pmr-border);
  background: var(--pmr-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Report grid (storefront) ──────────────────────────────────────────────── */
.pmr-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.pmr-report-card {
  background: var(--pmr-white);
  border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius);
  box-shadow: var(--pmr-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.pmr-report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,58,107,0.14);
}
.pmr-report-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--pmr-navy), var(--pmr-teal));
}
.pmr-report-card-body { padding: 20px; flex: 1; }
.pmr-report-card-body h3 {
  font-size: 15px;
  line-height: 1.4;
  margin: 10px 0 8px;
  color: var(--pmr-navy);
}
.pmr-report-card-body h3 a { color: inherit; text-decoration: none; }
.pmr-report-card-body h3 a:hover { color: var(--pmr-teal); }
.pmr-report-meta { font-size: 12px; color: var(--pmr-muted); }
.pmr-report-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--pmr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FAFBFC;
}
.pmr-report-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--pmr-navy);
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.pmr-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.pmr-badge-navy    { background: var(--pmr-navy); color: var(--pmr-white); }
.pmr-badge-teal    { background: var(--pmr-teal); color: var(--pmr-white); }
.pmr-badge-gold    { background: var(--pmr-gold); color: var(--pmr-navy); }
.pmr-badge-express { background: var(--pmr-navy); color: var(--pmr-white); }
.pmr-badge-verified{ background: var(--pmr-teal); color: var(--pmr-white); }
.pmr-badge { background: var(--pmr-navy); color: var(--pmr-white); }

/* ── Dashboard stats ───────────────────────────────────────────────────────── */
.pmr-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.pmr-stat-card {
  background: var(--pmr-white);
  border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--pmr-shadow);
  border-top: 3px solid var(--pmr-navy);
}
.pmr-stat-label  { font-size: 12px; color: var(--pmr-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.pmr-stat-value  { font-size: 24px; font-weight: 800; color: var(--pmr-navy); }
.pmr-stat-cta    { display: flex; align-items: center; justify-content: center; border-top-color: var(--pmr-gold); }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.pmr-table-wrap  { overflow-x: auto; }
.pmr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pmr-table th {
  background: var(--pmr-navy);
  color: var(--pmr-white);
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.pmr-table td { padding: 11px 14px; border-bottom: 1px solid var(--pmr-border); vertical-align: middle; }
.pmr-table tr:last-child td { border-bottom: none; }
.pmr-table tr:hover td { background: var(--pmr-light); }

/* ── Status chips ──────────────────────────────────────────────────────────── */
.pmr-status-delivered { color: #0A6E6E; font-weight: 700; }
.pmr-status-active    { color: #C6922A; font-weight: 700; }
.pmr-status-cancelled { color: #999; }
.pmr-status-pending   { color: #6B7C93; }

/* ── Panel / Card blocks ───────────────────────────────────────────────────── */
.pmr-panel {
  background: var(--pmr-white);
  border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--pmr-shadow);
}
.pmr-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.pmr-panel h2 { font-size: 18px; color: var(--pmr-navy); margin: 0; }
.pmr-panel h3 { font-size: 15px; color: var(--pmr-navy); margin: 0 0 12px; }

/* ── Messages ──────────────────────────────────────────────────────────────── */
.messages { padding: 12px 16px; border-radius: var(--pmr-radius); margin: 12px 0; font-size: 14px; }
.messages--status  { background: #d1fae5; border-left: 4px solid #059669; color: #065f46; }
.messages--warning { background: #fef3c7; border-left: 4px solid var(--pmr-gold); color: #78350f; }
.messages--error   { background: #fee2e2; border-left: 4px solid #dc2626; color: #991b1b; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
#pmr-footer {
  background: var(--pmr-navy);
  color: rgba(255,255,255,0.75);
  margin-top: auto;
}
.pmr-footer-main {
  padding: 48px 24px 32px;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.pmr-footer-brand p { font-size: 13px; line-height: 1.7; margin-top: 12px; color: rgba(255,255,255,0.60); }
.pmr-footer-col h4  { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--pmr-gold); margin-bottom: 14px; }
.pmr-footer-col ul  { list-style: none; }
.pmr-footer-col li  { margin-bottom: 8px; }
.pmr-footer-col a   { color: rgba(255,255,255,0.65); font-size: 13px; text-decoration: none; transition: color 0.15s; }
.pmr-footer-col a:hover { color: var(--pmr-white); }
.pmr-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 16px 24px;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.pmr-footer-bottom a { color: rgba(255,255,255,0.45); }
.pmr-footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ── Drupal admin toolbar compatibility ────────────────────────────────────── */
body.toolbar-fixed #pmr-header { top: 39px; }
body.toolbar-fixed.toolbar-tray-open #pmr-header { top: 79px; }

/* ── Progress / misc ───────────────────────────────────────────────────────── */
.pmr-progress-bar-wrap { background: #e9ecef; border-radius: 10px; height: 10px; overflow: hidden; }
.pmr-progress-bar      { background: linear-gradient(90deg, var(--pmr-teal), var(--pmr-navy)); height: 100%; border-radius: 10px; transition: width 0.5s; }
.pmr-progress-meta     { display: flex; justify-content: space-between; font-size: 13px; color: var(--pmr-muted); margin-top: 6px; }

.pmr-spinner {
  width: 36px; height: 36px;
  border: 4px solid var(--pmr-light);
  border-top-color: var(--pmr-navy);
  border-radius: 50%;
  animation: pmr-spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes pmr-spin { to { transform: rotate(360deg); } }

.pmr-empty   { text-align: center; color: var(--pmr-muted); padding: 32px; }
.pmr-link    { color: var(--pmr-teal); font-size: 13px; text-decoration: none; }
.pmr-link:hover { text-decoration: underline; }
.pmr-note    { font-size: 12px; color: var(--pmr-muted); }

/* Staff banner */
.pmr-staff-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--pmr-radius);
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #7d5c00;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.pmr-input, .pmr-textarea, .pmr-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius);
  font-size: 14px;
  font-family: var(--pmr-font);
  color: var(--pmr-text);
  background: var(--pmr-white);
  transition: border-color 0.15s;
}
.pmr-input:focus, .pmr-textarea:focus {
  outline: none;
  border-color: var(--pmr-navy);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.10);
}
.pmr-textarea { resize: vertical; }

/* ── Report tier selector ──────────────────────────────────────────────────── */
.pmr-tier-options { display: flex; gap: 12px; margin: 12px 0 16px; }
.pmr-tier-option  {
  flex: 1; border: 2px solid var(--pmr-border); border-radius: var(--pmr-radius);
  padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.pmr-tier-option:hover  { border-color: var(--pmr-navy); background: var(--pmr-light); }
.pmr-tier-active        { border-color: var(--pmr-navy) !important; background: var(--pmr-light); }
.pmr-tier-icon          { font-size: 20px; }

/* ── TOC items ─────────────────────────────────────────────────────────────── */
.pmr-toc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius); margin-bottom: 6px; background: var(--pmr-white);
  transition: background 0.15s;
}
.pmr-toc-item:hover   { background: var(--pmr-light); }
.pmr-toc-item.excluded{ opacity: 0.45; }
.pmr-toc-item input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--pmr-navy); }
.pmr-toc-caveat { font-size: 11px; color: var(--pmr-muted); margin-left: auto; }

/* ── Cost summary ──────────────────────────────────────────────────────────── */
.pmr-cost-row       { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.pmr-cost-total     { border-top: 2px solid var(--pmr-navy); margin-top: 8px; padding-top: 10px; font-size: 16px; font-weight: 700; }
.pmr-balance-row    { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }

/* ── Add-on items ──────────────────────────────────────────────────────────── */
.pmr-addon-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--pmr-border);
  border-radius: var(--pmr-radius); margin-bottom: 6px;
  cursor: pointer; background: var(--pmr-white); font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.pmr-addon-item:hover { background: var(--pmr-light); border-color: var(--pmr-navy); }
.pmr-addon-item input[type=checkbox] { width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; accent-color: var(--pmr-navy); }
.pmr-addon-item span  { flex: 1; line-height: 1.3; }
.pmr-addon-price      { white-space: nowrap; color: var(--pmr-navy); font-weight: 700; }
#pmr-grand-total      { transition: color 0.2s; }

/* ── Analyst review ────────────────────────────────────────────────────────── */
.pmr-analyst-section        { border: 1px solid var(--pmr-border); border-radius: var(--pmr-radius); margin-bottom: 16px; overflow: hidden; }
.pmr-analyst-section-header { background: var(--pmr-light); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.pmr-analyst-meta           { display: flex; gap: 16px; font-size: 12px; color: var(--pmr-muted); }
.pmr-analyst-editor         { width: 100%; padding: 16px; border: none; border-top: 1px solid var(--pmr-border); font-family: 'Consolas','Courier New',monospace; font-size: 13px; resize: vertical; }
.pmr-analyst-notes          { padding: 8px 12px; border-top: 1px solid #eee; }
.pmr-analyst-toolbar        { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; padding: 16px; background: var(--pmr-light); border-radius: var(--pmr-radius); flex-wrap: wrap; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pmr-header-inner   { padding: 0 16px; }
  .pmr-nav            { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--pmr-navy); padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); gap: 4px; }
  .pmr-nav.is-open    { display: flex; }
  .pmr-nav-toggle     { display: block; }
  .pmr-tier-options   { flex-direction: column; }
  .pmr-dashboard-stats{ grid-template-columns: 1fr 1fr; }
  .pmr-footer-main    { grid-template-columns: 1fr 1fr; }
  .pmr-footer-brand   { grid-column: 1 / -1; }
  .pmr-report-grid    { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pmr-dashboard-stats{ grid-template-columns: 1fr; }
  .pmr-footer-main    { grid-template-columns: 1fr; }
  .pmr-footer-bottom  { flex-direction: column; gap: 8px; text-align: center; }
}
