










*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 13px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: inherit; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C9D0DB; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #AEB7C6; }
::-webkit-scrollbar-track { background: transparent; }



.app-shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }



.titlebar {
  height: var(--topbar-h); min-height: var(--topbar-h); flex: none;
  display: flex; align-items: center; padding: 0 10px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  -webkit-user-select: none; user-select: none;
}
.tb-left { display: flex; align-items: center; flex: none; padding-left: 2px; }

.tb-logo { height: 46px; width: auto; max-width: 340px; object-fit: contain; display: block; }
.tb-logo-fallback {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; box-shadow: var(--accent-shadow);
}

.tb-tabs-area {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
  overflow-x: auto; scrollbar-width: none;
}
.tb-tabs-area::-webkit-scrollbar { display: none; }
.tb-tab {
  height: 26px; padding: 0 11px; flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-size: 12.5px; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.tb-tab:hover { background: rgba(255, 255, 255, .7); color: var(--text-primary); }
.tb-tab.on {
  background: #FFFFFF; border-color: var(--border);
  color: var(--text-primary); font-weight: 600; box-shadow: var(--shadow-xs);
}
.tb-tab b { color: var(--accent); font-weight: 600; }

.tb-right { display: flex; align-items: center; gap: 8px; flex: none; }


.tb-act {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.tb-act:hover { background: var(--bg-hover); border-color: #C9D8F5; color: var(--accent-2); }
.tb-act .ico { display: inline-flex; color: var(--accent); }


.tb-icon {
  width: 32px; height: 32px; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
}
.tb-icon:hover { background: var(--bg-hover); border-color: #C9D8F5; color: var(--accent-2); }
.tb-icon .badge {
  position: absolute; top: -6px; right: -7px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 9px; line-height: 16px; text-align: center;
}


.bal-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.bal-chip:hover { border-color: #C9D8F5; }
.bal-chip .ico { display: inline-flex; color: var(--accent); }
.bal-chip b { color: var(--accent); }


.tb-user {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px 0 8px; max-width: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font-size: 13px; cursor: pointer; transition: all var(--transition);
}
.tb-user:hover { background: var(--bg-hover); border-color: #C9D8F5; }
.tb-user .ico { display: inline-flex; color: var(--accent); flex: none; }
.tb-user span { white-space: nowrap; }



.app-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }


.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0;
  background: var(--bg-nav);
  border-right: 1px solid var(--border-nav);
}
.sb-top {
  flex: 1; min-height: 0; width: 100%;
  display: flex; flex-direction: column; gap: 2px; padding: 0 0;
  overflow-y: auto; scrollbar-width: none;
}
.sb-top::-webkit-scrollbar { display: none; }


.sb-bottom {
  flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 0 4px; margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sb-bottom .sb-item { margin-left: 8px; margin-right: 8px; }

.sb-item {
  width: 52px; height: 52px; flex: none; position: relative;
  margin: 2px 8px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--nav-fg); font-size: 11px; cursor: pointer;
  transition: var(--transition);
}
.sb-item:hover { background: var(--bg-nav-hover); color: var(--nav-fg-hover); }
.sb-item.active { background: var(--nav-active-bg); color: var(--nav-active-fg); font-weight: 600; }
.sb-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.sb-icon svg { width: 21px; height: 21px; }
.sb-label { max-width: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-badge {
  position: absolute; top: 5px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 9px; line-height: 16px; text-align: center;
}


.content-wrap { flex: 1; display: flex; overflow: hidden; min-width: 0; }


.gs-wrapper {
  position: relative; width: var(--gs-w, 210px); flex: none; align-self: stretch;
  transition: width .18s ease;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
}
.gs-head {
  height: 48px; flex: none;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.gs-head-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.gs-head-title::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px;
  background: var(--accent-gradient); flex: none;
}
.gs-body { flex: 1; overflow: auto; padding: 8px 8px 12px; }


.gs-collapse {
  position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 46px; padding: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); background: var(--bg-surface);
  border: 1px solid var(--border); border-left: 0;
  border-radius: 0 8px 8px 0; cursor: pointer;
  box-shadow: 2px 0 6px rgba(16,24,40,.06);
  transition: color var(--transition), background var(--transition);
}
.gs-collapse:hover { color: var(--accent); background: var(--accent-soft); }
.gs-collapse svg { transition: transform .18s ease; }
.gs-wrapper.collapsed { width: 0 !important; border-right: 0; overflow: visible; }
.gs-wrapper.collapsed .gs-head, .gs-wrapper.collapsed .gs-body { display: none; }
.gs-wrapper.collapsed + .gs-resize { display: none; }
.gs-wrapper.collapsed .gs-collapse { right: -22px; }
.gs-wrapper.collapsed .gs-collapse svg { transform: rotate(180deg); }

.gs-group { margin-bottom: 3px; }
.gs-tag-row {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  transition: var(--transition);
}
.gs-tag-row:hover { background: var(--bg-hover); color: var(--text-primary); }
.gs-group.focused > .gs-tag-row {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.gs-caret {
  width: 11px; flex: none; text-align: center;
  font-size: 9px; color: var(--text-tertiary);
  transition: transform var(--transition);
}
.gs-group.open .gs-caret { transform: rotate(90deg); }
.gs-tag-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-count {
  flex: none; font-size: 11px; color: var(--text-tertiary);
  background: var(--bg-soft); border-radius: 999px; padding: 1px 8px;
}
.gs-group.focused > .gs-tag-row .gs-count { background: rgba(47, 111, 235, .14); color: var(--accent); }

.gs-device {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 22px; margin-top: 2px;
  border-radius: var(--radius-xs); font-size: 12px;
  color: var(--text-tertiary); cursor: pointer;
  transition: var(--transition);
}
.gs-device:hover { background: var(--bg-hover); color: var(--text-primary); }
.gs-device.focused {
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.gs-device .key { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-device .days { flex: none; }
.gs-device-empty { color: var(--text-tertiary); cursor: default; }
.gs-device-empty:hover { background: transparent; }


.gs-cb {
  width: 14px; height: 14px; flex: none;
  margin: 0 7px 0 0; padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.gs-cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.gs-resize { width: 2px; flex: none; cursor: col-resize; background: transparent; }
.gs-resize:hover, .gs-resize.dragging { background: var(--accent); }


.wall-right { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-base); }


.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view[hidden] { display: none !important; }
.page-scroll { flex: 1; overflow: auto; padding: 4px 16px 24px; }


.page-head { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.page-head h2 {
  margin: 0; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.page-head h2 .ph-ico {
  width: 32px; height: 32px; flex: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.page-head h2 .ph-ico svg { width: 18px; height: 18px; }
.page-head h2 .ph-sub { font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-left: 2px; }

.pcard {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}
.pcard > h3 {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
}
.pcard > h3::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: var(--accent-gradient); flex: none;
}
.pcard .hint { color: var(--text-tertiary); font-size: 12.5px; margin-bottom: 12px; }


.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.stat-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); border-color: var(--border-accent); }
.stat-ico {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.stat-ico svg { width: 19px; height: 19px; }
.stat-ico.green { background: var(--success-bg); color: var(--success); }
.stat-ico.orange { background: var(--warning-bg); color: var(--warning); }
.stat-ico.gray { background: var(--bg-soft); color: var(--text-secondary); }
.stat-meta { min-width: 0; }
.stat-meta .n {
  font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-meta .l { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; white-space: nowrap; }


.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 8px; }
.specs > div {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 13px;
  background: var(--bg-grad-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  transition: var(--transition);
}
.specs > div:hover { border-color: var(--border-accent); background: var(--bg-tint); }
.specs > div .k { color: var(--text-tertiary); flex: none; }
.specs > div .v {
  margin-left: auto; color: var(--text-primary); font-weight: 600;
  text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.specs > div .v.accent { color: var(--accent); }


.fname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fico {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  background: var(--bg-soft); color: var(--text-secondary);
}
.fico.zip { background: #FFF3E0; color: #B45309; }
.fico.apk { background: #E8F5E9; color: #1A7F4B; }
.fico.doc { background: #EAF1FE; color: #2F6FEB; }
.fico.img { background: #F3E8FF; color: #7C3AED; }
.fico.med { background: #FCE7F3; color: #BE185D; }
.fname .fn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fname .fs { font-size: 11.5px; color: var(--text-tertiary); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ptile {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
  background: var(--bg-surface); cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.ptile:hover { box-shadow: var(--shadow-card); border-color: var(--border-accent); transform: translateY(-1px); }
.ptile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card);
}
.ptile-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.pt-ico {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-secondary);
  transition: var(--transition);
}
.pt-ico svg { width: 17px; height: 17px; }
.ptile.active .pt-ico { background: var(--accent-soft); color: var(--accent); }
.ptile-head .nm { font-size: 14.5px; font-weight: 600; }
.ptile .sub { color: var(--text-tertiary); font-size: 12px; margin-top: 3px; }

.stock { display: inline-flex; align-items: center; gap: 6px; }
.stock::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); flex: none;
}
.stock.no { color: var(--danger); }
.stock.no::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-secondary);
  font-size: 11.5px; margin-left: 6px;
}
.tag.ok { background: var(--success-bg); color: var(--success); }
.tag.err { background: var(--danger-bg); color: var(--danger); }
.specs div span { color: var(--text-tertiary); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-top: 6px; }
.ptile.center { text-align: center; }
.ptile .t { font-size: 13px; color: var(--text-tertiary); }
.ptile .p { font-size: 19px; font-weight: 700; margin-top: 4px; }

.ptable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.ptable th, .ptable td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.ptable th {
  color: var(--text-tertiary); font-weight: 500; white-space: nowrap;
  font-size: 11.5px; letter-spacing: .3px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.ptable th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.ptable th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.ptable tbody tr { transition: background var(--transition); }
.ptable tbody tr:hover { background: var(--bg-tint); }
.ptable tbody tr:last-child td { border-bottom: 0; }

.pmsg { padding: 10px 14px; border-radius: var(--radius-sm); margin-top: 10px; font-size: 13px; display: none; }
.pmsg.ok { background: var(--success-bg); color: var(--success); display: block; }
.pmsg.err { background: var(--danger-bg); color: var(--danger); display: block; }

.ptabs { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.ptab {
  height: 36px; padding: 0 20px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface); color: var(--text-primary);
  font-size: 13.5px; cursor: pointer; transition: var(--transition);
}
.ptab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }



.shop-wrap { display: flex; gap: 16px; align-items: flex-start; }
.shop-tabs {
  flex-direction: column;
  align-items: stretch;
  width: 132px;
  flex: 0 0 132px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
}
.shop-tabs .ptab { width: 100%; padding: 0 12px; }
.shop-tabs .spacer { flex: 0 0 auto; height: 4px; }
.shop-tabs .hint { font-size: 12px; padding: 2px; line-height: 1.5; }
.shop-panes { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .shop-wrap { display: block; }
  .shop-tabs { flex-direction: row; align-items: center; width: auto; flex: none; margin-bottom: 14px; position: static; }
  .shop-tabs .ptab { width: auto; }
}

.pay-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pay {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; min-width: 180px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface); cursor: pointer; transition: var(--transition);
}
.pay.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pay .ico { width: 26px; height: 26px; object-fit: contain; flex: none; }
.pay .ico-ph { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--bg-soft); }
.pay .lb { font-size: 13px; white-space: nowrap; }

.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-wrap canvas { width: 220px; height: 220px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

.upload-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-row select { width: auto; min-width: 200px; height: 36px; }
.upload-row input[type=file] { width: auto; height: auto; padding: 6px 0; border: 0; background: transparent; }

.wall-toolbar {
  flex: none; position: relative;
  display: flex; align-items: center; gap: 4px; padding: 10px 16px 9px;
  border-bottom: 1px solid var(--border-soft);
}
.tb-btn {
  height: 30px; min-width: 30px; padding: 0 11px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-secondary);
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.tb-btn:hover { background: var(--bg-hover); border-color: var(--border-accent); color: var(--accent-2); }
.tb-btn.on {
  background: var(--accent-gradient); border-color: transparent; color: #fff;
  box-shadow: var(--accent-shadow);
}
.tb-btn.on:hover { background: var(--accent-2); color: #fff; }
.tb-btn:disabled { opacity: .45; cursor: not-allowed; }
.tb-btn .caret { font-size: 9px; opacity: .7; }
.tb-sep { width: 1px; height: 16px; background: var(--border); margin: 0 6px; flex: none; }


body.per-row-dense .wall-toolbar { padding: 6px 10px; gap: 3px; }
body.per-row-dense .wall-toolbar .tb-btn {
  height: 24px; min-width: 24px; padding: 0 7px;
  gap: 3px; font-size: 11px; border-radius: 5px;
}
body.per-row-dense .wall-toolbar .tb-btn svg { width: 12px; height: 12px; }
body.per-row-dense .per-row-custom { font-size: 11px; gap: 3px; }
body.per-row-dense .per-row-custom input { width: 36px; height: 22px; font-size: 11px; }
body.per-row-dense .wall-toolbar .tb-btn .caret { font-size: 8px; }
body.per-row-dense .titlebar { padding: 0 6px; }
body.per-row-dense .tb-act { height: 28px; padding: 0 9px; font-size: 12px; gap: 4px; }
body.per-row-dense .tb-icon { width: 28px; height: 28px; }
body.per-row-dense .tb-tab { height: 24px; padding: 0 9px; font-size: 12px; }
body.per-row-dense .dc-expiry { font-size: 8px; line-height: 12px; padding: 0 4px; top: 3px; }
body.per-row-dense .dc-info { padding: 5px 6px 5px 9px; }
body.per-row-dense .dc-serial { font-size: 10px; }
body.per-row-dense .dc-expand { width: 20px; height: 20px; border-radius: 5px; }
body.per-row-dense .dc-expand svg { width: 12px; height: 12px; }
body.per-row-dense .dc-hint { font-size: 10px; }
body.per-row-dense .dc-offline-mask span { font-size: 11px; letter-spacing: 1px; }










.wall-content {
  flex: 1; position: relative; overflow: hidden auto; padding: 0 16px 20px;
  user-select: none; -webkit-user-select: none; -ms-user-select: none;
}
.wall-content input, .wall-content textarea { user-select: text; -webkit-user-select: text; }
.device-card, .device-card * { user-select: none; -webkit-user-select: none; }
.wall-toolbar { user-select: none; -webkit-user-select: none; }
.per-row-custom {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
.per-row-custom input {
  width: 46px; height: 26px; padding: 0 5px; box-sizing: border-box;
  text-align: center; font-size: 12px; color: var(--text-primary);
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 6px; outline: none;
}
.per-row-custom input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.wall-grid.only-live .device-card:not(.dc-live) { display: none; }
.wall-grid.is-few {
  grid-template-columns: repeat(var(--per-row), 220px);
  justify-content: start;
}
.wall-grid {
  display: grid; gap: var(--card-gap);
  




  grid-template-columns: repeat(var(--per-row, 6), minmax(0, 1fr));
  align-items: start; align-content: start;
  width: 100%;
}



.device-card {
  position: relative; width: 100%; min-width: 0; max-width: 220px; justify-self: start;
  display: flex; flex-direction: column; align-self: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);          
  box-shadow: var(--shadow-xs);
  overflow: hidden; cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.device-card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .10); border-color: #D7DEEA; }
.device-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 8px 24px rgba(47, 111, 235, .16); }
.device-card.dc-offline { opacity: .78; }




.device-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 8px 24px rgba(47, 111, 235, .16); }















.dc-pick {
  display: flex; position: absolute; left: 8px; top: 8px; z-index: 4;
  width: 22px; height: 22px; cursor: pointer;
  align-items: center; justify-content: center;
}
.dc-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.dc-pick .dc-pick-box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, .85);
  background: rgba(16, 24, 40, .45);
  box-shadow: 0 1px 4px rgba(16, 24, 40, .35);
  transition: var(--transition);
}
.dc-pick input:checked + .dc-pick-box {
  background: var(--accent) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.6l3 3 6-6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px 14px no-repeat;
  border-color: var(--accent);
}
.dc-pick:hover .dc-pick-box { border-color: #fff; }


body.yj-painting { user-select: none; -webkit-user-select: none; cursor: default; }
body.yj-painting .device-card { transition: none; }

.device-card.drag-hit { border-style: dashed; border-color: var(--accent); }


.dc-screen {
  position: relative; width: 100%; flex: none;
  aspect-ratio: 1 / 2; background: #000; overflow: hidden;
}





.dc-canvas { display: block; width: 100%; height: 100%; object-fit: fill; background: #000; }

.dc-hint {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; text-align: center;
  color: rgba(255, 255, 255, .55); font-size: 11.5px;
}

.dc-hint:not(:empty)::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: rgba(255, 255, 255, .55);
  animation: dc-spin .9s linear infinite;
}
@keyframes dc-spin { to { transform: rotate(360deg); } }



















.dc-offline-mask {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 14, 22, .5);
}
.dc-offline-mask span { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 3px; }


.dc-expiry {
  position: absolute; left: 50%; top: 5px; transform: translateX(-50%);
  z-index: 7; padding: 0 6px; border-radius: 999px;
  background: rgba(134, 239, 172, .9); color: #14532D;
  font-size: 9.5px; font-weight: 600; line-height: 14px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15); pointer-events: none;
}
.dc-expiry.level-warning { background: rgba(253, 224, 71, .92); color: #713F12; }
.dc-expiry.level-danger { background: rgba(252, 165, 165, .94); color: #7F1D1D; }
.dc-expiry.level-expired { background: rgba(203, 213, 225, .92); color: #334155; }



.dc-info {
  position: relative; flex: none; padding: 8px 10px 8px 13px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-subtle) 100%);
  border-top: 1px solid var(--border-soft);
}

.dc-info::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--danger);
}
.device-card:not(.dc-offline) .dc-info::before { background: #12B76A; }
.dc-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; line-height: 1.35; }


.dc-idwrap { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.dc-serial {
  flex: 0 0 auto; min-width: 0; max-width: 100%;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dc-expand {
  width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; padding: 0; border: 0; border-radius: 7px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .45), inset 0 1px 0 rgba(255,255,255,.25);
  opacity: 1 !important; visibility: visible !important; transform: none;
  transition: filter .15s, transform .15s, box-shadow .15s;
  position: relative; z-index: 5;
}
.dc-expand svg { width: 16px; height: 16px; display: block; }
.dc-expand::after {
  content: "大屏"; position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  background: rgba(15,23,42,.86); color: #fff; font-size: 11px; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.dc-expand:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.55); }
.dc-expand:hover::after { opacity: 1; }
.dc-expand:active { transform: scale(.94); }

.dc-online-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--danger); box-shadow: 0 0 0 3px rgba(214, 69, 69, .12);
}
.dc-online-dot.online { background: #12B76A; box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }




.gs-new {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; padding: 9px 10px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-tertiary); font-size: 12.5px; cursor: pointer;
  transition: var(--transition);
}
.gs-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); border-style: solid; }
.gs-new svg { width: 13px; height: 13px; }

.wall-empty { padding: 70px 20px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.wall-empty b { display: block; color: var(--text-secondary); font-size: 14.5px; margin-bottom: 8px; font-weight: 600; }
.wall-empty::before {
  content: ""; display: block; width: 62px; height: 62px; margin: 0 auto 16px;
  border-radius: 18px; background: var(--bg-grad-soft);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8B2C1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4' width='19' height='13' rx='2'/%3E%3Cpath d='M8.5 20.5h7M12 17v3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 28px 28px;
}



.menu-layer { position: fixed; inset: 0; z-index: 2000; }

.ctx-menu {
  position: fixed; z-index: 2100;
  min-width: 176px; padding: 6px;
  background: #FFFFFF;
  border: 1px solid #E6E8EE;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 36px rgba(16, 24, 40, .18), 0 2px 8px rgba(16, 24, 40, .06);
  animation: menu-drop .14s ease;
}
@keyframes menu-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ctx-head {
  padding: 7px 10px 8px; margin-bottom: 4px;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid #EEF1F6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; margin: 1px 0;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-primary); cursor: pointer;
  transition: var(--transition);
}
.menu-item:hover { background: #EEF3FF; color: #1B4FD8; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-bg); color: var(--danger); }
.menu-div { height: 1px; margin: 5px 8px; background: #EEF1F6; }


.menu-section {
  padding: 8px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--text-tertiary, #8A94A8); cursor: default; user-select: none;
}


.rn-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; font-size: 13px;
  background: #FFF7E6; color: var(--warning, #C2410C);
  border-bottom: 1px solid #F0DCB4;
}
.rn-bar b { font-weight: 700; }
.rn-bar .spacer { flex: 1; }
.rn-bar-ico {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--warning, #C2410C); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
}
.rn-bar > span:nth-child(2) { flex: 1; }


.rn-notice {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid rgba(47, 111, 235, .18);
  font-size: 12.5px; line-height: 1.7; color: var(--text-secondary);
}
.rn-notice b { color: var(--text-primary); }
.rn-consent {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px;
  font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); cursor: pointer;
}
.rn-consent input[type="checkbox"] { margin-top: 2px; }
.rn-consent a { color: var(--accent); text-decoration: none; }
.rn-consent a:hover { text-decoration: underline; }
.rn-agreement {
  font-size: 12.5px; line-height: 1.85; color: var(--text-secondary);
  background: var(--bg-subtle); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.rn-agreement b { display: block; margin-top: 4px; color: var(--text-primary); }

.toasts {
  position: fixed; left: 50%; top: 68px; transform: translateX(-50%);
  z-index: 3000; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.toast {
  min-width: 160px; max-width: 420px; padding: 9px 18px;
  background: rgba(20, 24, 32, .92); color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  font-size: 13px; text-align: center;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
.toast.ok { background: rgba(26, 127, 75, .95); }
.toast.err { background: rgba(214, 69, 69, .95); }
.toast.warn { background: rgba(194, 65, 12, .95); }

dialog {
  padding: 0; width: 420px; max-width: 94vw;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: #FFFFFF; color: var(--text-primary);
  box-shadow: var(--shadow-xl);
}
dialog::backdrop { background: rgba(16, 20, 28, .45); }
dialog h3 {
  margin: 0; padding: 15px 18px; font-size: 15px; font-weight: 600;
  border-bottom: 1px solid #EEF1F6;
}
.dlg-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow: auto; }
.dlg-foot {
  padding: 13px 18px; display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid #EEF1F6; background: var(--bg-subtle);
}



input, select, textarea {
  width: 100%; height: 36px; padding: 0 11px;
  background: #FFFFFF; color: var(--text-primary);
  border: 1px solid #D8DDE5; border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; outline: none; transition: var(--transition);
}
textarea { height: auto; padding: 9px 11px; }







input[type="checkbox"], input[type="radio"] {
  width: 13px; height: 13px; min-width: 13px; flex: 0 0 auto;
  padding: 0; margin: 0; border-radius: 3px;
  accent-color: var(--accent); cursor: pointer;
}
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-tertiary); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }

.btn {
  height: 34px; padding: 0 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: #C9D8F5; color: var(--accent-2); }
.btn.pri {
  background: var(--accent-gradient); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: var(--accent-shadow);
}
.btn.pri:hover { background: var(--accent-2); color: #fff; }

.btn.danger {
  background: var(--danger, #D64545); border-color: var(--danger, #D64545); color: #fff;
}
.btn.danger:hover:not(:disabled) { background: #C03A3A; border-color: #C03A3A; color: #fff; }

.btn.danger:disabled { background: var(--danger, #D64545); border-color: var(--danger, #D64545); opacity: .45; cursor: not-allowed; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.block { width: 100%; height: 38px; }


.code-row { position: relative; display: block; }
.code-row input { padding-right: 126px; }
.code-row .btn-code {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: calc(100% - 12px); min-width: 104px; padding: 0 12px;
  border: none; border-radius: var(--radius); cursor: pointer;
  background: var(--accent-gradient); color: #fff;
  font-size: 13px; font-weight: 500; box-shadow: var(--accent-shadow);
}
.code-row .btn-code:hover { background: var(--accent-2); }
.code-row .btn-code:disabled { background: #C9D3E4; color: #7A8699; box-shadow: none; cursor: default; }



.auth {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
}
.auth-card {
  width: 400px; max-width: 94vw; padding: 34px 32px 28px;
  background: #FFFFFF; border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-logo img { height: 52px; width: auto; max-width: 100%; object-fit: contain; }
.auth-logo .mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 700; box-shadow: var(--accent-shadow);
}
.auth-card h1 { margin: 0 0 6px; font-size: 19px; font-weight: 700; text-align: center; }

.auth-sub { margin: 0 0 20px; min-height: 18px; text-align: center; color: var(--text-tertiary); font-size: 12.5px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; font-size: 12.5px; color: var(--text-tertiary);
}
.auth-links button {
  border: 0; background: transparent; color: var(--accent);
  font-size: 12.5px; cursor: pointer; padding: 0;
}
.auth-links button:hover { color: var(--accent-2); text-decoration: underline; }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-tertiary); }
.auth-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-row input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); margin: 0; }


.auth-agree {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 10px 0 4px; font-size: 12.5px; line-height: 1.6;
  color: var(--text-secondary); cursor: pointer; text-align: left;
}
.auth-agree input[type="checkbox"] { margin-top: 2px; }
.auth-agree a { color: var(--accent); text-decoration: none; }
.auth-agree a:hover { text-decoration: underline; }
@keyframes yjShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.auth-agree.shake { animation: yjShake .18s 2; }


.push-run { text-align: center; padding: 26px 10px 18px; }
.push-spin {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: yjSpin .8s linear infinite;
}
@keyframes yjSpin { to { transform: rotate(360deg); } }
.push-run-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.push-run-sub { margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.push-run-tip {
  margin: 12px auto 0; max-width: 380px; font-size: 12.5px; line-height: 1.7;
  color: var(--text-secondary); background: var(--bg-subtle);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 9px 12px;
}
.push-run-timer { margin-top: 12px; font-size: 12.5px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

.push-done { padding: 6px 2px 2px; }
.push-done-title { font-size: 15px; font-weight: 700; color: var(--success, #17936A); margin-bottom: 12px; }
.push-dir {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid rgba(47, 111, 235, .18);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px;
}
.push-dir-label { font-size: 12px; color: var(--text-secondary); flex: none; }
.push-dir-path {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--text-primary); word-break: break-all;
}







.ls-win {
  position: fixed; display: flex; flex-direction: column;
  min-width: 220px; min-height: 320px;
  background: #FFFFFF; border: 1px solid #D8DBE2; border-radius: 2px;
  overflow: hidden; box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
  transition: width .16s ease, height .16s ease;
  animation: lsIn .14s ease-out;
}
.ls-win.sizing { transition: none; }          
@keyframes lsIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }


.ls-head {
  flex: none; height: 32px; display: flex; align-items: center; gap: 6px;
  padding: 0 6px 0 10px; background: #F6F7F9; border-bottom: 1px solid #E6E8EE;
  cursor: grab; user-select: none;
}
.ls-head:active { cursor: grabbing; }
.ls-num {
  flex: none; min-width: 20px; height: 14px; line-height: 14px; text-align: center;
  background: #E8EAF0; color: #3A4049; border-radius: 2px; font-size: 10px; font-weight: 600;
}
.ls-mode { flex: none; height: 14px; line-height: 14px; padding: 0 4px; border-radius: 2px; color: #8A909C; font-size: 10px; }


.ls-stat { margin-left: auto; margin-right: 8px; display: flex; align-items: center; gap: 10px; flex: none; }
.ls-stat i { font-style: normal; font-size: 11px; color: #6B7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ls-stat i.warn { color: #C2410C; font-weight: 600; }
.ls-title {
  flex: 1; min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  color: #33383F; font-size: 13px; font-weight: 600; text-align: left;
}
.ls-actions { flex: none; display: flex; }
.ls-close {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 0; border-radius: 4px; background: transparent;
  color: #8A909C; font-size: 16px; line-height: 1; cursor: pointer;
  transition: color .15s, background .15s;
}
.ls-close:hover { color: #E14A5A; background: #FBEDEF; }


.ls-main { flex: 1; display: flex; min-height: 0; }
.ls-body {
  position: relative; flex: 1 1 auto; background: #0E1420; min-height: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ls-body canvas {
  display: block;
  





  background: #000; outline: none; touch-action: none; cursor: default;
}

.ls-load {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: #0E1420; pointer-events: none;
}
.ls-load span {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .25); border-top-color: #2F6FEB;
  animation: lsSpin .8s linear infinite;
}
@keyframes lsSpin { to { transform: rotate(360deg); } }






.ls-ov {
  position: absolute; inset: 0; z-index: 3; display: none;
  align-items: center; justify-content: center; padding: 16px; text-align: center;
  background: #0E1420; color: #98A2B3; font-size: 12.5px;
}





.ls-ov { flex-direction: column; gap: 12px; }
.ls-ov-msg { max-width: 88%; line-height: 1.65; color: #C9D2E0; font-size: 12.5px; word-break: break-all; }
.ls-retry-btn {
  flex: none; padding: 7px 18px; border-radius: 8px; cursor: pointer;
  border: 1px solid #2F6FEB; background: #2F6FEB; color: #FFFFFF;
  font-size: 12.5px; line-height: 1; transition: background .15s, border-color .15s, transform .1s;
}
.ls-retry-btn:hover { background: #1E5BD6; border-color: #1E5BD6; }
.ls-retry-btn:active { transform: scale(.96); }

.ls-badge.ls-reconnecting { background: rgba(180, 35, 24, .82) !important; }
.ls-toast {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  background: rgba(20, 22, 29, .88); color: #FFFFFF;
  padding: 6px 14px; border-radius: 6px; font-size: 12px;
  pointer-events: none; z-index: 5; opacity: 0; transition: opacity .25s;
}
.ls-toast.show { opacity: 1; }


.ls-side {
  flex: none; width: 48px; display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 8px 0;
  background: #F6F7F9; border-left: 1px solid #E6E8EE;
  overflow: hidden; position: relative; z-index: 3;
}
.ls-qc {
  flex: 0 1 auto; min-height: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  overflow-y: auto; overflow-x: hidden;
}
.ls-qc::-webkit-scrollbar { width: 4px; }
.ls-qc::-webkit-scrollbar-thumb { background: #D3D7DE; border-radius: 2px; }
.ls-side-fill { flex: 1 1 auto; min-height: 8px; }

.ls-side .yj-key {
  width: 34px; height: 34px; padding: 0; flex: none;
  display: grid; place-items: center;
  
  border-radius: 8px;
  border: 1px solid #D8DBE2; background: #FFFFFF; color: #3A4049;
  cursor: pointer; transition: all .15s;
}
.ls-side .yj-key:hover { border-color: #2F6FEB; color: #2F6FEB; background: #F3F7FF; }
.ls-side .yj-key.pri { background: #2F6FEB; border-color: #2F6FEB; color: #fff; }
.ls-side .yj-key.pri:hover { background: #1E5BD6; border-color: #1E5BD6; color: #fff; }
.ls-side .yj-key.active { transform: scale(.92); }
.ls-side .yj-key svg { pointer-events: none; }
.ls-side .yj-key img { width: 18px; height: 18px; object-fit: contain; display: block; pointer-events: none; }


.ls-tip {
  position: fixed; z-index: 99999; display: none;
  background: rgba(20, 22, 29, .94); color: #fff;
  font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}


.ls-resize {
  position: absolute; right: 0; bottom: 0; width: 24px; height: 24px;
  cursor: nwse-resize; z-index: 20; opacity: .75;
  background: linear-gradient(135deg, transparent 52%, #B9BEC8 52%, #B9BEC8 60%, transparent 60%, transparent 70%, #B9BEC8 70%, #B9BEC8 78%, transparent 78%);
}
.ls-resize:hover { opacity: 1; }








body.yj-sync .device-card.selected { box-shadow: 0 0 0 2px var(--accent-2), var(--shadow-sm); }
#btnSync.on #syncCount { color: #fff; font-weight: 600; }




.dc-hint.no-spin::before { display: none; }

.dc-hint.playing { color: rgba(255,255,255,.78); font-size: 12.5px; letter-spacing: .5px; }










.gs-body { padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 5px; }


.gs-group {
  margin-bottom: 0;
  background: #FFFFFF;
  border: 1px solid var(--line, #E6E9EF);
  border-radius: 8px;
  padding: 2px 4px 3px;
  box-shadow: 0 1px 1px rgba(16,24,40,.03);
}
.gs-group:hover { border-color: var(--border-accent, #C9D6EE); }
.gs-group.focused { border-color: var(--accent-2, #2F6FEB); box-shadow: 0 0 0 1px rgba(47,111,235,.18); }


.gs-tag-row {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary, #1F2430);
  padding: 3px 7px;
  border-radius: 6px;
  min-height: 26px;
}
.gs-tag-name { font-weight: 700; }
.gs-count { font-weight: 600; font-size: 11.5px; }


.gs-device {
  margin-left: 12px;
  font-size: 11.5px;
  line-height: 1.4;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text-secondary, #5A6172);
}
.gs-device + .gs-device { margin-top: 0; }
.gs-device:hover { background: var(--bg-hover, #F2F5FA); }
.gs-device.focused { background: rgba(47,111,235,.12); color: var(--accent-2, #2F6FEB); font-weight: 600; }


.gs-new,
.gs-new:link,
.gs-new:visited {
  background: #2F6FEB !important;
  color: #111827 !important;
  border: 1px solid #2F6FEB !important;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 4px;
}
.gs-new:hover { background: #1E5BD6 !important; color: #000 !important; }
.gs-new * { color: #111827 !important; }







.loading-row { display: flex; align-items: center; gap: 8px; padding: 26px 0; justify-content: center; color: var(--text-secondary); font-size: 13px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: tk-sp .8s linear infinite; }
@keyframes tk-sp { to { transform: rotate(360deg); } }
.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.req { color: var(--danger); }
.tag.warn { background: #FDF3E7; color: var(--warning); }


.tk-field { margin-bottom: 14px; }
.tk-field > label { display: block; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.tk-field textarea,
.tk-field select,
.tk-field input[type="file"] {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary); font-size: 13px; padding: 8px 10px;
  font-family: inherit;
}
.tk-field textarea { resize: vertical; line-height: 1.6; }

.tk-devlist { max-height: 220px; overflow: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-subtle); padding: 6px; }
.tk-dev { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: 12.5px; cursor: pointer; }
.tk-dev:hover { background: var(--bg-hover); }
.tk-dev-id { font-family: ui-monospace, Consolas, monospace; font-weight: 600; color: var(--text-primary); }
.tk-dev-sup { color: var(--text-secondary); }
.tk-dev .spacer { flex: 1; }
.tk-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; flex: 0 0 8px; }
.tk-dot.on { background: var(--success); }
.tk-dot.off { background: #C7CDD8; }

.tk-dot.syncing { background: var(--warning); }

.tk-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-primary);
  cursor: pointer; margin-bottom: 0; }
.tk-check input { width: auto; }

.tk-shots, .tk-shotrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tk-shot { position: relative; width: 92px; height: 92px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-subtle); overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.tk-shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tk-shot-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0;
  border-radius: 50%; background: rgba(16, 24, 40, .66); color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer; }
.tk-shot-del:hover { background: var(--danger); }


.tk-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 7px 14px;
  background: var(--bg-subtle); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; }
.tk-kv > div { display: flex; gap: 8px; font-size: 12.5px; align-items: baseline; }
.tk-kv span { color: var(--text-secondary); flex: 0 0 88px; }
.tk-kv b { color: var(--text-primary); font-weight: 600; word-break: break-all; }
.tk-quote { background: var(--bg-subtle); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.65;
  color: var(--text-primary); white-space: pre-wrap; }

.tk-replies { display: flex; flex-direction: column; gap: 8px; }
.tk-reply { border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--bg-subtle); padding: 9px 12px; }
.tk-reply-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 5px; }
.tk-reply-head .spacer { flex: 1; }
.tk-reply-body { font-size: 13px; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.6; }







.dc-gear {
  position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(16, 24, 40, .55); color: #fff;
  opacity: .9; transition: opacity .15s, background .15s, transform .1s;
  z-index: 3;
}
.dc-gear:hover { background: var(--accent); opacity: 1; }
.dc-gear:active { transform: scale(.94); }




.dc-note {
  padding: 0 6px; height: 16px; line-height: 16px;
  flex: 0 1 auto; min-width: 0; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--accent); background: var(--accent-soft);
  border-radius: 4px;
}



.dc-grant-badge {
  position: absolute; bottom: 6px; left: 6px; z-index: 6;
  padding: 1px 6px; height: 17px; line-height: 17px;
  border-radius: 4px; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.dc-grant-badge.out { color: #7C2D12; background: #FED7AA; }

.dc-grant-badge.in { color: #1E3A8A; background: #BFDBFE; }


.ops-grant-out {
  border: 1px solid #F5D08A; background: #FFFBF2; border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 4px;
}
.ops-grant-title { font-size: 12.5px; font-weight: 700; color: #B45309; margin-bottom: 8px; }
.ops-grant-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.ops-grant-row + .ops-grant-row { border-top: 1px dashed #F0DCB4; }
.ops-grant-arrow { color: var(--text-tertiary, #8A94A8); }
.ops-grant-left { margin-left: auto; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
















.ops-tabs {
  display: flex; flex-wrap: nowrap; gap: 3px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto; overflow-y: hidden;
  

  scrollbar-width: none;
}
.ops-tabs::-webkit-scrollbar { height: 0; display: none; }
.ops-tab {
  flex: 0 0 auto;                 
  height: 34px; padding: 0 11px; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); font-family: inherit;
  white-space: nowrap;            
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.ops-tab:hover { color: var(--text-primary); }
.ops-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.ops-pane { min-height: 120px; }
.ops-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.ops-glyph { font-size: 20px; line-height: 1; color: #000; }


.ops-head { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 4px 0 10px; }
.ops-head .hint { font-weight: 400; }
.ops-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ops-tile {
  width: 92px; min-height: 92px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s;
  font-family: inherit;
}
.ops-tile:hover { border-color: var(--accent); box-shadow: var(--accent-glow) 0 2px 10px; }
.ops-tile:active { transform: scale(.97); }
.ops-tile:disabled { opacity: .55; cursor: default; }
.ops-tile.wide { width: 118px; min-height: 84px; }
.ops-ico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: #000; }
.ops-ico img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.ops-emoji { font-size: 24px; line-height: 1; }
.ops-name { font-size: 12px; color: var(--text-primary); text-align: center; line-height: 1.3;
  word-break: break-all; }


.ops-field { margin-bottom: 12px; }
.ops-field > label { display: block; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.ops-field input, .ops-field select {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-primary);
  font-size: 13px; padding: 8px 10px; font-family: inherit;
}
.ops-fee { margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: #FFF8E8; border: 1px solid #F0DCB4; color: var(--warning); font-size: 13px; }
.ops-fee.bad { background: var(--danger-bg); border-color: #F0CBC5; color: var(--danger); }
.ops-fee b { font-weight: 700; }
.ops-swapout, .ops-devlist { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg-subtle); border: 1px solid var(--border-soft);
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; word-break: break-all; }
.ops-pick { max-height: 260px; overflow: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-subtle); padding: 4px; }
.ops-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.ops-row:hover { background: var(--bg-hover); }
.ops-row .spacer { flex: 1; }



.app-op-tip {
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.6;
}
.app-op-tip b { color: var(--text-primary); }
.app-op-pkg {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-subtle); border: 1px solid #E5E9F0;
  font: 12.5px/1.4 ui-monospace, Consolas, monospace; color: var(--text-primary);
  word-break: break-all;
}
.app-op-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px;
}
.app-op-grid button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; border: none; border-radius: 10px; cursor: pointer;
  background: #2F6FEB; color: #fff; font-size: 13.5px; font-weight: 600;
  transition: filter .15s, transform .08s;
}
.app-op-grid button:hover { filter: brightness(1.07); }
.app-op-grid button:active { transform: scale(.98); }
.app-op-grid button.danger { background: #E5484D; }
.app-op-grid button svg { width: 16px; height: 16px; }
.app-op-grid button:disabled { opacity: .55; cursor: not-allowed; }





















.sk5 { display: flex; flex-direction: column; gap: 14px; }


.sk5-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sk5-head-l { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sk5-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.sk5-sub { font-size: 13.5px; color: var(--text-tertiary); }
.sk5-stat {
  flex: none; min-width: 78px; text-align: center;
  padding: 5px 12px; border-radius: 999px;
  background: var(--bg-tint); border: 1px solid var(--border-accent);
  font-size: 14px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.sk5-stat b { color: var(--accent); font-size: 17px; font-weight: 700; }


.sk5-split { display: flex; align-items: stretch; gap: 14px; min-height: 340px; }



.sk5-devbox {
  flex: none; width: 216px; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-surface);
}
.sk5-devbox-head, .sk5-nodebox-head {
  flex: none; padding: 9px 14px; font-size: 12.5px; font-weight: 600;
  color: var(--text-tertiary); background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.sk5-devlist { flex: 1 1 auto; overflow-y: auto; max-height: 420px; }
.sk5-devrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
}
.sk5-devrow:last-child { border-bottom: 0; }
.sk5-devrow:nth-child(even) { background: var(--bg-subtle); }
.sk5-devrow.bad { background: var(--danger-bg); }
.sk5-devrow-n {
  flex: none; width: 22px; text-align: right; font-size: 13px;
  color: var(--text-disabled); font-variant-numeric: tabular-nums;
}
.sk5-devrow-id {
  flex: 1 1 auto; min-width: 0; font-size: 14.5px; color: var(--text-primary);
  font-family: ui-monospace, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sk5-devrow-mark { flex: none; font-size: 12px; color: var(--text-disabled); }
.sk5-devrow-mark.ok { color: var(--success); font-size: 15px; font-weight: 700; }
.sk5-devrow-mark.bad { color: var(--danger); font-weight: 600; }
.sk5-devrow-mark.empty { color: var(--text-disabled); }



.sk5-nodebox {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-surface);
}
.sk5-nodebox:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea#sk5List {
  flex: 1 1 auto; width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: none;
  padding: 12px 14px; background: var(--bg-surface); color: var(--text-primary);
  font: 13.5px/1.85 ui-monospace, Consolas, "Cascadia Mono", monospace;
  min-height: 300px; max-height: 420px; height: 300px;
  white-space: pre; overflow: auto;
}
textarea#sk5List::placeholder { color: var(--text-disabled); }


.sk5-alert {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.65;
  background: var(--bg-tint); border: 1px solid var(--border-accent); color: var(--text-secondary);
}
.sk5-alert.bad { background: var(--danger-bg); border-color: #F0CBC5; color: var(--danger); }


.sk5-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sk5-tip { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.7; }
.sk5-tip code {
  padding: 2px 6px; border-radius: 4px; background: var(--bg-tint-2);
  color: var(--accent-2); font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.sk5-clear {
  flex: none; border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-secondary); font-size: 13px; padding: 7px 14px;
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
}
.sk5-clear:hover { background: var(--bg-hover); border-color: var(--border-accent); color: var(--accent); }


@media (max-width: 760px) {
  .sk5-split { flex-direction: column; min-height: 0; }
  .sk5-devbox { width: auto; }
  .sk5-devlist { max-height: 180px; }
  textarea#sk5List { min-height: 200px; height: 200px; }
  .sk5-foot { flex-direction: column; align-items: stretch; }
}











#dlgBody.sk5q-mode { display: flex; flex-direction: column; overflow: hidden; }
.sk5q { flex: 1 1 auto; min-height: 0; }
.sk5q .sk5-devlist { width: 100%; flex: 1 1 auto; min-height: 120px; max-height: none; overflow-y: auto; }
.sk5q-row { gap: 12px; }
.sk5q-row .sk5-devrow-id { flex: 0 0 172px; }
.sk5q-node {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13.5px;
}





.sk5q-off {
  font-size: 12px; padding: 2px 7px; border-radius: 999px;
  background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning);
}


.sk5q-status { font-size: 13.5px; color: var(--text-secondary); font-weight: 600; }
.sk5q-status.warn { color: var(--warning); }
.sk5q-status.bad { color: var(--danger); }





.sk5q-status.ok { color: var(--success); display: inline-flex; align-items: center; gap: 6px; }
.sk5q-status.ok::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex: none;
  box-shadow: 0 0 0 3px var(--success-bg);
}
.sk5q-why { font-size: 12px; color: var(--text-tertiary); }
.sk5q-loading { font-size: 13px; color: var(--text-disabled); }
.sk5-devrow-mark.warn { color: var(--warning); font-weight: 700; }


.sk5q-row .sk5q-loading { animation: sk5q-blink 1.1s ease-in-out infinite; }
@keyframes sk5q-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }


.sk5q-chk { flex: none; width: 22px; display: flex; align-items: center; }
.sk5q-chk input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.sk5q-chk.off input { cursor: not-allowed; opacity: .35; }


.sk5q-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary);
}
.sk5q-bar-all { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.sk5q-bar-all input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.sk5q-bar-sel { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.sk5q-bar-sp { flex: 1 1 auto; }
#sk5qBatchDel:disabled { opacity: .45; cursor: not-allowed; }






.sk5q-act { flex: none; width: 62px; text-align: right; }
.sk5q-del {
  border: 1px solid var(--danger); background: var(--danger); color: #FFFFFF;
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.sk5q-del:hover { background: #C03A3A; border-color: #C03A3A; }
.sk5q-del:active { background: #A93232; border-color: #A93232; }
.sk5q-del:disabled { opacity: .55; cursor: not-allowed; }


.sk5q-delbox { display: flex; flex-direction: column; gap: 10px; }
.sk5q-delwarn {
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6;
  background: var(--danger-bg); border: 1px solid #F0CBC5; color: var(--danger);
}
.sk5q-deltab { width: 100%; border-collapse: collapse; font-size: 13px; }
.sk5q-deltab th {
  width: 76px; text-align: left; font-weight: 400; color: var(--text-tertiary);
  padding: 4px 0; vertical-align: top;
}
.sk5q-deltab td { padding: 4px 0; color: var(--text-primary); word-break: break-all; }
.sk5q-deltab td.mono { font-family: ui-monospace, Consolas, monospace; }

.sk5q-dellist {
  max-height: 178px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 12px; background: var(--bg-surface);
}
.sk5q-deltab-list { width: 100%; }
.sk5q-deltab-list thead th {
  width: auto; position: sticky; top: 0; background: var(--bg-surface);
  font-size: 12px; color: var(--text-tertiary); padding: 7px 0 5px;
  border-bottom: 1px solid var(--border-soft);
}
.sk5q-deltab-list tbody td { padding: 5px 0; font-size: 12.5px; }
.sk5q-deltab-list tbody td:first-child { width: 96px; }
.sk5q-more { font-size: 12px; color: var(--text-tertiary); }
.sk5q-delbox .ops-field { margin: 0; }
.sk5q-delbox .ops-field label { font-size: 13px; }
.sk5q-delbox .ops-field input { height: 34px; font-size: 13px; }

@media (max-width: 760px) {
  .sk5q-row { flex-wrap: wrap; }
  .sk5q-row .sk5-devrow-id { flex: 1 1 auto; }
  .sk5q-node { flex: 1 1 100%; }
  .sk5q-act { width: auto; }
}






.sk5sp { display: flex; flex-direction: column; gap: 12px; }


.sk5sp-box {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-subtle); border: 1px solid var(--border-soft);
}
.sk5sp-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 9px;
}
.sk5sp-head-l { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sk5sp-sub { font-size: 12.5px; color: var(--text-tertiary); }
.sk5sp-sub code {
  padding: 1px 6px; border-radius: 4px; background: var(--bg-tint-2);
  color: var(--accent-2); font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}


.sk5sp-status {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  min-height: 42px; font-size: 13.5px;
}

.sk5sp-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.sk5sp-whyline { margin-top: -3px; }






.sk5sp-card {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 7px;
}
.sk5sp-kv { display: flex; align-items: baseline; gap: 9px; }


.sk5sp-k { flex: 0 0 auto; width: 40px; font-size: 12.5px; color: var(--text-tertiary); }
.sk5sp-v { min-width: 0; flex: 1 1 auto; word-break: break-all; }

.sk5q-addr {
  display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px;
  padding: 3px 9px; border-radius: var(--radius-xs);
  background: var(--bg-tint); border: 1px solid var(--border-accent); color: var(--text-primary);
}
.sk5q-user { font-size: 13px; color: var(--text-secondary); }
.sk5q-cmt { font-size: 12.5px; color: var(--text-tertiary); }

.sk5sp-card-ft { display: flex; align-items: center; gap: 9px; margin-top: 2px; }
.sk5sp-sp { flex: 1 1 auto; }





.sk5sp-loading { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.sk5sp-loading-t { font-size: 13px; color: var(--text-secondary); }
.sk5sp-spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: sk5sp-spin .7s linear infinite;
}
@keyframes sk5sp-spin { to { transform: rotate(360deg); } }
.sk5sp-skbar {
  height: 30px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg-tint-2) 50%, var(--bg-soft) 100%);
  background-size: 200% 100%; animation: sk5sp-shimmer 1.2s ease-in-out infinite;
}
@keyframes sk5sp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  .sk5sp-spin, .sk5sp-skbar { animation: none; }
}


.sk5sp-form { display: flex; align-items: center; gap: 8px; }
.sk5sp-form input {
  flex: 1 1 auto; min-width: 0; height: 36px; box-sizing: border-box;
  padding: 0 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary); font-family: inherit; font-size: 13px;
}
.sk5sp-form input:focus { outline: 0; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.sk5sp-form button { flex: none; }
.sk5sp-tip { margin-top: 8px; font-size: 12.5px; color: var(--text-tertiary); line-height: 1.7; }
.sk5sp-tip code {
  padding: 2px 6px; border-radius: 4px; background: var(--bg-tint-2);
  color: var(--accent-2); font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}

.sk5sp-intro { margin-bottom: 0; line-height: 1.7; }



.sk5-alert.ok {
  background: var(--success-bg); border-color: #B7E4CB; color: var(--success); font-weight: 600;
}



.sk5sp-delbox { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.sk5sp-delwarn {
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.6;
  background: var(--danger-bg); border: 1px solid #F0CBC5; color: var(--danger);
}
.sk5sp-delline { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; word-break: break-all; }
.sk5sp-delline code {
  padding: 1px 6px; border-radius: 4px; background: var(--bg-tint-2);
  color: var(--accent-2); font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.sk5sp-delfields { display: flex; gap: 8px; flex-wrap: wrap; }
.sk5sp-delfields input {
  flex: 1 1 160px; min-width: 0; height: 34px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary); font-family: inherit; font-size: 13px;
}
.sk5sp-delfields input:focus { outline: 0; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.sk5sp-delbtns { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 760px) {
  .sk5sp-form { flex-wrap: wrap; }
  .sk5sp-form input { flex: 1 1 100%; }
}














.tkchat { display: flex; flex-direction: column; }

.tkchat-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 9px; margin-bottom: 2px;
  border-bottom: 1px solid var(--border-soft);
}
.tkchat-head .spacer { flex: 1 1 auto; }


.tkchat-banner {
  margin-top: 10px; padding: 9px 12px;
  background: var(--success-bg); border: 1px solid #BFE3CE;
  border-radius: var(--radius-sm);
  color: var(--success); font-size: 12.5px; line-height: 1.6;
}

.tkchat-banner.closed {
  background: #FDF1EF; border-color: #F0CBC5; color: #C23A2C;
}

.tkchat.closed .tkchat-input textarea,
#tkChat.closed .tkchat-input textarea {
  background: var(--bg-subtle); color: var(--text-tertiary); cursor: not-allowed;
}



.tkmsg-recall {
  display: none; margin-left: 4px; padding: 0 2px; border: 0; background: transparent;
  color: var(--text-tertiary); font: inherit; font-size: 11.5px; line-height: 17px; cursor: pointer;
  text-decoration: underline;
}
.tkmsg.me:hover .tkmsg-recall { display: inline-block; }
.tkmsg-recall:hover { color: #C23A2C; }
.tkmsg-recall:disabled { opacity: .5; cursor: default; }


.tkmsg.recalled .tkmsg-bubble,
.tkmsg.me.recalled .tkmsg-bubble,
.tkmsg.from-staff.recalled .tkmsg-bubble,
.tkmsg.from-admin.recalled .tkmsg-bubble,
.tkmsg.from-supplier.recalled .tkmsg-bubble {
  background: var(--bg-subtle) !important;
  border-color: var(--border) !important;
  color: var(--text-tertiary) !important;
  font-style: italic; box-shadow: none !important;
}
.tkmsg.recalled .tkmsg-head { opacity: .7; }
.tkmsg.recalled .tkmsg-name { color: var(--text-tertiary); }

.tkchat-scroll {
  height: 340px; overflow-y: auto;
  padding: 14px 10px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  margin: 10px 0 12px;
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-height: 720px) { .tkchat-scroll { height: 250px; } }

.tkmsg { display: flex; flex-direction: column; max-width: 78%; }

.tkmsg.me { align-self: flex-end; align-items: flex-end; }
.tkmsg.them { align-self: flex-start; align-items: flex-start; }
.tkmsg-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-tertiary); margin-bottom: 4px;
}
.tkmsg.me .tkmsg-head { justify-content: flex-end; }
.tkmsg-name { font-weight: 600; color: var(--text-secondary); }
.tkmsg-time { color: var(--text-tertiary); font-weight: 400; }
.tkmsg-badge {
  display: inline-block; padding: 0 7px; border-radius: 20px;
  font-size: 10.5px; line-height: 17px; font-weight: 600; letter-spacing: .2px;
}

.tkmsg-badge.staff { background: #0f6b5f; color: #fff; }
.tkmsg-badge.supplier { background: #0e7490; color: #fff; }





.tkmsg-badge.auto { background: #eef1f5; color: #5b6478; box-shadow: inset 0 0 0 1px #dbe1e8; }

.tkmsg-tag-auto { background: #eef1f5; color: #5b6478; box-shadow: inset 0 0 0 1px #dbe1e8; }
.tkmsg-bubble {
  padding: 9px 13px; border-radius: 10px;
  font-size: 13px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.tkmsg.them .tkmsg-bubble {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary);
}
.tkmsg.me .tkmsg-bubble {
  background: var(--accent); border: 1px solid var(--accent);
  color: #fff;
}










.tkmsg.from-staff .tkmsg-bubble {
  background: linear-gradient(135deg, #0f6b5f 0%, #0c7f6d 100%);
  border: 1px solid #0b5f57; color: #fff;
  box-shadow: 0 2px 10px rgba(15, 107, 95, .18);
}
.tkmsg.from-staff .tkmsg-name { color: #0b5f57; }
.tkmsg.from-admin .tkmsg-bubble {
  background: #f5f0ff; border: 1px solid #d8c7f7; border-left: 3px solid #6d28d9;
  color: #3d2a70;
}
.tkmsg.from-admin .tkmsg-name { color: #5b21b6; }
.tkmsg.from-supplier .tkmsg-bubble {
  background: #e8fbff; border: 1px solid #a9e7f3; border-left: 3px solid #0e7490;
  color: #0b5566;
}
.tkmsg.from-supplier .tkmsg-name { color: #0e7490; }

.tk-paste-sink {
  position: fixed; left: -9999px; top: 0;
  width: 1px; height: 1px; padding: 0; margin: 0; border: 0;
  opacity: 0; pointer-events: none; resize: none; overflow: hidden;
}
.tkmsg-tag {
  display: inline-block; font-size: 11px;
  background: var(--info-bg); color: var(--accent);
  border-radius: 4px; padding: 1px 6px;
}
.tkmsg .tk-shotrow { margin-top: 7px; }
.tkmsg.me .tk-shotrow { justify-content: flex-end; }










.tkmsg.has-av {
  flex-direction: row; align-items: flex-start; gap: 8px;
  
  max-width: 86%;
}
.tkmsg.has-av.me { flex-direction: row-reverse; align-items: flex-start; }
.tkmsg-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tkmsg.has-av.me .tkmsg-main { align-items: flex-end; }
.tkmsg-av {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; user-select: none;
  font-size: 13px; font-weight: 600; line-height: 1;
  color: #fff; background: #7d8aa3;
}
.tkmsg-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

.tkmsg.from-staff .tkmsg-av { background: #0f6b5f; }
.tkmsg.from-admin .tkmsg-av { background: #5b21b6; }
.tkmsg.from-supplier .tkmsg-av { background: #0e7490; }
.tkmsg.me .tkmsg-av { background: #2f6feb; }
.tkmsg.auto .tkmsg-av {
  background: #eef1f5; color: #5b6478; box-shadow: inset 0 0 0 1px #dbe1e8;
}

.tkmsg.recalled .tkmsg-av { opacity: .55; }





.tk-ctx {
  position: fixed; z-index: 9500; min-width: 132px; padding: 5px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
  font-size: 12.5px;
}
.tk-ctx-item {
  display: block; width: 100%; text-align: left;
  padding: 7px 11px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-primary, #1f2733);
  font: inherit; cursor: pointer; white-space: nowrap;
}
.tk-ctx-item:hover, .tk-ctx-item:focus-visible {
  background: var(--bg-subtle, #f2f4f7); outline: none;
}

.tk-ctx-item.danger { color: #c23a2c; }
.tk-ctx-item.danger:hover { background: #fdf1ef; }

.tkchat-input { border-top: 1px solid var(--border-soft); padding-top: 10px; }
.tkchat-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.tkchat-input textarea {
  width: 100%; resize: vertical; line-height: 1.6;
  padding: 9px 12px; font: inherit; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
}
.tkchat-input textarea:focus { outline: 0; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.tkchat-send { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tkchat-send .spacer { flex: 1 1 auto; }














.tk-list-view,
.tk-chat-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tk-list-view[hidden],
.tk-chat-view[hidden] { display: none !important; }

.tk-chat-view { overflow: hidden; }
.tkchat-full { flex: 1 1 auto; min-height: 0; height: 100%; }


.tk-chat-bar {
  position: relative;   
  flex: 0 0 auto;       
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.tk-chat-bar .spacer { flex: 1 1 auto; }
.tk-chat-title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); }
.tk-back { flex: 0 0 auto; }
.tk-back:hover { border-color: var(--border-focus); color: var(--accent); }

.tk-chat-view .tkchat-banner { margin: 10px 16px 0; }

.tk-chat-view .tkchat-scroll {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  margin: 10px 16px;
}
.tk-chat-view .tkchat-input { padding: 10px 16px 14px; }
.tk-chat-view .tkchat-tools { flex-wrap: wrap; }
.tk-chat-view .tkchat-paste-hint { margin-left: 0; }
.tk-chat-view .tkchat-tools .hint:last-child { margin-left: auto; }


.tkchat.drop-on {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
  background: var(--accent-soft);
}
.tk-chat-view .tkchat-banner + .tkchat-scroll { margin-top: 10px; }





.tk-rate {
  margin: 10px 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tk-rate-t { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.tk-rate-stars { display: flex; gap: 6px; }
.tk-rate-star {
  width: 34px; height: 34px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: #fff;
  color: #c9ced9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s, transform .08s;
}
.tk-rate-star:hover { transform: translateY(-1px); }
.tk-rate-star.on { color: #f5a623; border-color: #f6d79a; background: #fffaf0; }
.tk-rate-lb { font-size: 12.5px; color: var(--text-secondary, #6b7280); min-height: 18px; }
.tk-rate-lb.on { color: #b7791f; font-weight: 600; }
.tk-rate textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit; font-size: 13px;
  resize: vertical;
}
.tk-rate textarea:focus { outline: 0; border-color: var(--border-focus, #3b6ae0); box-shadow: 0 0 0 3px var(--accent-soft, #edf2fe); }
.tk-rate-row { display: flex; align-items: center; gap: 10px; }
.tk-rate-row .spacer { flex: 1 1 auto; }
.tk-rate-thanks {
  flex-direction: row; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-primary);
  background: #fffaf0; border-color: #f6e3bd;
}
.tk-rate-thanks-stars { color: #f5a623; font-size: 16px; letter-spacing: 1px; }












.kefu-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 9px 14px;
  border-radius: 9px; font-size: 12.5px; line-height: 1.6;
  border: 1px solid var(--line-2, #e3e7ef); background: var(--surface-2, #f7f9fc); color: var(--text-secondary, #5b6478);
}
.kefu-bar .kb-dot { width: 7px; height: 7px; border-radius: 50%; background: #1fa463; flex: 0 0 auto; }
.kefu-bar.on { background: #eefaf2; border-color: #c6ecd6; color: #18794e; }
.kefu-bar.busy { background: #fff8e8; border-color: #f4e0b0; color: #8a5a06; }
.kefu-bar.busy .kb-dot { background: #d99419; }
.kefu-bar.away { background: #fff6ed; border-color: #f5d6ba; color: #9a4c0c; }
.kefu-bar.away b { color: #8a3f06; }
.kefu-bar.away .kb-ico { font-size: 14px; }
.kefu-bar .kb-sub { color: inherit; opacity: .85; }
.kefu-bar.on .kb-dot { background: #1fa463; }


.kefu-bar.note { background: #f4f6f9; border-color: #e2e8ef; color: #5b6478; font-size: 12px; }
.kefu-bar.note + .kefu-bar, .kefu-bar + .kefu-bar.note { margin-top: 6px; }


.tkmsg-st {
  font-size: 11px; color: var(--text-tertiary, #9aa0a8);
  text-align: right; margin-top: 3px;
}
.tkmsg-st.read { color: var(--accent, #2f6feb); }


.sb-item { position: relative; }
.sb-dot {
  position: absolute; top: 4px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 20px; background: #e5484d; color: #fff;
  font-size: 10.5px; line-height: 16px; text-align: center; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}


.tkmsg-imgnote { font-size: 12px; color: var(--text-tertiary, #9aa0a8); margin-top: 3px; }






.tk-act { min-width: 78px; white-space: nowrap; }

.yj-sound-arm {
  

  position: fixed; left: calc(var(--sidebar-w) + 12px); bottom: 64px; z-index: 2600;
  height: 30px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(20, 24, 32, .86);
  color: #fff; font-size: 12px; line-height: 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.yj-sound-arm:hover { background: rgba(20, 24, 32, .96); transform: translateY(-1px); }
.yj-sound-arm:active { transform: scale(.98); }











.fb-page { padding-top: 10px; }
.fb-grid {
  display: grid; grid-template-columns: minmax(340px, .86fr) minmax(400px, 1.14fr);
  gap: 18px; align-items: start; max-width: 1320px;
}
.fb-form, .fb-mine { padding: 20px 22px 22px; margin-bottom: 0; }
.fb-form > h3, .fb-mine > h3 { margin-bottom: 14px; }

.fb-thanks {
  display: flex; flex-direction: column; gap: 4px;
  margin: -2px 0 16px; padding: 12px 14px;
  border: 1px solid #BFE3CE; border-radius: var(--radius);
  background: var(--success-bg); color: var(--success);
  font-size: 13px;
}
.fb-thanks b { font-size: 13.5px; }
.fb-thanks span { color: #2F7A52; font-size: 12.5px; }
.fb-thanks.fb-thanks-in { animation: fbThanksIn .28s ease; }
@keyframes fbThanksIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.fb-field { margin-bottom: 16px; }
.fb-field > label {
  display: block; margin-bottom: 7px;
  font-size: 12.5px; color: var(--text-secondary); font-weight: 500;
}
.fb-field > label .req { color: var(--danger); }
.fb-select, .fb-field input[type="text"], .fb-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
  font: inherit; font-size: 13px; outline: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.fb-select { height: 40px; padding: 0 10px; }
.fb-field input[type="text"] { height: 40px; padding: 0 12px; }
.fb-field textarea {
  min-height: 176px; padding: 11px 12px; line-height: 1.75; resize: vertical;
}
.fb-select:focus, .fb-field input[type="text"]:focus, .fb-field textarea:focus {
  border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft);
}
.fb-count { margin-top: 5px; text-align: right; font-size: 11.5px; color: var(--text-tertiary); }

.fb-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 136px; padding: 18px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-subtle); cursor: pointer; text-align: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  outline: none;
}
.fb-drop:hover, .fb-drop:focus-visible { border-color: var(--border-accent); background: var(--bg-tint); }
.fb-drop.dragover {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(47, 111, 235, .08);
}
.fb-drop-ico {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.fb-drop-main { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.fb-drop-main b { color: var(--accent); font-weight: 600; }
.fb-drop .hint { margin: 0; font-size: 11.5px; }

.fb-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.fb-thumb {
  position: relative; width: 96px; height: 96px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg-soft);
}
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb.failed { border-color: #F0CBC5; }
.fb-thumb-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 24, 40, .48); color: #fff; font-size: 11.5px;
}
.fb-thumb-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border: 0; border-radius: 50%; background: rgba(16, 24, 40, .6); color: #fff;
  font-size: 14px; line-height: 20px; padding: 0; cursor: pointer;
}
.fb-thumb-del:hover { background: var(--danger); }

.fb-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.fb-actions .hint { margin: 0; font-size: 12px; }
.fb-actions .spacer { flex: 1 1 auto; }
.fb-submit { min-width: 132px; height: 38px; }

.fb-total { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
#fbList { display: flex; flex-direction: column; gap: 12px; }
.fb-empty {
  padding: 34px 10px; text-align: center; line-height: 1.9;
  color: var(--text-tertiary); font-size: 12.5px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--bg-subtle);
}
.fb-item {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: var(--bg-surface); padding: 13px 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.fb-item:hover { border-color: var(--border-accent); box-shadow: var(--shadow-xs); }
.fb-item-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.fb-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-tertiary); }
.fb-item-hd .spacer { flex: 1 1 auto; }
.fb-time { font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }
.fb-item-type { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.fb-item-content {
  font-size: 13px; line-height: 1.7; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-word;
}
.fb-item-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.fb-item-img {
  width: 74px; height: 74px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  overflow: hidden; background: var(--bg-soft); cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
}
.fb-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-img-bad { font-size: 10.5px; color: var(--text-tertiary); padding: 4px; text-align: center; }
.fb-reply {
  margin-top: 10px; padding: 9px 11px;
  border: 1px solid #D9E6FD; border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); background: #F7FAFF;
}
.fb-reply-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; font-size: 11.5px; color: var(--text-tertiary); }
.fb-reply-hd b { font-size: 12px; color: var(--accent); }
.fb-reply-body { font-size: 12.5px; line-height: 1.65; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.fb-wait { margin-top: 9px; font-size: 11.5px; color: var(--text-tertiary); }

@media (max-width: 1080px) {
  .fb-grid { grid-template-columns: 1fr; }
}


.tk-submit-view {
  flex: 1 1 auto; min-height: 0; height: 100%;
  display: flex; flex-direction: column;
}
.tk-submit-view[hidden] { display: none !important; }

.tk-submit-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.tk-submit-bar .spacer { flex: 1 1 auto; }
.tk-submit-title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); }
.tk-submit-bar .tag { flex: none; }

.tk-submit-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 18px 22px 30px; }
.tk-submit-body {
  display: grid; grid-template-columns: minmax(330px, .92fr) minmax(380px, 1.08fr);
  gap: 18px; align-items: start; max-width: 1320px; margin: 0 auto;
}
.tk-submit-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tk-subcard {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.tk-subcard-hd { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.tk-subcard-hd b { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.tk-subcard-hd .hint { margin: 0; font-size: 12px; }
.tk-subcard-hd .req { color: var(--danger); }

.tk-devsearch { position: relative; }
.tk-devsearch input {
  width: 100%; box-sizing: border-box; height: 40px;
  padding: 0 38px 0 36px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
  font: inherit; font-size: 13px; outline: 0;
}
.tk-devsearch input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-devsearch .tk-search-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); display: inline-flex; pointer-events: none;
}
.tk-devsearch .tk-search-clear {
  position: absolute; right: 6px; top: 6px; width: 28px; height: 28px;
  border: 0; border-radius: var(--radius-xs); background: transparent;
  color: var(--text-tertiary); font-size: 17px; line-height: 1; cursor: pointer;
}
.tk-devsearch .tk-search-clear:hover { background: var(--bg-hover); color: var(--text-primary); }

.tk-devfilters { display: flex; gap: 8px; margin-top: 9px; }
.tk-devfilters select {
  flex: 1 1 0; min-width: 0; height: 34px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-secondary);
  font: inherit; font-size: 12.5px; padding: 0 8px; outline: 0;
}

.tk-devlist-large {
  max-height: 392px; overflow: auto; margin-top: 10px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.tk-dev-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border-soft);
  cursor: pointer; transition: background var(--transition);
}
.tk-dev-row:last-child { border-bottom: 0; }
.tk-dev-row:hover { background: var(--bg-hover); }
.tk-dev-row.on { background: var(--accent-soft); }
.tk-dev-row.disabled { opacity: .48; cursor: not-allowed; }
.tk-dev-row input[type="checkbox"] { flex: none; width: 15px; height: 15px; accent-color: var(--accent); }
.tk-dev-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-dev-id { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tk-dev-sub {
  font-size: 11.5px; color: var(--text-tertiary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-dev-lock { flex: none; font-size: 10.5px; color: var(--warning); background: var(--warning-bg); border-radius: 999px; padding: 1px 7px; }
.tk-dev-empty { padding: 34px 12px; text-align: center; color: var(--text-tertiary); font-size: 12.5px; }
.tk-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk-picked-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border-accent); background: var(--bg-tint);
  color: var(--accent); font-size: 11.5px; font-family: var(--font-mono);
}
.tk-picked-chip button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0;
}
.tk-picked-chip button:hover { color: var(--danger); }
.tk-dev-empty-note { margin-top: 8px; }

.tk-submit-field { margin-bottom: 14px; }
.tk-submit-field:last-child { margin-bottom: 0; }
.tk-submit-field > label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--text-secondary); }
.tk-submit-field > label .req { color: var(--danger); }
.tk-submit-field select,
.tk-submit-field input[type="text"] {
  width: 100%; box-sizing: border-box; height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
  font: inherit; font-size: 13px; outline: 0;
}
.tk-submit-field select:focus, .tk-submit-field input[type="text"]:focus {
  border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft);
}
.tk-submit-field textarea {
  width: 100%; box-sizing: border-box; min-height: 186px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
  font: inherit; font-size: 13px; line-height: 1.75; resize: vertical; outline: 0;
}
.tk-submit-field textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-submit-count { margin-top: 5px; text-align: right; font-size: 11.5px; color: var(--text-tertiary); }

.tk-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-height: 148px; padding: 18px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-subtle); cursor: pointer; text-align: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.tk-upload:hover { border-color: var(--border-accent); background: var(--bg-tint); }
.tk-upload.dragover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(47, 111, 235, .08); }
.tk-upload-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.tk-upload-main { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.tk-upload-main b { color: var(--accent); }
.tk-upload .hint { margin: 0; font-size: 11.5px; }
.tk-shots-large .tk-shot { width: 104px; height: 104px; }
.tk-submit-replace { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
.tk-submit-replace input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.tk-submit-replace .hint { display: block; margin: 3px 0 0; font-size: 12px; color: var(--text-tertiary); }

@media (max-width: 1100px) {
  .tk-submit-body { grid-template-columns: 1fr; max-width: 760px; }
  .tk-devlist-large { max-height: 300px; }
}


.tk-submit-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 22px; background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.tk-submit-foot .spacer { flex: 1 1 auto; }
.tk-submit-foot .hint { margin: 0; font-size: 12px; }
.tk-submit-foot .btn { min-width: 96px; height: 36px; }



body:has(#viewFeedback:not([hidden])) .yj-sound-arm,
body:has(#tkSubmitPane:not([hidden])) .yj-sound-arm { display: none; }












.tk-complain-wrap {
  position: absolute; top: 10px; right: 16px; z-index: 6;
  display: inline-flex; align-items: center;
}
.tk-chat-bar.tk-has-cp {
  padding-right: calc(var(--tk-cp-w, 84px) + 28px);
  
  min-height: calc(var(--tk-cp-h, 30px) + 21px);
}
.tk-cp-btn {
  border-color: #f0cbc5; color: #c23a2c; background: #fdf1ef;
}
.tk-cp-btn:hover { border-color: #e0a79e; background: #fbe6e2; color: #a52d21; }
.tk-cp-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-secondary);
  white-space: nowrap;
}
.tk-cp-tag.warn { color: #9a641c; border-color: #eeddba; background: #fdf6e8; }
.tk-cp-tag.err  { color: #c23a2c; border-color: #f0cbc5; background: #fdf1ef; }
.tk-cp-tag.ok   { color: #178a52; border-color: #c2e7d1; background: #edf8f1; }


.tk-cp { display: block; }
.tk-cp-kv {
  display: flex; gap: 28px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-hover);
}
.tk-cp-kv > div { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.tk-cp-kv span { color: var(--text-secondary); font-size: 12px; }
.tk-cp-kv b { color: var(--text-primary); }
.tk-cp-lb { font-size: 12.5px; color: var(--text-secondary); margin: 10px 0 6px; font-weight: 600; }
.tk-cp-types { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.tk-cp-type {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-primary); cursor: pointer;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-surface);
}
.tk-cp-type:hover { border-color: var(--border-focus); }
.tk-cp-type input { accent-color: var(--accent); margin: 0; }
.tk-cp-text {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg-surface); color: var(--text-primary);
  font: inherit; font-size: 13px; line-height: 1.75; min-height: 110px;
}
.tk-cp-text:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-cp-imgs { display: flex; gap: 10px; flex-wrap: wrap; }
.tk-cp-img { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-hover); }
.tk-cp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-cp-img-del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 1;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 13px;
}
.tk-cp-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tk-cp-row .hint { margin: 0; }








dialog.cdk-picker {
  width: min(780px, 96vw);
}

.cdk-gsel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  padding: 10px 12px;
}
.cdk-gsel-top {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.cdk-gsel-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.cdk-gsel-title::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px;
  background: var(--accent-gradient); flex: none;
}
.cdk-gsel-hint { font-size: 11.5px; color: var(--text-tertiary); line-height: 1.6; }

.cdk-gsel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cdk-gchip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: #FFFFFF; color: var(--text-secondary);
  font: inherit; font-size: 12.5px; white-space: nowrap;
  cursor: pointer; transition: var(--transition);
}
.cdk-gchip:hover { border-color: var(--border-accent); color: var(--accent-2); background: var(--bg-hover); }
.cdk-gchip .ct {
  font-size: 11px; color: var(--text-tertiary);
  background: var(--bg-soft); border-radius: 999px; padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.cdk-gchip.part {
  border-color: var(--border-accent); background: var(--accent-soft); color: var(--accent-2);
}
.cdk-gchip.part .ct { background: rgba(47, 111, 235, .12); color: var(--accent-2); }
.cdk-gchip.on {
  border-color: var(--accent); background: var(--accent); color: #FFFFFF; font-weight: 600;
}
.cdk-gchip.on:hover { background: var(--accent-2); border-color: var(--accent-2); color: #FFFFFF; }
.cdk-gchip.on .ct { background: rgba(255, 255, 255, .22); color: #FFFFFF; }

.cdk-gsel-stat {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.cdk-gsel-stat #cdkGroupStat {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.cdk-gsel-stat .btn.sm { flex: none; height: 26px; padding: 0 11px; font-size: 12px; }

.cdk-gsel-empty {
  flex-basis: 100%;
  font-size: 12px; line-height: 1.7; color: var(--text-tertiary);
  padding: 2px 0;
}










.cdk-fbar {
  margin-top: 10px;
  padding: 9px 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.cdk-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cdk-frow + .cdk-frow {
  margin-top: 9px; padding-top: 9px;
  border-top: 1px dashed var(--border);
}
.cdk-frow #cdkDevSearch { flex: 1 1 200px; min-width: 160px; }

.cdk-fgroup {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-secondary); white-space: nowrap;
}
.cdk-fgroup select {
  height: 32px; min-width: 132px; max-width: 200px;
  padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.cdk-fgroup select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

#cdkDevCountText {
  font-size: 12.5px; color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  margin-left: auto;             
  white-space: nowrap;
}

.cdk-flabel {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap;
}
.cdk-flabel::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--accent-gradient); flex: none;
}

.cdk-fchips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cdk-fchip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: #FFFFFF; color: var(--text-secondary);
  font: inherit; font-size: 12px; white-space: nowrap;
  cursor: pointer; transition: var(--transition);
}
.cdk-fchip:hover { border-color: var(--border-accent); color: var(--accent-2); background: var(--bg-hover); }
.cdk-fchip b {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  background: var(--bg-soft); border-radius: 999px; padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.cdk-fchip.on {
  border-color: var(--accent); background: var(--accent); color: #FFFFFF; font-weight: 600;
}
.cdk-fchip.on:hover { background: var(--accent-2); border-color: var(--accent-2); color: #FFFFFF; }
.cdk-fchip.on b { background: rgba(255, 255, 255, .22); color: #FFFFFF; }
.cdk-fchip:focus-visible { outline: 2px solid var(--border-accent); outline-offset: 1px; }

.cdk-fcustom { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-tertiary); }
.cdk-fcustom input {
  width: 56px; height: 26px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--text-primary);
  font: inherit; font-size: 12px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cdk-fcustom input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.cdk-fcustom input::-webkit-outer-spin-button,
.cdk-fcustom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cdk-fcustom input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.cdk-list-empty {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px; font-size: 12.5px; color: var(--text-tertiary);
}
.cdk-list-empty .btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }


.cdk-rem { color: var(--text-tertiary); }
.cdk-rem.is-expired { color: #c0392b; font-weight: 600; }




.dc-link-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 12px);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f6b5f;
  background: rgba(233, 250, 244, 0.96);
  border: 1px solid #bfe8da;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.dc-link-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #12a37a;
  flex: none;
}
