:root {
  --bg: #09090b; --glass: rgba(255,255,255,.035); --glass2: rgba(255,255,255,.055); --glass3: rgba(255,255,255,.085);
  --solid: #111114; --solid2: #17171b;
  --border: rgba(255,255,255,.08); --border2: rgba(255,255,255,.14);
  --text: #ededed; --muted: #8a8a93;
  --volt: #d4ff3a; --volt-dim: rgba(212,255,58,.12); --volt-line: rgba(212,255,58,.45); --on-volt: #12140a;
  --amber: #ffb547; --green: #34e0a1; --red: #ff6b6b; --orange: #ffb547; --purple: #b794ff;
  --link: #d4ff3a;
  --add-bg: rgba(52,224,161,.10); --del-bg: rgba(255,93,93,.10); --add-ln: rgba(52,224,161,.18); --del-ln: rgba(255,93,93,.18);
  --t0: #ff5d5d; --t1: #ffb547; --t2: #b794ff; --t3: #8a8a93; --t4: #61616a;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 12px; --r-sm: 8px;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: 150ms ease;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--sans); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vw 50vh at 8% -10%, rgba(255,181,71,.055), transparent 70%), radial-gradient(55vw 55vh at 100% 105%, rgba(212,255,58,.045), transparent 70%); }
::selection { background: rgba(212,255,58,.3); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); background-clip: padding-box; border: 2px solid transparent; } ::-webkit-scrollbar-track { background: transparent; }
a { color: var(--volt); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .spacer { flex: 1; }
.diffstat, .count, .group-count, .chip-count, .panel-count, .progress-label, .loc, .branches, .ln, .st, .check, kbd, .badge.cat { font-variant-numeric: tabular-nums; }
.topbar { height: 52px; flex: none; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5); background: rgba(9,9,11,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); z-index: 30; }
.brand { color: var(--text); font-weight: 700; font-size: 15px; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--volt); box-shadow: 0 0 14px rgba(212,255,58,.7); transform: rotate(45deg); }
.brand:hover { text-decoration: none; }
.me { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: 13px; }
#view { flex: 1; min-height: 0; overflow: auto; }
#view.v-pr { overflow: hidden; display: flex; flex-direction: column; }
.avatar { border-radius: 50%; vertical-align: middle; background: var(--glass3); box-shadow: 0 0 0 1px var(--border2); } .avatar.ph { display: inline-block; }
.loading, .empty { padding: var(--s5); color: var(--muted); text-align: center; }

.btn { white-space: nowrap; flex: none; background: var(--glass); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r-sm); padding: 6px 14px; font: 500 13px var(--sans); cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease); }
.btn:hover:not(:disabled) { background: var(--glass3); border-color: rgba(255,255,255,.24); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--volt); color: var(--on-volt); border-color: var(--volt); font-weight: 600; box-shadow: 0 0 0 0 rgba(212,255,58,0); }
.btn.primary:hover:not(:disabled) { background: #e2ff6b; border-color: #e2ff6b; box-shadow: 0 0 20px rgba(212,255,58,.35); }
.btn.small { padding: 4px 12px; font-size: 12px; } .btn.tiny { padding: 2px 10px; font-size: 11.5px; border-radius: 999px; }
a.btn { display: inline-block; color: var(--text); text-decoration: none; }
input[type=search], input[type=text], textarea, select { background: rgba(0,0,0,.35); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r-sm); padding: 8px 12px; font: inherit; transition: border-color var(--ease), box-shadow var(--ease); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--volt-line); box-shadow: 0 0 0 3px rgba(212,255,58,.12); }
input::placeholder, textarea::placeholder { color: #5d5d66; }
textarea { width: 100%; resize: vertical; font-family: var(--mono); font-size: 12px; }
input[type=checkbox], input[type=radio] { accent-color: var(--volt); }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }

.pill, .badge { display: inline-block; border-radius: 999px; padding: 0 10px; font-size: 11px; font-weight: 500; line-height: 20px; border: 1px solid var(--border2); background: var(--glass); white-space: nowrap; }
.pill.draft, .badge.muted { color: var(--muted); }
.pill.state-open { background: rgba(52,224,161,.12); border-color: rgba(52,224,161,.5); color: var(--green); }
.pill.state-merged { background: rgba(183,148,255,.12); border-color: rgba(183,148,255,.5); color: var(--purple); }
.pill.state-closed { background: rgba(255,93,93,.12); border-color: rgba(255,93,93,.5); color: var(--red); }
.ok { color: var(--green); } .bad { color: var(--red); } .pend { color: var(--amber); }
.badge.ok { border-color: rgba(52,224,161,.45); } .badge.bad { border-color: rgba(255,93,93,.5); background: rgba(255,93,93,.1); } .badge.pend { border-color: rgba(255,181,71,.5); } .badge.warn { color: var(--amber); border-color: rgba(255,181,71,.5); background: rgba(255,181,71,.08); }
.pill.ok { border-color: rgba(52,224,161,.45); } .pill.pend { border-color: rgba(255,181,71,.5); }
.badge.tiny { font-size: 10px; line-height: 16px; padding: 0 6px; }
.badge.hint { color: var(--muted); border-style: dashed; }
.badge.cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; }
.badge.cat.t0 { color: var(--t0); border-color: rgba(255,93,93,.5); background: rgba(255,93,93,.08); } .badge.cat.t1 { color: var(--t1); border-color: rgba(255,181,71,.5); background: rgba(255,181,71,.08); } .badge.cat.t2 { color: var(--t2); border-color: rgba(183,148,255,.5); background: rgba(183,148,255,.08); } .badge.cat.t3, .badge.cat.t4 { color: var(--t3); }
.warn { color: var(--amber); }
.diffstat { font-family: var(--mono); font-size: 12px; } .add { color: var(--green); } .del { color: var(--red); } .diffstat.tiny { font-size: 11px; }
.label { border: 1px solid; border-radius: 999px; padding: 0 8px; font-size: 11px; line-height: 18px; }
.md { overflow-wrap: anywhere; } .md pre { background: rgba(0,0,0,.4); border: 1px solid var(--border); padding: var(--s3); border-radius: var(--r-sm); overflow: auto; } .md img { max-width: 100%; } .md p { margin: .5em 0; } .md code { font-family: var(--mono); font-size: 90%; background: var(--glass2); padding: 1px 5px; border-radius: 4px; } .md pre code { background: none; padding: 0; }
.md blockquote { border-left: 2px solid var(--volt-line); margin: 0; padding-left: var(--s3); color: var(--muted); }
kbd { background: var(--glass2); border: 1px solid var(--border2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font-family: var(--mono); font-size: 12px; }

/* inbox */
.inbox { max-width: 1100px; margin: 0 auto; padding: var(--s5); }
.inbox-bar { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; position: sticky; top: 0; background: rgba(9,9,11,.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: var(--s2) 0; z-index: 2; }
.filter-input { width: 340px; }
.inbox-section h2 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: var(--s6) 0 var(--s3); display: flex; gap: var(--s2); align-items: center; }
.count { background: var(--glass2); border: 1px solid var(--border); border-radius: 999px; padding: 0 9px; font: 500 11px/18px var(--mono); color: var(--text); letter-spacing: 0; }
.inbox-section .empty { border: 1px dashed var(--border2); border-radius: var(--r); padding: var(--s4); }
.inbox-list { display: flex; flex-direction: column; gap: var(--s2); }
.pr-row { display: flex; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--glass); color: var(--text); text-decoration: none; transition: background var(--ease), border-color var(--ease), transform var(--ease); position: relative; }
.pr-row:hover { background: var(--glass2); border-color: var(--border2); text-decoration: none; }
.pr-row.selected { border-color: var(--volt-line); background: var(--volt-dim); box-shadow: 0 0 24px rgba(212,255,58,.08), inset 0 0 0 1px rgba(212,255,58,.15); }
.row-main { flex: 1; min-width: 0; } .row-top { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; } .repo { color: var(--muted); font: 12px var(--mono); }
.row-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row-meta { display: flex; gap: var(--s2); align-items: center; font-size: 12px; margin-top: var(--s1); }
.row-side { display: flex; gap: var(--s3); align-items: center; font-size: 12px; flex: none; font-family: var(--mono); }
.check { font-weight: 700; width: 16px; text-align: center; } .check.none { color: var(--muted); }

/* PR view */
.pr-view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pr-header { padding: var(--s4) var(--s5) 0; }
.pr-title-row { display: flex; align-items: center; gap: var(--s3); } .pr-title-row h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) 0 var(--s3); font-size: 13px; flex-wrap: wrap; }
.branches { font-family: var(--mono); font-size: 11.5px; background: var(--glass2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }
.tabs { display: flex; gap: var(--s1); padding: 0 var(--s5); border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px var(--s4); font: 500 13.5px var(--sans); cursor: pointer; margin-bottom: -1px; transition: color var(--ease), border-color var(--ease); }
.tab:hover { color: var(--text); } .tab.active { color: var(--volt); border-bottom-color: var(--volt); text-shadow: 0 0 18px rgba(212,255,58,.4); }
.pr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; }
.pr-view[data-tab=conv] .sidebar, .pr-view[data-tab=conv] .files-col { display: none; }
.pr-view[data-tab=conv] .pr-body { display: block; overflow: auto; }
.pr-view[data-tab=files] .conv { display: none; }
.conv { max-width: 900px; margin: 0 auto; padding: var(--s5); }
.conv-block, .thread-summary { border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s4); background: var(--glass); }
.comment-head { display: flex; align-items: center; gap: var(--s2); font-size: 13px; margin-bottom: var(--s1); }
.comment { padding: var(--s3) var(--s4); border-top: 1px solid var(--border); } .comment:first-child { border-top: 0; }
.conv-threads h2 { font-size: 15px; }

.sidebar { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: rgba(255,255,255,.012); }
.side-scroll { flex: 1; overflow: auto; min-height: 0; padding-bottom: var(--s2); }
.side-top { padding: var(--s3) var(--s4); position: sticky; top: 0; background: rgba(9,9,11,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 1; border-bottom: 1px solid var(--border); }
.progress-label { font: 12px var(--mono); margin-bottom: var(--s2); color: var(--muted); }
.bar { height: 6px; background: var(--glass3); border-radius: 999px; overflow: hidden; } .bar.mini { height: 3px; border-radius: 999px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #b6e61f, var(--volt)); box-shadow: 0 0 12px rgba(212,255,58,.6); border-radius: 999px; transition: width .25s ease; }
.seg { display: inline-flex; margin-top: var(--s3); border: 1px solid var(--border2); border-radius: 999px; padding: 2px; background: rgba(0,0,0,.3); }
.seg button { flex: 1; background: transparent; color: var(--muted); border: 0; border-radius: 999px; padding: 3px 12px; font: 500 12px var(--sans); cursor: pointer; transition: all var(--ease); } .seg button:hover { color: var(--text); } .seg button.on { background: var(--volt); color: var(--on-volt); font-weight: 600; }
.side-top .seg { display: flex; }
.group { margin-top: var(--s2); }
.group-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); cursor: pointer; border-left: 2px solid var(--t3); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; user-select: none; transition: background var(--ease); }
.group-head:hover { background: var(--glass); }
.group.t0 .group-head { border-left-color: var(--t0); } .group.t1 .group-head { border-left-color: var(--t1); } .group.t2 .group-head { border-left-color: var(--t2); }
.group.t0 .group-title { color: var(--t0); } .group.t1 .group-title { color: var(--t1); } .group.t2 .group-title { color: var(--t2); }
.group-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .group-count { color: var(--muted); font: 400 11px var(--mono); letter-spacing: 0; }
.side-file { display: flex; align-items: center; gap: 6px; padding: 5px var(--s4) 5px 14px; font-size: 12px; cursor: pointer; flex-wrap: wrap; border-left: 2px solid transparent; margin: 0 var(--s2) 0 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; transition: background var(--ease); }
.side-file:hover { background: var(--glass); } .side-file.current { background: var(--volt-dim); border-left-color: var(--volt); } .side-file.viewed .fname { opacity: .45; text-decoration: line-through; }
.side-file .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; }
.side-file.current .fname { color: var(--volt); }
.side-file .cat { flex-basis: 100%; padding-left: 38px; color: var(--muted); font-size: 10.5px; margin-top: -2px; }
.dir { color: var(--muted); }
.st { font-family: var(--mono); font-weight: 700; width: 14px; text-align: center; } .st-added { color: var(--green); } .st-removed { color: var(--red); } .st-modified, .st-changed { color: var(--amber); } .st-renamed { color: var(--purple); }
.review-panel { border-top: 1px solid var(--border); padding: var(--s4); background: rgba(255,255,255,.03); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.review-panel h3 { margin: 0 0 var(--s2); font-size: 13px; letter-spacing: .02em; } .panel-count { font-size: 12px; color: var(--muted); margin-bottom: var(--s2); font-family: var(--mono); }
.radios { display: flex; flex-direction: column; gap: var(--s1); margin: var(--s3) 0; font-size: 13px; } .radio { cursor: pointer; display: flex; align-items: center; gap: var(--s2); padding: 2px 0; }
.gate { font-size: 12px; color: var(--green); margin-bottom: var(--s3); } .gate.blocked { color: var(--amber); }
.review-panel .btn.primary { width: 100%; padding: 8px 14px; }

.files-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.files-main { flex: 1; overflow: auto; padding: var(--s4) var(--s5) var(--s6); min-height: 0; }
.filter-bar { display: flex; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); background: rgba(9,9,11,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-wrap: wrap; }
.filter-label { font-weight: 600; flex: 1; min-width: 160px; }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; order: 9; flex: 1 1 100%; }
.chip { background: var(--glass); color: var(--text); border: 1px solid var(--border2); border-radius: 999px; padding: 4px 12px 4px 10px; font: 500 12px var(--sans); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: all var(--ease); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t3); }
.chip.t0::before { background: var(--t0); box-shadow: 0 0 8px var(--t0); } .chip.t1::before { background: var(--t1); box-shadow: 0 0 8px var(--t1); } .chip.t2::before { background: var(--t2); box-shadow: 0 0 8px var(--t2); }
.chip.all::before { background: var(--volt); box-shadow: 0 0 8px var(--volt); }
.chip:hover { background: var(--glass3); }
.chip.on { background: var(--volt-dim); border-color: var(--volt-line); color: var(--volt); font-weight: 600; }
.chip-count { color: var(--muted); font: 400 11px var(--mono); } .chip.on .chip-count { color: inherit; opacity: .75; }
.show-all { width: 100%; margin-top: var(--s2); }
.group.selected .group-head { background: var(--glass2); }
.group.selected .group-title::after { content: ' · exibindo'; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.caret { padding: 0 4px; }
.card { border: 1px solid var(--border); border-radius: var(--r); margin-bottom: var(--s5); background: var(--glass); position: relative; }
.card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--t3); opacity: .8; }
.card.t0::before { background: var(--t0); box-shadow: 0 0 10px var(--t0); } .card.t1::before { background: var(--t1); box-shadow: 0 0 10px var(--t1); } .card.t2::before { background: var(--t2); box-shadow: 0 0 10px var(--t2); }
.card.current { border-color: var(--volt-line); box-shadow: 0 0 0 1px rgba(212,255,58,.15), 0 0 32px rgba(212,255,58,.06); } .card.viewed .path { opacity: .55; }
.card-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); background: rgba(20,20,24,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; flex-wrap: wrap; }
.card.collapsed .card-head { border-bottom: 0; border-radius: var(--r); }
.caret-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; } .card.collapsed .caret { display: inline-block; transform: rotate(-90deg); }
.path { font-family: var(--mono); font-size: 12.5px; font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }
.viewed-chk { font-size: 12px; }
.why { padding: var(--s3) var(--s4); font-size: 12px; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--border); } .why ul { margin: var(--s1) 0 var(--s2); padding-left: 18px; } .why .esc { color: var(--red); } .why .risk { color: var(--amber); }
.card-summary { display: none; padding: var(--s2) var(--s4); font-size: 12px; color: var(--muted); cursor: pointer; } .card.collapsed .card-summary { display: block; }
.card.collapsed .card-body, .card.collapsed .outdated-threads { display: none; }
.outdated-threads { padding: 0 var(--s2); } .outdated-threads .thread { margin: var(--s2) 0; }
.nopatch { padding: var(--s4); color: var(--muted); }
.card-body { overflow-x: auto; border-radius: 0 0 var(--r) var(--r); }
table.diff { border-collapse: collapse; width: 100%; font: 12px/19px var(--mono); }
.diff td { padding: 0; vertical-align: top; }
.diff .ln { width: 1%; min-width: 48px; padding: 0 var(--s2); text-align: right; color: #5d5d66; user-select: none; cursor: pointer; white-space: nowrap; transition: color var(--ease), background var(--ease); }
.diff .ln:hover { color: var(--on-volt); background: var(--volt); }
.diff .code { white-space: pre-wrap; word-break: break-all; padding: 0 var(--s3); }
.diff tr.add { background: var(--add-bg); } .diff tr.add .ln { background: var(--add-ln); color: rgba(52,224,161,.7); }
.diff tr.del { background: var(--del-bg); } .diff tr.del .ln { background: var(--del-ln); color: rgba(255,107,107,.7); }
.diff tr.hunk td { background: rgba(255,181,71,.06); color: #b59563; padding: 3px var(--s3); font-size: 11.5px; }
.diff tr.flash td { outline: 2px solid var(--amber); outline-offset: -2px; }
.ann-row > td { padding: var(--s3) var(--s4) var(--s3) 60px; background: rgba(0,0,0,.25); font-family: var(--sans); white-space: normal; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.55; }
.thread { border: 1px solid var(--border2); border-radius: var(--r-sm); background: var(--glass2); max-width: 900px; }
.thread.pending { border-color: rgba(255,181,71,.6); box-shadow: 0 0 18px rgba(255,181,71,.08); } .thread.outdated { opacity: .85 } .thread.resolved .thread-head { cursor: pointer; }
.thread-head { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s3); font-size: 12px; }
.loc { font-family: var(--mono); font-size: 12px; }
.thread-actions, .btn-row { display: flex; gap: var(--s2); padding: var(--s2) var(--s3); }
.reply-box { padding: 0 var(--s3) var(--s3); } .composer { max-width: 900px; border: 1px solid var(--volt-line); border-radius: var(--r-sm); padding: var(--s3); background: var(--solid2); box-shadow: 0 0 24px rgba(212,255,58,.07); } .composer .btn-row { padding: var(--s2) 0 0; }
.pending-body { margin: 0; padding: var(--s1) var(--s3) var(--s3); white-space: pre-wrap; font: 12px var(--mono); }

#toasts { position: fixed; right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); z-index: 100; }
.toast { background: rgba(23,23,27,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border2); padding: var(--s3) var(--s4); border-radius: var(--r); max-width: 420px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.toast.error { border-color: rgba(255,93,93,.6); box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 20px rgba(255,93,93,.12); } .toast.ok { border-color: rgba(52,224,161,.55); }
.overlay { position: fixed; inset: 0; background: rgba(4,4,6,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.dialog { background: rgba(23,23,27,.92); border: 1px solid var(--border2); border-radius: 16px; padding: var(--s5) var(--s6); min-width: 400px; box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 0 60px rgba(212,255,58,.05); } .dialog td { padding: var(--s1) var(--s4) var(--s1) 0; } .dialog h3 { margin-top: 0; }
@media (max-width: 1100px) { .pr-body { grid-template-columns: 260px 1fr; } .row-side .muted { display: none; } }
[hidden] { display: none !important; }

.mark-all { background: var(--volt); color: var(--on-volt); border-color: var(--volt); font-weight: 600; } .mark-all:hover:not(:disabled) { background: #e2ff6b !important; border-color: #e2ff6b !important; box-shadow: 0 0 16px rgba(212,255,58,.3); } .mark-all.done { background: var(--glass); color: var(--muted); border-color: var(--border2); font-weight: 500; box-shadow: none; }

.merge-ok { background: var(--volt); color: var(--on-volt); border-color: var(--volt); font-weight: 600; } .merge-ok:hover:not(:disabled) { background: #e2ff6b !important; border-color: #e2ff6b !important; box-shadow: 0 0 16px rgba(212,255,58,.3); }
.merge-blocked { color: var(--t0); border-color: rgba(255,93,93,.5); background: rgba(255,93,93,.07); } .merge-blocked:hover:not(:disabled) { background: rgba(255,93,93,.14) !important; border-color: rgba(255,93,93,.8) !important; }
.merge-pop { position: absolute; right: var(--s5); top: 96px; z-index: 20; width: 480px; max-width: calc(100vw - 32px); box-shadow: 0 24px 64px rgba(0,0,0,.65); }
.merge-box { border: 1px solid var(--border2); border-radius: 14px; background: rgba(23,23,27,.97); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: var(--s4) var(--s5); margin-bottom: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.merge-pop .merge-box { margin-bottom: 0; }
.merge-title { font-weight: 700; font-size: 15px; } .merge-title.ok { color: var(--green); } .merge-title.bad { color: var(--t0); }
.merge-reasons, .merge-warnings { margin: var(--s1) 0; padding-left: 18px; }
.merge-reasons li { color: #ff9d9d; } .merge-warnings li { color: var(--amber); }
.merge-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.merge-form select, .merge-form input[type=text] { padding: 6px 10px; }
.merge-commit-title { flex: 1 1 100%; }

/* ---- side-by-side diff (Antes | Depois) ---- */
.seg.diff-mode { margin-top: 0; }
.seg.diff-mode button { white-space: nowrap; }
table.diff.split { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.diff.split col.col-ln { width: 52px; }
.diff.split .side-head { font: 600 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 11px var(--s4); }
.diff.split .side-head.before { color: #ff8585; background: linear-gradient(180deg, rgba(255,93,93,.16), rgba(255,93,93,.07)); border: 1px solid rgba(255,93,93,.55); border-radius: 10px 10px 0 0; box-shadow: 0 0 18px rgba(255,93,93,.12); }
.diff.split .side-head.after { color: var(--green); background: linear-gradient(180deg, rgba(52,224,161,.16), rgba(52,224,161,.07)); border: 1px solid rgba(52,224,161,.55); border-radius: 10px 10px 0 0; box-shadow: 0 0 18px rgba(52,224,161,.12); }
.diff.split td.ln.old { border-left: 1px solid rgba(255,93,93,.4); }
.diff.split td.code.before { border-right: 1px solid rgba(255,93,93,.4); }
.diff.split td.ln.new { border-left: 1px solid rgba(52,224,161,.4); }
.diff.split td.code.after { border-right: 1px solid rgba(52,224,161,.4); }
.diff.split tr:last-child td.ln.old, .diff.split tr:last-child td.code.before { border-bottom: 1px solid rgba(255,93,93,.4); }
.diff.split tr:last-child td.ln.new, .diff.split tr:last-child td.code.after { border-bottom: 1px solid rgba(52,224,161,.4); }
.diff.split td.code { white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; }
.diff.split td.del { background: var(--del-bg); } .diff.split td.ln.del { background: var(--del-ln); }
.diff.split td.add { background: var(--add-bg); } .diff.split td.ln.add { background: var(--add-ln); }
.diff.split td.empty { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.035) 6px 12px); cursor: default; }
.diff.split tr.hunk td { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.ann-row.ann-right > td { padding-left: calc(50% + 12px); }
.card-body:has(> table.diff.split) { padding: var(--s3) var(--s4) var(--s4); }
.diff.split thead th + th { box-shadow: -8px 0 0 transparent; }

/* ---- comments ---- */
.hide-comments .thread-row, .hide-comments .outdated-threads { display: none; }
.comments-toggle.on { border-color: var(--volt-line); color: var(--volt); background: var(--volt-dim); }
.badge.comments { cursor: pointer; background: transparent; color: var(--muted); font: inherit; font-size: 11px; transition: all var(--ease); }
.badge.comments:hover { color: var(--text); }
.badge.comments.open { color: var(--amber); border-color: rgba(255,181,71,.5); background: rgba(255,181,71,.1); }
.side-comments { font-size: 11px; color: var(--muted); } .side-comments.open { color: var(--amber); }
.thread-snippet { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.thread.resolved { opacity: .8; }
.thread-row > td { background: rgba(0,0,0,.25); }
.thread-head { flex-wrap: nowrap; min-width: 0; } .thread-head > * { white-space: nowrap; } .thread-head > .thread-snippet { flex: 1 1 auto; }
.thread-head .spacer { flex: 0 0 0; }

/* ---- collapsible sidebar ---- */
.pr-body { transition: grid-template-columns .18s ease; }
.pr-view.side-collapsed .pr-body { grid-template-columns: 0 1fr; }
.pr-view.side-collapsed .sidebar { visibility: hidden; border-right: 0; overflow: hidden; }
.side-toggle { font-family: var(--mono); }

/* ---- floating review panel ---- */
.review-float { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.review-float .float-card { display: none; width: 340px; max-width: calc(100vw - 16px); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(212,255,58,.22); background: rgba(16,16,19,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03), 0 0 32px rgba(212,255,58,.06); }
.review-float.open .float-card { display: block; }
.review-float.open .float-pill { display: none; }
.float-head { display: flex; align-items: center; gap: var(--s2); padding: 10px 12px; cursor: grab; user-select: none; touch-action: none;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,.03); font-weight: 600; font-size: 13px; }
.review-float.dragging .float-head, .review-float.dragging .float-pill { cursor: grabbing; }
.grip { color: var(--muted); font-size: 14px; letter-spacing: -1px; }
.icon-btn { background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font: inherit; line-height: 1; }
.icon-btn:hover { color: var(--text); border-color: var(--border); background: rgba(255,255,255,.05); }
.review-float .review-panel { border-top: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.float-pill { display: inline-flex; align-items: center; gap: var(--s2); padding: 10px 16px; border-radius: 999px; cursor: grab; user-select: none; touch-action: none;
  font: 600 13px/1 inherit; font-family: inherit; color: #0b0b0d; background: var(--volt); border: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px rgba(212,255,58,.25); }
.float-pill .grip { color: rgba(0,0,0,.45); }
.pill-count { background: #0b0b0d; color: var(--volt); border-radius: 999px; padding: 2px 7px; font-family: var(--mono); font-size: 11px; }
.pill-meta { font-family: var(--mono); font-size: 11px; opacity: .7; font-weight: 500; }

/* ---- account menu / login ---- */
.me { position: relative; }
.me-btn { display: inline-flex; align-items: center; gap: var(--s2); background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 4px 10px 4px 4px; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.me-btn:hover { border-color: var(--border); background: rgba(255,255,255,.04); }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: var(--s2); border-radius: 12px; border: 1px solid var(--border); background: rgba(16,16,19,.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 18px 48px rgba(0,0,0,.55); z-index: 50; }
.me-menu-head { display: flex; gap: var(--s3); align-items: center; padding: var(--s2) var(--s2) var(--s3); border-bottom: 1px solid var(--border); margin-bottom: var(--s1); color: var(--text); }
.me-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; }
.me-item:hover { background: rgba(255,255,255,.06); }
.me-item.danger { color: #ff7b72; } .me-item.danger:hover { background: rgba(255,93,93,.12); }
.tiny { font-size: 11px; }
.v-login { display: grid; place-items: center; min-height: calc(100vh - 52px); padding: var(--s5); }
.login-card { width: 460px; max-width: 100%; padding: 32px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,.03); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: var(--s3); }
.login-card h1 { margin: 0; font-size: 22px; }
.login-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 18px rgba(212,255,58,.6); }
.login-main { width: 100%; padding: 10px 14px; }
.login-sep { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 12px; } .login-sep::before, .login-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-pat { display: flex; gap: var(--s2); }
.login-pat input { flex: 1; min-width: 0; background: rgba(0,0,0,.3); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; }
.login-pat input:focus { outline: 2px solid var(--volt); outline-offset: 1px; }
.login-error { color: #ff7b72; font-size: 13px; }

/* ---- token guide ---- */
.token-guide { border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); padding: 0 var(--s3); }
.token-guide summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--volt); list-style: none; }
.token-guide summary::-webkit-details-marker { display: none; }
.token-guide summary::before { content: '▸ '; color: var(--muted); } .token-guide[open] summary::before { content: '▾ '; }
.token-guide .steps { list-style: none; margin: var(--s2) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); font-size: 13px; line-height: 1.5; }
.token-guide .steps li { display: flex; gap: var(--s3); align-items: flex-start; }
.token-guide .steps li > div { display: block; } .token-guide .steps li > div > .tiny { margin-top: 6px; }
.step-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); color: #0b0b0d; background: var(--volt); }
.token-guide code { font-family: var(--mono); font-size: 12px; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }
.token-guide a { color: var(--volt); }
.token-guide a.btn { color: var(--text); text-decoration: none; }
.token-guide > p { margin: var(--s2) 0; }
