/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f6fa;
    color: #333;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #34495e;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sidebar-header .logo-image {
    height: 40px;
    width: auto;
    max-width: 150px;
}

.admin-title {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    /* Убираем переходы для предотвращения мерцания */
    transition: none;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: #34495e;
    color: white;
    border-left-color: #4caf50;
}

.nav-item i {
    margin-right: 1rem;
    width: 20px;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #34495e;
}

.back-to-site {
    display: flex;
    align-items: center;
    color: #bdc3c7;
    text-decoration: none;
    /* Убираем переходы */
    transition: none;
}

.back-to-site:hover {
    color: white;
}

.back-to-site i {
    margin-right: 0.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
}

.user-info i {
    font-size: 1.5rem;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 2rem;
    flex: 1;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.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: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #3498db; }
.stat-card:nth-child(2) .stat-icon { background: #e74c3c; }
.stat-card:nth-child(3) .stat-icon { background: #f39c12; }
.stat-card:nth-child(4) .stat-icon { background: #27ae60; }

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* Убираем переходы для предотвращения мерцания */
    transition: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}


.btn-secondary {
    background: #95a5a6;
    color: white;
}


.btn-success {
    background: #27ae60;
    color: white;
}


.btn-danger {
    background: #e74c3c;
    color: white;
}


.btn-warning {
    background: #f39c12;
    color: white;
}


/* Tables */
.products-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.products-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}


.product-image-small {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-delivered { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Orders */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: #2c3e50;
}

.order-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.order-items {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    font-weight: 600;
    color: #e74c3c;
    font-size: 1.1rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

/* Sellers */
.sellers-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seller-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.seller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.seller-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.seller-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.seller-info {
    margin-bottom: 1rem;
}

.seller-info p {
    margin-bottom: 0.5rem;
    color: #555;
}

.seller-info strong {
    color: #2c3e50;
}

.seller-actions {
    display: flex;
    gap: 0.5rem;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analytics-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.analytics-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Filters */
.order-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }
    
    .nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item:hover,
    .nav-item.active {
        border-left: none;
        border-bottom-color: #4caf50;
    }
    
    .dashboard-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .products-table-container {
        overflow-x: auto;
    }
    
    .order-header,
    .seller-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Kanban Board Styles */
.crm-funnel {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    min-height: 600px;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.kanban-column:hover {
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kanban-column.drag-over {
    border-color: #007bff;
    background: #e3f2fd;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.column-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.column-count {
    background: #6c757d;
    color: white;
    border-radius: 12px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.column-total {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.kanban-cards {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #dee2e6;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.card-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.card-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.card-customer {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.card-items {
    margin-bottom: 0.75rem;
}

.card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.card-total {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.card-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-status-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Drag and Drop Styles */
.drag-placeholder {
    background: #e3f2fd;
    border: 2px dashed #2196f3;
    border-radius: 8px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196f3;
    font-weight: 500;
    margin: 0.5rem 0;
}

/* Empty column styles */
.kanban-column.empty {
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
}

.kanban-column.empty .kanban-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .kanban-column {
        min-width: 100%;
    }
    
    .kanban-cards {
        min-height: 200px;
    }
}

/* Notifications Styles */
.notifications {
    position: relative;
    margin-right: 1rem;
}

.notification-btn {
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.notification-btn:hover {
    background-color: #ecf0f1;
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    color: #2c3e50;
}

.notification-header button {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.notification-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Sound notification styles */
.sound-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status badges with colors */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-lead { background: #3498db; color: white; }
.status-contacted { background: #9b59b6; color: white; }
.status-negotiation { background: #f39c12; color: white; }
.status-confirmed { background: #27ae60; color: white; }
.status-preparing { background: #e67e22; color: white; }
.status-shipped { background: #1abc9c; color: white; }
.status-delivered { background: #2ecc71; color: white; }
.status-completed { background: #16a085; color: white; }
.status-cancelled { background: #e74c3c; color: white; }
.status-lost { background: #95a5a6; color: white; }

/* Order actions with better styling */
.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.order-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-lead { background: #3498db; color: white; }
.btn-contacted { background: #9b59b6; color: white; }
.btn-negotiation { background: #f39c12; color: white; }
.btn-confirmed { background: #27ae60; color: white; }
.btn-preparing { background: #e67e22; color: white; }
.btn-shipped { background: #1abc9c; color: white; }
.btn-delivered { background: #2ecc71; color: white; }
.btn-completed { background: #16a085; color: white; }
.btn-cancelled { background: #e74c3c; color: white; }
.btn-lost { background: #95a5a6; color: white; }

.order-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Edit Order Modal Styles */
.form-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.form-section h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.form-section h5 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1rem;
}

.order-items-list {
    margin-bottom: 1.5rem;
}

.order-item-edit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-item-name {
    font-weight: 500;
    color: #2c3e50;
    min-width: 150px;
}

.order-item-weight {
    color: #6c757d;
    font-size: 0.9rem;
    min-width: 80px;
}

.order-item-price {
    color: #28a745;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

.order-item-actions {
    display: flex;
    gap: 0.5rem;
}

.order-item-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.add-item-form {
    background: white;
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin-top: 1rem;
}

.add-item-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.add-item-form .form-group {
    margin-bottom: 0;
}

.add-item-form .btn {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Weight display styles */
.weight-display {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Empty state */
.empty-items {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

/* Responsive design for edit modal */
@media (max-width: 768px) {
    .add-item-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .order-item-edit {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .order-item-info {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .order-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Search and Filters Styles */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-box .btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filters select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.filters select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.products-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.products-stats span {
    font-weight: 500;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination button:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .page-info {
    margin: 0 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Import Modal Styles */
.import-options {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.import-option {
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
}

.import-option h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.import-option p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.import-option input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.file-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #28a745;
}

.import-option textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 150px;
}

.import-settings {
    display: grid;
    gap: 0.75rem;
}

.import-settings label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.import-settings input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #007bff;
}

.import-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.import-preview h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

#previewTable {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

#previewTable table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

#previewTable th,
#previewTable td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

#previewTable th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

/* Search Results Highlighting */
.search-highlight {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Product Search in Order Modal */
.product-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.product-search-container .search-box {
    position: relative;
    margin-bottom: 0;
}

.product-search-container .search-box input {
    padding-right: 3rem;
    font-size: 1rem;
}

.product-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #2c3e50;
}

.dropdown-header button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
}

.dropdown-header button:hover {
    background: #e9ecef;
    color: #495057;
}

.dropdown-content {
    max-height: 250px;
    overflow-y: auto;
}

.product-search-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.product-search-item:hover {
    background: #f8f9fa;
}

.product-search-item:last-child {
    border-bottom: none;
}

.product-search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.75rem;
}

.product-search-item .product-info {
    flex: 1;
}

.product-search-item .product-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.product-search-item .product-details {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    gap: 1rem;
}

.product-search-item .product-price {
    font-weight: 600;
    color: #28a745;
    margin-left: auto;
}

.selected-product-info {
    margin-bottom: 1.5rem;
}

.product-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    gap: 1rem;
}

.product-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.product-details h6 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-weight: 600;
}

.product-price {
    font-weight: 600;
    color: #28a745;
    font-size: 0.9rem;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Search highlighting in dropdown */
.product-search-item .search-highlight {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Empty state for dropdown */
.dropdown-empty {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.dropdown-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        padding-right: 3rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .product-card {
        flex-direction: column;
        text-align: center;
    }
    
    .product-card .product-details {
        width: 100%;
    }
}