.as-doc-admin,
.as-doc-front {
    font-family: Arial, sans-serif;
    color: #252525;
}

.as-doc-head,
.as-doc-front-head {
    padding: 12px;
    background: #f3f6f8;
    border: 1px solid #d5dde4;
    border-left: 4px solid #2e7fc1;
    margin-bottom: 12px;
}

.as-doc-head h3,
.as-doc-front-head h1 {
    margin: 0;
}

.as-doc-head p,
.as-doc-front-head p,
.as-doc-small,
.as-doc-meta {
    color: #666;
    margin: 4px 0;
    font-size: 13px;
}

.as-doc-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 12px;
}

.as-doc-sidebar,
.as-doc-box,
.as-doc-item {
    border: 1px solid #d5dde4;
    background: #fff;
    border-radius: 4px;
}

.as-doc-sidebar {
    padding: 8px;
}

.as-doc-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.as-doc-sidebar li {
    margin: 0 0 6px 0;
}

.as-doc-nav,
.as-doc-cat-nav a {
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #edf2f6;
    color: #234;
    text-decoration: none !important;
    border-radius: 4px;
}

.as-doc-footer {
    margin-top: 12px;
    padding: 6px 0;
    background: #f4f4f4;
    border: 1px solid #d5dde4;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.as-doc-nav.active,
.as-doc-cat-nav a.active {
    background: #2e7fc1;
    color: #fff !important;
}

.as-doc-box {
    padding: 12px;
    margin-bottom: 12px;
}

.as-doc-form label,
.as-doc-row-form label {
    display: block;
    font-weight: bold;
    margin: 9px 0 4px;
}

.as-doc-form input[type="text"],
.as-doc-form input[type="number"],
.as-doc-form input[type="file"],
.as-doc-form select,
.as-doc-form textarea,
.as-doc-row-form input[type="text"],
.as-doc-row-form select,
.as-doc-row-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c8d0d8;
    border-radius: 4px;
    padding: 7px;
}

.as-doc-check,
.as-doc-permissions label {
    font-weight: normal !important;
}

.as-doc-permissions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.as-doc-permission-panel {
    margin-top: 8px;
    border: 1px solid #d5dde4;
    border-radius: 4px;
    background: #f8fafb;
}

.as-doc-permission-panel summary {
    padding: 8px 10px;
    cursor: pointer;
    font-weight: bold;
    color: #234;
}

.as-doc-permission-panel .as-doc-permissions {
    padding: 10px;
    border-top: 1px solid #d5dde4;
    background: #fff;
}

.as-doc-button,
.as-doc-row-form button {
    display: inline-block;
    border: 0;
    border-radius: 4px;
    background: #2e7fc1;
    color: #fff !important;
    padding: 8px 11px;
    margin-top: 8px;
    text-decoration: none !important;
    cursor: pointer;
}

.as-doc-button-light {
    background: #e6ebef;
    color: #223 !important;
}

.as-doc-button-danger,
.as-doc-link-danger {
    background: #b84545;
    color: #fff !important;
}

.as-doc-message {
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.as-doc-message-info {
    background: #eef8ff;
    border: 1px solid #aad2ee;
}

.as-doc-message-error {
    background: #fff1f1;
    border: 1px solid #e0a0a0;
}

.as-doc-table {
    width: 100%;
    border-collapse: collapse;
}

.as-doc-table th,
.as-doc-table td {
    border-bottom: 1px solid #e3e7eb;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.as-doc-edit-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) minmax(130px, 1fr) minmax(140px, 1fr) 120px 120px;
    gap: 8px;
    align-items: start;
}

.as-doc-inline-form {
    margin-top: 6px;
}

.as-doc-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.as-doc-cat-nav a {
    display: inline-block;
    margin-bottom: 0;
}

.as-doc-accordion {
    display: grid;
    gap: 10px;
}

.as-doc-category {
    border: 1px solid #d5dde4;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.as-doc-category-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 0;
    background: #edf2f6;
    color: #234;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-weight: bold;
}

.as-doc-category-toggle::after {
    content: "+";
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #c9d3dc;
    color: #2e7fc1;
    text-align: center;
    line-height: 22px;
    font-weight: bold;
}

.as-doc-category-toggle[aria-expanded="true"] {
    background: #2e7fc1;
    color: #fff;
}

.as-doc-category-toggle[aria-expanded="true"]::after {
    content: "-";
    color: #2e7fc1;
}

.as-doc-category-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.as-doc-category-count {
    margin-left: auto;
    color: inherit;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
}

.as-doc-category-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 480ms ease;
}

.as-doc-category-panel-inner {
    padding: 12px;
}

.as-doc-item {
    padding: 12px;
    margin-bottom: 10px;
}

.as-doc-item h2 {
    font-size: 18px;
    margin: 0 0 4px 0;
}

.as-doc-empty {
    padding: 14px;
    border: 1px dashed #ccd4dc;
    background: #f8fafb;
}

@media (max-width: 900px) {
    .as-doc-layout,
    .as-doc-permissions,
    .as-doc-edit-grid {
        grid-template-columns: 1fr;
    }
}
