/* ---------- panel additions ---------- */
.swatch .chipc.mono { background: #191919; }
.swatch .chipc.purple { background: #4B2A86; }
.swatch .chipc.navy { background: #1F2D4D; }
.swatch .chipc.dark { background: #111214; }
.hide { display: none !important; }
.mb22 { margin-bottom: 22px; }
.btn.danger { background: var(--danger); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 132px; padding: 16px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .08s; overflow: hidden; }
.tile:active { transform: scale(.98); }
.tile .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; }
.tile .t { font-size: 16px; font-weight: 800; }
.tile .d { font-size: 12px; color: var(--muted); line-height: 1.6; }
.tile .badge { position: absolute; top: 14px; left: 12px; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }

.ulist { padding: 0; overflow: hidden; }
.urow { display: flex; gap: 12px; align-items: center; padding: 14px; cursor: pointer; }
.urow + .urow { border-top: 1px solid var(--line); }
.av { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--ground); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: var(--ink-soft); }
.av.admin { background: var(--primary); color: var(--on-primary); }
.urow .n { font-weight: 800; font-size: 15px; }
.urow .s { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.urow.off { opacity: .55; }
.mini { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--ground); color: var(--ink-soft); white-space: nowrap; }
.mini.v { background: var(--warn-bg); color: var(--warn-ink); }
.mini.e { background: var(--green-bg); color: var(--green-ink); }
.mini.m { background: var(--primary); color: var(--on-primary); }

.perm { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.perm + .perm { border-top: 1px dashed var(--line); }
.perm .h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.perm .h svg { color: var(--ink-soft); }
.seg.lv button { height: 40px; font-size: 13px; border-radius: 12px; padding: 0 2px; }
.seg.lv button.on[data-v="view"] { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--soft2); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.toggle input { width: 46px; height: 28px; appearance: none; border-radius: 999px; background: var(--field); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: right .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--primary); }
.toggle input:checked::after { right: 21px; }
:root[data-palette="dark"] .toggle input:checked::after { background: #111214; }
.legend { font-size: 12.5px; color: var(--muted); line-height: 2; }
.legend b { font-weight: 700; color: var(--ink-soft); }
.logrow { font-size: 13px; padding: 8px 0; display: flex; justify-content: space-between; gap: 8px; }
.logrow + .logrow { border-top: 1px dashed var(--line); }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; }
.kv + .kv { border-top: 1px dashed var(--line); }
/* ---------- settings ---------- */
.mt10 { margin-top: 10px; } .gap8 { gap: 8px; } .wrap { flex-wrap: wrap; } .lh { line-height: 1.9; }
.btn.sm { height: 46px; font-size: 14px; }
.grow { flex: 1 1 auto; }
input.in.sm, select.in.sm { height: 48px; font-size: 15px; }
textarea.in { font-size: 14.5px; line-height: 1.8; }
.steps { margin: 0; padding-inline-start: 20px; line-height: 2; font-size: 13.5px; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--field); background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.chip .tx { border: 0; background: none; color: inherit; font-size: 16px; cursor: pointer; padding: 0 2px; }
.tnew { width: 130px; }
.ilist { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.irow { display: flex; gap: 10px; align-items: center; padding: 12px; }
.irow + .irow { border-top: 1px solid var(--line); }
.irow.off { opacity: .55; }
.irow .n { font-weight: 700; font-size: 14.5px; unicode-bidi: plaintext; }
.warn-t { color: var(--warn-ink); }
.toggle.sm input { width: 42px; height: 26px; }
.toggle.sm input::after { width: 20px; height: 20px; }
.toggle.sm input:checked::after { right: 19px; }
.iconx { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--ground); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
details.addbox > summary { list-style: none; width: 100%; }
details.addbox > summary::-webkit-details-marker { display: none; }
.codebox { white-space: pre-wrap; font-size: 12.5px; line-height: 1.8; max-height: 50vh; overflow: auto; background: var(--ground); border-radius: 12px; padding: 12px; }
.codebox.ltr { direction: ltr; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: pre; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green-ink); white-space: nowrap; align-self: flex-start; }
