body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}
.container {
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header .time {
    font-size: 18px;
}
.header .logo {
    background-color: #ffd700;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}
.header .icons {
    display: flex;
    align-items: center;
}
.header .icons i {
    margin-left: 10px;
    font-size: 18px;
}
.profile {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    margin-top: 10px;
}
.profile .avatar {
    width: 40px;
    height: 40px;
    background-color: #ccc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-right: 10px;
}
.profile .name {
    font-size: 20px;
    font-weight: bold;
}
.profile .invite {
    margin-left: auto;
    background-color: #6a0dad;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
}
.cards {
    display: flex;
    overflow-x: auto;
    /* padding: 10px 20px; */
    /* background-color: #fff; */
    margin-top: 10px;
}

.cards .card {
    background-color: #e0e0e0;
    border-radius: 10px;
    position: relative;
    width: 120px;
    height: 120px;
    margin-right: 10px;
    text-align: center;
}

.card {
    min-width: 120px;
}

.cards .card img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.cards .card p {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 100%;
    text-align: left;
    padding: 5px;
    font-size: 12px;
    border-radius: 0 0 10px 10px;
}

.sections {
    /* padding: 20px; */
}

.sections .section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
}

.sections .section .title {
    font-size: 18px;
    font-weight: bold;
}

.sections .section .subtitle {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

.sections .section .progress {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.sections .section .progress .bar {
    height: 100%;
    background-color: #00bcd4;
    width: 50%;
}

.sections .section .icons {
    display: flex;
    margin-top: 10px;
}

.sections .section .icons img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-right: 10px;
}

#footer {
    position: fixed;
    bottom: 0;
    width: 90%;
    background-color: #f8f9fa;
}

#manual-input {
    width: 50px; /* Very small width for the input */
}

#main-button-web {
    margin-top: 10px; /* Adds a small space between input and button */
}

#content {
    min-height: 100vh; /* Высота всего окна, чтобы лоадер был по центру */
}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Высота всего окна, чтобы лоадер был по центру */
    position: absolute; /* Позиционирование поверх остального контента */
    top: 0;
    left: 0;
    width: 100%;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
}

/* Select2 стилизация */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.375rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    color: #212529;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-results__option {
    padding: 0.375rem 0.75rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd;
}

/* Стили для карусели на полный экран */
.carousel {
    height: calc(100vh - 150px); /* вычитаем высоту навбара */
}

.carousel-inner, .carousel-item {
    height: 100%;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.printers-list {
    margin-bottom: 15px;
}

.printer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}

.add-printer-form {
    display: flex;
    gap: 10px;
}

.add-printer-form input {
    flex: 1;
}

/* Стили для разных размеров шрифта */
.font-size-small {
    font-size: 14px;
}

.font-size-medium {
    font-size: 16px;
}

.font-size-large {
    font-size: 18px;
}

/* Стили для подсказок */
.hint {
    display: none;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.hints-enabled .hint {
    display: block;
}

.info-block {
    display: table;
}

.info-block div {
    display: table-row;
}

.info-block .label {
    display: table-cell;
    white-space: nowrap;
    padding-right: 8px;
    min-width: max-content; /* Динамическая ширина по самому длинному тексту */
    font-weight: bold;
}

.info-block span {
    display: table-cell;
}

table {
    table-layout: fixed; /* Ограничивает ширину таблицы */
    width: 100%; /* Обеспечивает, чтобы таблица не выходила за пределы родительского блока */
}

td {
    word-wrap: break-word; /* Старая версия, для совместимости */
    overflow-wrap: break-word; /* Современная версия */
}

td .btn-group .d-flex {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* Для жесткого разбиения длинных строк */
}

.navbar-nav .nav-link {
  cursor: pointer;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.info-label i {
    font-size: 0.8rem;
    color: #007bff;
}

.section-title {
    margin: 25px 20px 15px 20px;
    font-size: 1.2rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

section-title i {
    font-size: 1.1rem;
    color: #007bff;
}

item-name {
    font-weight: 500;
    color: #0d6efd;
    text-decoration: underline;
    text-decoration-color: rgba(13, 110, 253, 0.3);
    transition: all 0.2s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
    overflow: hidden;
}

.item-subtext {
    color: #6c757d;
    font-size: 12px;
}

.quantity-info {
    display: flex;
    justify-content: center;
}

.quantity-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.quantity-text.warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.quantity-text.normal {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

.action-cell {
     width: 120px;
     text-align: right;
     flex-direction: column;
     gap: 6px;
     align-items: flex-end;
     justify-content: center;
     flex-shrink: 0;
     padding-right: 0;
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.th-title{
    font-size:13px;
    font-weight:600;
}

.th-subtitle{
    font-size:12px;
    color:#6c757d;
    font-weight:400;
    margin-top:2px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delete-item-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.delete-item-btn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.delete-item-btn:active {
    transform: scale(0.95);
}

.info-item-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.info-item-btn:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
    transform: scale(1.1);
    text-decoration: none;
}

.info-item-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 60px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
/* Стили для документов */

.doc-header, .doc-footer {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}


.doc-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-title {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
}

.doc-body {
    padding: 20px;
}

.doc-info {
    flex: 1;
}

.doc-key {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-value {
     font-size: 1rem;
     font-weight: 500;
     color: #2c3e50;
     line-height: 1.4;
     padding-left: 20px;
}

.info-edit-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item.full-width {
    width: 100%;
}

.info-edit-value .form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.info-edit-value .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.info-edit-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Стили для кнопок */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0;
    border: 1px solid;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-outline-info {
    background: transparent;
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-outline-info:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.doc-detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

/* Стили для секции товаров */
.spec-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
    padding: 10px;
}

.spec-title {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-title i {
    color: #007bff;
    font-size: 1.1rem;
}

.help-text {
    background: #D9EDF7;
    color: #0C5460;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.help-text .info {
    display: flex;
    align-items: stretch;
}

.help-text .info i {
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 30px;
    color: #0A6C8E;
}

.table-row-form .save-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.table-row-form:focus-within .save-btn,
.table-row-form .save-btn:active {
    opacity: 1;
    pointer-events: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.card-actions {
    padding: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.card-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.doc-detail-container {
    padding: 15px;
    max-width: 100%;
    margin: 0 auto;
}

.header-content .page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table td:last-child {
     padding-right: 0;
}

.table th {
     background: #f8f9fa;
     border-bottom: 2px solid #dee2e6;
     font-weight: 600;
     color: #495057;
     padding: 12px 15px;
     font-size: 0.9rem;
 }

.quantity-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.quantity-text.critical {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.quantity-text.good {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px 15px;
    }

    .header-content .page-title {
        font-size: 1.3rem;
    }

    .doc-header-actions {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
        flex-shrink: 0;
    }

    .doc-detail-container {
        padding: 1px;
    }

    .doc-info {
        flex: 1;
        min-width: 0;
    }

    .doc-key {
        font-size: 0.8rem;
    }

        
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .info-value {
         padding-left: 16px;
     }

    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .spec-section {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .spec-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .action-cell {
        width: 80px;
        align-items: flex-end;
    }

    .delete-item-btn,
    .info-item-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
        .filters-section {
        margin-bottom: 15px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .quantity-text {
         font-size: 0.75rem;
         padding: 1px 6px;
     }
}

@media (max-width: 480px) {
    .doc-header {
        padding: 12px;
        gap: 8px;
    }

    .doc-key {
        font-size: 0.75rem;
    }

    .btn-icon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}

/* Стили для фильтров */
.filters-section {
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    text-decoration: none;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #007bff;
    color: white;
    text-decoration: none;
}

.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-btn i {
    font-size: 0.8rem;
}

