:root {
  --dsh-bg: #121417;
  --dsh-panel: #1b1e22;
  --dsh-line: #2c3138;
  --dsh-text: #e8eaed;
  --dsh-muted: #9aa0a6;
  --dsh-gold: #c9a227;
  --dsh-gold-2: #e0c15a;
  --dsh-top: 40px;
  --dsh-dock: 46px;
  --dsh-side: 240px;
}
* { box-sizing: border-box; }
html, body.dsh-front {
  margin: 0;
  background: var(--dsh-bg);
  color: var(--dsh-text);
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--dsh-gold-2); }
.dsh-top {
  position: sticky; top: 0; z-index: 20;
  height: var(--dsh-top);
  background: #0e1012;
  border-bottom: 1px solid var(--dsh-line);
}
.dsh-top__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 12px; height: 100%;
}
.dsh-top nav { display: flex; gap: 12px; align-items: center; }
.dsh-top a { text-decoration: none; font-size: 12px; }
.dsh-app {
  display: grid;
  grid-template-columns: var(--dsh-side) minmax(0, 1fr) var(--dsh-side);
  height: calc(100vh - var(--dsh-top) - var(--dsh-dock));
}
.dsh-filters {
  border-right: 1px solid var(--dsh-line);
  background: var(--dsh-panel);
  padding: 10px 10px 16px;
  overflow: auto;
  min-width: 0;
}
.dsh-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dsh-filters h1 { font-size: 13px; margin: 0; }
.dsh-filters h2, .dsh-filters summary {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dsh-muted); margin: 10px 0 6px; cursor: pointer;
}
.dsh-filters details { margin: 0; }
.dsh-search, .dsh-field, .dsh-range { display: block; margin-bottom: 8px; color: var(--dsh-muted); font-size: 11px; }
.dsh-search input, .dsh-field select, .dsh-facet select, .dsh-range input, .dsh-dock select {
  width: 100%; margin-top: 3px;
  background: #111; color: var(--dsh-text);
  border: 1px solid var(--dsh-line); border-radius: 4px; padding: 5px 8px;
  font-size: 12px;
}
.dsh-range div { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dsh-facet { margin-bottom: 6px; }
.dsh-facet label { display: block; font-size: 11px; color: var(--dsh-muted); }
.dsh-facet select[multiple] { min-height: 64px; }
.dsh-sites-on {
  position: absolute; left: 6px; bottom: 52px; z-index: 2;
  font-size: 9px; background: rgba(0,0,0,.72); color: #e0c15a;
  padding: 2px 6px; border-radius: 3px; max-width: calc(100% - 12px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.dsh-origin {
  position: absolute; right: 6px; top: 118px; z-index: 2;
  font-size: 9px; font-weight: 700; letter-spacing: .02em;
  background: rgba(18, 20, 23, .88); color: #fff;
  padding: 2px 6px; border-radius: 3px; max-width: calc(100% - 12px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}
.dsh-role {
  position: absolute; top: 28px; left: 26px; z-index: 2;
  font-size: 9px; background: #3a2a10; color: #e0c15a;
  padding: 1px 5px; border-radius: 3px; pointer-events: none;
}
.dsh-role--alias { background: #333; color: #bbb; }
.dsh-ov { position: absolute; top: 46px; right: 6px; z-index: 2;
  font-size: 9px; background: #5a2018; color: #f3c2c8; padding: 1px 5px; border-radius: 3px; }
.dsh-warn {
  display: none;
  background: #3a1518; color: #f3c2c8; border: 1px solid #6a2a32;
  border-radius: 6px; padding: 8px 10px; font-size: 12px; margin: 8px 0;
}
.dsh-warn.is-on { display: block; }
.dsh-src { margin: 0 0 8px; font-size: 11px; color: var(--dsh-muted); }
.dsh-seo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0;
}
.dsh-seo-grid label, .dsh-modal .dsh-field { display: block; font-size: 12px; color: var(--dsh-muted); }
.dsh-seo-grid input, .dsh-modal textarea {
  width: 100%; margin-top: 3px;
  background: #111; color: var(--dsh-text);
  border: 1px solid var(--dsh-line); border-radius: 4px; padding: 5px 8px;
}
.dsh-main {
  padding: 8px 12px 10px;
  overflow: auto;
  min-width: 0;
}
.dsh-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  margin-bottom: 8px;
}
.dsh-toolbar p { margin: 0; color: var(--dsh-muted); font-size: 12px; }
.dsh-checkall { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.dsh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.dsh-card {
  position: relative;
  background: var(--dsh-panel);
  border: 1px solid var(--dsh-line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.dsh-card.is-on { border-color: var(--dsh-gold); box-shadow: 0 0 0 1px var(--dsh-gold); }
.dsh-card img, .dsh-ph {
  display: block; width: 100%; height: 148px; object-fit: cover; background: #0a0b0c;
}
.dsh-ph { display: flex; align-items: center; justify-content: center; color: #555; font-size: 11px; }
.dsh-card__body { padding: 5px 7px 7px; }
.dsh-card__name { font-weight: 600; margin: 0 0 1px; font-size: 12px; line-height: 1.25; }
.dsh-card__meta { margin: 0; font-size: 11px; color: var(--dsh-muted); }
.dsh-card input[type=checkbox] {
  position: absolute; top: 6px; left: 6px; width: 16px; height: 16px;
  accent-color: var(--dsh-gold); z-index: 2;
}
.dsh-langs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-bottom: 8px;
}
.dsh-langs button {
  background: var(--dsh-panel); color: var(--dsh-text);
  border: 1px solid var(--dsh-line); border-radius: 4px;
  padding: 5px 10px; cursor: pointer; font-size: 12px;
}
.dsh-langs button.is-on {
  border-color: var(--dsh-gold); background: #2a2414; color: var(--dsh-gold-2);
  font-weight: 700;
}
.dsh-langs button:disabled { opacity: .4; cursor: not-allowed; }
.dsh-lang {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  background: rgba(0,0,0,.72); color: #fff;
  padding: 2px 6px; border-radius: 3px;
  pointer-events: none;
}
.dsh-lang--de { background: rgba(201,162,39,.92); color: #111; }
.dsh-lang--en { background: rgba(70,110,180,.92); color: #fff; }
.dsh-lang--ru { background: rgba(160,50,50,.92); color: #fff; }
.dsh-badge {
  position: absolute; top: 28px; right: 6px;
  font-size: 9px; background: #000a; color: #fff; padding: 1px 5px; border-radius: 4px;
}
.dsh-pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dsh-pager button {
  background: var(--dsh-panel); color: var(--dsh-text); border: 1px solid var(--dsh-line);
  border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 12px;
}
.dsh-pager button.is-on, .dsh-pager button:hover { border-color: var(--dsh-gold); }
.dsh-btn {
  background: #2a3038; color: #fff; border: 0; border-radius: 4px;
  padding: 5px 10px; cursor: pointer; font-size: 12px;
}
.dsh-btn--ghost { background: transparent; border: 1px solid var(--dsh-line); }
.dsh-btn--gold { background: var(--dsh-gold); color: #111; font-weight: 700; }
.dsh-btn:disabled { opacity: .45; cursor: not-allowed; }
.dsh-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--dsh-dock);
  background: #0e1012; border-top: 1px solid var(--dsh-line);
  display: flex; flex-wrap: nowrap; gap: 12px; align-items: center;
  padding: 0 12px;
}
.dsh-dock__sel { display: flex; gap: 8px; align-items: center; white-space: nowrap; font-size: 12px; }
.dsh-dock__go { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.dsh-dock__go select { width: auto; min-width: 148px; margin-top: 0; }
.dsh-sites {
  border-left: 1px solid var(--dsh-line);
  background: var(--dsh-panel);
  padding: 10px 10px 16px;
  overflow: auto;
  min-width: 0;
}
.dsh-sites__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dsh-sites__list label {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.dsh-sites__list label:hover { background: #22262c; }
.dsh-sites__list label.is-off { display: none; }
.dsh-sites__list input { margin-top: 2px; accent-color: var(--dsh-gold); flex-shrink: 0; }
.dsh-sites__list small { display: block; font-size: 10px; }
.dsh-muted { color: var(--dsh-muted); }
.dsh-dock__msg {
  position: absolute; right: 12px; bottom: calc(var(--dsh-dock) + 6px);
  margin: 0; color: var(--dsh-gold-2); font-size: 12px;
  background: #0e1012; border: 1px solid var(--dsh-line); padding: 4px 8px; border-radius: 4px;
}
.dsh-empty { color: var(--dsh-muted); padding: 24px 8px; }
.dsh-user { color: var(--dsh-muted); font-size: 12px; }
.dsh-modal[hidden] { display: none; }
.dsh-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.62);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 12px 80px;
  overflow: auto;
}
.dsh-modal__box {
  width: min(1080px, 100%);
  background: var(--dsh-panel);
  border: 1px solid var(--dsh-line);
  border-radius: 10px;
  padding: 14px 16px 12px;
}
.dsh-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dsh-modal__head h2 { margin: 0; font-size: 16px; }
.dsh-modal__foot {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px;
  position: sticky; bottom: 0; background: var(--dsh-panel); padding-top: 8px;
}
.dsh-dup-sum { margin: 8px 0 12px; font-size: 13px; }
.dsh-dup-group {
  border: 1px solid var(--dsh-line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.dsh-dup-group h3 { margin: 0 0 8px; font-size: 13px; }
.dsh-dup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dsh-dup-card {
  width: 148px;
  background: #121417;
  border: 1px solid var(--dsh-line);
  border-radius: 8px;
  overflow: hidden;
}
.dsh-dup-card.is-keep { border-color: var(--dsh-gold); }
.dsh-dup-card img, .dsh-dup-card .dsh-ph { height: 120px; }
.dsh-dup-card label {
  display: flex; gap: 6px; align-items: center;
  padding: 6px 8px; font-size: 11px; cursor: pointer;
}
.dsh-dup-card .dsh-card__meta { padding: 0 8px 8px; }
.dsh-dup-card a { font-size: 11px; margin: 0 8px 8px; display: inline-block; }
.dsh-front--login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dsh-login {
  width: 100%;
  max-width: 380px;
  background: var(--dsh-panel);
  border: 1px solid var(--dsh-line);
  border-radius: 12px;
  padding: 28px 26px 24px;
}
.dsh-login__brand {
  margin: 0 0 4px;
  color: var(--dsh-gold);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dsh-login h1 { margin: 0 0 8px; font-size: 22px; }
.dsh-login form { margin-top: 16px; }
.dsh-login .dsh-field { margin-bottom: 14px; }
.dsh-login__go { width: 100%; margin-top: 14px; padding: 10px 12px; }
.dsh-login__err {
  background: #3a1518;
  color: #f3c2c8;
  border: 1px solid #6a2a32;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}
@media (max-width: 960px) {
  .dsh-app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - var(--dsh-top) - var(--dsh-dock));
  }
  .dsh-filters { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--dsh-line); }
  .dsh-sites { max-height: 280px; border-left: 0; border-top: 1px solid var(--dsh-line); }
  .dsh-dock { flex-wrap: wrap; height: auto; min-height: var(--dsh-dock); padding: 6px 10px; }
}
