/* ════════════════════════════════════════════════════════════════════════════
   TOGOO DOCS — STYLESHEET
   Aesthetic: editorial / refined. Sidebar layout, generous whitespace,
   фирменный градиент Togoo (#667eea → #764ba2) — только в акцентах.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand tokens (синхронизированы с landing/admin) */
  --brand-from: #667eea;
  --brand-to: #764ba2;
  --brand-gradient: linear-gradient(135deg, var(--brand-from) 0%, var(--brand-to) 100%);

  /* Surface palette */
  --bg: #fafbfd;
  --surface: #ffffff;
  --surface-soft: #f4f5fa;
  --surface-hover: #eef0f7;

  /* Text */
  --text: #1a1a2e;
  --text-strong: #0f111a;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;

  /* Borders / dividers */
  --border: #e7e9f1;
  --border-strong: #d6d9e3;

  /* Accents */
  --accent: #667eea;
  --accent-soft: rgba(102, 126, 234, 0.08);
  --accent-soft-strong: rgba(102, 126, 234, 0.16);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.10);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.10);

  /* Layout */
  --header-h: 64px;
  --sidebar-w: 280px;
  --content-max: 760px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15, 17, 26, 0.04), 0 1px 3px rgba(15, 17, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 17, 26, 0.06), 0 2px 4px rgba(15, 17, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 17, 26, 0.08), 0 4px 8px rgba(15, 17, 26, 0.04);
}

/* ── Reset & base ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.docs-body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.docs-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.docs-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-strong);
}

.docs-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-gradient);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.30);
  flex-shrink: 0;
}

.docs-logo-text { display: inline-flex; gap: 6px; align-items: baseline; }
.docs-logo-brand {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.docs-logo-product {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
}

/* Search */
.docs-search {
  flex: 1;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.docs-search input[type="search"] {
  width: 100%;
  height: 38px;
  padding: 0 56px 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s ease;
}
.docs-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.docs-search input[type="search"]::-webkit-search-cancel-button { display: none; }

.docs-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--text-subtle);
  stroke-width: 2;
  stroke-linecap: round;
}

.docs-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

.docs-header-nav { display: flex; align-items: center; gap: 16px; }

.docs-link-muted {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.docs-link-muted:hover { color: var(--text); text-decoration: none; }

.docs-link-button {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--brand-gradient);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.30);
}
.docs-link-button:hover { text-decoration: none; transform: translateY(-1px); }

.docs-mobile-burger {
  display: none;
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: space-around;
  padding: 6px;
  cursor: pointer;
}
.docs-mobile-burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.docs-layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  gap: 32px;
  align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 24px 4px 24px 0;
}

.docs-sidebar-inner { display: flex; flex-direction: column; gap: 16px; }

.docs-sidebar-actions { padding-bottom: 8px; }

.docs-tree-empty {
  color: var(--text-subtle);
  font-size: 14px;
  padding: 16px 12px;
}

/* Tree */
.docs-tree { font-size: 14px; }
.docs-tree-list,
.docs-tree-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-tree-sublist {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-top: 4px;
  margin-bottom: 4px;
}

.docs-tree-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.12s ease;
  line-height: 1.4;
}
.docs-tree-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}

.docs-tree-bullet {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.docs-tree-item.is-active > .docs-tree-link {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.docs-tree-item.is-active > .docs-tree-link .docs-tree-bullet {
  background: var(--accent);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.docs-tree-item--lvl0 > .docs-tree-link {
  font-weight: 600;
  color: var(--text);
}

.docs-tree-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main ───────────────────────────────────────────────────────────────── */

.docs-main {
  min-width: 0;
  padding: 24px 0 80px;
}

/* Flash */
.docs-flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.docs-flash {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid;
}
.docs-flash--success { background: var(--success-soft); border-color: rgba(5, 150, 105, 0.25); color: var(--success); }
.docs-flash--error   { background: var(--danger-soft);  border-color: rgba(220, 38, 38, 0.25);  color: var(--danger);  }
.docs-flash--info    { background: var(--accent-soft);  border-color: rgba(102, 126, 234, 0.20); color: var(--accent); }

/* Breadcrumbs */
.docs-breadcrumbs {
  font-size: 13px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.docs-breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.docs-breadcrumbs a:hover { color: var(--accent); }
.docs-breadcrumbs-sep { color: var(--text-subtle); }
.docs-breadcrumbs-current { color: var(--text); font-weight: 500; }

/* Toolbar (admin actions) */
.docs-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.docs-toolbar-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-subtle);
}
.docs-toolbar-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
}
.docs-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: docsPulse 1.6s ease-in-out infinite;
}
@keyframes docsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* Buttons */
.docs-btn-primary,
.docs-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
}
.docs-btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.30);
}
.docs-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.36);
  text-decoration: none;
}
.docs-btn-primary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.docs-btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  text-decoration: none;
}
.docs-btn-danger {
  color: var(--danger);
}
.docs-btn-danger:hover {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.30);
  color: var(--danger);
}

/* ── Article ────────────────────────────────────────────────────────────── */

.docs-article { max-width: var(--content-max); }

.docs-article-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0 0 24px;
}

.docs-article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.docs-article-body h2,
.docs-article-body h3,
.docs-article-body h4 {
  font-family: 'Manrope', sans-serif;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  margin: 2.4em 0 0.6em;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.docs-article-body h2 { font-size: 24px; font-weight: 700; }
.docs-article-body h3 { font-size: 19px; font-weight: 700; }
.docs-article-body h4 { font-size: 16px; font-weight: 700; }

.docs-article-body p { margin: 1em 0; }

.docs-article-body ul,
.docs-article-body ol {
  padding-left: 24px;
  margin: 1em 0;
}
.docs-article-body li { margin: 0.4em 0; }
.docs-article-body li > p:first-child { margin-top: 0; }
.docs-article-body li > p:last-child  { margin-bottom: 0; }

.docs-article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.docs-article-body code {
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  color: #b91c1c;
  border: 1px solid var(--border);
}

.docs-article-body pre {
  background: #1e2235;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.4em 0;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
}
.docs-article-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.docs-article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 18px;
  margin: 1.4em 0;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
.docs-article-body blockquote p:first-child { margin-top: 0; }
.docs-article-body blockquote p:last-child  { margin-bottom: 0; }

.docs-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 1em 0;
  box-shadow: var(--shadow-sm);
}

.docs-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.docs-article-body th,
.docs-article-body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.docs-article-body th {
  background: var(--surface-soft);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  color: var(--text-strong);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.docs-article-body tr:last-child td { border-bottom: 0; }

.docs-article-body kbd {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 7px;
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  color: var(--text);
}

.docs-article-body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2em 0;
}

.docs-article-body mark {
  background: linear-gradient(transparent 60%, rgba(252, 211, 77, 0.5) 60%);
  padding: 0 2px;
  color: inherit;
}

/* ── Children section (sub-pages list) ──────────────────────────────────── */

.docs-children { margin-top: 56px; max-width: var(--content-max); }
.docs-children-heading {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text-strong);
}
.docs-children-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.docs-child-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: all 0.15s ease;
}
.docs-child-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.docs-child-arrow {
  fill: none;
  stroke: var(--text-subtle);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease, stroke 0.15s ease;
}
.docs-child-card:hover .docs-child-arrow {
  stroke: var(--accent);
  transform: translateX(2px);
}

/* ── Edit form ──────────────────────────────────────────────────────────── */

.docs-edit-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.docs-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 24px;
}
.docs-edit-grid > .docs-field:first-child { grid-column: 1 / -1; }

.docs-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.docs-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.docs-field-hint {
  font-weight: 400;
  color: var(--text-subtle);
  font-size: 12px;
}

.docs-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s ease;
  width: 100%;
}
.docs-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.docs-input--title {
  height: 48px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
}

.docs-input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.docs-input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.docs-input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  font-size: 13px;
  border-right: 1px solid var(--border);
}
.docs-input-prefix .docs-input {
  border: 0;
  border-radius: 0;
  flex: 1;
}
.docs-input-prefix .docs-input:focus { box-shadow: none; }

.docs-textarea { display: none; } /* TinyMCE заменит */

.docs-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Index hero ─────────────────────────────────────────────────────────── */

.docs-hero { max-width: var(--content-max); padding: 24px 0 16px; }
.docs-hero-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 12px;
}
.docs-hero-sub { font-size: 18px; color: var(--text-muted); margin: 0 0 28px; }
.docs-hero-empty-cta {
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  margin-bottom: 24px;
}
.docs-hero-empty-cta p { margin: 0 0 14px; color: var(--text-muted); }

.docs-sections-heading {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin: 32px 0 16px;
}
.docs-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.docs-section-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
}
.docs-section-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.docs-section-card-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-strong);
}
.docs-section-card-count {
  font-size: 12px;
  color: var(--text-subtle);
}

/* ── Search results ─────────────────────────────────────────────────────── */

.docs-search-header { margin-bottom: 24px; }
.docs-search-meta { color: var(--text-muted); margin: 8px 0 0; }

.docs-search-results { list-style: none; padding: 0; margin: 0; max-width: var(--content-max); }
.docs-search-result { padding: 16px 0; border-bottom: 1px solid var(--border); }
.docs-search-result:last-child { border-bottom: 0; }

.docs-search-result-link { display: block; text-decoration: none; color: inherit; }
.docs-search-result-link:hover { text-decoration: none; }
.docs-search-result-link:hover .docs-search-result-title { color: var(--accent); }

.docs-search-result-title {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 4px;
  transition: color 0.15s ease;
}
.docs-search-result-snippet {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 4px 0;
}
.docs-search-result-snippet mark {
  background: rgba(252, 211, 77, 0.55);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}
.docs-search-result-url {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-subtle);
}

/* ── Empty / 404 ────────────────────────────────────────────────────────── */

.docs-empty {
  max-width: var(--content-max);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.docs-empty--404 { padding: 80px 24px; }
.docs-empty-code {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(80px, 14vw, 140px);
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}
.docs-empty-title {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 8px;
}
.docs-empty-text { margin: 0 0 24px; color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.docs-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}
.docs-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Modal (для создания страницы) ──────────────────────────────────────── */

.docs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 26, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: docsFadeIn 0.18s ease-out;
}
@keyframes docsFadeIn { from { opacity: 0; } to { opacity: 1; } }

.docs-modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  margin: 16px;
  box-shadow: var(--shadow-lg);
  animation: docsModalIn 0.2s cubic-bezier(0.22, 0.68, 0, 1.2);
}
@keyframes docsModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.docs-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text-strong);
}
.docs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── Admin help icon (для master.html) ──────────────────────────────────── */

.docs-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  margin-left: 10px;
  vertical-align: middle;
  transition: all 0.15s ease;
}
.docs-help-icon:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
  text-decoration: none;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .docs-mobile-burger { display: flex; }
  .docs-search { max-width: 240px; }
  .docs-search-kbd { display: none; }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .docs-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - var(--header-h));
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }
  .docs-sidebar.is-open { transform: translateX(0); }

  .docs-edit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .docs-header-inner { gap: 12px; padding: 0 16px; }
  .docs-search { display: none; }
  .docs-link-muted { display: none; }
  .docs-layout { padding: 0 16px; }
}