/* [ppo_my_reports] / [ppo_my_reports_if_available]: compact report list that fits narrow sidebars and wide columns. */
.ppo-history{box-sizing:border-box;--history-ink:#16233b;--history-muted:#64748b;--history-blue:#4f46e5;--history-blue-hover:#4338ca;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--history-ink);font-size:14px;line-height:1.45;background:var(--history-body-bg,#fff);border:var(--history-border,1px solid #e2e8f0);border-radius:var(--history-radius,16px 16px 0 0);min-height:var(--history-min-height,400px);display:flex;flex-direction:column;max-width:none;width:100%;margin:0!important;padding:0!important;overflow:hidden;box-shadow:var(--history-shadow,0 6px 24px #16233b0d)}
.ppo-history *{box-sizing:border-box}
.ppo-history[hidden]{display:none!important}
.ppo-history>.ppo-history-header{flex:none}
.ppo-history .ppo-history-content{flex:1;display:flex;flex-direction:column}
.ppo-history .ppo-history-content>.ppo-history-message,.ppo-history>.ppo-history-message{margin:auto 0}
.ppo-history h2,.ppo-history h3,.ppo-history p{font-family:inherit;letter-spacing:normal;text-transform:none}

/* Header: title and count on the left, View Last Report on the right (wraps below in very narrow columns). */
.ppo-history .ppo-history-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;padding:15px 14px 15px 16px;background:var(--history-header-bg,#1a2744);color:var(--history-header-ink,#fff)}
.ppo-history-heading{min-width:0;flex:1 1 120px}
.ppo-history .ppo-history-header h2{margin:0;padding:0;font-size:16px;font-weight:700;line-height:1.25;color:var(--history-header-ink,#fff)}
.ppo-history .ppo-history-header p{margin:3px 0 0;color:var(--history-header-ink,#fff);opacity:.75;font-size:12.5px;line-height:1.4}
.ppo-history .ppo-history-eyebrow{display:block;margin:0 0 6px;color:var(--history-header-ink,#fff);opacity:.7;font-size:10px;letter-spacing:.15em;font-weight:650}
.ppo-history .ppo-history-latest{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border-radius:9px;background:var(--history-blue);color:#fff;font-size:12.5px;font-weight:650;line-height:1.2;text-decoration:none;white-space:nowrap}
.ppo-history .ppo-history-latest:hover{background:var(--history-blue-hover);color:#fff}
.ppo-history .ppo-history-latest[hidden]{display:none}
.ppo-history .screen-reader-text{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* Rows: date and report number, score and confidence badge, outline View button. Confidence color on the left. */
.ppo-history .ppo-history-list{list-style:none;margin:0;padding:0}
.ppo-history-row{--row-accent:#cbd5e1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin:0;padding:12px 14px 12px 18px;border-bottom:1px solid #e5e9f0;box-shadow:inset 4px 0 0 var(--row-accent);transition:background-color .15s}
.ppo-history-row:hover{background:#f8fafc}
.ppo-history-row-red{--row-accent:#e11d48}.ppo-history-row-yellow{--row-accent:#d97706}.ppo-history-row-green{--row-accent:#059669}
.ppo-history-report{min-width:0;display:grid;gap:3px}
.ppo-history .ppo-history-when,.ppo-history .ppo-history-figures{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;line-height:1.35}
.ppo-history-when strong{font-size:15px;font-weight:700;color:var(--history-ink)}
.ppo-history-when span{font-size:13px;color:#6b7280}
.ppo-history .ppo-history-figures{align-items:center;font-size:13px;color:var(--history-muted)}
.ppo-history-score strong{font-size:14.5px;font-weight:700;color:var(--history-ink);margin-left:3px}
.ppo-history-badge{font-size:12px;font-weight:500;line-height:1.3;padding:2px 9px;border-radius:999px;white-space:nowrap}
.ppo-history-red{background:#fff1f2;color:#be123c}.ppo-history-yellow{background:#fffbeb;color:#92400e}.ppo-history-green{background:#ecfdf5;color:#047857}
.ppo-history .ppo-history-view{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:6px 11px;border:1px solid #c7d2fe;border-radius:8px;background:#fff;color:var(--history-blue);font-size:13px;font-weight:650;line-height:1.2;text-decoration:none;white-space:nowrap}
.ppo-history .ppo-history-view:hover{background:#eef2ff;border-color:#a5b4fc;color:var(--history-blue-hover)}

/* Footer: See all reports / Show fewer, and pages when viewing all. */
.ppo-history-footer{padding:11px 18px;font-size:13px}
.ppo-history .ppo-history-footer button{font:inherit;font-weight:650;color:var(--history-blue);background:none;border:0;padding:4px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.ppo-history .ppo-history-footer button:hover{color:var(--history-blue-hover)}
.ppo-history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid #e5e9f0;font-size:12px;color:#64748b}
.ppo-history-pagination button{font-family:inherit;background:#fff;border:1px solid #d8dfeb;border-radius:8px;color:#334155;font-size:12px;min-height:34px;padding:6px 11px;cursor:pointer}
.ppo-history-pagination button:disabled{opacity:.4;cursor:default}

/* Messages, loading, buttons in messages. */
.ppo-history .ppo-history-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;background:var(--history-blue);border:1px solid var(--history-blue);color:#fff;min-height:38px;padding:8px 15px;border-radius:9px;font-size:13px;font-family:inherit;font-weight:650;line-height:1.4;white-space:nowrap;cursor:pointer}
.ppo-history .ppo-history-button:hover{background:var(--history-blue-hover);border-color:var(--history-blue-hover);color:#fff}
.ppo-history a:focus-visible,.ppo-history button:focus-visible{outline:3px solid #a5b4fc;outline-offset:2px}
.ppo-history-message{padding:28px 20px;text-align:center}
.ppo-history .ppo-history-message h3{font-size:17px;line-height:1.4;margin:0 0 10px;font-weight:650;color:var(--history-ink)}
.ppo-history .ppo-history-message p{font-size:13px;line-height:1.65;color:#64748b;margin:0 auto 18px;max-width:520px}
.ppo-history .ppo-history-message p:last-child{margin-bottom:0}
.ppo-history .ppo-history-loading{padding:24px 18px;margin:0;color:#64748b;font-size:13px}
.ppo-history-content[aria-busy=true]{opacity:.65}
.ppo-history-list:focus,.ppo-history-message:focus{outline:none}
.ppo-history noscript{display:block;padding:18px}
