/* keys.zjawa.tech additions on top of the shared zjawa theme */
pre.script { font-size: .8rem; background: var(--zj-navy); color: #e5e9ef; padding: .8rem 1rem; border-radius: var(--pico-border-radius); white-space: pre-wrap; word-break: break-all; margin: 0; }
pre.conf { background: #f6fbf1; border: 1px solid var(--zj-green-border); padding: .8rem; border-radius: var(--pico-border-radius); max-height: 75vh; line-height: 1.4; }
.copy-wrap { position: relative; }
.copy-wrap button.copy { position: absolute; top: .5rem; right: .5rem; width: auto; margin: 0; padding: .2rem .6rem; font-size: .78rem; }
table.kv td:first-child { color: var(--zj-gray); width: 34%; white-space: nowrap; }
.sub { display: block; font-size: .8rem; color: var(--zj-gray); line-height: 1.25; }
.row-actions { white-space: nowrap; }
.row-actions a[role=button] { text-decoration: none; }
.diff-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.diff-toolbar label { margin: 0; font-size: .85rem; color: var(--zj-gray); }
.diff-toolbar select { width: auto; max-width: 420px; margin: 0; padding: .3rem 2rem .3rem .6rem; font-size: .9rem; height: auto; }
.diff-toolbar button { width: auto; margin: 0; }
.d2h-wrapper { font-size: 12px; }
.d2h-file-header { display: none; }
form.inline { display: inline; margin: 0; }
form.inline button { width: auto; margin: 0; }
h3.split .row-actions form { display: inline; }
.add { color: var(--zj-green-hover); font-weight: 600; } .del { color: var(--zj-red); font-weight: 600; }
label small { display: block; color: var(--zj-gray); font-weight: 400; }
.check { margin-bottom: var(--pico-spacing); }
.check label { margin-bottom: .15rem; }
.check small { display: block; color: var(--zj-gray); font-size: .8rem; line-height: 1.35; padding-left: 1.75rem; }
.user-pass { display: inline-flex; gap: .2rem; align-items: center; }
.user-pass input { width: 140px; margin: 0; padding: .25rem .5rem; font-size: .8rem; height: auto; }
.user-pass select { width: auto; margin: 0; padding: .25rem 1.8rem .25rem .5rem; font-size: .8rem; height: auto; }
/* dashboard table: keep identifiers and timestamps on one line, let long model names wrap */
table.clients td.name, table.clients td.nowrap, table.clients td.mono, table.clients td.fw { white-space: nowrap; }
table.clients td.name a, table.clients td.name strong { white-space: nowrap; display: inline-block; }
table.clients td .sub { display: block; white-space: normal; max-width: 240px; }
table.clients th { white-space: nowrap; }
/* nieudana kopia: cały wiersz na jasnoczerwono */
table.clients tr.failed > td { background: var(--zj-red-bg); }
table.clients tr.failed > td:first-child { box-shadow: inset 3px 0 0 var(--zj-red); }
/* wiek ostatniej kopii: dokładna data w dymku */
.age { border-bottom: 1px dotted var(--zj-gray); cursor: help; }
ul.runs { margin: 0; padding-left: 1.2rem; font-size: .9rem; line-height: 1.6; }

/* device tags: chips like .badge.idle, plus the dashboard filter bar */
.tag { display: inline-block; padding: .05rem .45rem; margin: .1rem .2rem .1rem 0; border-radius: 2px; background: #e6ebee; color: var(--zj-slate); font-size: .75rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tag:hover { background: var(--zj-green-bg); color: var(--zj-green-hover); text-decoration: none; }
.tag.active { background: var(--zj-green); color: #fff; }
.tag .cnt { font-weight: 400; opacity: .7; }
.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; margin: -.4rem 0 .8rem; }
table.clients td.name .tags { display: block; white-space: normal; max-width: 240px; margin-top: .1rem; }

/* history grouped by configuration version */
tr.grouped td { background: rgba(0, 0, 0, .025); font-size: .9rem; }
tr.grouped td:nth-child(2) { padding-left: 1.75rem; }
.text-failed { color: var(--pico-del-color, #c62828); }
/* summary row of a configuration version: marks where the next version starts,
   so the unfolded runs of the previous one stay visually attached to their own head */
tr.group-head > td { border-top: 2px solid var(--zj-green-border); }
tr.group-head > td:first-child { font-weight: 600; }
/* copy button showing the "select it yourself" message: let the longer text wrap */
button.copy-error { white-space: normal; max-width: 15rem; line-height: 1.25; text-align: left; }
.badge.revoked { background: var(--zj-red); } .badge.drift { background: var(--zj-orange); color: var(--zj-navy); }
.badge.error { background: var(--zj-red); } .badge.active { background: var(--zj-green-hover); }
.badge.offboarded { background: var(--zj-gray); } .badge.expired { background: var(--zj-gray); }
.qr svg { width: 220px; height: 220px; }
.soon { text-align: center; padding: 2rem 0; }
