/* ========================================
   Content Layout (legacy)
   ======================================== */

main.col-md-9.ms-sm-auto.col-lg-10 {
    margin-top: var(--header-height) !important;
    margin-left: var(--sidebar-width) !important;
    margin-right: 0 !important;
    min-height: calc(100vh - var(--header-height)) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100% - var(--sidebar-width)) !important;
    position: relative;
    background: var(--bg-light);
    border: none;
    padding: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

.admin-content-container {
    background: var(--bg-light);
    margin: 0;
    min-height: calc(100vh - 32px);
    border: none;
    position: relative;
    padding: 1rem 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

body .container-fluid,
body .container-fluid > .row {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.sidebar.collapsed ~ .container-fluid main.col-md-9.ms-sm-auto.col-lg-10 {
    margin-left: var(--sidebar-collapsed-width) !important;
    width: calc(100% - var(--sidebar-collapsed-width)) !important;
}

.page-breadcrumbs-wrapper {
    background: transparent;
    padding: 0.375rem 0;
    margin: 0 0 1rem 0;
    border-bottom: none;
}

.page-breadcrumbs-wrapper .container-fluid {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.page-breadcrumbs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 28px;
}

.page-breadcrumbs {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.page-breadcrumbs .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.5;
}

.page-breadcrumbs .breadcrumb-item {
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "|";
    display: inline-block;
    padding: 0 0.5rem;
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1;
}

.page-breadcrumbs .breadcrumb-item a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s ease;
    font-size: 0.875rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.page-breadcrumbs .breadcrumb-item a i {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.page-breadcrumbs .breadcrumb-item a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.page-breadcrumbs .breadcrumb-item.active {
    color: #111827;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.page-breadcrumbs .breadcrumb-item.active i {
    font-size: 15px;
    color: #6b7280;
    opacity: 0.9;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.page-breadcrumbs-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}


@media (max-width: 768px) {
    .page-breadcrumbs-wrapper {
        padding: 0.375rem 0;
        border-bottom: none;
    }

    .page-breadcrumbs-wrapper .container-fluid {
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .admin-content-container {
        padding-top: 0.75rem;
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-breadcrumbs-wrapper {
        margin-bottom: 0.75rem;
    }

    .page-breadcrumbs-container {
        gap: 12px;
        min-height: 24px;
    }

    .page-breadcrumbs .breadcrumb {
        font-size: 0.8125rem;
    }

    .page-breadcrumbs .breadcrumb-item.active i {
        font-size: 14px;
        margin-right: 0.375rem;
    }

    .page-breadcrumbs-actions {
        gap: 6px;
    }

    // На мобильных устройствах скрываем текст в breadcrumbs, оставляем только иконки
    .page-breadcrumbs .breadcrumb-item a,
    .page-breadcrumbs .breadcrumb-item.active {
        font-size: 0;
        line-height: 0;
        padding: 0.25rem 0;
    }

    .page-breadcrumbs .breadcrumb-item a span,
    .page-breadcrumbs .breadcrumb-item.active span {
        display: none;
    }

    .page-breadcrumbs .breadcrumb-item a i,
    .page-breadcrumbs .breadcrumb-item.active i {
        font-size: 14px;
        margin-right: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
    }

    .page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
        content: "|";
        padding: 0 0.375rem;
        font-size: 0.7rem;
    }

    .page-breadcrumbs-container {
        gap: 8px;
    }

    .page-breadcrumbs-container {
        gap: 8px;
    }
}

.admin-footer {
    background: transparent;
    border-top: 1px solid #dee2e6;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 15px 0;
    margin-top: 20px;
}

.admin-footer .container-fluid {
    padding: 0 20px;
}

.admin-footer .text-muted {
    color: #6c757d !important;
    font-size: 13px;
    margin-bottom: 0;
}

.admin-footer .fas {
    color: var(--primary-color);
}

.admin-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.admin-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    main.col-md-9.ms-sm-auto.col-lg-10 {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-content-container {
        padding-top: 0.75rem;
        padding-left: 12px;
        padding-right: 12px;
    }

    .admin-footer {
        margin-left: 0;
        width: 100%;
    }

    .admin-footer .col-md-6:last-child {
        display: none;
    }
}
