/*
  Koji styling — 方案三 layout (fixed sidebar + topbar + tag-pill bar),
  light professional palette (方案一/二 coloring). Site-wide skin: covers
  every stock koji-web page (tables, forms, task/build state colors, tree,
  logs, error page, ...). Zero external font/asset dependencies.

  Shared tokens below are consumed by dash.css / dash.js (overview page) —
  keep the names stable. --accent-tint is an extra (not in the required
  set) for the light-fill active-nav look; safe to reuse from dash.css too.
*/

:root {
    --bg: #f5f7fb;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-tint: #e8f0fe;
    --ok: #16a34a;
    --err: #dc2626;
    --warn: #d97706;
    --info: #2563eb;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 640px;
    background: var(--bg);
}

body {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}

h4 {
    color: var(--text);
    background: none;
    font-size: 16px;
    font-weight: 700;
    padding: 0;
    margin: 0 0 14px 0;
}

h4 a {
    color: inherit;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-strong);
}

a:visited {
    color: #6d28d9;
}

a.help {
    text-decoration: underline;
    color: var(--text-muted);
}

abbr {
    cursor: help;
    border-bottom: 1px dotted var(--text-muted);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

.hide, .hidden {
    display: none;
}

.disabled {
    color: var(--text-muted);
}

.smaller {
    font-size: smaller;
}

.error {
    color: var(--err);
    font-weight: 600;
}

.adminLink {
    color: var(--text-muted);
    font-size: 12px;
}

.charlist {
    text-align: center;
    color: var(--text-muted);
    padding: 16px 0;
}

/* ==========================================================================
   Shell layout: fixed sidebar + topbar + content
   ========================================================================== */

#wrap {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg);
}

/* ---- Sidebar ---- */

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow-y: auto;
    z-index: 10;
}

#logo {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

#logoLink {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

#logoLink:hover {
    text-decoration: none;
}

#logoMark svg {
    display: block;
}

#logoText {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#mainNav {
    flex: 1;
    padding: 0 8px 16px 8px;
}

#mainNav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#mainNav li {
    border-radius: var(--radius-sm);
}

#mainNav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

#mainNav li a:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

#mainNav .navIcon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: inherit;
}

body#summary #mainNav li#summaryTab a,
body#tasks #mainNav li#tasksTab a,
body#tags #mainNav li#tagsTab a,
body#builds #mainNav li#buildsTab a,
body#packages #mainNav li#packagesTab a,
body#users #mainNav li#usersTab a,
body#hosts #mainNav li#hostsTab a,
body#buildtargets #mainNav li#buildtargetsTab a,
body#reports #mainNav li#reportsTab a,
body#search #mainNav li#searchTab a,
body#api #mainNav li#apiTab a {
    background: var(--accent-tint);
    color: var(--accent);
    font-weight: 700;
}

body#summary #mainNav li#summaryTab a:hover,
body#tasks #mainNav li#tasksTab a:hover,
body#tags #mainNav li#tagsTab a:hover,
body#builds #mainNav li#buildsTab a:hover,
body#packages #mainNav li#packagesTab a:hover,
body#users #mainNav li#usersTab a:hover,
body#hosts #mainNav li#hostsTab a:hover,
body#buildtargets #mainNav li#buildtargetsTab a:hover,
body#reports #mainNav li#reportsTab a:hover,
body#search #mainNav li#searchTab a:hover,
body#api #mainNav li#apiTab a:hover {
    background: var(--accent-tint);
    color: var(--accent);
}

/* ---- Shell (topbar + content), offset by the fixed sidebar ---- */

#shell {
    margin-left: 200px;
    width: calc(100% - 200px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#topbar {
    height: 56px;
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 5;
    min-width: 0;
    overflow: hidden;
}

#tagbarWrap {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

#tagbarLabel {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.tagbar {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}

.tagbar::-webkit-scrollbar {
    display: none;
}

.tagbar-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    line-height: 1.4;
}

.tagbar-tab:hover {
    color: var(--text);
    border-color: var(--accent);
    text-decoration: none;
}

.tagbar-tab.active {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #ffffff;
}

.tagbar-add {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.tagbar-add:hover {
    color: var(--text);
    border-color: var(--accent);
    text-decoration: none;
}

#topbarRight {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

/* Search form (names/values kept as-is, only re-skinned) */

#headerSearch {
    display: flex;
    flex: 0 1 380px;
    max-width: 380px;
    align-items: center;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    margin: 0;
    min-width: 0;
}

#headerSearch select,
#headerSearch input,
#headerSearch button {
    font-size: 12.5px;
}

#headerSearch select {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 2px;
    flex: 0 0 auto;
    max-width: 110px;
}

#headerSearch select:focus {
    outline: none;
}

#headerSearch input[type="text"] {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 7px 6px;
    flex: 1 1 auto;
    min-width: 40px;
    width: 100%;
    outline: none;
}

#headerSearch input[type="text"]::placeholder {
    color: var(--text-muted);
}

#headerSearch input[type="submit"] {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 7px 18px;
    flex: 0 0 auto;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

#headerSearch input[type="submit"]:hover {
    background: var(--accent-strong);
}

/* Alternate search targets (other koji instances), openkoji style —
   folded behind a small toggle so the top bar stays compact; the menu
   itself is positioned by dash.js (position:fixed, so it isn't clipped
   by #topbar's overflow:hidden). */
#headerSearch .alt-search {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: 4px;
    padding-left: 6px;
    border-left: 1px solid var(--border);
}

#headerSearch .alt-search-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    line-height: 1;
    padding: 6px 9px;
    font-size: 12px;
    cursor: pointer;
}

#headerSearch .alt-search-toggle:hover,
#headerSearch .alt-search-toggle[aria-expanded="true"] {
    color: var(--accent);
    border-color: var(--accent);
}

#headerSearch .alt-search-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 170px;
    z-index: 40;
}

#headerSearch .alt-search-menu[hidden] {
    display: none;
}

#headerSearch input[type="submit"].alt-search-btn {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-weight: 500;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

#headerSearch input[type="submit"].alt-search-btn:hover {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--border);
}

/* Login / user chip */

#loginInfo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

#loginInfo a {
    color: var(--text);
    font-weight: 600;
}

#loginInfoDate {
    opacity: 0.75;
}

/* ---- Content ---- */

#content {
    flex: 1 1 auto;
    padding: 20px;
    min-width: 0;
    overflow-x: auto;
}

#footer {
    flex: 0 0 auto;
    padding: 16px 20px;
    margin: 0;
    line-height: 1.5em;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    width: 100%;
}

#footer a {
    color: var(--text-muted);
    text-decoration: none;
}

#footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

#footer .footer-row {
    padding: 4px 0;
}

#footer .footer-row:first-child {
    padding-top: 0;
}

#footer .footer-links a {
    font-weight: 600;
    color: var(--text);
}

#footer .footer-sep {
    margin: 0 8px;
    opacity: 0.6;
}

#footer .footer-version {
    opacity: 0.85;
}

#footer #kojiVersion {
    font-weight: 600;
    color: var(--text);
}

#footer .footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

#footer .footer-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

#footer .footer-col h4 {
    margin: 0 0 2px 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#footer .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding-top: 10px;
}

#footer .footer-bottom > span {
    flex: 1 1 auto;
    min-width: 200px;
}

#PoweredByKojiLogo {
    height: 22px;
    vertical-align: middle;
    opacity: 0.65;
}

/* ==========================================================================
   Generic form controls (login, tagedit, hostedit, notificationedit, ...)
   ========================================================================== */

input, select, textarea, button {
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
    padding: 0;
    accent-color: var(--accent);
}

input[type="submit"], input[type="button"], button {
    background: var(--accent);
    color: #ffffff;
    border-color: transparent;
    cursor: pointer;
    font-weight: 600;
}

input[type="submit"]:hover, input[type="button"]:hover, button:hover {
    background: var(--accent-strong);
}

input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

select.filterlist, .filterlist {
    font-size: 12px;
    padding: 5px 8px;
}

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 16px 0;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

legend {
    color: var(--text-muted);
    padding: 0 6px;
    font-weight: 600;
}

form.pageJump {
    float: right;
    margin-left: 20px;
}

form.pageJump select {
    font-size: 12px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
    border-spacing: 0;
    border-collapse: collapse;
}

th, td {
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 600;
    color: var(--text-muted);
}

table:not(.data-list):not(.nested) {
    margin-bottom: 16px;
}

table:not(.data-list):not(.nested) td {
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

table:not(.data-list):not(.nested) th {
    white-space: nowrap;
    padding-right: 16px;
}

img.sort {
    vertical-align: baseline;
    width: 10px;
    height: 9px;
    opacity: 0.85;
}

td.paginate, .paginate {
    text-align: center;
    color: var(--text-muted);
    padding: 12px 10px;
}

div.noPaginate {
    margin-bottom: 10px;
}

div.pageHeader, .pageHeader {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

div.dataHeader, .dataHeader {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 20px 0 10px 0;
}

table.data-list {
    width: 100%;
    table-layout: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    word-break: break-word;
}

table.data-list td {
    vertical-align: top;
    font-variant-numeric: tabular-nums;
}

tr.list-header {
    background: var(--bg);
}

tr.list-header th {
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tr.list-header th a {
    color: inherit;
}

tr.list-header th:first-child,
tr.list-header th:last-child {
    border-radius: 0;
}

tr.row-odd {
    background: var(--bg-card);
}

tr.row-even {
    background: var(--bg);
}

tr.row-odd td,
tr.row-even td {
    border-bottom: 1px solid var(--border);
}

tr.row-odd:hover,
tr.row-even:hover {
    background: rgba(37, 99, 235, 0.06);
}

tr.row-odd td:first-child,
tr.row-even td:first-child,
tr.row-odd td:last-child,
tr.row-even td:last-child {
    border-left: none;
    border-right: none;
}

tr.row-even td.tree {
    background: transparent;
}

tr.row-even td.tree span.treeLabel {
    background: transparent;
}

/* ---- Task / build / repo / buildroot state colors ---- */

td.building {
    color: var(--info);
    font-weight: 600;
}

td.complete {
    color: var(--ok);
    font-weight: 600;
}

td.deleted,
td.failed,
td.canceled {
    color: var(--err);
    font-weight: 600;
}

td.false {
    color: var(--err);
    font-weight: 600;
}

td.true {
    color: var(--ok);
    font-weight: 600;
}

.taskfree, .repoinit {
    color: var(--accent);
}

.taskopen {
    color: var(--warn);
}

.taskclosed, .repoready {
    color: var(--ok);
}

.taskcanceled, .repoexpired {
    color: var(--warn);
}

.taskassigned {
    color: #7c3aed;
}

.taskfailed, .repodeleted, .repoproblem {
    color: var(--err);
}

/* Tinted state "chip" look for the task-tree links/labels (mock's
   成功/失败-style pills) — scoped to a/span so it never touches the
   tr.taskX row classes used for graph-bar coloring below. */
a.taskfree, span.taskfree,
a.taskopen, span.taskopen,
a.taskclosed, span.taskclosed,
a.taskcanceled, span.taskcanceled,
a.taskassigned, span.taskassigned,
a.taskfailed, span.taskfailed {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

a.taskfree, span.taskfree { background: var(--accent-tint); }
a.taskopen, span.taskopen { background: #fef3c7; }
a.taskclosed, span.taskclosed { background: #dcfce7; }
a.taskcanceled, span.taskcanceled { background: #fef3c7; }
a.taskassigned, span.taskassigned { background: #ede9fe; }
a.taskfailed, span.taskfailed { background: #fee2e2; }

a.taskfree:hover, a.taskopen:hover, a.taskclosed:hover,
a.taskcanceled:hover, a.taskassigned:hover, a.taskfailed:hover {
    text-decoration: none;
    filter: brightness(0.97);
}

/* Bar-chart rows (buildsbystatus / buildsbytarget / *byuser / *byhost) */

img.graphrow {
    background-color: var(--accent);
    vertical-align: bottom;
    height: 15px;
    border-radius: 2px;
}

tr.taskclosed img.graphrow {
    background-color: var(--ok);
}

tr.taskfailed img.graphrow {
    background-color: var(--err);
}

tr.taskcanceled img.graphrow {
    background-color: var(--warn);
}

/* Status icons (util.imageTag / stateImage / brStateImage) — the upstream
   files are 2006-era GIF/PNG glyphs that clash with the new look. Swap them
   for small flat SVG badges via CSS image-replacement (`content: url()`),
   keyed off the `alt` attribute imageTag() always sets to the raw state
   name. Browsers that don't support `content` on <img> keep the original
   PNG, so this degrades safely. Covers every name in upstream/static/images
   that util.py's stateName/brStateName/repoStateName can produce, plus the
   literal 'yes'/'no'/'waiting' used directly by several templates. */

img.stateimg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin: 0 1px;
}

img.stateimg[alt="closed"],
img.stateimg[alt="complete"],
img.stateimg[alt="ready"],
img.stateimg[alt="yes"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%2316a34a'/%3E%3Cpath d='M4.6 8.3l2.1 2.1 4.3-4.6' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

img.stateimg[alt="failed"],
img.stateimg[alt="deleted"],
img.stateimg[alt="no"],
img.stateimg[alt="problem"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23dc2626'/%3E%3Cpath d='M5.5 5.5l5 5M10.5 5.5l-5 5' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

img.stateimg[alt="canceled"],
img.stateimg[alt="expired"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23d97706'/%3E%3Cpath d='M5 8h6' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

img.stateimg[alt="open"],
img.stateimg[alt="building"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%232563eb'/%3E%3Cpath d='M6.3 5.3l4.4 2.7-4.4 2.7z' fill='white'/%3E%3C/svg%3E");
}

img.stateimg[alt="free"],
img.stateimg[alt="waiting"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%2364748b'/%3E%3Cpath d='M8 4.6v3.6l2.4 1.5' stroke='white' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

img.stateimg[alt="assigned"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%232563eb'/%3E%3Ccircle cx='8' cy='6.2' r='1.7' fill='white'/%3E%3Cpath d='M4.3 11.7c0-2.1 1.7-3.4 3.7-3.4s3.7 1.3 3.7 3.4' fill='white'/%3E%3C/svg%3E");
}

img.stateimg[alt="init"],
img.stateimg[alt="initializing"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%2394a3b8'/%3E%3Ccircle cx='8' cy='8' r='2' fill='white'/%3E%3C/svg%3E");
}

img.stateimg[alt="unknown"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%2394a3b8'/%3E%3Ctext x='8' y='11.3' font-family='Arial, sans-serif' font-size='9' font-weight='700' fill='white' text-anchor='middle'%3E?%3C/text%3E%3C/svg%3E");
}

/* ---- Nested tables (filter bars, task/buildroot detail) ---- */

table.nested {
    float: left;
    border-collapse: collapse;
}

table.nested th,
table.nested td {
    padding: 2px 6px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: none;
}

td.container {
    padding: 4px 0;
    width: 100%;
}

div.toggle {
    padding: 6px;
}

/* ---- Task tree (taskinfo / tasks descendants) ---- */

td.tree {
    background: transparent;
}

.tree span.root {
    font-weight: 700;
    background: transparent;
    color: var(--text);
}

.tree ul {
    padding-left: 2em;
    list-style: none;
    margin-top: 0;
    margin-bottom: 0;
}

.tree span.treeBranch {
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    font-size: 1.1em;
}

.tree li.sibling > span.treeBranch {
    border-left-width: 0;
}

.tree li.sibling {
    border-left: 1px solid var(--border);
}

.tree a {
    text-decoration: none;
}

.tree span.treeLabel {
    position: relative;
    top: 0.6em;
    margin-left: 1.2em;
    padding-left: 0.2em;
    background: transparent;
    font-size: 0.85em;
    color: var(--text);
}

.tree > ul {
    padding-bottom: 0.6em;
}

.tree span.treeToggle {
    font-weight: 700;
    color: var(--text-muted);
}

.tree span.treeLink {
    font-size: smaller;
}

/* ==========================================================================
   Logs / preformatted / changelog text
   ========================================================================== */

pre,
.changelog,
.rpmheader,
.usertext {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    overflow-x: auto;
}

#abbr-result, #full-result, #result {
    max-width: 100%;
}

/* ==========================================================================
   Misc / scrollbars
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 900px) {
    #sidebar {
        width: 60px;
    }

    #sidebar #logoText,
    #mainNav li a span {
        display: none;
    }

    #logo {
        display: flex;
        justify-content: center;
        padding: 16px 8px;
    }

    #mainNav li a {
        justify-content: center;
        padding: 10px 0;
    }

    #shell {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    #headerSearch input[type="text"] {
        min-width: 100px;
    }
}
