:root {
  --bg: #101114;
  --sidebar: #0a0b0e;
  --panel: #16181d;
  --ink: #f2f3f5;
  --muted: #8a8f9a;
  --line: #3a3e48;
  --blue: #2563eb;
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #dc2626;
  --orange: #ea580c;
  --r: 0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; }
a { color: var(--blue); }
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.nav { background: var(--sidebar); padding: 18px 12px 28px; border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; margin: 0 8px 22px; color: #fff; letter-spacing: .02em; }
.logo img { width: 38px; height: 38px; object-fit: cover; display: block; background: #050506; border: 1px solid #3a3e48; flex: none; }
.login .logo { margin: 0 0 8px; font-size: 20px; }
.login .logo img { width: 56px; height: 56px; }
.nav-sec { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; color: #c5c9d4; text-decoration: none; padding: 9px 12px; border-radius: 0; margin-bottom: 0; border-left: 3px solid transparent; }
.nav a svg { width: 16px; height: 16px; opacity: .85; flex: none; }
.nav a.active, .nav a:hover { background: #1d4ed8; color: #fff; border-left-color: #93c5fd; }
.nav .out { margin-top: 20px; color: var(--muted); font-size: 13px; }
.nav .out:hover { background: #252833; color: #fff; }
main { padding: 20px 22px 48px; min-width: 0; }
h1 { font-size: 22px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats.pair { grid-template-columns: 1fr 1fr; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 12px 14px 14px; border-top: 3px solid var(--blue); }
.stat.g { border-top-color: var(--green); }
.stat.y { border-top-color: var(--yellow); }
.stat.r { border-top-color: var(--red); }
.stat small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.stat b { font-size: 28px; font-weight: 700; }
.load-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.load-bar { height: 8px; background: #1c1f28; border: 1px solid var(--line); margin-top: 8px; overflow: hidden; }
.load-bar > i { display: block; height: 100%; background: var(--green); }
.stat.y .load-bar > i { background: var(--yellow); }
.stat.r .load-bar > i { background: var(--red); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 140px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: #252833; color: #d1d5db; border: 1px solid var(--line); border-radius: 0; padding: 8px 12px; cursor: pointer; font: inherit; }
.tab.on { background: #1d4ed8; color: #fff; }
.btn, button {
  background: var(--green); color: #052e16; border: 1px solid #14532d; border-radius: 0;
  padding: 8px 12px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font: inherit;
}
.btn.ghost, button.ghost { background: #252833; color: var(--ink); border-color: var(--line); }
.btn.blue, button.blue { background: var(--blue); color: #fff; border-color: #1e40af; }
.btn.red, button.red, button.danger { background: var(--red); color: #fff; border-color: #991b1b; }
.btn.yellow { background: var(--yellow); color: #1c1403; border-color: #854d0e; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.stack { display: grid; gap: 12px; max-width: 760px; }
.seo-form { max-width: none; display: block; }
.seo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seo-head h1 { margin: 0; font-size: 20px; }
.seo-grid { display: grid; grid-template-columns: 1fr 280px; gap: 14px; align-items: start; }
.sec { background: var(--panel); border: 1px solid var(--line); border-radius: 0; margin-bottom: 12px; overflow: hidden; }
.sec > summary, .sec-h { list-style: none; cursor: pointer; background: #161922; padding: 10px 14px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }
.sec > summary::-webkit-details-marker { display: none; }
.sec .body { padding: 14px; display: grid; gap: 10px; }
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; }
.cats label { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; }
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; max-height: 240px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 0; background: #12141a; }
.city-grid label { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; }
.loc-block { display: grid; gap: 8px; }
.loc-picker { display: grid; gap: 8px; }
.loc-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.loc-picked { color: var(--ink); }
.loc-filter { max-width: 260px; }
.loc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 0; background: #12141a; }
.loc-card { background: #1c1f28; color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 9px 6px; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.2; }
.loc-card.on { background: #1d4ed8; color: #fff; border-color: #3b82f6; }
.loc-semt { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 0; background: #12141a; }
.loc-chip { background: #252833; color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 4px 8px; font-size: 11px; font-weight: 600; }
.field-ai { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; position: relative; }
.field-ai.has-marks { grid-template-columns: 1fr auto; }
.field-ai.has-marks.with-ai { grid-template-columns: 1fr auto auto; }
.field-ai button { white-space: nowrap; font-size: 12px; }
.field-ai .js-marks { width: 38px; min-height: 38px; font-size: 16px; padding: 0; }
.mark-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 24;
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 8px;
  background: #0f1218;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.mark-pop[hidden] { display: none; }
.mark-pop .mark-i {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  background: #1c1f28;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1;
}
.mark-pop .mark-i:hover { background: #1d4ed8; color: #fff; }
.ribbon { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ribbon .btn, .ribbon button, .ribbon a.btn { font-size: 12px; border-radius: 0; padding: 8px 10px; }
.rail { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 14px; display: grid; gap: 12px; position: sticky; top: 16px; }
.rail h3 { margin: 0; font-size: 13px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 13px; }
.switch input { width: 18px; height: 18px; }
@media (max-width: 1100px) {
  .seo-grid { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .rail { position: static; }
}
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  background: #12141a; border: 1px solid var(--line); color: var(--ink);
  border-radius: 0; padding: 9px 11px; font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
.plain-intro { min-height: 420px; font-size: 15px; line-height: 1.65; font-family: inherit; }
.h1-field { font-size: 20px !important; font-weight: 800 !important; color: #fff !important; }
.article-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.article-tools .ghost { padding: 6px 10px; font-size: 12px; }
.article-edit {
  min-height: 420px;
  max-height: 70vh;
  overflow: auto;
  background: #0f1116;
  border: 1px solid var(--line);
  padding: 16px 18px 28px;
  line-height: 1.65;
  color: #e8eaed;
  font-size: 15px;
}
.article-edit:focus { outline: 1px solid #2563eb; }
.article-edit h1, .article-edit h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin: 22px 0 10px;
  color: #fff;
}
.article-edit h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: #fbbf24;
}
.article-edit p { margin: 0 0 12px; }
.article-edit ul { margin: 0 0 12px; padding-left: 18px; }
.flash { padding: 10px 12px; border-radius: 0; background: #1e3a2f; margin: 12px 0; white-space: pre-wrap; }
.flash.err { background: #3a1e1a; }
.badge { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 0; border: 1px solid var(--line); background: #252833; color: var(--muted); }
.badge.on { background: #14532d; color: #86efac; }
.badge.off { background: #3f1d1d; color: #fca5a5; }
.badge.ready { color: #86efac; background: #14532d; }
.badge.deployed { color: #86efac; background: #14532d; }
.badge.draft { color: #e5e7eb; }
.badge.paused { color: #fcd34d; background: #3b2f0a; }
#toasts {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  background: #1e3a2f;
  border: 1px solid #14532d;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: pre-wrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: toast-in .14s ease-out;
}
.toast.err { background: #3a1e1a; border-color: #991b1b; }
.toast.out { opacity: 0; transform: translateX(16px); transition: opacity .18s, transform .18s; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
.pill { display: inline-block; background: #1d4ed8; color: #fff; border-radius: 0; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 0; background: var(--panel); }
table.dom { width: 100%; border-collapse: collapse; min-width: 760px; }
table.dom td:last-child, table.dom th:last-child { position: sticky; right: 0; background: var(--panel); }
table.dom th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.dom td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.dom tr:hover td { background: #22262f; }
input.js-wa { width: 168px; max-width: 34vw; font: inherit; font-size: 13px; color: inherit; background: #16181e; border: 1px solid var(--line); padding: 7px 8px; }
table.dom tr:hover input.js-wa { background: #22262f; }
input.js-wa:focus { outline: 1px solid #3b82f6; border-color: #3b82f6; }
.dom-name { font-weight: 700; color: #fff; }
.dom-meta { color: var(--muted); font-size: 12px; margin-top: 3px; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico-btn { width: 28px; height: 28px; padding: 0; justify-content: center; background: #252833; color: #d1d5db; border-radius: 0; border: 1px solid var(--line); }
.ico-btn:hover { background: #1d4ed8; color: #fff; }
.ico-btn.danger { background: #3f1d1d; color: #fca5a5; }
.ico-btn.cf { background: #f97316; color: #fff; }
.ico-btn.cp { background: #c2410c; color: #fff; }
.ico-btn.idx { background: #0f766e; color: #fff; }
.ico-btn.cf:hover { background: #fb923c; color: #fff; }
.ico-btn.cp:hover { background: #ea580c; color: #fff; }
.ico-btn.idx:hover { background: #14b8a6; color: #fff; }
.btn.idx { background: #0f766e; color: #fff; }
.ico-btn.busy { opacity: .55; }
.btn.cf { background: #f97316; color: #fff; }
.btn.cp { background: #c2410c; color: #fff; }
.acts { display: flex; gap: 4px; flex-wrap: nowrap; }
table.dom td:nth-child(2) svg { width: 18px; height: 18px; color: var(--blue); display: block; }
.acts .ico-btn svg, .row .ico-btn svg, .rail .ico-btn svg { width: 15px; height: 15px; color: currentColor; display: block; }
.search { width: 220px; }
.steps { list-style: none; padding: 0; }
.steps li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ok { color: var(--green); }
.no { color: var(--red); }
.login { min-height: 100vh; display: grid; place-items: center; }
.login .card { width: min(420px, 92vw); }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--sidebar); }
.site-bar .logo { margin: 0; }
.site-hero { flex: 1; max-width: 980px; margin: 0 auto; padding: 56px 24px 40px; }
.site-hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
.site-hero-uf { display: flex; align-items: stretch; justify-content: center; max-width: none; width: 100%; padding: 0; overflow: hidden; min-height: calc(100vh - 72px); }
.site-hero-uf h1 { font-size: clamp(64px, 18vw, 220px); line-height: 0.9; margin: 0; letter-spacing: -0.06em; text-align: center; font-weight: 800; white-space: nowrap; }
.site-hero-photo { width: 100%; height: 100%; min-height: calc(100vh - 72px); object-fit: cover; object-position: center; display: block; }
.site-hero .lead { font-size: 16px; max-width: 560px; }
.site-hero .row { margin-top: 22px; }
.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.site-grid .card { min-height: 140px; }
.site-grid h3 { margin: 0 0 8px; font-size: 15px; }
.site-foot { border-top: 1px solid var(--line); padding: 16px 28px; color: var(--muted); font-size: 12px; }
@media (max-width: 800px) { .site-grid { grid-template-columns: 1fr; } .site-bar { padding: 14px 16px; } .site-hero-uf h1 { white-space: normal; } }
.login .card { width: min(420px, 92vw); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.selcount { color: var(--muted); font-size: 13px; min-width: 70px; }
.crumb { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 6px; }
.alert-bar { background: #3a1717; border: 1px solid #7f1d1d; padding: 12px 14px; border-radius: 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: #12141a; color: #d1d5db; padding: 8px 12px; border-radius: 0; cursor: pointer; font: inherit; }
.chip.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.drop { border: 1px dashed var(--line); padding: 28px; text-align: center; border-radius: 0; color: var(--muted); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .ph { position: relative; border: 2px solid transparent; }
.thumbs .ph.vitrin-on { border-color: #c9a227; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 0; display: block; }
.thumbs button.del { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; background: #7f1d1d; color: #fff; }
.thumbs button.pick { position: absolute; left: 2px; bottom: 2px; top: auto; right: auto; width: auto; height: 20px; padding: 0 6px; font-size: 10px; background: #252833; color: #e5e7eb; }
.thumbs .ph.vitrin-on .pick { background: #c9a227; color: #1a1408; }
.progress { height: 6px; background: #252833; border-radius: 0; overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: #3b82f6; }
.boost-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb-name { display: flex; gap: 10px; align-items: center; }
.thumb-name .sq { width: 36px; height: 36px; border-radius: 0; background: #1d4ed8; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.thumb-name img { width: 36px; height: 36px; object-fit: cover; }
.level-platin { background: #134e4a; color: #5eead4; }
.level-gold { background: #3b2f0a; color: #fcd34d; }
.level-silver { background: #1f2937; color: #d1d5db; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 980px) {
  .boost-grid, .three { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .nav { display: block; }
  .stats { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
}
.api-sec { max-width: none; margin-bottom: 22px; }
.api-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.api-hd h2 { margin: 0; font-size: 18px; }
.srv { background: #161922; border: 1px solid var(--line); border-radius: 0; padding: 14px; margin: 12px 0; }
.srv-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.srv-top strong { font-size: 15px; }
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sw input { width: 16px; height: 16px; }
.hint { background: #3b2f0a; border: 1px solid #854d0e; color: #fde68a; padding: 10px 12px; border-radius: 0; font-size: 13px; line-height: 1.45; }
.flow { color: var(--muted); font-size: 13px; padding-left: 18px; margin: 10px 0 0; }
.flow li { margin: 6px 0; }
.flow code { color: var(--ink); font-size: 12px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 18px; width: min(460px, 100%); }
.modal h3 { margin: 0 0 8px; }
.pick { display: grid; gap: 8px; margin: 12px 0; }
.pick label { display: flex; align-items: center; gap: 8px; background: #12141a; border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; color: var(--ink); }
.settings-wide { max-width: none; }

