:root { --fg:#1f2328; --muted:#656d76; --border:#d0d7de; --accent:#0969da; --red:#cf222e; --orange:#bc4c00; --green:#1a7f37; --bg-soft:#f6f8fa; --highlight:#fff3bf; }
* { box-sizing: border-box; }
body { margin:0; color:var(--fg); background:#fff; font:14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color:var(--accent); text-decoration:none; } a:hover { text-decoration:underline; }
code, pre { font:12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { margin:0; white-space:pre-wrap; word-break:break-word; }
h1 { font-size:20px; margin:0 0 4px; } h2 { font-size:15px; margin:0 0 10px; } h3 { font-size:13px; margin:14px 0 6px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
nav { display:flex; gap:20px; align-items:center; padding:10px 24px; border-bottom:1px solid var(--border); background:var(--bg-soft); }
nav .brand { font-weight:700; color:var(--fg); font-size:16px; }
nav .right { margin-left:auto; }
main { max-width:1200px; margin:0 auto; padding:20px 24px; }
button, input, select { font:inherit; }
button { padding:5px 12px; border:1px solid var(--border); border-radius:6px; background:var(--bg-soft); cursor:pointer; }
button:hover { background:#eaeef2; }
button.danger { color:var(--red); } button.small { padding:2px 8px; font-size:12px; }
button.link { border:0; background:none; color:var(--accent); padding:0; }
input[type=text], input[type=search], input[type=password], select { padding:5px 8px; border:1px solid var(--border); border-radius:6px; }
.flash { background:#dafbe1; border:1px solid #aceebb; padding:8px 12px; border-radius:6px; margin-bottom:16px; } .flash p { margin:0; }
.error { color:var(--red); } .muted { color:var(--muted); } .empty { color:var(--muted); padding:40px 0; text-align:center; }
.nowrap { white-space:nowrap; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:7px 10px; border-bottom:1px solid var(--border); vertical-align:top; }
th { font-weight:600; color:var(--muted); font-size:12px; }
td.num, th.num { text-align:right; white-space:nowrap; }
tr.current td { background:var(--highlight); }
.badge { display:inline-block; padding:0 7px; border-radius:10px; font-size:11px; font-weight:600; border:1px solid var(--border); color:var(--muted); vertical-align:middle; }
.badge.level-fatal, .badge.level-error { color:var(--red); border-color:#ffcecb; background:#fff5f5; }
.badge.level-warning { color:var(--orange); border-color:#ffd8b5; background:#fff8f0; }
.badge.level-info, .badge.level-debug { color:var(--accent); border-color:#b6d4fe; background:#f1f7ff; }
.badge.unhandled { color:#fff; background:var(--red); border-color:var(--red); }
/* issue list */
.filters { display:flex; gap:12px; align-items:center; margin-bottom:16px; flex-wrap:wrap; }
.tabs a { padding:4px 10px; border-radius:6px; color:var(--fg); } .tabs a.active { background:var(--bg-soft); font-weight:600; }
.tabs .count { color:var(--muted); font-size:12px; }
.issues td.check, .issues th.check { width:28px; }
.issues .title { font-weight:600; color:var(--fg); }
.culprit, .url { color:var(--muted); font-size:12px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; word-break:break-all; }
.url .method { font-weight:600; }
.bulk { display:flex; gap:8px; align-items:center; padding:10px 0; }
.bulk .muted { margin-left:auto; }
.pager { display:flex; gap:16px; justify-content:center; padding:12px; }
/* issue detail */
.issue-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:12px; }
.issue-head h1 { word-break:break-word; }
.crumbs { font-size:12px; color:var(--muted); }
.meta { margin-top:6px; color:var(--muted); display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.actions { display:flex; gap:6px; flex-shrink:0; } .actions form { display:inline-flex; gap:6px; }
.event-nav { display:flex; justify-content:space-between; gap:12px; padding:8px 12px; background:var(--bg-soft); border:1px solid var(--border); border-radius:6px; margin-bottom:20px; flex-wrap:wrap; }
section { margin-bottom:28px; }
section details > summary { cursor:pointer; list-style:none; } section details > summary h2, section details > summary h3 { display:inline; }
section details > summary::before { content:"▸ "; color:var(--muted); } section details[open] > summary::before { content:"▾ "; }
.exc-value { font-weight:400; }
.message, .raw { background:var(--bg-soft); border:1px solid var(--border); border-radius:6px; padding:10px 12px; }
.url { word-break:break-all; }
.kv th { width:220px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:500; color:var(--fg); word-break:break-all; }
.kv td { word-break:break-word; }
.kv th, .kv td { border-bottom:0; padding:5px 8px; }
.kv tr:nth-child(even) > * { background:rgba(0,0,0,0.028); }
/* context cards */
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(380px, 1fr)); gap:12px; align-items:start; }
.card { border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
.card h3 { margin:0 0 6px; font-size:14px; color:var(--fg); text-transform:none; letter-spacing:0; }
.card .kv th { width:160px; }
/* packages */
.packages { columns:4 220px; column-gap:24px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px; }
.packages div { break-inside:avoid; padding:2px 0; }
/* arrivals: stat tiles + column chart */
.stats { display:flex; gap:16px; align-items:stretch; border:1px solid var(--border); border-radius:8px; padding:12px 16px; margin-bottom:20px; }
.tiles { display:flex; flex-direction:column; gap:8px; justify-content:center; }
.tile { border:1px solid var(--border); border-radius:8px; padding:6px 14px; min-width:96px; text-align:center; }
.tile .label { font-size:12px; color:var(--muted); }
.tile .value { font-size:22px; font-weight:600; line-height:1.2; }
.chart { flex:1; min-width:0; position:relative;
  --viz-series:#2a78d6; --viz-series-hover:#1c5cab; --viz-grid:#e1e0d9; --viz-baseline:#c3c2b7; --viz-muted:#898781; }
.chart-head { display:flex; justify-content:space-between; font-size:12px; margin-bottom:4px; }
.chart-head .range a { padding:2px 8px; border-radius:6px; color:var(--fg); margin-left:4px; }
.chart-head .range a.active { background:var(--bg-soft); font-weight:600; }
.chart svg { display:block; overflow:visible; font-family:system-ui, -apple-system, "Segoe UI", sans-serif; }
.chart .grid { stroke:var(--viz-grid); stroke-width:1; }
.chart .baseline { stroke:var(--viz-baseline); stroke-width:1; }
.chart .axis { fill:var(--viz-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.chart .bar { fill:var(--viz-series); }
.chart .hit { fill:transparent; }
.chart .slot { outline:none; cursor:default; }
.chart .slot:hover .bar, .chart .slot:focus .bar { fill:var(--viz-series-hover); }
.chart .slot:hover .hit, .chart .slot:focus .hit { fill:rgba(42,120,214,0.07); }
.chart .tooltip { position:absolute; pointer-events:none; background:#1f2328; color:#fff; padding:4px 8px; border-radius:6px; font-size:12px; white-space:nowrap; z-index:1; }
.chart .tooltip b { font-weight:600; margin-right:4px; }
.chart-table { font-size:12px; margin-top:4px; } .chart-table summary { cursor:pointer; color:var(--muted); }
.chart-table table { width:auto; min-width:320px; } .chart-table td, .chart-table th { padding:3px 10px; }
/* frames */
.frame { border:1px solid var(--border); border-radius:6px; margin-bottom:6px; }
.frame summary { padding:6px 10px; cursor:pointer; color:var(--muted); font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px; }
.frame summary .file { color:var(--fg); } .frame summary .func { color:var(--fg); font-weight:600; }
.frame.app > summary { background:var(--bg-soft); }
.frame.app > summary .file { color:var(--accent); }
pre.context { padding:4px 0; border-top:1px solid var(--border); overflow-x:auto; white-space:pre; line-height:1.45; }
pre.context .line { display:block; padding:0 10px; }
pre.context .line:nth-child(even) { background:rgba(0,0,0,0.028); }
pre.context .line.current { background:var(--highlight); }
pre.context .ln { display:inline-block; width:4em; text-align:right; margin-right:1.2em; color:var(--muted); user-select:none; }
.frame .vars { border-top:1px solid var(--border); } .frame .vars > summary { padding:6px 10px; }
.frame .vars table { font-size:12px; }
/* login */
.login { max-width:360px; margin:80px auto; text-align:center; }
.login form { display:flex; flex-direction:column; gap:10px; } .login label { display:flex; flex-direction:column; gap:6px; text-align:left; }
.login pre { text-align:left; background:var(--bg-soft); padding:10px; border-radius:6px; }
.inline-form { margin:20px 0; display:flex; gap:8px; align-items:center; }
