@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Header styles for catalog and product pages - reusing Landing styles structure */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left,
.header-right {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    letter-spacing: -0.2px;
}

.header-item svg {
    flex-shrink: 0;
}

.header-item:hover {
    color: #1f2a44;
    text-decoration: none;
}

.header-phone {
    color: #6a62e4;
}

.header-phone:hover {
    color: #5a52d4;
}

@media (max-width: 600px) {
    .header-content {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-left,
    .header-right {
        gap: 16px;
    }
    
    .header-item {
        font-size: 14px;
        gap: 6px;
    }
    
    .header-item svg {
        width: 18px;
        height: 18px;
    }
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Исключаем landing-wrap из общего стиля h1 */
.landing-wrap h1 {
    font-size: unset;
    font-weight: unset;
    color: unset;
    margin-bottom: unset;
    margin-top: unset;
    line-height: unset;
    letter-spacing: unset;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }


.btn-group {
    margin-right: 18px;
    margin-bottom: 10px;
}

.PaySubmit {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.countView {
    width: 100px;
    color: #0d6efd;
    border-color: #0d6efd;
}

.order-button {
    width: 40px;
    color: #0d6efd;
    border-color: #0d6efd;
}

.table-report{
    width: 600px;
    margin-top: 30px;
}

.date {
    color: #0d6efd;
    border-color: #0d6efd;
    margin-right: 20px;
}

.search {
    color: #0d6efd;
    border-color: #0d6efd;
    margin-bottom: 10px;
}

.login {
    width: 100%;
    color: #0d6efd;
    border-color: #0d6efd;
}

.extinguished-status {
    color: #28a745; /* Зеленый цвет */
}

.expired-status {
    color: red;
}

.in-progress-with-delay-status {
    color: #ffc107; /* Желтый цвет */
}

/* Стили для кнопки "Информация" */
.btn-info {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-info:hover {
    color: #0a58ca;
    border-color: #0a58ca;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Стили для кнопки "Погасить" */
.btn-payoff {
    border-color: #000000;
}

.btn-payoff:hover {
    border-color: #212529;
    background-color: rgba(0, 0, 0, 0.05);
}
/* _content/CreditPayments/Shared/MainLayout.razor.rz.scp.css */
.page[b-02r78ygjwc] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-02r78ygjwc] {
    flex: 1;
}

.sidebar[b-02r78ygjwc] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-02r78ygjwc] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-02r78ygjwc] a, .top-row .btn-link[b-02r78ygjwc] {
        white-space: nowrap;
        margin-left: 1.5rem;
    }

.top-row a:first-child[b-02r78ygjwc] {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
    .top-row:not(.auth)[b-02r78ygjwc] {
        display: none;
    }

    .top-row.auth[b-02r78ygjwc] {
        justify-content: space-between;
    }

    .top-row a[b-02r78ygjwc], .top-row .btn-link[b-02r78ygjwc] {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-02r78ygjwc] {
        flex-direction: row;
    }

    .sidebar[b-02r78ygjwc] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-02r78ygjwc] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row[b-02r78ygjwc], article[b-02r78ygjwc] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    /* Скрываем mobile-header на десктопе */
    main .mobile-header {
        display: none !important;
    }

    /* Убираем отступ сверху для контента на десктопе */
    main {
        padding-top: 0 !important;
    }
}
/* _content/CreditPayments/Shared/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-r6l2utf6yd] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-r6l2utf6yd] {
    height: 3.5rem;
    background-color: #0d0d0d;
}

.oi[b-r6l2utf6yd] {
    width: 2rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.nav-item[b-r6l2utf6yd] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type[b-r6l2utf6yd] {
    padding-top: 1rem;
}

.nav-item:last-of-type[b-r6l2utf6yd] {
    padding-bottom: 1rem;
}

.nav-item[b-r6l2utf6yd] a {
    color: #d7d7d7;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
}

    .nav-item[b-r6l2utf6yd] a.active {
        background-color: rgb(1, 176, 117);
        color: white;
        border-radius: 5px; /* ����������� ���� (�����������) */
        padding: 10px 20px; /* ���������� ������ ��� ������ */
        box-shadow: 0 0 15px rgba(1, 176, 117, 0.5), /* ���� �������� �������� */
                    0 0 40px rgba(1, 176, 117, 0.3); /* ������� ���� ����� � ������� �������������� */
        transition: 0.3s ease-in-out;
    }

    @keyframes glow {
        from {
            box-shadow: 0 0 5px rgb(1, 176, 117), 0 0 10px rgb(1, 176, 117), 0 0 15px rgb(1, 176, 117);
        }

        to {
            box-shadow: 0 0 20px rgb(1, 176, 117), 0 0 30px rgb(1, 176, 117), 0 0 40px rgb(1, 176, 117);
        }
    }

    .nav-item[b-r6l2utf6yd] a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* ��������� ������ ��������� ��� ������ � ������� active */
    .nav-item[b-r6l2utf6yd] a.active:hover {
        background-color: rgb(1, 176, 117); /* ������������� ��� �� ����, ��� � � �������� ������ */
        color: white; /* ��������� ���� ������ */
    }

@media (min-width: 641px) {
    .navbar-toggler[b-r6l2utf6yd] {
        display: none;
    }

    .collapse[b-r6l2utf6yd] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .nav-scrollable[b-r6l2utf6yd] {
        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
        background: #171717;
    }
}


.products-container {
    padding: 20px 0;
}

.control-panel {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
}

.product-card {
    border: 1px solid #dee2e6;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f0f0f0;
}

.product-image-container {
    background-color: #f8f9fa;
    min-height: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.custom-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    margin-right: 0.5em;
}

/* ��������� ������ ��� ������ */
.card-title {
    font-size: 1.25rem;
    color: #212529;
    letter-spacing: -0.01em;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.category-name {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.category-text {
    color: #6c757d;
    font-weight: 500;
}

.price-tag {
    margin-top: 0.75rem;
}

.price-value {
    color: #212529;
    letter-spacing: -0.02em;
    font-weight: 400;
}

/* ����� ����� ��� ������ �������� */
.action-icons-container {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 0.5rem;
}

.action-text-button {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-text-button:hover {
    color: #495057;
    text-decoration: underline;
}

.action-text-button.delete-button:hover {
    color: #dc3545;
}

/* Круглые кнопки для действий с товаром */
.product-action-btn {
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    right: 0.75rem;
    font-size: 0.875rem;
    padding: 0;
    line-height: 1;
}

.product-action-btn:hover {
    background: #f8f9fa;
}

.product-action-btn-top {
    top: 0.75rem;
}

.product-action-btn-top i {
    color: #ffc107 !important;
    font-size: 1.1rem !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

.product-action-btn-top:hover i {
    color: #e0a800 !important;
}

.product-action-btn-bottom {
    bottom: 0.75rem;
}

.product-card .product-action-btn-bottom {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
}

.product-action-btn-bottom i {
    color: #dc3545 !important;
    font-size: 1.1rem !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

.product-action-btn-bottom:hover i {
    color: #c82333 !important;
}

/* Стили для плашек номера товара и скрыт */
.product-code-badge,
.product-hidden-badge {
    font-weight: 400 !important;
    font-size: 0.95rem !important;
    padding: 0.35rem 0.55rem !important;
}

/* Стили для ссылок на товары в таблицах */
.product-link {
    color: #0071c1;
    text-decoration: none;
    cursor: pointer;
}

.product-link:hover {
    color: #005a9e;
    text-decoration: none;
}

.empty-state {
    border: 2px dashed #dee2e6;
}

.page-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.loading-container {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ��������� ���������� ������ */
.card-body {
    padding: 1.25rem;
    background-color: #ffffff;
}

.badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.65rem;
}

/* ��������� �������� ��������� �������� */
.product-card {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================ */

/* Базовые адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    /* Общие отступы */
    .content {
        padding: 0.5rem !important;
    }

    /* Заголовки */
    h1 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
    
    /* Исключаем landing-wrap из адаптивного стиля h1 */
    .landing-wrap h1 {
        font-size: unset;
        margin-bottom: unset;
    }
    
    h2, h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Таблицы - горизонтальная прокрутка */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        font-size: 0.875rem;
    }

    table thead th {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    table tbody td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    /* Кнопки в таблице */
    table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    table .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    /* Группы кнопок - вертикальное расположение */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .btn-group .btn,
    .btn-group .form-control,
    .btn-group input[type="checkbox"] + label {
        width: 100%;
        margin-bottom: 0.25rem;
        border-radius: 0.375rem !important;
    }

    .btn-group .btn-check:checked + .btn,
    .btn-group .btn-check:not(:checked) + .btn {
        margin-bottom: 0.25rem;
    }

    /* Поиск */
    .search {
        width: 100%;
        margin-bottom: 1rem;
        margin-right: 0;
    }

    /* Поля ввода */
    .form-control,
    .form-select {
        font-size: 1rem; /* Увеличиваем для предотвращения зума на iOS */
        padding: 0.75rem;
    }

    /* Кнопки */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* Кнопки в формах - полная ширина */
    form .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    form .btn:last-child {
        margin-bottom: 0;
    }

    /* Исключения для кнопок в таблицах и специальных контейнерах */
    table .btn,
    .action-icons-container .btn,
    .d-flex .btn {
        width: auto;
        min-width: auto;
        margin-bottom: 0;
    }

    /* Специальные кнопки */
    .order-button,
    .countView {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .date {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    /* Формы */
    .mb-3 {
        margin-bottom: 1rem !important;
    }

    /* Модальные окна */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-dialog-centered {
        min-height: calc(100% - 1rem);
        display: flex;
        align-items: center;
    }

    .modal-content {
        border-radius: 0.5rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .modal-header {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }

    /* Отчеты */
    .table-report {
        width: 100%;
        margin-top: 1rem;
    }

    /* Контейнеры */
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .row > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Карточки товаров */
    .products-container {
        padding: 10px 0;
    }

    .control-panel {
        padding: 1rem !important;
    }

    .control-panel .row {
        margin-left: 0;
        margin-right: 0;
    }

    .control-panel .col-12,
    .control-panel .col-md-4,
    .control-panel .col-md-8 {
        padding-left: 0;
        padding-right: 0;
    }

    /* Иконки действий */
    .action-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    /* Карточка продукта */
    .product-image {
        height: 180px;
    }

    /* Форма создания */
    .input-group {
        flex-direction: row;
    }

    /* Иконка поиска должна быть маленькой */
    .input-group-text {
        flex: 0 0 auto;
        min-width: 40px;
        width: auto;
        padding: 0.375rem 0.75rem;
    }

    /* Поле ввода должно занимать оставшееся пространство */
    .input-group .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }

    .input-group .btn {
        flex: 0 0 auto;
        width: auto;
        margin-top: 0;
        margin-left: 0;
    }

    /* PaySubmit */
    .PaySubmit {
        justify-content: center;
    }

    .PaySubmit .btn {
        width: auto;
        min-width: 120px;
    }

    /* Таблицы на мобильных - используем только горизонтальную прокрутку */
    /* Не скрываем колонки, чтобы сохранить всю информацию */
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Исключаем landing-wrap из адаптивного стиля h1 */
    .landing-wrap h1 {
        font-size: unset;
        margin-bottom: unset;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    table {
        font-size: 0.75rem;
        min-width: 500px;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    .card-body {
        padding: 0.75rem;
    }

    .product-image {
        height: 150px;
    }
}

/* Улучшенная адаптивность для страницы отчетов */
@media (max-width: 768px) {
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
}

/* Адаптивность для форм создания/редактирования */
@media (max-width: 768px) {
    .table-borderless {
        font-size: 0.875rem;
    }

    .table-borderless th,
    .table-borderless td {
        padding: 0.5rem 0.25rem;
    }

    /* Список товаров в поиске */
    .list-group-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Alert для выбранного товара */
    .alert {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Адаптивность для страницы Applications */
@media (max-width: 768px) {
    .d-flex.justify-content-around {
        flex-direction: column;
        gap: 0.5rem;
    }

    .d-flex.justify-content-around .btn {
        width: 100%;
    }
}

/* Улучшение навигационного меню на мобильных */
@media (max-width: 640.98px) {
    /* Скрываем top-row в sidebar на мобильных */
    .sidebar .top-row {
        display: none !important;
    }

    /* Показываем кнопку меню в main на мобильных */
    main .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1001;
        width: 100%;
        background-color: #0d0d0d !important;
        display: flex !important;
        align-items: center;
        height: 3.5rem;
        padding: 0;
        margin: 0;
    }

    /* Кнопка меню всегда видна на мобильных в main - слева */
    main .mobile-menu-button {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-right: 1rem;
        margin-left: 0;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0.25rem;
        padding: 0.25rem 0.5rem;
        background-color: rgba(255, 255, 255, 0.1);
        cursor: pointer;
        order: -1;
    }

    /* Логотип в mobile-header - справа от кнопки */
    main .mobile-header .navbar-brand {
        color: white !important;
        margin-left: 15px;
        font-size: 1.1rem;
        display: block !important;
        visibility: visible !important;
        text-decoration: none;
    }

    main .mobile-menu-button:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    main .mobile-menu-button .navbar-toggler-icon {
        display: block !important;
        width: 1.5em;
        height: 1.5em;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100%;
    }

    /* Скрываем обычный top-row на мобильных */
    main > .top-row:not(.mobile-header) {
        display: none !important;
    }

    /* Основной контент должен иметь отступ сверху для top-row */
    main {
        padding-top: 3.5rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        height: 100vh;
        width: 250px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        background: transparent !important;
        background-image: none !important;
    }

    /* Когда меню открыто (без класса collapse) - показываем sidebar */
    .sidebar:has(.nav-scrollable:not(.collapse)),
    .sidebar.menu-open {
        transform: translateX(0);
    }

    /* Когда меню закрыто - полностью скрываем sidebar */
    .sidebar:not(.menu-open):has(.nav-scrollable.collapse) {
        transform: translateX(-100%);
        background: transparent !important;
        background-image: none !important;
    }

    /* Но top-row остается на месте */
    .sidebar.menu-open .top-row,
    .sidebar:has(.nav-scrollable:not(.collapse)) .top-row {
        transform: translateX(0) !important;
    }

    /* Когда меню открыто - показываем содержимое */
    .sidebar .nav-scrollable:not(.collapse) {
        display: block !important;
        background: #171717;
        height: calc(100vh - 3.5rem);
        margin-top: 3.5rem;
        overflow-y: auto;
        width: 250px;
    }

    /* Когда меню скрыто (класс collapse) */
    .sidebar .nav-scrollable.collapse {
        display: none !important;
    }

    /* Иконки в меню должны быть видны */
    .sidebar .oi,
    .sidebar .nav-scrollable .oi,
    .sidebar .nav-item .oi {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-family: Icons !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        position: relative;
        top: 1px;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Убеждаемся, что иконки отображаются в навигации */
    .sidebar .nav-item .oi {
        width: 1.5rem;
        font-size: 1rem;
        margin-right: 0.5rem;
    }
}

/* Стили для карточек статистики */
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Dashboard Styles */
.dashboard-container {
    padding: 0;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.kpi-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 4px;
}

.kpi-value.text-danger {
    color: #dc2626;
}

.kpi-subtitle {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 400;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    height: 100%;
}

.dashboard-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.dashboard-card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.dashboard-card-header p {
    font-size: 0.8rem;
}

.chart-container {
    position: relative;
    height: 300px;
    padding: 16px;
}

@media (min-width: 992px) {
    .chart-container {
        height: 350px;
    }
}

/* Группы KPI карточек */
.kpi-group {
    padding: 16px;
    background: #ffffff;
    height: 100%;
}

.kpi-group-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.kpi-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Фильтр по датам */
.date-filter-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.date-filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
    white-space: nowrap;
}

.date-filter-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter-item-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
}

.date-filter-item .form-control-sm {
    width: 150px;
    font-size: 0.875rem;
}

/* Убираем все анимации и hover эффекты */
.stat-card,
.kpi-card,
.dashboard-card,
.card,
.btn,
.form-control,
.form-select {
    transition: none !important;
}

.stat-card:hover,
.kpi-card:hover,
.dashboard-card:hover,
.card:hover {
    transform: none !important;
    box-shadow: inherit !important;
}