/* Стили для системы складского учета */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
    color: #1565c0;
}

/* Навигация */
.navbar {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-brand {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Контейнер */
.container {
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Карточки */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(21, 101, 192, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(21, 101, 192, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(21, 101, 192, 0.15);
}

.card-header {
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: #1565c0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1565c0;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-control:required {
    border-left: 4px solid #f44336;
}

/* Таблицы */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.table th {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #e3f2fd;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Поиск и фильтры */
.search-container {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
    margin-bottom: 2rem;
}

.search-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.search-group {
    flex: 1;
    min-width: 200px;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border-left: 4px solid #1976d2;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(21, 101, 192, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e3f2fd;
}

.modal-title {
    color: #1565c0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f44336;
}

/* Алерты */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-color: #f44336;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #2196f3;
}

/* Адаптивность для широких экранов */
@media (min-width: 1400px) {
    .container {
        max-width: 95%;
        padding: 0 2rem;
    }
    
    .nav-container {
        max-width: 95%;
        padding: 0 2rem;
    }
    
    .sync-controls {
        min-width: 200px;
        max-width: 220px;
    }
    
    .table th, .table td {
        padding: 0.8rem 1rem;
    }
    
    .table th {
        font-size: 0.95rem;
    }
    
    .table td {
        font-size: 0.9rem;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .sync-controls {
        min-width: 150px;
        max-width: 180px;
    }
    
    .sync-inputs input {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .sync-btn {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .status-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-group {
        min-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Анимации загрузки */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Иконки действий в таблицах */
.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.table-action-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.table-action-btn:hover {
    transform: scale(1.1);
}

.btn-edit {
    background: #ff9800;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-move {
    background: #4caf50;
    color: white;
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}

/* Успешные операции */
.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #4caf50;
}

/* Ошибки */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #f44336;
}

/* Стили для главной страницы */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(21, 101, 192, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(21, 101, 192, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.1);
}

.quick-actions h2 {
    color: #1565c0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(21, 101, 192, 0.3);
    color: white;
    text-decoration: none;
}

.action-btn i {
    font-size: 1.2rem;
}

.recent-operations {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.1);
}

.recent-operations h2 {
    color: #1565c0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.operation-type {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.operation-type.incoming {
    background: #e8f5e8;
    color: #2e7d32;
}

.operation-type.outgoing {
    background: #ffebee;
    color: #c62828;
}

/* Стили для статусов */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-отправлено {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-в_пути {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.status-доставлено {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.status-принято {
    background-color: #4caf50;
    color: white;
    border: 1px solid #45a049;
}

.status-возврат {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.status-active {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.status-inactive {
    background-color: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* Стили для неактивных строк */
.inactive {
    opacity: 0.6;
    background-color: #f9f9f9;
}

/* Стили для группировки складов */
.warehouse-group {
    margin-bottom: 2rem;
}

.warehouse-group h2 {
    color: #1565c0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

/* Стили для календаря поставок */
.calendar-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filters-form {
    padding: 1rem;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.calendar-container {
    padding: 1rem;
}

.calendar-header {
    text-align: center;
    margin-bottom: 2rem;
}

.date-range {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1976d2;
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 10px;
    display: inline-block;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1rem;
    min-height: 400px;
}

.calendar-day {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.day-header {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    padding: 1rem;
    text-align: center;
}

.day-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.day-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.25rem 0;
}

.day-month {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.day-shipments {
    padding: 1rem;
    min-height: 200px;
}

.shipment-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shipment-card:hover {
    background: #e3f2fd;
    transform: translateX(2px);
}

.shipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.warehouse-name {
    font-weight: bold;
    color: #1976d2;
    font-size: 0.9rem;
}

.marketplace-badge {
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.shipment-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.shipment-count,
.shipment-total {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.shipment-status {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.no-shipments {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.no-shipments i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Адаптивность для календаря */
@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
}

/* Стили для статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.stat-icon {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Стили для табличного календаря */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #e0e0e0;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.warehouse-header {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    font-weight: bold;
    padding: 1rem;
    min-width: 200px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.date-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    font-weight: bold;
    padding: 0.5rem;
    min-width: 80px;
}

.date-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.date-info .day-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
}

.date-info .day-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1976d2;
}

.date-info .day-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
}

.warehouse-cell {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 2px solid #1976d2;
}

.warehouse-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warehouse-name {
    font-weight: bold;
    color: #1976d2;
    font-size: 0.9rem;
}

.warehouse-city {
    font-size: 0.8rem;
    color: #666;
}

.marketplace-badge {
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    align-self: flex-start;
}

.date-cell {
    padding: 0.5rem;
    min-height: 60px;
    position: relative;
}

.shipment-indicator {
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.shipment-indicator:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.shipment-count {
    font-weight: bold;
    font-size: 1.1rem;
    color: #1976d2;
}

.shipment-indicator:hover .shipment-count {
    color: white;
}

.shipment-amount {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.shipment-indicator:hover .shipment-amount {
    color: white;
}

.shipment-status-dots {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.no-shipment {
    color: #ccc;
    font-size: 1.2rem;
    padding: 1rem;
}

/* Адаптивность для табличного календаря */
@media (max-width: 1200px) {
    .calendar-table {
        font-size: 0.8rem;
    }
    
    .warehouse-cell {
        min-width: 150px;
    }
    
    .date-header {
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .calendar-table {
        min-width: 800px;
    }
    
    .warehouse-cell {
        min-width: 120px;
    }
    
    .date-header {
        min-width: 50px;
    }
    
    .date-info .day-number {
        font-size: 1rem;
    }
}

/* Стили для чистого календаря */
.status-indicator {
    color: white;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.status-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-count {
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0.9;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-data i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.no-data h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.no-data p {
    color: #666;
    font-size: 0.9rem;
}

/* Стили для синхронизации с WB */
.sync-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
    max-width: 200px;
}

.sync-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sync-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #1976d2;
}

.sync-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sync-inputs input {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.sync-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    width: 100%;
    box-sizing: border-box;
}

.sync-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-synced {
    background-color: #4caf50;
    color: white;
}

.status-pending {
    background-color: #ff9800;
    color: white;
}

.status-error {
    background-color: #f44336;
    color: white;
}

.status-not_found {
    background-color: #9e9e9e;
    color: white;
}

.sync-date {
    color: #666;
    font-size: 0.7rem;
    text-align: center;
}

/* Переключатель (switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1976d2;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Анимация загрузки для кнопки синхронизации */
.sync-btn.loading {
    position: relative;
    color: transparent;
}

.sync-btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Стили для массовых действий */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mass-actions-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid #e3f2fd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.selected-count {
    font-weight: bold;
    color: #1976d2;
    margin-right: 0.5rem;
}

.product-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

/* Стили для модального окна массового оприходования */
.receipt-products-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.receipt-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.receipt-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.product-info {
    flex: 1;
}

.product-info strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #1976d2;
}

.product-info small {
    color: #666;
}

.quantity-input {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 120px;
}

.quantity-input label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.receipt-quantity {
    width: 80px;
    text-align: center;
}

/* Прогресс-бар для синхронизации */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Стили для модального окна удаления */
.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-danger i {
    margin-right: 0.5rem;
}

#deleteConfirmation {
    text-transform: uppercase;
    font-weight: bold;
}

#deleteConfirmation:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#confirmDeleteBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Адаптивность для массовых действий */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .mass-actions-panel {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .receipt-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .quantity-input {
        align-items: stretch;
    }
    
    .receipt-quantity {
        width: 100%;
    }
}
