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.75rem;
    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;
}

/* Стили для документов */

.doc-header {
    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-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;
}

@media (max-width: 768px) {
    .doc-header {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        padding: 15px;
    }

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

    .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;
    }
}

@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;
}

@media (max-width: 768px) {
    .filters-section {
        margin-bottom: 15px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
