/* Документация для клиентов (/docs). Токены цвета - из layouts/app.blade.php (:root). */
.dg.main-content { padding: 0; margin-top: 0; flex: 1 0 auto; }
.dg-wrap {
    max-width: 80rem; margin: 0 auto; padding: 24px 16px 40px;
    display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start;
}
@media (min-width: 640px) { .dg-wrap { padding: 24px 24px 48px; } }
@media (min-width: 1024px) { .dg-wrap { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; } }

/* Меню разделов */
.dg-side {
    background: hsl(var(--card)); border: 1px solid hsl(220 20% 94%); border-radius: 24px;
    box-shadow: 1px 17px 44px rgba(3, 2, 41, 0.07), 0 4px 7px rgba(3, 2, 41, 0.04);
    padding: 18px; display: none;
}
.dg-side.open { display: block; }
@media (min-width: 1024px) {
    .dg-side { display: block; position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow-y: auto; }
}
.dg-side-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: hsl(var(--foreground)); margin-bottom: 12px; }
.dg-side-title svg { width: 36px; height: 36px; padding: 8px; border-radius: 9999px; background: hsl(var(--brand) / 0.1); color: hsl(var(--brand)); }
.dg-nav {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
    color: hsl(var(--muted-foreground)); font-size: 13.5px; font-weight: 500; text-decoration: none; margin-bottom: 2px;
}
.dg-nav:hover { background: hsl(var(--secondary-bg)); color: hsl(var(--foreground)); }
.dg-nav.active { background: hsl(var(--brand) / 0.1); color: hsl(var(--brand)); font-weight: 600; }
.dg-nav-num {
    flex: 0 0 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: hsl(var(--secondary-bg)); font-size: 11.5px; font-weight: 700;
}
.dg-nav.active .dg-nav-num { background: hsl(var(--brand)); color: #fff; }
.dg-side-support {
    display: block; margin-top: 14px; text-align: center; padding: 10px 12px; border-radius: 12px;
    background: var(--gradient-brand); color: #fff; font-weight: 600; font-size: 13.5px; text-decoration: none;
}
.dg-menu-btn {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-weight: 600; font-size: 14px;
    background: hsl(var(--card)); border: 1px solid hsl(220 20% 92%); color: hsl(var(--foreground));
}
.dg-menu-btn svg { width: 18px; height: 18px; }
@media (min-width: 1024px) { .dg-menu-btn { display: none; } }

/* Содержимое */
.dg-main { min-width: 0; color: hsl(var(--foreground)); font-size: 15px; line-height: 1.7; }
.dg-crumbs { display: flex; gap: 8px; font-size: 13px; color: hsl(var(--muted-foreground)); margin-bottom: 14px; }
.dg-crumbs a { color: hsl(var(--brand)); text-decoration: none; }
.dg-card, .dg-hero {
    background: hsl(var(--card)); border: 1px solid hsl(220 20% 94%); border-radius: 24px;
    box-shadow: 1px 17px 44px rgba(3, 2, 41, 0.07), 0 4px 7px rgba(3, 2, 41, 0.04);
    padding: 24px; margin-bottom: 20px;
}
@media (min-width: 1024px) { .dg-card, .dg-hero { padding: 32px 36px; } }
.dg-hero h1 { font-size: 30px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.dg-hero p { color: hsl(var(--muted-foreground)); font-size: 16px; }
.dg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dg-btn {
    display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
    text-decoration: none; border: 1px solid hsl(220 20% 90%); color: hsl(var(--foreground)); background: hsl(var(--card));
}
.dg-btn-primary { background: var(--gradient-brand); color: #fff; border: 0; }
.dg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.dg-chips a {
    padding: 6px 12px; border-radius: 9999px; background: hsl(var(--card)); border: 1px solid hsl(220 20% 92%);
    font-size: 13px; color: hsl(var(--foreground)); text-decoration: none;
}
.dg-chips a:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.dg-card h2 { font-size: 22px; font-weight: 800; line-height: 1.25; margin-bottom: 14px; scroll-margin-top: 130px; }
.dg-card h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.dg-card p { margin-bottom: 12px; }
.dg-card p:last-child { margin-bottom: 0; }
.dg-card ul, .dg-card ol { margin: 0 0 14px 22px; }
.dg-card ul { list-style: disc; }
.dg-card ol { list-style: decimal; }
.dg-card li { margin-bottom: 8px; padding-left: 4px; }
.dg-card li::marker { color: hsl(var(--brand)); font-weight: 700; }
.dg-card a { color: hsl(var(--brand)); text-decoration: underline; text-underline-offset: 2px; }
.dg-card strong { font-weight: 700; }
.dg-ui {
    display: inline; padding: 1px 7px; border-radius: 7px; background: hsl(var(--secondary-bg));
    font-weight: 600; font-size: 0.93em; white-space: nowrap;
}

/* Шаги */
.dg-steps { list-style: none !important; margin: 0 0 14px !important; padding: 0; counter-reset: dgstep; }
.dg-steps > li { position: relative; padding: 0 0 14px 46px !important; margin: 0; counter-increment: dgstep; }
.dg-steps > li::before {
    content: counter(dgstep); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 10px;
    background: hsl(var(--brand) / 0.1); color: hsl(var(--brand)); font-weight: 800; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.dg-steps > li > strong { display: block; }
.dg-steps > li > p { margin: 2px 0 0; color: hsl(var(--muted-foreground)); }

/* Карточки в сетке */
.dg-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 6px 0 14px; }
@media (min-width: 768px) { .dg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dg-grid-3 { }
@media (min-width: 1024px) { .dg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dg-item { background: hsl(var(--secondary-bg) / 0.6); border-radius: 16px; padding: 16px 18px; }
.dg-item h3 { margin: 0 0 6px; font-size: 15.5px; }
.dg-item p { margin: 0; font-size: 14px; color: hsl(var(--muted-foreground)); }
a.dg-item { display: block; text-decoration: none !important; color: inherit !important; }
a.dg-item:hover { background: hsl(var(--brand) / 0.08); }

/* Заметки */
.dg-note, .dg-warn, .dg-ok { border-radius: 14px; padding: 14px 18px; margin: 14px 0; font-size: 14.5px; }
.dg-note { background: hsl(var(--brand) / 0.06); border-left: 3px solid hsl(var(--brand)); }
.dg-warn { background: hsl(var(--stat-yellow) / 0.18); border-left: 3px solid hsl(38 95% 55%); }
.dg-ok { background: hsl(var(--stat-green) / 0.1); border-left: 3px solid hsl(var(--stat-green)); }

/* Таблицы */
.dg-table-wrap { overflow-x: auto; margin: 10px 0 14px; }
.dg-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid hsl(220 20% 90%); border-radius: 14px; overflow: hidden; font-size: 14px; }
.dg-table th, .dg-table td { padding: 10px 14px; border-bottom: 1px solid hsl(220 20% 92%); text-align: left; }
.dg-table tr:last-child td { border-bottom: 0; }
.dg-table th { background: hsl(var(--secondary-bg) / 0.7); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: hsl(var(--muted-foreground)); }

/* Назад / далее */
.dg-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.dg-pager-link {
    display: block; padding: 14px 18px; border-radius: 16px; background: hsl(var(--card)); border: 1px solid hsl(220 20% 92%);
    text-decoration: none; color: hsl(var(--foreground));
}
.dg-pager-link:hover { border-color: hsl(var(--brand)); }
.dg-pager-next { text-align: right; }
.dg-pager-label { display: block; font-size: 12px; color: hsl(var(--muted-foreground)); }
.dg-pager-title { display: block; font-weight: 700; font-size: 14.5px; }
