/* Portal RTC — tokens visuais (mesmos valores do tema MudBlazor em Layout/PortalTheme.cs) */
:root {
    --fg: #1f2328;
    --fg-muted: #59636e;
    --fg-subtle: #818b98;
    --canvas: #ffffff;
    --canvas-subtle: #f6f8fa;
    --canvas-inset: #f6f8fa;
    --border: #d1d9e0;
    --border-muted: #d1d9e0b3;
    --accent: #0969da;
    --accent-subtle: #ddf4ff;
    --success: #1f883d;
    --success-hover: #1c8139;
    --success-fg: #1a7f37;
    --success-subtle: #dafbe1;
    --attention: #9a6700;
    --attention-subtle: #fff8c5;
    --danger: #d1242f;
    --danger-subtle: #ffebe9;
    --underline-active: #fd8c73;
    --radius: 6px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --gutter: 32px;
    --side: 296px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--fg);
    background: var(--canvas);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono textarea { font-family: var(--mono); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; margin: 0; }

.muted { color: var(--fg-muted); }
.small { font-size: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mb-2 { margin-bottom: 8px; }
.muted-link { color: var(--fg); font-weight: 400; }

/* ---------- Carregamento inicial ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--fg-muted); }
.boot-mark { width: 48px; height: 48px; }
.boot-bar { width: 180px; height: 4px; border-radius: 4px; background: var(--canvas-subtle); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: var(--blazor-load-percentage, 10%); background: var(--accent); transition: width .2s; }
.rtc-boot { padding: 48px; text-align: center; color: var(--fg-muted); }

/* ---------- Cabeçalho ---------- */
.top-bar { display: flex; align-items: center; gap: 8px; height: 68px; padding: 16px; background: #000000; color: #ffffff; }
.top-brand { display: flex; align-items: center; margin-right: 16px; }
.top-brand .brand-mark { width: 32px; height: 32px; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-link { display: inline-flex; align-items: center; gap: 4px; padding: 8px; background: none; border: 0; color: #ffffff; font: 500 16px/20px var(--font); cursor: pointer; border-radius: var(--radius); white-space: nowrap; }
.top-link:hover { color: #d1d9e0; text-decoration: none; }
.top-link .gh-caret { font-size: 10px; opacity: .8; }
.top-spacer { flex: 1; }
.top-search { display: inline-flex; align-items: center; justify-content: space-between; width: 200px; height: 32px; padding: 0 6px 0 12px; border: 1px solid #3d444d; border-radius: var(--radius); color: #9198a1; font-size: 14px; }
.top-search:hover { border-color: #9198a1; text-decoration: none; }
.top-search kbd { font: 11px var(--mono); color: #9198a1; border: 1px solid #3d444d; border-radius: 4px; padding: 0 5px; line-height: 16px; }
.top-user { display: inline-flex; align-items: center; gap: 4px; color: #ffffff; font-size: 14px; font-weight: 600; padding: 0 8px; }
.top-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; background: #ffffff; color: #1f2328; border: 1px solid #ffffff; border-radius: var(--radius); font: 600 16px/20px var(--font); cursor: pointer; }
.top-btn:hover { background: #f0f0f0; text-decoration: none; }

.context-bar { background: var(--canvas-subtle); border-bottom: 1px solid var(--border); }
.tabs-row { display: flex; align-items: center; gap: 8px; padding: 0 16px; min-width: 0; }
.tabs-brand { display: flex; align-items: center; flex: none; margin-right: 8px; }
.tabs-brand .brand-mark { width: 28px; height: 28px; }
.tabs-row .gh-tabs-inner { flex: 1; min-width: 0; padding: 0; }
.tabs-user { display: flex; align-items: center; gap: 8px; flex: none; }
.tabs-user-name { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.context-crumb { display: flex; align-items: center; gap: 4px; padding: 0 16px; height: 36px; font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; }
.context-crumb a { color: var(--fg); padding: 4px 6px; border-radius: var(--radius); overflow: hidden; text-overflow: ellipsis; }
.context-crumb a:hover { background: #818b981a; text-decoration: none; }
.crumb-repo { font-weight: 600; }
.crumb-sep { color: var(--fg-muted); padding: 0 2px; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark-sm { width: 24px; height: 24px; }

/* ---------- Abas ---------- */
.gh-tabs-inner { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.gh-tabs-inner::-webkit-scrollbar { display: none; }
.gh-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; height: 48px; color: var(--fg); white-space: nowrap; font-size: 14px; line-height: 30px; }
.gh-tab .mud-icon-root { color: var(--fg-muted); }
.gh-tab:hover { text-decoration: none; }
.gh-tab:hover::before { content: ""; position: absolute; inset: 8px 0; border-radius: var(--radius); background: #818b981a; z-index: -1; }
.gh-tab.active { font-weight: 600; }
.gh-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 6px; background: var(--underline-active); }
.gh-counter { display: inline-block; min-width: 20px; padding: 0 6px; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; border-radius: 2em; background: #818b981f; color: var(--fg); }

/* ---------- Estrutura ---------- */
.gh-container { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.gh-main { padding-top: 16px; padding-bottom: 48px; min-height: calc(100vh - 260px); }
.gh-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.gh-footer-inner { max-width: 1280px; margin: 0 auto; padding: 40px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; color: var(--fg-muted); font-size: 12px; }
.gh-footer-inner a { color: var(--fg-muted); }

.repo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--border-muted); min-height: 48px; }
.repo-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.repo-title h1 { font-size: 20px; font-weight: 600; word-break: break-word; }
.repo-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.repo-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 16px; align-items: start; }
.repo-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.repo-side { min-width: 0; padding-left: 24px; }

.repo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.repo-toolbar-left, .repo-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repo-meta-link { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-muted); padding: 0 8px; }
.repo-meta-link strong { color: var(--fg); }

.page-head { margin-bottom: 16px; padding-bottom: 8px; }
.page-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.page-head h1 { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.page-head p { margin: 8px 0 0; }

/* ---------- Botões e rótulos ---------- */
.gh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 12px; font: 500 14px/20px var(--font); white-space: nowrap;
    color: var(--fg); background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 1px 0 0 #1f23280a; cursor: pointer; text-decoration: none;
}
.gh-btn:hover { background: #eff2f5; text-decoration: none; }
.gh-btn .mud-icon-root { color: var(--fg-muted); }
.gh-btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.gh-btn-primary { color: #fff; background: var(--success); border-color: #1f232826; }
.gh-btn-primary:hover { background: var(--success-hover); }
.gh-btn-primary .mud-icon-root { color: #fff; }
.gh-btn-block { width: 100%; }
.gh-btn-static { cursor: default; }
.gh-btn[disabled] { opacity: .6; cursor: default; }
.gh-caret { font-size: 10px; margin-left: 2px; }
.gh-icon-btn { border: 0; background: transparent; color: var(--fg-muted); padding: 4px; border-radius: var(--radius); cursor: pointer; display: inline-flex; }
.gh-icon-btn:hover { background: #818b981a; color: var(--fg); }

.gh-label { display: inline-flex; align-items: center; padding: 0 7px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; border: 1px solid var(--border); border-radius: 2em; color: var(--fg-muted); background: transparent; }
.gh-label-green { color: var(--success-fg); border-color: #1a7f37; }
.gh-label-blue { color: var(--accent); border-color: var(--accent); }
.gh-label-yellow { color: var(--attention); border-color: #bf8700; }
.gh-label-red { color: var(--danger); border-color: var(--danger); }

.gh-flash { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; margin: 8px 0; border: 1px solid #54aeff66; border-radius: var(--radius); background: var(--accent-subtle); color: var(--fg); }
.gh-flash-blue { background: var(--accent-subtle); border-color: #54aeff66; }
.gh-flash-green { background: var(--success-subtle); border-color: #4ac26b66; }
.gh-flash-yellow { background: var(--attention-subtle); border-color: #d4a72c66; }
.gh-flash-red { background: var(--danger-subtle); border-color: #ff818266; }
.gh-flash .mud-icon-root { margin-top: 2px; flex: none; }
.gh-flash a { display: block; }
.gh-container > .gh-flash { margin-top: 16px; }

.gh-input { display: block; width: 100%; height: 32px; padding: 5px 12px; font: 14px/20px var(--font); color: var(--fg); background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px 0 0 #d1d9e033; }
.gh-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

/* ---------- Caixas ---------- */
.gh-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); min-width: 0; }

.file-list-head { display: flex; align-items: center; gap: 8px; padding: 16px; background: var(--canvas-subtle); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; font-size: 14px; min-width: 0; }
.file-list-head strong { white-space: nowrap; }
.file-list-head-right { margin-left: auto; white-space: nowrap; font-size: 12px; }
.file-list-head-link { display: inline-flex; align-items: center; gap: 4px; color: var(--fg); font-size: 12px; padding-left: 8px; white-space: nowrap; }
.file-list-more { display: none; text-align: center; padding: 8px; border-top: 1px solid var(--border); font-size: 14px; }
.file-list-head { min-height: 52px; }
.gh-input-like { display: inline-flex; align-items: center; gap: 8px; width: 320px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg-muted); background: var(--canvas); font-size: 14px; }
.gh-input-like:hover { text-decoration: none; border-color: var(--fg-subtle); }
.readme-tabs-end { margin-left: auto; padding: 0 8px; color: var(--fg-muted); display: inline-flex; }
.side-note { margin: 16px 0 0; padding: 8px 12px; border-radius: var(--radius); background: var(--accent-subtle); font-size: 12px; }
.side-member { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.avatar-round { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--canvas-subtle); border: 1px solid var(--border); color: var(--fg-muted); flex: none; }
.snippet { position: relative; margin: 0 0 16px; }
.snippet pre { margin: 0; padding: 16px 56px 16px 16px; overflow: auto; font-size: 85%; line-height: 1.45; background: var(--canvas-subtle); border-radius: var(--radius); }
.snippet pre code { padding: 0; background: transparent; white-space: pre; font-size: 100%; }
.snippet-copy { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas-subtle); color: var(--fg-muted); cursor: pointer; }
.snippet-copy:hover { background: #eff2f5; color: var(--fg); }
.avatar-sq { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 4px; background: #1f2328; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.file-row { display: grid; grid-template-columns: 16px minmax(120px, 2fr) minmax(0, 3fr) auto; align-items: center; gap: 16px; padding: 0 16px; height: 41px; border-top: 1px solid var(--border); font-size: 14px; }
.file-row:first-of-type { border-top: 0; }
.file-row:hover { background: var(--canvas-subtle); }
.file-icon-dir { color: #54aeff !important; }
.file-icon { color: var(--fg-muted) !important; }
.file-name { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover { color: var(--accent); }
.file-msg { color: var(--fg-muted); }
.file-msg a { color: var(--fg-muted); }
.file-msg a:hover { color: var(--accent); }
.file-date { color: var(--fg-muted); text-align: right; white-space: nowrap; }

.readme-tabs { display: flex; align-items: center; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.readme-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 8px; color: var(--fg); background: none; border: 0; font: 400 14px var(--font); white-space: nowrap; cursor: pointer; }
.readme-tab .mud-icon-root { color: var(--fg-muted); }
.readme-tab:hover { text-decoration: none; }
.readme-tab.active { font-weight: 600; }
.readme-tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--underline-active); border-radius: 6px; }

/* ---------- Texto tipo LEIA-ME ---------- */
.markdown { padding: 32px; font-size: 16px; line-height: 1.5; word-wrap: break-word; }
.markdown > *:first-child { margin-top: 0 !important; }
.markdown h1 { font-size: 2em; padding-bottom: .3em; margin: 24px 0 16px; border-bottom: 1px solid var(--border-muted); }
.markdown h2 { font-size: 1.5em; padding-bottom: .3em; margin: 24px 0 16px; border-bottom: 1px solid var(--border-muted); }
.markdown h3 { font-size: 1.25em; margin: 24px 0 16px; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown .table-wrap, .markdown dl { margin: 0 0 16px; }
.markdown ul, .markdown ol { padding-left: 2em; }
.markdown li + li { margin-top: .25em; }
.markdown code { padding: .2em .4em; font-size: 85%; background: #818b981f; border-radius: var(--radius); white-space: break-spaces; }
.markdown blockquote { padding: 0 1em; color: var(--fg-muted); border-left: .25em solid var(--border); }
.markdown table { border-collapse: collapse; width: 100%; }
.markdown td:first-child { width: 40%; }
.markdown th, .markdown td { padding: 6px 13px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.markdown th { font-weight: 600; text-align: center; }
.markdown tr:nth-child(2n) { background: var(--canvas-subtle); }
.markdown .gh-btn { font-size: 14px; }
.glossario dt { font-weight: 600; margin-top: 12px; }
.glossario dd { margin: 4px 0 0 0; padding-left: 16px; color: var(--fg); }
.table-wrap { overflow-x: auto; max-width: 100%; }

/* ---------- Barra lateral ---------- */
.side-section { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border-muted); }
.side-section:last-child { border-bottom: 0; }
.side-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.side-desc { margin: 0 0 16px; font-size: 16px; line-height: 1.5; font-style: italic; color: var(--fg-muted); }
.side-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.side-links li { line-height: 21px; height: 21px; }
.side-links .mud-icon-root { font-size: 16px !important; width: 16px; height: 16px; }
.side-links a, .side-links span { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); font-size: 14px; font-weight: 400; }
.side-links strong { color: var(--fg); }
.side-links a .mud-icon-root, .side-links span .mud-icon-root { color: var(--fg-muted); }
.side-links a:hover { color: var(--accent); text-decoration: none; }
.side-release { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.release-icon { color: var(--success-fg) !important; margin-top: 2px; }
.release-name { font-weight: 600; color: var(--fg); margin-right: 4px; }
.side-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.lang-bar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; margin-bottom: 8px; gap: 2px; }
.lang-bar span { display: block; height: 100%; }
.lang-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; }
.lang-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* ---------- Cartões de projeto ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.proj-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.proj-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.proj-card-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-card-desc { margin: 0; color: var(--fg-muted); flex: 1; }
.proj-card-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--fg-muted); font-size: 12px; }
.proj-card-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.proj-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Formulários ---------- */
.form-box, .result-box, .pdf-box { padding: 16px 24px 24px; margin-bottom: 16px; }
.form-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border-muted); }
.form-box-head h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.form-box-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; align-items: start; }
.form-grid .span-2 { grid-column: span 2; }
.form-switches { margin-top: 8px; }
.form-submit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.item-card { border: 1px solid var(--border-muted); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; background: #fcfdfe; }
.item-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-row > .mud-input-control { flex: 1 1 220px; }
.consulta-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.switch-cell { display: flex; align-items: center; min-height: 40px; }
.xml-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 8px; }
.file-btn { position: relative; overflow: hidden; align-self: center; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 32px 16px; text-align: center; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--canvas-subtle); color: var(--fg-muted); cursor: pointer; }
.drop-zone:hover, .drop-zone.has-file { border-color: var(--accent); background: var(--accent-subtle); }
.drop-zone strong { color: var(--fg); }
.file-input-cover { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pdf-frame { width: 100%; height: 75vh; min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius); }
.mono textarea { font-size: 12px !important; }

/* ---------- Resultados ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: var(--canvas-subtle); }
.stat-label { color: var(--fg-muted); font-size: 12px; }
.stat-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gh-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--fg-muted); background: var(--canvas-subtle); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.gh-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-muted); vertical-align: top; }
.gh-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gh-table tr.row-error td { background: var(--danger-subtle); font-size: 13px; }
.gh-table code, .def-list code, .erro-card code { font-family: var(--mono); font-size: 12px; padding: .1em .4em; background: #818b981f; border-radius: var(--radius); }
.memoria { margin-bottom: 12px; }
.memoria ul { margin: 4px 0 0; padding-left: 18px; }
.memoria li { margin-bottom: 4px; }
.def-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 16px 0 0; }
.def-list dt { color: var(--fg-muted); }
.def-list dd { margin: 0; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.erro-card { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas-subtle); }
.erro-card p { margin: 8px 0 0; }
ul.plain { margin: 0; padding-left: 18px; }

.code-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas-subtle); margin-top: 8px; min-width: 0; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--border); }
.code-block pre { margin: 0; padding: 12px 16px; overflow: auto; font-size: 12px; line-height: 1.45; }

/* Estado dos serviços */
.status-box { margin-bottom: 16px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.status-row:first-child { border-top: 0; }
.status-name { flex: 1; min-width: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status-ok { background: var(--success); }
.status-bad { background: #bf8700; }
.status-unknown { background: var(--border); }

.gh-blank { text-align: center; padding: 64px 16px; }
.gh-blank-title { font-size: 24px; margin: 12px 0 8px; }

/* ---------- MudBlazor ajustado aos tokens ---------- */
.gh-mudtabs .mud-tabs-tabbar { background: transparent !important; border-bottom: 1px solid var(--border); }
.gh-mudtabs .mud-tab { text-transform: none; font-size: 14px; min-height: 48px; color: var(--fg); }
.gh-mudtabs .mud-tab.mud-tab-active { font-weight: 600; color: var(--fg); }
.gh-mudtabs .mud-tab-slider { background: var(--underline-active) !important; height: 2px; }
.gh-expansion .mud-expand-panel { border: 1px solid var(--border); border-radius: var(--radius) !important; margin-bottom: 8px; }
.gh-expansion .mud-expand-panel::before { display: none; }
.mud-button-root { box-shadow: none !important; }
.mud-button-filled.mud-button-filled-secondary { border: 1px solid #1f232826; }
.mud-input-outlined-border { border-color: var(--border) !important; }
.mud-input-control > .mud-input-control-input-container > .mud-input-label-outlined { font-size: 14px; }
.mud-popover-provider .mud-list-item-text p { font-size: 14px; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; background: var(--canvas-subtle); display: flex; justify-content: center; padding: 40px 16px; }
.login-wrap { width: 100%; max-width: 340px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.login-logo .brand-mark { width: 48px; height: 48px; }
.login-title { font-size: 24px; font-weight: 300; letter-spacing: -0.5px; text-align: center; margin-bottom: 16px; }
.login-box { background: var(--canvas); border: 1px solid var(--border-muted); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.login-box label { font-weight: 400; font-size: 14px; }
.login-box .gh-input { margin-bottom: 8px; }
.login-box .gh-btn { margin-top: 8px; }
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 12px !important; color: var(--fg-muted); }
.login-error { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid #ff818266; border-radius: var(--radius); background: var(--danger-subtle); font-size: 13px; }
.login-error-close { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--fg-muted); }
.login-callout { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; font-size: 14px; }
.login-foot { text-align: center; color: var(--fg-muted); font-size: 12px; margin-top: 32px; }

#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; padding: 12px 16px; background: var(--attention-subtle); border-top: 1px solid #d4a72c66; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }

/* ---------- Larguras ---------- */
@media (max-width: 1279.98px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1011.98px) {
    :root { --gutter: 16px; --side: 248px; }
    .hide-md { display: none !important; }
    .top-bar { height: 52px; padding: 8px 16px; }
    .top-btn { font-size: 14px; height: 32px; }
    .gh-input-like { width: auto; }
    .gh-input-like span { display: none; }
    .file-row-extra { display: none; }
    .file-list-more { display: block; }
    .file-row { grid-template-columns: 16px minmax(100px, 1fr) minmax(0, 1fr) auto; }
    .two-col { grid-template-columns: 1fr; }
    .hide-sm { display: none !important; }
    .side-desc { font-size: 14px; }
}
@media (max-width: 767.98px) {
    :root { --gutter: 16px; }
    .repo-layout { grid-template-columns: minmax(0, 1fr); }
    .repo-side { order: -1; padding-left: 0; }
    .side-section { padding-bottom: 16px; margin-bottom: 16px; }
    .card-grid { grid-template-columns: 1fr; }
    .file-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
    .file-row .file-msg { display: none; }
    .markdown { padding: 16px; }
    .form-box, .result-box, .pdf-box { padding: 12px 16px 16px; }
    .form-grid .span-2 { grid-column: auto; }
    .gh-tabs-inner { padding: 0 8px; }
    .page-head h1 { font-size: 20px; }
}
@media (max-width: 543.98px) {
    .hide-xs { display: none !important; }
    .crumb-owner, .crumb-sep { display: none; }
    .def-list { grid-template-columns: 1fr; gap: 2px; }
    .def-list dd { margin-bottom: 8px; }
}
