/* styles.css - Стили для системы управления накладными */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 50%, #f0f4ff 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
@media (max-width: 768px) {
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}
}


/* Экран входа */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Кнопки */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.secondary {
    background: #6c757d;
}

.btn.danger {
    background: #dc3545;
}

.btn.success {
    background: #28a745;
}

.btn.small {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Заголовок */
.header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

/* Основной контент */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aquarium-and-clients-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Аквариум и управление накладными */
.aquarium,
.invoice-management {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.aquarium h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Аквариум с товарами */
.fish-pool {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.fish {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 20px;
    cursor: move;
    display: inline-block;
    /* font-size: 14px; */
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    user-select: none;
    position: relative;
}

.fish:hover {
    transform: translateY(-2px);
}

.fish.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.fish .actions {
    position: absolute;
    top: -5px;
    right: -5px;
    display: none;
}

.fish:hover .actions {
    display: block;
}

/* Панель клиентов */
.clients-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    /* max-width: 400px; */
}

.client-tank {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 100px;
    background: #f9f9f9;
    position: relative;
    transition: all 0.3s ease;
}

.client-tank:hover {
    border-color: #4fc3f7;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.client-tank.drag-over {
    border-color: #4fc3f7;
    background: #e3f2fd;
}

.client-tank h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.client-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.client-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 5px;
    transition: opacity 0.2s ease;
}

.client-tank:hover .client-actions {
    display: flex;
}

.client-products {
    margin-top: 10px;
}

.assigned-product {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    padding: 8px 12px;
    margin: 3px;
    border-radius: 15px;
    display: inline-block;
    font-size: 12px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.assigned-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.assigned-product .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    transition: all 0.2s ease;
    z-index: 5;
}

.assigned-product:hover .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Swipe для мобильных */
.assigned-product.swiped {
    transform: translateX(-20px);
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

/* Исходящие накладные */
.outgoing-invoices {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.outgoing-invoice-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
    position: relative;
}

.outgoing-invoice-item:hover {
    background: #f8f9ff;
    border-color: #4fc3f7;
}

.outgoing-invoice-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 5px;
}

.outgoing-invoice-item:hover .outgoing-invoice-actions {
    display: flex;
}

/* Стили для разных типов документов */
.invoice-type {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-left: 4px solid #4fc3f7;
}

.invoice-type:hover {
    background: linear-gradient(135deg, #e6f3ff 0%, #cce5ff 100%);
    border-color: #29b6f6;
}

.waybill-type {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-left: 4px solid #9e9e9e;
}

.waybill-type:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    border-color: #757575;
}

/* Статусы исходящих накладных */
.outgoing-status-created {
    background: #fff3cd;
    color: #856404;
}

.outgoing-status-assembling {
    background: #cce5ff;
    color: #004085;
}

.outgoing-status-assembled {
    background: #d1ecf1;
    color: #0c5460;
}

.outgoing-status-shipped {
    background: #d4edda;
    color: #155724;
}

.outgoing-status-delivered {
    background: #e2e3e5;
    color: #383d41;
}

.outgoing-status-paid {
    background: #d4edda;
    color: #155724;
}

.outgoing-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* Стили для прибыли в dashboard */
.profit-positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.profit-negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

/* Стили для вкладок XML импорта */
.xml-import-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.xml-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.xml-tab-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.xml-tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #f8f9ff;
}

.xml-tab-content {
    display: none;
    padding: 20px 0;
}

.xml-tab-content.active {
    display: block;
}

.outgoing-status-completed {
    background: #d4edda;
    color: #155724;
}

/* PDF кнопки */
.pdf-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.pdf-btn {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pdf-btn.waybill {
    background: #28a745;
}

.pdf-btn:hover {
    opacity: 0.9;
}

/* Список накладных */
.invoice-list {
    max-height: 400px;
    overflow-y: auto;
}

.invoice-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.invoice-item:hover {
    background: #f8f9ff;
    border-color: #4fc3f7;
}

.invoice-item.active {
    background: #e3f2fd;
    border-color: #4fc3f7;
}

.invoice-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 5px;
}

.invoice-item:hover .invoice-actions {
    display: flex;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Утилиты */
.hidden {
    display: none;
}

/* Уведомления */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Статусы */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

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

.status-parsed {
    background: #d1ecf1;
    color: #0c5460;
}

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

.status-distributed {
    background: #e2e3e5;
    color: #383d41;
}

.status-archived {
    background: #d6d8db;
    color: #495057;
}

/* Дополнительные элементы */
.product-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #4fc3f7;
    background: #f8f9ff;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Стили для десктопа */
@media (min-width: 769px) {
    .aquarium-and-clients-container {
        max-height: 700px;
        overflow: hidden;
    }
    
    .aquarium {
        max-height: 650px;
        overflow-y: auto;
    }
    
    .clients-panel {
        max-height: 650px;
        overflow-y: auto;
    }
    
    .client-tank {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .assigned-product {
        padding: 6px 10px;
        margin: 2px;
        font-size: 11px;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .aquarium-and-clients-container {
        grid-template-columns: 1fr;
    }

    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .invoice-actions {
        position: static;
        display: flex;
        margin-top: 10px;
        justify-content: flex-end;
    }

    .fish .actions {
        position: static;
        display: block;
        margin-top: 5px;
    }
}
/* Добавьте эти стили в ваш styles.css */

/* Улучшенные стили для drag & drop */
.fish {
    position: relative;
    cursor: grab;
    transition: all 0.3s ease;
}

.fish:active {
    cursor: grabbing;
}

.fish.dragging {
    opacity: 0.7;
    transform: rotate(3deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Стили для клиентских танков */
.client-tank {
    transition: all 0.3s ease;
    position: relative;
}

.client-tank.drop-target-active {
    border-color: #4fc3f7;
    background: rgba(79, 195, 247, 0.1);
    transform: scale(1.02);
}

.client-tank.drag-over {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.3);
    transform: scale(1.05);
}

.client-tank.drag-over::before {
    content: "Отпустите для назначения товара";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(33, 150, 243, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* Анимация при hover */
.fish:hover:not(.dragging) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Стили для кнопок действий */
.fish .actions {
    position: absolute;
    top: -8px;
    right: -8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.fish:hover .actions {
    opacity: 1;
}

.fish .actions button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fish .actions button:hover {
    background: white;
    transform: scale(1.1);
}

/* Улучшенные стили для назначенных товаров */
.assigned-product {
    position: relative;
    margin: 5px;
    transition: all 0.3s ease;
}

.assigned-product:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Remove duplicate styling - keep only the first definition above */

.assigned-product .remove-btn:hover {
    background: #c82333;
    transform: scale(1.2);
}

/* Стили для mobile touch */
@media (max-width: 768px) {
    .fish .actions,
    .assigned-product .remove-btn {
        opacity: 1;
        /* position: static; */
        display: inline-block;
        margin-left: 5px;
    }

    .fish .actions button {
        position: static;
        display: inline-block;
        width: auto;
        height: auto;
        border-radius: 3px;
        padding: 2px 6px;
    }
}

/* Индикатор перетаскивания */
.drag-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drag-indicator.active {
    opacity: 1;
}

/* Стили для подсказок */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
}

/* Стили для модального окна обновления статуса */
.status-dropdown {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.status-dropdown option {
    padding: 8px;
    font-size: 14px;
}

/* Стили для PDF download модального окна */
.pdf-download-links {
    margin: 20px 0;
}

.pdf-link-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.pdf-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.pdf-info {
    flex: 1;
    margin-right: 15px;
}

.pdf-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.pdf-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.pdf-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.pdf-actions .btn {
    min-width: 80px;
    text-align: center;
    padding: 6px 12px;
    font-size: 12px;
}

/* Улучшенные статусы исходящих накладных */
.outgoing-status-created {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.outgoing-status-assembling {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99d6ff;
}

.outgoing-status-assembled {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #a6e1ec;
}

.outgoing-status-shipped {
    background: #e2f3ff;
    color: #0056b3;
    border: 1px solid #b3daff;
}

.outgoing-status-delivered {
    background: #d4edda;
    color: #155724;
    border: 1px solid #a3d9a5;
}

.outgoing-status-paid {
    background: #e7f3ff;
    color: #004085;
    border: 1px solid #b3d9ff;
}

.outgoing-status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #a3d9a5;
}

/* Анимации для статусов */
.status-badge {
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Улучшенные кнопки действий */
.outgoing-invoice-actions .btn,
.invoice-actions .btn {
    min-width: 30px;
    height: 30px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.outgoing-invoice-actions .btn:hover,
.invoice-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Стили для формы статуса */
#updateStatusForm .form-group {
    margin-bottom: 20px;
}

#updateStatusForm select {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s ease;
}

#updateStatusForm select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#updateStatusForm textarea {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#updateStatusForm textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Улучшенные PDF кнопки */
.pdf-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pdf-btn.waybill {
    background: linear-gradient(135deg, #28a745 0%, #20a73a 100%);
}

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

/* Стили для просмотра исходящей накладной */
#viewOutgoingInvoiceModal .modal-content {
    max-width: 900px;
}

#viewOutgoingInvoiceModal table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
    font-size: 13px;
}

#viewOutgoingInvoiceModal th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    padding: 12px 8px;
    border: 1px solid #dee2e6;
}

#viewOutgoingInvoiceModal td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

#viewOutgoingInvoiceModal tr:nth-child(even) {
    background-color: #f8f9fa;
}

#viewOutgoingInvoiceModal tr:hover {
    background-color: #e3f2fd;
}

/* Стили для информационных блоков в модальном окне */
.modal-info-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.modal-info-block h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.modal-info-block p {
    margin: 5px 0;
    font-size: 13px;
    color: #6c757d;
}

/* Загрузка и индикаторы */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.loading-indicator .loading {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Улучшения для мобильных устройств */
@media (max-width: 768px) {
    .pdf-link-item {
        flex-direction: column;
        text-align: center;
    }

    .pdf-icon {
        margin: 0 0 10px 0;
    }

    .pdf-info {
        margin: 0 0 15px 0;
    }

    .pdf-actions {
        flex-direction: row;
        justify-content: center;
    }

    .outgoing-invoice-actions,
    .invoice-actions {
        position: static;
        display: flex;
        margin-top: 10px;
        justify-content: flex-end;
        gap: 5px;
    }

    #viewOutgoingInvoiceModal .two-column {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Анимации появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* Стили для уведомлений с иконками */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert.success::before {
    content: "✅";
    font-size: 16px;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert.error::before {
    content: "❌";
    font-size: 16px;
}

.alert.info {
    background: #cce5ff;
    color: #004085;
    border-left-color: #0066cc;
}

.alert.info::before {
    content: "ℹ️";
    font-size: 16px;
}

/* Улучшенная типографика */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
}

.modal h2 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Стили для статистических карточек */
.stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-card .value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Touch-friendly buttons for quantity controls */
.touch-btn {
    min-width: 44px;
    min-height: 40px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-btn {
    background: rgba(255, 59, 48, 0.8);
    color: white;
    border-radius: 50%;
    min-width: 36px;
    min-height: 36px;
    font-size: 20px;
    position: absolute;
    top: 5px;
    right: 5px;
}

.remove-btn:hover {
    background: rgba(255, 59, 48, 1);
    transform: scale(1.1);
}

.qty-btn {
    background: rgba(0, 122, 255, 0.8);
    color: white;
    margin: 0 8px;
    min-width: 40px;
    min-height: 40px;
    font-size: 20px;
    font-weight: bold;
}

.qty-btn:hover {
    background: rgba(0, 122, 255, 1);
    transform: scale(1.05);
}

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

/* Product header and controls layout - Cart items */
.assigned-product {
    position: relative;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    margin: 8px 0;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 100%;
    display: block;
}

.product-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-info {
    flex: 1;
    margin-right: 45px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

.quantity-controls {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}

.quantity-input-group input {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 8px;
}

.quantity-input {
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 60px;
    min-height: 40px;
}

.quantity-input:focus {
    outline: 2px solid rgba(0, 122, 255, 0.8);
    background: rgba(255, 255, 255, 1);
}

.quantity-suffix {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    margin-top: 4px;
    margin-bottom: 2px;
}

.qty-btn-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    min-height: 40px;
}

.qty-btn-all:hover {
    background: linear-gradient(135deg, #667eea 0%, #603c85 100%);
    transform: scale(1.05);
}

.qty-btn-all:active {
    transform: scale(0.95);
}

.temp-price-btn {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temp-price-btn:hover {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.4);
}

.temp-price-cancel-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temp-price-cancel-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.quantity-display {
    font-weight: bold;
    color: white;
    font-size: 16px;
    min-width: 120px;
    text-align: center;
    padding: 0 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .qty-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 18px;
        margin: 0 6px;
    }
    
    .qty-btn-all {
        min-height: 40px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .quantity-input {
        width: 50px;
        font-size: 14px;
    }
    
    .quantity-suffix {
        font-size: 12px;
    }
    
    .remove-btn {
        min-width: 42px;
        min-height: 42px;
        font-size: 22px;
    }
    
    .quantity-display {
        font-size: 14px;
        min-width: 100px;
    }
}

/* Out of stock styling */
.fish.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.fish.out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Filename truncation styles */
.filename-container {
    max-width: 100%;
    overflow: hidden;
}

.filename-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* Mobile specific filename truncation */
@media (max-width: 768px) {
    .invoice-item .filename-text {
        max-width: calc(100vw - 300px); /* Account for actions buttons and padding */
    }
    .filename-text {
        max-width: calc(100vw - 200px); /* Account for actions buttons and padding */
    }
    
    .invoice-item div[style*="margin-right: 80px"] {
        margin-right: 60px !important; /* Reduce margin on mobile */
    }
    
    /* Mobile client actions */
    .client-actions {
        position: static !important;
        display: flex !important;
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    /* Mobile assigned product remove buttons */
    .assigned-product .remove-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .client-actions .btn.small {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 30px;
        height: 30px;
    }
    
    .outgoing-invoice-actions .btn.small {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 30px;
        height: 30px;
    }
}

/* Price Rules Styles */
.price-rule-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.price-rule-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.price-rule-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-rule-item.inactive {
    background: #f8f9fa;
    opacity: 0.8;
}

.price-rule-item h4 {
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.price-rule-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

.price-rule-status.active {
    background: #28a745;
}

.price-rule-status.inactive {
    background: #6c757d;
}

.price-rule-priority {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.price-rule-controls {
    margin-left: 15px;
    display: flex;
    gap: 8px;
}
