/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #f8f7f2;
  --surface:     #ffffff;
  --surface2:    #f1efe8;
  --border:      #e0ddd5;
  --text:        #1a1a18;
  --text-muted:  #6b6a65;
  --primary:     #2563eb;
  --primary-h:   #1d4ed8;
  --success:     #16a34a;
  --warning:     #d97706;
  --danger:      #dc2626;
  --sidebar-w:   220px;
  --radius:      8px;
  --shadow:      0 1px 4px rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0f0f0e;
    --surface:    #1a1a18;
    --surface2:   #242422;
    --border:     #2e2e2b;
    --text:       #e8e6df;
    --text-muted: #8a8880;
  }
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Anthropic Sans", system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
code { font-family: "Fira Code", monospace; font-size: 12px; background: var(--surface2); padding: 1px 5px; border-radius: 4px; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.pm-layout { display: flex; height: 100vh; overflow: hidden; }
.pm-sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 0;
  overflow-y: auto;
}
.pm-main { flex: 1; overflow-y: auto; padding: 2rem 2.5rem; }

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.pm-logo {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.25rem 1rem; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px;
}
.pm-logo-icon { font-size: 1.4rem; }
.pm-nav { list-style: none; padding: .5rem 0; flex: 1; }
.pm-nav li a, .pm-nav li .active {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 6px; margin: 1px .5rem;
  color: var(--text); font-size: 13px; transition: background .15s;
}
.pm-nav li a:hover   { background: var(--surface2); }
.pm-nav li a.active  { background: var(--primary); color: #fff; }
.pm-nav-divider      { height: 1px; background: var(--border); margin: .5rem 1rem; }
.pm-nav-section      { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; padding: .4rem 1.5rem .1rem; }
.pm-sidebar-footer   { padding: 1rem; border-top: 1px solid var(--border); }
.pm-user-info        { font-size: 12px; color: var(--text-muted); margin-bottom: .5rem; }
.pm-logout-btn       { font-size: 12px; color: var(--text-muted); }
.pm-logout-btn:hover { color: var(--danger); }

/* ── Page header ───────────────────────────────────────────────────────── */
.pm-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.pm-page-header h1 { font-size: 1.35rem; font-weight: 700; }
.pm-filters { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Stats row ─────────────────────────────────────────────────────────── */
.pm-stats-row { display: flex; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.pm-stat-card {
  flex: 1; min-width: 130px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow);
}
.pm-stat-value  { font-size: 2rem; font-weight: 800; line-height: 1; }
.pm-stat-label  { font-size: 12px; color: var(--text-muted); margin-top: .25rem; }
.pm-stat-green  .pm-stat-value { color: var(--success); }
.pm-stat-orange .pm-stat-value { color: var(--warning); }
.pm-stat-red    .pm-stat-value { color: var(--danger); }

/* ── Sections ──────────────────────────────────────────────────────────── */
.pm-section { margin-bottom: 2rem; }
.pm-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }

/* ── Agent grid (dashboard cards) ─────────────────────────────────────── */
.pm-agent-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.pm-agent-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1rem;
  min-width: 180px; box-shadow: var(--shadow);
}
.pm-agent-card.pm-agent-stale { border-color: var(--warning); }
.pm-agent-name      { font-weight: 600; margin-bottom: .2rem; }
.pm-agent-meta      { font-size: 12px; color: var(--text-muted); }
.pm-agent-devices   { font-size: 13px; margin-top: .4rem; }
.pm-agent-heartbeat { font-size: 11px; color: var(--text-muted); font-family: monospace; }

/* ── Event feed ────────────────────────────────────────────────────────── */
.pm-event-feed { display: flex; flex-direction: column; gap: 2px; }
.pm-event-row {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: .4rem .75rem; font-size: 13px;
}
.pm-event-row.pm-event-disconnected { border-left: 3px solid var(--danger); }
.pm-event-row.pm-event-connected    { border-left: 3px solid var(--success); }
.pm-event-row.pm-event-modified     { border-left: 3px solid var(--warning); }
.pm-event-time     { color: var(--text-muted); font-family: monospace; font-size: 12px; white-space: nowrap; }
.pm-event-machine  { font-weight: 600; white-space: nowrap; }
.pm-event-name     { flex: 1; }
.pm-event-category { font-size: 12px; color: var(--text-muted); }

/* ── Table ─────────────────────────────────────────────────────────────── */
.pm-table-wrapper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow);
}
.pm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-table th {
  text-align: left; padding: .6rem 1rem;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 600;
}
.pm-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.pm-table tbody tr:last-child td { border-bottom: none; }
.pm-table tbody tr:hover { background: var(--surface2); }
.pm-table-footer { font-size: 12px; color: var(--text-muted); padding: .5rem 1rem; }
.pm-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.pm-mono    { font-family: monospace; font-size: 12px; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.pm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.pm-badge-approved    { background: #dcfce7; color: #15803d; }
.pm-badge-pending     { background: #fef3c7; color: #b45309; }
.pm-badge-rejected    { background: #fee2e2; color: #b91c1c; }
.pm-badge-offline     { background: var(--surface2); color: var(--text-muted); }
.pm-badge-connected   { background: #dcfce7; color: #15803d; }
.pm-badge-disconnected{ background: #fee2e2; color: #b91c1c; }
.pm-badge-modified    { background: #fef3c7; color: #b45309; }
.pm-hub-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pm-badge-connected   { background: #dcfce7; color: #15803d; }
.pm-badge-disconnected{ background: #fee2e2; color: #b91c1c; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.pm-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .9rem; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.pm-btn:disabled { opacity: .5; cursor: not-allowed; }
.pm-btn-sm      { padding: .3rem .65rem; font-size: 12px; }
.pm-btn-full    { width: 100%; justify-content: center; }
.pm-btn-primary   { background: var(--primary);  color: #fff; border-color: var(--primary);  }
.pm-btn-primary:hover   { background: var(--primary-h); border-color: var(--primary-h); }
.pm-btn-secondary { background: var(--surface2); color: var(--text); border-color: var(--border); }
.pm-btn-secondary:hover { background: var(--border); }
.pm-btn-success   { background: var(--success);  color: #fff; }
.pm-btn-success:hover   { filter: brightness(1.1); }
.pm-btn-danger    { background: var(--danger);   color: #fff; }
.pm-btn-danger:hover    { filter: brightness(1.1); }
.pm-btn-warning   { background: var(--warning);  color: #fff; }
.pm-btn-warning:hover   { filter: brightness(1.1); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.pm-field { margin-bottom: 1rem; }
.pm-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: .35rem; }
.pm-input {
  width: 100%; padding: .5rem .75rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg); color: var(--text);
  font-size: 13px; outline: none; transition: border-color .15s;
}
.pm-input:focus { border-color: var(--primary); }
.pm-input-sm    { width: auto; padding: .35rem .65rem; }
.pm-textarea    { min-height: 120px; resize: vertical; font-family: monospace; font-size: 12px; }

/* ── Login ─────────────────────────────────────────────────────────────── */
/* ── Login page ──────────────────────────────────────────────────────── */
.pm-login-wrap {
    display: flex; min-height: 100vh;
}
.pm-login-left {
    flex: 1; background: linear-gradient(145deg, #1e3a5f 0%, #2d6a9f 100%);
    color: #fff; padding: 3rem 2.5rem;
    display: flex; flex-direction: column; justify-content: center; gap: 2rem;
}
.pm-login-brand  { text-align: left; }
.pm-login-icon   { font-size: 3rem; display: block; margin-bottom: .5rem; }
.pm-login-left h1 { font-size: 2rem; font-weight: 700; margin: 0 0 .5rem 0; color: #fff; }
.pm-login-tagline { color: rgba(255,255,255,.75); font-size: 1rem; margin: 0; }
.pm-login-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.pm-login-features li { font-size: .95rem; color: rgba(255,255,255,.9); }
.pm-login-footer { font-size: .75rem; color: rgba(255,255,255,.45); margin: 0; }
.pm-login-right {
    flex: 0 0 440px; background: var(--surface);
    display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.pm-login-card { width: 100%; max-width: 360px; }
.pm-login-card-header { text-align: center; margin-bottom: 1.75rem; }
.pm-login-card-header h2 { font-size: 1.25rem; font-weight: 600; margin: .5rem 0 .25rem 0; }
.pm-login-card-header p  { font-size: .85rem; color: var(--text-muted); margin: 0; }
.pm-login-submit { margin-top: .5rem; font-size: 1rem; padding: .75rem; }
.pm-login-hint   { font-size: .78rem; color: var(--text-muted); text-align: center; margin-top: 1.25rem; }
@media (max-width: 700px) {
    .pm-login-left  { display: none; }
    .pm-login-right { flex: 1; }
}


/* ── Alerts / toasts ───────────────────────────────────────────────────── */
.pm-alert {
  padding: .75rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: 13px;
}
.pm-alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.pm-alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.pm-alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.pm-alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.pm-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
  padding: .75rem 1.25rem; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,.2);
  animation: slideIn .2s ease;
}
.pm-toast-success { background: var(--success); color: #fff; }
.pm-toast-error   { background: var(--danger);  color: #fff; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.pm-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 500;
}
.pm-modal {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.75rem; width: 100%; max-width: 440px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.pm-modal-wide   { max-width: 600px; }
.pm-modal h2     { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.pm-modal-hint   { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; }
.pm-hint         { font-size: 12px; color: var(--text-muted); margin-left: .5rem; }
.pm-modal-actions{ display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── Misc ──────────────────────────────────────────────────────────────── */
.pm-loading { color: var(--text-muted); padding: 2rem; text-align: center; }
.pm-empty   { color: var(--text-muted); padding: 2rem; text-align: center; font-size: 13px; }

.pm-event-group        { margin-bottom: .5rem; }
.pm-machine-link { color: var(--text); text-decoration: none; }
.pm-machine-link:hover strong { color: var(--primary); text-decoration: underline; }
.pm-event-group-header { font-size: 16px; font-weight: 600; margin: 1.25rem 0 .5rem 0; display: flex; align-items: center; gap: .4rem; }
.pm-event-group-count  { font-size: 13px; font-weight: 400; color: var(--text-muted); }

.pm-accordion { margin-bottom: .75rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pm-accordion-header {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem; background: var(--surface); border: none; cursor: pointer;
    font-size: .95rem; font-weight: 600; text-align: left; gap: 1rem;
    transition: background .15s;
}
.pm-accordion-header:hover { background: var(--bg); }
.pm-accordion-meta   { display: flex; align-items: center; gap: .75rem; font-weight: 400; }
.pm-accordion-chevron { color: var(--text-muted); font-size: .8rem; }
.pm-accordion-body   { border-top: 1px solid var(--border); }
.pm-input-xs { font-size: 11px; padding: 2px 5px; height: 26px; width: 100%; box-sizing: border-box; }
.pm-filter-row th { padding: 4px 6px; background: var(--bg); border-bottom: 2px solid var(--border); vertical-align: top; }
.pm-filter-stack { display: flex; flex-direction: column; gap: 3px; }
.pm-events-table thead th { position: sticky; top: 0; }

/* ── Institution group headers ─────────────────────────────────────── */
.pm-group-header {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  margin: 1.25rem 0 .5rem; padding-bottom: .35rem;
  border-bottom: 2px solid var(--border);
}

/* ── Fixed table layout for alignment ──────────────────────────────── */
.pm-table-fixed { table-layout: fixed; }
.pm-table-fixed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Role badges ───────────────────────────────────────────────────── */
.pm-badge-superadmin       { background:#7c3aed; color:#fff; }
.pm-badge-institutionadmin { background:#2563eb; color:#fff; }
.pm-badge-viewer           { background:#6b7280; color:#fff; }

/* ── Sidebar user detail ───────────────────────────────────────────── */
.pm-user-detail { display:flex; flex-direction:column; line-height:1.3; }
.pm-user-name   { font-weight:600; font-size:13px; }
.pm-user-role   { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.pm-user-inst   { font-size:11px; color:var(--text-muted); }

/* ── Toast notifications ───────────────────────────────────────────── */
.pm-toast {
  position:fixed; bottom:1.5rem; right:1.5rem; z-index:1000;
  padding:.75rem 1.25rem; border-radius:var(--radius);
  font-size:14px; font-weight:500; box-shadow:0 4px 16px rgba(0,0,0,.15);
  animation:pm-toast-in .2s ease;
}
.pm-toast-success { background:#059669; color:#fff; }
.pm-toast-error   { background:#dc2626; color:#fff; }
@keyframes pm-toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ── Alert (error) inside modals ───────────────────────────────────── */
.pm-alert-error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca;
                  padding:.6rem .8rem; border-radius:var(--radius); font-size:13px; margin-bottom:.75rem; }

/* ── Truncating cells ──────────────────────────────────────────────── */
.pm-truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Analytics dashboard ─────────────────────────────────────────────── */
.pm-analytics-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem;
}
.pm-stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; text-align: center;
}
.pm-stat-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1; }
.pm-stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; }

.pm-chart-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; grid-column: span 2;
}
.pm-chart-card h3 { font-size: .95rem; font-weight: 600; margin: 0 0 1rem 0; }
.pm-chart-wide { grid-column: span 4; }
.pm-svg { width: 100%; height: auto; }

.pm-donut-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pm-svg-donut { width: 160px; height: 160px; flex-shrink: 0; }
.pm-legend { display: flex; flex-direction: column; gap: .4rem; font-size: .82rem; }
.pm-legend-item { display: flex; align-items: center; gap: .45rem; }
.pm-legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.pm-legend-val { color: var(--text-muted); }

.pm-hbars { display: flex; flex-direction: column; gap: .55rem; }
.pm-hbar-row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: .5rem; font-size: .82rem; }
.pm-hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-hbar-track { background: var(--bg); border-radius: 4px; height: 18px; overflow: hidden; }
.pm-hbar-fill { display: block; height: 100%; background: #3b82f6; border-radius: 4px; }
.pm-hbar-val { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .pm-analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .pm-chart-card, .pm-chart-wide { grid-column: span 2; }
}

/* ── System Metrics dashboard ────────────────────────────────────────── */
.pm-metrics-live { color: #10b981; font-weight: 700; font-size: .8rem; letter-spacing: .05em; animation: pm-pulse 2s ease-in-out infinite; }
@keyframes pm-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.pm-metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; margin-top: 1rem; }

.pm-metric-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem; display: flex; flex-direction: column; gap: .85rem;
}
.pm-metric-offline { opacity: .55; }
.pm-metric-head { display: flex; justify-content: space-between; align-items: flex-start; }
.pm-metric-machine { font-weight: 700; font-size: 1rem; }
.pm-metric-sub { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.pm-metric-status { font-size: .65rem; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 4px; }
.pm-metric-status.on  { background: #dcfce7; color: #15803d; }
.pm-metric-status.off { background: #fee2e2; color: #b91c1c; }

.pm-gauges { display: flex; justify-content: space-around; gap: .5rem; }
.pm-gauge { text-align: center; }
.pm-gauge svg { width: 72px; height: 72px; }
.pm-gauge-label { font-size: .68rem; color: var(--text-muted); font-weight: 600; letter-spacing: .04em; margin-top: 2px; }

.pm-metric-specs { font-size: .76rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }
.pm-metric-specs > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pm-sparklines { display: flex; flex-direction: column; gap: 4px; }
.pm-spark-row { display: flex; align-items: center; gap: .5rem; }
.pm-spark-label { font-size: .62rem; color: var(--text-muted); width: 28px; font-weight: 600; }
.pm-spark { width: 100%; height: 30px; background: var(--bg); border-radius: 4px; }

/* ── Feature management ──────────────────────────────────────────────── */
.pm-features-toolbar { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pm-feature-list { display: flex; flex-direction: column; gap: .75rem; }
.pm-feature-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem;
}
.pm-feature-icon { font-size: 1.8rem; flex-shrink: 0; width: 2.2rem; text-align: center; }
.pm-feature-body { flex: 1; min-width: 0; }
.pm-feature-name { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: .6rem; }
.pm-feature-effective { font-size: .62rem; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; }
.pm-feature-effective.on  { background: #dcfce7; color: #15803d; }
.pm-feature-effective.off { background: #fee2e2; color: #b91c1c; }
.pm-feature-desc { font-size: .85rem; color: var(--text-muted); margin-top: 3px; }
.pm-feature-inherit { font-size: .75rem; color: var(--text-muted); margin-top: 5px; display: flex; gap: .5rem; }
.pm-feature-override { color: #b45309; }
.pm-feature-controls { flex-shrink: 0; }

/* ── Reports ─────────────────────────────────────────────────────────── */
.pm-report-filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.pm-report-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.pm-report-count { font-size: .9rem; color: var(--text-muted); }
.pm-report-trunc { color: #b45309; margin-left: .4rem; }
.pm-report-document { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.pm-report-header { border-bottom: 2px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem; }
.pm-report-header h2 { margin: 0 0 .5rem 0; font-size: 1.3rem; }
.pm-report-meta { font-size: .82rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.pm-report-table { width: 100%; font-size: .82rem; }
.pm-report-footer { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .72rem; color: var(--text-muted); text-align: center; }

/* Print: show only the report document, nothing else on the page */
@media print {
    .pm-no-print, .pm-sidebar { display: none !important; }
    .pm-layout { display: block !important; }
    .pm-main { margin: 0 !important; padding: 0 !important; background: #fff !important; width: 100% !important; }
    body { background: #fff !important; }
    .pm-report-document { border: none !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; }
    .pm-report-table { font-size: 10pt; width: 100%; }
    .pm-report-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pm-report-table tr { page-break-inside: avoid; }
    @page { margin: 1.5cm; }
}

/* App-control policy editor */
.pm-feature-config { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: -0.25rem 0 .5rem 0; }
.pm-feature-config-title { font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.pm-checkbox { display: flex; align-items: center; gap: .4rem; font-size: .85rem; margin-top: .4rem; }
.pm-checkbox input { width: auto; }
