/* toolbar, chips, switch, menus, logs panel, deploy */

/* toolbar, search, chips */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 220px; min-width: 180px; max-width: 360px; }
.search { position: relative; }
.search svg.ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 32px; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; }
.chip { border: 0; background: transparent; color: var(--text-2); padding: 4px 10px; border-radius: 8px; font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.active { background: var(--surface-3); color: var(--text); }
.chip .n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.active .n { color: var(--accent); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 32px; height: 18px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); position: relative; transition: background .15s, border-color .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: var(--accent); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* tables: sticky header inside the scroll area, hover */
.tbl-wrap { overflow: auto; max-width: 100%; }
.tbl-wrap.tall { max-height: calc(100vh - 260px); min-height: 160px; }
.tbl-wrap.tall thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: inset 0 -1px 0 var(--line-soft); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
td.name { width: 100%; max-width: 0; min-width: 160px; }
td.name b { display: inline; overflow-wrap: anywhere; }
td.name .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
td.right, th.right { text-align: right; }
td.nowrap, th.nowrap { white-space: nowrap; }
.st.starting { color: var(--accent); background: var(--accent-soft); }
.st.starting i { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.pin { color: var(--warm); font-size: 11px; margin-left: 6px; font-weight: 700; }
svg.ic.lock { color: var(--muted); width: 13px; height: 13px; vertical-align: -2px; margin-left: 5px; }

/* row action menu (custom dropdown instead of a native select) */
.ib { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.ib:hover, .ib[aria-expanded=true] { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.ib svg.ic { width: 16px; height: 16px; }
.acts { display: flex; gap: 2px; justify-content: flex-end; }
.menu { position: fixed; z-index: 150; min-width: 220px; max-width: 290px; max-height: min(420px, calc(100vh - 16px)); overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 5px; box-shadow: 0 14px 36px rgba(0, 0, 0, .5); animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left; font-size: 13px; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); outline: none; }
.menu button:disabled { color: var(--muted); cursor: not-allowed; background: transparent; }
.menu button.danger { color: var(--hot); }
.menu button.danger:hover, .menu button.danger:focus-visible { background: var(--hot-soft); }
.menu button svg.ic { width: 15px; height: 15px; color: var(--muted); }
.menu button.danger svg.ic { color: var(--hot); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }
.menu .hint { padding: 4px 10px 6px; font-size: 11.5px; color: var(--muted); white-space: normal; line-height: 1.35; }

/* loading / empty */
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; flex: none; }
.btn .spinner { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty svg.ic { width: 28px; height: 28px; display: block; margin: 0 auto 8px; color: #3a4a60; }

/* large panel (logs) */
.panel-back { position: fixed; inset: 0; background: rgba(5, 8, 12, .72); z-index: 90; display: flex; justify-content: center; align-items: stretch; padding: 24px; }
.panel { width: 100%; max-width: 1800px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head h2 { margin-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.panel-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-tools { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-tools .search { flex: 1 1 220px; max-width: 380px; }
.panel-tools select { width: auto; }
.logbox { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.log { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 10px 16px 16px; background: #070a10; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: #c9d4e2; white-space: pre; tab-size: 4; }
.log.wrap { white-space: pre-wrap; word-break: break-word; }
.log .ln { display: block; min-height: 1.55em; }
.log .ln:hover { background: rgba(255, 255, 255, .03); }
.log .ln.err { color: #ff9b9b; }
.log .ln.warn { color: #f5cf7e; }
.log mark { background: rgba(240, 180, 60, .32); color: inherit; border-radius: 2px; }
.log .sys { color: var(--muted); font-style: italic; }
.newlines { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.statusline { display: flex; gap: 14px; align-items: center; padding: 7px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.statusline .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; animation: pulse 1.6s infinite; vertical-align: 0; }
.statusline .live-dot.off { background: var(--muted); animation: none; }

/* deploy */
.profiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 1000px), 1fr)); align-items: start; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; margin-top: 12px; }
.drop { border: 1.5px dashed #33435a; border-radius: 12px; padding: 22px 16px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; background: rgba(255, 255, 255, .01); display: block; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop.disabled { pointer-events: none; opacity: .55; }
.drop svg.ic { width: 26px; height: 26px; display: block; margin: 0 auto 8px; color: var(--accent); }
.drop .file { font-weight: 600; color: var(--text); word-break: break-all; display: block; margin-top: 4px; }
.drop input[type=file] { display: none; }
.hash { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--text-2); }
.hash.ok { color: var(--ok); } .hash.bad { color: var(--hot); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress b { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.progress.indet b { width: 35%; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.steps li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: 13px; padding: 4px 0; }
.steps time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.steps li.bad span { color: var(--hot); }
.result { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.result.ok { background: var(--ok-soft); color: var(--ok); }
.result.warn { background: var(--warm-soft); color: var(--warm); }
.result.bad { background: var(--hot-soft); color: var(--hot); }
.meta-line { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.meta-line code { font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--bg); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-soft); word-break: break-all; }
details.details > summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
details.details > summary::-webkit-details-marker { display: none; }
details.details > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details.details[open] > summary::before { transform: rotate(45deg); }

/* modals */
.modal.wide { max-width: 560px; }
.confirm-text { color: var(--text-2); font-size: 13.5px; margin: 6px 0 4px; line-height: 1.5; }
.modal-back, .panel-back { animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
body.noscroll { overflow: hidden; }

@media (max-width: 1250px) { .profile-grid { grid-template-columns: 1fr; } }
.history { min-width: 0; }
.steps li span { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .panel-back { padding: 0; }
  .panel { border-radius: 0; border: 0; }
  .panel-head h2 { max-width: 100%; }
  .toolbar .grow { max-width: none; flex-basis: 100%; }
  .hide-s { display: none; }
  .chips { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
}
.warmtext { color: var(--warm); font-weight: 600; }

.tag.kind { margin-left: 7px; vertical-align: 1px; font-size: 10.5px; padding: 0 6px; }
.pill:empty { display: none; }
@media (max-width: 1250px) { .hide-l { display: none; } }
@media (max-width: 1050px) { .hide-m { display: none; } }
.hash:empty { display: none; }

/* services table becomes cards on phones */
@media (max-width: 560px) {
  .tbl-wrap.tall { max-height: none; overflow: visible; }
  .svc-table thead { display: none; }
  .svc-table, .svc-table tbody { display: block; }
  .svc-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
  .svc-table tr:last-child { border-bottom: 0; }
  .svc-table td { border: 0; padding: 0; }
  .svc-table td { order: 1; }
  .svc-table td.name { order: -2; flex: 1 1 calc(100% - 90px); max-width: calc(100% - 80px); min-width: 0; width: auto; }
  .svc-table td.acts-cell { order: -1; }
  .svc-table td.uptime { color: var(--muted); font-size: 12.5px; }
  .svc-table td.uptime:not(.up) { display: none; }
  .svc-table td.up::before { content: "работает "; }
}

/* sites, forms, DNS */
.modal.xwide { max-width: 900px; }
.field-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field { display: grid; gap: 5px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.switches { display: grid; gap: 10px; padding: 4px 0; }
.routes { display: grid; gap: 8px; }
.route-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr) auto; gap: 8px; align-items: center; }
textarea.mono, textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; tab-size: 4; }
textarea.code { min-height: 360px; white-space: pre; overflow: auto; background: #070a10; }
.errbox, .codeblock { margin: 0; padding: 10px 12px; border-radius: 10px; font-family: var(--mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.errbox { background: var(--hot-soft); color: #ffb3b3; border: 1px solid rgba(255, 93, 93, .3); }
.codeblock { background: #070a10; color: var(--text-2); border: 1px solid var(--line-soft); }
.error:has(.errbox) { min-height: 0; }
.spinner.sm { width: 10px; height: 10px; border-width: 2px; }
.dns-table td { vertical-align: top; }
.dns-table .val { max-width: 260px; min-width: 120px; overflow-wrap: anywhere; font-size: 12px; }
.dns-table td.nm { white-space: nowrap; }
.dns-table td.nm .muted { font-family: inherit; }
.dns-table td.nm b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
@media (max-width: 560px) { .route-row { grid-template-columns: minmax(0, 1fr) auto; } .route-row > span { display: none; } }
@media (max-width: 560px) {
  .dns-table thead { display: none; }
  .dns-table, .dns-table tbody { display: block; }
  .dns-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
  .dns-table tr:last-child { border-bottom: 0; }
  .dns-table td { border: 0; padding: 0; }
  .dns-table td.nm { grid-column: 1; }
  .dns-table td.ty { grid-column: 2; grid-row: 1; justify-self: end; }
  .dns-table td[data-label] { grid-column: 1 / -1; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
  .dns-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-family: inherit; font-size: 12px; }
  .dns-table td.res { grid-column: 1 / -1; }
  .dns-table .val { max-width: none; min-width: 0; }
}

/* mail */
.toolbar .spacer { flex: 1; }
.pw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.addr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.alias-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
td.quota { min-width: 140px; white-space: nowrap; }
td.quota .bar { margin-top: 5px; }
.codehead { display: flex; justify-content: flex-end; margin: 4px 0 6px; }
.codeblock.zone { max-height: 340px; white-space: pre; overflow: auto; word-break: normal; }
td.rcpts { min-width: 240px; }
.rcpt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 3px 0; }
.rcpt .detail { flex-basis: 100%; overflow-wrap: anywhere; }
.maillog { font-size: 12.5px; max-height: calc(100vh - 260px); overflow: auto; }
.maillog .ml { display: grid; grid-template-columns: 96px minmax(140px, 220px) minmax(0, 1fr); gap: 10px; padding: 5px 2px; border-bottom: 1px solid var(--line-soft); }
.maillog .ml:last-child { border-bottom: 0; }
.maillog time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.maillog .ev-name { font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.maillog .det { overflow-wrap: anywhere; color: var(--text-2); }
.maillog .ml.err .ev-name, .maillog .ml.err .det { color: #ff9b9b; }
.maillog .ml.warn .ev-name, .maillog .ml.warn .det { color: #f5cf7e; }
@media (max-width: 560px) {
  .pw-row { grid-template-columns: 1fr 1fr; }
  .pw-row input { grid-column: 1 / -1; }
  .addr-row { grid-template-columns: 1fr; }
  .maillog .ml { grid-template-columns: 1fr; gap: 2px; }
  .head .right { width: 100%; margin-left: 0; min-width: 0; }
  .head .right .tabs { display: flex; width: 100%; overflow-x: auto; }
}
.tab { white-space: nowrap; flex: none; }

/* databases */
tr.dim td { color: var(--muted); }
tr.dim td b { color: var(--text-2); }
.chipwrap { display: flex; flex-wrap: wrap; gap: 4px; min-width: 120px; }
.tbrowser { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.tlist { overflow: auto; border-right: 1px solid var(--line-soft); padding: 8px; display: grid; align-content: start; gap: 2px; }
.tlist button { display: grid; gap: 1px; text-align: left; border: 0; background: transparent; color: var(--text-2); padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.tlist button:hover { background: var(--surface-2); color: var(--text); }
.tlist button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.tlist .tn { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgrid { min-width: 0; min-height: 0; overflow: auto; background: #070a10; }
.tselect { display: none; width: auto; max-width: 50%; }
.statusline .spacer { flex: 1; }
table.data { font-size: 12.5px; }
table.data th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; text-transform: none; letter-spacing: 0; font-family: var(--mono); color: var(--text-2); vertical-align: bottom; }
table.data th .ctype { font-size: 10.5px; color: var(--muted); font-weight: 400; }
table.data td { font-family: var(--mono); white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line-soft); padding: 5px 10px; }
table.data td.null { color: #4f5b6d; font-style: italic; }
table.data tbody tr:nth-child(even) { background: rgba(255, 255, 255, .015); }
.pk { font-size: 10px; }
.card.narrow { max-width: 520px; }
.unlock { margin-top: 10px; }
textarea.code.sql { min-height: 160px; margin: 4px 0 6px; white-space: pre-wrap; }
.rmeta { margin: 12px 2px 6px; }
.rescard { padding: 10px; margin-bottom: 10px; }
.rescard .tbl-wrap { max-height: 480px; margin-top: 6px; }
@media (max-width: 800px) {
  .tbrowser { grid-template-columns: 1fr; }
  .tlist { display: none; }
  .tselect { display: inline-block; }
}
.toolbar select { width: auto; min-width: 180px; max-width: 100%; }
.show-s { display: none; }
@media (max-width: 800px) { .show-s { display: inline; } }

/* firewall, SSH keys, terminal */
.fw-pending { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; border-color: rgba(240, 180, 60, .45); background: linear-gradient(0deg, var(--warm-soft), var(--warm-soft)), var(--surface); }
.fw-pending > svg.ic { width: 22px; height: 22px; color: var(--warm); flex: none; }
.fw-pending .grow { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.fw-pending .grow b { color: var(--text); }
.fw-pending .muted b { color: var(--warm); font-variant-numeric: tabular-nums; }
.acts-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fw-table td { vertical-align: middle; }
.fw-table td.name { min-width: 120px; }
.fw-proc { margin-left: 0; }
.fw-closed { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.fw-closed h3 { margin: 0 0 2px; }
.fw-closed .hint { margin: 0 0 8px; }
.fw-open { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #33435a; background: transparent; color: var(--text-2); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; cursor: pointer; }
.fw-open:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.fw-open:disabled { opacity: .5; cursor: not-allowed; }
.fw-open b { color: var(--text); font-weight: 600; font-size: 12px; }
.fw-open svg.ic { width: 13px; height: 13px; color: var(--accent); }
.fw-note { margin: 2px 0 0; line-height: 1.45; }
.ban-until, .key-last { font-size: 12.5px; }
td.name .sub.show-s-block { display: none; }
.key-title { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; }
.key-title b { overflow-wrap: anywhere; }
.keys-table td.name .sub { font-size: 11.5px; margin-top: 2px; }
.tag.warmtag { color: var(--warm); background: var(--warm-soft); }
@media (max-width: 800px) { td.name .sub.show-s-block { display: block; } }

.term-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.term-tabs { display: flex; gap: 2px; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: none; }
.term-tabs::-webkit-scrollbar { display: none; }
.term-tab { display: flex; align-items: center; border-radius: 8px 8px 0 0; color: var(--text-2); flex: none; border: 1px solid transparent; border-bottom: 0; }
.term-tab:hover { background: var(--surface-2); color: var(--text); }
.term-tab.active { background: #070a10; color: var(--text); border-color: var(--line-soft); }
.term-tab-main { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 4px 7px 12px; cursor: pointer; white-space: nowrap; }
.term-tab-x { width: 24px; height: 24px; margin-right: 4px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.term-tab-x:hover { background: var(--surface-3); color: var(--text); }
.term-tab-x svg.ic { width: 13px; height: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.open { background: var(--ok); }
.dot.connecting { background: var(--accent); animation: pulse 1s infinite; }
.term-tools { display: flex; align-items: center; gap: 6px; flex: none; padding-bottom: 6px; }
.term-tools select { width: auto; min-width: 0; max-width: 140px; }
.term-area { position: relative; background: #070a10; height: calc(100vh - 200px); min-height: 280px; padding: 8px 4px 4px 10px; }
.term-host { width: 100%; height: 100%; }
.term-host .xterm { height: 100%; }
.term-host .xterm-viewport { background-color: #070a10 !important; scrollbar-width: auto; scrollbar-color: auto; } /* lets the panel's ::-webkit-scrollbar style apply: no arrow buttons */
.term-again { position: absolute; right: 16px; bottom: 14px; z-index: 5; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.term-keys { display: none; gap: 6px; padding: 8px; border-top: 1px solid var(--line-soft); overflow-x: auto; }
.term-keys button { flex: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); border-radius: 8px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.term-keys button:active { background: var(--surface-3); color: var(--text); }
@media (max-width: 800px) {
  .term-keys { display: flex; }
  .term-area { height: calc(100dvh - 250px); min-height: 240px; padding-left: 6px; }
}

/* files, backups, updates, schedules */
.jobbox { padding: 12px 14px; }
.job-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-head .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.jobbox details.details { margin-top: 6px; }
.log.joblog { max-height: 320px; min-height: 60px; border-radius: 10px; border: 1px solid var(--line-soft); padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.kpi .val:empty { display: none; }
.kpi .switch { margin-top: 8px; }

.files-card { position: relative; }
.files-tools { margin: 10px 0 12px; }
.files-tools .search { flex: 1 1 160px; min-width: 140px; max-width: 280px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.crumb { border: 0; background: transparent; color: var(--text-2); font: inherit; font-family: var(--mono); font-size: 13px; padding: 4px 6px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb:last-child { color: var(--text); font-weight: 600; }
.crumb svg.ic { width: 15px; height: 15px; }
.crumbs .sep { color: var(--muted); }
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(91, 157, 255, .25); }
.selbar .spacer { flex: 1; }
th.chk, td.chk { width: 34px; padding-right: 0; }
tr.selected { background: var(--accent-soft); }
.fname { display: inline-flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--text); font: inherit; padding: 0; cursor: pointer; text-align: left; max-width: 100%; }
.fname:hover:not(:disabled) .fn { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.fname:disabled { cursor: default; }
.fn { font-weight: 600; overflow-wrap: anywhere; }
.ficon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.ficon.dir { background: var(--accent-soft); color: var(--accent); }
.ficon.link { color: var(--warm); }
.ficon svg.ic { width: 14px; height: 14px; }
.file-table td.name { min-width: 180px; }
.dropzone { position: absolute; inset: 0; z-index: 5; border-radius: var(--radius); border: 2px dashed var(--accent); background: rgba(10, 14, 21, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text); font-weight: 600; pointer-events: none; text-align: center; padding: 16px; }
.dropzone[hidden] { display: none; }
.dropzone svg.ic { width: 34px; height: 34px; color: var(--accent); }
.upload-toast { display: grid; gap: 8px; min-width: 260px; max-width: min(420px, calc(100vw - 32px)); }
.upload-toast span { overflow-wrap: anywhere; }
.editor-wrap { flex: 1; min-height: 0; display: flex; }
textarea.code.editor { flex: 1; min-height: 0; height: auto; border: 0; border-radius: 0; resize: none; padding: 12px 16px; }
.panel-head h2.mono { font-size: 14px; }
.perm-grid { display: grid; grid-template-columns: minmax(90px, auto) repeat(3, minmax(0, 1fr)); gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--bg); }
.perm-cell { display: flex; justify-content: center; }

.bk-risk { display: flex; gap: 12px; align-items: flex-start; margin: 0; line-height: 1.5; }
.bk-risk > svg.ic { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.bk-risk .btn { margin-top: 6px; }
.sched-simple { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sched-simple input[type=time] { width: auto; }
.keep-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.keep-row .field { font-size: 12px; color: var(--muted); }
.radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; line-height: 1.45; font-size: 13px; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.snap-list { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 16px; }

.reboot-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-color: rgba(255, 93, 93, .4); background: linear-gradient(0deg, var(--hot-soft), var(--hot-soft)), var(--surface); }
.reboot-card > svg.ic { width: 24px; height: 24px; color: var(--hot); flex: none; }
.reboot-card .grow { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.tag.sectag { color: var(--hot); background: var(--hot-soft); }
.upd-hint { margin: 10px 2px 0; }

.cron-table td.name .cmd { white-space: normal; overflow-wrap: anywhere; font-size: 12px; color: var(--text-2); }
.cron-table .error.small { font-size: 12px; min-height: 0; }
.sys-cron > summary { padding: 0; }
.sys-file h3 { margin: 14px 0 6px; font-size: 13px; color: var(--text-2); }
.sched-row { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); }
@media (max-width: 560px) {
  .sched-row { grid-template-columns: 1fr; }
  .keep-row { grid-template-columns: 1fr 1fr 1fr; }
  .files-tools .search { max-width: none; }
  .perm-grid { grid-template-columns: 80px repeat(3, minmax(0, 1fr)); }
}
input[type=checkbox]:not(.switch input) { appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid #3a4a60; border-radius: 4px; background: var(--surface-2) center / 12px no-repeat; cursor: pointer; vertical-align: -3px; transition: background-color .1s, border-color .1s; flex: none; }
input[type=checkbox]:not(.switch input):hover { border-color: var(--accent); }
input[type=checkbox]:not(.switch input):checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=checkbox]:not(.switch input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox]:not(.switch input):disabled { opacity: .4; cursor: not-allowed; }
.files-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.files-top .crumbs { flex: 1 1 220px; }
.files-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.files-actions[hidden] { display: none; }
.card.narrow > .btn { margin-top: 12px; }
.vers div { white-space: nowrap; }
.cron-table td.when { min-width: 120px; max-width: 190px; }
@media (max-width: 560px) {
  .svc-table td.chk { order: -3; width: auto; padding: 0; }
  .svc-table td.chk + td.name { flex: 1 1 0; max-width: none; }
}
.fw-grid { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
@media (max-width: 1600px) { .fw-grid { grid-template-columns: minmax(0, 1fr); } }
