/* Страница «Используемые документы» (/knowledge-base — аккордеон).
   Палитра сайта AIprom.by. */

.docs-page .docs-main {
    max-width: 980px;
}

/* ── hero (фиолетовый градиент, как hero главной) ── */
.docs-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 52px 0 56px;
    position: relative;
    overflow: hidden;
}
.docs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 300px at 85% -10%, rgba(255, 255, 255, .16), transparent 60%);
    pointer-events: none;
}
.docs-hero > .container {
    position: relative;
    text-align: center;
}
.docs-hero h1 {
    font-weight: 800;
    letter-spacing: -.02em;
}
.docs-hero .lead {
    color: rgba(255, 255, 255, .88);
    margin-left: auto;
    margin-right: auto;
}
.docs-stat {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 14px;
    color: #fff;
}

/* ── админ-кнопки ── */
.docs-admin-bar {
    row-gap: .35rem;
}
.docs-btn-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 22px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(118, 75, 162, .28);
    transition: box-shadow .2s, transform .2s;
}
.docs-btn-main:hover {
    color: #fff;
    box-shadow: 0 10px 24px rgba(118, 75, 162, .4);
    transform: translateY(-1px);
}
.docs-btn-main:disabled {
    opacity: .65;
    transform: none;
}
.docs-btn-ghost {
    background: #fff;
    color: #764ba2;
    border: 1px solid #d9d4e8;
    border-radius: 50px;
    padding: 9px 20px;
    font-weight: 600;
    transition: border-color .2s, background .2s;
}
.docs-btn-ghost:hover {
    border-color: #a78bfa;
    background: #f8f5ff;
    color: #6d28d9;
}
.docs-btn-ghost:disabled {
    opacity: .65;
}
.docs-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.docs-btn-save:hover {
    color: #fff;
    filter: brightness(1.06);
}
.docs-spin {
    display: inline-block;
    animation: docs-spin-rot .8s linear infinite;
}
@keyframes docs-spin-rot {
    to { transform: rotate(360deg); }
}

/* ── тулбар поиска ── */
.docs-toolbar {
    background: #fff;
    border: 1px solid #e9e8ef;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(49, 46, 129, .05);
}

/* ── аккордеон (вариант A) ── */
.docs-item {
    background: #fff;
    border: 1px solid #e9e8ef;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow .18s, border-color .18s;
}
.docs-item:hover {
    border-color: #c9bcea;
}
.docs-item.open {
    border-color: #a78bfa;
    box-shadow: 0 6px 18px rgba(118, 75, 162, .12);
}
.docs-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}
.docs-num {
    font-size: 12px;
    color: #9ca3af;
    min-width: 28px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.docs-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    flex: 1;
    color: #212529;
    overflow-wrap: anywhere;
}
.docs-badge {
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 10px;
    background: #f1edfb;
    color: #6d28d9;
    white-space: nowrap;
    flex-shrink: 0;
}
.docs-pencil {
    color: #b1a9c9;
    padding: 2px 4px;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    transition: color .15s, background .15s;
}
.docs-pencil:hover {
    color: #6d28d9;
    background: #f1edfb;
}
.docs-chev {
    color: #764ba2;
    transition: transform .2s;
    flex-shrink: 0;
}
.docs-item.open .docs-chev {
    transform: rotate(180deg);
}
.docs-body {
    display: none;
    padding: 0 16px 16px 56px;
    color: #6b7280;
    font-size: 14.5px;
    line-height: 1.6;
}
.docs-item.open .docs-body {
    display: block;
}
.docs-meta {
    font-size: 12.5px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ── модалки ── */
.docs-modal {
    position: fixed;
    inset: 0;
    background: rgba(30, 27, 75, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}
.docs-modal.show {
    display: flex;
}
.docs-modal-card {
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 767px) {
    .docs-body {
        padding-left: 16px;
    }
    .docs-badge {
        display: none;
    }
}
